Preparing search index...
The search index is not available
@xmtp/xmtp-js
@xmtp/xmtp-js
SnapProvider
Class SnapProvider
The Snap keystore provider will:
Check if the user is capable of using Snaps
Check if the user has already setup the Snap with the appropriate keys
If not, will get keys from the network or create new keys and store them in the Snap
Implements
KeystoreProvider
<
SnapKeystoreInterface
>
Index
Constructors
constructor
Properties
snap
Id
snap
Version?
Methods
new
Keystore
Constructors
constructor
new
Snap
Provider
(
snapId
?
,
snapVersion
?
)
:
SnapProvider
Parameters
snapId
:
string
= SNAP_LOCAL_ORIGIN
Optional
snapVersion
:
string
Returns
SnapProvider
Properties
snap
Id
snap
Id
:
string
Optional
snap
Version
snap
Version
?:
string
Methods
new
Keystore
new
Keystore
(
opts
,
apiClient
,
wallet
?
)
:
Promise
<
Flatten
<
{
createAuthToken
:
(
(
req
)
=>
Promise
<
Token
>
)
;
createInvite
:
(
(
req
)
=>
Promise
<
CreateInviteResponse
>
)
;
decryptV1
:
(
(
req
)
=>
Promise
<
DecryptResponse
>
)
;
decryptV2
:
(
(
req
)
=>
Promise
<
DecryptResponse
>
)
;
encryptV1
:
(
(
req
)
=>
Promise
<
EncryptResponse
>
)
;
encryptV2
:
(
(
req
)
=>
Promise
<
EncryptResponse
>
)
;
getKeystoreStatus
:
(
(
req
)
=>
Promise
<
GetKeystoreStatusResponse
>
)
;
getPrivateKeyBundle
:
(
(
)
=>
Promise
<
PrivateKeyBundleV1
>
)
;
getPrivatePreferencesTopicIdentifier
:
(
(
)
=>
Promise
<
GetPrivatePreferencesTopicIdentifierResponse
>
)
;
getPublicKeyBundle
:
(
(
)
=>
Promise
<
PublicKeyBundle
>
)
;
getRefreshJob
:
(
(
req
)
=>
Promise
<
GetRefreshJobResponse
>
)
;
getV1Conversations
:
(
(
)
=>
Promise
<
GetConversationsResponse
>
)
;
getV2Conversations
:
(
(
)
=>
Promise
<
GetConversationsResponse
>
)
;
initKeystore
:
(
(
req
)
=>
Promise
<
InitKeystoreResponse
>
)
;
saveInvites
:
(
(
req
)
=>
Promise
<
SaveInvitesResponse
>
)
;
saveV1Conversations
:
(
(
req
)
=>
Promise
<
SaveV1ConversationsResponse
>
)
;
selfDecrypt
:
(
(
req
)
=>
Promise
<
DecryptResponse
>
)
;
selfEncrypt
:
(
(
req
)
=>
Promise
<
SelfEncryptResponse
>
)
;
setRefreshJob
:
(
(
req
)
=>
Promise
<
SetRefreshJobResponse
>
)
;
signDigest
:
(
(
req
)
=>
Promise
<
Signature
>
)
;
}
&
OtherKeyStoreMethods
>
>
Parameters
opts
:
KeystoreProviderOptions
apiClient
:
ApiClient
Optional
wallet
:
Signer
Returns
Promise
<
Flatten
<
{
createAuthToken
:
(
(
req
)
=>
Promise
<
Token
>
)
;
createInvite
:
(
(
req
)
=>
Promise
<
CreateInviteResponse
>
)
;
decryptV1
:
(
(
req
)
=>
Promise
<
DecryptResponse
>
)
;
decryptV2
:
(
(
req
)
=>
Promise
<
DecryptResponse
>
)
;
encryptV1
:
(
(
req
)
=>
Promise
<
EncryptResponse
>
)
;
encryptV2
:
(
(
req
)
=>
Promise
<
EncryptResponse
>
)
;
getKeystoreStatus
:
(
(
req
)
=>
Promise
<
GetKeystoreStatusResponse
>
)
;
getPrivateKeyBundle
:
(
(
)
=>
Promise
<
PrivateKeyBundleV1
>
)
;
getPrivatePreferencesTopicIdentifier
:
(
(
)
=>
Promise
<
GetPrivatePreferencesTopicIdentifierResponse
>
)
;
getPublicKeyBundle
:
(
(
)
=>
Promise
<
PublicKeyBundle
>
)
;
getRefreshJob
:
(
(
req
)
=>
Promise
<
GetRefreshJobResponse
>
)
;
getV1Conversations
:
(
(
)
=>
Promise
<
GetConversationsResponse
>
)
;
getV2Conversations
:
(
(
)
=>
Promise
<
GetConversationsResponse
>
)
;
initKeystore
:
(
(
req
)
=>
Promise
<
InitKeystoreResponse
>
)
;
saveInvites
:
(
(
req
)
=>
Promise
<
SaveInvitesResponse
>
)
;
saveV1Conversations
:
(
(
req
)
=>
Promise
<
SaveV1ConversationsResponse
>
)
;
selfDecrypt
:
(
(
req
)
=>
Promise
<
DecryptResponse
>
)
;
selfEncrypt
:
(
(
req
)
=>
Promise
<
SelfEncryptResponse
>
)
;
setRefreshJob
:
(
(
req
)
=>
Promise
<
SetRefreshJobResponse
>
)
;
signDigest
:
(
(
req
)
=>
Promise
<
Signature
>
)
;
}
&
OtherKeyStoreMethods
>
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
snap
Id
snap
Version
new
Keystore
@xmtp/xmtp-js
AuthCache
BrowserStoragePersistence
Ciphertext
Client
CompositeCodec
ConsentListEntry
ContentTypeId
ConversationV1
ConversationV2
Conversations
DecodedMessage
EncryptedPersistence
HttpApiClient
InMemoryKeystore
InMemoryPersistence
InvitationV1
KeyGeneratorKeystoreProvider
LocalAuthenticator
MessageV1
MessageV2
NetworkKeystoreProvider
Loading...
Generated using
TypeDoc
The Snap keystore provider will: