---
eip: 7836
label: ERC-7836
title: Wallet Call Preparation API
status: Draft
type: Standards Track
category: ERC
created: 2024-12-06
requires: 1193, 5792
official: https://eips.ethereum.org/EIPS/eip-7836
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7836.md
canonical: https://eips.huatuo.xyz/eip-7836/
lang: en
tldr: Adds wallet_prepareCalls and wallet_sendPreparedCalls so an app holding a session key can ask the wallet what to sign for any smart account, sign it itself, and hand it back for execution.
tags: [wallet, json-rpc, session-keys, smart-accounts, draft]
---

# ERC-7836: Wallet Call Preparation API

> Adds JSON-RPC methods for requesting unsigned EIP-5792 calls based on the wallet's implementation, and then sending those calls once signed.

**TL;DR:** Adds wallet_prepareCalls and wallet_sendPreparedCalls so an app holding a session key can ask the wallet what to sign for any smart account, sign it itself, and hand it back for execution.

## What problem does it solve?

Apps increasingly act on a user's behalf with **session keys** or scoped permissions, for example an app that automates DEX trades without a wallet popup for every transaction. The catch: every smart contract account has its own execution interface and signing format. To sign a bundle of calls for an arbitrary account, the app would need to know how each account implementation builds and hashes its payload.

[EIP-5792](/eip-5792/) `wallet_sendCalls` already lets a wallet bundle and sign calls, but the *wallet* does the signing. ERC-7836 adds a two-step flow where the wallet does the account-specific preparation and the *app's key* does the signing.

## How it works

Two new JSON-RPC methods, both reached through an [EIP-1193](/eip-1193/) provider:

**1. `wallet_prepareCalls`** takes the same shape as `wallet_sendCalls` (`calls`, `capabilities`, `chainId`, optional `from`, `version`) plus an optional `key` hint: the public key and its type (`secp256k1`, `p256`, `webauthn-p256`) and whether it prehashes. The wallet builds the account-specific payload and returns:

- `digest`: the exact bytes the key must sign
- `context`: opaque, wallet-specific data (e.g. an [ERC-4337](/eip-4337/) UserOperation)
- `capabilities`, `chainId`, `key`, `version` to forward unchanged

**2. `wallet_sendPreparedCalls`** takes that response (minus `digest`) plus the `signature`. The wallet submits the bundle and returns `{ id, capabilities }`, the same as `wallet_sendCalls`, so existing status-polling code keeps working.

The wallet stays responsible for checking that the key is actually authorised on the account and that the requested capabilities fall within the key's permissions.

## Sample code

Preparing, signing with a session key, and sending (TypeScript):

```ts
const provider = (window as any).ethereum;

const { digest, ...prepared } = await provider.request({
  method: "wallet_prepareCalls",
  params: [{
    version: "1",
    chainId: "0x1",
    from: account,
    calls: [{ to: target, data: calldata }],
    key: { type: "p256", publicKey: sessionPublicKey, prehash: false },
  }],
});

// Sign the wallet-provided digest with the app's session key
const signature: `0x${string}` = await signWithSessionKey(digest);

const { id } = await provider.request({
  method: "wallet_sendPreparedCalls",
  params: [{ ...prepared, signature }],
});

// Track it like any EIP-5792 bundle
const status = await provider.request({ method: "wallet_getCallsStatus", params: [id] });
```

## Things to know

- **Status: Draft.** Method names and fields may still change.
- It does not modify or replace `wallet_sendCalls`; wallets that only support EIP-5792 are unaffected.
- `prehash` must be handled consistently. A mismatch (double hashing vs. prehashed input) silently produces invalid signatures.
- Wallets should be able to recompute the `digest` from what is sent back, and may enforce validity windows, to stop stale or replayed preparations.
- Keep session keys non-extractable and scoped; never show the opaque `digest` to users as something to approve.
- For plain off-chain message signing, see the related [ERC-7871](/eip-7871/) `wallet_sign`.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-7836
