confirmLoginCode or signUpWithPasskey completes, the user’s wallet is ready to use. From there, you can retrieve its addresses and register the appropriate address with Rain when the wallet will be used to support card spend.
What gets created
Each wallet is created from a single seed and includes accounts for supported blockchain networks.
Both blockchain accounts are derived from the same wallet seed. A single recovery phrase restores the wallet across supported networks. For EVM networks, the wallet uses the same address across each supported EVM chain.
The seed is generated and secured by Rain’s wallet infrastructure. See security model for details.
Get wallet addresses
UsegetWalletAddress after the user has an active session. Calling getWalletAddress() without a chain ID returns the wallet’s EVM address. To retrieve the Solana address, pass a Solana chain ID.
getWalletAddress requires an active session. If no session is available, resolving the client returns RAIN_201. Use hasActiveSession() before resolving the client when session state may be unknown.
Registering the wallet with Rain
To use an embedded wallet with Rain card issuing, send the wallet addresses to your backend and include them when you create the user or company application. This request should be made from your backend using your Rain API key. Do not call the application API directly from the client.solanaAddress when your program supports card funding on Solana.
For Rain managed programs, Rain creates a collateral contract after the application is approved and assigns the registered wallet as the contract owner. Rain then sends a contract.created webhook.
Once the collateral contract is created, the wallet can fund the contract and withdraw collateral from it. See Card funding and settlement.
Timing with KYC
Wallet creation does not depend on the user’s Rain application status. A user can create a wallet, receive funds, and send funds before applying for a card or while KYC is still pending. Card funding begins only after the application is approved and Rain creates the collateral contract. A typical sequence is:Create wallet → Create application with wallet address → Complete KYC → contract.created → Fund collateral contract → Issue card
One wallet per account
Each Rain account has one wallet. If a user creates a separate account with another email address or phone number, that account has its own wallet and is not linked to the first account. Corporate programs generally do not require multiple wallets. A single wallet can own the company’s collateral contract, and multiple cards can spend from that contract. See Corporate wallets.Existing wallets from other providers
If your users already have wallets from Portal, Privy, Turnkey, or other providers, you can use those wallets with Rain instead of creating new Rain wallets. Register the appropriate wallet provider adapter, then usegetWalletAddress to retrieve the existing wallet address. Register that address with Rain the same way you would register a Rain wallet.
See Third-party wallet providers.
What’s next
Receiving funds
Show the address and QR code so the wallet can be funded.
Card funding and settlement
From approved application to spending card.