@agent-score/commerce 2.0.0 → 2.0.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.
- package/dist/{checkout-BoFwnVsj.d.ts → checkout-B1JuEcbx.d.ts} +8 -0
- package/dist/{checkout-DRbQ0Fsh.d.mts → checkout-BN5i1Fi7.d.mts} +8 -0
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/discovery/index.d.mts +1 -1
- package/dist/discovery/index.d.ts +1 -1
- package/dist/identity/express.js +1 -1
- package/dist/identity/express.mjs +1 -1
- package/dist/identity/fastify.js +1 -1
- package/dist/identity/fastify.mjs +1 -1
- package/dist/identity/hono.js +1 -1
- package/dist/identity/hono.mjs +1 -1
- package/dist/identity/nextjs.js +1 -1
- package/dist/identity/nextjs.mjs +1 -1
- package/dist/identity/policy.js +19751 -106
- package/dist/identity/policy.js.map +1 -1
- package/dist/identity/policy.mjs +19756 -91
- package/dist/identity/policy.mjs.map +1 -1
- package/dist/identity/web.js +1 -1
- package/dist/identity/web.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +19881 -236
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19897 -232
- package/dist/index.mjs.map +1 -1
- package/dist/payment/index.d.mts +42 -1
- package/dist/payment/index.d.ts +42 -1
- package/dist/payment/index.js +19 -0
- package/dist/payment/index.js.map +1 -1
- package/dist/payment/index.mjs +17 -0
- package/dist/payment/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/payment/index.mjs
CHANGED
|
@@ -742,6 +742,21 @@ function wrapSolanaChargeWithFinalizedBlockhash(baseMethod, rpcUrl) {
|
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
744
|
}
|
|
745
|
+
async function composeMppxRequest(mppx, intents, request) {
|
|
746
|
+
if (!mppx || typeof mppx !== "object" || !("compose" in mppx)) {
|
|
747
|
+
throw new Error("composeMppxRequest: argument is not an mppx server instance");
|
|
748
|
+
}
|
|
749
|
+
const compose = mppx.compose;
|
|
750
|
+
if (typeof compose !== "function") {
|
|
751
|
+
throw new Error("composeMppxRequest: mppx.compose is not a function");
|
|
752
|
+
}
|
|
753
|
+
const typedCompose = compose;
|
|
754
|
+
const handler = typedCompose.apply(mppx, [...intents]);
|
|
755
|
+
return handler(request);
|
|
756
|
+
}
|
|
757
|
+
function mppxChallengeHeaders(result) {
|
|
758
|
+
return Object.fromEntries(result.challenge.headers);
|
|
759
|
+
}
|
|
745
760
|
|
|
746
761
|
// src/payment/dispatch.ts
|
|
747
762
|
function detectRailFromHeaders(headers) {
|
|
@@ -1166,6 +1181,7 @@ export {
|
|
|
1166
1181
|
buildX402AcceptsFor402,
|
|
1167
1182
|
classifyOrchestrationError,
|
|
1168
1183
|
classifyX402SettleResult,
|
|
1184
|
+
composeMppxRequest,
|
|
1169
1185
|
createMppxServer,
|
|
1170
1186
|
createX402Server,
|
|
1171
1187
|
detectRailFromHeaders,
|
|
@@ -1178,6 +1194,7 @@ export {
|
|
|
1178
1194
|
lazyX402Server,
|
|
1179
1195
|
loadSolanaFeePayer,
|
|
1180
1196
|
lookupRail,
|
|
1197
|
+
mppxChallengeHeaders,
|
|
1181
1198
|
networkFamily,
|
|
1182
1199
|
networks,
|
|
1183
1200
|
paymentDirective,
|