pull in latest upstream#2
Open
TtheBC01 wants to merge 728 commits into
Open
Conversation
…ty with TypeScript SDK (#1808)
* feat(evm): add Stable testnet (chain ID 2201) network support * style(go): fix gofmt alignment for chain ID variable declarations * fix(python): remove supported_assets from Stable network configs * style(ts): reorder Stable configs above Polygon/Arbitrum in defaultAssets
* feat: refactor coinbase/x402 references to x402-foundation/x402 * fix: format * chore: changeset fragments for typescript, python and go
* chore: version typescript packages * chore: version python package * chore: version go package
…d settle (#1922) Made-with: Cursor
* add self-facilitation example * fix: regenerate examples/typescript lockfile against public npm registry Lockfile had tarball URLs pointing to internal Coinbase Artifactory, causing pnpm install to fail with ENOTFOUND in CI where that host is unreachable.
* Migrate to @signinwithethereum/siwe Migrate the SIWE dependency to the Ethereum Identity Foundation package. package.json now depends on @signinwithethereum/siwe; evm.ts import was updated to import SiweMessage from the new package. Added a changeset describing the migration. (pnpm lock updated to reflect the dependency change.) * Add siwe v4.1.0 entries to pnpm-lock Update examples/typescript/pnpm-lock.yaml to add @signinwithethereum/siwe@4.1.0 and @signinwithethereum/siwe-parser@4.1.0. Adds package resolutions and snapshot entries, registers peerDependencies (ethers and viem marked optional), and removes the older siwe@2.3.2 entry in the importer. This pins the example project to the siwe v4 parser/runtime and records its dependency graph in the lockfile.
* feat(specs): add Keeta exact scheme * feat(schemes/keeta): add transaction simulation to verification step This adds a few cheap checks to simulate the transaction and catch invalid blocks early on to prevent the server from doing expensive work unnecessarily.
* Update docs/sdk-features.md Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/getting-started/quickstart-for-sellers.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/getting-started/quickstart-for-sellers.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/getting-started/quickstart-for-sellers.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/getting-started/quickstart-for-sellers.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * add fastify --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com> Co-authored-by: Philippe d'Argent <p.dargent@cern.ch>
* feat(bazaar): add MCP resource type support to Go SDK Add MCP tool discovery extensions to the bazaar package, achieving parity with the TypeScript and Python SDKs. Servers can now declare MCP tool discovery extensions alongside HTTP resources, and facilitators can detect and extract them from payment payloads. Co-Authored-By: Claude <noreply@anthropic.com> * fix: gofmt formatting and gocritic if-else-chain lint Co-Authored-By: Claude <noreply@anthropic.com> * fix(bazaar): transport enum, doc examples, inline helper, add negative tests - Fix transport schema enum to include both valid values (streamable-http, sse) instead of only the provided value, matching TypeScript SDK behavior - Fix doc.go examples to use bazaar.BAZAAR.Key() instead of bazaar.BAZAAR - Inline createMcpDiscoveryExtension into DeclareMcpDiscoveryExtension - Add negative validation tests for wrong type and empty toolName - Add edge case tests for whitespace-only toolName and invalid transport Co-Authored-By: Claude <noreply@anthropic.com> * feat(mcp): wire extensions into PaymentWrapper 402 response Add Extensions field to PaymentWrapperConfig and pass it through to the PaymentRequired struct in 402 responses. This brings the MCP payment wrapper to parity with the HTTP middleware's RouteConfig.Extensions support, enabling bazaar discovery extensions in MCP tool responses. - Add Extensions map to PaymentWrapperConfig (types.go) - Set extensions in paymentRequiredResult (server.go) - Add unit tests for extensions present/absent in 402 (server_test.go) - Declare bazaar MCP extension in E2E server (main.go) - Add bazaar extension integration test (mcp_evm_test.go) Co-Authored-By: Claude <noreply@anthropic.com> * feat(mcp): wire TS extensions into 402 responses + Go integration tests Add extensions support to the TS MCP PaymentWrapperConfig and pass it through to createPaymentRequiredResponse so bazaar discovery metadata appears in 402 responses. Wire the E2E server with declareDiscoveryExtension for the get_weather tool. Add Go mocked-transport integration tests (5 cases) covering the full client↔server payment flow to match TS mcp-payment-flow.test.ts coverage. Co-Authored-By: Claude <noreply@anthropic.com> * fix: prettier formatting in MCP test files Co-Authored-By: Claude <noreply@anthropic.com> * fix(bazaar): address PR review feedback from @CarsonRoscoe - Use strings.TrimSpace for toolName validation to reject whitespace-only names - Allow custom transport values through schema validation (only enum for known transports) - Fix whitespace toolName test to assert error instead of success - Remove conditional guard in TS bazaar extension test so assertions always run Co-Authored-By: Claude <noreply@anthropic.com> * fix(bazaar): allow custom transport values in TS to match Go behavior Widen transport type from "streamable-http" | "sse" to string, and only apply enum constraint in schema for known transport values. This matches the Go-side fix so custom transports pass validation in both languages. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
…d networks support for Typescript (#1560) * Migrate all code from branch-algorand-v2-typescript-algokit * Update format and lint pass on core and examples * Reformat template files * Update: Coinbase review changes applied * Fix Paywall builder pattern * Update: Reverted e2e/legacy, Remove: src/exact/v1 and src/v1 * Add Faucets URLs to AVM README * Optimizing and shrinking PR * Remove dead import * Add optimization changes related unit tests * Update coinbase review changes applied * Update avm e2e, rebased to latest, linted and formatted * Fix avm template format * Remove python and Go AVM templates, Made AVM optional to facilitator and Add SERVER_ADDRESS * Lint and format * Update: made AVM optional in proxy.ts * Rebased and Replayed some commits * Reset e2e pnpm-lock.yaml * Replayed correct updated lockfiles * Reverted accidentally overwritten files during rebase replay * Revert accidental overwritten files in examples
* add buildercode s array * add changelog * fix
* 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>
* feat(tvm): add TON mechanism for exact payment scheme Add @x402/tvm (TypeScript) and x402[tvm] (Python) mechanism packages implementing the exact payment scheme for TON blockchain. Python (mechanisms/tvm/): - Full gasless USDT payment flow via TONAPI relay - Ed25519 signature verification for W5R1 wallets - BoC parser for external messages, jetton transfers - 6-rule payment verification (protocol, signature, intent, replay, relay safety, simulation) - Idempotent settlement with state machine - 72 unit tests TypeScript (@x402/tvm): - SchemeNetworkClient/Server/Facilitator implementations - W5R1 wallet signing with @ton/ton SDK - Gasless estimate + settlement via TONAPI - CAIP-2 network IDs: tvm:-239 (mainnet), tvm:-3 (testnet) - 48 unit tests Refs: spec PR #1455, live facilitator at ton-facilitator.okhlopkov.com * fix(tvm): address code review — Ed25519 verification, stateInit, httpx dep - TS facilitator: add full Ed25519 signature verification using tweetnacl - TS client: compute commission from gasless estimate, propagate stateInit - Python: add httpx to tvm extras, lazy-import TonapiProvider - Update facilitator tests with real cryptographic fixtures * feat(tvm): update to self-relay architecture — remove gasless, add /prepare flow * fix(tvm): align TS/Python API contracts, delegate verify to facilitator Codex review fixes: - TS client /prepare now sends {walletAddress, walletPublicKey, paymentRequirements} matching Python and the actual facilitator API - TS facilitator delegates verify/settle to facilitator HTTP service instead of local BoC parsing (fixes security gap: was checking JSON fields but not BoC content) - TS /settle sends x402 envelope format matching facilitator API - validUntil comes from facilitator /prepare response, not invented locally - Remove unused error constants and Cell import - Update README: self-relay architecture, remove gasless/toFacilitatorTvmSigner docs - Update client tests to mock fetch instead of removed signer methods - Update changelog: "self-relay gas sponsorship" instead of "gasless" * chore(tvm): add all_networks examples, revert unrelated core changes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(tvm): support both camelCase and snake_case facilitator responses The TVM facilitator scheme now accepts both response formats from the facilitator API, ensuring compatibility with facilitators that use either convention. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * feat(tvm): client uses RPC instead of /prepare — remove nonce Breaking changes: - Client resolves seqno + jetton wallet via TON RPC (default: toncenter.com) - ExactTvmScheme constructor now accepts optional { rpcUrl, apiKey } - Removed nonce from TvmPaymentPayload (dedup uses BoC hash) - Facilitator dedup tracks BoC hashes instead of nonces Aligns with spec review: no /prepare endpoint, client uses standard RPC calls like SVM/Stellar/Aptos. * fix(tvm): respect maxTimeoutSeconds from requirements - Client uses paymentRequirements.maxTimeoutSeconds for validUntil instead of hardcoded 300s - Facilitator forwards maxTimeoutSeconds to external /verify and /settle * chore(tvm): remove unused @ton-api deps, move tweetnacl to devDeps @ton-api/client and @ton-api/ton-adapter were leftover from the gasless relay approach. tweetnacl is only used in tests. * refactor: internal message BoC format, minimal payload Address TON Core team review feedback: - settlementBoc encodes internal message (not external) - Payload reduced to {settlementBoc, asset} only - Remove redundant fields (from, to, amount, walletPublicKey) - Set bounce=true on internal messages - Remove facilitatorUrl from PaymentRequirements extra * fix(tvm): align TS SDK with Python TVM flows * chore(tvm): update examples lockfile * fix(tvm): implement native TS facilitator * fix(tvm): address final review feedback --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* add contributing skill * add ai policy
* feat(typescript): add keeta mechanism implementation * feat(keeta): queue settlement requests per feePayer account * chore(keeta): upgrade keetanet-client 0.16.1, anchor 0.0.50 * feat(keeta): add transaction simulation implementation * refactor(keeta): remove legacy register helper and use builder directly * feat(keeta): add typescript examples * feat(keeta): add to example facilitator * feat(keeta): add github publishing workflow * feat(keeta): add to docs * feat(keeta): add docs to README * feat(keeta): add unit and integration tests * feat(keeta): add e2e tests * feat(keeta): determine KTA/USDC via SDK, logger for facilitator And also contains a few other minor fixes. * chore(keeta): upgrade to keetanet-client 0.18.1, anchor 0.0.77 * fix(keeta): working e2e tests and add for hono, next, fastify * feat(keeta): update CI publish workflow and add to all * feat(keeta): harden facilitator CAIP parsing and moving its own funds * refactor(keeta): use @x402/core/utils for money parsing * feat(site): derive multiple Keeta signers from facilitator passphrase This enables the demo facilitator to run with multiple signers for Keeta by specifying a single passphrase and an amount of signers to use. * fix(keeta): pass duplicate_block error and avoid race in queue This now passes the `duplicate_block` error to clients instead of swallowing it silently and only passing a generic transaction_failed errorReason. Also, we fix a potential race condition where a running queue worker could pick up a job before the corresponding promise was added leading to the job failing and the promise becoming stuck. * fix(keeta): cleanup UserClients via destroy or await using * refactor(keeta): rename passphrase to mnemonic We decided that mnemonic would be clearer to most users/devs than passphrase which outweighs aligning the terminology with the SDK (which uses Account.seedFromPassphrase) and so replaced Keeta-related passphrase with mnemonic.
* Update docs/sdk-features.md Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/sdk-features.md Generated-By: mintlify-agent Mintlify-Source: dashboard-editor --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
* tvm/keeta followups * fix fmt
…ation (#2653) * fix siwx echo * fix offer-receipt * same for go * fix fmt
Co-authored-by: go165 <196723798+go165@users.noreply.github.com>
* Update docs/extensions/overview.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/extensions/overview.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
* feat(go): add sign-in-with-x extension helpers * docs(go): add sign-in-with-x implementation plan * feat(go): add sign-in-with-x server extension * feat(go): add sign-in-with-x evm client signing * feat(go): retry sign-in-with-x auth before payment * docs(go): add sign-in-with-x examples * fix(go): satisfy sign-in-with-x lint checks * docs(go): update sign-in-with-x changelog * feat(go): add SIWX smart wallet verification * chore(go): tidy sign-in-with-x server example * docs(go): remove SIWX implementation plan * fix(go): align SIWX examples with TS interop * fix(go): address SIWX interop review feedback
* Update docs/extensions/sign-in-with-x.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/extensions/sign-in-with-x.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/extensions/sign-in-with-x.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/sdk-features.md Generated-By: mintlify-agent Mintlify-Source: dashboard-editor --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
* remove ClientExtensionPaymentPayloadEchoPolicy * add svm support * add changelog * fix fmt * clean up
* Update docs/extensions/sign-in-with-x.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor * Update docs/extensions/sign-in-with-x.mdx Generated-By: mintlify-agent Mintlify-Source: dashboard-editor --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
* bump to minor * add tvm/keeta to release script * release
* fix script * release
* chore(stellar): upgrade stellar sdk to v16 * chore(stellar): add release changeset * chore(stellar): use sdk 16.0.1
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
Tests
Checklist