@agent-score/commerce 1.6.0 → 1.7.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.
package/dist/index.mjs CHANGED
@@ -500,6 +500,42 @@ function buildUCPProfile(input) {
500
500
  return profile;
501
501
  }
502
502
  var AGENTSCORE_UCP_CAPABILITY = AGENTSCORE_CAPABILITY_NAME;
503
+ var HANDLER_VERSION = "2026-04-08";
504
+ var SPEC_BASE = "https://agentscore.sh/specification/payment-handlers";
505
+ var SCHEMA_BASE = "https://agentscore.sh/schemas/payment-handlers";
506
+ function mppPaymentHandler(input) {
507
+ return {
508
+ "sh.agentscore.payment.mpp": [{
509
+ id: "mpp",
510
+ version: HANDLER_VERSION,
511
+ spec: `${SPEC_BASE}/mpp`,
512
+ schema: `${SCHEMA_BASE}/mpp.json`,
513
+ config: { networks: input.networks }
514
+ }]
515
+ };
516
+ }
517
+ function x402PaymentHandler(input) {
518
+ return {
519
+ "sh.agentscore.payment.x402": [{
520
+ id: "x402",
521
+ version: HANDLER_VERSION,
522
+ spec: `${SPEC_BASE}/x402`,
523
+ schema: `${SCHEMA_BASE}/x402.json`,
524
+ config: { networks: input.networks }
525
+ }]
526
+ };
527
+ }
528
+ function stripeSptPaymentHandler(input) {
529
+ return {
530
+ "sh.agentscore.payment.stripe_spt": [{
531
+ id: "stripe-spt",
532
+ version: HANDLER_VERSION,
533
+ spec: `${SPEC_BASE}/stripe_spt`,
534
+ schema: `${SCHEMA_BASE}/stripe_spt.json`,
535
+ config: { rail: "stripe-spt", profile_id: input.profile_id }
536
+ }]
537
+ };
538
+ }
503
539
 
504
540
  // src/identity/ucp-jwks.ts
505
541
  var JOSE_INSTALL_HINT = "Install the optional peer dependency: `npm install jose@^6` (or `bun add jose`). Tested against jose v6.x.";
@@ -838,13 +874,16 @@ export {
838
874
  extractPaymentSignerAddress,
839
875
  generateUCPSigningKey,
840
876
  isFixableDenial,
877
+ mppPaymentHandler,
841
878
  readX402PaymentHeader,
842
879
  runGateWithEnforcement,
843
880
  shippingCountryAllowed,
844
881
  shippingStateAllowed,
845
882
  signUCPProfile,
883
+ stripeSptPaymentHandler,
846
884
  ucpA2AExtension,
847
885
  verificationAgentInstructions,
848
- verifyUCPProfile
886
+ verifyUCPProfile,
887
+ x402PaymentHandler
849
888
  };
850
889
  //# sourceMappingURL=index.mjs.map