Skip to content

StorageOptions

StorageOptions = object

Defined in: sdks/js/browser-sdk/src/types/options.ts:56

Storage options

optional dbEncryptionKey?: Uint8Array

Defined in: sdks/js/browser-sdk/src/types/options.ts:78

Encryption key for the local DB


optional dbPath?: string | null

Defined in: sdks/js/browser-sdk/src/types/options.ts:74

Path to the local DB

There are 3 value types that can be used to specify the database path:

  • undefined (or excluded from the client options) The database will be created in the current working directory and is based on the environment label and client inbox ID. Example: xmtp-default-<inbox-id>.db3

  • null No database will be created and all data will be lost once the client disconnects.

  • string The given path will be used to create the database. Example: ./my-db.db3