xytara 3.1.3 → 3.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -65,6 +65,29 @@ mode with `XYTARA_X402_ACCEPTS_JSON` set, and credits persist only when runtime
65
65
  persistence (`XYTARA_SUPABASE_*` or `XYTARA_STATE_FILE`) is configured. A runnable buyer is in
66
66
  `services/mcp-execution-target/buyer-demo/x402-credits-topup-demo.js`.
67
67
 
68
+ ### Going to Base mainnet (real USDC)
69
+
70
+ Base Sepolia uses test USDC. To accept real value, advertise a Base mainnet profile and
71
+ settle it through a mainnet-capable facilitator.
72
+
73
+ Important: the default `https://x402.org/facilitator` settles **Base Sepolia only** (its
74
+ `/supported` list has no `eip155:8453`). Pointing a mainnet `accepts` entry at it fails
75
+ closed and the route is unpayable. For mainnet you need a mainnet-capable facilitator, such
76
+ as Coinbase CDP (`https://api.cdp.coinbase.com/platform/v2/x402`), which requires a CDP API
77
+ key passed as auth:
78
+
79
+ ```env
80
+ # advertise mainnet (real USDC on Base); you can keep a Sepolia entry in the array too
81
+ XYTARA_X402_ACCEPTS_JSON=[{"scheme":"exact","network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"10000","payTo":"<your-evm-address>","extra":{"name":"USDC","version":"2"},"maxTimeoutSeconds":60}]
82
+ # a mainnet-capable facilitator (CDP shown) and its auth header:
83
+ XYTARA_X402_FACILITATOR_URL=https://api.cdp.coinbase.com/platform/v2/x402
84
+ XYTARA_X402_FACILITATOR_HEADERS_JSON={"Authorization":"Bearer <cdp-access-token>"}
85
+ ```
86
+
87
+ `amount` is in the asset's base units (USDC has 6 decimals, so `10000` = 0.01 USDC). Confirm
88
+ your facilitator lists `eip155:8453` in its `/supported` response before advertising it, and
89
+ remember that once mainnet is live, buyers spend real USDC.
90
+
68
91
  ## Minimum Production-Oriented Configuration
69
92
 
70
93
  Set these environment variables:
package/RELEASE_NOTES.md CHANGED
@@ -1,16 +1,9 @@
1
- `xytara` 3.1.3 makes runtime credits self-serve: a buyer can turn a single x402 payment into spendable credit with no operator grant.
1
+ `xytara` 3.1.4 makes the self-serve credits capability discoverable and documents the path to Base mainnet.
2
2
 
3
- This builds on the `x402_facilitator` on-chain settlement mode. Until now, credits could only be minted by an operator; a paying agent still needed someone to grant it a balance. This release closes that gap so the pay-and-use loop is fully autonomous.
3
+ This is a discovery and documentation release on top of the self-serve credits shipped earlier in the line. No existing behavior changes.
4
4
 
5
5
  Highlights:
6
6
 
7
- - adds `POST /x402/credits/topup`: pay once with x402 and the facilitator settles the payment on-chain, then the runtime mints the credits to the account and returns the grant, the new balance, and a `PAYMENT-RESPONSE` settlement receipt
8
- - without a payment the route returns a `402` advertising the same `accepts` plus `credits_per_topup`, so a buyer discovers the price and the credit it buys before paying
9
- - credits land on `account_id` from the request body, falling back to the paying wallet address
10
- - idempotent by the payment nonce: re-sending the same settled payment never mints credits twice
11
- - each top-up grants `XYTARA_X402_TOPUP_UNITS` credit units (default `1000`), unless the matched `accepts` entry sets its own `extra.credits`
12
- - live only in `x402_facilitator` mode with `accepts` configured; fails closed if the facilitator is unreachable or the payment does not settle
13
- - extends `npm run verify:x402-facilitator` with the unpaid-challenge, paid-mint, and replay-idempotency cases for the new route
14
- - adds a runnable buyer, `services/mcp-execution-target/buyer-demo/x402-credits-topup-demo.js`, and documents the route in `REAL_PAYMENT_SETUP.md`
15
-
16
- No existing path changes: the per-call x402 routes, native lanes, and operator credit grants all behave exactly as before.
7
+ - the x402 lane summary (`/v1/x402/summary`) and lane pack now advertise `credits_topup_ref` (`/x402/credits/topup`) and a `self_serve_credits` first-run flow, so agents discovering the runtime see the pay-once-get-credits path alongside direct command execution and paid MCP tooling
8
+ - documents going to Base mainnet in `REAL_PAYMENT_SETUP.md`: the mainnet `accepts` profile (real USDC on `eip155:8453`) and the requirement for a mainnet-capable facilitator, since the default `x402.org` facilitator settles Base Sepolia only
9
+ - no change to payment verification, settlement, the credits ledger, or any existing route
@@ -6,9 +6,9 @@
6
6
  "source_ref": "spine.job.commitment",
7
7
  "committed_ref": "transaction.job.commitment",
8
8
  "precommit_pack_ref": "precommit.job.commitment.readiness",
9
- "transaction_id": "txn_c3db568e78ec",
10
- "receipt_id": "rcpt_fc14a1bfa4b5",
11
- "proof_ref": "proof_rcpt_fc14a1bfa4b5",
9
+ "transaction_id": "txn_01b29e65db7d",
10
+ "receipt_id": "rcpt_b40aa20be45e",
11
+ "proof_ref": "proof_rcpt_b40aa20be45e",
12
12
  "payment_protocol": "x402",
13
13
  "settlement_mode": "evm_payment",
14
14
  "treasury_destination_id": "treasury_acct_demo",
@@ -36,6 +36,7 @@ function buildX402LanePack() {
36
36
  quote_detail_ref_template: "/v1/payment-quotes/:quote_id",
37
37
  command_execute_ref: "/x402/commands/execute",
38
38
  mcp_paid_invoke_ref: "/x402/mcp/tools/invoke",
39
+ credits_topup_ref: "/x402/credits/topup",
39
40
  payment_ledger_ref: "/v1/payment-ledger",
40
41
  native_settlement_ref: "/v1/settlement/bsv-teranode",
41
42
  native_settlement_readiness_ref: "/v1/settlement/bsv-teranode/readiness",
@@ -74,6 +75,21 @@ function buildX402LanePack() {
74
75
  paid_invoke_ref: "/x402/mcp/tools/invoke",
75
76
  settlement_ref: "/v1/settlement/bsv-teranode"
76
77
  }
78
+ },
79
+ {
80
+ flow_ref: "x402.self_serve_credits",
81
+ recommended_reason: "pay once with x402 and receive spendable runtime credits, with no operator grant",
82
+ sequence: [
83
+ "request_topup_without_payment",
84
+ "receive_x402_challenge_with_credits_per_topup",
85
+ "pay_and_mint_credits",
86
+ "spend_credits_on_subsequent_calls"
87
+ ],
88
+ example_surfaces: {
89
+ credits_topup_ref: "/x402/credits/topup",
90
+ command_execute_ref: "/x402/commands/execute",
91
+ payment_ledger_ref: "/v1/payment-ledger"
92
+ }
77
93
  }
78
94
  ],
79
95
  settlement_posture: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xytara",
3
- "version": "3.1.3",
3
+ "version": "3.1.4",
4
4
  "description": "Agent-commerce runtime for quote, pay, execute, deliver, meter, and integrate.",
5
5
  "main": "index.js",
6
6
  "bin": {