getAddresses
Function Signature
Description
Get wallet addresses if a wallet exists on device. This method is useful for checking if a wallet exists and retrieving addresses without creating or recovering a wallet.Parameters
This method takes no parameters.Returns
PortalGetAddressesResult - An object containing:
| Property | Type | Description |
|---|---|---|
hasWallet | bool | Whether a wallet exists |
addresses | PortalAddresses | The wallet addresses |
PortalAddresses
| Property | Type | Description |
|---|---|---|
ethereum | String? | The EVM wallet address |
solana | String? | The Solana wallet address |
Example
getAddress
Function Signature
Description
Get the wallet address for a specific chain.Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chainId | String | Yes | The chain ID in CAIP-2 format |
Returns
String? - The wallet address for the specified chain, or null if no wallet exists.
Example
Errors
| Code | Description |
|---|---|
NOT_INITIALIZED | Portal was not initialized |