Class Client<ContentTypes> Constructors Propertiescontacts contacts : Contacts
Accessorsbackup Type get backupType( ) : BackupType Returns BackupType Methodscan Message can Message ( peerAddress ) : Promise < boolean > Returns Promise < boolean > can Message ( peerAddress ) : Promise < boolean [] > Returns Promise < boolean [] > close close ( ) : Promise < void > Returns Promise < void > codec For codec For ( contentType ) : undefined | ContentCodec < any > Parameters contentType : ContentTypeId Returns undefined | ContentCodec < any > decode Content decode Content ( contentBytes ) : Promise < { content : ContentTypes ; contentFallback ?: string ; contentType : ContentTypeId ; error ?: Error ; } > Returns Promise < { content : ContentTypes ; contentFallback ?: string ; contentType : ContentTypeId ; error ?: Error ; } > encode Content encode Content ( content , options ? ) : Promise < { payload : Uint8Array ; shouldPush : boolean ; } > Returns Promise < { payload : Uint8Array ; shouldPush : boolean ; } > forget Contact forget Contact ( peerAddress ) : void Returns void list Envelopes list Envelopes < Out > ( topic , mapper , opts ? ) : Promise < Out [] > Returns Promise < Out [] > list Envelopes Paginated list Envelopes Paginated < Out > ( contentTopic , mapper , opts ? ) : AsyncGenerator < Out [] , any , any > Returns AsyncGenerator < Out [] , any , any > list Invitations list Invitations ( opts ? ) : Promise < Envelope [] > Returns Promise < Envelope [] > publish Envelopes publish Envelopes ( envelopes ) : Promise < void > Returns Promise < void > publish User Contact publish User Contact ( legacy ? ) : Promise < void > Returns Promise < void > Static
can Message can Message ( peerAddress , opts ? ) : Promise < boolean > Returns Promise < boolean > can Message ( peerAddress , opts ? ) : Promise < boolean [] > Returns Promise < boolean [] > Static
create create < ContentCodecs > ( wallet , opts ? ) : Promise < Client < undefined | ExtractDecodedType < [ ... ContentCodecs [] , TextCodec ] [ number ] > > > Type Parameters ContentCodecs extends ContentCodec < any > [] = [ ] Parameters wallet : null | Signer | { account : undefined | Account ; addChain : ( ( args : AddChainParameters ) => Promise < void > ) ; batch ?: { multicall ?: boolean | { batchSize ?: number ; wait ?: number ; } ; } ; cacheTime : number ; chain : undefined | Chain ; deployContract : ( < const abi , chainOverride > ( args : DeployContractParameters < abi , undefined | Chain , undefined | Account , chainOverride > ) => Promise < ` 0x ${ string } ` > ) ; extend : ( < const client > ( fn : ( ( client : Client < Transport , undefined | Chain , undefined | Account , WalletRpcSchema , WalletActions < undefined | Chain , undefined | Account > > ) => client ) ) => Client < Transport , undefined | Chain , undefined | Account , WalletRpcSchema , { [ K in string | number | symbol ] : client [ K ] } & WalletActions < undefined | Chain , undefined | Account > > ) ; getAddresses : ( ( ) => Promise < GetAddressesReturnType > ) ; getChainId : ( ( ) => Promise < number > ) ; getPermissions : ( ( ) => Promise < GetPermissionsReturnType > ) ; key : string ; name : string ; pollingInterval : number ; prepareTransactionRequest : ( < TParameterType , TChainOverride , TAccountOverride > ( args : PrepareTransactionRequestParameters < undefined | Chain , undefined | Account , TChainOverride , TAccountOverride , TParameterType > ) => Promise < PrepareTransactionRequestReturnType < Chain , undefined | Account , TChainOverride , TAccountOverride , TParameterType > > ) ; request : EIP1193RequestFn < WalletRpcSchema > ; requestAddresses : ( ( ) => Promise < RequestAddressesReturnType > ) ; requestPermissions : ( ( args : { eth_accounts : Record < string , any > ; } ) => Promise < RequestPermissionsReturnType > ) ; sendRawTransaction : ( ( args : SendRawTransactionParameters ) => Promise < ` 0x ${ string } ` > ) ; sendTransaction : ( < TChainOverride > ( args : SendTransactionParameters < undefined | Chain , undefined | Account , TChainOverride > ) => Promise < ` 0x ${ string } ` > ) ; signMessage : ( ( args : SignMessageParameters < undefined | Account > ) => Promise < ` 0x ${ string } ` > ) ; signTransaction : ( < TChainOverride > ( args : SignTransactionParameters < undefined | Chain , undefined | Account , TChainOverride > ) => Promise < ` 0x ${ string } ` > ) ; signTypedData : ( < const TTypedData , TPrimaryType > ( args : SignTypedDataParameters < TTypedData , TPrimaryType , undefined | Account > ) => Promise < ` 0x ${ string } ` > ) ; switchChain : ( ( args : SwitchChainParameters ) => Promise < void > ) ; transport : TransportConfig < string , EIP1193RequestFn > & Record < string , any > ; type : string ; uid : string ; watchAsset : ( ( args : WatchAssetParams ) => Promise < boolean > ) ; writeContract : ( < const abi , functionName , args , TChainOverride > ( args : WriteContractParameters < abi , functionName , args , undefined | Chain , undefined | Account , TChainOverride > ) => Promise < ` 0x ${ string } ` > ) ; } Optional
opts : Partial < Flatten < NetworkOptions & KeyStoreOptions & ContentOptions & LegacyOptions & PreEventCallbackOptions > > & { codecs ?: ContentCodecs ; } Static
get Keys get Keys < U > ( wallet , opts ? ) : Promise < Uint8Array > Parameters wallet : null | Signer | { account : undefined | Account ; addChain : ( ( args : AddChainParameters ) => Promise < void > ) ; batch ?: { multicall ?: boolean | { batchSize ?: number ; wait ?: number ; } ; } ; cacheTime : number ; chain : undefined | Chain ; deployContract : ( < const abi , chainOverride > ( args : DeployContractParameters < abi , undefined | Chain , undefined | Account , chainOverride > ) => Promise < ` 0x ${ string } ` > ) ; extend : ( < const client > ( fn : ( ( client : Client < Transport , undefined | Chain , undefined | Account , WalletRpcSchema , WalletActions < undefined | Chain , undefined | Account > > ) => client ) ) => Client < Transport , undefined | Chain , undefined | Account , WalletRpcSchema , { [ K in string | number | symbol ] : client [ K ] } & WalletActions < undefined | Chain , undefined | Account > > ) ; getAddresses : ( ( ) => Promise < GetAddressesReturnType > ) ; getChainId : ( ( ) => Promise < number > ) ; getPermissions : ( ( ) => Promise < GetPermissionsReturnType > ) ; key : string ; name : string ; pollingInterval : number ; prepareTransactionRequest : ( < TParameterType , TChainOverride , TAccountOverride > ( args : PrepareTransactionRequestParameters < undefined | Chain , undefined | Account , TChainOverride , TAccountOverride , TParameterType > ) => Promise < PrepareTransactionRequestReturnType < Chain , undefined | Account , TChainOverride , TAccountOverride , TParameterType > > ) ; request : EIP1193RequestFn < WalletRpcSchema > ; requestAddresses : ( ( ) => Promise < RequestAddressesReturnType > ) ; requestPermissions : ( ( args : { eth_accounts : Record < string , any > ; } ) => Promise < RequestPermissionsReturnType > ) ; sendRawTransaction : ( ( args : SendRawTransactionParameters ) => Promise < ` 0x ${ string } ` > ) ; sendTransaction : ( < TChainOverride > ( args : SendTransactionParameters < undefined | Chain , undefined | Account , TChainOverride > ) => Promise < ` 0x ${ string } ` > ) ; signMessage : ( ( args : SignMessageParameters < undefined | Account > ) => Promise < ` 0x ${ string } ` > ) ; signTransaction : ( < TChainOverride > ( args : SignTransactionParameters < undefined | Chain , undefined | Account , TChainOverride > ) => Promise < ` 0x ${ string } ` > ) ; signTypedData : ( < const TTypedData , TPrimaryType > ( args : SignTypedDataParameters < TTypedData , TPrimaryType , undefined | Account > ) => Promise < ` 0x ${ string } ` > ) ; switchChain : ( ( args : SwitchChainParameters ) => Promise < void > ) ; transport : TransportConfig < string , EIP1193RequestFn > & Record < string , any > ; type : string ; uid : string ; watchAsset : ( ( args : WatchAssetParams ) => Promise < boolean > ) ; writeContract : ( < const abi , functionName , args , TChainOverride > ( args : WriteContractParameters < abi , functionName , args , undefined | Chain , undefined | Account , TChainOverride > ) => Promise < ` 0x ${ string } ` > ) ; } Optional
opts : Partial < Flatten < NetworkOptions & KeyStoreOptions & ContentOptions & LegacyOptions & PreEventCallbackOptions > > & { codecs ?: U ; } Returns Promise < Uint8Array > Static
is Snaps Ready is Snaps Ready ( ) : Promise < boolean > Returns Promise < boolean >
Client class initiates connection to the XMTP network. Should be created with
await Client.create(options)