Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Methods

  • createAuthToken(req: CreateAuthTokenRequest): Promise<Token>
  • Create an XMTP auth token to be used as a header on XMTP API requests

    Parameters

    • req: CreateAuthTokenRequest

    Returns Promise<Token>

  • createInvite(req: CreateInviteRequest): Promise<CreateInviteResponse>
  • 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>

  • decryptV1(req: DecryptV1Request): Promise<DecryptResponse>
  • Decrypt a batch of V1 messages

    Parameters

    • req: DecryptV1Request

    Returns Promise<DecryptResponse>

  • decryptV2(req: DecryptV2Request): Promise<DecryptResponse>
  • Decrypt a batch of V2 messages

    Parameters

    • req: DecryptV2Request

    Returns Promise<DecryptResponse>

  • encryptV1(req: EncryptV1Request): Promise<EncryptResponse>
  • Encrypt a batch of V1 messages

    Parameters

    • req: EncryptV1Request

    Returns Promise<EncryptResponse>

  • encryptV2(req: EncryptV2Request): Promise<EncryptResponse>
  • Encrypt a batch of V2 messages

    Parameters

    • req: EncryptV2Request

    Returns Promise<EncryptResponse>

  • getAccountAddress(): Promise<string>
  • Get the account address of the wallet used to create the Keystore

    Returns Promise<string>

  • getPrivateKeyBundle(): Promise<PrivateKeyBundleV1>
  • Export the private keys. May throw an error if the keystore implementation does not allow this operation

    Returns Promise<PrivateKeyBundleV1>

  • getPublicKeyBundle(): Promise<PublicKeyBundle>
  • Get the PublicKeyBundle associated with the Keystore's private keys

    Returns Promise<PublicKeyBundle>

  • getRefreshJob(req: GetRefreshJobRequest): Promise<GetRefreshJobResponse>
  • Get a refresh job from the persistence

    Parameters

    • req: GetRefreshJobRequest

    Returns Promise<GetRefreshJobResponse>

  • getV1Conversations(): Promise<GetConversationsResponse>
  • getV2Conversations(): Promise<GetConversationsResponse>
  • saveInvites(req: SaveInvitesRequest): Promise<SaveInvitesResponse>
  • Take a batch of invite messages and store the TopicKeys for later use in decrypting messages

    Parameters

    • req: SaveInvitesRequest

    Returns Promise<SaveInvitesResponse>

  • saveV1Conversations(req: SaveV1ConversationsRequest): Promise<SaveV1ConversationsResponse>
  • Save V1 Conversations

    Parameters

    • req: SaveV1ConversationsRequest

    Returns Promise<SaveV1ConversationsResponse>

  • setRefreshJob(req: SetRefeshJobRequest): Promise<SetRefreshJobResponse>
  • Sets the time of a refresh job

    Parameters

    • req: SetRefeshJobRequest

    Returns Promise<SetRefreshJobResponse>

  • signDigest(req: SignDigestRequest): Promise<Signature>
  • Sign the provided digest with either the IdentityKey or a specified PreKey

    Parameters

    • req: SignDigestRequest

    Returns Promise<Signature>

Generated using TypeDoc