-
Notifications
You must be signed in to change notification settings - Fork 967
Add scheme for ERC-7710 #732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🟡 Heimdall Review Status
|
|
@danfinlay is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
fddf348 to
7beefe3
Compare
|
Hi @danfinlay, thanks for putting this proposal together! Could you please update this to v2 (https://docs.cdp.coinbase.com/x402/migration-guide)? As an initial comment, I think this needs a better separation between the Please have a look at a recent similar PR (#769) suggesting |
7fb1b16 to
0482112
Compare
|
I just updated per x402v2 per your private message, but now I see you also suggest the proposal be in the form of an extension to the If this is the preferred format for alternate authorization formats, I would probably recommend updating the If you insist on this format, I'll oblige, but the current organization makes it very easy for potential contributors to choose this same approach. |
|
Opened an alternate PR that formats this proposal as an extension to the |
0482112 to
cb198ce
Compare
|
Thanks a lot for the prompt update @danfinlay! Agreed that the V2 just launched and with that we are beginning to explore additional schemes and mechanisms, any feedback is much appreciated 🙏 Looping in @fabrice-cheng (author of #769) for further guidance and review |
|
Nice to meet you, @fabrice-cheng! Happy new year! Let's make x402 even better! |
|
Hi @danfinlay, thanks for considering my comment in #807. However, I believe there was a misunderstanding. I did not recommend to implement #769 introduces #769 then also introduces 2 extensions, erc20ApprovalGasSponsoring and eip2612GasSponsoring but these are optional for the Permit2 mechanism to sponsor the approval transaction on the user's behalf. My recommendation for your proposal would be to closely follow #769 and modify scheme_exact_evm.md with ERC-7710 as new AssetTransferMethod, see https://github.com/coinbase/x402/blob/4698b6f88e09ccdb6695fa69660baf1f121e8964/specs/schemes/exact/scheme_exact_evm.md I am thus closing #807, please refrain from opening new PRs so we can consolidate the discussion around this proposal in a single place |
|
|
||
| ```http | ||
| HTTP/1.1 402 Payment Required | ||
| X-PAYMENT-REQUIRED: <base64-encoded-json> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
X-PAYMENT-REQUIRED -> PAYMENT-REQUIRED see https://github.com/coinbase/x402/blob/main/specs/transports-v2/http.md#header-summary
|
|
||
| Note over Client: 3. Client creates delegation<br/>via signer (EOA, smart wallet, etc.) | ||
|
|
||
| Client->>Server: 4. GET /resource + X-PAYMENT<br/>(7710 payload) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
X-PAYMENT -> PAYMENT-SIGNATURE

Description
Adds a new payment scheme utilizing ERC-7710 account permissions. Allows payment in any token from accounts that expose this simple and flexible interface. Also allows payments to be made by permitted agents, including AI agents.
Tests
Just a specification for now, but tests can be added in the implementation phase.
Checklist