xytara 1.27.0 → 2.1.0

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.
Files changed (48) hide show
  1. package/.env.example +22 -0
  2. package/BSV_TERANODE_SETUP.md +105 -0
  3. package/FINAL_CONTRACT.md +6 -6
  4. package/PUBLISH_PLAN.md +12 -0
  5. package/README.md +192 -6
  6. package/REAL_PAYMENT_SETUP.md +101 -0
  7. package/RELEASE_CHECKLIST.md +10 -0
  8. package/RELEASE_NOTES.md +19 -0
  9. package/SERVICE_CONTRACT.md +134 -5
  10. package/START_HERE.md +2 -0
  11. package/bin/xytara-release.js +169 -0
  12. package/bin/xytara-run.js +186 -0
  13. package/fixtures/catalog.js +107 -10
  14. package/index.js +81 -1
  15. package/integrations/dispatch.js +4 -3
  16. package/lib/account_auth.js +172 -0
  17. package/lib/announcement_pack.js +61 -0
  18. package/lib/catalog_contract.js +48 -1
  19. package/lib/catalog_views.js +19 -0
  20. package/lib/command_flow.js +188 -1
  21. package/lib/commerce_artifacts.js +34 -1
  22. package/lib/commerce_cases.js +14 -0
  23. package/lib/commerce_checkout.js +347 -0
  24. package/lib/commerce_client.js +322 -57
  25. package/lib/commerce_economics.js +782 -3
  26. package/lib/commerce_quotes.js +29 -6
  27. package/lib/commerce_reports.js +59 -6
  28. package/lib/commerce_runtime.js +68 -23
  29. package/lib/commerce_shell.js +51 -4
  30. package/lib/ecosystem_entry.js +64 -0
  31. package/lib/external_credit_bridge.js +142 -0
  32. package/lib/launch_narrative.js +53 -0
  33. package/lib/outreach_proof.js +71 -0
  34. package/lib/payment_config.js +114 -0
  35. package/lib/payment_verification.js +244 -0
  36. package/lib/publish_plan.js +51 -0
  37. package/lib/record_queries.js +1 -0
  38. package/lib/release_candidate.js +50 -0
  39. package/lib/release_center.js +115 -0
  40. package/lib/release_history.js +72 -0
  41. package/lib/release_manifest.js +114 -0
  42. package/lib/release_pack.js +454 -0
  43. package/lib/runtime_bridge.js +116 -0
  44. package/lib/runtime_state_store.js +169 -0
  45. package/lib/settlement_bsv_live.js +507 -0
  46. package/lib/settlement_bsv_teranode.js +105 -0
  47. package/package.json +14 -2
  48. package/server.js +1187 -6
package/.env.example CHANGED
@@ -1,3 +1,25 @@
1
1
  XYTARA_HOST=127.0.0.1
2
2
  XYTARA_PORT=4320
3
3
  XYTARA_BASE_URL=http://127.0.0.1:4320
4
+ XYTARA_PAYMENT_VERIFICATION_MODE=presence
5
+ XYTARA_PAYMENT_MAX_AGE_SECONDS=300
6
+ XYTARA_WALLET_REGISTRY_JSON=[]
7
+ XYTARA_TREASURY_DESTINATION_ID=
8
+ XYTARA_TREASURY_DESTINATION_KIND=
9
+ XYTARA_TREASURY_ACCOUNT_ID=
10
+ XYTARA_TREASURY_EXTERNAL_REF=
11
+ XYTARA_TREASURY_DESTINATIONS_JSON={}
12
+ XYTARA_BSV_TERANODE_NETWORK=mainnet
13
+ XYTARA_BSV_TERANODE_RPC_URL=
14
+ XYTARA_BSV_TERANODE_MODE=opreturn
15
+ XYTARA_BSV_TERANODE_REQUIRED_CONFIRMATIONS=1
16
+ XYTARA_BSV_TERANODE_MERCHANT_ADDRESS=
17
+ XYTARA_BSV_TERANODE_MERCHANT_PAYMAIL=
18
+ XYTARA_BSV_TERANODE_MERCHANT_LABEL=naxytra-runtime
19
+ XYTARA_BSV_TERANODE_USE_METANET=false
20
+ XYTARA_BSV_TERANODE_SATS_PER_USD_CENT=100
21
+ XYTARA_BSV_TERANODE_SETTLEMENT_RUNTIME_MODE=mock
22
+ XYTARA_CREDIT_BRIDGE_BEARER_TOKEN=
23
+ XYTARA_ACCOUNT_AUTH_BEARER_TOKEN=
24
+ XYTARA_STATE_FILE=
25
+ XYTARA_STATE_SNAPSHOT_INTERVAL_MS=5000
@@ -0,0 +1,105 @@
1
+ # BSV Teranode Setup
2
+
3
+ `xytara` now treats `bsv_teranode` as the native first-party settlement base for the default machine payment path.
4
+
5
+ Use this guide when you want the public package to emit BSV/Teranode-aware payment and settlement posture instead of only generic treasury bookkeeping.
6
+
7
+ ## What This Gives You
8
+
9
+ - quotes expose native `bsv_teranode` settlement hints
10
+ - signed payment payloads can carry BSV/Teranode merchant details and settlement reference data
11
+ - accepted payments and resulting receipts preserve BSV/Teranode settlement metadata
12
+ - treasury routing can point directly at a BSV/Teranode merchant address or paymail
13
+
14
+ This is still a runtime-side settlement contract, not a bundled bank or broadcaster. Real external custody still depends on the BSV/Teranode infrastructure you configure behind it.
15
+
16
+ ## Recommended Environment
17
+
18
+ ```env
19
+ XYTARA_PAYMENT_VERIFICATION_MODE=local_signed
20
+ XYTARA_BSV_TERANODE_NETWORK=mainnet
21
+ XYTARA_BSV_TERANODE_MODE=opreturn
22
+ XYTARA_BSV_TERANODE_REQUIRED_CONFIRMATIONS=1
23
+ XYTARA_BSV_TERANODE_MERCHANT_ADDRESS=
24
+ XYTARA_BSV_TERANODE_MERCHANT_PAYMAIL=
25
+ XYTARA_BSV_TERANODE_MERCHANT_LABEL=naxytra-runtime
26
+ XYTARA_BSV_TERANODE_USE_METANET=false
27
+ XYTARA_BSV_TERANODE_SATS_PER_USD_CENT=100
28
+ XYTARA_BSV_TERANODE_SETTLEMENT_RUNTIME_MODE=mock
29
+ XYTARA_BSV_TERANODE_RPC_URL=
30
+ XYTARA_BSV_TERANODE_RPC_API_KEY=
31
+ XYTARA_BSV_TERANODE_RPC_AUTH_HEADER=authorization
32
+ XYTARA_BSV_TERANODE_RPC_AUTH_SCHEME=
33
+ XYTARA_BSV_TERANODE_OBSERVER_URL=
34
+ ```
35
+
36
+ Optional:
37
+
38
+ - `XYTARA_BSV_TERANODE_SETTLEMENT_RUNTIME_MODE`
39
+ - `mock` keeps the old simulated submit/refresh loop
40
+ - `observe` accepts a payment-provided `txid` and performs real live confirmation refresh
41
+ - `arc` submits `raw_tx` through ARC and then performs real live confirmation refresh
42
+ - `XYTARA_BSV_TERANODE_RPC_URL`
43
+ - use your ARC submit endpoint, for example `https://arc.taal.com/v1/tx`
44
+ - `XYTARA_BSV_TERANODE_RPC_API_KEY`
45
+ - required when your ARC provider expects authenticated submission
46
+ - `XYTARA_BSV_TERANODE_RPC_AUTH_HEADER`
47
+ - defaults to `authorization`
48
+ - `XYTARA_BSV_TERANODE_RPC_AUTH_SCHEME`
49
+ - leave blank for TAAL-style raw API-key auth, or set `Bearer` if your provider expects it
50
+ - `XYTARA_BSV_TERANODE_OBSERVER_URL`
51
+ - optional transaction observer base; defaults to `https://api.whatsonchain.com/v1/bsv/<network>`
52
+
53
+ ## Merchant Destination Routing
54
+
55
+ If you set:
56
+
57
+ - `XYTARA_BSV_TERANODE_MERCHANT_ADDRESS`
58
+ or
59
+ - `XYTARA_BSV_TERANODE_MERCHANT_PAYMAIL`
60
+
61
+ then `xytara` can derive a BSV/Teranode treasury destination automatically for `bsv_teranode` settlement quotes.
62
+
63
+ If you need more explicit destination control, use:
64
+
65
+ - `XYTARA_TREASURY_DESTINATIONS_JSON`
66
+
67
+ with a `bsv_teranode` entry.
68
+
69
+ ## Runtime Behavior
70
+
71
+ For a native `bsv_teranode` quote:
72
+
73
+ - settlement mode defaults to `bsv_teranode`
74
+ - quote settlement hints include:
75
+ - rail
76
+ - network
77
+ - merchant address or paymail
78
+ - amount in satoshis
79
+ - settlement reference
80
+ - signed client payment payloads can carry the same BSV/Teranode hints back to the runtime
81
+ - resulting transactions/receipts preserve BSV/Teranode settlement metadata for later reconciliation and proof follow-through
82
+
83
+ For live settlement follow-through after payment acceptance, use:
84
+
85
+ - `GET /v1/settlement/bsv-teranode`
86
+ - `GET /v1/settlement/bsv-teranode/:settlement_id`
87
+ - `POST /v1/settlement/bsv-teranode/:settlement_id/submit`
88
+ - `POST /v1/settlement/bsv-teranode/:settlement_id/refresh`
89
+
90
+ If the signed payment payload already carries:
91
+
92
+ - `bsv_teranode.txid`
93
+
94
+ then `observe` mode is enough to turn `xytara` into a live confirmation tracker.
95
+
96
+ If the signed payment payload also carries:
97
+
98
+ - `bsv_teranode.raw_tx`
99
+
100
+ then `arc` mode can submit the raw transaction through ARC before refresh.
101
+
102
+ ## Notes
103
+
104
+ - `bsv_teranode` is the canonical public settlement name
105
+ - Metanet remains optional support infrastructure, not a required dependency
package/FINAL_CONTRACT.md CHANGED
@@ -20,13 +20,13 @@ It consumes and emits proof-compatible facts, but its primary job is machine com
20
20
 
21
21
  ## Public Release Stance
22
22
 
23
- This product is being prepared as a first public release from private lineage.
23
+ This product is being prepared as a first public release.
24
24
 
25
25
  That means:
26
26
 
27
- - prior internal SDK and service shapes are design history, not public obligations
27
+ - prior SDK and service experiments are design history, not public obligations
28
28
  - useful capability should be preserved where it strengthens the final product
29
- - historical private helper sprawl does not automatically define the public contract
29
+ - older helper sprawl does not automatically define the public contract
30
30
 
31
31
  The public baseline should therefore be chosen for product quality, clarity, extensibility, and end-to-end usefulness, not for backward compatibility with prior private repos.
32
32
 
@@ -464,9 +464,9 @@ The final commerce product must maintain conformance across:
464
464
  - proof integration
465
465
  - adapter certification
466
466
 
467
- ## What Must Survive From Internal Lineages
467
+ ## What Must Survive Across Earlier Product Iterations
468
468
 
469
- From the internal stack, the following semantic wins should survive:
469
+ From earlier product iterations, the following semantic wins should survive:
470
470
 
471
471
  - clean separation of execution and proof
472
472
  - clean separation of execution and settlement
@@ -476,7 +476,7 @@ From the internal stack, the following semantic wins should survive:
476
476
  - proof-backed lifecycle state
477
477
  - operator-grade visibility
478
478
 
479
- Historical internal labels and names should not survive publicly.
479
+ Historical implementation labels and temporary names should not survive publicly.
480
480
 
481
481
  ## Final Product Position
482
482
 
@@ -0,0 +1,12 @@
1
+ # xytara Publish Plan
2
+
3
+ 1. Run `npm run verify:release-candidate`.
4
+ 2. Run `npm pack --dry-run --json` and confirm the package contents.
5
+ 3. Publish with `npm publish --access public`.
6
+ 4. Redeploy the live service surfaces.
7
+ 5. Verify:
8
+ - `/v1/release-candidate/summary`
9
+ - `/v1/release-center/summary`
10
+ - `/v1/announcement-pack/summary`
11
+ - `/v1/outreach-proof/summary`
12
+ 6. Run the first public machine proof path.
package/README.md CHANGED
@@ -31,19 +31,177 @@ If you are building adapters, continue with:
31
31
  - [adapters/ONBOARDING_POSTURE.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/xytara/adapters/ONBOARDING_POSTURE.md)
32
32
  - [adapters/THIRD_PARTY_SUBMISSION_PROCESS.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/xytara/adapters/THIRD_PARTY_SUBMISSION_PROCESS.md)
33
33
 
34
+ If you are wiring the native BSV settlement base, continue with:
35
+
36
+ - [BSV_TERANODE_SETUP.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/xytara/BSV_TERANODE_SETUP.md)
37
+ - [REAL_PAYMENT_SETUP.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/xytara/REAL_PAYMENT_SETUP.md)
38
+
39
+ If you are wiring external checkout or hosted funding paths, continue with:
40
+
41
+ - [HUMAN_CHECKOUT_AND_RUNTIME_BRIDGE_PATTERN.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/HUMAN_CHECKOUT_AND_RUNTIME_BRIDGE_PATTERN.md)
42
+ - [RUNTIME_BRIDGE_CONTRACT.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/RUNTIME_BRIDGE_CONTRACT.md)
43
+ - [HOSTED_CHECKOUT_CONTRACT.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/HOSTED_CHECKOUT_CONTRACT.md)
44
+ - [CHECKOUT_TO_CREDITS_AND_DISPATCH_PLAN.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/CHECKOUT_TO_CREDITS_AND_DISPATCH_PLAN.md)
45
+
34
46
  ## Production Path
35
47
 
36
48
  The intended production-facing default path is now:
37
49
 
38
50
  1. discover a capability
39
51
  2. preview or quote the transaction path
40
- 3. execute through the default machine path
41
- 4. inspect the transaction-side result and lifecycle state
42
- 5. hand the result into `xoonya`
43
- 6. review and run the proof-side completion path
52
+ 3. spend existing credits first when the caller prefers the reusable account path
53
+ 4. fall back to direct machine payment when credits are not available or not preferred
54
+ 5. execute through the default machine path
55
+ 6. inspect the transaction-side result and lifecycle state
56
+ 7. hand the result into `xoonya`
57
+ 8. review and run the proof-side completion path
58
+
59
+ The machine-facing execution surface now also supports a first-class reusable balance posture:
60
+
61
+ - set `payment_preference: "credits_first"` on `POST /v1/commands/execute` when the caller wants to spend existing account credits before requesting a fresh payment
62
+ - default spend posture is `open_spend`: if the funded caller can pay, `xytara` should spend and execute without extra runtime ceremony
63
+ - bounded spend posture is optional and only applies when the caller intentionally uses an `agent_id` and/or `budget_id`
64
+ - inspect account credit state with `GET /v1/economics/accounts/:account_id/credit-balance`
65
+ - inspect deterministic usage metering state with `GET /v1/economics/accounts/:account_id/metering-summary`, `GET /v1/economics/accounts/:account_id/usage-meters`, and `GET /v1/economics/accounts/:account_id/usage-meters/:usage_meter_id`
66
+ - expect reconciliation and operator-export surfaces to carry the same metering trail for audit visibility
67
+ - export a canonical cross-repo economic handoff bundle with `POST /v1/economics/handoff-bundles/economic-consequence`
68
+ - expect `POST /v1/transaction-center/result-packages/export` and result-package continuation export/prepare surfaces to auto-carry that same canonical economic bundle whenever the execution path spent credits and produced a deterministic usage meter
69
+ - inspect pack-backed entitlement pools with `GET /v1/economics/accounts/:account_id/entitlements` and `GET /v1/economics/accounts/:account_id/entitlements/summary`
70
+ - inspect low-balance and replenishment posture with `GET /v1/economics/accounts/:account_id/entitlements/replenishment-summary`
71
+ - inspect one pool’s replenishment view with `GET /v1/economics/accounts/:account_id/entitlements/:entitlement_id/replenishment-view`
72
+ - inspect effective account spend posture with `GET /v1/economics/accounts/:account_id/policy-pack`
73
+ - inspect effective agent spend posture with `GET /v1/economics/accounts/:account_id/agents/:agent_id/policy-view`
74
+ - preflight a proposed credit spend with `POST /v1/economics/rails/credits/preview-spend`
75
+ - record explicit bounded credit consumption with `POST /v1/economics/rails/credits/consume`
76
+ - issue externally verified top-up grants with `POST /v1/credit-bridge/grants`
77
+ - inspect externally issued grants with `GET /v1/credit-bridge/grants` and `GET /v1/credit-bridge/grants/:grant_id`
78
+ - discover reusable funding posture through `GET /v1/credit-packs`, `GET /v1/credit-packs/summary`, and `GET /v1/credit-pack?ref=<pack_id>`
79
+ - external grant callers can now fund a named public pack such as `credits.agent`, and `xytara` will validate and record that pack identity directly
80
+
81
+ The SDK now exposes the same posture directly for agent callers:
82
+
83
+ - `client.getCreditPackSummary()`
84
+ - `client.getCreditBalance(accountId)`
85
+ - `client.previewUsageMetering({ account_id, task_ref?, workflow_ref?, units? })`
86
+ - `client.getUsageMeteringSummary(accountId)`
87
+ - `client.listUsageMeters(accountId)`
88
+ - `client.getUsageMeter(usageMeterId, accountId?)`
89
+ - `client.exportEconomicConsequenceHandoffBundle({ account_id, usage_meter_id, credit_spend_id, meter_profile_ref? })`
90
+ - `client.listEntitlements(accountId)`
91
+ - `client.getEntitlementSummary(accountId)`
92
+ - `client.getEntitlement(entitlementId, accountId?)`
93
+ - `client.getEntitlementReplenishmentSummary(accountId)`
94
+ - `client.getEntitlementReplenishmentView(entitlementId, accountId?)`
95
+ - `client.updateEntitlementReplenishmentPreference(entitlementId, payload, accountId?)`
96
+ - `client.previewCreditSpend({ account_id, task_ref, units, agent_id?, budget_id? })`
97
+ - `client.getCreditSpendPolicyPack(accountId)`
98
+ - `client.getAgentCreditSpendPolicyView(agentId, accountId?)`
99
+ - `client.executeWithCreditsFirst(payload, options?)`
100
+
101
+ The runtime now also supports a bounded delegated spend path for repeat-use automation:
102
+
103
+ - issue a spend credential through `POST /v1/account-auth/spend-credentials`
104
+ - use that credential as `authorization: Bearer <spend_credential>`
105
+ - optionally bind the credential to a `pack_id` or `entitlement_id` when spend should stay inside one value pool
106
+ - execute through the same `credits_first` path without sharing broad operator secrets
107
+ - revoke it through `POST /v1/account-auth/spend-credentials/:credential_id/revoke`
108
+
109
+ SDK helpers now include:
110
+
111
+ - `client.createSpendCredential(payload, { bearerToken })`
112
+ - `client.listSpendCredentials(filters?, { bearerToken? })`
113
+ - `client.getSpendCredential(credentialId, { bearerToken? })`
114
+ - `client.revokeSpendCredential(credentialId, payload, { bearerToken })`
115
+ - `client.executeWithSpendCredential(payload, { spendToken })`
116
+
117
+ This keeps one-off usage and repeat usage on the same public spine:
118
+
119
+ - direct pay when the caller is using the stack once
120
+ - credit balance when the caller is already funded and wants low-friction repeat execution
121
+ - optional agent and budget controls can still bound that spend without changing the execution surface
122
+
123
+ It also keeps the external funding boundary clean:
124
+
125
+ - an external merchant-facing system can verify a purchase and issue a bounded credit grant into `xytara`
126
+ - `xytara` records the granted value and consumes it during later runtime operations
127
+ - the runtime does not need to absorb provider-specific checkout semantics to support repeat usage
128
+ - in production, `POST /v1/credit-bridge/grants` should normally be protected with `XYTARA_CREDIT_BRIDGE_BEARER_TOKEN`
129
+
130
+ The first external checkout convenience path now follows a parallel narrow route:
131
+
132
+ 1. create hosted purchase intent
133
+ 2. create checkout session
134
+ 3. normalize payment success
135
+ 4. issue credits or entitlement
136
+ 5. dispatch through the runtime path when needed
137
+ 6. converge back into the same `xytara` and `xoonya` spine
138
+
139
+ The first direct hosted execution path now also has a public runtime dispatch surface:
140
+
141
+ - `POST /v1/runtime-bridge/dispatch`
142
+ - `GET /v1/runtime-bridge/dispatches`
143
+ - `GET /v1/runtime-bridge/dispatches/:request_id`
144
+
145
+ The hosted payment side is intentionally asymmetric:
146
+
147
+ - pay-in should be simple and fast
148
+ - execution and delivery should follow immediately after valid payment
149
+ - refund or reversal requests should enter review first
150
+ - no autonomous payout path should exist outside explicit operator review and completion
151
+
152
+ The operator shell now also carries hosted checkout visibility so purchase, dispatch, and refund-review load can be monitored from the same public control surface.
44
153
 
45
154
  The rest of this README explains the full surface area and milestone trail, but the public starting posture should now be understandable from that one default path.
46
155
 
156
+ For release-grade adoption posture, inspect:
157
+
158
+ - `GET /v1/release-pack`
159
+ - `GET /v1/release-pack/summary`
160
+ - `GET /v1/release-pack/comparison`
161
+ - `GET /v1/release-pack/comparison/summary`
162
+ - `GET /v1/release-pack/adoption`
163
+ - `GET /v1/release-pack/adoption/summary`
164
+ - `GET /v1/release-pack/scenarios`
165
+ - `GET /v1/release-pack/scenarios/summary`
166
+ - `GET /v1/release-pack/launch`
167
+ - `GET /v1/release-pack/launch/summary`
168
+ - `GET /v1/release-manifest`
169
+ - `GET /v1/release-manifest/summary`
170
+ - `GET /v1/release-notes`
171
+ - `GET /v1/release-notes/summary`
172
+ - `GET /v1/release-center`
173
+ - `GET /v1/release-center/summary`
174
+ - `GET /v1/release-history`
175
+ - `GET /v1/release-history/summary`
176
+ - `GET /v1/publish-plan`
177
+ - `GET /v1/publish-plan/summary`
178
+ - `GET /v1/ecosystem-entry`
179
+ - `GET /v1/ecosystem-entry/summary`
180
+ - `GET /v1/launch-narrative`
181
+ - `GET /v1/launch-narrative/summary`
182
+ - `GET /v1/outreach-proof`
183
+ - `GET /v1/outreach-proof/summary`
184
+ - `GET /v1/announcement-pack`
185
+ - `GET /v1/announcement-pack/summary`
186
+ - `GET /v1/release-candidate`
187
+ - `GET /v1/release-candidate/summary`
188
+ - `xytara-release --summary`
189
+ - `xytara-release --comparison --summary`
190
+ - `xytara-release --adoption --summary`
191
+ - `xytara-release --scenarios --summary`
192
+ - `xytara-release --launch --summary`
193
+ - `xytara-release --manifest --summary`
194
+ - `xytara-release --notes --summary`
195
+ - `xytara-release --center --summary`
196
+ - `xytara-release --history --summary`
197
+ - `xytara-release --ecosystem --summary`
198
+ - `xytara-release --narrative --summary`
199
+ - `xytara-release --outreach-proof --summary`
200
+ - `xytara-release --announcement --summary`
201
+ - `xytara-release --candidate --summary`
202
+
203
+ These surfaces package the current machine-commerce value story, first-contact CLI path, default transaction posture, catalog/task-pack coverage, credit-pack posture, and integration/settlement breadth into one machine-readable launch boundary.
204
+
47
205
  ## Commerce Loop
48
206
 
49
207
  The public product loop is:
@@ -98,7 +256,7 @@ The package and service also expose a default transaction center surface so the
98
256
 
99
257
  - default protocol lane: `mcp`
100
258
  - default payment protocol: `x402`
101
- - default settlement center: built-in chain settlement across the canonical bundled settlement modes
259
+ - default settlement center: built-in chain settlement with `bsv_teranode` as the native default across the canonical bundled settlement modes
102
260
  - default treasury landing posture: account treasury destination by settlement mode
103
261
 
104
262
  That same default center is also reflected in direct helper paths for default MCP usage, so the default path can be previewed or quoted without repeating the full integration-selection story each time.
@@ -480,6 +638,12 @@ Run:
480
638
  node examples/quickstart.js
481
639
  ```
482
640
 
641
+ For a direct one-line machine run against a live service, use the bundled CLI:
642
+
643
+ ```bash
644
+ xytara-run --url https://xytara.onrender.com --account acct_demo --command "cli-run" --task trust.verify --body-json '{"subject_id":"subject-1"}' --wallet-id merchant_wallet_main --wallet-secret YOUR_LOCAL_SIGNED_SECRET --txid YOUR_BSV_TXID
645
+ ```
646
+
483
647
  The quickstart exercises:
484
648
 
485
649
  - health and catalog
@@ -560,6 +724,16 @@ Environment example:
560
724
 
561
725
  - [`.env.example`](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/xytara/.env.example)
562
726
 
727
+ Production payment note:
728
+
729
+ - set `XYTARA_PAYMENT_VERIFICATION_MODE=local_signed` to enforce verifiable signed payment acceptance instead of plain header presence
730
+ - provide buyer wallet verification material through `XYTARA_WALLET_REGISTRY_JSON` or `XYTARA_WALLET_REGISTRY_PATH`
731
+ - set `XYTARA_TREASURY_DESTINATION_ID` and related treasury env vars so accepted payments land in your merchant treasury posture instead of the default local account placeholder
732
+ - built-in `x402` is the admission lane; real external payout/custody still depends on the payment rail and treasury destination you configure behind that lane
733
+ - for native BSV/Teranode live follow-through, set `XYTARA_BSV_TERANODE_SETTLEMENT_RUNTIME_MODE` to `observe` or `arc`
734
+ - use `XYTARA_BSV_TERANODE_RPC_URL` plus optional ARC auth envs when the live runtime needs ARC submission
735
+ - use `XYTARA_BSV_TERANODE_OBSERVER_URL` if you want to override the default live observer base
736
+
563
737
  Primary service routes:
564
738
 
565
739
  - `GET /health`
@@ -636,6 +810,7 @@ Primary service routes:
636
810
  - `GET /v1/receipts/:receipt_id`
637
811
  - `GET /v1/payment-ledger`
638
812
  - `GET /v1/payment-ledger/:payment_id`
813
+ - `GET /v1/payment-ledger/:payment_id/operator-pack`
639
814
  - `GET /v1/deliveries`
640
815
  - `GET /v1/deliveries/:delivery_id`
641
816
  - `GET /v1/disputes`
@@ -654,6 +829,7 @@ Primary service routes:
654
829
  - `GET /v1/operator-export-pack`
655
830
  - `GET /v1/operations/dashboard`
656
831
  - `GET /v1/operations/attention-records`
832
+ - `GET /v1/runtime/durability`
657
833
  - `GET /v1/operator-shell`
658
834
  - `GET /v1/operator-shell/summary`
659
835
  - `POST /v1/operator-shell/summary`
@@ -699,6 +875,8 @@ Primary service routes:
699
875
  - `GET /v1/economics/evidence/receipts/:receipt_ref`
700
876
  - `GET /v1/economics/evidence/jobs/:job_id`
701
877
  - `GET /v1/economics/integration/jobs/:job_id`
878
+ - `GET /v1/settlement/bsv-teranode/readiness`
879
+ - `GET /v1/settlement/bsv-teranode/:settlement_id/operator-pack`
702
880
 
703
881
  The Wave C coordination carry-over line adds a bounded coordination center on top of the public transaction spine:
704
882
 
@@ -718,9 +896,17 @@ The Wave F shell carry-over line adds a bounded operator shell inside public `xy
718
896
 
719
897
  - self-serve agent account issuance for the public runtime path
720
898
  - a unified operator shell summary across operations, economics, and coordination
899
+ - explicit runtime durability visibility for snapshot-backed recovery posture
900
+ - explicit native BSV/Teranode readiness visibility for merchant identity, transport, and verification posture
721
901
  - compact workflow/admin shell exports that point cleanly into proof-side follow-through when needed
722
902
 
723
- This keeps the public product centered on `naxytra` while recovering the useful operator-shell lineage as a built-in `xytara` capability instead of a separate branded surface.
903
+ This keeps the public product centered on `naxytra` while preserving the useful operator-shell capability directly inside `xytara` instead of splitting it into a separate surface.
904
+
905
+ The durability and native-settlement readiness surfaces are also intended to make the remaining production boundary explicit:
906
+
907
+ - `/v1/runtime/durability` exposes whether runtime snapshots are enabled, whether a recoverable snapshot exists yet, and any current durability blockers
908
+ - `/v1/settlement/bsv-teranode/readiness` exposes whether merchant identity, transport, verification mode, and runtime mode are production-ready, plus the next manual inputs still required
909
+ - `/v1/payment-ledger/:payment_id/operator-pack` and `/v1/settlement/bsv-teranode/:settlement_id/operator-pack` collapse payment, settlement, treasury, proof, and economic-consequence carry into one operator-facing pack so direct-pay and funded-runtime paths are easier to inspect without stitching raw records together
724
910
 
725
911
  ## Verification
726
912
 
@@ -0,0 +1,101 @@
1
+ # Real Payment Setup
2
+
3
+ This guide explains how to move `xytara` from local placeholder payment acceptance into a production-usable payment posture.
4
+
5
+ ## What Changed
6
+
7
+ `xytara` now supports two payment-acceptance modes:
8
+
9
+ - `presence`
10
+ - development/demo mode
11
+ - payment headers are required, but not cryptographically verified
12
+
13
+ - `local_signed`
14
+ - production-oriented built-in mode
15
+ - signed payment payloads are cryptographically verified against a configured wallet registry
16
+ - quote replay and nonce replay are blocked
17
+ - accepted payments are routed into your configured merchant treasury destination posture
18
+
19
+ ## Minimum Production-Oriented Configuration
20
+
21
+ Set these environment variables:
22
+
23
+ ```env
24
+ XYTARA_PAYMENT_VERIFICATION_MODE=local_signed
25
+ XYTARA_PAYMENT_MAX_AGE_SECONDS=300
26
+ XYTARA_WALLET_REGISTRY_JSON=[{"wallet_id":"<wallet-id>","secret":"<shared-secret>","account_id":"<account-id>"}]
27
+ XYTARA_TREASURY_DESTINATION_ID=merchant_treasury_primary
28
+ XYTARA_TREASURY_DESTINATION_KIND=merchant_treasury
29
+ XYTARA_TREASURY_ACCOUNT_ID=merchant-main
30
+ XYTARA_TREASURY_EXTERNAL_REF=merchant-usd-main
31
+ ```
32
+
33
+ You can also load the wallet registry and treasury map from files through:
34
+
35
+ - `XYTARA_WALLET_REGISTRY_PATH`
36
+ - `XYTARA_TREASURY_DESTINATIONS_PATH`
37
+
38
+ ## What This Gives You
39
+
40
+ With `local_signed` enabled:
41
+
42
+ - `POST /x402/commands/execute` challenges for payment
43
+ - the client signs the exact payment payload
44
+ - if the quote is using native `bsv_teranode`, the payment payload can also carry BSV/Teranode merchant and settlement-reference hints
45
+ - the server verifies:
46
+ - wallet registration
47
+ - HMAC signature validity
48
+ - quote id
49
+ - amount
50
+ - currency
51
+ - settlement binding
52
+ - timestamp freshness
53
+ - nonce uniqueness
54
+ - accepted payments are recorded into:
55
+ - `payment-ledger`
56
+ - `treasury-summary`
57
+ - `rail-summary`
58
+ - `reconciliation-report`
59
+
60
+ ## What It Does Not Do By Itself
61
+
62
+ The built-in path gives you verifiable payment acceptance and merchant treasury routing posture inside `xytara`.
63
+
64
+ It does not by itself:
65
+
66
+ - move fiat into a bank account
67
+ - broadcast on-chain settlement
68
+ - replace an external processor or custodian
69
+
70
+ For actual external custody, connect `xytara` to the real rail you want behind the payment and settlement boundary.
71
+
72
+ That is where:
73
+
74
+ - your payment rail integration
75
+ - your settlement integration
76
+ - your merchant treasury destination
77
+
78
+ become the actual real-world landing point for accepted funds.
79
+
80
+ ## Best Current Public Model
81
+
82
+ Use the stack like this:
83
+
84
+ - `x402` route = payment admission lane
85
+ - `local_signed` = real verifiable acceptance posture in the public package
86
+ - `bsv_teranode` = native first-party settlement base when you want the public stack to expose BSV/Teranode-aware payout posture
87
+ - configured treasury destination = merchant-facing landing posture in the runtime
88
+ - external rail / settlement integration = actual custody and payout layer
89
+
90
+ If you want the native BSV path specifically, continue with [BSV_TERANODE_SETUP.md](C:/Users/Yoga/Desktop/workspace/vscode_workspace_public/naxytra/xytara/BSV_TERANODE_SETUP.md).
91
+
92
+ ## Operator Visibility
93
+
94
+ After acceptance, inspect:
95
+
96
+ - `GET /v1/payment-ledger`
97
+ - `GET /v1/economics/accounts/:account_id/treasury-summary`
98
+ - `GET /v1/economics/accounts/:account_id/rail-summary`
99
+ - `GET /v1/reconciliation-report`
100
+
101
+ These tell you what was accepted, where it was routed in the runtime model, and what still needs reconciliation against the underlying real-world rail.
@@ -0,0 +1,10 @@
1
+ # xytara Release Checklist
2
+
3
+ 1. Run `npm run verify:release-candidate`.
4
+ 2. Confirm `npm pack --dry-run --json` includes the public docs and both CLI entrypoints.
5
+ 3. Redeploy the service and verify:
6
+ - `/v1/release-center/summary`
7
+ - `/v1/announcement-pack/summary`
8
+ - `/v1/outreach-proof/summary`
9
+ 4. Run the first public proof path.
10
+ 5. Only then publish the npm package.
@@ -0,0 +1,19 @@
1
+ # xytara 2.1.0 Release Notes
2
+
3
+ `xytara` 2.1.0 is the public machine-commerce release-candidate line.
4
+
5
+ Highlights:
6
+
7
+ - direct one-line machine execution with `xytara-run`
8
+ - release, comparison, adoption, scenario, and launch packs over HTTP and CLI
9
+ - release-center, announcement-pack, and release-candidate surfaces for public launch readiness
10
+ - credits-first reusable spend posture
11
+ - native settlement-aware runtime inspection
12
+ - proof-compatible handoff into `xoonya`
13
+
14
+ Recommended first checks:
15
+
16
+ 1. `npm install xytara`
17
+ 2. `xytara-release --candidate --summary`
18
+ 3. `npm run verify:release-candidate`
19
+ 4. inspect `/v1/release-candidate/summary` on the deployed service