Interface Keystore

A Keystore is responsible for holding the user's XMTP private keys and using them to encrypt/decrypt/sign messages. Keystores are instantiated using a KeystoreProvider

Hierarchy

  • Keystore

Implemented by

Methods

  • Create an XMTP auth token to be used as a header on XMTP API requests

    Parameters

    • req: CreateAuthTokenRequest

    Returns Promise<Token>

  • Create a sealed/encrypted invite and store the Topic keys in the Keystore for later use. The returned invite payload must be sent to the network for the other party to be able to communicate.

    Parameters

    • req: CreateInviteRequest

    Returns Promise<CreateInviteResponse>

  • Decrypt a batch of V1 messages

    Parameters

    • req: DecryptV1Request

    Returns Promise<DecryptResponse>

  • Decrypt a batch of V2 messages

    Parameters

    • req: DecryptV2Request

    Returns Promise<DecryptResponse>

  • Encrypt a batch of V1 messages

    Parameters

    • req: EncryptV1Request

    Returns Promise<EncryptResponse>

  • Encrypt a batch of V2 messages

    Parameters

    • req: EncryptV2Request

    Returns Promise<EncryptResponse>

  • Get the account address of the wallet used to create the Keystore

    Returns Promise<string>

  • Export the private keys. May throw an error if the keystore implementation does not allow this operation

    Returns Promise<PrivateKeyBundleV1>

  • Get the private preferences topic identifier

    Returns Promise<GetPrivatePreferencesTopicIdentifierResponse>

  • Get the PublicKeyBundle associated with the Keystore's private keys

    Returns Promise<PublicKeyBundle>

  • Get a refresh job from the persistence

    Parameters

    • req: GetRefreshJobRequest

    Returns Promise<GetRefreshJobResponse>

  • Get a list of V1 conversations

    Returns Promise<GetConversationsResponse>

  • Get a list of V2 conversations

    Returns Promise<GetConversationsResponse>

  • Take a batch of invite messages and store the TopicKeys for later use in decrypting messages

    Parameters

    • req: SaveInvitesRequest

    Returns Promise<SaveInvitesResponse>

  • Save V1 Conversations

    Parameters

    • req: SaveV1ConversationsRequest

    Returns Promise<SaveV1ConversationsResponse>

  • Decrypt a batch of messages to yourself

    Parameters

    • req: SelfDecryptRequest

    Returns Promise<DecryptResponse>

  • Encrypt a batch of messages to yourself

    Parameters

    • req: SelfEncryptRequest

    Returns Promise<SelfEncryptResponse>

  • Sets the time of a refresh job

    Parameters

    • req: SetRefeshJobRequest

    Returns Promise<SetRefreshJobResponse>

  • Sign the provided digest with either the IdentityKey or a specified PreKey

    Parameters

    • req: SignDigestRequest

    Returns Promise<Signature>

Generated using TypeDoc