Skip to main content
Send funds anywhere and use the embedded wallet with DeFi and other dapps: it’s a standard non-custodial wallet, so it can do anything the underlying provider can. This goes beyond Rain’s built-in card and collateral flows.

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. The recipient 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 (from getWalletAddress()):
  • 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 Privy singleton; use Privy’s EIP-1193 provider directly.
  • Portal: on iOS, capture the Portal instance via PortalProvider’s onPortalCreated hook 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.
The SDK’s helper assembles a Rain-owned transaction bag for a zero-value call, and Android can price a call before sending it:
For payable calls (sending native value along with the call), set the 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.