Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/publish_pypi_x402.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
url: https://pypi.org/p/x402
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -45,4 +46,3 @@ jobs:
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc
with:
packages-dir: python/x402/dist/
password: ${{ secrets.PYPI_X402_TOKEN }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ After spec approval, implement in a **single SDK** (TypeScript, Python OR Go).
| SDK | Interfaces |
|-----|------------|
| TypeScript (`@x402/core`) | `SchemeNetworkClient`, `SchemeNetworkServer`, `SchemeNetworkFacilitator` |
| Go (`github.com/coinbase/x402/go`) | `ClientScheme`, `ServerScheme`, `FacilitatorScheme` |
| Go (`github.com/x402-foundation/x402/go`) | `ClientScheme`, `ServerScheme`, `FacilitatorScheme` |
| Python (`x402`) | `SchemeNetworkClient`, `SchemeNetworkServer`, `SchemeNetworkFacilitator` |

**Required tests:**
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pip install x402
### Go

```shell
go get github.com/coinbase/x402/go
go get github.com/x402-foundation/x402/go
```

</details>
Expand All @@ -50,7 +50,7 @@ go get github.com/coinbase/x402/go

- **Open standard:** x402 is an open standard, freely accessible and usable by anyone. It will never force reliance on a single party.
- **HTTP / Transport Native:** x402 is meant to seamlessly complement existing data transportation. It should whenever possible not mandate additional requests outside the scope of a typical client / server flow.
- **Network, token, and currency agnostic:** we welcome contributions that add support for new networks (both crypto and fiat), signing standards, or schemes, so long as they meet our acceptance criteria laid out in [CONTRIBUTING.md](https://github.com/coinbase/x402/blob/main/CONTRIBUTING.md). x402 may extend support to fiat based networks, but will never deprioritize onchain payments in favor of fiat payments.
- **Network, token, and currency agnostic:** we welcome contributions that add support for new networks (both crypto and fiat), signing standards, or schemes, so long as they meet our acceptance criteria laid out in [CONTRIBUTING.md](https://github.com/x402-foundation/x402/blob/main/CONTRIBUTING.md). x402 may extend support to fiat based networks, but will never deprioritize onchain payments in favor of fiat payments.
- **Backwards Compatible:** x402 will not deprecate support for any existing networks unless such removal is deemed necessary for the security of the standard. Whenever possible, x402 will aim for backwards compatibility for non-major version changes.
- **Trust minimizing:** all payment schemes must not allow for the facilitator or resource server to move funds, other than in accordance with client intentions
- **Easy to use:** It is the goal of the x402 community to improve ease of use relative to other forms of payment on the Internet. This means abstracting as many details of crypto as possible away from the client and resource server, and into the facilitator. This means the client/server should not need to think about gas, rpc, etc.
Expand All @@ -64,9 +64,9 @@ The x402 ecosystem is growing! Check out our [ecosystem page](https://x402.org/e
- Ecosystem infrastructure and tooling
- Learning and community resources

Want to add your project to the ecosystem? See our [demo site README](https://github.com/coinbase/x402/tree/main/typescript/site#adding-your-project-to-the-ecosystem) for detailed instructions on how to submit your project.
Want to add your project to the ecosystem? See our [demo site README](https://github.com/x402-foundation/x402/tree/main/typescript/site#adding-your-project-to-the-ecosystem) for detailed instructions on how to submit your project.

**Roadmap:** see [ROADMAP.md](https://github.com/coinbase/x402/blob/main/ROADMAP.md)
**Roadmap:** see [ROADMAP.md](https://github.com/x402-foundation/x402/blob/main/ROADMAP.md)

**Documentation:** see [docs/](./docs/) for the GitBook documentation source

Expand Down
10 changes: 5 additions & 5 deletions docs/advanced-concepts/lifecycle-hooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Register hooks on the core resource server for verification and settlement lifec
</Tab>
<Tab title="Go">
```go
import x402 "github.com/coinbase/x402/go"
import x402 "github.com/x402-foundation/x402/go"

server := x402.Newx402ResourceServer(facilitatorClient)

Expand Down Expand Up @@ -121,8 +121,8 @@ Register hooks for HTTP-specific request handling before payment processing. Use
```go
import (
"context"
x402 "github.com/coinbase/x402/go"
x402http "github.com/coinbase/x402/go/http"
x402 "github.com/x402-foundation/x402/go"
x402http "github.com/x402-foundation/x402/go/http"
)

// Create resource server
Expand Down Expand Up @@ -210,7 +210,7 @@ Register hooks on the core client for payment payload creation lifecycle events.
</Tab>
<Tab title="Go">
```go
import x402 "github.com/coinbase/x402/go"
import x402 "github.com/x402-foundation/x402/go"

client := x402.Newx402Client()

Expand Down Expand Up @@ -342,7 +342,7 @@ Register hooks on the facilitator for verification and settlement lifecycle even
</Tab>
<Tab title="Go">
```go
import x402 "github.com/coinbase/x402/go"
import x402 "github.com/x402-foundation/x402/go"

facilitator := x402.Newx402Facilitator()

Expand Down
2 changes: 1 addition & 1 deletion docs/core-concepts/client-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ To mitigate this, servers that settle Solana payments themselves **must** mainta
3. If the key is not present, insert it into the cache and proceed with settlement.
4. Evict entries older than 120 seconds (approximately twice the Solana blockhash lifetime).

If you are using a facilitator, the x402 SVM libraries already include built-in duplicate settlement protection via a `SettlementCache`. See the [Exact SVM Scheme Specification](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md) for full details.
If you are using a facilitator, the x402 SVM libraries already include built-in duplicate settlement protection via a `SettlementCache`. See the [Exact SVM Scheme Specification](https://github.com/x402-foundation/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md) for full details.

### Communication Flow

Expand Down
2 changes: 1 addition & 1 deletion docs/core-concepts/facilitator.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ To mitigate this, the x402 SVM mechanism packages include a built-in `Settlement

This protection is enabled by default when using the standard SVM facilitator registration helpers in TypeScript and Python. In Go, a shared `SettlementCache` instance should be passed to both V1 and V2 SVM facilitator schemes during registration.

**If you are a merchant settling payments directly (without a facilitator), you must implement equivalent duplicate detection yourself.** See the [Exact SVM Scheme Specification](https://github.com/coinbase/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md) for the full specification.
**If you are a merchant settling payments directly (without a facilitator), you must implement equivalent duplicate detection yourself.** See the [Exact SVM Scheme Specification](https://github.com/x402-foundation/x402/blob/main/specs/schemes/exact/scheme_exact_svm.md) for the full specification.

### Summary

Expand Down
6 changes: 3 additions & 3 deletions docs/core-concepts/network-and-token-support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ In V2, networks are supported through the registration pattern using CAIP-2 iden
<Tab title="Go">
```go
import (
x402http "github.com/coinbase/x402/go/http"
evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server"
x402http "github.com/x402-foundation/x402/go/http"
evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server"
)

facilitatorClient := x402http.NewHTTPFacilitatorClient(&x402http.FacilitatorConfig{
Expand Down Expand Up @@ -262,7 +262,7 @@ The x402 ecosystem is actively expanding network support. Planned additions incl
For help with network integration:

* Join the [x402 Discord community](https://discord.gg/cdp)
* Check the [x402 GitHub repository](https://github.com/coinbase/x402)
* Check the [x402 GitHub repository](https://github.com/x402-foundation/x402)

### Summary

Expand Down
2 changes: 1 addition & 1 deletion docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{
"anchor": "GitHub",
"icon": "github",
"href": "https://github.com/coinbase/x402"
"href": "https://github.com/x402-foundation/x402"
},
{
"anchor": "Discord",
Expand Down
18 changes: 9 additions & 9 deletions docs/extensions/bazaar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ Fetch the list of available x402 services using the facilitator client:
"context"
"fmt"

"github.com/coinbase/x402/go/extensions/bazaar"
x402http "github.com/coinbase/x402/go/http"
"github.com/x402-foundation/x402/go/extensions/bazaar"
x402http "github.com/x402-foundation/x402/go/http"
)

func main() {
Expand Down Expand Up @@ -466,12 +466,12 @@ To enhance your listing with descriptions and schemas, include them when setting
package main

import (
x402 "github.com/coinbase/x402/go"
"github.com/coinbase/x402/go/extensions/bazaar"
"github.com/coinbase/x402/go/extensions/types"
x402http "github.com/coinbase/x402/go/http"
ginmw "github.com/coinbase/x402/go/http/gin"
evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server"
x402 "github.com/x402-foundation/x402/go"
"github.com/x402-foundation/x402/go/extensions/bazaar"
"github.com/x402-foundation/x402/go/extensions/types"
x402http "github.com/x402-foundation/x402/go/http"
ginmw "github.com/x402-foundation/x402/go/http/gin"
evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server"
"github.com/gin-gonic/gin"
)

Expand Down Expand Up @@ -553,7 +553,7 @@ The x402 Bazaar is rapidly evolving, and your feedback helps us prioritize featu

### Support

* **GitHub**: [github.com/coinbase/x402](https://github.com/coinbase/x402)
* **GitHub**: [github.com/x402-foundation/x402](https://github.com/x402-foundation/x402)
* **Discord**: [Join #x402 channel](https://discord.com/invite/cdp)

### FAQ
Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/eip2612-gas-sponsoring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Advertise support for this extension in your route configuration:
<Tab title="Go">
```go
import (
"github.com/coinbase/x402/go/extensions/eip2612gassponsor"
"github.com/x402-foundation/x402/go/extensions/eip2612gassponsor"
)

extensions := eip2612gassponsor.DeclareEip2612GasSponsoringExtension()
Expand Down Expand Up @@ -97,7 +97,7 @@ The `ExactEvmScheme` handles EIP-2612 gas sponsoring automatically. When the ser
<Tab title="Go">
```go
import (
evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client"
evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client"
)

scheme := evm.NewExactEvmScheme(signer)
Expand Down
4 changes: 2 additions & 2 deletions docs/extensions/erc20-approval-gas-sponsoring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Advertise support for this extension in your route configuration:
<Tab title="Go">
```go
import (
"github.com/coinbase/x402/go/extensions/erc20approvalgassponsor"
"github.com/x402-foundation/x402/go/extensions/erc20approvalgassponsor"
)

extensions := erc20approvalgassponsor.DeclareExtension()
Expand Down Expand Up @@ -105,7 +105,7 @@ The `ExactEvmScheme` handles ERC-20 approval gas sponsoring automatically as a f
<Tab title="Go">
```go
import (
evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client"
evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client"
)

scheme := evm.NewExactEvmScheme(signer)
Expand Down
8 changes: 4 additions & 4 deletions docs/extensions/offer-receipt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -413,12 +413,12 @@ Ecosystem partners (see the [Infrastructure & Tooling category](https://www.x402

Complete working examples are available in the x402 repository:

- [Server Example (Express.js)](https://github.com/coinbase/x402/tree/main/examples/typescript/servers/offer-receipt) β€” Resource server with offer-receipt enabled, showing both EIP-712 and JWS configurations
- [Client Example](https://github.com/coinbase/x402/tree/main/examples/typescript/clients/offer-receipt) β€” Complete client flow: offer extraction, payment, receipt capture, and verification
- [Server Example (Express.js)](https://github.com/x402-foundation/x402/tree/main/examples/typescript/servers/offer-receipt) β€” Resource server with offer-receipt enabled, showing both EIP-712 and JWS configurations
- [Client Example](https://github.com/x402-foundation/x402/tree/main/examples/typescript/clients/offer-receipt) β€” Complete client flow: offer extraction, payment, receipt capture, and verification

## Further Reading

- [Extensions Overview](./overview) β€” How the x402 extension system works
- [Offer & Receipt Extension Specification](https://github.com/coinbase/x402/blob/main/specs/extensions/extension-offer-and-receipt.md) β€” Full protocol spec with payload schemas, EIP-712 types, verification rules, and wire format examples
- [@x402/extensions package](https://github.com/coinbase/x402/tree/main/typescript/packages/extensions/src/offer-receipt) β€” TypeScript implementation source
- [Offer & Receipt Extension Specification](https://github.com/x402-foundation/x402/blob/main/specs/extensions/extension-offer-and-receipt.md) β€” Full protocol spec with payload schemas, EIP-712 types, verification rules, and wire format examples
- [@x402/extensions package](https://github.com/x402-foundation/x402/tree/main/typescript/packages/extensions/src/offer-receipt) β€” TypeScript implementation source
- [SDK Features](/sdk-features) β€” Extension support across TypeScript, Go, and Python
6 changes: 3 additions & 3 deletions docs/extensions/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ To create your own extension:
3. **Implement the hooks you need** β€” `enrichDeclaration`, `enrichPaymentRequiredResponse`, `enrichSettlementResponse`
4. **Create a declare function** β€” a helper that returns the route-level configuration for your extension
5. **Register it** on the `x402ResourceServer` via `registerExtension`
6. **Submit a pull request** to [coinbase/x402](https://github.com/coinbase/x402) β€” extensions must be reviewed and approved by the x402 maintainers before they are included in the SDK
6. **Submit a pull request** to [x402-foundation/x402](https://github.com/x402-foundation/x402) β€” extensions must be reviewed and approved by the x402 maintainers before they are included in the SDK

Here's a minimal example:

Expand Down Expand Up @@ -156,5 +156,5 @@ The data returned from each hook is included in the response under `extensions["
## Further Reading

- [x402 SDK Features](/sdk-features) β€” Extension support across TypeScript, Go, and Python
- [Extension Specs](https://github.com/coinbase/x402/tree/main/specs/extensions) β€” Protocol-level extension specifications
- [@x402/extensions package](https://github.com/coinbase/x402/tree/main/typescript/packages/extensions) β€” TypeScript implementation source
- [Extension Specs](https://github.com/x402-foundation/x402/tree/main/specs/extensions) β€” Protocol-level extension specifications
- [@x402/extensions package](https://github.com/x402-foundation/x402/tree/main/typescript/packages/extensions) β€” TypeScript implementation source
Loading
Loading