> For the complete documentation index, see [llms.txt](https://hinkal-team.gitbook.io/hinkal/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hinkal-team.gitbook.io/hinkal/hinkal-mobile-sdk/ios/guides/multi-chain.md).

# Multi-Chain

The SDK works across TRON, Solana, and EVM [chains](/hinkal/ecosystem/supported-chains.md). Chain helpers let you discover supported chains and branch on chain type, and bridge operations move shielded value between chains.

### Discovering chains

```swift
let supported = try call { MobileSupportedChainsJSON(&$0) }   // JSON of supported chains
let isEvm = MobileIsEvmChain(chainId)                         // Bool helpers do not throw
```

Related helpers: `MobileAllSupportedChainsJSON()`, `MobileWalletSupportedChainsJSON()`, `MobileBridgeSupportedChainsJSON()`, `MobileIsTronChain(_:)`, `MobileIsSolanaChain(_:)`, `MobileNetworkJSON(_:)`.

### Connecting per chain type

* EVM: `client.connect(host)` with a `MobileHostWalletProtocol`
* Solana: `client.connectSolana(host, chainID: chainId)` with a `MobileHostSolanaSignerProtocol`
* Tron: `client.connectTron(host, chainID: chainId)` with a `MobileHostTronSignerProtocol`

### Bridging

Move shielded value from one chain to another:

```swift
let txHash = try call {
    hinkal.bridgePrivateToPrivate(
        sourceChainId,
        sourceTokenAddr: sourceToken,
        destChainID: destChainId,
        destTokenAddr: destToken,
        amount: amountWei,
        recipientJSON: recipientJSON,
        slippage: 0.5,
        feeToken: sourceToken,
        error: &$0
    )
}
```

For public routes across chains, see `depositAndBridge(...)` and `nearDepositAndBridge(...)` in the API Reference.

### Best Practices

#### 1. Branch on chain type before connecting

Pick the connect method by chain type so you pass the right host signer.

```swift
if MobileIsSolanaChain(chainId) { /* connectSolana */ }
else if MobileIsTronChain(chainId) { /* connectTron */ }
else { /* connect (EVM) */ }
```

#### 2. Confirm a chain is supported

```swift
guard MobileIsHinkalSupportedChain(chainId) else { return }
```

#### 3. Set slippage for bridges

`bridgePrivate(toPrivate:)` takes a `slippage` (e.g. `0.5`). Use a value your users accept; too tight may fail on volatile routes.
