@devlab.group/agent-commerce 1.4.1 → 1.6.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 (44) hide show
  1. package/README.md +168 -183
  2. package/dist/ap2.d.ts +21 -24
  3. package/dist/ap2.js +68 -82
  4. package/dist/ap2.js.map +1 -1
  5. package/dist/authorization-BpbWGGrf.d.ts +115 -0
  6. package/dist/{chunk-NWIQLJNU.js → chunk-74BSEXB5.js} +37 -34
  7. package/dist/chunk-74BSEXB5.js.map +1 -0
  8. package/dist/chunk-AFI2CEZS.js +10 -0
  9. package/dist/chunk-AFI2CEZS.js.map +1 -0
  10. package/dist/chunk-ATTWSFQP.js +680 -0
  11. package/dist/chunk-ATTWSFQP.js.map +1 -0
  12. package/dist/{chunk-ZEGFLRGV.js → chunk-IVJC5YLE.js} +63 -26
  13. package/dist/chunk-IVJC5YLE.js.map +1 -0
  14. package/dist/{chunk-GF6KHHKL.js → chunk-RAJGPGJG.js} +5 -8
  15. package/dist/chunk-RAJGPGJG.js.map +1 -0
  16. package/dist/chunk-V2V2E7HX.js +27 -0
  17. package/dist/chunk-V2V2E7HX.js.map +1 -0
  18. package/dist/cli/index.js +812 -573
  19. package/dist/cli/index.js.map +1 -1
  20. package/dist/constants-Bkq04FRZ.d.ts +48 -0
  21. package/dist/guardrails-71XwtXlT.d.ts +31 -0
  22. package/dist/index.d.ts +245 -265
  23. package/dist/index.js +1222 -626
  24. package/dist/index.js.map +1 -1
  25. package/dist/mcp.d.ts +6 -59
  26. package/dist/mcp.js +64 -53
  27. package/dist/mcp.js.map +1 -1
  28. package/dist/mpp.d.ts +50 -0
  29. package/dist/mpp.js +353 -0
  30. package/dist/mpp.js.map +1 -0
  31. package/dist/protocol-adapter-DTkrXTev.d.ts +238 -0
  32. package/dist/runtime-CiYbgGpi.d.ts +303 -0
  33. package/dist/{types-CJtwLu1c.d.ts → types-O6lg3Q5V.d.ts} +17 -23
  34. package/dist/x402.d.ts +43 -75
  35. package/dist/x402.js +13 -693
  36. package/dist/x402.js.map +1 -1
  37. package/package.json +13 -2
  38. package/dist/authorization-CPDcpJVa.d.ts +0 -123
  39. package/dist/chunk-GF6KHHKL.js.map +0 -1
  40. package/dist/chunk-NWIQLJNU.js.map +0 -1
  41. package/dist/chunk-ZEGFLRGV.js.map +0 -1
  42. package/dist/guardrails-Dmwi63KB.d.ts +0 -38
  43. package/dist/protocol-adapter-Bebmggf_.d.ts +0 -273
  44. package/dist/runtime-CKq3d_3K.d.ts +0 -340
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The one MPP profile this rail targets.
3
+ *
4
+ * MPP combines a core HTTP authentication layer, an intent, a method and
5
+ * optional extensions. These constants identify the selected combination and
6
+ * the exact specification revision.
7
+ *
8
+ * Importing this metadata does not load `mppx`.
9
+ */
10
+ /** Upstream specification repository the pinned drafts were read from */
11
+ declare const MPP_SPEC_REPOSITORY = "https://github.com/tempoxyz/mpp-specs";
12
+ /**
13
+ * Upstream commit the pinned drafts were read at.
14
+ *
15
+ * A draft's content can change without its `-00` name changing, so the name
16
+ * alone does not identify a document; the commit does.
17
+ */
18
+ declare const MPP_SPEC_COMMIT = "806fdb8b8c92cda5c84b8660558921b6bbeef7e0";
19
+ /** The core HTTP authentication draft, the `charge` intent, and its EVM method */
20
+ declare const MPP_SPEC_DRAFTS: {
21
+ readonly core: "draft-httpauth-payment-00";
22
+ readonly intent: "draft-payment-intent-charge-00";
23
+ readonly method: "draft-evm-charge-00";
24
+ };
25
+ /** Exact `mppx` release the rail is pinned to */
26
+ declare const MPPX_VERSION = "0.10.1";
27
+ /**
28
+ * The pinned profile.
29
+ *
30
+ * `intent`, `method` and `credentialType` copy MPP wire identifiers from
31
+ * `mppx` so this module has no peer import; tests detect drift. `assetSymbol`
32
+ * is the pricing currency an MPP resource must use. EVM charge requests carry a
33
+ * numeric `chainId` and token address instead.
34
+ */
35
+ declare const MPP_PROFILE: {
36
+ readonly intent: "charge";
37
+ readonly method: "evm";
38
+ readonly credentialType: "authorization";
39
+ readonly assetSymbol: "USDC";
40
+ readonly assetDecimals: 6;
41
+ };
42
+ /** Supported CAIP-2 networks; gateway config applies the x402 mainnet guardrails */
43
+ declare const MPP_NETWORKS: readonly ["eip155:84532", "eip155:8453"];
44
+ type MppNetwork = (typeof MPP_NETWORKS)[number];
45
+ /** Compact descriptor value naming the core draft, intent and method */
46
+ declare const MPP_SUPPORTED_SPEC: string;
47
+
48
+ export { type MppNetwork as M, MPPX_VERSION as a, MPP_PROFILE as b, MPP_SPEC_COMMIT as c, MPP_SPEC_DRAFTS as d, MPP_SPEC_REPOSITORY as e, MPP_SUPPORTED_SPEC as f };
@@ -0,0 +1,31 @@
1
+ /**
2
+ * How the gateway authenticates to a remote facilitator.
3
+ *
4
+ * - `none`: send no credential; use it when the facilitator accepts
5
+ * anonymous requests.
6
+ * - `bearer`: send a static token; no extra peer package is needed.
7
+ * - `cdp`: Coinbase Developer Platform. The optional peer `@coinbase/x402`,
8
+ * imported only for this type, signs a fresh JWT per request.
9
+ *
10
+ * Any other auth type is refused at config load.
11
+ */
12
+ type FacilitatorAuth = {
13
+ readonly type: 'none';
14
+ } | {
15
+ readonly type: 'bearer';
16
+ readonly token: string;
17
+ } | {
18
+ readonly type: 'cdp';
19
+ readonly apiKeyId: string;
20
+ readonly apiKeySecret: string;
21
+ };
22
+ type X402FacilitatorConfig = {
23
+ readonly mode: 'local';
24
+ readonly signerPrivateKey: string;
25
+ } | {
26
+ readonly mode: 'remote';
27
+ readonly url: string;
28
+ readonly auth: FacilitatorAuth;
29
+ };
30
+
31
+ export type { FacilitatorAuth as F, X402FacilitatorConfig as X };