@agent-score/commerce 2.0.2 → 2.1.1

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 (116) hide show
  1. package/README.md +26 -11
  2. package/dist/_core-kI7FRAiZ.d.mts +10 -0
  3. package/dist/_core-kI7FRAiZ.d.ts +10 -0
  4. package/dist/challenge/index.d.mts +3 -3
  5. package/dist/challenge/index.d.ts +3 -3
  6. package/dist/challenge/index.js +21 -14
  7. package/dist/challenge/index.js.map +1 -1
  8. package/dist/challenge/index.mjs +21 -14
  9. package/dist/challenge/index.mjs.map +1 -1
  10. package/dist/{checkout-jNUIql6D.d.mts → checkout-BRw_caGr.d.mts} +13 -33
  11. package/dist/{checkout-DhSj_h94.d.ts → checkout-CuSNUJFX.d.ts} +13 -33
  12. package/dist/core.js +1 -1
  13. package/dist/core.js.map +1 -1
  14. package/dist/core.mjs +1 -1
  15. package/dist/core.mjs.map +1 -1
  16. package/dist/default_rails-C5gKZJMI.d.ts +198 -0
  17. package/dist/default_rails-XFCuRddA.d.mts +198 -0
  18. package/dist/discovery/index.d.mts +5 -5
  19. package/dist/discovery/index.d.ts +5 -5
  20. package/dist/discovery/index.js +14 -1
  21. package/dist/discovery/index.js.map +1 -1
  22. package/dist/discovery/index.mjs +14 -1
  23. package/dist/discovery/index.mjs.map +1 -1
  24. package/dist/identity/express.d.mts +7 -3
  25. package/dist/identity/express.d.ts +7 -3
  26. package/dist/identity/express.js +39 -96
  27. package/dist/identity/express.js.map +1 -1
  28. package/dist/identity/express.mjs +37 -87
  29. package/dist/identity/express.mjs.map +1 -1
  30. package/dist/identity/fastify.d.mts +4 -4
  31. package/dist/identity/fastify.d.ts +4 -4
  32. package/dist/identity/fastify.js +60 -96
  33. package/dist/identity/fastify.js.map +1 -1
  34. package/dist/identity/fastify.mjs +58 -87
  35. package/dist/identity/fastify.mjs.map +1 -1
  36. package/dist/identity/hono.d.mts +11 -3
  37. package/dist/identity/hono.d.ts +11 -3
  38. package/dist/identity/hono.js +39 -93
  39. package/dist/identity/hono.js.map +1 -1
  40. package/dist/identity/hono.mjs +37 -84
  41. package/dist/identity/hono.mjs.map +1 -1
  42. package/dist/identity/nextjs.d.mts +10 -3
  43. package/dist/identity/nextjs.d.ts +10 -3
  44. package/dist/identity/nextjs.js +49 -93
  45. package/dist/identity/nextjs.js.map +1 -1
  46. package/dist/identity/nextjs.mjs +46 -84
  47. package/dist/identity/nextjs.mjs.map +1 -1
  48. package/dist/identity/policy.js +22 -23317
  49. package/dist/identity/policy.js.map +1 -1
  50. package/dist/identity/policy.mjs +1 -23320
  51. package/dist/identity/policy.mjs.map +1 -1
  52. package/dist/identity/web.d.mts +9 -3
  53. package/dist/identity/web.d.ts +9 -3
  54. package/dist/identity/web.js +45 -93
  55. package/dist/identity/web.js.map +1 -1
  56. package/dist/identity/web.mjs +42 -84
  57. package/dist/identity/web.mjs.map +1 -1
  58. package/dist/index.d.mts +621 -90
  59. package/dist/index.d.ts +621 -90
  60. package/dist/index.js +1202 -328
  61. package/dist/index.js.map +1 -1
  62. package/dist/index.mjs +1188 -327
  63. package/dist/index.mjs.map +1 -1
  64. package/dist/middleware/express.d.mts +10 -0
  65. package/dist/middleware/express.d.ts +10 -0
  66. package/dist/middleware/express.js +128 -0
  67. package/dist/middleware/express.js.map +1 -0
  68. package/dist/middleware/express.mjs +91 -0
  69. package/dist/middleware/express.mjs.map +1 -0
  70. package/dist/middleware/fastify.d.mts +10 -0
  71. package/dist/middleware/fastify.d.ts +10 -0
  72. package/dist/middleware/fastify.js +127 -0
  73. package/dist/middleware/fastify.js.map +1 -0
  74. package/dist/middleware/fastify.mjs +90 -0
  75. package/dist/middleware/fastify.mjs.map +1 -0
  76. package/dist/middleware/hono.d.mts +10 -0
  77. package/dist/middleware/hono.d.ts +10 -0
  78. package/dist/middleware/hono.js +122 -0
  79. package/dist/middleware/hono.js.map +1 -0
  80. package/dist/middleware/hono.mjs +85 -0
  81. package/dist/middleware/hono.mjs.map +1 -0
  82. package/dist/middleware/nextjs.d.mts +22 -0
  83. package/dist/middleware/nextjs.d.ts +22 -0
  84. package/dist/middleware/nextjs.js +143 -0
  85. package/dist/middleware/nextjs.js.map +1 -0
  86. package/dist/middleware/nextjs.mjs +105 -0
  87. package/dist/middleware/nextjs.mjs.map +1 -0
  88. package/dist/middleware/web.d.mts +25 -0
  89. package/dist/middleware/web.d.ts +25 -0
  90. package/dist/middleware/web.js +128 -0
  91. package/dist/middleware/web.js.map +1 -0
  92. package/dist/middleware/web.mjs +91 -0
  93. package/dist/middleware/web.mjs.map +1 -0
  94. package/dist/payment/index.d.mts +32 -21
  95. package/dist/payment/index.d.ts +32 -21
  96. package/dist/payment/index.js +215 -12
  97. package/dist/payment/index.js.map +1 -1
  98. package/dist/payment/index.mjs +205 -12
  99. package/dist/payment/index.mjs.map +1 -1
  100. package/dist/{pricing-CxzwyiO6.d.mts → pricing-4n5Ota0D.d.mts} +14 -4
  101. package/dist/{pricing-CQ9DIFaw.d.ts → pricing-DHfH3ogG.d.ts} +14 -4
  102. package/dist/{rail_spec-XP0wKgJV.d.mts → rail_spec-D6qzh3J0.d.mts} +1 -1
  103. package/dist/{rail_spec-XP0wKgJV.d.ts → rail_spec-D6qzh3J0.d.ts} +1 -1
  104. package/dist/stripe-multichain/index.d.mts +150 -47
  105. package/dist/stripe-multichain/index.d.ts +150 -47
  106. package/dist/stripe-multichain/index.js +19799 -43
  107. package/dist/stripe-multichain/index.js.map +1 -1
  108. package/dist/stripe-multichain/index.mjs +19808 -28
  109. package/dist/stripe-multichain/index.mjs.map +1 -1
  110. package/dist/{x402_server-hgQzWQwB.d.mts → x402_server-Ciz2mls2.d.mts} +1 -1
  111. package/dist/{x402_server-hgQzWQwB.d.ts → x402_server-Ciz2mls2.d.ts} +1 -1
  112. package/package.json +43 -5
  113. package/dist/_response-BFYN3b6i.d.mts +0 -142
  114. package/dist/_response-_iPD5AIj.d.ts +0 -142
  115. package/dist/solana-Cds87OTu.d.mts +0 -67
  116. package/dist/solana-Cds87OTu.d.ts +0 -67
@@ -25,7 +25,10 @@ __export(payment_exports, {
25
25
  USDC: () => USDC,
26
26
  X402_SUPPORTED_BASE_NETWORKS: () => X402_SUPPORTED_BASE_NETWORKS,
27
27
  aliasAmountFields: () => aliasAmountFields,
28
+ asHeaders: () => asHeaders,
29
+ buildDefaultCheckoutRails: () => buildDefaultCheckoutRails,
28
30
  buildIdempotencyKey: () => buildIdempotencyKey,
31
+ buildMppxComposeRails: () => buildMppxComposeRails,
29
32
  buildPaymentDirective: () => buildPaymentDirective,
30
33
  buildPaymentHeaders: () => buildPaymentHeaders,
31
34
  buildPaymentRequestBlob: () => buildPaymentRequestBlob,
@@ -41,6 +44,11 @@ __export(payment_exports, {
41
44
  extractPaymentSignerFromAuth: () => extractPaymentSignerFromAuth,
42
45
  extractSignerForPrecheck: () => extractSignerForPrecheck,
43
46
  formatUsdCents: () => formatUsdCents,
47
+ hasMppxHeader: () => hasMppxHeader,
48
+ hasPaymentHeader: () => hasPaymentHeader,
49
+ hasX402Header: () => hasX402Header,
50
+ isEvmNetwork: () => isEvmNetwork,
51
+ isSolanaNetwork: () => isSolanaNetwork,
44
52
  lazyMppxServer: () => lazyMppxServer,
45
53
  lazyX402Server: () => lazyX402Server,
46
54
  loadSolanaFeePayer: () => loadSolanaFeePayer,
@@ -52,9 +60,11 @@ __export(payment_exports, {
52
60
  paymentRequiredHeader: () => paymentRequiredHeader,
53
61
  processX402Settle: () => processX402Settle,
54
62
  rails: () => rails,
63
+ readHeader: () => readHeader,
55
64
  readX402PaymentHeader: () => readX402PaymentHeader,
56
65
  registerX402SchemesV1V2: () => registerX402SchemesV1V2,
57
66
  resolveRecipient: () => resolveRecipient,
67
+ runWithMppxFailureCapture: () => runWithMppxFailureCapture,
58
68
  settlementOverrideHeader: () => settlementOverrideHeader,
59
69
  usdToAtomic: () => usdToAtomic,
60
70
  validateX402NetworkConfig: () => validateX402NetworkConfig,
@@ -632,6 +642,9 @@ async function verifyX402Request({
632
642
  return { ok: true, payload, signedNetwork, signedPayTo };
633
643
  }
634
644
 
645
+ // src/payment/mppx_server.ts
646
+ var import_node_async_hooks = require("async_hooks");
647
+
635
648
  // src/stripe-multichain/mppx_stripe.ts
636
649
  async function createMppxStripe({
637
650
  profileId,
@@ -666,7 +679,8 @@ function isSolanaMppRailSpec(s) {
666
679
  return s.network?.startsWith("solana:") ?? false;
667
680
  }
668
681
  function solanaNetworkFromCAIP2(caip2) {
669
- if (caip2 === networks.solana.devnet.caip2) return "devnet";
682
+ if (caip2 === "devnet" || caip2 === networks.solana.devnet.caip2) return "devnet";
683
+ if (caip2 === "localnet") return "localnet";
670
684
  return "mainnet-beta";
671
685
  }
672
686
  function solanaDefaultRpcUrl(network) {
@@ -809,6 +823,31 @@ function wrapSolanaChargeWithFinalizedBlockhash(baseMethod, rpcUrl) {
809
823
  }
810
824
  };
811
825
  }
826
+ var mppxCapture = new import_node_async_hooks.AsyncLocalStorage();
827
+ var consoleErrorPatched = false;
828
+ function ensureConsoleErrorPatch() {
829
+ if (consoleErrorPatched) return;
830
+ consoleErrorPatched = true;
831
+ const original = console.error.bind(console);
832
+ console.error = function captureMppxInternal(...args) {
833
+ if (args[0] === "mppx: internal verification error" && args[1] !== void 0) {
834
+ const ctx = mppxCapture.getStore();
835
+ if (ctx) {
836
+ const e = args[1];
837
+ const reason = typeof e?.shortMessage === "string" ? e.shortMessage : typeof e?.message === "string" ? e.message : String(args[1]);
838
+ const details = e?.details;
839
+ ctx.reason = typeof details === "string" && details.length > 0 ? `${reason} (${details})` : reason;
840
+ }
841
+ }
842
+ return original(...args);
843
+ };
844
+ }
845
+ async function runWithMppxFailureCapture(fn) {
846
+ ensureConsoleErrorPatch();
847
+ const ctx = { reason: null };
848
+ const result = await mppxCapture.run(ctx, fn);
849
+ return { result, failureReason: ctx.reason };
850
+ }
812
851
  async function composeMppxRequest(mppx, intents, request) {
813
852
  if (!mppx || typeof mppx !== "object" || !("compose" in mppx)) {
814
853
  throw new Error("composeMppxRequest: argument is not an mppx server instance");
@@ -817,6 +856,7 @@ async function composeMppxRequest(mppx, intents, request) {
817
856
  if (typeof compose !== "function") {
818
857
  throw new Error("composeMppxRequest: mppx.compose is not a function");
819
858
  }
859
+ ensureConsoleErrorPatch();
820
860
  const typedCompose = compose;
821
861
  const handler = typedCompose.apply(mppx, [...intents]);
822
862
  return handler(request);
@@ -825,6 +865,22 @@ function mppxChallengeHeaders(result) {
825
865
  return Object.fromEntries(result.challenge.headers);
826
866
  }
827
867
 
868
+ // src/errors.ts
869
+ var CheckoutValidationError = class extends Error {
870
+ code;
871
+ action;
872
+ status;
873
+ extra;
874
+ constructor(opts) {
875
+ super(opts.message);
876
+ this.name = "CheckoutValidationError";
877
+ this.code = opts.code;
878
+ this.action = opts.action ?? "fix_request";
879
+ this.status = opts.status ?? 400;
880
+ this.extra = opts.extra;
881
+ }
882
+ };
883
+
828
884
  // src/payment/dispatch.ts
829
885
  function detectRailFromHeaders(headers) {
830
886
  const get = (name) => {
@@ -853,17 +909,32 @@ async function dispatchSettlementByNetwork(payload, handlers) {
853
909
  const network = payload.accepted.network;
854
910
  if (network.startsWith("eip155:")) {
855
911
  if (!handlers.evm) {
856
- throw new Error(`No EVM settlement handler registered (network: ${network})`);
912
+ throw new CheckoutValidationError({
913
+ code: "payment_provider_unavailable",
914
+ message: `No EVM settlement handler registered (network: ${network})`,
915
+ action: "retry_later",
916
+ status: 503
917
+ });
857
918
  }
858
919
  return handlers.evm(payload);
859
920
  }
860
921
  if (network.startsWith("solana:")) {
861
922
  if (!handlers.svm) {
862
- throw new Error(`No Solana settlement handler registered (network: ${network})`);
923
+ throw new CheckoutValidationError({
924
+ code: "payment_provider_unavailable",
925
+ message: `No Solana settlement handler registered (network: ${network})`,
926
+ action: "retry_later",
927
+ status: 503
928
+ });
863
929
  }
864
930
  return handlers.svm(payload);
865
931
  }
866
- throw new Error(`Unrecognized network in settlement payload: ${network}`);
932
+ throw new CheckoutValidationError({
933
+ code: "payment_provider_unavailable",
934
+ message: `Unrecognized network in settlement payload: ${network}`,
935
+ action: "retry_later",
936
+ status: 503
937
+ });
867
938
  }
868
939
 
869
940
  // src/payment/wwwauthenticate.ts
@@ -953,6 +1024,13 @@ function clampKey(key) {
953
1024
  return key;
954
1025
  }
955
1026
 
1027
+ // src/_headers.ts
1028
+ function normalizeHeadersToLowercase(headers) {
1029
+ const out = {};
1030
+ for (const [k, v] of Object.entries(headers)) out[k.toLowerCase()] = v;
1031
+ return out;
1032
+ }
1033
+
956
1034
  // src/signer.ts
957
1035
  var TOKEN_PROGRAM = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
958
1036
  var TOKEN_2022_PROGRAM = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
@@ -1035,13 +1113,8 @@ async function extractPaymentSignerFromAuth(authHeader, x402PaymentHeader) {
1035
1113
  function readX402PaymentHeader(request) {
1036
1114
  return request.headers.get("payment-signature") ?? request.headers.get("x-payment") ?? void 0;
1037
1115
  }
1038
- function lowerHeaders(headers) {
1039
- const out = {};
1040
- for (const [k, v] of Object.entries(headers)) out[k.toLowerCase()] = v;
1041
- return out;
1042
- }
1043
1116
  async function extractSignerForPrecheck(headers) {
1044
- const lower = lowerHeaders(headers);
1117
+ const lower = normalizeHeadersToLowercase(headers);
1045
1118
  const x402 = lower["payment-signature"] ?? lower["x-payment"];
1046
1119
  if (x402) {
1047
1120
  const signer = await extractPaymentSignerFromAuth(void 0, x402);
@@ -1098,8 +1171,8 @@ function usdToAtomic(usd, opts) {
1098
1171
  }
1099
1172
  return result;
1100
1173
  }
1101
- function formatUsdCents(cents) {
1102
- return (cents / 100).toFixed(2);
1174
+ function formatUsdCents(cents, decimals = 2) {
1175
+ return (cents / 100).toFixed(decimals);
1103
1176
  }
1104
1177
 
1105
1178
  // src/payment/zero-settle.ts
@@ -1235,6 +1308,126 @@ async function loadSolanaFeePayer(opts) {
1235
1308
  }
1236
1309
  return kit.createKeyPairSignerFromPrivateKeyBytes(bytes);
1237
1310
  }
1311
+
1312
+ // src/payment/constants.ts
1313
+ var STRIPE_MIN_CHARGE_USD = 0.5;
1314
+
1315
+ // src/payment/compose_rails.ts
1316
+ var warnedStripeBelowMinimum = false;
1317
+ function buildMppxComposeRails(opts) {
1318
+ const rails2 = [];
1319
+ if (opts.tempoRecipient) {
1320
+ rails2.push(["tempo/charge", {
1321
+ amount: opts.amountUsd,
1322
+ currency: opts.tempoTokenAddress ?? USDC.tempo.mainnet.address,
1323
+ decimals: 6,
1324
+ recipient: opts.tempoRecipient
1325
+ }]);
1326
+ }
1327
+ if (opts.solanaRecipient) {
1328
+ const atomic = usdToAtomic(opts.amountUsd, { decimals: 6 });
1329
+ rails2.push(["solana/charge", {
1330
+ amount: atomic.toString(),
1331
+ currency: opts.solanaTokenMint ?? USDC.solana.mainnet.mint,
1332
+ decimals: 6,
1333
+ recipient: opts.solanaRecipient,
1334
+ network: opts.solanaNetwork ?? "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp"
1335
+ }]);
1336
+ }
1337
+ if (opts.includeStripe !== false) {
1338
+ const amountUsdNumeric = Number(opts.amountUsd);
1339
+ if (Number.isFinite(amountUsdNumeric) && amountUsdNumeric < STRIPE_MIN_CHARGE_USD) {
1340
+ if (!warnedStripeBelowMinimum) {
1341
+ warnedStripeBelowMinimum = true;
1342
+ console.warn(
1343
+ `[buildMppxComposeRails] Dropping stripe/charge rail: amountUsd=${opts.amountUsd} is below Stripe's $${STRIPE_MIN_CHARGE_USD.toFixed(2)} USD minimum. Stripe's fixed ~$0.30 fee makes sub-50-cent charges unprofitable (and many accounts reject PI creation with amount_too_small below this floor). Pass includeStripe: false to suppress this warning.`
1344
+ );
1345
+ }
1346
+ } else {
1347
+ rails2.push(["stripe/charge", { amount: opts.amountUsd, currency: "usd", decimals: 2 }]);
1348
+ }
1349
+ }
1350
+ return rails2;
1351
+ }
1352
+
1353
+ // src/payment/default_rails.ts
1354
+ function buildDefaultCheckoutRails(opts) {
1355
+ const out = {};
1356
+ if (opts.tempo) {
1357
+ out.tempo = { recipient: "", ...RAIL_SPEC_DEFAULTS.tempo, ...opts.tempo };
1358
+ }
1359
+ if (opts.x402Base) {
1360
+ const merged = { recipient: "", ...RAIL_SPEC_DEFAULTS.x402Base, ...opts.x402Base };
1361
+ if (merged.network === networks.base.sepolia.caip2) {
1362
+ if (opts.x402Base.chainId === void 0) merged.chainId = networks.base.sepolia.chainId;
1363
+ if (opts.x402Base.token === void 0) merged.token = USDC.base.sepolia.address;
1364
+ } else if (merged.network === networks.base.mainnet.caip2) {
1365
+ if (opts.x402Base.chainId === void 0) merged.chainId = networks.base.mainnet.chainId;
1366
+ if (opts.x402Base.token === void 0) merged.token = USDC.base.mainnet.address;
1367
+ }
1368
+ out.x402_base = merged;
1369
+ }
1370
+ if (opts.solanaMpp) {
1371
+ const merged = { recipient: "", ...RAIL_SPEC_DEFAULTS.solanaMpp, ...opts.solanaMpp };
1372
+ const isDevnet = merged.network === "devnet" || merged.network === networks.solana.devnet.caip2;
1373
+ if (isDevnet && opts.solanaMpp.token === void 0) {
1374
+ merged.token = USDC.solana.devnet.mint;
1375
+ }
1376
+ out.solana_mpp = merged;
1377
+ }
1378
+ if (opts.stripe) {
1379
+ out.stripe = { ...RAIL_SPEC_DEFAULTS.stripe, ...opts.stripe };
1380
+ }
1381
+ return out;
1382
+ }
1383
+
1384
+ // src/payment/payment_header.ts
1385
+ function toTitleCase(name) {
1386
+ return name.replace(/(^|-)([a-z])/g, (_m, sep, c) => sep + c.toUpperCase());
1387
+ }
1388
+ function readHeader(headers, name) {
1389
+ if (typeof headers.get === "function") {
1390
+ return headers.get(name);
1391
+ }
1392
+ const rec = headers;
1393
+ const v = rec[name] ?? rec[name.toLowerCase()] ?? rec[toTitleCase(name)];
1394
+ if (typeof v === "string") return v;
1395
+ if (Array.isArray(v) && typeof v[0] === "string") return v[0];
1396
+ return null;
1397
+ }
1398
+ function asHeaders(input) {
1399
+ return typeof input.headers === "object" && input instanceof Request ? input.headers : input;
1400
+ }
1401
+ function hasPaymentHeader(input) {
1402
+ const headers = asHeaders(input);
1403
+ return Boolean(
1404
+ readHeader(headers, "payment-signature") || readHeader(headers, "x-payment") || readHeader(headers, "authorization")?.startsWith("Payment ")
1405
+ );
1406
+ }
1407
+ function hasX402Header(input) {
1408
+ const headers = asHeaders(input);
1409
+ return Boolean(readHeader(headers, "payment-signature") || readHeader(headers, "x-payment"));
1410
+ }
1411
+ function hasMppxHeader(input) {
1412
+ const headers = asHeaders(input);
1413
+ return Boolean(readHeader(headers, "authorization")?.startsWith("Payment "));
1414
+ }
1415
+
1416
+ // src/payment/network_kind.ts
1417
+ function readNetwork(input) {
1418
+ if (typeof input === "string") return input;
1419
+ if (input && typeof input === "object") {
1420
+ const network = input.network;
1421
+ return typeof network === "string" ? network : "";
1422
+ }
1423
+ return "";
1424
+ }
1425
+ function isEvmNetwork(input) {
1426
+ return readNetwork(input).startsWith("eip155:");
1427
+ }
1428
+ function isSolanaNetwork(input) {
1429
+ return readNetwork(input).startsWith("solana:");
1430
+ }
1238
1431
  // Annotate the CommonJS export names for ESM import in node:
1239
1432
  0 && (module.exports = {
1240
1433
  RAIL_SPEC_DEFAULTS,
@@ -1242,7 +1435,10 @@ async function loadSolanaFeePayer(opts) {
1242
1435
  USDC,
1243
1436
  X402_SUPPORTED_BASE_NETWORKS,
1244
1437
  aliasAmountFields,
1438
+ asHeaders,
1439
+ buildDefaultCheckoutRails,
1245
1440
  buildIdempotencyKey,
1441
+ buildMppxComposeRails,
1246
1442
  buildPaymentDirective,
1247
1443
  buildPaymentHeaders,
1248
1444
  buildPaymentRequestBlob,
@@ -1258,6 +1454,11 @@ async function loadSolanaFeePayer(opts) {
1258
1454
  extractPaymentSignerFromAuth,
1259
1455
  extractSignerForPrecheck,
1260
1456
  formatUsdCents,
1457
+ hasMppxHeader,
1458
+ hasPaymentHeader,
1459
+ hasX402Header,
1460
+ isEvmNetwork,
1461
+ isSolanaNetwork,
1261
1462
  lazyMppxServer,
1262
1463
  lazyX402Server,
1263
1464
  loadSolanaFeePayer,
@@ -1269,9 +1470,11 @@ async function loadSolanaFeePayer(opts) {
1269
1470
  paymentRequiredHeader,
1270
1471
  processX402Settle,
1271
1472
  rails,
1473
+ readHeader,
1272
1474
  readX402PaymentHeader,
1273
1475
  registerX402SchemesV1V2,
1274
1476
  resolveRecipient,
1477
+ runWithMppxFailureCapture,
1275
1478
  settlementOverrideHeader,
1276
1479
  usdToAtomic,
1277
1480
  validateX402NetworkConfig,