Using Agent Cash
Last updated
Promise<BalanceResponse>const balance = await sdk.cash.getBalance({ account: 1 });Promise<TransactionResponse>await sdk.cash.deposit({
account: 1,
tokenAddress: '0x...',
amount: '1000000000000000000',
});Promise<TransactionResponse>await sdk.cash.withdraw({
account: 1,
tokenAddress: '0x...',
amount: '1000000000000000000',
});Promise<TransactionResponse>await sdk.cash.send({
fromAccount: 1,
toAccount: 2,
tokenAddress: '0x...',
amount: '1000000000000000000',
});const tokens = await sdk.cash.getSupportedTokens();type TokenWithPrice = Token & {
priceUSD: string;
};