xytara 3.1.9 → 3.1.11
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.
- package/.env.example +61 -1
- package/README.md +74 -1192
- package/REAL_PAYMENT_SETUP.md +313 -313
- package/RELEASE_NOTES.md +8 -6
- package/START_HERE.md +272 -272
- package/XT1_EXECUTION_TRUTH_STANDARD.md +1 -1
- package/adapters/AUTHORING_GUIDE.md +28 -28
- package/adapters/ONBOARDING_POSTURE.md +1 -1
- package/lib/capability_execution_truth.js +8 -4
- package/lib/command_flow.js +74 -8
- package/lib/external_execution_policy.js +143 -0
- package/lib/external_execution_runtime.js +75 -17
- package/lib/provider_network_contract.js +14 -9
- package/lib/provider_payout_execution.js +20 -2
- package/lib/provider_registry.js +186 -10
- package/package.json +9 -3
- package/scripts/verify_external_execution_retry.js +27 -0
- package/scripts/verify_provider_network.js +224 -3
- package/server.js +32 -6
- package/examples/generated.carried-handoff.json +0 -30
package/.env.example
CHANGED
|
@@ -17,6 +17,7 @@ XYTARA_X402_TOPUP_UNITS=1000
|
|
|
17
17
|
# The runtime mints a fresh CDP Bearer JWT per request when both are set.
|
|
18
18
|
CDP_API_KEY_ID=
|
|
19
19
|
CDP_API_KEY_SECRET=
|
|
20
|
+
# (XYTARA_X402_CDP_KEY_ID / XYTARA_X402_CDP_KEY_SECRET are accepted as aliases for the two above)
|
|
20
21
|
XYTARA_PAYMENT_MAX_AGE_SECONDS=300
|
|
21
22
|
XYTARA_WALLET_REGISTRY_JSON=[]
|
|
22
23
|
XYTARA_TREASURY_DESTINATION_ID=
|
|
@@ -24,6 +25,9 @@ XYTARA_TREASURY_DESTINATION_KIND=
|
|
|
24
25
|
XYTARA_TREASURY_ACCOUNT_ID=
|
|
25
26
|
XYTARA_TREASURY_EXTERNAL_REF=
|
|
26
27
|
XYTARA_TREASURY_DESTINATIONS_JSON={}
|
|
28
|
+
# optional file-backed alternatives to the two *_JSON values above (blank = use the JSON values)
|
|
29
|
+
XYTARA_WALLET_REGISTRY_PATH=
|
|
30
|
+
XYTARA_TREASURY_DESTINATIONS_PATH=
|
|
27
31
|
XYTARA_BSV_TERANODE_NETWORK=mainnet
|
|
28
32
|
XYTARA_BSV_TERANODE_RPC_URL=
|
|
29
33
|
XYTARA_BSV_TERANODE_MODE=opreturn
|
|
@@ -37,6 +41,18 @@ XYTARA_BSV_TERANODE_SETTLEMENT_RUNTIME_MODE=mock
|
|
|
37
41
|
# operator write surfaces fail closed until both tokens are set
|
|
38
42
|
XYTARA_CREDIT_BRIDGE_BEARER_TOKEN=
|
|
39
43
|
XYTARA_ACCOUNT_AUTH_BEARER_TOKEN=
|
|
44
|
+
# commerce-bridge write surface (distinct from the credit bridge); also fails closed until set
|
|
45
|
+
XYTARA_COMMERCE_BRIDGE_BEARER_TOKEN=
|
|
46
|
+
# optional: require spend-proof binding on spend-credential use (blank = runtime default)
|
|
47
|
+
XYTARA_REQUIRE_SPEND_PROOF_BINDING=
|
|
48
|
+
# hosted-checkout webhook verification (blank = runtime defaults; set the secret before going live)
|
|
49
|
+
XYTARA_CHECKOUT_WEBHOOK_SECRET=
|
|
50
|
+
XYTARA_HOSTED_CHECKOUT_WEBHOOK_SECRET=
|
|
51
|
+
XYTARA_CHECKOUT_WEBHOOK_VERIFICATION_REQUIRED=
|
|
52
|
+
XYTARA_CHECKOUT_WEBHOOK_MAX_AGE_SECONDS=
|
|
53
|
+
# optional commerce pack map / prep TTL overrides (blank = runtime defaults)
|
|
54
|
+
XYTARA_COMMERCE_PACK_MAP_JSON=
|
|
55
|
+
XYTARA_COMMERCE_PREP_TTL_MS=
|
|
40
56
|
XYTARA_CALLBACK_DELIVERY_ENABLED=true
|
|
41
57
|
XYTARA_CALLBACK_SIGNING_SECRET=
|
|
42
58
|
XYTARA_CALLBACK_TIMEOUT_MS=5000
|
|
@@ -47,10 +63,52 @@ XYTARA_SETTLEMENT_REFRESH_INTERVAL_MS=1500
|
|
|
47
63
|
XYTARA_RATE_LIMIT_ENABLED=true
|
|
48
64
|
XYTARA_RATE_LIMIT_WINDOW_MS=60000
|
|
49
65
|
XYTARA_RATE_LIMIT_MAX_REQUESTS=600
|
|
50
|
-
|
|
66
|
+
# optional: scope the rate limit per route instead of globally (blank = runtime default)
|
|
67
|
+
XYTARA_RATE_LIMIT_ROUTE_SCOPED=
|
|
68
|
+
XYTARA_REQUEST_TIMEOUT_MS=30000
|
|
69
|
+
XYTARA_HEADERS_TIMEOUT_MS=15000
|
|
51
70
|
XYTARA_EXECUTION_TARGETS_JSON=[]
|
|
71
|
+
# External execution (env targets + registered providers). Cold-start ride-out retries ONLY on
|
|
72
|
+
# not-processed signals (408/429/503, connection refused/DNS). The budget is the TOTAL wall-clock for
|
|
73
|
+
# one buyer call across all retries AND failover candidates, kept inside the ~60s x402 authorization
|
|
74
|
+
# window so a ridden-out call still settles. Per-target timeout_ms is capped at 30000 for the same reason.
|
|
75
|
+
XYTARA_EXTERNAL_EXECUTION_RETRY_WINDOW_MS=45000
|
|
76
|
+
XYTARA_EXTERNAL_EXECUTION_MAX_RETRIES=29
|
|
77
|
+
XYTARA_EXTERNAL_EXECUTION_BUDGET_MS=50000
|
|
78
|
+
# Open execution-provider network (lib/provider_registry.js): providers self-register an endpoint +
|
|
79
|
+
# the capabilities they serve; the runtime routes paid calls to ACTIVE providers and splits revenue.
|
|
80
|
+
# Registration FAILS CLOSED until the bearer is set, UNLESS open registration is turned on. Every
|
|
81
|
+
# provider still lands pending until an operator activates it (the vetting gate). See the live
|
|
82
|
+
# machine contract at GET /v1/provider-network/contract.
|
|
83
|
+
XYTARA_PROVIDER_REGISTRY_BEARER_TOKEN=
|
|
84
|
+
# 1 = permissionless self-registration (no bearer); still rate-limited + pending-capped.
|
|
85
|
+
XYTARA_PROVIDER_OPEN_REGISTRATION=0
|
|
86
|
+
XYTARA_PROVIDER_REGISTRATION_RATE_PER_MIN=5
|
|
87
|
+
XYTARA_PROVIDER_REGISTRATION_RATE_GLOBAL_PER_MIN=60
|
|
88
|
+
XYTARA_PROVIDER_MAX_PENDING=100
|
|
89
|
+
# provider endpoint policy: strict (default when RENDER is set) = https only + no loopback/private/
|
|
90
|
+
# link-local/metadata hosts, re-checked by DNS at dispatch; permissive (default locally) for dev/tests
|
|
91
|
+
XYTARA_PROVIDER_ENDPOINT_POLICY=
|
|
92
|
+
# cap on a provider's revenue share, basis points (10000 = 100%)
|
|
93
|
+
XYTARA_PROVIDER_MAX_REVENUE_SHARE_BPS=10000
|
|
94
|
+
# health/failover: consecutive failures -> unhealthy; cooldown before a half-open retry; max candidates tried
|
|
95
|
+
XYTARA_PROVIDER_UNHEALTHY_THRESHOLD=3
|
|
96
|
+
XYTARA_PROVIDER_UNHEALTHY_COOLDOWN_MS=60000
|
|
97
|
+
XYTARA_PROVIDER_FAILOVER_MAX=3
|
|
98
|
+
# routing reputation recency decay, factor in (0,1): fades older observations so recent performance
|
|
99
|
+
# weighs more. 1 (default) = no decay (lifetime counts). e.g. 0.95 once the network has real history.
|
|
100
|
+
XYTARA_PROVIDER_REPUTATION_DECAY=1
|
|
101
|
+
# Provider payout auto-execution via an EXTERNAL signer (the runtime stays key-less). OFF unless the
|
|
102
|
+
# URL is set; otherwise payouts are recorded and the operator sends + confirms them. See services/payout-signer.
|
|
103
|
+
XYTARA_PAYOUT_SIGNER_URL=
|
|
104
|
+
XYTARA_PAYOUT_SIGNER_BEARER=
|
|
105
|
+
XYTARA_PAYOUT_SIGNER_TIMEOUT_MS=20000
|
|
52
106
|
XYTARA_L402_ENABLED=false
|
|
53
107
|
XYTARA_L402_SHARED_SECRET=
|
|
108
|
+
# optional L402 tuning (blank = runtime defaults)
|
|
109
|
+
XYTARA_L402_MAX_AGE_SECONDS=
|
|
110
|
+
XYTARA_L402_INVOICE_RATE_PER_MIN=
|
|
111
|
+
XYTARA_L402_INVOICE_RATE_GLOBAL_PER_MIN=
|
|
54
112
|
XYTARA_BOLT_ENABLED=false
|
|
55
113
|
XYTARA_BOLT_SHARED_SECRET=
|
|
56
114
|
XYTARA_BOLT_NETWORK=mainnet
|
|
@@ -61,6 +119,8 @@ XYTARA_MPP_SHARED_SECRET=
|
|
|
61
119
|
XYTARA_MPP_PROVIDER=stripe_tempo_compatible
|
|
62
120
|
XYTARA_MPP_SETTLEMENT_FAMILY=cards_or_stablecoin_or_lightning
|
|
63
121
|
XYTARA_MPP_MAX_AGE_SECONDS=300
|
|
122
|
+
# optional minimum MPP amount in minor units (blank = runtime default)
|
|
123
|
+
XYTARA_MPP_MIN_AMOUNT_MINOR=
|
|
64
124
|
XYTARA_NETWORK_DNS_RESULT_ORDER=verbatim
|
|
65
125
|
XYTARA_NETWORK_PREFERRED_IP_FAMILY=auto
|
|
66
126
|
XYTARA_EXTERNAL_EXECUTION_IP_FAMILY=auto
|