Method Signature
align.blockchain.wallets.getAddress(wallet: Wallet): string
Parameters
The wallet object to extract the address from
Returns
Returns the wallet’s public address as a string (e.g., "0x...").
Examples
import Align from "@tolbel/align";
const align = new Align({
apiKey: process.env.ALIGN_API_KEY!,
environment: "sandbox",
});
const wallet = await align.blockchain.wallets.create();
const address = align.blockchain.wallets.getAddress(wallet);
console.log(`Address: ${address}`);
// Address: 0x742d35Cc6634C0532925a3b844Bc9e7595f0aB42
const wallet = await align.blockchain.wallets.create();
const address = align.blockchain.wallets.getAddress(wallet);
console.log("Address:", address);
This is a synchronous method - no network calls are made.