Skip to content

Conversation

@avarobinson
Copy link

Description

Related Issues

Changes Made

Testing

  • I have tested these changes locally
  • I have run the validation scripts (pnpm run validate)
  • I have checked that the documentation builds correctly

@avarobinson avarobinson requested a review from a team as a code owner January 16, 2026 17:15
@github-actions
Copy link

github-actions bot commented Jan 16, 2026

🌿 Documentation Preview

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Jan 16, 2026, 5:17 PM

@github-actions github-actions bot temporarily deployed to docs-preview January 16, 2026 17:16 Destroyed
- Transaction APIs detect whether a user must first delegate via EIP-7702
- If delegation is required, Transaction APIs prepare the correct authorization payload
- Your application prompts the user to sign when required
- We combines the delegation and transaction into a single onchain submission
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Suggested change
- We combines the delegation and transaction into a single onchain submission
- We combine the delegation and transaction into a single onchain submission

EIP-7702 enables EOAs (Externally Owned Accounts) to delegate control to smart wallets that can execute code directly from their addresses. Users simply sign an authorization
payload to delegate, then their account can function as a smart wallet with access to all of the user's assets. Wallet APIs will prompt the user to sign this authorization
when the delegation is missing on the chain they're interacting with.
EIP-7702 enables EOAs (Externally Owned Accounts) to delegate control to smart wallets that can execute code directly from their addresses. When using Transaction APIs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we capitalize this here? it's capitalized below.

Suggested change
EIP-7702 enables EOAs (Externally Owned Accounts) to delegate control to smart wallets that can execute code directly from their addresses. When using Transaction APIs:
EIP-7702 enables EOAs (Externally Owned Accounts) to delegate control to Smart Wallets that can execute code directly from their addresses. When using Transaction APIs:


1. An authorization signature request
2. A user operation signature request
The authorization signature is **not** a `personal_sign` or `eth_sign` payload.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't 100% true.

The prepared authorization is technically in this shape:

{
  type: "authorization",
  data: {
    address: "0xDelegationAddress",
    nonce: "0xNonce",
  },
  chainId: "0xChainId",
  signatureRequest: {
    type: "eip7702Auth",
    rawPayload: "0xRawHashToSignWithEthSign"
  }
}

The rawPayload can be signed by eth_sign if desired. But it's recommended to sign the authorization using the address, nonce, and chainId to remove trust assumptions.

Signing an authorization signature request requires logic specific to the wallet being used. Examples:
Examples of signing utilities:
- [Viem](https://viem.sh/docs/eip7702/signAuthorization)
- [Cast](https://getfoundry.sh/cast/reference/wallet/sign-auth/)
Copy link
Contributor

@jakehobbs jakehobbs Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommending cast wallet sign-auth kinda opens a can of worms, because it technically returns an RLP-encoded authorization_list, which CONTAINS the authorization signature.

If you use that, you'd have to decode it like this (viem example):

import { fromRlp, serializeSignature } from "viem"

const getSig = (authorizationList: Hex) => {
  const decoded = fromRlp(authorizationList);
  const [chainId, address, nonce, yParity, r, s] = decoded;
  const sig = serializeSignature({
    r,
    s,
    yParity: yParity === "0x" ? 0 : Number(yParity),
  });
  return sig;
};

for Modular Account v2. If you wish to replace or remove this delegation, you'll need to relay the delegation yourself or use a third party service.
Viem has a guide for this [here](https://viem.sh/docs/eip7702/contract-writes).
Currently, Wallet APIs only support delegation to the following contract:
`0x69007702764179f14F51cdce752f4f775d74E139`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you think it's worth mentioning here what this contract is?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it would be good to mention here that it's MAv2 and removing the Wallet APIs currently only support relaying delegations for Modular Account v2. below since it's a bit repetitive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants