getAddresses
Function Signature
Description
Returns the addresses for the client’s wallet. Addresses come from the client’s wallet metadata (provided by the Portal API), not from the signing shares on the device — so this returns addresses whenever the client has a wallet, regardless of whether its signing shares are on the current device.Parameters
This method takes no parameters.Returns
PortalGetAddressesResult - An object containing:
| Property | Type | Description |
|---|---|---|
hasWallet | bool | Whether the client has a wallet (i.e. addresses are available). This reflects wallet existence, not whether the signing shares are on this device — use isWalletOnDevice for that. |
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. LikegetAddresses, it comes from the client’s Portal-provided wallet metadata, not from the on-device signing shares, so a non-null address only indicates the client has a wallet — it does not mean the signing shares are on this device. Use isWalletOnDevice to determine on-device signing availability.
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 the client has no wallet.
Example
Errors
| Code | Description |
|---|---|
NOT_INITIALIZED | Portal was not initialized |
Related
- Create a wallet guide
- createWallet
- doesWalletExist
- isWalletOnDevice — check whether the signing shares are on the current device