@astrasyncai/verification-gateway 5.19.0 → 5.21.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 (111) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/README.md +53 -4
  3. package/dist/adapter-interface/interface.d.mts +2 -2
  4. package/dist/adapter-interface/interface.d.ts +2 -2
  5. package/dist/adapters/express.d.mts +1 -1
  6. package/dist/adapters/express.d.ts +1 -1
  7. package/dist/adapters/express.js +65 -16
  8. package/dist/adapters/express.js.map +1 -1
  9. package/dist/adapters/express.mjs +65 -16
  10. package/dist/adapters/express.mjs.map +1 -1
  11. package/dist/adapters/mcp.d.mts +23 -1
  12. package/dist/adapters/mcp.d.ts +23 -1
  13. package/dist/adapters/mcp.js +91 -16
  14. package/dist/adapters/mcp.js.map +1 -1
  15. package/dist/adapters/mcp.mjs +91 -16
  16. package/dist/adapters/mcp.mjs.map +1 -1
  17. package/dist/adapters/nextjs.d.mts +1 -1
  18. package/dist/adapters/nextjs.d.ts +1 -1
  19. package/dist/adapters/nextjs.js +57 -11
  20. package/dist/adapters/nextjs.js.map +1 -1
  21. package/dist/adapters/nextjs.mjs +57 -11
  22. package/dist/adapters/nextjs.mjs.map +1 -1
  23. package/dist/adapters/sdk.d.mts +35 -2
  24. package/dist/adapters/sdk.d.ts +35 -2
  25. package/dist/adapters/sdk.js +110 -11
  26. package/dist/adapters/sdk.js.map +1 -1
  27. package/dist/adapters/sdk.mjs +110 -11
  28. package/dist/adapters/sdk.mjs.map +1 -1
  29. package/dist/agent/index.d.mts +1 -1
  30. package/dist/agent/index.d.ts +1 -1
  31. package/dist/agent/index.js +1 -1
  32. package/dist/agent/index.js.map +1 -1
  33. package/dist/agent/index.mjs +1 -1
  34. package/dist/agent/index.mjs.map +1 -1
  35. package/dist/bin/astrasync-claude-hook.js +50 -12
  36. package/dist/bin/astrasync-codex-hook.js +50 -12
  37. package/dist/bin/astrasync-guard.js +50 -12
  38. package/dist/bin/astrasync.js +65 -13
  39. package/dist/browser/background.js +50 -12
  40. package/dist/browser/background.js.map +1 -1
  41. package/dist/browser/background.mjs +50 -12
  42. package/dist/browser/background.mjs.map +1 -1
  43. package/dist/cli/index.js +1 -1
  44. package/dist/cli/index.js.map +1 -1
  45. package/dist/cli/index.mjs +1 -1
  46. package/dist/cli/index.mjs.map +1 -1
  47. package/dist/codex/index.js +50 -12
  48. package/dist/codex/index.js.map +1 -1
  49. package/dist/codex/index.mjs +50 -12
  50. package/dist/codex/index.mjs.map +1 -1
  51. package/dist/cursor/extension.js +50 -12
  52. package/dist/cursor/extension.js.map +1 -1
  53. package/dist/cursor/extension.mjs +50 -12
  54. package/dist/cursor/extension.mjs.map +1 -1
  55. package/dist/edge-config.d.mts +1 -1
  56. package/dist/edge-config.d.ts +1 -1
  57. package/dist/edge-config.js +1 -1
  58. package/dist/edge-config.js.map +1 -1
  59. package/dist/edge-config.mjs +1 -1
  60. package/dist/edge-config.mjs.map +1 -1
  61. package/dist/edge-core/index.d.mts +1 -1
  62. package/dist/edge-core/index.d.ts +1 -1
  63. package/dist/edge-core/index.js +49 -11
  64. package/dist/edge-core/index.js.map +1 -1
  65. package/dist/edge-core/index.mjs +49 -11
  66. package/dist/edge-core/index.mjs.map +1 -1
  67. package/dist/gateway/gateway.d.mts +2 -2
  68. package/dist/gateway/gateway.d.ts +2 -2
  69. package/dist/gateway/gateway.js +50 -12
  70. package/dist/gateway/gateway.js.map +1 -1
  71. package/dist/gateway/gateway.mjs +50 -12
  72. package/dist/gateway/gateway.mjs.map +1 -1
  73. package/dist/git-trigger/git-hooks.d.mts +1 -1
  74. package/dist/git-trigger/git-hooks.d.ts +1 -1
  75. package/dist/index.d.mts +286 -8
  76. package/dist/index.d.ts +286 -8
  77. package/dist/index.js +532 -49
  78. package/dist/index.js.map +1 -1
  79. package/dist/index.mjs +522 -49
  80. package/dist/index.mjs.map +1 -1
  81. package/dist/local-evaluator/evaluator.d.mts +2 -2
  82. package/dist/local-evaluator/evaluator.d.ts +2 -2
  83. package/dist/registration/index.d.mts +11 -2
  84. package/dist/registration/index.d.ts +11 -2
  85. package/dist/registration/index.js +1 -1
  86. package/dist/registration/index.js.map +1 -1
  87. package/dist/registration/index.mjs +1 -1
  88. package/dist/registration/index.mjs.map +1 -1
  89. package/dist/transport/index.d.mts +1 -1
  90. package/dist/transport/index.d.ts +1 -1
  91. package/dist/transport/index.js +1 -1
  92. package/dist/transport/index.js.map +1 -1
  93. package/dist/transport/index.mjs +1 -1
  94. package/dist/transport/index.mjs.map +1 -1
  95. package/dist/{types-BoGjyon0.d.mts → types-B4zhOAlq.d.mts} +30 -1
  96. package/dist/{types-BRz2U0Pn.d.ts → types-B_HLhZ9n.d.ts} +1 -1
  97. package/dist/{types-BfILnheI.d.mts → types-CU17R4Nr.d.mts} +11 -0
  98. package/dist/{types-BfILnheI.d.ts → types-CU17R4Nr.d.ts} +11 -0
  99. package/dist/{types-eWyZuz-3.d.ts → types-CtBXnWuV.d.ts} +30 -1
  100. package/dist/{types-DqWPkiYl.d.mts → types-DHHyXtuZ.d.mts} +30 -1
  101. package/dist/{types-DqWPkiYl.d.ts → types-DHHyXtuZ.d.ts} +30 -1
  102. package/dist/{types-CfBpm3w5.d.mts → types-Djpz-L0w.d.mts} +1 -1
  103. package/dist/ui/index.d.mts +1 -1
  104. package/dist/ui/index.d.ts +1 -1
  105. package/dist/verify.d.mts +28 -3
  106. package/dist/verify.d.ts +28 -3
  107. package/dist/verify.js +71 -11
  108. package/dist/verify.js.map +1 -1
  109. package/dist/verify.mjs +69 -11
  110. package/dist/verify.mjs.map +1 -1
  111. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -243,6 +243,17 @@ interface GatewayConfig {
243
243
  debug?: boolean;
244
244
  /** Custom headers to send with verification requests */
245
245
  customHeaders?: Record<string, string>;
246
+ /**
247
+ * 5.20.0: proof that this caller may act as the agent, sent as
248
+ * `actingProof` in the verify-access body. Honoured only from a
249
+ * first-party AstraSync service caller (the bridge): the backend checks the
250
+ * connector's OAuth access token and records a `connector_owner` proof when
251
+ * its owner owns the agent. Ignored for any other key. A verify carrying it
252
+ * is never served from, or written to, the verdict cache.
253
+ */
254
+ actingProof?: {
255
+ connectorToken: string;
256
+ };
246
257
  /** This counterparty's URL (sent with verify-access requests for analytics) */
247
258
  counterpartyUrl?: string;
248
259
  /** This counterparty's type (sent with verify-access requests for analytics) */
@@ -549,7 +560,9 @@ interface StepUpApprovalInfo {
549
560
  * Lifecycle states of a step-up approval row (mirrors the backend's
550
561
  * step_up_approval_status_check constraint).
551
562
  */
552
- type StepUpApprovalStatus = 'pending' | 'approved' | 'denied' | 'expired' | 'consumed';
563
+ type StepUpApprovalStatus = 'pending' | 'approved' | 'denied' | 'expired' | 'consumed'
564
+ /** 5.20.0: approved but never redeemed inside the redemption window. */
565
+ | 'lapsed';
553
566
  /**
554
567
  * Terminal outcome of a hold-and-poll wait: any non-pending status, or
555
568
  * 'timeout' when the hold budget ran out while the approval was still pending.
@@ -741,6 +754,12 @@ interface VerificationResult {
741
754
  * (steer the user to add one via onboarding).
742
755
  */
743
756
  settlementOutcome?: SettlementOutcomeInfo;
757
+ /**
758
+ * 5.20.0 (round 29.1): non-fatal integration warnings for the caller —
759
+ * e.g. `events_url_missing` when a kit's held confirm is on an endpoint with
760
+ * no Events URL (the kit would never hear the owner's decision).
761
+ */
762
+ warnings?: VerificationWarning[];
744
763
  /**
745
764
  * Card settlement token. Present on a card purchase at a first-party
746
765
  * storefront (our Stripe tenant) — 5.14.1: always, there is no charge-here
@@ -941,6 +960,11 @@ interface CheckoutMetadata {
941
960
  /** The kit's own checkout session id (`chk_…` / `cs_…`). */
942
961
  kitSessionId?: string;
943
962
  protocol?: 'ucp' | 'acp';
963
+ /**
964
+ * 5.21.0: the card issuer programme whose cardholder price the cart carries;
965
+ * AstraSync refuses the purchase unless the buyer is that programme's cardholder.
966
+ */
967
+ issuerProgram?: string;
944
968
  }
945
969
  /** 5.19.0 — see {@link VerificationRequest.purposeSource}. */
946
970
  type PurposeSource = 'route_config' | 'header' | 'body' | 'default';
@@ -1658,6 +1682,11 @@ interface AstraSyncAepEvidence {
1658
1682
  platform_countersignature: string;
1659
1683
  }>;
1660
1684
  }
1685
+ /** 5.20.0: a non-fatal warning on a verify-access result (see `warnings`). */
1686
+ interface VerificationWarning {
1687
+ code: string;
1688
+ message: string;
1689
+ }
1661
1690
 
1662
1691
  /**
1663
1692
  * AstraSync Universal Verification Gateway — Trust Level helpers.
@@ -1689,7 +1718,8 @@ declare function getTrustLevel(score: number): TrustLevel;
1689
1718
  */
1690
1719
 
1691
1720
  /**
1692
- * Clear the verification cache
1721
+ * Clear the verification cache, and (5.20.0) forget in-flight single-flight
1722
+ * calls so a later identical request reaches the backend on its own.
1693
1723
  */
1694
1724
  declare function clearCache(): void;
1695
1725
  /**
@@ -1717,6 +1747,24 @@ interface VerifyOptions {
1717
1747
  * Main verification function
1718
1748
  */
1719
1749
  declare function verify(config: GatewayConfig, request: VerificationRequest, options?: VerifyOptions): Promise<VerificationResult>;
1750
+ /**
1751
+ * Whether `result` was served from the verdict cache or shared from a
1752
+ * concurrent identical call (5.20.0). The adapters skip the decision POST for
1753
+ * these: the session already has its decision from the call that created it.
1754
+ */
1755
+ declare function isSharedVerdict(result: VerificationResult): boolean;
1756
+ type VerificationListener = (result: VerificationResult, request: VerificationRequest) => void;
1757
+ /**
1758
+ * 5.20.0: observe every verdict this process fetched from verify-access
1759
+ * (cache hits and single-flight followers are not repeated). Listeners run
1760
+ * synchronously after the result is built and must not throw (a throw is
1761
+ * swallowed). Returns an unsubscribe function.
1762
+ *
1763
+ * The MCP bridge uses it to size its per-agent rate limit from the trust
1764
+ * score its tools' own verifies return, instead of paying for a second
1765
+ * verify-access call in the gate.
1766
+ */
1767
+ declare function onVerificationResult(listener: VerificationListener): () => void;
1720
1768
  /**
1721
1769
  * Report post-hoc consideration/outcome data for an attempt chain (Trust
1722
1770
  * Record). Use when the signal never reached verify-access: a
@@ -1750,6 +1798,12 @@ declare function fetchRoutes(config: GatewayConfig, counterpartyId: string, opti
1750
1798
  * here can only add checks".
1751
1799
  */
1752
1800
  codeGates?: string[];
1801
+ /**
1802
+ * 5.20.0: called with the endpoint's `counterpartyType` when the routes
1803
+ * response carries it (backend round 29.1+). The MCP middleware uses it
1804
+ * to warn when it is pointed at a non-`mcp_server` endpoint.
1805
+ */
1806
+ onEndpointType?: (counterpartyType: string) => void;
1753
1807
  }): Promise<RouteAccessConfigShape[] | null>;
1754
1808
  /**
1755
1809
  * Minimal shape of an EndpointRoute as the SDK consumes it. Mirrors the
@@ -2274,6 +2328,25 @@ declare class VerificationGatewayClient {
2274
2328
  status: string;
2275
2329
  alreadySettled?: boolean;
2276
2330
  }>;
2331
+ /**
2332
+ * 5.20.0 (round 29.1): ask AstraSync to send ONE signed step-up event to the
2333
+ * endpoint's Events URL now — `POST /api/endpoints/:id/events/test`.
2334
+ * Delivered synchronously, outside the event outbox (random `eventId`, no
2335
+ * retries), signed with the endpoint's webhook secret like a real event.
2336
+ * The payload is synthetic (`approvalId: "test_…"`); a kit acknowledges and
2337
+ * ignores it.
2338
+ *
2339
+ * 5.21.0 (shops' item 48): synthetic only. Sending a real held approval's
2340
+ * payload (which releases or re-drives that checkout) is dashboard-only, so
2341
+ * a leaked API key can't do it.
2342
+ *
2343
+ * Resolves even when your endpoint refused the event (`delivered: false`,
2344
+ * with `responseCode` / `error`).
2345
+ */
2346
+ sendTestEvent(endpointId: string | undefined, options: {
2347
+ type: TestEventType;
2348
+ }): Promise<TestEventResult>;
2349
+ private endpointCall;
2277
2350
  /**
2278
2351
  * Quick verification — checks credentials and policy in one call.
2279
2352
  *
@@ -2313,6 +2386,20 @@ declare class VerificationGatewayClient {
2313
2386
  */
2314
2387
  private executeWithRetry;
2315
2388
  }
2389
+ /** 5.20.0: the step-up event types `sendTestEvent` can send. */
2390
+ type TestEventType = 'step_up.approved' | 'step_up.denied' | 'step_up.expired' | 'step_up.lapsed';
2391
+ /** 5.20.0: what `sendTestEvent` reports. */
2392
+ interface TestEventResult {
2393
+ delivered: boolean;
2394
+ /** delivered | failed (bad answer / unreachable) | not_configured (no Events URL or secret). */
2395
+ status: 'delivered' | 'failed' | 'not_configured';
2396
+ /** Your endpoint's HTTP status, or null when nothing answered. */
2397
+ responseCode: number | null;
2398
+ error: string | null;
2399
+ eventId: string;
2400
+ type: TestEventType;
2401
+ approvalId: string | null;
2402
+ }
2316
2403
  /**
2317
2404
  * Create a new SDK client
2318
2405
  */
@@ -2328,13 +2415,15 @@ declare function verifyOnce(options: SDKOptions & {
2328
2415
  action?: string;
2329
2416
  }): Promise<VerificationResult>;
2330
2417
 
2418
+ type sdk_TestEventResult = TestEventResult;
2419
+ type sdk_TestEventType = TestEventType;
2331
2420
  type sdk_VerificationGatewayClient = VerificationGatewayClient;
2332
2421
  declare const sdk_VerificationGatewayClient: typeof VerificationGatewayClient;
2333
2422
  declare const sdk_createClient: typeof createClient;
2334
2423
  declare const sdk_getTrustLevel: typeof getTrustLevel;
2335
2424
  declare const sdk_verifyOnce: typeof verifyOnce;
2336
2425
  declare namespace sdk {
2337
- export { sdk_VerificationGatewayClient as VerificationGatewayClient, sdk_createClient as createClient, sdk_getTrustLevel as getTrustLevel, sdk_verifyOnce as verifyOnce };
2426
+ export { type sdk_TestEventResult as TestEventResult, type sdk_TestEventType as TestEventType, sdk_VerificationGatewayClient as VerificationGatewayClient, sdk_createClient as createClient, sdk_getTrustLevel as getTrustLevel, sdk_verifyOnce as verifyOnce };
2338
2427
  }
2339
2428
 
2340
2429
  /**
@@ -4127,6 +4216,28 @@ interface McpMiddlewareOptions extends GatewayConfig {
4127
4216
  toolGatePrecedence?: 'code' | 'dashboard';
4128
4217
  /** 5.19.0: refresh interval (ms) for the dashboard tool rules. Default 5 minutes. */
4129
4218
  routesRefreshMs?: number;
4219
+ /**
4220
+ * 5.20.0: tools and JSON-RPC methods that pass through with NO verify-access
4221
+ * call at all — not even the audit evaluation `evaluateAlwaysIfCredentialed`
4222
+ * adds for credentialed callers. Applies only while the call is not
4223
+ * enforced (an `'observe'` gate, or a handshake/introspection method with
4224
+ * no `methodGates` entry); a dashboard rule that enforces a listed tool
4225
+ * still verifies.
4226
+ *
4227
+ * Use it for:
4228
+ * - `methods`: handshake and introspection (`initialize`, `tools/list`,
4229
+ * `resources/list`, `resources/read`) — nothing to attribute, and a
4230
+ * backend round trip slows the host's first card fetch;
4231
+ * - `tools`: observe tools whose handler calls verify-access itself, so
4232
+ * the gate's evaluation would be a second backend verify for the same
4233
+ * call (the MCP bridge measured ~3 backend calls per `verify_agent`).
4234
+ *
4235
+ * Listed calls leave `req.agentVerification` unset.
4236
+ */
4237
+ skipEvaluation?: {
4238
+ tools?: readonly string[];
4239
+ methods?: readonly string[];
4240
+ };
4130
4241
  /**
4131
4242
  * Posture when the MCP middleware itself throws an internal error.
4132
4243
  *
@@ -4443,7 +4554,12 @@ interface AgentRecord {
4443
4554
  description?: string;
4444
4555
  agentType: string;
4445
4556
  agentStatus: string;
4446
- trustScore: number;
4557
+ /**
4558
+ * @deprecated Round 29.1: no longer returned. An agent never sees its own
4559
+ * trust score (the register response omits it; counterparties read it
4560
+ * from verify-access).
4561
+ */
4562
+ trustScore?: number;
4447
4563
  astrasyncIdLevel1?: string | null;
4448
4564
  tempId?: string | null;
4449
4565
  metadata?: Record<string, unknown>;
@@ -4457,7 +4573,11 @@ interface VerifyResponse {
4457
4573
  agentUuid: string;
4458
4574
  agentName: string;
4459
4575
  agentDescription: string;
4460
- agentTrustScore: number;
4576
+ /**
4577
+ * @deprecated Round 29.1: no longer returned by public verification.
4578
+ * Counterparties read the score from verify-access.
4579
+ */
4580
+ agentTrustScore?: number;
4461
4581
  agentStatus: string;
4462
4582
  ownerName?: string;
4463
4583
  };
@@ -5346,7 +5466,7 @@ declare function detectRuntime(userAgent: string | undefined | null): string | u
5346
5466
  * silently (never throwing), so this is a no-op there — which is correct:
5347
5467
  * in a browser the page's real UA is the honest identity.
5348
5468
  */
5349
- declare const SDK_USER_AGENT = "astrasync-sdk/5.19.0";
5469
+ declare const SDK_USER_AGENT = "astrasync-sdk/5.21.0";
5350
5470
  declare const sdkFetch: typeof fetch;
5351
5471
 
5352
5472
  interface LocalPolicy {
@@ -5464,7 +5584,7 @@ declare function parseYaml(yamlContent: string): ParseResult;
5464
5584
  * is fine — bumping both in the release-ceremony commit keeps them
5465
5585
  * lockstep.
5466
5586
  */
5467
- declare const SDK_VERSION = "5.19.0";
5587
+ declare const SDK_VERSION = "5.21.0";
5468
5588
 
5469
5589
  /**
5470
5590
  * 5.15.0 — the `UCP-Agent` request header (UCP 2026-08-25): an RFC 8941
@@ -5507,6 +5627,9 @@ declare function checkUcpAgentBinding(header: string | string[] | null | undefin
5507
5627
  * `ucp.payment_handlers` are required even when empty; signing keys are the
5508
5628
  * TOP-LEVEL `keys[]` (a JWK Set). Served over HTTPS, never redirected, with
5509
5629
  * `Cache-Control: public, max-age >= 60`.
5630
+ *
5631
+ * 5.20.0: platforms that publish their keys as `signing_keys` are read too —
5632
+ * use {@link ucpProfileKeys} wherever a profile's signing keys are needed.
5510
5633
  */
5511
5634
 
5512
5635
  declare const UCP_VERSION = "2026-08-25";
@@ -5543,7 +5666,14 @@ interface UcpProfile {
5543
5666
  payment_handlers: Record<string, UcpPaymentHandlerEntry[]>;
5544
5667
  };
5545
5668
  keys?: JWK[];
5669
+ /** 5.20.0: accepted alongside `keys[]` (some platforms publish this name). */
5670
+ signing_keys?: JWK[];
5546
5671
  }
5672
+ /**
5673
+ * 5.20.0: a profile's signing keys — `keys[]` plus `signing_keys`, skipping
5674
+ * malformed entries and encryption keys (`use: 'enc'`).
5675
+ */
5676
+ declare function ucpProfileKeys(profile: Partial<UcpProfile> | null | undefined): JWK[];
5547
5677
  /** AstraSync payment handler declarations (spec pages hosted on astrasync.ai). */
5548
5678
  declare function astrasyncPaymentHandlers(handlers: string[], specBase?: string): Record<string, UcpPaymentHandlerEntry[]>;
5549
5679
  interface BuildProfileOptions {
@@ -5720,6 +5850,125 @@ declare function sendUcpWebhook(opts: UcpWebhookOptions): Promise<{
5720
5850
  attempts: number;
5721
5851
  }>;
5722
5852
 
5853
+ declare const ISSUER_PROGRAM_HEADER = "X-Astra-Issuer-Program";
5854
+ interface AgentCommerceProductRule {
5855
+ /** false hides the product from agents. */
5856
+ visible?: boolean;
5857
+ /** Price for agents, in minor units (overrides your catalogue price). */
5858
+ priceMinor?: number;
5859
+ /** The image agents get (one of the product's own image URLs). */
5860
+ imageUrl?: string;
5861
+ /** false keeps this product out of card issuer offers. */
5862
+ issuerEligible?: boolean;
5863
+ }
5864
+ interface AgentCommerceOffer {
5865
+ /** Issuer programme slug, e.g. "latitude". */
5866
+ program: string;
5867
+ pricePercentOff?: number;
5868
+ interestFreeMonths?: number;
5869
+ minSpendMinor?: number;
5870
+ label: string;
5871
+ }
5872
+ interface AgentCommerceRules {
5873
+ version: number;
5874
+ /** Store-wide: verified agents get this % off. */
5875
+ verifiedPercentOff?: number;
5876
+ /** Store-wide: unverified (anonymous) agents see nothing. */
5877
+ hideFromUnverified?: boolean;
5878
+ products?: Record<string, AgentCommerceProductRule>;
5879
+ offers?: AgentCommerceOffer[];
5880
+ }
5881
+ interface PricingContext {
5882
+ /** The caller presented an AstraSync identity (verified when it confirms). */
5883
+ verified: boolean;
5884
+ /** The issuer programme the bridge says the buyer belongs to. */
5885
+ issuerProgram?: string;
5886
+ }
5887
+ interface PricedForAgent {
5888
+ priceMinor: number;
5889
+ /** The price without the cardholder offer (only when one applied). */
5890
+ regularMinor?: number;
5891
+ /** The programme whose cardholder price applied. */
5892
+ issuerProgram?: string;
5893
+ }
5894
+ /**
5895
+ * The cardholder price: percent off, rounded half up to the minor unit and
5896
+ * clamped to [0, price]. The same rule as AstraSync's backend and bridge.
5897
+ */
5898
+ declare function issuerOfferPrice(priceMinor: number, percentOff: number | undefined): number;
5899
+ /** Apply rules to one product's price (pure — used by the catalogue and the kits). */
5900
+ declare function priceForAgent(rules: AgentCommerceRules | null, sku: string, basePriceMinor: number, ctx: PricingContext): PricedForAgent;
5901
+ /** What your kit reports so the dashboard can suggest your URLs (it never sets them). */
5902
+ interface KitReport {
5903
+ catalogUrl?: string;
5904
+ checkoutUrl?: string;
5905
+ eventsUrl?: string;
5906
+ protocols?: Array<'ucp' | 'acp'>;
5907
+ }
5908
+ interface AgentCommerce {
5909
+ /** The current rules (null until the first fetch succeeds). */
5910
+ rules(): AgentCommerceRules | null;
5911
+ /** Fetch now (also runs every `refreshMs`). */
5912
+ refresh(): Promise<void>;
5913
+ price(sku: string, basePriceMinor: number, ctx: PricingContext): PricedForAgent;
5914
+ visible(sku: string, ctx: PricingContext): boolean;
5915
+ /** Tell AstraSync where your kit lives (shown in the dashboard as suggestions). */
5916
+ report(r: KitReport): void;
5917
+ stop(): void;
5918
+ }
5919
+ interface CreateAgentCommerceOptions {
5920
+ apiBaseUrl: string;
5921
+ apiKey: string;
5922
+ /** The endpoint's ASTRAE id. */
5923
+ counterpartyId: string;
5924
+ /** Default 5 minutes. 0 disables the timer (call `refresh()` yourself). */
5925
+ refreshMs?: number;
5926
+ fetch?: typeof fetch;
5927
+ }
5928
+ declare function createAgentCommerce(opts: CreateAgentCommerceOptions): AgentCommerce;
5929
+ interface AgentProduct {
5930
+ sku: string;
5931
+ name: string;
5932
+ /** Minor units. */
5933
+ priceMinor: number;
5934
+ currency: string;
5935
+ description?: string;
5936
+ /** All the product's image URLs; the studio picks which one agents get. */
5937
+ imageUrls?: string[];
5938
+ inStock?: boolean;
5939
+ url?: string;
5940
+ }
5941
+ type ProductSource = () => Promise<AgentProduct[]>;
5942
+ /**
5943
+ * Read products from a feed you already have: a Shopify `products.json`, a
5944
+ * Google Merchant feed (XML), a CSV with `id,title,price,image_link,…`, or a
5945
+ * JSON list. Cached for a minute.
5946
+ */
5947
+ declare function fromFeed(url: string, options?: {
5948
+ currency?: string;
5949
+ fetch?: typeof fetch;
5950
+ }): ProductSource;
5951
+ /** Parse a product feed body (exported for tests and the dashboard preview). */
5952
+ declare function parseFeed(text: string, currency: string): AgentProduct[];
5953
+ /**
5954
+ * The catalogue agents fetch, priced and filtered by your studio rules:
5955
+ * `GET` → `{ products: [{ sku, name, price, currency, image_url, in_stock,
5956
+ * issuer_offer? }] }` (prices in major units). Mount it where your endpoint's
5957
+ * catalogue URL points (the dashboard suggests it once your kit reports it).
5958
+ */
5959
+ declare function serveAgentCatalog(opts: {
5960
+ commerce: AgentCommerce;
5961
+ products: ProductSource;
5962
+ }): (req: {
5963
+ headers: Record<string, string | string[] | undefined>;
5964
+ }, res: {
5965
+ status(code: number): {
5966
+ json(body: unknown): void;
5967
+ };
5968
+ json(body: unknown): void;
5969
+ setHeader?(name: string, value: string): void;
5970
+ }) => Promise<void>;
5971
+
5723
5972
  interface IdempotencyRecord {
5724
5973
  state: 'in_progress' | 'done';
5725
5974
  requestHash: string;
@@ -5916,6 +6165,13 @@ interface CatalogItem {
5916
6165
  title: string;
5917
6166
  /** Minor units. */
5918
6167
  price: number;
6168
+ /**
6169
+ * 5.20.0: product image, an absolute http(s) URL. A relative or invalid value is
6170
+ * dropped when the kit prices the line.
6171
+ */
6172
+ image_url?: string;
6173
+ /** 5.20.0: short product description. */
6174
+ description?: string;
5919
6175
  }
5920
6176
  interface CheckoutLine {
5921
6177
  id: string;
@@ -5990,6 +6246,8 @@ interface CheckoutSession {
5990
6246
  _attemptId?: string;
5991
6247
  /** The AstraSync cart id the platform sent (X-Astra-Checkout-Session). */
5992
6248
  _astraCheckoutSessionId?: string;
6249
+ /** 5.21.0: the card issuer programme whose cardholder price these lines carry. */
6250
+ _issuerProgram?: string;
5993
6251
  /** The attached checkout JWS behind the last merchant_authorization sent. */
5994
6252
  _checkoutJwt?: string;
5995
6253
  }
@@ -6110,6 +6368,14 @@ interface UcpCheckoutKitOptions {
6110
6368
  * without calling AstraSync.
6111
6369
  */
6112
6370
  validateCart?: (session: CheckoutSession) => Promise<KitMessage[]>;
6371
+ /**
6372
+ * 5.21.0: your agent commerce studio rules (`createAgentCommerce`). Lines
6373
+ * are priced with them — studio price, verified discount, card issuer
6374
+ * cardholder price — exactly as `serveAgentCatalog` prices your catalogue,
6375
+ * and a cardholder-priced checkout names its programme on the confirm so
6376
+ * AstraSync can check the buyer is a cardholder.
6377
+ */
6378
+ agentCommerce?: AgentCommerce;
6113
6379
  /** AstraSync verification of the purchase (e.g. `client.confirmCheckout`). */
6114
6380
  verifyPurchase: (ctx: {
6115
6381
  session: CheckoutSession;
@@ -6715,6 +6981,10 @@ interface AcpCheckoutSession {
6715
6981
  id: string;
6716
6982
  name: string;
6717
6983
  unit_amount: number;
6984
+ /** 5.20.0: absolute http(s) product image from the catalog. */
6985
+ image_url?: string;
6986
+ /** 5.20.0: product description from the catalog. */
6987
+ description?: string;
6718
6988
  };
6719
6989
  quantity: number;
6720
6990
  name: string;
@@ -6734,6 +7004,8 @@ interface AcpCheckoutSession {
6734
7004
  /** 5.18.0: hashed caller scope (was the raw Authorization header). */
6735
7005
  _caller?: string;
6736
7006
  _astraCheckoutSessionId?: string;
7007
+ /** 5.21.0: the card issuer programme whose cardholder price these lines carry. */
7008
+ _issuerProgram?: string;
6737
7009
  /** 5.18.0: a settlement the processor hasn't confirmed yet (see `resolvePending`). */
6738
7010
  _pending?: {
6739
7011
  orderId?: string;
@@ -6784,6 +7056,12 @@ interface AcpCheckoutKitOptions {
6784
7056
  * session `not_ready_for_payment` (messages are `invalid`, with your path
6785
7057
  * as `param`) and `complete` is refused without calling AstraSync.
6786
7058
  */
7059
+ /**
7060
+ * 5.21.0: your agent commerce studio rules (`createAgentCommerce`) — lines
7061
+ * priced exactly as `serveAgentCatalog` prices your catalogue; a
7062
+ * cardholder-priced checkout names its programme on the confirm.
7063
+ */
7064
+ agentCommerce?: AgentCommerce;
6787
7065
  validateCart?: (session: AcpCheckoutSession) => Promise<KitMessage[]>;
6788
7066
  verifyPurchase: (ctx: {
6789
7067
  session: AcpCheckoutSession;
@@ -7278,4 +7556,4 @@ declare function contentDigest(body: string): string;
7278
7556
  */
7279
7557
  declare function signHttpRequest(req: SignableRequest, opts: SignHttpRequestOptions): Promise<Record<string, string>>;
7280
7558
 
7281
- export { ACP_API_VERSION, ACP_SUPPORTED_API_VERSIONS, AEP_SPEC_VERSION, AP2_VCT, type AcpCheckoutKitOptions, type AcpCheckoutSession, type AcpCheckoutStatus, type AcpCheckoutStore, type AcpWellKnownOptions, type AepActorType, type AepArtifactRecord, type AepArtifactType, AepChain, type AepChainOptions, type AepChainVerification, type AepHashInput, type AgentArtifacts, AgentClient, type AgentCredentials, type AgentProtocol, type AgentProtocolIdentities, type AgentRecord, type Ap2Party, type Ap2VerifyResult, type ApprovalEvent, type ApprovalEventKit, type ApprovalEventsHandlerOptions, type ApprovalEventsResponse, AstraSync, type AstraSyncAepEvidence, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AstraSyncMandates, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CheckoutMetadata, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DECLARED_SOURCE_MAX, DEFAULT_EDGE_CONFIG, DEFAULT_IDEMPOTENCY_TTL_MS, type DashboardToolRule, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressHandlerOptions, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FetchKit, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HandleApprovalEventsOptions, type HealthResponse, type HttpSignatureAlgorithm, type IdempotencyOptions, type IdempotencyRecord, type IdempotencyStore, KYDRequiredError, type KitExpressRequest, type KitExpressResponse, type KitMessage, type KitRequestContext, type KyaPayIdentity, type KyaPayResult, type KyaPayTokenType, type KyaPayVerifyOptions, type ParseResult as LocalPolicyParseResult, type ValidationError as LocalPolicyValidationError, type ValidationResult as LocalPolicyValidationResult, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, MemoryCheckoutStore, MemoryIdempotencyStore, MemoryMppChallengeStore, MemorySeenEvents, type MerchantSettlementToken, type ModelConfig, type MppChallenge, type MppChallengeStore, type MppCredential, type MppReceipt, type MppVerifyOptions, type MppVerifyResult, type NegotiationResult, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PendingResolution, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, type PurposeSource, RUNTIME_SIGNATURES, RedisIdempotencyStore, type RedisLike, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type ReportAttemptOptions, type ReportRetryOptions, type ResumeOutcome, type ResumeResult, type RootKeyResolver, type RouteAccessConfig, type RoutePolicy, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SeenEvents, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, SettlementReportError, type SettlementRequest, type SignHttpRequestOptions, type SignableRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, UCP_ORDER_CAPABILITY, UCP_VERSION, type UcpAgentBinding, type CatalogItem as UcpCatalogItem, type UcpCheckoutKitOptions, type CheckoutSession as UcpCheckoutSession, type CheckoutStore as UcpCheckoutStore, type UcpLink, type UcpMessage, type UcpOrder, type UcpProfile, type UcpProfileResult, type SettleResult as UcpSettleResult, type UcpSeverity, type UcpSignatureResult, VERIFICATION_STATUS_HEADER, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyAp2Options, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, type X402PaymentPayload, type X402PaymentRequired, type X402PaymentRequirements, type X402ResourceInfo, type X402SettlementResponse, _resetEdgeConfigCache, abandonIdempotent, acpPaymentHandlers, aepCanonicalJson, aepHash, aepPrivateKeyFromSeed, aepPublicKeyDocument, aepPublicKeyFromBase64, aepRawPublicKey, aepSign, aepTimestamp, aepVerifySignature, index as agent, approvalEventsHandler, astrasyncPaymentHandlers, authorizeSettlement, awaitStepUpApproval, beginIdempotent, buildAcpWellKnown, buildGuidance, buildMpp402Response, buildMppChallenge, buildSdkObservedMetadata, buildUcpOrder, buildUcpProfile, buildVerificationUnavailableBody, buildX402Challenge, canonicalJson, checkUcpAgentBinding, checkoutHash, clearCache, closedCheckoutMandate, closedPaymentMandate, contentDigest, createAcpCheckoutKit, createKbHop, createMcpMiddleware, createUcpCheckoutKit, decodeMppRequest, degradeToObserve, denyStatusFor, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, encodeMppReceipt, encodeX402SettlementResponse, express, expressHandler, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, fetchUcpProfile, finishIdempotent, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, handleApprovalEvents, hasCredentials, idempotencyMiddleware, isEdgeConfig, isRejectedIdentityClaim, isRetryableSettlementError, isSpecialUseIp, isVerificationUnavailable, isVerifiedHopValidFor, issueDelegateSdJwt, matchEdgePathRule, matchPlatformSignature, matchRoutePattern, mppBodyDigest, negotiateUcp, nextjs, normalizeDeclaredSource, openCheckoutMandate, openPaymentMandate, parseYaml as parseLocalPolicyYaml, parseMppCredential, parseUcpAgentHeader, parseVerifiedHop, parseX402Challenge, parseX402Payment, pollStepUpStatus, prefetchWellKnown, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, requestFingerprint, rootMandateDigest, routePatternToRegExp, routePolicyOf, sanitizeHeaders, sdk, sdkFetch, sendUcpWebhook, serializeVerifiedHop, setMcpMeta, signHttpRequest, signRootMandate, signUcpRequest, signUcpResponse, index$1 as transport, ucpError, ucpEscalation, ucpFailure, ucpProfileHandler, ucpRequiredComponents, unavailableRetryAfterSeconds, validatePolicy as validateLocalPolicy, verify, verifyAepChain, verifyAp2Mandate, verifyDelegateChain, verifyKyaPayTokens, verifyMppChallenge, verifyUcpRequest, withIdempotency, x402PaymentMatchesOffer };
7559
+ export { ACP_API_VERSION, ACP_SUPPORTED_API_VERSIONS, AEP_SPEC_VERSION, AP2_VCT, type AcpCheckoutKitOptions, type AcpCheckoutSession, type AcpCheckoutStatus, type AcpCheckoutStore, type AcpWellKnownOptions, type AepActorType, type AepArtifactRecord, type AepArtifactType, AepChain, type AepChainOptions, type AepChainVerification, type AepHashInput, type AgentArtifacts, AgentClient, type AgentCommerce, type AgentCommerceOffer, type AgentCommerceRules, type AgentCredentials, type AgentProduct, type AgentProtocol, type AgentProtocolIdentities, type AgentRecord, type Ap2Party, type Ap2VerifyResult, type ApprovalEvent, type ApprovalEventKit, type ApprovalEventsHandlerOptions, type ApprovalEventsResponse, AstraSync, type AstraSyncAepEvidence, type AstraSyncConfig, type AstraSyncCredentials, AstraSyncError, type AstraSyncMandates, type AttemptOutcome, type AttemptReport, AuthenticationError, type BuildGuidanceParams, CAPTURE_SCHEMA_VERSION, type CallerMetadata, ChallengeHandler, type CheckoutMetadata, type CommerceArtifactsPayload, type CommerceContext, type CommercePipelineInput, type CommerceShieldProps, type ConsiderationItem, type ConsiderationSet, type CounterpartyType, DECLARED_SOURCE_MAX, DEFAULT_EDGE_CONFIG, DEFAULT_IDEMPOTENCY_TTL_MS, type DashboardToolRule, type DynamicPlatformFingerprint, type EdgeConfig, type EdgeMode, type EdgePathRule, type EdgeVerificationDepth, type EnhancedVerificationResult, type ExpressHandlerOptions, type ExpressMiddlewareOptions, type FetchEdgeConfigResult, type FetchEdgeConfigSuccess, type FetchKit, type FiatSettlementBinding, type FrameworkConfig, type FulfilmentInfo, type GatewayConfig, type GuidanceEnvelope, type GuidanceInfo, type HandleApprovalEventsOptions, type HealthResponse, type HttpSignatureAlgorithm, ISSUER_PROGRAM_HEADER, type IdempotencyOptions, type IdempotencyRecord, type IdempotencyStore, KYDRequiredError, type KitExpressRequest, type KitExpressResponse, type KitMessage, type KitReport, type KitRequestContext, type KyaPayIdentity, type KyaPayResult, type KyaPayTokenType, type KyaPayVerifyOptions, type ParseResult as LocalPolicyParseResult, type ValidationError as LocalPolicyValidationError, type ValidationResult as LocalPolicyValidationResult, MAX_HEADERS, MAX_HEADER_VALUE_BYTES, MAX_TOTAL_BYTES, MCP_VERIFIED_HOP_HEADER, MCP_VERIFIED_HOP_MAX_AGE_MS, type McpMiddlewareOptions, MemoryCheckoutStore, MemoryIdempotencyStore, MemoryMppChallengeStore, MemorySeenEvents, type MerchantSettlementToken, type ModelConfig, type MppChallenge, type MppChallengeStore, type MppCredential, type MppReceipt, type MppVerifyOptions, type MppVerifyResult, type NegotiationResult, type NextJsMiddlewareOptions, type ObservedMetadata, type PDLSSConfig$1 as PDLSSConfig, type PDLSSDuration, type PDLSSInfo, type PDLSSLimits, type PDLSSPurpose, type PDLSSScope, type PDLSSSelfInstantiation, PLATFORM_AGENT_SIGNATURES, type PendingRegistrationResponse, type PendingResolution, type PlatformAgentVendor, type PlatformDetectionInput, type PlatformFingerprint, type PlatformSignatureDef, type PollRegistrationResult, type ProtocolTransport, type PurposeSource, RUNTIME_SIGNATURES, RedisIdempotencyStore, type RedisLike, type RegisterOptions, type RegisterResult, RegistrationDeniedError, RegistrationExpiredError, type RegistrationResponse, RegistrationTimeoutError, type ReportAttemptOptions, type ReportRetryOptions, type ResumeOutcome, type ResumeResult, type RootKeyResolver, type RouteAccessConfig, type RoutePolicy, type RuntimeChallengeResult, type RuntimeSignature, type SDKOptions, SDK_USER_AGENT, type SanitizeHeadersResult, type SeenEvents, type SettlementArtifact, type SettlementArtifactBinding, type SettlementArtifactBindingBase, type SettlementDecision, type SettlementOutcomeInfo, SettlementReportError, type SettlementRequest, type SignHttpRequestOptions, type SignableRequest, type StablecoinSettlementBinding, type StepUpApprovalInfo, type StepUpApprovalStatus, type StepUpOutcome, TRUST_LEVEL_RANGES, type TestEventResult, type TestEventType, type TokenGuidance, type ToolGate, type ToolGateConfig, type TrustLevel, UCP_ORDER_CAPABILITY, UCP_VERSION, type UcpAgentBinding, type CatalogItem as UcpCatalogItem, type UcpCheckoutKitOptions, type CheckoutSession as UcpCheckoutSession, type CheckoutStore as UcpCheckoutStore, type UcpLink, type UcpMessage, type UcpOrder, type UcpProfile, type UcpProfileResult, type SettleResult as UcpSettleResult, type UcpSeverity, type UcpSignatureResult, VERIFICATION_STATUS_HEADER, SDK_VERSION as VERSION, type VerificationInterstitialProps, type VerificationRequest, type VerificationResult, type VerificationWarning, type VerifiedAgent, type VerifiedDeveloper, type VerifiedHopMarker, type VerifiedOrganization, type VerifyAp2Options, type VerifyOptions, type VerifyResponse, type WaitForApprovalOptions, type WellKnownAgenticCommerce, type X402PaymentPayload, type X402PaymentRequired, type X402PaymentRequirements, type X402ResourceInfo, type X402SettlementResponse, _resetEdgeConfigCache, abandonIdempotent, acpPaymentHandlers, aepCanonicalJson, aepHash, aepPrivateKeyFromSeed, aepPublicKeyDocument, aepPublicKeyFromBase64, aepRawPublicKey, aepSign, aepTimestamp, aepVerifySignature, index as agent, approvalEventsHandler, astrasyncPaymentHandlers, authorizeSettlement, awaitStepUpApproval, beginIdempotent, buildAcpWellKnown, buildGuidance, buildMpp402Response, buildMppChallenge, buildSdkObservedMetadata, buildUcpOrder, buildUcpProfile, buildVerificationUnavailableBody, buildX402Challenge, canonicalJson, checkUcpAgentBinding, checkoutHash, clearCache, closedCheckoutMandate, closedPaymentMandate, contentDigest, createAcpCheckoutKit, createAgentCommerce, createKbHop, createMcpMiddleware, createUcpCheckoutKit, decodeMppRequest, degradeToObserve, denyStatusFor, deriveConnectionFromHeaders, detectPlatformFingerprint, detectRuntime, encodeMppReceipt, encodeX402SettlementResponse, express, expressHandler, extractApiKeyFormat, extractCredentials, extractMcpCredentials, extractPlatformHeaders, fetchEdgeConfig, fetchRoutes, fetchUcpProfile, finishIdempotent, fromFeed, getCachedWellKnownUrls, getEdgeConfig, getTrustLevel, getWellKnownUrls, handleApprovalEvents, hasCredentials, idempotencyMiddleware, isEdgeConfig, isRejectedIdentityClaim, isRetryableSettlementError, isSharedVerdict, isSpecialUseIp, isVerificationUnavailable, isVerifiedHopValidFor, issueDelegateSdJwt, issuerOfferPrice, matchEdgePathRule, matchPlatformSignature, matchRoutePattern, mppBodyDigest, negotiateUcp, nextjs, normalizeDeclaredSource, onVerificationResult, openCheckoutMandate, openPaymentMandate, parseFeed, parseYaml as parseLocalPolicyYaml, parseMppCredential, parseUcpAgentHeader, parseVerifiedHop, parseX402Challenge, parseX402Payment, pollStepUpStatus, prefetchWellKnown, priceForAgent, quickVerify, recordDecision, reportAttempt, reportUnregisteredAttempt, requestFingerprint, rootMandateDigest, routePatternToRegExp, routePolicyOf, sanitizeHeaders, sdk, sdkFetch, sendUcpWebhook, serializeVerifiedHop, serveAgentCatalog, setMcpMeta, signHttpRequest, signRootMandate, signUcpRequest, signUcpResponse, index$1 as transport, ucpError, ucpEscalation, ucpFailure, ucpProfileHandler, ucpProfileKeys, ucpRequiredComponents, unavailableRetryAfterSeconds, validatePolicy as validateLocalPolicy, verify, verifyAepChain, verifyAp2Mandate, verifyDelegateChain, verifyKyaPayTokens, verifyMppChallenge, verifyUcpRequest, withIdempotency, x402PaymentMatchesOffer };