Skip to main content

Usage

Parameters

  • encrypt_key (str): PIN used to decrypt the private key
  • wallet (WalletData): Wallet object with public_key and encrypted_private_key
  • token (ChainToken): Token type to transfer (e.g., ChainToken.USDC, ChainToken.ETH)
  • recipient (str): Destination wallet address (must start with 0x)
  • amount (str): Transfer amount (in token units, not wei)
  • other_token (dict, optional): Custom token info for ChainToken.OTHER type
  • use_passkey (bool, optional): Whether to use passkey authentication. Defaults to False

Return Value

Returns a transaction hash string.

Example Implementation

Async Version

For async applications, use atransfer:

Supported Tokens

The SDK supports multiple token types:

Transferring Different Tokens

Complete Example with Error Handling

Batch Transfers

Transfer to multiple recipients:

Security Considerations

Transaction Security
  • Always validate recipient addresses before transferring
  • Implement transfer limits for security
  • Log all transactions for audit purposes
  • Use rate limiting to prevent abuse
  • Never expose encryption keys in logs or error messages
Gas FeesAll transfers use Chipi’s gasless paymaster - users don’t need ETH for gas!