Arbitrary sends
Send native or ERC-20 tokens from the wallet to any recipient with the SDK’s send methods: the same API you use for transfers. See Balances & Transactions. Therecipient and token addresses below are examples; replace them with your own, and use a testnet chain id (RainChain.avalancheTestnet / RainChain.AVALANCHE_TESTNET) while you develop.
Arbitrary transactions & DeFi
For arbitrary contract calls (swaps, staking, bridging, minting), the Client SDK doesn’t wrap a generic “send any transaction.” Build the calldata with your DeFi library, then sign and submit directly through the wallet provider you drive, using the wallet’s address (fromgetWalletAddress()):
- Managed Turnkey: you hold the authenticated
TurnkeyContext; use Turnkey’s SDK to sign and submit any transaction the user approves. - Privy: you hold the authenticated
Privysingleton; use Privy’s EIP-1193 provider directly. - Portal: on iOS, capture the
Portalinstance viaPortalProvider’sonPortalCreatedhook and call Portal directly. The Android adapter constructs Portal internally and doesn’t expose the instance, so stick to the SDK’s send methods for Portal wallets on Android.
value field yourself on the transaction you submit to the provider.
Gas
Arbitrary transactions pay network gas in the chain’s native token. Make sure the wallet holds enough native token (for example ETH or AVAX) for the operations you submit: these transactions are the user’s own wallet actions and are independent of Rain card spend and collateral.What’s next
Balances & Transactions
Query balances and send tokens.
Withdraw Collateral
Execute collateral withdrawals from your app.
Supported Chains & Tokens
See which networks and tokens Rain supports.