Caishen
  • Caishen SDK
  • Registration
  • Typescript SDK
  • Installation
  • Creating Wallets
  • Using Agent Cash
  • Python SDK
    • Installation
  • Creating Wallets
  • Using Agent Cash
  • Essentials
    • Security
  • Infrastructure
  • Brand Kit
  • Support
    • FAQ
Powered by GitBook
On this page
  • ๐Ÿฆ Cash Accounts
  • ๐Ÿ›  Types

Using Agent Cash

Caishen SDK provides the only wallets which support gasless stablecoin swaps, powered by Agent Cash.

Cash is a chain-abstracted, gasless stablecoin system designed to make stablecoin transfers seamless, fast, and free.

๐Ÿ” What is Cash?

Cash is an internal ERC-20-compatible asset that abstracts away the complexity of stablecoins across chains. It enables instant, gasless transfers between wallets without needing users to worry about:

  • Native gas tokens (e.g., ETH, MATIC)

  • Stablecoin formats (e.g., USDC vs USDT)

  • Blockchain networks (e.g., Arbitrum, Base, Solana)

๐Ÿงช How It Works

  • Deposit: Users deposit supported stablecoins (e.g., USDC, USDT) from chains like Arbitrum, Base, or Solana.

  • Issue: The system issues equivalent Cash tokens 1:1, held in an abstracted balance.

  • Send: These Cash tokens can be sent to any wallet address instantly with zero gas cost.

  • Withdraw: When users withdraw, their Cash tokens are burned and they receive the original stablecoin on the selected chain.

โš ๏ธ Different combinations of agentId and userId result in separate Cash balances.

โœ… Benefits

  • ๐Ÿ’ธ Gasless transfers (no ETH/SOL required)

  • โšก Cross-chain abstraction

  • ๐Ÿ”„ Simple send/receive interface

  • ๐Ÿ” Fully backed, 1:1 redeemable

๐Ÿฆ Cash Accounts

๐Ÿ’ฐ Get Account Balance

Get current balance of all tokens for a specific account.

Parameters

Name
Type
Description

account

number

The account identifier

Returns

'BalanceResponse'

๐Ÿ“˜ Example

balance = await sdk.cash.get_balance({"account": 1})

๐Ÿ’ต Deposit

Deposit a supported token into the account.

Parameters

Name
Type
Description

params

DepositCashParams

Token and amount info

Returns

TransactionResponse

๐Ÿ“˜ Example

await sdk.cash.deposit({
    "account": 1,
    "tokenAddress": "0x...",
    "amount": "1000000000000000000"
})

๐Ÿ’ธ Withdraw

Withdraw a supported token from the account.

Parameters

Name
Type
Description

params

WithdrawCashParams

Token and amount info

Returns

TransactionResponse

๐Ÿ“˜ Example

await sdk.cash.withdraw({
    "account": 1,
    "tokenAddress": "0x...",
    "amount": "1000000000000000000"
})

๐Ÿ” Send

Send supported tokens between accounts.

Parameters

Name
Type
Description

params

SendTransactionParams

Token, to/from, etc.

Returns

TransactionResponse

๐Ÿ“˜ Example

await sdk.cash.send({
    "fromAccount": 1,
    "toAccount": 2,
    "tokenAddress": "0x...",
    "amount": "1000000000000000000"
})

๐Ÿช™ Get Supported Tokens

tokens = await sdk.cash.get_supported_tokens()

๐Ÿ›  Types

TokenWithPrice

type TokenWithPrice = Token & {
  priceUSD: str;
}
PreviousCreating WalletsNextSecurity

Last updated 1 month ago