9 Commits

Author SHA1 Message Date
phdargen
dd6d7e6fc2
Harden workflows (#2287)
* add --ignore-scripts

* update to pnpm 11 and node 22

* align dep

* fix axios headers

* pin workflow actions

* fix paywall

* remove cache from publishing

* add hedera publishing

* remove e2e workflow

* increase minminimumReleaseAge to 3days
2026-05-13 17:33:05 +02:00
Peter Swierzy
bd6d7d47b9
feat(hedera): add initial @x402/hedera package (#1360)
* feat(hedera): add @x402/hedera package with exact payment scheme

  - New @x402/hedera package implementing the x402 v2 exact scheme
  - Uses @hiero-ledger/sdk for signing and submission
  - Onchain preflight transfer check before settlement
  - Settlement receipt validation (USDC + HBAR coverage)
  - HEDERA_ACCOUNT_ID / HEDERA_PRIVATE_KEY / HEDERA_NETWORK env vars
  - Integrated with advanced clients (axios, fetch), facilitators, and HTTP adapters (hono, fastify, next)
  - E2E tests for Hono, Next.js, and Fastify servers
  - Testnet faucet docs and token association notes

Signed-off-by: Piotr Swierzy <piotr.swierzy@blockydevs.com>

* refactor: use convertToAtomicAmount function from @x402/core/utils

Signed-off-by: Piotr Swierzy <piotr.swierzy@blockydevs.com>

---------

Signed-off-by: Piotr Swierzy <piotr.swierzy@blockydevs.com>
2026-04-24 23:57:23 +09:00
MG
a25800efed
feat(avm): Add Algorand (AVM) blockchain exact spec implementation and 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
2026-04-11 08:01:20 +09:00
phdargen
1a6e08b291
EVM verify simulation and improved smart account handling (#1474)
* fix evm sim

* fix EIP-6492 deployment info check

* fix implementation-dependent verifyTypedData

* same for v1

* update multicall

* update errors

* refactor

* minor fixes

* add go equivalent

* add py equivalent

* fix #1388 for go/py

* fix #1139 for py/go

* fix go signer
2026-03-10 10:04:52 -07:00
Jon
57a5488bcb
Add Aptos payment mechanism (#966)
* Add Aptos mechanism implementation for x402

* Revert go changes

* Fix go revert

* Fix e2e imports

* Add aptos to all server e2e tests, make optional

* Make aptos optional on site

* Fix lint / format issues

* Add workflow for x402 aptos package

* Update e2e tests

* Fix facilitator manager
2026-02-19 15:29:43 -05:00
Faris Habib
55feb97c07
Add Changelog Management (#1036)
* add changelog tooling + config

* add docs and baseline changelogs

* update gitignore

* align towncrier to agentkit verbage

* address PR review
2026-01-29 12:52:02 -08:00
Faris Habib
dc49d82376
Add intro animation (#898)
* add intro animation

* preload video to boost performance

* minor fixes

* shorten video

* update animation for the homepage logo instead

* fix lottie import

* update lockfile

* minor cleanup

* avoid cooldown check for cssstyle transitive dependency

* cleanup and load animation on every page load
2026-01-13 13:26:12 +09:00
Carson Roscoe
1a79feaf94
Development v2 (#705)
* chore: move packages, examples and e2e clients/servers/facilitators to legacy subfolders

* feat: added @x402/core to /typescript/packages

* feat: added @x402/evm to /typescript/packages/mechanism

* feat: added @x402/svm to /typescript/packages/mechanism

* feat: added @x402/extensions to /typescript/packages

* feat: added @x402/fetch to /typescript/packages/http

* feat: added @x402/axios to /typescript/packages/http

* feat: added @x402/paywall to /typescript/packages/http

* feat: added @x402/express to /typescript/packages/http

* feat: added @x402/hono to /typescript/packages/http

* feat: added @x402/next to /typescript/packages/http

* chore: update /typescript pnpm packaging

* feat: added core files to /go

* feat: added evm mechanism to /go

* feat: added svm mechanism to /go

* feat: added extensions to /go

* feat: added gin to /go/http

* feat: added tests to /go

* feat: rewrote e2e test suite system

* feat: added axios client to e2e suite

* feat: added fetch client to e2e suite

* feat: added go http client to e2e suite

* feat: added express server to e2e suite

* feat: added hono server to e2e suite

* feat: added next server to e2e suite

* feat: added gin server to e2e suite

* feat: added typescript facilitator to e2e suite

* feat: added go facilitator to e2e suite

* feat: added fetch example to examples/typescript/clients

* feat: added axios example to examples/typescript/clients

* feat: added advanced example to examples/typescript/clients

* feat: added custom example to examples/typescript/clients

* feat: added express example to examples/typescript/servers

* feat: added hono example to examples/typescript/servers

* feat: added advanced example to examples/typescript/servers

* feat: added custom example to examples/typescript/servers

* feat: added facilitator example to examples/typescript

* chore: update /examples/typescript pnpm packaging

* feat: added http client to examples/go/clients

* feat: added advanced client to examples/go/clients

* feat: added custom client to examples/go/clients

* feat: added gin server to examples/go/servers

* feat: added advanced server to examples/go/servers

* feat: added custom server to examples/go/servers

* feat: added facilitator to examples/go

* chore: updated github workflows

* fix: typescript examples fotmat/lint

* v2: next example (#706)

* fix legacy example builds

* add next example

* fix format

* upgrade to next 16

* fix legacy build

* fix e2e tests

* V2: next api wrapper (#707)

* add next route wrapper

* add protected api to example page

* add unit tests

* fix missing settle failure check

* added e2e tests for withX402

* add SettleResponse to ProcessSettleResultResponse

* add requirements to payment-header

* feat: add v2 support to x402.org facilitator

* feat: dynamically load bazaar extension in Next only when used

* fix: x402Facilitator in typescript calling onAfterVerify instead on onVerifyFailure on failure

* feat: add ERC1271 and ERC6492 support to Typescript facilitator

* feat: update typescript facilitator example & e2e test for ERC1271/ERC6492 support

* feat: add ERC1271 and ERC6492 support to Go facilitators

* feat: update go facilitator example & e2e test for ERC1271/ERC6492 support

* v2: express fixes + unit tests  (#712)

* add express fixes from v1

* add units test for express/hono

* added fetch/axios unit tests

* v2: Clean up paywall (#710)

* Remove cdpClientKey and sessionTokenEndpoint from PaywallConfig

Remove Onramp functionality from EvmPaywall

Remove Coinbase fields from paywall template generation

* Migrate site to @x402/next with v2 protocol support

* Clean up tests

* remove CDP onramp from core paywall

* Update templates and build process

* Format

* Lockfile

* mock templates for CI

* Format

* Generate new templates

* Format

* v2: facilitator sync fix (#716)

* update next/react versions

* update site to next 16, tailwind 4 and fix env vars

* fix initializeOnStart pattern

* security: bump quic-go dependency for security fix GHSA-47m2-4cr7-mhcw

* v2:fix ts advanced/custom examples (#717)

* fix ts examples

* add clients/advanced/preferred-network example

* feat: improved e2e cli for external facilitator testing

* feat: updated evm & svm signer interfaces in go

* feat: updated evm & svm signer interfaces in typescript

* feat: reverted SupportedKind's kinds structure in go

* feat: reverted SupportedKind's kinds structure in typescript

* feat: refactor facilitator SVM signer interface in typescript

* go example fixes (#719)

* feat: cleanup go bazaar extension

* V2: docs update (#729)

* ts example docs

* improve ts package docs

* feat: dynamic bazaar import for all server middleware

* feat: allow dynamic response building for 402 response in typescript

* feat: allow dynamic response building for 402 response in go

* feat: added withBazaar HTTPFacilitatorClient wrapper

* feat: added linting to go

* fix: lint go

* improve go example docs (#733)

* feat: Solana PR review feedback in typescript

* feat: Solana PR review feedback in go

* fix: locks & paywall gen after rebase off main

* fix: format

* docs: improve @x402/extensions README with comprehensive documentation (#731)

* First draft of contributor docs (#738)

Correct ts contributing

Clean up contribution guidelines

* feat: updated specs for v2

* fix: merge with main, fixed lock

* v2: go settlement failure and initOnStart fixes (#720)

* go settlement failure and initOnStart fixes

* update go unit tests

* update readmes

* feat: review & improve examples & READMEs

* v2: add multiple payment options for go (#743)

* add multiple payment options for go

* fix SyncFacilitatorOnStart

* v2: add hooks for advanced go example (#745)

* add hooks for advanced go example

* fix legacy ts deps

* feat: added server initialization validation

* feat: added @x402 package workflows

* v2: add miniapp and mcp examples (#746)

* add miniapp example

* fix format

* add mcp example

* fix format

* v2: add manifest to miniapp example (#751)

* add manifest to miniapp

* fix format

* feat: x402 website redesign (#750)

* port new website to public repo

* chore: update pnpm-lock.yaml with motion dependency

* feat: add x402 V2 launch blog post and update hero code snippet

- Add /writing/x402-v2-launch blog post page
- Add blog images (blog_intro.png, blog_x402_layers.png, homepage_build5.png)
- Enable Writing nav link in NavBar and Footer
- Update hero code snippet to show V2 SDK usage
- Fix CodeSnippet to support multi-line code

* feat: edit nav for mobile

* Revert "feat: edit nav for mobile"

This reverts commit 475999a2a84f1fab875cd0fe2bb74d44dba7e1bd.

* feat: add ecosystem page and minor home page tweaks

* feat: fix typography in ecosystem

* homepage qa fixes

* feat: add ecosystem icons and fix halftone

* cleanup assets

* fix: minor bug on faq

* feat: add hamburger menu to mobile

* Update README (#755)

* Update readme

* Install instructions and typos

* feat: update site sample code & reduce supported networks

* fix: v1 header in README updated to v2

---------

Co-authored-by: phdargen <p.dargent@cern.ch>
Co-authored-by: A. McDermott <amanda.p.mcdermott@gmail.com>
Co-authored-by: Vedant Anand <136731196+VedantAnand17@users.noreply.github.com>
Co-authored-by: Faris Habib <frs@hbb.dev>
Co-authored-by: erikreppel-cb <erik.reppel@coinbase.com>
2025-12-11 07:41:57 -08:00
Carson Roscoe
e5b90b4841
feat: initial npm modules (#68)
* first pass implementing gha for publishing packages

* feat: updated core types to align with updated protocol spec

* feat: package/x402 refactor

* feat: restructured x402 core

* feat: x402 refactor in preparation for middleware

* feat: middleware workspace project template

* feat: refactor x402-express into its own package

* feat: x402-express updated to new spec

* feat: express server example

* feat: facilitator express server example

* feat: added axios interceptor

* chore: refactor express server example down a folder

* feat: client script example using axios

* fix: improved env variable handling in examples

* fix: site paths now that site is not within the turbo repo

* fix: parsing of types per updated spec

* fix: tweaked examples

* feat: x402-xios and x402-express unit tests

* feat: added test to turbo commands

* chore: reformat

* chore: docstrings

* chore: updated docstring

* feat: added x402-fetch package and fetch client example

* feat: unit test fetch wrapper

* chore: docstring

* chore: reformat

* chore: updated docstring

* feat: x402-hono and hono server example

* feat: added unit tests

* chore: added docstring

* chore: removed excess comments

* chore: updated docstring

* feat: added lint and format to typescript monorepo

* feat: added check_format, check_lint and check_package_lock workflows

* feat: tighten up and improve linting checks

* chore: lint/format x402

* chore: expand tigthened linting to all packages/examples

* fix: format/lint x402

* fix: format/lint x402-axios

* fix: format/lint x402-express

* fix: format/lint x402-fetch

* fix: format/lint x402-hono

* fix: format/lint middleware-template

* fix: format/lint example facilitator

* fix: format/lint example express server

* fix: format/lint example hono server

* fix: eslint unused var false positives

* fix: format/lint example axios client

* fix: format/lint example fetch client

* fix: format/lint whole project

* fix: added explicit dev dependencies on eslint-plugin

* chore: updated package lock workflow name

* chore: format package.jsons

* fix: added explicit dev dependencies on eslint parser

* fix: define paymentRequirements type from toJsonSafe

* fix: added explicit dev dependencies on eslint plugin import

* feat: README for express and express example

* fix: README code snippet syntax

* chore: unit test github workflow

* fix: test -> test:watch, added new test scripts

* chore: removed build from examples

* fix: added missing dependencies

* fix: renamed unit test workflow

* fix: missing dev dependency on express types in x402-express

* fix: added explicite vite dev dependency, as its a peer dep of vitest

* feat: x402-hono and servers/hono example READMEs (#52)

* feat: x402-hono and servers/hono example READMEs

* fix: updated npm to pnpm in example readme

* feat: refactor server middleware to decode X-PAYMENT header

* feat: middleware returns array of PaymentRequirements

* fix: unit tests

* fix: paywall html takes array of paymentRequirements, but just uses first item in list

* feat: added selector logic for selecting payment requirements client side

* feat: support generic ERC20Permit contracts

* fix: toJsonSafe for arrays

* fix: paywall selector usage

* feat: jwt signing & createAuthHeader

* fix: wrap api keys in auth object and include paths

* fix: route paths updated to specs

* fix: format

* feat: using @coinbase/cdp-sdk/auth for generateJwt

* feat: middleware takes an array to generate auth headers

* feat: change routes to /verify and /settle, change default resource to include /v2/x402

* fix: removed duplicate import

* chore: drop node 18 unit tests

* feat: rename function and descriptions to createAuthHeaders

* fix: pr feedback

* feat: improved default behavior for facilitator auth

* feat: dev demo test changes

* feat: moved cdp logic to separate export

* fix: format/lint

* feat: added x402-next and examples/fullstack/next

* feat: added readmes and updated exported types

* fix: format/lint

* fix: updated next demo to type: module

* fix: format

* fix: updated x402-next to new spec

* fix: demo

* fix: format/lint

* feat: improved handling of default asset

* fix: added missing dependencies

* fix: added explicite vite dev dependency, as its a peer dep of vitest

* feat: migrated site to monorepo subproject

* fix: regenerate lock

* feat: added format/lint

* fix: package type is module

* fix: package type is module

* fix: removed npm from prerequisites

* chore: rebased

* feat: migrated site example to latest spec

* fix: regenerate lock file

* feat: added mcp client demo

* feat: migrated agent client

* feat: Added x402-fetch and clients/fetch example readmes

* feat: rename export to wrapFetchWithPayment

* feat: x402-axios and clients/axios example readmes

* fix: increased node version in readme

* feat: removed packages/typescript

* feat: removed middleware-template

* feat: migrated clients/agent example

* feat: migrated clients/axios example

* feat: migrated clients/fetch example

* feat: migrated clients/mcp example

* feat: migrated facilitator example

* feat: migrated fullstack/next example

* feat: migrated servers/express example

* feat: migrated servers/hono example

* feat: structured dual-workspace for turbo

* feat: deleted example root folder

* fix: removed old package-lock and normalized express types used

* feat: removed x402 dependency on hono

* feat: migrated x402/cdp to @coinbase/x402

* feat: add payerAddress to verify responses

* feat: added README to examples/typescript

* chore: format/lint

* feat: migrate site example to root

* second pass implementing gha for publishing packages

* refinements

* enabling debugging

* disabling git check for publishing dryrun

* package npm token isolation

* removing degugging

* chore: Update Go Middleware Package to Latest Spec

* feat: updated README to spec

* feat: updated exact evm scheme

* fix: updated missed paymentDetails -> paymentRequirements in refactor

* fix: quotes to match our linter

* feat: readded supported

* fix: pr feedback

* fix: pr feedback

* update go fields: accepts, paymentPayload, paymentRequirements

* fix: readme example

* fix: site readme node version

* fix: removed package-lock.json

* feat: added package manager to package json

* fix: json

* feat: moved site back to typescript

* fix: lock file

* feat: updated packageManager

* feat: updated package manager

* testing root package.json

* fix: x402 depedency in site

* feat: added build:vercel script

* fix: github workflow detecting packageManager from package.json

* feat: removed dotenv dependency in x402 for edge compatibility

* feat: inject facilitator url via vercel env vars

* feedback

* pnpm version

* removing debugging

* first pass adding payer to verify response

* feat: initial devx draft

* fix: format/lint

* feat: rename facilitator exported config

* fix: x402-next middleware routing supports verbs

* feat: devx feedback

* feat: updated examples

* fix: removed bad dependency

* feat: regenerated lock after rebase

* fix: pnpm-lock

* fix: middleware resource url fallback

* fix: README 1-liner example for correctness

* feat: updated READMEs

* feat: bump x402 to 0.2.0

* feat: added legacy route support to hosted test facilitator

* fix: moved client definition out of global scope

* feat: rename TokenAmount to ERC20TokenAmount

* fix: remove unused ts-expect-error

* feat: temporarily removed @coinbase/x402 package

* fix: examples

---------

Co-authored-by: Christopher Gerber <csgerber@gmail.com>
Co-authored-by: John Peterson <john.peterson@coinbase.com>
2025-04-25 12:05:40 -04:00