diff --git a/.github/workflows/publish_pypi_x402.yml b/.github/workflows/publish_pypi_x402.yml index 752d614ced..f226e80a97 100644 --- a/.github/workflows/publish_pypi_x402.yml +++ b/.github/workflows/publish_pypi_x402.yml @@ -14,6 +14,7 @@ jobs: url: https://pypi.org/p/x402 permissions: contents: read + id-token: write steps: - uses: actions/checkout@v4 @@ -45,4 +46,3 @@ jobs: uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc with: packages-dir: python/x402/dist/ - password: ${{ secrets.PYPI_X402_TOKEN }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 683297dae1..578b61e1f1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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:** diff --git a/README.md b/README.md index efcdc0790a..f97a542479 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ pip install x402 ### Go ```shell -go get github.com/coinbase/x402/go +go get github.com/x402-foundation/x402/go ``` @@ -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. @@ -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 diff --git a/docs/advanced-concepts/lifecycle-hooks.mdx b/docs/advanced-concepts/lifecycle-hooks.mdx index c37bab531e..d61994a8e4 100644 --- a/docs/advanced-concepts/lifecycle-hooks.mdx +++ b/docs/advanced-concepts/lifecycle-hooks.mdx @@ -70,7 +70,7 @@ Register hooks on the core resource server for verification and settlement lifec ```go - import x402 "github.com/coinbase/x402/go" + import x402 "github.com/x402-foundation/x402/go" server := x402.Newx402ResourceServer(facilitatorClient) @@ -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 @@ -210,7 +210,7 @@ Register hooks on the core client for payment payload creation lifecycle events. ```go - import x402 "github.com/coinbase/x402/go" + import x402 "github.com/x402-foundation/x402/go" client := x402.Newx402Client() @@ -342,7 +342,7 @@ Register hooks on the facilitator for verification and settlement lifecycle even ```go - import x402 "github.com/coinbase/x402/go" + import x402 "github.com/x402-foundation/x402/go" facilitator := x402.Newx402Facilitator() diff --git a/docs/core-concepts/client-server.md b/docs/core-concepts/client-server.md index 83c3478a13..2a8082297f 100644 --- a/docs/core-concepts/client-server.md +++ b/docs/core-concepts/client-server.md @@ -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 diff --git a/docs/core-concepts/facilitator.md b/docs/core-concepts/facilitator.md index 4c96cba36f..4b862cfb15 100644 --- a/docs/core-concepts/facilitator.md +++ b/docs/core-concepts/facilitator.md @@ -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 diff --git a/docs/core-concepts/network-and-token-support.mdx b/docs/core-concepts/network-and-token-support.mdx index ffab259f2a..99650067a7 100644 --- a/docs/core-concepts/network-and-token-support.mdx +++ b/docs/core-concepts/network-and-token-support.mdx @@ -185,8 +185,8 @@ In V2, networks are supported through the registration pattern using CAIP-2 iden ```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{ @@ -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 diff --git a/docs/docs.json b/docs/docs.json index 90d8e39cb0..f7f945fa8c 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -23,7 +23,7 @@ { "anchor": "GitHub", "icon": "github", - "href": "https://github.com/coinbase/x402" + "href": "https://github.com/x402-foundation/x402" }, { "anchor": "Discord", diff --git a/docs/extensions/bazaar.mdx b/docs/extensions/bazaar.mdx index e84dbf09bd..5f40262ea0 100644 --- a/docs/extensions/bazaar.mdx +++ b/docs/extensions/bazaar.mdx @@ -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() { @@ -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" ) @@ -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 diff --git a/docs/extensions/eip2612-gas-sponsoring.mdx b/docs/extensions/eip2612-gas-sponsoring.mdx index 7d90ad8a9d..0218a3728f 100644 --- a/docs/extensions/eip2612-gas-sponsoring.mdx +++ b/docs/extensions/eip2612-gas-sponsoring.mdx @@ -47,7 +47,7 @@ Advertise support for this extension in your route configuration: ```go import ( - "github.com/coinbase/x402/go/extensions/eip2612gassponsor" + "github.com/x402-foundation/x402/go/extensions/eip2612gassponsor" ) extensions := eip2612gassponsor.DeclareEip2612GasSponsoringExtension() @@ -97,7 +97,7 @@ The `ExactEvmScheme` handles EIP-2612 gas sponsoring automatically. When the ser ```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) diff --git a/docs/extensions/erc20-approval-gas-sponsoring.mdx b/docs/extensions/erc20-approval-gas-sponsoring.mdx index 63ddbfadcd..8666d8b7ca 100644 --- a/docs/extensions/erc20-approval-gas-sponsoring.mdx +++ b/docs/extensions/erc20-approval-gas-sponsoring.mdx @@ -52,7 +52,7 @@ Advertise support for this extension in your route configuration: ```go import ( - "github.com/coinbase/x402/go/extensions/erc20approvalgassponsor" + "github.com/x402-foundation/x402/go/extensions/erc20approvalgassponsor" ) extensions := erc20approvalgassponsor.DeclareExtension() @@ -105,7 +105,7 @@ The `ExactEvmScheme` handles ERC-20 approval gas sponsoring automatically as a f ```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) diff --git a/docs/extensions/offer-receipt.mdx b/docs/extensions/offer-receipt.mdx index b7d116e837..3845d26794 100644 --- a/docs/extensions/offer-receipt.mdx +++ b/docs/extensions/offer-receipt.mdx @@ -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 diff --git a/docs/extensions/overview.mdx b/docs/extensions/overview.mdx index a6f7ea9454..d47ba60b30 100644 --- a/docs/extensions/overview.mdx +++ b/docs/extensions/overview.mdx @@ -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: @@ -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 diff --git a/docs/extensions/payment-identifier.mdx b/docs/extensions/payment-identifier.mdx index e5ea85f00e..b62ef06188 100644 --- a/docs/extensions/payment-identifier.mdx +++ b/docs/extensions/payment-identifier.mdx @@ -135,7 +135,7 @@ async with x402HttpxClient(client) as http: Use the `GeneratePaymentID()` utility to create a unique identifier: ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" // Generate with default prefix "pay_" paymentID := paymentidentifier.GeneratePaymentID("") @@ -152,8 +152,8 @@ Hook into the payment flow to add the payment ID before payload creation: ```go import ( - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/extensions/paymentidentifier" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/extensions/paymentidentifier" ) client := x402.Newx402Client() @@ -412,8 +412,8 @@ Declare the payment-identifier extension in your route configuration: ```go import ( - x402http "github.com/coinbase/x402/go/http" - "github.com/coinbase/x402/go/extensions/paymentidentifier" + x402http "github.com/x402-foundation/x402/go/http" + "github.com/x402-foundation/x402/go/extensions/paymentidentifier" ) // Optional or required payment identifier (pick one) @@ -442,7 +442,7 @@ routes := x402http.RoutesConfig{ Use the `ExtractPaymentIdentifier()` utility to get the payment ID from the payload: ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" // In your handler payload := c.MustGet("x402_payload").(x402.PaymentPayload) @@ -705,7 +705,7 @@ from x402.extensions.payment_identifier import ( Generates a cryptographically secure unique payment identifier. ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" // Generate with default prefix "pay_" paymentID := paymentidentifier.GeneratePaymentID("") @@ -721,7 +721,7 @@ paymentID = paymentidentifier.GeneratePaymentID("order_") Adds a payment identifier to the extensions object. Only modifies extensions if the server declared support for the extension. Pass an empty string to auto-generate an ID. ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" extensions := make(map[string]interface{}) err := paymentidentifier.AppendPaymentIdentifierToExtensions(extensions, "pay_custom_id_1234567890abcdef") @@ -733,7 +733,7 @@ err := paymentidentifier.AppendPaymentIdentifierToExtensions(extensions, "pay_cu Validates a payment identifier format. ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" valid := paymentidentifier.IsValidPaymentID("pay_7d5d747be160e280504c099d984bcfe0") // true valid = paymentidentifier.IsValidPaymentID("invalid") // false (too short) @@ -746,7 +746,7 @@ valid = paymentidentifier.IsValidPaymentID("invalid") // false (too short) Creates a payment-identifier extension declaration for resource servers. ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" // Optional payment ID extension := paymentidentifier.DeclarePaymentIdentifierExtension(false) @@ -760,7 +760,7 @@ extensionRequired := paymentidentifier.DeclarePaymentIdentifierExtension(true) Extracts the payment identifier from a payment payload. ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" paymentID, err := paymentidentifier.ExtractPaymentIdentifier(payload, true) if err != nil { @@ -776,7 +776,7 @@ if paymentID != "" { Validates the payment identifier extension object structure and ID format. ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" extension := payload.Extensions[paymentidentifier.PAYMENT_IDENTIFIER] result := paymentidentifier.ValidatePaymentIdentifier(extension) @@ -789,7 +789,7 @@ if !result.Valid { ### Constants ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" const ( PAYMENT_IDENTIFIER = "payment-identifier" @@ -808,16 +808,16 @@ var PAYMENT_ID_PATTERN = regexp.MustCompile(`^[a-zA-Z0-9_-]+$`) Full working examples are available in the x402 repository: **TypeScript:** -- [TypeScript Client Example](https://github.com/coinbase/x402/tree/main/examples/typescript/clients/payment-identifier) -- [TypeScript Server Example](https://github.com/coinbase/x402/tree/main/examples/typescript/servers/payment-identifier) +- [TypeScript Client Example](https://github.com/x402-foundation/x402/tree/main/examples/typescript/clients/payment-identifier) +- [TypeScript Server Example](https://github.com/x402-foundation/x402/tree/main/examples/typescript/servers/payment-identifier) **Python:** -- [Python Client Example](https://github.com/coinbase/x402/tree/main/examples/python/clients/payment-identifier) -- [Python Server Example](https://github.com/coinbase/x402/tree/main/examples/python/servers/payment-identifier) +- [Python Client Example](https://github.com/x402-foundation/x402/tree/main/examples/python/clients/payment-identifier) +- [Python Server Example](https://github.com/x402-foundation/x402/tree/main/examples/python/servers/payment-identifier) **Go:** -- [Go Client Example](https://github.com/coinbase/x402/tree/main/examples/go/clients/payment-identifier) -- [Go Server Example](https://github.com/coinbase/x402/tree/main/examples/go/servers/payment-identifier) +- [Go Client Example](https://github.com/x402-foundation/x402/tree/main/examples/go/clients/payment-identifier) +- [Go Server Example](https://github.com/x402-foundation/x402/tree/main/examples/go/servers/payment-identifier) ## FAQ diff --git a/docs/extensions/sign-in-with-x.mdx b/docs/extensions/sign-in-with-x.mdx index 0344207164..01957a43e9 100644 --- a/docs/extensions/sign-in-with-x.mdx +++ b/docs/extensions/sign-in-with-x.mdx @@ -437,5 +437,5 @@ The package includes `InMemorySIWxStorage` for development. For production, impl - [CAIP-122 Specification](https://chainagnostic.org/CAIPs/caip-122) - Sign-In-With-X standard - [EIP-4361 (SIWE)](https://eips.ethereum.org/EIPS/eip-4361) - Sign-In With Ethereum - [Sign-In With Solana](https://github.com/phantom/sign-in-with-solana) -- [x402 Core Package](https://github.com/coinbase/x402/tree/main/typescript/packages/core) +- [x402 Core Package](https://github.com/x402-foundation/x402/tree/main/typescript/packages/core) - [Lifecycle Hooks](/advanced-concepts/lifecycle-hooks) - Custom payment flow logic diff --git a/docs/faq.md b/docs/faq.md index 83c80990f8..1a1d6ef988 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -27,7 +27,7 @@ No. Any web API or content provider—crypto or web2—can integrate x402 if it Typescript, Python, and Go are reference implementations, but x402 is an **open protocol**. -Nothing prevents you from implementing the spec in Rust, Java, or other languages. If you're interested in building support for your favorite language, please [open an issue](https://github.com/coinbase/x402/issues) and let us know, we'd be happy to help! +Nothing prevents you from implementing the spec in Rust, Java, or other languages. If you're interested in building support for your favorite language, please [open an issue](https://github.com/x402-foundation/x402/issues) and let us know, we'd be happy to help! ### Facilitators @@ -111,7 +111,7 @@ Yes. Programmatic wallets (e.g., **CDP Wallet API**, **viem**, **ethers‑v6** H #### Is there a formal spec or whitepaper? -* **Spec:** [GitHub Specification](https://github.com/coinbase/x402/tree/main/specs) +* **Spec:** [GitHub Specification](https://github.com/x402-foundation/x402/tree/main/specs) * [**Whitepaper**](https://www.x402.org/x402-whitepaper.pdf) #### How will x402 evolve? @@ -144,4 +144,4 @@ We acknowledge that the repo is primarily under Coinbase ownership today. This i ### Still have questions? • Reach out in the [Discord channel](https://discord.gg/invite/cdp)\ -• Open a GitHub Discussion or Issue in the [x402 repo](https://github.com/coinbase/x402) +• Open a GitHub Discussion or Issue in the [x402 repo](https://github.com/x402-foundation/x402) diff --git a/docs/getting-started/quickstart-for-buyers.mdx b/docs/getting-started/quickstart-for-buyers.mdx index 003524dc8a..d6c40e0bc7 100644 --- a/docs/getting-started/quickstart-for-buyers.mdx +++ b/docs/getting-started/quickstart-for-buyers.mdx @@ -12,7 +12,7 @@ Before you begin, ensure you have: * A service that requires payment via x402 **Note**\ -There are pre-configured [examples available in the x402 repo](https://github.com/coinbase/x402/tree/main/examples), including examples for [fetch](https://github.com/coinbase/x402/tree/main/examples/typescript/clients/fetch), [Axios](https://github.com/coinbase/x402/tree/main/examples/typescript/clients/axios), [Go](https://github.com/coinbase/x402/tree/main/examples/go/clients), and [MCP](https://github.com/coinbase/x402/tree/main/examples/typescript/clients/mcp). +There are pre-configured [examples available in the x402 repo](https://github.com/x402-foundation/x402/tree/main/examples), including examples for [fetch](https://github.com/x402-foundation/x402/tree/main/examples/typescript/clients/fetch), [Axios](https://github.com/x402-foundation/x402/tree/main/examples/typescript/clients/axios), [Go](https://github.com/x402-foundation/x402/tree/main/examples/go/clients), and [MCP](https://github.com/x402-foundation/x402/tree/main/examples/typescript/clients/mcp). ### 1. Install Dependencies @@ -41,7 +41,7 @@ There are pre-configured [examples available in the x402 repo](https://github.co Add the x402 Go module to your project: ```bash - go get github.com/coinbase/x402/go + go get github.com/x402-foundation/x402/go ``` @@ -82,7 +82,7 @@ There are pre-configured [examples available in the x402 repo](https://github.co ```go import ( - evmsigners "github.com/coinbase/x402/go/signers/evm" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) // Load private key from environment @@ -156,7 +156,7 @@ const stellarSigner = createEd25519Signer( - **@x402/fetch** extends the native `fetch` API to handle 402 responses and payment headers for you. [Full example here](https://github.com/coinbase/x402/tree/main/examples/typescript/clients/fetch) + **@x402/fetch** extends the native `fetch` API to handle 402 responses and payment headers for you. [Full example here](https://github.com/x402-foundation/x402/tree/main/examples/typescript/clients/fetch) ```typescript import { wrapFetchWithPayment } from "@x402/fetch"; @@ -193,7 +193,7 @@ const stellarSigner = createEd25519Signer( ``` - **@x402/axios** adds a payment interceptor to Axios, so your requests are retried with payment headers automatically. [Full example here](https://github.com/coinbase/x402/tree/main/examples/typescript/clients/axios) + **@x402/axios** adds a payment interceptor to Axios, so your requests are retried with payment headers automatically. [Full example here](https://github.com/x402-foundation/x402/tree/main/examples/typescript/clients/axios) ```typescript import { x402Client, wrapAxiosWithPayment, x402HTTPClient } from "@x402/axios"; @@ -227,7 +227,7 @@ const stellarSigner = createEd25519Signer( ``` - [Full example here](https://github.com/coinbase/x402/tree/main/examples/go/clients/http) + [Full example here](https://github.com/x402-foundation/x402/tree/main/examples/go/clients/http) ```go package main @@ -240,10 +240,10 @@ const stellarSigner = createEd25519Signer( "os" "time" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) func main() { @@ -290,7 +290,7 @@ const stellarSigner = createEd25519Signer( **httpx** provides async HTTP client support with automatic 402 payment handling. - [Full HTTPX example](https://github.com/coinbase/x402/tree/main/examples/python/clients/httpx) | [Full Requests example](https://github.com/coinbase/x402/tree/main/examples/python/clients/requests) + [Full HTTPX example](https://github.com/x402-foundation/x402/tree/main/examples/python/clients/httpx) | [Full Requests example](https://github.com/x402-foundation/x402/tree/main/examples/python/clients/requests) ```python import asyncio @@ -330,7 +330,7 @@ const stellarSigner = createEd25519Signer( **requests** provides sync HTTP client support with automatic 402 payment handling. - [Full Requests example](https://github.com/coinbase/x402/tree/main/examples/python/clients/requests) + [Full Requests example](https://github.com/x402-foundation/x402/tree/main/examples/python/clients/requests) ```python import os @@ -418,12 +418,12 @@ You can register multiple payment schemes to handle different networks: ```go import ( - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" - svmsigners "github.com/coinbase/x402/go/signers/svm" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" + svmsigners "github.com/x402-foundation/x402/go/signers/svm" ) // Create signers @@ -549,6 +549,6 @@ try { * [@x402/fetch on npm](https://www.npmjs.com/package/@x402/fetch) * [@x402/axios on npm](https://www.npmjs.com/package/@x402/axios) * [@x402/evm on npm](https://www.npmjs.com/package/@x402/evm) -* [x402 Go module](https://github.com/coinbase/x402/tree/main/go) +* [x402 Go module](https://github.com/x402-foundation/x402/tree/main/go) For questions or support, join our [Discord](https://discord.gg/cdp). diff --git a/docs/getting-started/quickstart-for-sellers.mdx b/docs/getting-started/quickstart-for-sellers.mdx index 789d6097e8..275ad0964e 100644 --- a/docs/getting-started/quickstart-for-sellers.mdx +++ b/docs/getting-started/quickstart-for-sellers.mdx @@ -14,7 +14,7 @@ Before you begin, ensure you have: * An existing API or server **Note**\ -There are pre-configured examples available in the x402 repo for both [Node.js](https://github.com/coinbase/x402/tree/main/examples/typescript/servers) and [Go](https://github.com/coinbase/x402/tree/main/examples/go/servers). There is also an [advanced example](https://github.com/coinbase/x402/tree/main/examples/typescript/servers/advanced) that shows how to use the x402 SDKs to build a more complex payment flow. +There are pre-configured examples available in the x402 repo for both [Node.js](https://github.com/x402-foundation/x402/tree/main/examples/typescript/servers) and [Go](https://github.com/x402-foundation/x402/tree/main/examples/go/servers). There is also an [advanced example](https://github.com/x402-foundation/x402/tree/main/examples/typescript/servers/advanced) that shows how to use the x402 SDKs to build a more complex payment flow. ### 1. Install Dependencies @@ -51,7 +51,7 @@ There are pre-configured examples available in the x402 repo for both [Node.js]( Add the x402 Go module to your project: ```bash - go get github.com/coinbase/x402/go + go get github.com/x402-foundation/x402/go ``` @@ -87,7 +87,7 @@ Integrate the payment middleware into your application. You will need to provide - Full example in the repo [here](https://github.com/coinbase/x402/tree/main/examples/typescript/servers/express). + Full example in the repo [here](https://github.com/x402-foundation/x402/tree/main/examples/typescript/servers/express). ```typescript import express from "express"; @@ -150,7 +150,7 @@ Integrate the payment middleware into your application. You will need to provide ``` - Full example in the repo [here](https://github.com/coinbase/x402/tree/main/examples/typescript/fullstack/next). + Full example in the repo [here](https://github.com/x402-foundation/x402/tree/main/examples/typescript/fullstack/next). Next.js offers two approaches: `paymentProxy` for protecting page routes (or multiple routes at once), and `withX402` for wrapping individual API route handlers. The key difference is that `withX402` only settles payment after a successful response (status \< 400), making it the recommended approach for API routes. @@ -248,7 +248,7 @@ Integrate the payment middleware into your application. You will need to provide ``` - Full example in the repo [here](https://github.com/coinbase/x402/tree/main/examples/typescript/servers/hono). + Full example in the repo [here](https://github.com/x402-foundation/x402/tree/main/examples/typescript/servers/hono). ```typescript import { Hono } from "hono"; @@ -307,7 +307,7 @@ Integrate the payment middleware into your application. You will need to provide ``` - Full example in the repo [here](https://github.com/coinbase/x402/tree/main/examples/typescript/servers/fastify). + Full example in the repo [here](https://github.com/x402-foundation/x402/tree/main/examples/typescript/servers/fastify). ```typescript import Fastify from "fastify"; @@ -364,7 +364,7 @@ Integrate the payment middleware into your application. You will need to provide ``` - Full example in the repo [here](https://github.com/coinbase/x402/tree/main/examples/go/servers/gin). + Full example in the repo [here](https://github.com/x402-foundation/x402/tree/main/examples/go/servers/gin). ```go package main @@ -373,11 +373,11 @@ Integrate the payment middleware into your application. You will need to provide "net/http" "time" - x402 "github.com/coinbase/x402/go" - 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" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" + x402 "github.com/x402-foundation/x402/go" + 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" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" "github.com/gin-gonic/gin" ) @@ -437,7 +437,7 @@ Integrate the payment middleware into your application. You will need to provide ``` - Full example in the repo [here](https://github.com/coinbase/x402/tree/main/examples/go/servers/nethttp). + Full example in the repo [here](https://github.com/x402-foundation/x402/tree/main/examples/go/servers/nethttp). ```go package main @@ -447,11 +447,11 @@ Integrate the payment middleware into your application. You will need to provide "net/http" "time" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - nethttpmw "github.com/coinbase/x402/go/http/nethttp" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + nethttpmw "github.com/x402-foundation/x402/go/http/nethttp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" ) func main() { @@ -516,7 +516,7 @@ Integrate the payment middleware into your application. You will need to provide ``` - Full example in the repo [here](https://github.com/coinbase/x402/tree/main/examples/python/servers/fastapi). + Full example in the repo [here](https://github.com/x402-foundation/x402/tree/main/examples/python/servers/fastapi). ```python from typing import Any @@ -591,7 +591,7 @@ Integrate the payment middleware into your application. You will need to provide ``` - Full example in the repo [here](https://github.com/coinbase/x402/tree/main/examples/python/servers/flask). + Full example in the repo [here](https://github.com/x402-foundation/x402/tree/main/examples/python/servers/flask). ```python from flask import Flask, jsonify @@ -726,7 +726,7 @@ Learn more about the discovery layer in the [Bazaar documentation](/extensions/b ### 5. Error Handling -* If you run into trouble, check out the examples in the [repo](https://github.com/coinbase/x402/tree/main/examples) for more context and full code. +* If you run into trouble, check out the examples in the [repo](https://github.com/x402-foundation/x402/tree/main/examples) for more context and full code. * Run `npm install` or `go mod tidy` to install dependencies --- @@ -842,8 +842,8 @@ For multi-network support, register both EVM and SVM schemes: ```go import ( - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" ) r.Use(ginmw.X402Payment(ginmw.Config{ @@ -900,7 +900,7 @@ See [Network Support](/core-concepts/network-and-token-support) for the full lis ### Next Steps -* Check out the [Advanced Example](https://github.com/coinbase/x402/tree/main/examples/typescript/servers/advanced) for a more complex payment flow +* Check out the [Advanced Example](https://github.com/x402-foundation/x402/tree/main/examples/typescript/servers/advanced) for a more complex payment flow * Explore [Advanced Concepts](/advanced-concepts/lifecycle-hooks) like lifecycle hooks for custom logic before/after verification/settlement * Explore [Extensions](/extensions/bazaar) like Bazaar for service discovery * Get started as a [buyer](/getting-started/quickstart-for-buyers) diff --git a/docs/guides/mcp-server-with-x402.md b/docs/guides/mcp-server-with-x402.md index 871fe64785..76e9af0072 100644 --- a/docs/guides/mcp-server-with-x402.md +++ b/docs/guides/mcp-server-with-x402.md @@ -19,7 +19,7 @@ This lets you (or your agent) access paid APIs programmatically, with no manual * Node.js v20+ (install via [nvm](https://github.com/nvm-sh/nvm)) * pnpm v10 (install via [pnpm.io/installation](https://pnpm.io/installation)) -* An x402-compatible server to connect to (for this demo, we'll use the [sample express server with weather data](https://github.com/coinbase/x402/tree/main/examples/typescript/servers/express) from the x402 repo, or any external x402 API) +* An x402-compatible server to connect to (for this demo, we'll use the [sample express server with weather data](https://github.com/x402-foundation/x402/tree/main/examples/typescript/servers/express) from the x402 repo, or any external x402 API) * An Ethereum wallet with USDC (on Base Sepolia or Base Mainnet) and/or a Solana wallet with USDC (on Devnet or Mainnet) * [Claude Desktop with MCP support](https://claude.ai/download) @@ -31,7 +31,7 @@ This lets you (or your agent) access paid APIs programmatically, with no manual ```bash # Clone the x402 repository -git clone https://github.com/coinbase/x402.git +git clone https://github.com/x402-foundation/x402.git cd x402/examples/typescript # Install dependencies and build packages @@ -306,7 +306,7 @@ The example uses these x402 v2 packages: ### Next Steps -* [See the full example in the repo](https://github.com/coinbase/x402/tree/main/examples/typescript/clients/mcp) +* [See the full example in the repo](https://github.com/x402-foundation/x402/tree/main/examples/typescript/clients/mcp) * Try integrating with your own x402-compatible APIs * Extend the MCP server with more tools or custom logic as needed * [Learn about building x402 servers](/getting-started/quickstart-for-sellers) diff --git a/docs/introduction.md b/docs/introduction.md index 86d16a34c1..1882c1a0e6 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -9,7 +9,7 @@ x402 is the open payment standard that enables services to charge for access to With x402, any web service can require payment before serving a response, using crypto-native payments for speed, privacy, and efficiency. -**Want to contribute to our docs?** [The GitBook repo is open to PRs! ](https://github.com/coinbase/x402) Our only ask is that you keep these docs as a neutral resource, with no branded content other than linking out to other resources where appropriate. +**Want to contribute to our docs?** [The GitBook repo is open to PRs! ](https://github.com/x402-foundation/x402) Our only ask is that you keep these docs as a neutral resource, with no branded content other than linking out to other resources where appropriate. **Note about the docs:** These docs are the credibly neutral source of truth for x402, as x402 is a completely open standard under the Apache-2.0 license. Coinbase Developer Platform is currently sponsoring [AI-powered docs for users here](https://docs.cdp.coinbase.com/x402/welcome), as we migrate to our own AI-powered solution on the main x402.org domain. diff --git a/e2e/clients/go-http/README.md b/e2e/clients/go-http/README.md index 9d4d019f2c..6e06ed6ed8 100644 --- a/e2e/clients/go-http/README.md +++ b/e2e/clients/go-http/README.md @@ -24,12 +24,12 @@ This client demonstrates and tests the Go x402 HTTP client with both EVM and SVM ```go import ( - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - "github.com/coinbase/x402/go/mechanisms/evm" - evmv1 "github.com/coinbase/x402/go/mechanisms/evm/exact/v1" - "github.com/coinbase/x402/go/mechanisms/svm" - svmv1 "github.com/coinbase/x402/go/mechanisms/svm/exact/v1" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + "github.com/x402-foundation/x402/go/mechanisms/evm" + evmv1 "github.com/x402-foundation/x402/go/mechanisms/evm/exact/v1" + "github.com/x402-foundation/x402/go/mechanisms/svm" + svmv1 "github.com/x402-foundation/x402/go/mechanisms/svm/exact/v1" ) // Create x402 client with direct registration @@ -135,9 +135,9 @@ export SVM_PRIVATE_KEY="..." ## Dependencies -- `github.com/coinbase/x402/go` - Core x402 protocol -- `github.com/coinbase/x402/go/http` - HTTP integration -- `github.com/coinbase/x402/go/mechanisms/evm` - EVM mechanisms -- `github.com/coinbase/x402/go/mechanisms/svm` - SVM mechanisms +- `github.com/x402-foundation/x402/go` - Core x402 protocol +- `github.com/x402-foundation/x402/go/http` - HTTP integration +- `github.com/x402-foundation/x402/go/mechanisms/evm` - EVM mechanisms +- `github.com/x402-foundation/x402/go/mechanisms/svm` - SVM mechanisms - `github.com/ethereum/go-ethereum` - Ethereum Go library - `github.com/gagliardetto/solana-go` - Solana Go library diff --git a/e2e/clients/go-http/go.mod b/e2e/clients/go-http/go.mod index be39d8a56e..30bd6b4e3f 100644 --- a/e2e/clients/go-http/go.mod +++ b/e2e/clients/go-http/go.mod @@ -1,11 +1,11 @@ -module github.com/coinbase/x402-go/e2e/clients/go-http +module github.com/x402-foundation/x402-go/e2e/clients/go-http go 1.24.0 toolchain go1.24.1 require ( - github.com/coinbase/x402/go v0.0.0 + github.com/x402-foundation/x402/go v0.0.0 github.com/ethereum/go-ethereum v1.16.7 ) @@ -61,4 +61,4 @@ require ( golang.org/x/time v0.14.0 // indirect ) -replace github.com/coinbase/x402/go => ../../../go +replace github.com/x402-foundation/x402/go => ../../../go diff --git a/e2e/clients/go-http/main.go b/e2e/clients/go-http/main.go index 96ef06ab3f..4538abb24b 100644 --- a/e2e/clients/go-http/main.go +++ b/e2e/clients/go-http/main.go @@ -10,15 +10,15 @@ import ( "github.com/ethereum/go-ethereum/ethclient" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - exactevm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - exactevmv1 "github.com/coinbase/x402/go/mechanisms/evm/exact/v1/client" - uptoevm "github.com/coinbase/x402/go/mechanisms/evm/upto/client" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/client" - svmv1 "github.com/coinbase/x402/go/mechanisms/svm/exact/v1/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" - svmsigners "github.com/coinbase/x402/go/signers/svm" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + exactevm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + exactevmv1 "github.com/x402-foundation/x402/go/mechanisms/evm/exact/v1/client" + uptoevm "github.com/x402-foundation/x402/go/mechanisms/evm/upto/client" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/client" + svmv1 "github.com/x402-foundation/x402/go/mechanisms/svm/exact/v1/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" + svmsigners "github.com/x402-foundation/x402/go/signers/svm" ) // Result structure for e2e test output diff --git a/e2e/clients/mcp-go/go.mod b/e2e/clients/mcp-go/go.mod index 3899ac9b0c..19ed2a14f5 100644 --- a/e2e/clients/mcp-go/go.mod +++ b/e2e/clients/mcp-go/go.mod @@ -1,11 +1,11 @@ -module github.com/coinbase/x402/e2e/clients/mcp-go +module github.com/x402-foundation/x402/e2e/clients/mcp-go go 1.24.0 toolchain go1.24.1 require ( - github.com/coinbase/x402/go v0.0.0 + github.com/x402-foundation/x402/go v0.0.0 github.com/modelcontextprotocol/go-sdk v1.3.0 ) @@ -37,4 +37,4 @@ require ( golang.org/x/sys v0.39.0 // indirect ) -replace github.com/coinbase/x402/go => ../../../go +replace github.com/x402-foundation/x402/go => ../../../go diff --git a/e2e/clients/mcp-go/main.go b/e2e/clients/mcp-go/main.go index 4befd7e31d..ba3dfded98 100644 --- a/e2e/clients/mcp-go/main.go +++ b/e2e/clients/mcp-go/main.go @@ -6,11 +6,11 @@ import ( "fmt" "os" - x402 "github.com/coinbase/x402/go" - mcp402 "github.com/coinbase/x402/go/mcp" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" "github.com/modelcontextprotocol/go-sdk/mcp" + x402 "github.com/x402-foundation/x402/go" + mcp402 "github.com/x402-foundation/x402/go/mcp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) // Result structure for e2e test output diff --git a/e2e/facilitators/go/README.md b/e2e/facilitators/go/README.md index 40212e4122..62b0964214 100644 --- a/e2e/facilitators/go/README.md +++ b/e2e/facilitators/go/README.md @@ -83,12 +83,12 @@ facilitator := x402.Newx402Facilitator() ```go import ( - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/mechanisms/evm" - evmv1 "github.com/coinbase/x402/go/mechanisms/evm/exact/v1" - "github.com/coinbase/x402/go/mechanisms/svm" - svmv1 "github.com/coinbase/x402/go/mechanisms/svm/exact/v1" - "github.com/coinbase/x402/go/extensions/bazaar" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/mechanisms/evm" + evmv1 "github.com/x402-foundation/x402/go/mechanisms/evm/exact/v1" + "github.com/x402-foundation/x402/go/mechanisms/svm" + svmv1 "github.com/x402-foundation/x402/go/mechanisms/svm/exact/v1" + "github.com/x402-foundation/x402/go/extensions/bazaar" ) // Create facilitator @@ -258,9 +258,9 @@ export PORT=4024 ## Dependencies -- `github.com/coinbase/x402/go` - Core facilitator -- `github.com/coinbase/x402/go/mechanisms/evm` - EVM mechanisms -- `github.com/coinbase/x402/go/mechanisms/svm` - SVM mechanisms -- `github.com/coinbase/x402/go/extensions/bazaar` - Bazaar extension +- `github.com/x402-foundation/x402/go` - Core facilitator +- `github.com/x402-foundation/x402/go/mechanisms/evm` - EVM mechanisms +- `github.com/x402-foundation/x402/go/mechanisms/svm` - SVM mechanisms +- `github.com/x402-foundation/x402/go/extensions/bazaar` - Bazaar extension - `github.com/ethereum/go-ethereum` - Ethereum client - `github.com/gagliardetto/solana-go` - Solana client diff --git a/e2e/facilitators/go/bazaar.go b/e2e/facilitators/go/bazaar.go index 45d9e762b7..a288c98110 100644 --- a/e2e/facilitators/go/bazaar.go +++ b/e2e/facilitators/go/bazaar.go @@ -5,8 +5,8 @@ import ( "sync" "time" - x402 "github.com/coinbase/x402/go" - exttypes "github.com/coinbase/x402/go/extensions/types" + x402 "github.com/x402-foundation/x402/go" + exttypes "github.com/x402-foundation/x402/go/extensions/types" ) type DiscoveredResource struct { diff --git a/e2e/facilitators/go/go.mod b/e2e/facilitators/go/go.mod index 439612494a..6328c72791 100644 --- a/e2e/facilitators/go/go.mod +++ b/e2e/facilitators/go/go.mod @@ -1,11 +1,11 @@ -module github.com/coinbase/x402-go/e2e/facilitators/go +module github.com/x402-foundation/x402-go/e2e/facilitators/go go 1.24.0 toolchain go1.24.1 require ( - github.com/coinbase/x402/go v0.0.0 + github.com/x402-foundation/x402/go v0.0.0 github.com/ethereum/go-ethereum v1.16.7 github.com/gagliardetto/solana-go v1.14.0 github.com/gin-gonic/gin v1.11.0 @@ -88,4 +88,4 @@ require ( google.golang.org/protobuf v1.36.9 // indirect ) -replace github.com/coinbase/x402/go => ../../../go +replace github.com/x402-foundation/x402/go => ../../../go diff --git a/e2e/facilitators/go/main.go b/e2e/facilitators/go/main.go index b9d7ad2f59..56f1975dd8 100644 --- a/e2e/facilitators/go/main.go +++ b/e2e/facilitators/go/main.go @@ -16,19 +16,6 @@ import ( "sync" "time" - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/extensions/bazaar" - "github.com/coinbase/x402/go/extensions/eip2612gassponsor" - "github.com/coinbase/x402/go/extensions/erc20approvalgassponsor" - exttypes "github.com/coinbase/x402/go/extensions/types" - evmmech "github.com/coinbase/x402/go/mechanisms/evm" - exactevm "github.com/coinbase/x402/go/mechanisms/evm/exact/facilitator" - exactevmv1 "github.com/coinbase/x402/go/mechanisms/evm/exact/v1/facilitator" - uptoevm "github.com/coinbase/x402/go/mechanisms/evm/upto/facilitator" - svmmech "github.com/coinbase/x402/go/mechanisms/svm" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/facilitator" - svmv1 "github.com/coinbase/x402/go/mechanisms/svm/exact/v1/facilitator" - x402types "github.com/coinbase/x402/go/types" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" @@ -41,6 +28,19 @@ import ( solana "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" "github.com/gin-gonic/gin" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/extensions/bazaar" + "github.com/x402-foundation/x402/go/extensions/eip2612gassponsor" + "github.com/x402-foundation/x402/go/extensions/erc20approvalgassponsor" + exttypes "github.com/x402-foundation/x402/go/extensions/types" + evmmech "github.com/x402-foundation/x402/go/mechanisms/evm" + exactevm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/facilitator" + exactevmv1 "github.com/x402-foundation/x402/go/mechanisms/evm/exact/v1/facilitator" + uptoevm "github.com/x402-foundation/x402/go/mechanisms/evm/upto/facilitator" + svmmech "github.com/x402-foundation/x402/go/mechanisms/svm" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/facilitator" + svmv1 "github.com/x402-foundation/x402/go/mechanisms/svm/exact/v1/facilitator" + x402types "github.com/x402-foundation/x402/go/types" ) const ( diff --git a/e2e/legacy/servers/gin/go.mod b/e2e/legacy/servers/gin/go.mod index 5c21953dec..4e1f3d0b5b 100644 --- a/e2e/legacy/servers/gin/go.mod +++ b/e2e/legacy/servers/gin/go.mod @@ -1,9 +1,9 @@ -module github.com/coinbase/x402/e2e/servers/gin +module github.com/x402-foundation/x402/e2e/servers/gin go 1.23.3 require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/gin-gonic/gin v1.10.0 github.com/joho/godotenv v1.5.1 ) @@ -39,4 +39,4 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/coinbase/x402/go => ../../../../go/legacy +replace github.com/x402-foundation/x402/go => ../../../../go/legacy diff --git a/e2e/legacy/servers/gin/main.go b/e2e/legacy/servers/gin/main.go index a3630f0221..a7ae87a3c5 100644 --- a/e2e/legacy/servers/gin/main.go +++ b/e2e/legacy/servers/gin/main.go @@ -9,10 +9,10 @@ import ( "syscall" "time" - x402gin "github.com/coinbase/x402/go/pkg/gin" - "github.com/coinbase/x402/go/pkg/types" "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402gin "github.com/x402-foundation/x402/go/pkg/gin" + "github.com/x402-foundation/x402/go/pkg/types" ) var shutdownRequested bool diff --git a/e2e/servers/echo/README.md b/e2e/servers/echo/README.md index 0a1fae0ee0..c8a30c6e73 100644 --- a/e2e/servers/echo/README.md +++ b/e2e/servers/echo/README.md @@ -22,12 +22,12 @@ This server demonstrates and tests the x402 Echo middleware with both EVM and SV ```go import ( - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - echomw "github.com/coinbase/x402/go/http/echo" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" - "github.com/coinbase/x402/go/extensions/bazaar" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + echomw "github.com/x402-foundation/x402/go/http/echo" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" + "github.com/x402-foundation/x402/go/extensions/bazaar" "github.com/labstack/echo/v4" ) @@ -173,12 +173,12 @@ Content-Type: application/json ## Dependencies -- `github.com/coinbase/x402/go` - Core x402 -- `github.com/coinbase/x402/go/http` - HTTP integration -- `github.com/coinbase/x402/go/http/echo` - Echo middleware -- `github.com/coinbase/x402/go/mechanisms/evm` - EVM server -- `github.com/coinbase/x402/go/mechanisms/svm` - SVM server -- `github.com/coinbase/x402/go/extensions/bazaar` - Discovery extension +- `github.com/x402-foundation/x402/go` - Core x402 +- `github.com/x402-foundation/x402/go/http` - HTTP integration +- `github.com/x402-foundation/x402/go/http/echo` - Echo middleware +- `github.com/x402-foundation/x402/go/mechanisms/evm` - EVM server +- `github.com/x402-foundation/x402/go/mechanisms/svm` - SVM server +- `github.com/x402-foundation/x402/go/extensions/bazaar` - Discovery extension - `github.com/labstack/echo/v4` - HTTP framework ## Implementation Highlights diff --git a/e2e/servers/echo/go.mod b/e2e/servers/echo/go.mod index dc75cd9323..30f0d55232 100644 --- a/e2e/servers/echo/go.mod +++ b/e2e/servers/echo/go.mod @@ -1,11 +1,11 @@ -module github.com/coinbase/x402/e2e/servers/echo +module github.com/x402-foundation/x402/e2e/servers/echo go 1.24.0 toolchain go1.24.1 require ( - github.com/coinbase/x402/go v0.0.0 + github.com/x402-foundation/x402/go v0.0.0 github.com/joho/godotenv v1.5.1 github.com/labstack/echo/v4 v4.15.1 ) @@ -70,4 +70,4 @@ require ( golang.org/x/time v0.14.0 // indirect ) -replace github.com/coinbase/x402/go => ../../../go +replace github.com/x402-foundation/x402/go => ../../../go diff --git a/e2e/servers/echo/main.go b/e2e/servers/echo/main.go index 0269f74880..a93d2431f7 100644 --- a/e2e/servers/echo/main.go +++ b/e2e/servers/echo/main.go @@ -8,18 +8,18 @@ import ( "syscall" "time" - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/extensions/bazaar" - "github.com/coinbase/x402/go/extensions/eip2612gassponsor" - "github.com/coinbase/x402/go/extensions/erc20approvalgassponsor" - "github.com/coinbase/x402/go/extensions/types" - x402http "github.com/coinbase/x402/go/http" - echomw "github.com/coinbase/x402/go/http/echo" - exactevm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - uptoevm "github.com/coinbase/x402/go/mechanisms/evm/upto/server" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" "github.com/joho/godotenv" "github.com/labstack/echo/v4" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/extensions/bazaar" + "github.com/x402-foundation/x402/go/extensions/eip2612gassponsor" + "github.com/x402-foundation/x402/go/extensions/erc20approvalgassponsor" + "github.com/x402-foundation/x402/go/extensions/types" + x402http "github.com/x402-foundation/x402/go/http" + echomw "github.com/x402-foundation/x402/go/http/echo" + exactevm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" + uptoevm "github.com/x402-foundation/x402/go/mechanisms/evm/upto/server" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" ) var shutdownRequested bool diff --git a/e2e/servers/gin/README.md b/e2e/servers/gin/README.md index efdacab907..643d5e2fe7 100644 --- a/e2e/servers/gin/README.md +++ b/e2e/servers/gin/README.md @@ -23,12 +23,12 @@ This server demonstrates and tests the x402 Gin middleware with both EVM and SVM ```go import ( ginfw "github.com/gin-gonic/gin" - x402 "github.com/coinbase/x402/go" - 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" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" - "github.com/coinbase/x402/go/extensions/bazaar" + x402 "github.com/x402-foundation/x402/go" + 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" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" + "github.com/x402-foundation/x402/go/extensions/bazaar" ) // Create Gin router @@ -173,12 +173,12 @@ Content-Type: application/json ## Dependencies -- `github.com/coinbase/x402/go` - Core x402 -- `github.com/coinbase/x402/go/http` - HTTP integration -- `github.com/coinbase/x402/go/http/gin` - Gin middleware -- `github.com/coinbase/x402/go/mechanisms/evm` - EVM server -- `github.com/coinbase/x402/go/mechanisms/svm` - SVM server -- `github.com/coinbase/x402/go/extensions/bazaar` - Discovery extension +- `github.com/x402-foundation/x402/go` - Core x402 +- `github.com/x402-foundation/x402/go/http` - HTTP integration +- `github.com/x402-foundation/x402/go/http/gin` - Gin middleware +- `github.com/x402-foundation/x402/go/mechanisms/evm` - EVM server +- `github.com/x402-foundation/x402/go/mechanisms/svm` - SVM server +- `github.com/x402-foundation/x402/go/extensions/bazaar` - Discovery extension - `github.com/gin-gonic/gin` - HTTP framework ## Implementation Highlights diff --git a/e2e/servers/gin/go.mod b/e2e/servers/gin/go.mod index 393edfdb4f..a19f4cc267 100644 --- a/e2e/servers/gin/go.mod +++ b/e2e/servers/gin/go.mod @@ -1,11 +1,11 @@ -module github.com/coinbase/x402/e2e/servers/gin +module github.com/x402-foundation/x402/e2e/servers/gin go 1.24.0 toolchain go1.24.1 require ( - github.com/coinbase/x402/go v0.0.0 + github.com/x402-foundation/x402/go v0.0.0 github.com/gin-gonic/gin v1.11.0 github.com/joho/godotenv v1.5.1 ) @@ -88,4 +88,4 @@ require ( google.golang.org/protobuf v1.36.9 // indirect ) -replace github.com/coinbase/x402/go => ../../../go +replace github.com/x402-foundation/x402/go => ../../../go diff --git a/e2e/servers/gin/main.go b/e2e/servers/gin/main.go index a52a7bc234..bd0dc52e63 100644 --- a/e2e/servers/gin/main.go +++ b/e2e/servers/gin/main.go @@ -8,18 +8,18 @@ import ( "syscall" "time" - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/extensions/bazaar" - "github.com/coinbase/x402/go/extensions/eip2612gassponsor" - "github.com/coinbase/x402/go/extensions/erc20approvalgassponsor" - "github.com/coinbase/x402/go/extensions/types" - x402http "github.com/coinbase/x402/go/http" - ginmw "github.com/coinbase/x402/go/http/gin" - exactevm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - uptoevm "github.com/coinbase/x402/go/mechanisms/evm/upto/server" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/extensions/bazaar" + "github.com/x402-foundation/x402/go/extensions/eip2612gassponsor" + "github.com/x402-foundation/x402/go/extensions/erc20approvalgassponsor" + "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" + exactevm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" + uptoevm "github.com/x402-foundation/x402/go/mechanisms/evm/upto/server" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" ) var shutdownRequested bool diff --git a/e2e/servers/mcp-go/go.mod b/e2e/servers/mcp-go/go.mod index 9fc72ccfb4..8825482a4f 100644 --- a/e2e/servers/mcp-go/go.mod +++ b/e2e/servers/mcp-go/go.mod @@ -1,11 +1,11 @@ -module github.com/coinbase/x402/e2e/servers/mcp-go +module github.com/x402-foundation/x402/e2e/servers/mcp-go go 1.24.0 toolchain go1.24.1 require ( - github.com/coinbase/x402/go v0.0.0 + github.com/x402-foundation/x402/go v0.0.0 github.com/modelcontextprotocol/go-sdk v1.3.0 ) @@ -29,4 +29,4 @@ require ( golang.org/x/sys v0.39.0 // indirect ) -replace github.com/coinbase/x402/go => ../../../go +replace github.com/x402-foundation/x402/go => ../../../go diff --git a/e2e/servers/mcp-go/main.go b/e2e/servers/mcp-go/main.go index 4f05392672..311c8b9b16 100644 --- a/e2e/servers/mcp-go/main.go +++ b/e2e/servers/mcp-go/main.go @@ -9,12 +9,12 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - mcp402 "github.com/coinbase/x402/go/mcp" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - "github.com/coinbase/x402/go/types" "github.com/modelcontextprotocol/go-sdk/mcp" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + mcp402 "github.com/x402-foundation/x402/go/mcp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" + "github.com/x402-foundation/x402/go/types" ) // getWeatherData simulates fetching weather data for a city. diff --git a/e2e/servers/nethttp/README.md b/e2e/servers/nethttp/README.md index a5b9e3667f..3ae45a673c 100644 --- a/e2e/servers/nethttp/README.md +++ b/e2e/servers/nethttp/README.md @@ -23,12 +23,12 @@ This server demonstrates and tests the x402 net/http middleware with both EVM an ```go import ( "net/http" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - nethttpmw "github.com/coinbase/x402/go/http/nethttp" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" - "github.com/coinbase/x402/go/extensions/bazaar" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + nethttpmw "github.com/x402-foundation/x402/go/http/nethttp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" + "github.com/x402-foundation/x402/go/extensions/bazaar" ) // Create ServeMux @@ -175,12 +175,12 @@ Content-Type: application/json ## Dependencies -- `github.com/coinbase/x402/go` - Core x402 -- `github.com/coinbase/x402/go/http` - HTTP integration -- `github.com/coinbase/x402/go/http/nethttp` - net/http middleware -- `github.com/coinbase/x402/go/mechanisms/evm` - EVM server -- `github.com/coinbase/x402/go/mechanisms/svm` - SVM server -- `github.com/coinbase/x402/go/extensions/bazaar` - Discovery extension +- `github.com/x402-foundation/x402/go` - Core x402 +- `github.com/x402-foundation/x402/go/http` - HTTP integration +- `github.com/x402-foundation/x402/go/http/nethttp` - net/http middleware +- `github.com/x402-foundation/x402/go/mechanisms/evm` - EVM server +- `github.com/x402-foundation/x402/go/mechanisms/svm` - SVM server +- `github.com/x402-foundation/x402/go/extensions/bazaar` - Discovery extension ## Implementation Highlights diff --git a/e2e/servers/nethttp/go.mod b/e2e/servers/nethttp/go.mod index acc801d29a..b1664e19c2 100644 --- a/e2e/servers/nethttp/go.mod +++ b/e2e/servers/nethttp/go.mod @@ -1,11 +1,11 @@ -module github.com/coinbase/x402/e2e/servers/nethttp +module github.com/x402-foundation/x402/e2e/servers/nethttp go 1.24.0 toolchain go1.24.1 require ( - github.com/coinbase/x402/go v0.0.0 + github.com/x402-foundation/x402/go v0.0.0 github.com/joho/godotenv v1.5.1 ) @@ -64,4 +64,4 @@ require ( golang.org/x/time v0.14.0 // indirect ) -replace github.com/coinbase/x402/go => ../../../go +replace github.com/x402-foundation/x402/go => ../../../go diff --git a/e2e/servers/nethttp/main.go b/e2e/servers/nethttp/main.go index f3d13206e4..745b287a55 100644 --- a/e2e/servers/nethttp/main.go +++ b/e2e/servers/nethttp/main.go @@ -9,17 +9,17 @@ import ( "syscall" "time" - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/extensions/bazaar" - "github.com/coinbase/x402/go/extensions/eip2612gassponsor" - "github.com/coinbase/x402/go/extensions/erc20approvalgassponsor" - "github.com/coinbase/x402/go/extensions/types" - x402http "github.com/coinbase/x402/go/http" - nethttpmw "github.com/coinbase/x402/go/http/nethttp" - exactevm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - uptoevm "github.com/coinbase/x402/go/mechanisms/evm/upto/server" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/extensions/bazaar" + "github.com/x402-foundation/x402/go/extensions/eip2612gassponsor" + "github.com/x402-foundation/x402/go/extensions/erc20approvalgassponsor" + "github.com/x402-foundation/x402/go/extensions/types" + x402http "github.com/x402-foundation/x402/go/http" + nethttpmw "github.com/x402-foundation/x402/go/http/nethttp" + exactevm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" + uptoevm "github.com/x402-foundation/x402/go/mechanisms/evm/upto/server" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" ) var shutdownRequested bool diff --git a/examples/go/clients/advanced/README.md b/examples/go/clients/advanced/README.md index 43f3967788..0ff8248a4d 100644 --- a/examples/go/clients/advanced/README.md +++ b/examples/go/clients/advanced/README.md @@ -61,10 +61,10 @@ Register custom logic at different payment stages for observability and control: ```go import ( - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) signer, _ := evmsigners.NewClientSignerFromPrivateKey(os.Getenv("EVM_PRIVATE_KEY")) diff --git a/examples/go/clients/advanced/all_networks.go b/examples/go/clients/advanced/all_networks.go index 229b102536..5006fc309f 100644 --- a/examples/go/clients/advanced/all_networks.go +++ b/examples/go/clients/advanced/all_networks.go @@ -8,12 +8,12 @@ import ( "net/http" "time" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" - svmsigners "github.com/coinbase/x402/go/signers/svm" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" + svmsigners "github.com/x402-foundation/x402/go/signers/svm" ) /** diff --git a/examples/go/clients/advanced/custom_transport.go b/examples/go/clients/advanced/custom_transport.go index 2206722bdd..c75b7b10a8 100644 --- a/examples/go/clients/advanced/custom_transport.go +++ b/examples/go/clients/advanced/custom_transport.go @@ -6,10 +6,10 @@ import ( "net/http" "time" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) /** @@ -141,4 +141,3 @@ func runCustomTransportExample(ctx context.Context, evmPrivateKey, url string) e printPaymentDetails(resp.Header) return nil } - diff --git a/examples/go/clients/advanced/error_recovery.go b/examples/go/clients/advanced/error_recovery.go index 8b65d2599e..8ef21dc6a4 100644 --- a/examples/go/clients/advanced/error_recovery.go +++ b/examples/go/clients/advanced/error_recovery.go @@ -5,10 +5,10 @@ import ( "fmt" "net/http" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) /** @@ -166,4 +166,3 @@ func contains(msg string, keywords ...string) bool { } return false } - diff --git a/examples/go/clients/advanced/go.mod b/examples/go/clients/advanced/go.mod index bd19708d9e..eb9e870b32 100644 --- a/examples/go/clients/advanced/go.mod +++ b/examples/go/clients/advanced/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/clients/advanced +module github.com/x402-foundation/x402/examples/go/clients/advanced go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/clients/advanced/hooks.go b/examples/go/clients/advanced/hooks.go index 0a3bad969e..4e3d43d3a0 100644 --- a/examples/go/clients/advanced/hooks.go +++ b/examples/go/clients/advanced/hooks.go @@ -5,10 +5,10 @@ import ( "fmt" "net/http" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) /** @@ -113,4 +113,3 @@ func runHooksExample(ctx context.Context, evmPrivateKey, url string) error { printPaymentDetails(resp.Header) return nil } - diff --git a/examples/go/clients/advanced/multi_network_priority.go b/examples/go/clients/advanced/multi_network_priority.go index be2145585f..583e823bfe 100644 --- a/examples/go/clients/advanced/multi_network_priority.go +++ b/examples/go/clients/advanced/multi_network_priority.go @@ -5,10 +5,10 @@ import ( "fmt" "net/http" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) /** @@ -33,9 +33,9 @@ func runMultiNetworkPriorityExample(ctx context.Context, evmPrivateKey, url stri // In a real scenario, you might have different signers for different networks // For demo purposes, we'll use the same signer but show the pattern - mainnetSigner := primarySigner // Would be different in production - testnetSigner := primarySigner // Would be different in production - baseSigner := primarySigner // Would be different in production + mainnetSigner := primarySigner // Would be different in production + testnetSigner := primarySigner // Would be different in production + baseSigner := primarySigner // Would be different in production fmt.Println("📝 Registering networks with priority:") fmt.Println(" 1. Specific networks (highest priority)") @@ -64,7 +64,7 @@ func runMultiNetworkPriorityExample(ctx context.Context, evmPrivateKey, url stri client.OnBeforePaymentCreation(func(ctx x402.PaymentCreationContext) (*x402.BeforePaymentCreationHookResult, error) { fmt.Printf("💰 Creating payment for network: %s\n", ctx.SelectedRequirements.GetNetwork()) fmt.Printf(" Scheme: %s\n", ctx.SelectedRequirements.GetScheme()) - + // Show which signer would be used based on network var signerType string switch ctx.SelectedRequirements.GetNetwork() { @@ -117,4 +117,3 @@ func runMultiNetworkPriorityExample(ctx context.Context, evmPrivateKey, url stri printPaymentDetails(resp.Header) return nil } - diff --git a/examples/go/clients/custom/README.md b/examples/go/clients/custom/README.md index 0e1b8f060c..f84bb69982 100644 --- a/examples/go/clients/custom/README.md +++ b/examples/go/clients/custom/README.md @@ -73,9 +73,9 @@ go run . ```go import ( - x402 "github.com/coinbase/x402/go" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" + x402 "github.com/x402-foundation/x402/go" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) evmSigner, _ := evmsigners.NewClientSignerFromPrivateKey(os.Getenv("EVM_PRIVATE_KEY")) diff --git a/examples/go/clients/custom/go.mod b/examples/go/clients/custom/go.mod index f02b539d57..0df1bea0f6 100644 --- a/examples/go/clients/custom/go.mod +++ b/examples/go/clients/custom/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/clients/custom +module github.com/x402-foundation/x402/examples/go/clients/custom go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/clients/custom/main.go b/examples/go/clients/custom/main.go index fa1e0dd370..70a71fefc5 100644 --- a/examples/go/clients/custom/main.go +++ b/examples/go/clients/custom/main.go @@ -11,11 +11,11 @@ import ( "strings" "time" - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/types" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" + "github.com/x402-foundation/x402/go/types" ) /** @@ -241,7 +241,7 @@ func makeRequestWithPayment(ctx context.Context, x402Client *x402.X402Client, ur // Encode payment as base64 and add to header encodedPayment := base64.StdEncoding.EncodeToString(payloadBytes) - + // Create new request with payment header retryReq, err := http.NewRequestWithContext(ctx, "GET", url, nil) if err != nil { @@ -399,4 +399,3 @@ func extractSettlementResponse(headerValue string) (x402.SettleResponse, error) return settleResp, nil } - diff --git a/examples/go/clients/http/README.md b/examples/go/clients/http/README.md index a4d065771c..02f0ae8d28 100644 --- a/examples/go/clients/http/README.md +++ b/examples/go/clients/http/README.md @@ -54,10 +54,10 @@ go run . mechanism-helper-registration ```go import ( - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) // Create signer diff --git a/examples/go/clients/http/builder_pattern.go b/examples/go/clients/http/builder_pattern.go index 1256006bdc..e456925848 100644 --- a/examples/go/clients/http/builder_pattern.go +++ b/examples/go/clients/http/builder_pattern.go @@ -1,11 +1,11 @@ package main import ( - x402 "github.com/coinbase/x402/go" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" - svmsigners "github.com/coinbase/x402/go/signers/svm" + x402 "github.com/x402-foundation/x402/go" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" + svmsigners "github.com/x402-foundation/x402/go/signers/svm" ) /** @@ -53,4 +53,3 @@ func createBuilderPatternClient(evmPrivateKey, svmPrivateKey string) (*x402.X402 return client, nil } - diff --git a/examples/go/clients/http/go.mod b/examples/go/clients/http/go.mod index 3136c3064e..b2c98c3be6 100644 --- a/examples/go/clients/http/go.mod +++ b/examples/go/clients/http/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/clients/http +module github.com/x402-foundation/x402/examples/go/clients/http go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/clients/http/main.go b/examples/go/clients/http/main.go index 5adbbad5f1..59074c6e47 100644 --- a/examples/go/clients/http/main.go +++ b/examples/go/clients/http/main.go @@ -8,8 +8,8 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" ) /** @@ -135,4 +135,3 @@ func makeRequest(client *x402.X402Client, url string) error { return nil } - diff --git a/examples/go/clients/http/mechanism_helper_registration.go b/examples/go/clients/http/mechanism_helper_registration.go index d2fa8cee9c..db0331087c 100644 --- a/examples/go/clients/http/mechanism_helper_registration.go +++ b/examples/go/clients/http/mechanism_helper_registration.go @@ -1,11 +1,11 @@ package main import ( - x402 "github.com/coinbase/x402/go" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" - svmsigners "github.com/coinbase/x402/go/signers/svm" + x402 "github.com/x402-foundation/x402/go" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" + svmsigners "github.com/x402-foundation/x402/go/signers/svm" ) /** @@ -53,4 +53,3 @@ func createMechanismHelperRegistrationClient(evmPrivateKey, svmPrivateKey string return client, nil } - diff --git a/examples/go/clients/http/utils.go b/examples/go/clients/http/utils.go index 6a004f8ae1..1adb2afe2e 100644 --- a/examples/go/clients/http/utils.go +++ b/examples/go/clients/http/utils.go @@ -5,8 +5,8 @@ import ( "encoding/json" "net/http" - 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" ) // wrapHTTPClient wraps a standard HTTP client with x402 payment handling @@ -45,4 +45,3 @@ func extractPaymentResponse(headers http.Header) (*x402.SettleResponse, error) { return &settleResp, nil } - diff --git a/examples/go/clients/mcp-chatbot/go.mod b/examples/go/clients/mcp-chatbot/go.mod index 07a9305197..618f0db44a 100644 --- a/examples/go/clients/mcp-chatbot/go.mod +++ b/examples/go/clients/mcp-chatbot/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/clients/mcp-chatbot +module github.com/x402-foundation/x402/examples/go/clients/mcp-chatbot go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/joho/godotenv v1.5.1 github.com/modelcontextprotocol/go-sdk v1.3.0 github.com/sashabaranov/go-openai v1.38.1 diff --git a/examples/go/clients/mcp-chatbot/main.go b/examples/go/clients/mcp-chatbot/main.go index 4ecfaa5322..416208d1f4 100644 --- a/examples/go/clients/mcp-chatbot/main.go +++ b/examples/go/clients/mcp-chatbot/main.go @@ -21,13 +21,13 @@ import ( "os" "strings" - x402 "github.com/coinbase/x402/go" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - "github.com/coinbase/x402/go/mcp" - evmsigners "github.com/coinbase/x402/go/signers/evm" "github.com/joho/godotenv" mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp" openai "github.com/sashabaranov/go-openai" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/mcp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) // ============================================================================ diff --git a/examples/go/clients/mcp/advanced.go b/examples/go/clients/mcp/advanced.go index 5855bc0583..d3cb188371 100644 --- a/examples/go/clients/mcp/advanced.go +++ b/examples/go/clients/mcp/advanced.go @@ -5,12 +5,12 @@ import ( "fmt" "os" - x402 "github.com/coinbase/x402/go" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" - "github.com/coinbase/x402/go/mcp" "github.com/joho/godotenv" mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/mcp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) // MCP Client with x402 Payment Support - Advanced Example diff --git a/examples/go/clients/mcp/go.mod b/examples/go/clients/mcp/go.mod index 3f605472d7..f07a1a6fff 100644 --- a/examples/go/clients/mcp/go.mod +++ b/examples/go/clients/mcp/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/clients/mcp +module github.com/x402-foundation/x402/examples/go/clients/mcp go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/joho/godotenv v1.5.1 github.com/modelcontextprotocol/go-sdk v1.3.0 ) diff --git a/examples/go/clients/mcp/simple.go b/examples/go/clients/mcp/simple.go index 1fc19d0530..da04824941 100644 --- a/examples/go/clients/mcp/simple.go +++ b/examples/go/clients/mcp/simple.go @@ -5,12 +5,12 @@ import ( "fmt" "os" - x402 "github.com/coinbase/x402/go" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" - "github.com/coinbase/x402/go/mcp" "github.com/joho/godotenv" mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/mcp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) // MCP Client with x402 Payment Support - Simple Example diff --git a/examples/go/clients/payment-identifier/README.md b/examples/go/clients/payment-identifier/README.md index 3bd5851360..5a224dab8b 100644 --- a/examples/go/clients/payment-identifier/README.md +++ b/examples/go/clients/payment-identifier/README.md @@ -48,7 +48,7 @@ go run main.go ### Generating a Payment ID ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" // Generate with default prefix "pay_" id := paymentidentifier.GeneratePaymentID("") diff --git a/examples/go/clients/payment-identifier/go.mod b/examples/go/clients/payment-identifier/go.mod index 41a8179505..39203cdb21 100644 --- a/examples/go/clients/payment-identifier/go.mod +++ b/examples/go/clients/payment-identifier/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/clients/payment-identifier +module github.com/x402-foundation/x402/examples/go/clients/payment-identifier go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/clients/payment-identifier/main.go b/examples/go/clients/payment-identifier/main.go index 5cc78af831..e69d7b5cb9 100644 --- a/examples/go/clients/payment-identifier/main.go +++ b/examples/go/clients/payment-identifier/main.go @@ -11,12 +11,12 @@ import ( "strings" "time" - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/extensions/paymentidentifier" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/client" - evmsigners "github.com/coinbase/x402/go/signers/evm" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/extensions/paymentidentifier" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/client" + evmsigners "github.com/x402-foundation/x402/go/signers/evm" ) /** @@ -44,9 +44,9 @@ import ( // It then caches the resulting PAYMENT-SIGNATURE header so that subsequent // requests replay the exact same signed payload — a true retry. type PaymentIdentifierTransport struct { - Inner http.RoundTripper - PaymentID string - cachedPaymentHeader string // PAYMENT-SIGNATURE from the first successful attempt + Inner http.RoundTripper + PaymentID string + cachedPaymentHeader string // PAYMENT-SIGNATURE from the first successful attempt } func (t *PaymentIdentifierTransport) RoundTrip(req *http.Request) (*http.Response, error) { diff --git a/examples/go/facilitator/advanced/README.md b/examples/go/facilitator/advanced/README.md index a0633b6679..76ada96923 100644 --- a/examples/go/facilitator/advanced/README.md +++ b/examples/go/facilitator/advanced/README.md @@ -238,9 +238,9 @@ Register additional schemes for other networks: ```go import ( - x402 "github.com/coinbase/x402/go" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/facilitator" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/facilitator" + x402 "github.com/x402-foundation/x402/go" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/facilitator" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/facilitator" ) facilitator := x402.Newx402Facilitator() @@ -260,7 +260,7 @@ facilitator.Register([]x402.Network{"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"}, Extract and validate payment identifiers for deduplication: ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" // In verification hook, extract and track payment ID facilitator.OnAfterVerify(func(ctx x402.FacilitatorVerifyResultContext) error { diff --git a/examples/go/facilitator/advanced/all_networks.go b/examples/go/facilitator/advanced/all_networks.go index 6b658c2ab8..053401935f 100644 --- a/examples/go/facilitator/advanced/all_networks.go +++ b/examples/go/facilitator/advanced/all_networks.go @@ -7,10 +7,10 @@ import ( "net/http" "time" - x402 "github.com/coinbase/x402/go" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/facilitator" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/facilitator" "github.com/gin-gonic/gin" + x402 "github.com/x402-foundation/x402/go" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/facilitator" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/facilitator" ) /** diff --git a/examples/go/facilitator/advanced/bazaar.go b/examples/go/facilitator/advanced/bazaar.go index afd1c8524f..98bcf1b871 100644 --- a/examples/go/facilitator/advanced/bazaar.go +++ b/examples/go/facilitator/advanced/bazaar.go @@ -8,12 +8,12 @@ import ( "sync" "time" - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/extensions/bazaar" - exttypes "github.com/coinbase/x402/go/extensions/types" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/facilitator" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/facilitator" "github.com/gin-gonic/gin" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/extensions/bazaar" + exttypes "github.com/x402-foundation/x402/go/extensions/types" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/facilitator" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/facilitator" ) /** diff --git a/examples/go/facilitator/advanced/go.mod b/examples/go/facilitator/advanced/go.mod index 9c32300874..b966128d20 100644 --- a/examples/go/facilitator/advanced/go.mod +++ b/examples/go/facilitator/advanced/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/facilitator +module github.com/x402-foundation/x402/examples/go/facilitator go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/ethereum/go-ethereum v1.16.7 github.com/gagliardetto/solana-go v1.14.0 github.com/gin-gonic/gin v1.11.0 diff --git a/examples/go/facilitator/advanced/payment-identifier.go b/examples/go/facilitator/advanced/payment-identifier.go index 13bea06836..d3dae551c0 100644 --- a/examples/go/facilitator/advanced/payment-identifier.go +++ b/examples/go/facilitator/advanced/payment-identifier.go @@ -8,11 +8,11 @@ import ( "sync" "time" - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/extensions/paymentidentifier" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/facilitator" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/facilitator" "github.com/gin-gonic/gin" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/extensions/paymentidentifier" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/facilitator" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/facilitator" ) /** diff --git a/examples/go/facilitator/advanced/signer.go b/examples/go/facilitator/advanced/signer.go index eac33b0a58..7fdc1885da 100644 --- a/examples/go/facilitator/advanced/signer.go +++ b/examples/go/facilitator/advanced/signer.go @@ -9,8 +9,6 @@ import ( "strings" "time" - evmmech "github.com/coinbase/x402/go/mechanisms/evm" - svmmech "github.com/coinbase/x402/go/mechanisms/svm" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" @@ -21,6 +19,8 @@ import ( "github.com/ethereum/go-ethereum/signer/core/apitypes" solana "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" + evmmech "github.com/x402-foundation/x402/go/mechanisms/evm" + svmmech "github.com/x402-foundation/x402/go/mechanisms/svm" ) const ( diff --git a/examples/go/facilitator/basic/README.md b/examples/go/facilitator/basic/README.md index 9bdae3db57..24617d5b1f 100644 --- a/examples/go/facilitator/basic/README.md +++ b/examples/go/facilitator/basic/README.md @@ -235,9 +235,9 @@ Register additional schemes for other networks: ```go import ( - x402 "github.com/coinbase/x402/go" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/facilitator" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/facilitator" + x402 "github.com/x402-foundation/x402/go" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/facilitator" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/facilitator" ) facilitator := x402.Newx402Facilitator() diff --git a/examples/go/facilitator/basic/go.mod b/examples/go/facilitator/basic/go.mod index 450c76d2cf..2004fb3aa8 100644 --- a/examples/go/facilitator/basic/go.mod +++ b/examples/go/facilitator/basic/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/facilitator +module github.com/x402-foundation/x402/examples/go/facilitator go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/ethereum/go-ethereum v1.16.7 github.com/gagliardetto/solana-go v1.14.0 github.com/gin-gonic/gin v1.11.0 diff --git a/examples/go/facilitator/basic/main.go b/examples/go/facilitator/basic/main.go index c9ead5daa9..cb8f714767 100644 --- a/examples/go/facilitator/basic/main.go +++ b/examples/go/facilitator/basic/main.go @@ -8,14 +8,14 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/facilitator" - evmv1 "github.com/coinbase/x402/go/mechanisms/evm/exact/v1/facilitator" - svmmech "github.com/coinbase/x402/go/mechanisms/svm" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/facilitator" - svmv1 "github.com/coinbase/x402/go/mechanisms/svm/exact/v1/facilitator" "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/facilitator" + evmv1 "github.com/x402-foundation/x402/go/mechanisms/evm/exact/v1/facilitator" + svmmech "github.com/x402-foundation/x402/go/mechanisms/svm" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/facilitator" + svmv1 "github.com/x402-foundation/x402/go/mechanisms/svm/exact/v1/facilitator" ) const ( @@ -48,7 +48,7 @@ func main() { } facilitator := x402.Newx402Facilitator() - + // Register V2 EVM scheme with smart wallet deployment enabled evmConfig := &evm.ExactEvmSchemeConfig{ DeployERC4337WithEIP6492: true, @@ -166,4 +166,3 @@ func main() { os.Exit(1) } } - diff --git a/examples/go/facilitator/basic/signer.go b/examples/go/facilitator/basic/signer.go index 442da10515..e46bcebfb1 100644 --- a/examples/go/facilitator/basic/signer.go +++ b/examples/go/facilitator/basic/signer.go @@ -9,8 +9,6 @@ import ( "strings" "time" - evmmech "github.com/coinbase/x402/go/mechanisms/evm" - svmmech "github.com/coinbase/x402/go/mechanisms/svm" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" @@ -21,6 +19,8 @@ import ( "github.com/ethereum/go-ethereum/signer/core/apitypes" solana "github.com/gagliardetto/solana-go" "github.com/gagliardetto/solana-go/rpc" + evmmech "github.com/x402-foundation/x402/go/mechanisms/evm" + svmmech "github.com/x402-foundation/x402/go/mechanisms/svm" ) const ( @@ -214,7 +214,7 @@ func (s *facilitatorEvmSigner) ReadContract( if err != nil { return nil, fmt.Errorf("failed to call contract: %w", err) } - + if len(methodObj.Outputs) == 0 { return nil, nil } diff --git a/examples/go/servers/advanced/all_networks.go b/examples/go/servers/advanced/all_networks.go index 24de2fcc43..fb3501baa1 100644 --- a/examples/go/servers/advanced/all_networks.go +++ b/examples/go/servers/advanced/all_networks.go @@ -6,13 +6,13 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - 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" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + 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" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" ) /** diff --git a/examples/go/servers/advanced/bazaar.go b/examples/go/servers/advanced/bazaar.go index 22976f042d..4e0288c136 100644 --- a/examples/go/servers/advanced/bazaar.go +++ b/examples/go/servers/advanced/bazaar.go @@ -6,14 +6,14 @@ import ( "os" "time" - 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" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + 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" ) const DefaultPort = "4021" @@ -114,7 +114,7 @@ func main() { {Network: evmNetwork, Server: evm.NewExactEvmScheme()}, }, SyncFacilitatorOnStart: true, - Timeout: 30 * time.Second, + Timeout: 30 * time.Second, })) r.GET("/weather", func(c *ginfw.Context) { @@ -145,4 +145,3 @@ func main() { os.Exit(1) } } - diff --git a/examples/go/servers/advanced/custom-money-definition.go b/examples/go/servers/advanced/custom-money-definition.go index 13d5e8973d..163ae29251 100644 --- a/examples/go/servers/advanced/custom-money-definition.go +++ b/examples/go/servers/advanced/custom-money-definition.go @@ -7,12 +7,12 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - 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" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + 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" ) const DefaultPort = "4021" @@ -108,7 +108,7 @@ func main() { {Network: evmNetwork, Server: evmScheme}, // Use custom scheme }, SyncFacilitatorOnStart: true, - Timeout: 30 * time.Second, + Timeout: 30 * time.Second, })) r.GET("/weather", func(c *ginfw.Context) { @@ -128,4 +128,3 @@ func main() { os.Exit(1) } } - diff --git a/examples/go/servers/advanced/dynamic-pay-to.go b/examples/go/servers/advanced/dynamic-pay-to.go index 849792f593..ec8ea2648b 100644 --- a/examples/go/servers/advanced/dynamic-pay-to.go +++ b/examples/go/servers/advanced/dynamic-pay-to.go @@ -7,12 +7,12 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - 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" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + 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" ) const DefaultPort = "4021" @@ -110,7 +110,7 @@ func main() { {Network: evmNetwork, Server: evm.NewExactEvmScheme()}, }, SyncFacilitatorOnStart: true, - Timeout: 30 * time.Second, + Timeout: 30 * time.Second, })) r.GET("/weather", func(c *ginfw.Context) { @@ -130,4 +130,3 @@ func main() { os.Exit(1) } } - diff --git a/examples/go/servers/advanced/dynamic-price.go b/examples/go/servers/advanced/dynamic-price.go index 5b6dc89c23..dbe1aaa132 100644 --- a/examples/go/servers/advanced/dynamic-price.go +++ b/examples/go/servers/advanced/dynamic-price.go @@ -7,12 +7,12 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - 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" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + 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" ) const DefaultPort = "4021" @@ -58,10 +58,10 @@ func main() { dynamicPrice := func(ctx context.Context, reqCtx x402http.HTTPRequestContext) (x402.Price, error) { // In a real implementation, you would extract the tier from query params // or headers using reqCtx.Adapter - + // For this example, we'll demonstrate the concept with a default tier tier := "standard" // default - + // You could extract tier from request like: // if reqCtx.Adapter != nil { // tier = extractQueryParam(reqCtx.Adapter, "tier") @@ -101,7 +101,7 @@ func main() { {Network: evmNetwork, Server: evm.NewExactEvmScheme()}, }, SyncFacilitatorOnStart: true, - Timeout: 30 * time.Second, + Timeout: 30 * time.Second, })) r.GET("/weather", func(c *ginfw.Context) { @@ -141,4 +141,3 @@ func main() { os.Exit(1) } } - diff --git a/examples/go/servers/advanced/eip2612-gas-sponsoring.go b/examples/go/servers/advanced/eip2612-gas-sponsoring.go index dba8157f0c..99ff6436f0 100644 --- a/examples/go/servers/advanced/eip2612-gas-sponsoring.go +++ b/examples/go/servers/advanced/eip2612-gas-sponsoring.go @@ -6,13 +6,13 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/extensions/eip2612gassponsor" - 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" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/extensions/eip2612gassponsor" + 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" ) const eip2612DefaultPort = "4021" diff --git a/examples/go/servers/advanced/go.mod b/examples/go/servers/advanced/go.mod index 4b2303b641..84e13727a3 100644 --- a/examples/go/servers/advanced/go.mod +++ b/examples/go/servers/advanced/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/servers/gin +module github.com/x402-foundation/x402/examples/go/servers/gin go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/gin-gonic/gin v1.11.0 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/servers/advanced/hooks.go b/examples/go/servers/advanced/hooks.go index 402c9dbf2e..584498b2ac 100644 --- a/examples/go/servers/advanced/hooks.go +++ b/examples/go/servers/advanced/hooks.go @@ -5,12 +5,12 @@ import ( "net/http" "os" - x402 "github.com/coinbase/x402/go" - 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" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + 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" ) const DefaultPort = "4021" @@ -48,7 +48,7 @@ func main() { // Create EVM scheme server evmScheme := evm.NewExactEvmScheme() - // Create x402 resource server with hooks + // Create x402 resource server with hooks server := x402.Newx402ResourceServer( x402.WithFacilitatorClient(facilitatorClient), ). diff --git a/examples/go/servers/bazaar/go.mod b/examples/go/servers/bazaar/go.mod index 5b5b438c56..1d11fd6b64 100644 --- a/examples/go/servers/bazaar/go.mod +++ b/examples/go/servers/bazaar/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/servers/bazaar +module github.com/x402-foundation/x402/examples/go/servers/bazaar go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/gin-gonic/gin v1.11.0 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/servers/bazaar/main.go b/examples/go/servers/bazaar/main.go index c6e6c48e0c..32502a724c 100644 --- a/examples/go/servers/bazaar/main.go +++ b/examples/go/servers/bazaar/main.go @@ -6,14 +6,14 @@ import ( "os" "time" - x402http "github.com/coinbase/x402/go/http" - "github.com/coinbase/x402/go/extensions/bazaar" - "github.com/coinbase/x402/go/extensions/types" - ginmw "github.com/coinbase/x402/go/http/gin" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + "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" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" ) const ( diff --git a/examples/go/servers/custom/go.mod b/examples/go/servers/custom/go.mod index 1896b9b7ab..a80a79990c 100644 --- a/examples/go/servers/custom/go.mod +++ b/examples/go/servers/custom/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/servers/custom +module github.com/x402-foundation/x402/examples/go/servers/custom go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/gin-gonic/gin v1.11.0 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/servers/custom/main.go b/examples/go/servers/custom/main.go index a217a9aa60..d95fb8437d 100644 --- a/examples/go/servers/custom/main.go +++ b/examples/go/servers/custom/main.go @@ -10,11 +10,11 @@ import ( "sync" "time" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" ) const ( @@ -324,7 +324,7 @@ func main() { // Initialize the server (queries facilitator for supported schemes) ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) defer cancel() - + if err := x402Server.Initialize(ctx); err != nil { fmt.Printf("⚠️ Warning: failed to initialize x402 server: %v\n", err) } @@ -406,4 +406,3 @@ func main() { os.Exit(1) } } - diff --git a/examples/go/servers/echo/go.mod b/examples/go/servers/echo/go.mod index 4c09ee7ccd..605f8c5ff8 100644 --- a/examples/go/servers/echo/go.mod +++ b/examples/go/servers/echo/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/servers/echo +module github.com/x402-foundation/x402/examples/go/servers/echo go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0 + github.com/x402-foundation/x402/go v0.0.0 github.com/joho/godotenv v1.5.1 github.com/labstack/echo/v4 v4.15.1 ) diff --git a/examples/go/servers/echo/main.go b/examples/go/servers/echo/main.go index 9c34a3998e..00bfa8dc92 100644 --- a/examples/go/servers/echo/main.go +++ b/examples/go/servers/echo/main.go @@ -6,13 +6,13 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - echomw "github.com/coinbase/x402/go/http/echo" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" "github.com/joho/godotenv" "github.com/labstack/echo/v4" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + echomw "github.com/x402-foundation/x402/go/http/echo" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" ) const ( diff --git a/examples/go/servers/gin/go.mod b/examples/go/servers/gin/go.mod index 4b2303b641..84e13727a3 100644 --- a/examples/go/servers/gin/go.mod +++ b/examples/go/servers/gin/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/servers/gin +module github.com/x402-foundation/x402/examples/go/servers/gin go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/gin-gonic/gin v1.11.0 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/servers/gin/main.go b/examples/go/servers/gin/main.go index 046d70c587..c45495f0d2 100644 --- a/examples/go/servers/gin/main.go +++ b/examples/go/servers/gin/main.go @@ -6,13 +6,13 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - 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" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + 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" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" ) const ( @@ -96,7 +96,7 @@ func main() { ginmw.SchemeConfig{Network: "eip155:84532", Server: evm.NewExactEvmScheme()}, ginmw.SchemeConfig{Network: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", Server: svm.NewExactSvmScheme()}, }, - Timeout: 30 * time.Second, + Timeout: 30 * time.Second, })) /** @@ -147,4 +147,3 @@ func main() { os.Exit(1) } } - diff --git a/examples/go/servers/mcp/advanced.go b/examples/go/servers/mcp/advanced.go index 85d985606f..118365ae6e 100644 --- a/examples/go/servers/mcp/advanced.go +++ b/examples/go/servers/mcp/advanced.go @@ -19,12 +19,12 @@ import ( "net/http" "os" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - "github.com/coinbase/x402/go/mcp" "github.com/joho/godotenv" mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + "github.com/x402-foundation/x402/go/mcp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" ) func runAdvanced() error { diff --git a/examples/go/servers/mcp/existing-server.go b/examples/go/servers/mcp/existing-server.go index 077fba5b11..7b90dcd654 100644 --- a/examples/go/servers/mcp/existing-server.go +++ b/examples/go/servers/mcp/existing-server.go @@ -17,12 +17,12 @@ import ( "net/http" "os" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - "github.com/coinbase/x402/go/mcp" "github.com/joho/godotenv" mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + "github.com/x402-foundation/x402/go/mcp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" ) func runExisting() error { diff --git a/examples/go/servers/mcp/go.mod b/examples/go/servers/mcp/go.mod index 797f9c3815..257a6f39bf 100644 --- a/examples/go/servers/mcp/go.mod +++ b/examples/go/servers/mcp/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/servers/mcp +module github.com/x402-foundation/x402/examples/go/servers/mcp go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/joho/godotenv v1.5.1 github.com/modelcontextprotocol/go-sdk v1.3.0 ) diff --git a/examples/go/servers/mcp/simple.go b/examples/go/servers/mcp/simple.go index 820c09a2ad..c5fc5da93d 100644 --- a/examples/go/servers/mcp/simple.go +++ b/examples/go/servers/mcp/simple.go @@ -17,12 +17,12 @@ import ( "net/http" "os" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - "github.com/coinbase/x402/go/mcp" "github.com/joho/godotenv" mcpsdk "github.com/modelcontextprotocol/go-sdk/mcp" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + "github.com/x402-foundation/x402/go/mcp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" ) func runSimple() error { diff --git a/examples/go/servers/nethttp/go.mod b/examples/go/servers/nethttp/go.mod index cf8d3a11de..6716326d01 100644 --- a/examples/go/servers/nethttp/go.mod +++ b/examples/go/servers/nethttp/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/servers/nethttp +module github.com/x402-foundation/x402/examples/go/servers/nethttp go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0 + github.com/x402-foundation/x402/go v0.0.0 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/servers/nethttp/main.go b/examples/go/servers/nethttp/main.go index 71c683874a..072402cf7e 100644 --- a/examples/go/servers/nethttp/main.go +++ b/examples/go/servers/nethttp/main.go @@ -7,12 +7,12 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - nethttpmw "github.com/coinbase/x402/go/http/nethttp" - evm "github.com/coinbase/x402/go/mechanisms/evm/exact/server" - svm "github.com/coinbase/x402/go/mechanisms/svm/exact/server" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + nethttpmw "github.com/x402-foundation/x402/go/http/nethttp" + evm "github.com/x402-foundation/x402/go/mechanisms/evm/exact/server" + svm "github.com/x402-foundation/x402/go/mechanisms/svm/exact/server" ) const ( diff --git a/examples/go/servers/payment-identifier/README.md b/examples/go/servers/payment-identifier/README.md index ac285739b9..490ac8d7d2 100644 --- a/examples/go/servers/payment-identifier/README.md +++ b/examples/go/servers/payment-identifier/README.md @@ -48,7 +48,7 @@ go run main.go ### Declaring the Extension ```go -import "github.com/coinbase/x402/go/extensions/paymentidentifier" +import "github.com/x402-foundation/x402/go/extensions/paymentidentifier" // Require payment identifier (clients MUST provide one) paymentIdExtension := paymentidentifier.DeclarePaymentIdentifierExtension(true) diff --git a/examples/go/servers/payment-identifier/go.mod b/examples/go/servers/payment-identifier/go.mod index 3f33b32f5e..73aa915e66 100644 --- a/examples/go/servers/payment-identifier/go.mod +++ b/examples/go/servers/payment-identifier/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/servers/payment-identifier +module github.com/x402-foundation/x402/examples/go/servers/payment-identifier go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/gin-gonic/gin v1.11.0 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/servers/payment-identifier/main.go b/examples/go/servers/payment-identifier/main.go index d581cbc8a3..ac69bfa4ef 100644 --- a/examples/go/servers/payment-identifier/main.go +++ b/examples/go/servers/payment-identifier/main.go @@ -9,13 +9,13 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - "github.com/coinbase/x402/go/extensions/paymentidentifier" - 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" "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + "github.com/x402-foundation/x402/go/extensions/paymentidentifier" + 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" ) const DefaultPort = "4021" diff --git a/examples/go/servers/upto/go.mod b/examples/go/servers/upto/go.mod index dceea77cf5..aeec5bd1b4 100644 --- a/examples/go/servers/upto/go.mod +++ b/examples/go/servers/upto/go.mod @@ -1,13 +1,13 @@ -module github.com/coinbase/x402/examples/go/servers/upto +module github.com/x402-foundation/x402/examples/go/servers/upto go 1.24.0 toolchain go1.24.1 -replace github.com/coinbase/x402/go => ../../../../go +replace github.com/x402-foundation/x402/go => ../../../../go require ( - github.com/coinbase/x402/go v0.0.0-00010101000000-000000000000 + github.com/x402-foundation/x402/go v0.0.0-00010101000000-000000000000 github.com/gin-gonic/gin v1.11.0 github.com/joho/godotenv v1.5.1 ) diff --git a/examples/go/servers/upto/main.go b/examples/go/servers/upto/main.go index 3a2c41f77a..b61fd8a20f 100644 --- a/examples/go/servers/upto/main.go +++ b/examples/go/servers/upto/main.go @@ -7,12 +7,12 @@ import ( "os" "time" - x402 "github.com/coinbase/x402/go" - x402http "github.com/coinbase/x402/go/http" - ginmw "github.com/coinbase/x402/go/http/gin" - uptoevm "github.com/coinbase/x402/go/mechanisms/evm/upto/server" ginfw "github.com/gin-gonic/gin" "github.com/joho/godotenv" + x402 "github.com/x402-foundation/x402/go" + x402http "github.com/x402-foundation/x402/go/http" + ginmw "github.com/x402-foundation/x402/go/http/gin" + uptoevm "github.com/x402-foundation/x402/go/mechanisms/evm/upto/server" ) const DefaultPort = "4021" diff --git a/examples/typescript/legacy/agent/package.json b/examples/typescript/legacy/agent/package.json index b029f380cd..bcd036fb9f 100644 --- a/examples/typescript/legacy/agent/package.json +++ b/examples/typescript/legacy/agent/package.json @@ -10,8 +10,8 @@ }, "keywords": [], "license": "Apache-2.0", - "author": "Coinbase Inc.", - "repository": "https://github.com/coinbase/x402", + "author": "x402 Foundation", + "repository": "https://github.com/x402-foundation/x402", "description": "x402 Payment Protocol", "devDependencies": { "@eslint/js": "^9.24.0", diff --git a/examples/typescript/legacy/fullstack/browser-wallet-example/README.md b/examples/typescript/legacy/fullstack/browser-wallet-example/README.md index 4d1d779f91..8b26a067c2 100644 --- a/examples/typescript/legacy/fullstack/browser-wallet-example/README.md +++ b/examples/typescript/legacy/fullstack/browser-wallet-example/README.md @@ -11,7 +11,7 @@ x402 is a payments protocol for the internet built on HTTP. It enables: - **No fees**, 2 second settlement - **$0.001 minimum** payments -Learn more at [x402.org](https://x402.org) or check out the [GitHub repository](https://github.com/coinbase/x402). +Learn more at [x402.org](https://x402.org) or check out the [GitHub repository](https://github.com/x402-foundation/x402). ## This Template Includes @@ -158,9 +158,9 @@ The UI is intentionally minimal so you can add your own design system. All style Building something with x402? We're here to help! - 📚 **Documentation**: [x402.org](https://x402.org) -- 💻 **Source Code**: [github.com/coinbase/x402](https://github.com/coinbase/x402) +- 💻 **Source Code**: [github.com/x402-foundation/x402](https://github.com/x402-foundation/x402) - 💬 **Community**: [Join our Discord](https://discord.gg/invite/cdp) -- 🐛 **Issues**: [GitHub Issues](https://github.com/coinbase/x402/issues) +- 🐛 **Issues**: [GitHub Issues](https://github.com/x402-foundation/x402/issues) ## Contributing @@ -168,7 +168,7 @@ Found a bug or have an improvement for this template? Please open an issue or su ## License -This template is open source and available under the same license as the x402 protocol. See the [x402 repository](https://github.com/coinbase/x402) for details. +This template is open source and available under the same license as the x402 protocol. See the [x402 repository](https://github.com/x402-foundation/x402) for details. --- diff --git a/examples/typescript/legacy/fullstack/browser-wallet-example/client/src/App.tsx b/examples/typescript/legacy/fullstack/browser-wallet-example/client/src/App.tsx index 435e5608d5..1a7e1ef784 100644 --- a/examples/typescript/legacy/fullstack/browser-wallet-example/client/src/App.tsx +++ b/examples/typescript/legacy/fullstack/browser-wallet-example/client/src/App.tsx @@ -138,9 +138,9 @@ function App() {

{option.name}

{option.price}

{option.description}

- + {option.endpoint === '/api/pay/session' && ( -