Protected_beaconThe beaconId is a public key that is used to identify one specific application (dapp or wallet). This is used inside a message to specify the sender, for example.
Protected Readonly_isReturns whether or not the transport is connected
Protected_keyThe local keypair that is used for the communication encryption
Protected_transportProtected ReadonlyaccountProtectedanalyticsOptional ReadonlyappThe URL of the dApp.
Protected ReadonlyblockchainsProtectedhandleOptional ReadonlyiconThe URL of the dApp Icon. This can be used to display the icon of the dApp on in the wallet
Protected ReadonlymatrixReadonlynameThe name of the client
Protected ReadonlyrateHow many requests can be sent after another
Protected ReadonlyrateThe time window in seconds in which the "rateLimit" is checked
ProtectedrequestStores the times when requests have been made to determine if the rate limit has been reached
ProtectedstorageReturns the connection status of the Client
ProtectedkeyReturns whether or not the transaport is ready
ProtectedtransportThe method will attempt to initiate a connection using the active transport.
Optionalattempts: numberRegister a blockchain to the client
The blockchain to register
ProtectedaddAdd a new peer to the known peers
The new peer to add
OptionalsendPairingResponse: booleanAdd a new request (current timestamp) to the pending requests, remove old ones and check if we are above the limit
ProtectedcleanupThis method initiates a connection to the P2P network and registers a callback that will be called whenever a message is received.
The callback that will be invoked for every message the transport receives.
This resets the SDK. After using this method, this instance is no longer usable. You will have to instanciate a new client.
ProtectedfindOptionalpublicKey: stringReturn the account by ID
The ID of an account
Return all locally known accounts
Returns the metadata of this DApp
ProtectedgetOptionalpeer: PeerInfoReturn all known peers
OptionaloracleUrl: stringThis method initializes the client. It will check if the connection should be established to a browser extension or if the P2P transport should be used.
ProtectedinitSDKThis method initializes the SDK by setting some values in the storage and generating a keypair.
OptionaloracleUrl: stringRemove the account by ID
The ID of an account
Remove all locally stored accounts
OptionalsendDisconnectToPeers: booleanRemove a blockchain from the client by its identifier
The identifier of the blockchain to remove
OptionalsendDisconnectToPeer: booleanThis method sends a response for a specific request back to the DApp
The BeaconResponseMessage that will be sent back to the DApp
ProtectedsendProtectedsetA "setter" for when the transport needs to be changed.
Optionaltransport: Transport<any, any, any>
Publicapi
The WalletClient has to be used in the wallet. It handles all the logic related to connecting to beacon-compatible dapps and handling/responding to requests.
Warning
For browser extensions: The WalletClient maintains a persistent connection that polls relay servers every 30 seconds. Call
destroy()when the client is no longer needed to stop polling and free resources. For extensions, consider conditional initialization - only connect when there are existing peers or when a new pairing request arrives. See the README for lifecycle management best practices.