> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install the Rain embedded wallet SDK in your iOS or Android application and configure the required blockchain RPC endpoints.

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](/sdks/embedded-wallets/third-party-providers).

## iOS

<Steps>
  <Step title="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.

    ```swift Package.swift theme={null}
    dependencies: [
        .package(url: "https://github.com/SignifyHQ/rain-sdk-ios", from: "5.0.0")
    ],
    targets: [
        .target(name: "YourApp", dependencies: [
            .product(name: "rain-wallet-ios", package: "rain-sdk-ios")
        ])
    ]
    ```
  </Step>

  <Step title="Import the module">
    `RainWallet` re-exports the core module, so one import surfaces the whole SDK: `RainProvider`, `RainSdk`, `RainClient`, models, and errors.

    ```swift theme={null}
    import RainWallet
    ```
  </Step>

  <Step title="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](/docs/embedded-wallets/authentication#logging-in-with-a-passkey).
  </Step>
</Steps>

Requirements: iOS 17+, Swift 6.1+, Xcode 16.3+. The SDK ships as Swift Package Manager only; CocoaPods and Carthage aren't supported.

## Android

<Steps>
  <Step title="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.

    ```kotlin build.gradle.kts theme={null}
    dependencies {
        implementation("com.rain.sdk:rain-wallet-android:<version>")
    }
    ```

    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.
  </Step>

  <Step title="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.
  </Step>

  <Step title="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.
  </Step>

  <Step title="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>"))`.

    ```json assetlinks.json theme={null}
    [
      {
        "relation": ["delegate_permission/common.get_login_creds"],
        "target": { "namespace": "web", "site": "https://<your-domain>" }
      },
      {
        "relation": [
          "delegate_permission/common.handle_all_urls",
          "delegate_permission/common.get_login_creds"
        ],
        "target": {
          "namespace": "android_app",
          "package_name": "com.example.app",
          "sha256_cert_fingerprints": ["<SHA-256 of each signing certificate, colon-separated hex>"]
        }
      }
    ]
    ```

    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](/docs/embedded-wallets/authentication#logging-in-with-a-passkey).
  </Step>
</Steps>

## 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](/sdks/embedded-wallets/quickstart/ios).

| Network | iOS / Android chain constants | Example RPC endpoint |
| - | - | - |
| Base Sepolia | `RainChain.baseSepolia` / `RainChain.BASE_SEPOLIA` | `https://sepolia.base.org` |
| Base Mainnet | `RainChain.baseMainnet` / `RainChain.BASE_MAINNET` | `https://mainnet.base.org` |
| Arbitrum Sepolia | `RainChain.arbitrumSepolia` / `RainChain.ARBITRUM_SEPOLIA` | `https://sepolia-rollup.arbitrum.io/rpc` |
| Solana Devnet | `RainChain.solanaDevnet` / `RainChain.SOLANA_DEVNET` | `https://api.devnet.solana.com` |

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](https://docs.rain.xyz/docs/supported-chains-and-tokens) for additional networks and the [chain support matrix](https://docs.rain.xyz/sdks/embedded-wallets/features#blockchain-support) to determine which networks support outbound transactions through Rain embedded wallets.

## What's next

<Columns cols={2}>
  <Card title="iOS quickstart" icon="apple" href="/sdks/embedded-wallets/quickstart/ios">
    Log in, create the wallet, and send a transaction from Swift.
  </Card>

  <Card title="Android quickstart" icon="android" href="/sdks/embedded-wallets/quickstart/android">
    The same flow in Kotlin.
  </Card>
</Columns>
