Skip to main content
The Rain wallet module includes the core SDK and all dependencies needed to create and manage embedded wallets. If you’re using an existing wallet provider, install the corresponding provider adapter instead. See third-party wallet provider.

iOS

1

Add the package

In Xcode, choose File → Add Package Dependencies and enter the package URL, or add it to your Package.swift. Link the rain-wallet-ios product.
Package.swift
2

Import the module

RainWallet re-exports the core module, so one import surfaces the whole SDK: RainProvider, RainSdk, RainClient, models, and errors.
3

Enable passkeys (optional)

Passkeys are bound to a web domain you control. Skip this step if you only use one-time codes.
  1. Serve https://<your-domain>/.well-known/apple-app-site-association with your app listed under webcredentials.
  2. Add the Associated Domains capability to your app with the entry webcredentials:<your-domain>.
  3. Pass the domain when you create the provider: RainProvider(RainWalletConfig(passkeyDomain: "<your-domain>")).
The domain is permanent for your users: passkeys created against it don’t work against another domain. See Authentication options.
Requirements: iOS 17+, Swift 6.1+, Xcode 16.3+. The SDK ships as Swift Package Manager only; CocoaPods and Carthage aren’t supported.

Android

1

Add the dependency

Add the Rain wallet artifact to your module’s Gradle file. It depends on rain-core-android, which Gradle resolves for you.
build.gradle.kts
Rain confirms the exact Maven coordinates and the current version during onboarding. All Rain modules share one version number and release together; use the same version for every Rain module in one app.
2

Check your build configuration

The SDK needs minSdk 28 or higher and compileSdk 36 or higher. Kotlin 2.2 is recommended; Kotlin 2.1 compiles against the SDK through the compiler’s one-version-ahead metadata support.
3

Add the ProGuard rule for minified builds

Minified builds inherit one rule from the wallet backend’s adapter, -dontwarn org.bitcoinj.core.Base58, for a class the backend references on its export path and never loads. It arrives through the module’s consumer rules; you don’t add anything yourself.
4

Enable passkeys (optional)

Passkeys are bound to a web domain you control. Skip this step if you only use one-time codes.
  1. Serve https://<your-domain>/.well-known/assetlinks.json as application/json with two statements: one for the site itself granting delegate_permission/common.get_login_creds, and an android_app statement granting both delegate_permission/common.handle_all_urls and delegate_permission/common.get_login_creds that lists your package name and the SHA-256 fingerprint of every certificate that signs your app (debug, upload, and Play App Signing).
  2. Pass the domain when you create the provider: RainProvider(application, RainWalletConfig(passkeyDomain = "<your-domain>")).
assetlinks.json
The device refuses a file that carries the app statement alone, and the domain is permanent for your users, the same as on iOS. See Authentication options.

RPC endpoints

Configure a JSON RPC endpoint for each blockchain your application supports. The SDK uses these endpoints to retrieve balances, transaction history, and network fee estimates. Use a dedicated RPC provider for production applications. Public endpoints are suitable for initial development and testing. Configure your endpoints when initializing the SDK, as shown in the quickstart. Solana does not use EIP 155 chain IDs, so Rain assigns its own: 900 for mainnet and 901 for devnet. These are also used by the Rain API for Solana collateral contracts. See Supported chains and tokens for additional networks and the chain support matrix to determine which networks support outbound transactions through Rain embedded wallets.

What’s next

iOS quickstart

Log in, create the wallet, and send a transaction from Swift.

Android quickstart

The same flow in Kotlin.