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
:
CreateAuthTokenRequest
)
=>
Promise
<
Token
>
)
;
createInvite
:
(
(
req
:
CreateInviteRequest
)
=>
Promise
<
CreateInviteResponse
>
)
;
decryptV1
:
(
(
req
:
DecryptV1Request
)
=>
Promise
<
DecryptResponse
>
)
;
decryptV2
:
(
(
req
:
DecryptV2Request
)
=>
Promise
<
DecryptResponse
>
)
;
encryptV1
:
(
(
req
:
EncryptV1Request
)
=>
Promise
<
EncryptResponse
>
)
;
encryptV2
:
(
(
req
:
EncryptV2Request
)
=>
Promise
<
EncryptResponse
>
)
;
getKeystoreStatus
:
(
(
req
:
GetKeystoreStatusRequest
)
=>
Promise
<
GetKeystoreStatusResponse
>
)
;
getPrivateKeyBundle
:
(
(
)
=>
Promise
<
PrivateKeyBundleV1
>
)
;
getPrivatePreferencesTopicIdentifier
:
(
(
)
=>
Promise
<
GetPrivatePreferencesTopicIdentifierResponse
>
)
;
getPublicKeyBundle
:
(
(
)
=>
Promise
<
PublicKeyBundle
>
)
;
getRefreshJob
:
(
(
req
:
GetRefreshJobRequest
)
=>
Promise
<
GetRefreshJobResponse
>
)
;
getV1Conversations
:
(
(
)
=>
Promise
<
GetConversationsResponse
>
)
;
getV2ConversationHmacKeys
:
(
(
req
:
GetConversationHmacKeysRequest
)
=>
Promise
<
GetConversationHmacKeysResponse
>
)
;
getV2Conversations
:
(
(
)
=>
Promise
<
GetConversationsResponse
>
)
;
initKeystore
:
(
(
req
:
InitKeystoreRequest
)
=>
Promise
<
InitKeystoreResponse
>
)
;
saveInvites
:
(
(
req
:
SaveInvitesRequest
)
=>
Promise
<
SaveInvitesResponse
>
)
;
saveV1Conversations
:
(
(
req
:
SaveV1ConversationsRequest
)
=>
Promise
<
SaveV1ConversationsResponse
>
)
;
selfDecrypt
:
(
(
req
:
SelfDecryptRequest
)
=>
Promise
<
DecryptResponse
>
)
;
selfEncrypt
:
(
(
req
:
SelfEncryptRequest
)
=>
Promise
<
SelfEncryptResponse
>
)
;
setRefreshJob
:
(
(
req
:
SetRefeshJobRequest
)
=>
Promise
<
SetRefreshJobResponse
>
)
;
signDigest
:
(
(
req
:
SignDigestRequest
)
=>
Promise
<
Signature
>
)
;
}
&
OtherKeyStoreMethods
&
PrivatePreferenceKeystoreMethods
>
>
Parameters
opts
:
KeystoreProviderOptions
apiClient
:
ApiClient
Optional
wallet
:
Signer
Returns
Promise
<
Flatten
<
{
createAuthToken
:
(
(
req
:
CreateAuthTokenRequest
)
=>
Promise
<
Token
>
)
;
createInvite
:
(
(
req
:
CreateInviteRequest
)
=>
Promise
<
CreateInviteResponse
>
)
;
decryptV1
:
(
(
req
:
DecryptV1Request
)
=>
Promise
<
DecryptResponse
>
)
;
decryptV2
:
(
(
req
:
DecryptV2Request
)
=>
Promise
<
DecryptResponse
>
)
;
encryptV1
:
(
(
req
:
EncryptV1Request
)
=>
Promise
<
EncryptResponse
>
)
;
encryptV2
:
(
(
req
:
EncryptV2Request
)
=>
Promise
<
EncryptResponse
>
)
;
getKeystoreStatus
:
(
(
req
:
GetKeystoreStatusRequest
)
=>
Promise
<
GetKeystoreStatusResponse
>
)
;
getPrivateKeyBundle
:
(
(
)
=>
Promise
<
PrivateKeyBundleV1
>
)
;
getPrivatePreferencesTopicIdentifier
:
(
(
)
=>
Promise
<
GetPrivatePreferencesTopicIdentifierResponse
>
)
;
getPublicKeyBundle
:
(
(
)
=>
Promise
<
PublicKeyBundle
>
)
;
getRefreshJob
:
(
(
req
:
GetRefreshJobRequest
)
=>
Promise
<
GetRefreshJobResponse
>
)
;
getV1Conversations
:
(
(
)
=>
Promise
<
GetConversationsResponse
>
)
;
getV2ConversationHmacKeys
:
(
(
req
:
GetConversationHmacKeysRequest
)
=>
Promise
<
GetConversationHmacKeysResponse
>
)
;
getV2Conversations
:
(
(
)
=>
Promise
<
GetConversationsResponse
>
)
;
initKeystore
:
(
(
req
:
InitKeystoreRequest
)
=>
Promise
<
InitKeystoreResponse
>
)
;
saveInvites
:
(
(
req
:
SaveInvitesRequest
)
=>
Promise
<
SaveInvitesResponse
>
)
;
saveV1Conversations
:
(
(
req
:
SaveV1ConversationsRequest
)
=>
Promise
<
SaveV1ConversationsResponse
>
)
;
selfDecrypt
:
(
(
req
:
SelfDecryptRequest
)
=>
Promise
<
DecryptResponse
>
)
;
selfEncrypt
:
(
(
req
:
SelfEncryptRequest
)
=>
Promise
<
SelfEncryptResponse
>
)
;
setRefreshJob
:
(
(
req
:
SetRefeshJobRequest
)
=>
Promise
<
SetRefreshJobResponse
>
)
;
signDigest
:
(
(
req
:
SignDigestRequest
)
=>
Promise
<
Signature
>
)
;
}
&
OtherKeyStoreMethods
&
PrivatePreferenceKeystoreMethods
>
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Properties
snap
Id
snap
Version
Methods
new
Keystore
@xmtp/xmtp-js
Loading...
The Snap keystore provider will: