Client
Defined in: sdks/js/node-sdk/dist/index.d.ts:1252
Client for interacting with the XMTP network
Type Parameters
Section titled “Type Parameters”ContentTypes
Section titled “ContentTypes”ContentTypes = ExtractCodecContentTypes
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Client<
ContentTypes>(options?):Client<ContentTypes>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1262
Creates a new XMTP client instance
This class is not intended to be initialized directly.
Use Client.create or Client.build instead.
Parameters
Section titled “Parameters”options?
Section titled “options?”Optional configuration for the client
Returns
Section titled “Returns”Client<ContentTypes>
Accessors
Section titled “Accessors”accountIdentifier
Section titled “accountIdentifier”Get Signature
Section titled “Get Signature”get accountIdentifier():
Identifier|undefined
Defined in: sdks/js/node-sdk/dist/index.d.ts:1320
Gets the account identifier for this client
Returns
Section titled “Returns”Identifier | undefined
appVersion
Section titled “appVersion”Get Signature
Section titled “Get Signature”get appVersion():
string|undefined
Defined in: sdks/js/node-sdk/dist/index.d.ts:1302
Gets the app version used by the client
Returns
Section titled “Returns”string | undefined
conversations
Section titled “conversations”Get Signature
Section titled “Get Signature”get conversations():
Conversations<ContentTypes>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1344
Gets the conversations manager for this client
Throws
Section titled “Throws”if the client is not initialized
Returns
Section titled “Returns”Conversations<ContentTypes>
debugInformation
Section titled “debugInformation”Get Signature
Section titled “Get Signature”get debugInformation():
DebugInformation
Defined in: sdks/js/node-sdk/dist/index.d.ts:1350
Gets the debug information helpersfor this client
Throws
Section titled “Throws”if the client is not initialized
Returns
Section titled “Returns”Get Signature
Section titled “Get Signature”get env():
string
Defined in: sdks/js/node-sdk/dist/index.d.ts:1308
Gets the label used for the default database file name
Throws
Section titled “Throws”if the client is not initialized
Returns
Section titled “Returns”string
inboxId
Section titled “inboxId”Get Signature
Section titled “Get Signature”get inboxId():
string
Defined in: sdks/js/node-sdk/dist/index.d.ts:1324
Gets the inbox ID associated with this client
Returns
Section titled “Returns”string
installationId
Section titled “installationId”Get Signature
Section titled “Get Signature”get installationId():
string
Defined in: sdks/js/node-sdk/dist/index.d.ts:1328
Gets the installation ID for this client
Returns
Section titled “Returns”string
installationIdBytes
Section titled “installationIdBytes”Get Signature
Section titled “Get Signature”get installationIdBytes():
Uint8Array<ArrayBufferLike>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1332
Gets the installation ID bytes for this client
Returns
Section titled “Returns”Uint8Array<ArrayBufferLike>
isRegistered
Section titled “isRegistered”Get Signature
Section titled “Get Signature”get isRegistered():
boolean
Defined in: sdks/js/node-sdk/dist/index.d.ts:1338
Gets whether the client is registered with the XMTP network
Throws
Section titled “Throws”if the client is not initialized
Returns
Section titled “Returns”boolean
libxmtpVersion
Section titled “libxmtpVersion”Get Signature
Section titled “Get Signature”get libxmtpVersion():
string|undefined
Defined in: sdks/js/node-sdk/dist/index.d.ts:1298
Gets the version of libxmtp used in the bindings
Returns
Section titled “Returns”string | undefined
options
Section titled “options”Get Signature
Section titled “Get Signature”get options():
ClientOptions|undefined
Defined in: sdks/js/node-sdk/dist/index.d.ts:1312
Gets the client options
Returns
Section titled “Returns”ClientOptions | undefined
preferences
Section titled “preferences”Get Signature
Section titled “Get Signature”get preferences():
Preferences
Defined in: sdks/js/node-sdk/dist/index.d.ts:1356
Gets the preferences manager for this client
Throws
Section titled “Throws”if the client is not initialized
Returns
Section titled “Returns”signer
Section titled “signer”Get Signature
Section titled “Get Signature”get signer():
Signer|undefined
Defined in: sdks/js/node-sdk/dist/index.d.ts:1316
Gets the signer associated with this client
Returns
Section titled “Returns”Signer | undefined
Methods
Section titled “Methods”archiveMetadata()
Section titled “archiveMetadata()”archiveMetadata(
path,key):Promise<ArchiveMetadata>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1664
Load the metadata for an archive to see what it contains
Reads only the metadata without loading the entire file, so this function is quick.
Parameters
Section titled “Parameters”string
The file path to the archive
Uint8Array
Encryption key for the archive
Returns
Section titled “Returns”Promise<ArchiveMetadata>
Promise that resolves with the archive metadata
canMessage()
Section titled “canMessage()”canMessage(
identifiers):Promise<Map<string,boolean>>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1568
Checks if the client can message the specified identifiers
Parameters
Section titled “Parameters”identifiers
Section titled “identifiers”The identifiers to check
Returns
Section titled “Returns”Promise<Map<string, boolean>>
Whether the client can message the identifiers
Throws
Section titled “Throws”if the client is not initialized
changeRecoveryIdentifier()
Section titled “changeRecoveryIdentifier()”changeRecoveryIdentifier(
identifier):Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1560
Changes the recovery identifier for the client’s inbox
Requires a signer, use Client.create to create a client with a signer.
Parameters
Section titled “Parameters”identifier
Section titled “identifier”The new recovery identifier
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”if the client is not initialized
Throws
Section titled “Throws”if no signer is available
close()
Section titled “close()”close():
Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1369
Cleanly shuts down the client: cancels in-flight workers and detached streams, then releases the database connection.
This is idempotent — calling it more than once resolves without error. Await this before deleting the database file or dropping the client reference to avoid log noise from background tasks running against a closed database.
Returns
Section titled “Returns”Promise<void>
Promise that resolves when the client has shut down
Throws
Section titled “Throws”if the client is not initialized
createArchive()
Section titled “createArchive()”createArchive(
path,key,opts?):Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1646
Archive application elements to file for later restoration
Parameters
Section titled “Parameters”string
The file path to save the archive
Uint8Array
Encryption key for the archive
Archive options specifying what to include (defaults to consent and messages)
Returns
Section titled “Returns”Promise<void>
Promise that resolves when the archive is created
disableNotifications()
Section titled “disableNotifications()”disableNotifications():
Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1674
Disable notifications. Per-conversation overrides remain stored.
Returns
Section titled “Returns”Promise<void>
enableNotifications()
Section titled “enableNotifications()”enableNotifications(
config):Promise<NotificationState>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1672
Enable notifications and register the delivery channel.
Parameters
Section titled “Parameters”config
Section titled “config”Returns
Section titled “Returns”Promise<NotificationState>
fetchInboxIdByIdentifier()
Section titled “fetchInboxIdByIdentifier()”fetchInboxIdByIdentifier(
identifier):Promise<string|null>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1601
Fetches the inbox ID for a given identifier from the local database If not found, fetches from the network
Parameters
Section titled “Parameters”identifier
Section titled “identifier”The identifier to look up
Returns
Section titled “Returns”Promise<string | null>
The inbox ID, if found
Throws
Section titled “Throws”if the client is not initialized
fetchKeyPackageStatuses()
Section titled “fetchKeyPackageStatuses()”fetchKeyPackageStatuses(
installationIds):Promise<Record<string,KeyPackageStatus>>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1592
Fetches the key package statuses from the network for the specified installation IDs
Parameters
Section titled “Parameters”installationIds
Section titled “installationIds”string[]
The installation IDs to check
Returns
Section titled “Returns”Promise<Record<string, KeyPackageStatus>>
The key package statuses
Throws
Section titled “Throws”if the client is not initialized
fetchLatestInboxUpdatesCount()
Section titled “fetchLatestInboxUpdatesCount()”fetchLatestInboxUpdatesCount(
inboxIds):Promise<Map<string,number>>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1576
Fetches the latest inbox updates count for the specified inbox IDs
Parameters
Section titled “Parameters”inboxIds
Section titled “inboxIds”string[]
The inbox IDs to check
Returns
Section titled “Returns”Promise<Map<string, number>>
Map of inbox IDs to their updates count
Throws
Section titled “Throws”if the client is not initialized
fetchOwnInboxUpdatesCount()
Section titled “fetchOwnInboxUpdatesCount()”fetchOwnInboxUpdatesCount():
Promise<number>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1583
Fetches the latest inbox updates count for the client’s inbox
Returns
Section titled “Returns”Promise<number>
The latest inbox updates count
Throws
Section titled “Throws”if the client is not initialized
importArchive()
Section titled “importArchive()”importArchive(
path,key):Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1654
Import a previous archive from a file
Parameters
Section titled “Parameters”string
The file path to the archive
Uint8Array
Encryption key for the archive
Returns
Section titled “Returns”Promise<void>
Promise that resolves when the archive is imported
init()
Section titled “init()”init(
identifier):Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1271
Initializes the client with the provided identifier
This is not meant to be called directly.
Use Client.create or Client.build instead.
Parameters
Section titled “Parameters”identifier
Section titled “identifier”The identifier to initialize the client with
Returns
Section titled “Returns”Promise<void>
notificationState()
Section titled “notificationState()”notificationState():
Promise<NotificationState>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1676
Read the local state without a backend request.
Returns
Section titled “Returns”Promise<NotificationState>
refreshServerConfiguration()
Section titled “refreshServerConfiguration()”refreshServerConfiguration():
Promise<ServerConfiguration>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1701
Fetch the deployment configuration now, rewrite the stored copy, and return what was fetched (spec 006 CFG-082).
The snapshot this client holds is unchanged; use it to observe a change an operator has made without restarting.
Returns
Section titled “Returns”Promise<ServerConfiguration>
Throws
Section titled “Throws”if the client is not initialized
Throws
Section titled “Throws”if the deployment did not answer
Throws
Section titled “Throws”if it published an unusable configuration
Throws
Section titled “Throws”if it published a different identifier
Throws
Section titled “Throws”if it now requires a newer libxmtp
register()
Section titled “register()”register():
Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1500
Registers the client with the XMTP network
Requires a signer, use Client.create to create a client with a signer.
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”if the client is not initialized
Throws
Section titled “Throws”if no signer is available
removeAccount()
Section titled “removeAccount()”removeAccount(
identifier):Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1529
Removes an account from the client’s inbox
Requires a signer, use Client.create to create a client with a signer.
Parameters
Section titled “Parameters”identifier
Section titled “identifier”The identifier of the account to remove
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”if the client is not initialized
Throws
Section titled “Throws”if no signer is available
revokeAllOtherInstallations()
Section titled “revokeAllOtherInstallations()”revokeAllOtherInstallations():
Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1538
Revokes all other installations of the client’s inbox
Requires a signer, use Client.create to create a client with a signer.
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”if the client is not initialized
Throws
Section titled “Throws”if no signer is available
revokeInstallations()
Section titled “revokeInstallations()”revokeInstallations(
installationIds):Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1548
Revokes specific installations of the client’s inbox
Requires a signer, use Client.create to create a client with a signer.
Parameters
Section titled “Parameters”installationIds
Section titled “installationIds”Uint8Array<ArrayBufferLike>[]
The installation IDs to revoke
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”if the client is not initialized
Throws
Section titled “Throws”if no signer is available
serverConfiguration()
Section titled “serverConfiguration()”serverConfiguration():
ServerConfiguration
Defined in: sdks/js/node-sdk/dist/index.d.ts:1687
What the deployment published about itself, as this client resolved it when it was built (spec 006 CFG-030, CFG-080).
Reads memory and makes no backend request. The value never changes for the life of the client: a background refresh rewrites the stored copy, and a new value takes effect at the next build.
Returns
Section titled “Returns”Throws
Section titled “Throws”if the client is not initialized
signWithInstallationKey()
Section titled “signWithInstallationKey()”signWithInstallationKey(
signatureText):Uint8Array<ArrayBufferLike>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1609
Signs a message with the installation key
Parameters
Section titled “Parameters”signatureText
Section titled “signatureText”string
The text to sign
Returns
Section titled “Returns”Uint8Array<ArrayBufferLike>
The signature
Throws
Section titled “Throws”if the client is not initialized
syncAllDeviceSyncGroups()
Section titled “syncAllDeviceSyncGroups()”syncAllDeviceSyncGroups():
Promise<GroupSyncSummary>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1670
Manually sync all device sync groups
Returns
Section titled “Returns”Promise<GroupSyncSummary>
Promise that resolves with a summary of the sync operation
unsafe_addAccount()
Section titled “unsafe_addAccount()”unsafe_addAccount(
newAccountSigner,allowInboxReassign?):Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1519
Adds a new account to the client inbox
WARNING: This function should be used with caution. Adding a wallet already associated with an inbox ID will cause the wallet to lose access to that inbox.
The allowInboxReassign parameter must be true to reassign an inbox
already associated with a different account.
Requires a signer, use Client.create to create a client with a signer.
Parameters
Section titled “Parameters”newAccountSigner
Section titled “newAccountSigner”The signer for the new account
allowInboxReassign?
Section titled “allowInboxReassign?”boolean
Whether to allow inbox reassignment
Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”if the account is already associated with an inbox ID
Throws
Section titled “Throws”if the client is not initialized
Throws
Section titled “Throws”if no signer is available
unsafe_addAccountSignatureRequest()
Section titled “unsafe_addAccountSignatureRequest()”unsafe_addAccountSignatureRequest(
newAccountIdentifier,allowInboxReassign?):Promise<SignatureRequestHandle>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1418
Returns a signature request handler for adding a new account to the client’s inbox
WARNING: This function should be used with caution. It is only provided for use in special cases where the provided workflows do not meet the requirements of an application.
It is highly recommended to use the unsafe_addAccount method instead.
The allowInboxReassign parameter must be true or this function will
throw an error.
Parameters
Section titled “Parameters”newAccountIdentifier
Section titled “newAccountIdentifier”The identifier of the new account
allowInboxReassign?
Section titled “allowInboxReassign?”boolean
Whether to allow inbox reassignment
Returns
Section titled “Returns”Promise<SignatureRequestHandle>
The signature text
Throws
Section titled “Throws”if the client is not initialized
unsafe_addSignature()
Section titled “unsafe_addSignature()”unsafe_addSignature(
signatureRequest,signer?):Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1386
Adds a signature to a signature request using the client’s signer (or the provided signer)
WARNING: This function should be used with caution. It is only provided for use in special cases where the provided workflows do not meet the requirements of an application.
It is highly recommended to use the register, unsafe_addAccount,
removeAccount, revokeAllOtherInstallations, or revokeInstallations
methods instead.
Parameters
Section titled “Parameters”signatureRequest
Section titled “signatureRequest”The signature request to add the signature to
signer?
Section titled “signer?”Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”if the client is not initialized
Throws
Section titled “Throws”if no signer is available
unsafe_applySignatureRequest()
Section titled “unsafe_applySignatureRequest()”unsafe_applySignatureRequest(
signatureRequest):Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1491
Applies a signature request to the client
WARNING: This function should be used with caution. It is only provided for use in special cases where the provided workflows do not meet the requirements of an application.
It is highly recommended to use the register, unsafe_addAccount,
removeAccount, revokeAllOtherInstallations, or revokeInstallations
methods instead.
Parameters
Section titled “Parameters”signatureRequest
Section titled “signatureRequest”Returns
Section titled “Returns”Promise<void>
Throws
Section titled “Throws”if the client is not initialized
unsafe_changeRecoveryIdentifierSignatureRequest()
Section titled “unsafe_changeRecoveryIdentifierSignatureRequest()”unsafe_changeRecoveryIdentifierSignatureRequest(
identifier):Promise<SignatureRequestHandle>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1477
Returns a signature request handler for changing the recovery identifier for this client’s inbox
WARNING: This function should be used with caution. It is only provided for use in special cases where the provided workflows do not meet the requirements of an application.
It is highly recommended to use the changeRecoveryIdentifier method instead.
Parameters
Section titled “Parameters”identifier
Section titled “identifier”The new recovery identifier
Returns
Section titled “Returns”Promise<SignatureRequestHandle>
The signature text
Throws
Section titled “Throws”if the client is not initialized
unsafe_createInboxSignatureRequest()
Section titled “unsafe_createInboxSignatureRequest()”unsafe_createInboxSignatureRequest():
Promise<SignatureRequestHandle|null>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1399
Returns a signature request handler for creating a new inbox
WARNING: This function should be used with caution. It is only provided for use in special cases where the provided workflows do not meet the requirements of an application.
It is highly recommended to use the register method instead.
Returns
Section titled “Returns”Promise<SignatureRequestHandle | null>
The signature text
Throws
Section titled “Throws”if the client is not initialized
unsafe_removeAccountSignatureRequest()
Section titled “unsafe_removeAccountSignatureRequest()”unsafe_removeAccountSignatureRequest(
identifier):Promise<SignatureRequestHandle>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1433
Returns a signature request handler for removing an account from the client’s inbox
WARNING: This function should be used with caution. It is only provided for use in special cases where the provided workflows do not meet the requirements of an application.
It is highly recommended to use the removeAccount method instead.
Parameters
Section titled “Parameters”identifier
Section titled “identifier”The identifier of the account to remove
Returns
Section titled “Returns”Promise<SignatureRequestHandle>
The signature text
Throws
Section titled “Throws”if the client is not initialized
unsafe_revokeAllOtherInstallationsSignatureRequest()
Section titled “unsafe_revokeAllOtherInstallationsSignatureRequest()”unsafe_revokeAllOtherInstallationsSignatureRequest():
Promise<SignatureRequestHandle|null>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1447
Returns a signature request handler for revoking all other installations of the client’s inbox
WARNING: This function should be used with caution. It is only provided for use in special cases where the provided workflows do not meet the requirements of an application.
It is highly recommended to use the revokeAllOtherInstallations method instead.
Returns
Section titled “Returns”Promise<SignatureRequestHandle | null>
The signature text
Throws
Section titled “Throws”if the client is not initialized
unsafe_revokeInstallationsSignatureRequest()
Section titled “unsafe_revokeInstallationsSignatureRequest()”unsafe_revokeInstallationsSignatureRequest(
installationIds):Promise<SignatureRequestHandle>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1462
Returns a signature request handler for revoking specific installations of the client’s inbox
WARNING: This function should be used with caution. It is only provided for use in special cases where the provided workflows do not meet the requirements of an application.
It is highly recommended to use the revokeInstallations method instead.
Parameters
Section titled “Parameters”installationIds
Section titled “installationIds”Uint8Array<ArrayBufferLike>[]
The installation IDs to revoke
Returns
Section titled “Returns”Promise<SignatureRequestHandle>
The signature text
Throws
Section titled “Throws”if the client is not initialized
verifySignedWithInstallationKey()
Section titled “verifySignedWithInstallationKey()”verifySignedWithInstallationKey(
signatureText,signatureBytes):boolean
Defined in: sdks/js/node-sdk/dist/index.d.ts:1618
Verifies a signature was made with the installation key
Parameters
Section titled “Parameters”signatureText
Section titled “signatureText”string
The text that was signed
signatureBytes
Section titled “signatureBytes”Uint8Array
The signature bytes to verify
Returns
Section titled “Returns”boolean
Whether the signature is valid
Throws
Section titled “Throws”if the client is not initialized
build()
Section titled “build()”
staticbuild<ContentCodecs>(identifier,options):Promise<Client<ExtractCodecContentTypes<ContentCodecs>>>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1292
Creates a new client instance with an identifier
Clients created with this method must already be registered. Any methods called that require a signer will throw an error.
Type Parameters
Section titled “Type Parameters”ContentCodecs
Section titled “ContentCodecs”ContentCodecs extends ContentCodec[] = []
Parameters
Section titled “Parameters”identifier
Section titled “identifier”The identifier to use
options
Section titled “options”Omit<NetworkOptions & DeviceSyncOptions & StorageOptions & ContentOptions & OtherOptions, "codecs"> | Omit<object & DeviceSyncOptions & StorageOptions & ContentOptions & OtherOptions, "codecs"> & object
Optional configuration for the client
Returns
Section titled “Returns”Promise<Client<ExtractCodecContentTypes<ContentCodecs>>>
A new client instance
canMessage()
Section titled “canMessage()”
staticcanMessage(identifiers,optionsOrBackend):Promise<Map<string,boolean>>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1624
Check identifiers with an explicit backend or network options.
Parameters
Section titled “Parameters”identifiers
Section titled “identifiers”optionsOrBackend
Section titled “optionsOrBackend”Returns
Section titled “Returns”Promise<Map<string, boolean>>
create()
Section titled “create()”
staticcreate<ContentCodecs>(signer,options):Promise<Client<ExtractCodecContentTypes<ContentCodecs>>>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1279
Creates a new client instance with a signer
Type Parameters
Section titled “Type Parameters”ContentCodecs
Section titled “ContentCodecs”ContentCodecs extends ContentCodec[] = []
Parameters
Section titled “Parameters”signer
Section titled “signer”The signer to use for authentication
options
Section titled “options”Omit<NetworkOptions & DeviceSyncOptions & StorageOptions & ContentOptions & OtherOptions, "codecs"> | Omit<object & DeviceSyncOptions & StorageOptions & ContentOptions & OtherOptions, "codecs"> & object
Optional configuration for the client
Returns
Section titled “Returns”Promise<Client<ExtractCodecContentTypes<ContentCodecs>>>
A new client instance
fetchInboxStates()
Section titled “fetchInboxStates()”
staticfetchInboxStates(inboxIds,optionsOrBackend):Promise<InboxState[]>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1620
Fetch inbox states with an explicit backend or network options.
Parameters
Section titled “Parameters”inboxIds
Section titled “inboxIds”string[]
optionsOrBackend
Section titled “optionsOrBackend”Returns
Section titled “Returns”Promise<InboxState[]>
fetchLatestInboxUpdatesCount()
Section titled “fetchLatestInboxUpdatesCount()”
staticfetchLatestInboxUpdatesCount(inboxIds,optionsOrBackend):Promise<Map<string,number>>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1622
Fetch inbox update counts with an explicit backend or network options.
Parameters
Section titled “Parameters”inboxIds
Section titled “inboxIds”string[]
optionsOrBackend
Section titled “optionsOrBackend”Returns
Section titled “Returns”Promise<Map<string, number>>
fetchServerConfiguration()
Section titled “fetchServerConfiguration()”
staticfetchServerConfiguration(target):Promise<ServerConfiguration>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1714
Read what a deployment publishes about itself with no database, no client, and no credential (spec 006 CFG-081, CFG-045).
Lets an app learn auth.enabled, auth.requiredScopes, and the accepted
smart contract wallet chains before it decides how to build a client.
Nothing is stored and no identifier binding is applied.
Parameters
Section titled “Parameters”target
Section titled “target”string | NetworkOptions | Backend
A backend URL, network options, or an existing backend
Returns
Section titled “Returns”Promise<ServerConfiguration>
Throws
Section titled “Throws”if the deployment did not answer
Throws
Section titled “Throws”if it published an unusable configuration
isAddressAuthorized()
Section titled “isAddressAuthorized()”
staticisAddressAuthorized(inboxId,address,optionsOrBackend):Promise<boolean>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1635
Check address authorization with an explicit backend or network options.
Parameters
Section titled “Parameters”inboxId
Section titled “inboxId”string
address
Section titled “address”string
optionsOrBackend
Section titled “optionsOrBackend”Returns
Section titled “Returns”Promise<boolean>
isInstallationAuthorized()
Section titled “isInstallationAuthorized()”
staticisInstallationAuthorized(inboxId,installation,optionsOrBackend):Promise<boolean>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1637
Check installation authorization with an explicit backend or network options.
Parameters
Section titled “Parameters”inboxId
Section titled “inboxId”string
installation
Section titled “installation”Uint8Array
optionsOrBackend
Section titled “optionsOrBackend”Returns
Section titled “Returns”Promise<boolean>
revokeInstallations()
Section titled “revokeInstallations()”
staticrevokeInstallations(signer,inboxId,installationIds,optionsOrBackend):Promise<void>
Defined in: sdks/js/node-sdk/dist/index.d.ts:1550
Revoke installations with an explicit backend or network options.
Parameters
Section titled “Parameters”signer
Section titled “signer”inboxId
Section titled “inboxId”string
installationIds
Section titled “installationIds”Uint8Array<ArrayBufferLike>[]
optionsOrBackend
Section titled “optionsOrBackend”Returns
Section titled “Returns”Promise<void>
verifySignedWithPublicKey()
Section titled “verifySignedWithPublicKey()”
staticverifySignedWithPublicKey(signatureText,signatureBytes,publicKey):boolean
Defined in: sdks/js/node-sdk/dist/index.d.ts:1633
Verifies a signature was made with a public key
Parameters
Section titled “Parameters”signatureText
Section titled “signatureText”string
The text that was signed
signatureBytes
Section titled “signatureBytes”Uint8Array
The signature bytes to verify
publicKey
Section titled “publicKey”Uint8Array
The public key to verify against
Returns
Section titled “Returns”boolean
Whether the signature is valid

