Repository navigation
style(evm): tidy auth-capture imports - #34
Closed
PhilBot402 wants to merge 6 commits into
Closed
PhilBot402 wants to merge 6 commits into
PhilBot402 wants to merge 6 commits into
Conversation
…dation#3622) * feat: add shared + facilitator auth-capture work in go * feat: add server auth-capture work in go * feat: remove code duplication in client * feat: add auth-capture facilitator example * feat: add auth-capture server example * feat: add auth-capture client example * feat: cleanup pass * fix: auth-capture e2e tests * fix: integration tests * chore(e2e): restore unrelated uv.lock files Co-authored-by: Cursor <cursoragent@cursor.com> * test(go): restore Permit2 allowance after auth-capture integration tests Co-authored-by: Cursor <cursoragent@cursor.com> * fix(go): make auth-capture refundDeadline relative to issue time Co-authored-by: Cursor <cursoragent@cursor.com> * fix: pr review feedback * fix: pr feedback * fix: pr review feedback * feat: addressed PR feedback --------- Co-authored-by: Cursor <cursoragent@cursor.com>
* feat(evm): add auth-capture server and facilitator to TypeScript SDK Completes the auth-capture EVM scheme in @x402/evm: the client scheme landed in x402-foundation#2486, this adds the resource-server and facilitator halves behind the ./auth-capture/server and ./auth-capture/facilitator entry points. The server scheme resolves merchant prices against the per-family default-asset table, converts relative *DeadlineSeconds offsets into the absolute captureDeadline / refundDeadline the wire format commits to, and fails fast on merchant-set extra fields so misconfiguration surfaces in the merchant's own logs rather than as a 402 to a payer. It declares the authorization payment flow for both the eip3009 and permit2 collectors, since each settles as a single escrow call after the resource runs. The facilitator verifies envelope shape, deadline ordering, per-collector fields, and the payer-agnostic PaymentInfo hash the signature is bound to, then simulates authorize/charge so typed escrow reverts surface as stable invalidReason strings. Signature checks route through verifyTypedDataSignature so pre-verify matches on-chain SignatureChecker semantics instead of viem's ECDSA fallback. Simulating an operator-gated escrow call needs an explicit caller, so FacilitatorEvmSigner.readContract gains an optional account. Co-authored-by: phdargen <p.dargent@cern.ch> * align sdk with v1.1 spec * add examples * add rpc retries * outcome based sim for custom * add builder code support * decouple facilitator from scheme * rebase * test operator contracts * custom hardening * fix fmt * pr comments 1-3 * pr comments 4-6 * every charge requires a receiverAuthorizer * align with settlement pending + retry * add go client + e2e tests * support commerce v1.1 * review hardening * improve test coverage * fix fmt * mark deadlines as dynamicExtraFields * add delegated auth * go: add delegated auth * align ts/go + expand e2e * update custom operator contracts and fix integration tests * fix go signer * go: rotate operator * ts: rotate operator --------- Co-authored-by: A1igator <20358261+A1igator@users.noreply.github.com>
* Update docs/sdk-features.md Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/schemes/overview.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/schemes/overview.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/schemes/overview.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/schemes/overview.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
…402-foundation#3666) * feat(builder-code): add facilitator-authored settlement metadata (m) * pr feedback
…402-foundation#3711) * Update docs/extensions/builder-code.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/extensions/builder-code.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/extensions/builder-code.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/extensions/builder-code.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/extensions/builder-code.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/extensions/builder-code.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Replace the inline type import in auth-capture extra and merge duplicate module imports. No runtime behavior change. Co-authored-by: phdargen <29732335+phdargen@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Cleanup-only pass on the TypeScript auth-capture code added in recent upstream merges. The escrow argument helpers in
extra.tsused an inlineimport()type query forpaymentInfoToContractTuple. That import is now a normal module import, and a local type alias names the tuple. Adjacent imports of the same module in the auth-capture facilitator and server are combined.No runtime behavior changes. No changelog fragment: nothing user-facing changed.
Tests
From
typescript/packages/mechanisms/evm:prettieron the edited fileseslint . --ext .tstsupdeclaration build (package typecheck)vitest run --coverage— 54 files, 1577 tests passedChecklist
AI disclosure: automated by @phdargen. Use your own judgement