WalletsAPI
Access viaclient.wallets.
register
Register a wallet (idempotent — re-registering returns the existing wallet).Copy
async register(request: RegisterWalletRequest): Promise<WalletResponse>
Copy
interface RegisterWalletRequest {
/** Wallet address on the blockchain */
walletAddress: string;
/** Blockchain network */
blockchain: 'solana' | 'polygon' | 'ethereum';
/** External user ID for B2B2C flows */
userId?: string;
/** Organization-specific metadata */
orgMetadata?: Record<string, unknown>;
}
list
List wallets for the organization.Copy
async list(query?: WalletListQuery): Promise<WalletListResponse>
Copy
interface WalletListQuery {
/** Filter by external user ID */
userId?: string;
/** Filter by blockchain */
blockchain?: 'solana' | 'polygon' | 'ethereum';
/** Page number (default: 1) */
page?: number;
/** Items per page (default: 50, max: 100) */
limit?: number;
}
interface WalletListResponse {
wallets: WalletResponse[];
total: number;
page: number;
limit: number;
}
get
Get a wallet by ID.Copy
async get(walletId: number): Promise<WalletResponse>
update
Update wallet metadata.Copy
async update(walletId: number, request: UpdateWalletRequest): Promise<WalletResponse>
Copy
interface UpdateWalletRequest {
/** External user ID */
userId?: string;
/** Organization-specific metadata */
orgMetadata?: Record<string, unknown>;
}
WalletResponse Type
Copy
interface WalletResponse {
/** Wallet identifier */
walletId: number;
/** Wallet address on the blockchain */
walletAddress: string;
/** Blockchain network */
blockchain: 'solana' | 'polygon' | 'ethereum';
/** External user ID */
userId?: string;
/** Organization-specific metadata */
orgMetadata?: Record<string, unknown>;
/** Creation timestamp (ISO 8601) */
createdAt: string;
}