client.deposit manages the chain addresses you deposit into. Every method is authenticated and
account-scoped, so each input accepts an optional account field ("main", "active", or { subaccountId }). See Account scoping for
how the default resolves.
Deposit addresses are per-account and per-chain: each root account or subaccount gets its own address on a given chain. Creating an address is idempotent, so it returns the existing address if one is already assigned.
Methods
| Method | Summary |
|---|---|
createAddress | Create or return the deposit address for a chain. |
listAddresses | List deposit addresses, optionally filtered by chain. |
createAddress(input, options?)
The root account must have accepted the current terms. Use client.auth.acceptTerms() from an
interactive JWT session after the user agrees. Missing acceptance produces the typed auth detail AUTH_TERMS_NOT_ACCEPTED.
Creates the deposit address for the account scope on a given chain, or returns the existing one.
Resolves to a DepositAddress, or null if the backend does not return an address.
const address = await client.deposit.createAddress({ chainId: 1 });
if (address) {
console.log(address.chainId, address.depositAddress);
}CreateDepositAddressInput
| Field | Type | Required | Notes |
|---|---|---|---|
chainId | number | yes | Integer from 1 through 4,294,967,295. |
account | AccountScope | no | Scope override. |
listAddresses(input?, options?)
Returns a DepositAddress[] for the account scope. Input is optional; pass chainId to filter to
a single chain, or account to override the default.
// All chains
const all = await client.deposit.listAddresses();
// One chain
const [eth] = await client.deposit.listAddresses({ chainId: 1 });DepositAddress
interface DepositAddress {
chainId: number;
depositAddress: string;
}Results are ordered by ascending chain id.
Related
- Deposits and withdrawals guide for the end-to-end funding walkthrough.
- Lifecycle for tracking a deposit as it confirms on chain and lands in your ledger.
- Balances to see the credited funds.
- Withdrawals for moving funds back out.