Objects
Wallet
An object containing the attributes about the user wallets.
Props
Field | Description |
---|---|
additionalAddresses: WalletAdditionalAddress[] | Additional addresses associated to the wallet (e.g. ordinals and payment addresses for bitcoin wallets) |
address: string | Public address of the connected wallet |
chain: string | Current BlockChain name (e.g: ‘ETH’, ‘SOL’, ‘BTC’, etc) |
connector: WalletConnector | The wallet connector object |
id: string | The wallet’s unique id (matches thw wallet verified credential on connect-anf-sign) |
isAuthenticated: boolean | True if the user is authenticated, otherwise it’s false |
key: string | The wallet key (e.g. metamask, phantom, etc) |
Methods
Method | Description |
---|---|
getBalance(): Promise<string | undefined> | Retrieves the balance of the wallet. |
getNameService(): Promise<NameServiceData | undefined> | Retrieves the name service data associated with the wallet. |
isConnected(): Promise<boolean> | If the wallet is connected. |
proveOwnership(messageToSign: string): Promise<string\ | undefined> | Proves ownership of the wallet by signing a message. |
signMessage(messageToSign: string): Promise<string\ | undefined> | Signs a message using the wallet. |
switchNetwork(networkChainId: number | string): Promise<void> | Switches the network that the wallet is connected to. |
sync(): Promise<void> | Prompts the user to reconnect the wallet if not connected and only resolves when the wallet is connected and active. |
Was this page helpful?