Get Addresses
This method allows you to retrieve the addresses associated with your MPC wallet.
Method Signature
async getAddresses(walletToken: string): Promise<Address[] | null>
Parameters
walletToken
:string
- The wallet token of the wallet to retrieve addresses for
Returns
Promise<Address[] | null>
- An array of Address
objects with the following properties:
network
:string
- The network of the addressaddress
:string
- The wallet address
Example Usage
const addresses = await sdk.wallet.getAddresses('your-wallet-token');
console.log(addresses);
Response Example
[
{
"network": "evm",
"address": "0x1Fa5438abfe8607228052d6208A59E7B4c3CAb2d"
},
{
"network": "solana",
"address": "EwQzEoeSnVbugnm57iD2aoCjZL3Vage7yDpjfoRwLQbv"
},
{
"network": "bitcoin",
"address": "bc1qcp3j8l75dshlc7vqjpd4ztdk923hrdqcgkhqe2"
}
]
Additional Information
- Returns
null
if no addresses are found or if there's an error retrieving the addresses. - The same address may be used across multiple networks.