# EIP-7702 provider

[`@yodlpay/react-native-eip-7702-provider`](https://www.npmjs.com/package/@yodlpay/react-native-eip-7702-provider) adds atomic batching and gas sponsorship to wallets that can't do it themselves.

## Do you need this?

Probably not. **Native wallet support always wins** — if the wallet handles the EIP-5792 `wallet_sendCalls` flow, `@yodlpay/react-native` forwards those calls straight through and this package does nothing for you.

Add it only when all three are true:

1. The wallet exposes an EIP-1193 provider, **and**
2. it can sign EIP-7702 authorizations (`wallet_signAuthorization` or compatible secp256k1 signing), **but**
3. it does **not** natively support the EIP-5792 `wallet_sendCalls` flow your integration needs.

:::warning
Adding it is a real decision, not a free upgrade. It pulls in a smart-account stack, needs a native rebuild, and routes submission through a bundler. If you don't need batching, skipping it is strictly less work.
:::

Wiring it up is not the hard part. Against Yodl's hosted UI the whole configuration is one callback — `signAuthorization`, because [no wallet signs EIP-7702 authorizations the same way](/sdk/eip-7702-provider/setup#authorization-signing). The bundler, the chain list, the gas pricing and the chain reads all have defaults. Pass `chains` explicitly and none of your traffic touches Yodl; see [using Yodl's bundler](/sdk/eip-7702-provider/setup#using-yodls-bundler) for exactly what the default delegates.

Without it, a wallet lacking native EIP-5792 simply can't batch. The base SDK forwards the request and returns the wallet's own response; it performs no sequential fallback of its own.

## How the three standards relate

Easy to conflate, so worth stating plainly:

| Standard | What it is |
| --- | --- |
| [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) | The JS provider interface. Both the SDK and this add-on talk to the wallet via `provider.request({ method, params })` |
| [EIP-5792](https://eips.ethereum.org/EIPS/eip-5792) | The wallet call API the Yodl UI uses — `wallet_getCapabilities`, `wallet_sendCalls`, `wallet_getCallsStatus`, `wallet_showCallsStatus` |
| [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) | Not a provider API. It lets an EOA delegate execution to smart-account code — the path this add-on uses to implement EIP-5792-style atomic batching when the wallet can't |

So: the UI speaks 5792, the wallet speaks 1193, and 7702 is the mechanism this package uses to bridge the gap.

## Requirements

The same platform requirements as the [React Native SDK](/sdk/react-native#requirements) — React Native `>= 0.72` and Hermes.

One addition: this package bundles the native `react-native-get-random-values` module, so it needs a development build for that reason too.

## Install

```bash
npm install @yodlpay/react-native-eip-7702-provider
npx pod-install    # iOS
```

Rebuild the native app afterwards. The package owns its `viem`, `permissionless` and `react-native-get-random-values` dependencies, which keeps the base `@yodlpay/react-native` package wallet-provider agnostic.

Next: **[setup](/sdk/eip-7702-provider/setup)** to wire it up, or the **[reference](/sdk/eip-7702-provider/reference)** for options and per-method behaviour.
