@agent-score/commerce 2.1.1 → 2.3.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/README.md +2 -2
- package/dist/challenge/index.d.mts +3 -3
- package/dist/challenge/index.d.ts +3 -3
- package/dist/challenge/index.js +7 -5
- package/dist/challenge/index.js.map +1 -1
- package/dist/challenge/index.mjs +7 -5
- package/dist/challenge/index.mjs.map +1 -1
- package/dist/{checkout-BRw_caGr.d.mts → checkout-Ceo1_rVJ.d.mts} +38 -2
- package/dist/{checkout-CuSNUJFX.d.ts → checkout-ChyOi7aU.d.ts} +38 -2
- package/dist/core.js +4 -3
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +4 -3
- package/dist/core.mjs.map +1 -1
- package/dist/{default_rails-C5gKZJMI.d.ts → default_rails-DtR_E9N9.d.ts} +1 -1
- package/dist/{default_rails-XFCuRddA.d.mts → default_rails-K25PtWrL.d.mts} +1 -1
- package/dist/discovery/index.d.mts +4 -4
- package/dist/discovery/index.d.ts +4 -4
- package/dist/identity/express.d.mts +4 -3
- package/dist/identity/express.d.ts +4 -3
- package/dist/identity/express.js +4 -3
- package/dist/identity/express.js.map +1 -1
- package/dist/identity/express.mjs +4 -3
- package/dist/identity/express.mjs.map +1 -1
- package/dist/identity/fastify.d.mts +4 -3
- package/dist/identity/fastify.d.ts +4 -3
- package/dist/identity/fastify.js +4 -3
- package/dist/identity/fastify.js.map +1 -1
- package/dist/identity/fastify.mjs +4 -3
- package/dist/identity/fastify.mjs.map +1 -1
- package/dist/identity/hono.d.mts +4 -3
- package/dist/identity/hono.d.ts +4 -3
- package/dist/identity/hono.js +4 -3
- package/dist/identity/hono.js.map +1 -1
- package/dist/identity/hono.mjs +4 -3
- package/dist/identity/hono.mjs.map +1 -1
- package/dist/identity/nextjs.js +4 -3
- package/dist/identity/nextjs.js.map +1 -1
- package/dist/identity/nextjs.mjs +4 -3
- package/dist/identity/nextjs.mjs.map +1 -1
- package/dist/identity/web.js +4 -3
- package/dist/identity/web.js.map +1 -1
- package/dist/identity/web.mjs +4 -3
- package/dist/identity/web.mjs.map +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +139 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +139 -13
- package/dist/index.mjs.map +1 -1
- package/dist/payment/index.d.mts +3 -3
- package/dist/payment/index.d.ts +3 -3
- package/dist/payment/index.js +2 -0
- package/dist/payment/index.js.map +1 -1
- package/dist/payment/index.mjs +2 -0
- package/dist/payment/index.mjs.map +1 -1
- package/dist/{pricing-DHfH3ogG.d.ts → pricing-B3-aKxSz.d.ts} +5 -3
- package/dist/{pricing-4n5Ota0D.d.mts → pricing-BReyZiqN.d.mts} +5 -3
- package/dist/{rail_spec-D6qzh3J0.d.mts → rail_spec-B1239jPp.d.mts} +25 -0
- package/dist/{rail_spec-D6qzh3J0.d.ts → rail_spec-B1239jPp.d.ts} +25 -0
- package/dist/stripe-multichain/index.d.mts +61 -11
- package/dist/stripe-multichain/index.d.ts +61 -11
- package/dist/stripe-multichain/index.js +84 -43
- package/dist/stripe-multichain/index.js.map +1 -1
- package/dist/stripe-multichain/index.mjs +83 -43
- package/dist/stripe-multichain/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/payment/index.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { T as TempoRailSpec, S as SolanaMppRailSpec, c as TempoSessionRailSpec, b as StripeRailSpec, X as X402BaseRailSpec } from '../rail_spec-
|
|
2
|
-
export { R as RAIL_SPEC_DEFAULTS, a as RecipientLike, r as resolveRecipient } from '../rail_spec-
|
|
1
|
+
import { T as TempoRailSpec, S as SolanaMppRailSpec, c as TempoSessionRailSpec, b as StripeRailSpec, X as X402BaseRailSpec } from '../rail_spec-B1239jPp.mjs';
|
|
2
|
+
export { R as RAIL_SPEC_DEFAULTS, a as RecipientLike, r as resolveRecipient } from '../rail_spec-B1239jPp.mjs';
|
|
3
3
|
import { a as X402Server } from '../x402_server-Ciz2mls2.mjs';
|
|
4
4
|
export { B as BuildX402AcceptsForOptions, C as CreateX402ServerOptions, X as X402FacilitatorChoice, b as X402SymbolicRail, c as buildX402AcceptsFor402, d as createX402Server } from '../x402_server-Ciz2mls2.mjs';
|
|
5
5
|
export { a as aliasAmountFields, p as paymentRequiredHeader, w as wwwAuthenticateHeader } from '../wwwauthenticate-D_FMnPgU.mjs';
|
|
6
6
|
import { S as SignerNetwork } from '../signer-3FAit11j.mjs';
|
|
7
7
|
export { P as PaymentSigner, e as extractPaymentSigner, a as extractPaymentSignerFromAuth, b as extractSignerForPrecheck, r as readX402PaymentHeader } from '../signer-3FAit11j.mjs';
|
|
8
|
-
export { B as BuildDefaultCheckoutRailsOptions, a as BuildMppxComposeRailsOptions, H as HeadersLike, b as asHeaders, c as buildDefaultCheckoutRails, d as buildMppxComposeRails, f as formatUsdCents, h as hasMppxHeader, e as hasPaymentHeader, g as hasX402Header, l as loadSolanaFeePayer, r as readHeader, u as usdToAtomic } from '../default_rails-
|
|
8
|
+
export { B as BuildDefaultCheckoutRailsOptions, a as BuildMppxComposeRailsOptions, H as HeadersLike, b as asHeaders, c as buildDefaultCheckoutRails, d as buildMppxComposeRails, f as formatUsdCents, h as hasMppxHeader, e as hasPaymentHeader, g as hasX402Header, l as loadSolanaFeePayer, r as readHeader, u as usdToAtomic } from '../default_rails-K25PtWrL.mjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Build the base64-encoded `request` blob for an MPP Payment directive (per the
|
package/dist/payment/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { T as TempoRailSpec, S as SolanaMppRailSpec, c as TempoSessionRailSpec, b as StripeRailSpec, X as X402BaseRailSpec } from '../rail_spec-
|
|
2
|
-
export { R as RAIL_SPEC_DEFAULTS, a as RecipientLike, r as resolveRecipient } from '../rail_spec-
|
|
1
|
+
import { T as TempoRailSpec, S as SolanaMppRailSpec, c as TempoSessionRailSpec, b as StripeRailSpec, X as X402BaseRailSpec } from '../rail_spec-B1239jPp.js';
|
|
2
|
+
export { R as RAIL_SPEC_DEFAULTS, a as RecipientLike, r as resolveRecipient } from '../rail_spec-B1239jPp.js';
|
|
3
3
|
import { a as X402Server } from '../x402_server-Ciz2mls2.js';
|
|
4
4
|
export { B as BuildX402AcceptsForOptions, C as CreateX402ServerOptions, X as X402FacilitatorChoice, b as X402SymbolicRail, c as buildX402AcceptsFor402, d as createX402Server } from '../x402_server-Ciz2mls2.js';
|
|
5
5
|
export { a as aliasAmountFields, p as paymentRequiredHeader, w as wwwAuthenticateHeader } from '../wwwauthenticate-D_FMnPgU.js';
|
|
6
6
|
import { S as SignerNetwork } from '../signer-3FAit11j.js';
|
|
7
7
|
export { P as PaymentSigner, e as extractPaymentSigner, a as extractPaymentSignerFromAuth, b as extractSignerForPrecheck, r as readX402PaymentHeader } from '../signer-3FAit11j.js';
|
|
8
|
-
export { B as BuildDefaultCheckoutRailsOptions, a as BuildMppxComposeRailsOptions, H as HeadersLike, b as asHeaders, c as buildDefaultCheckoutRails, d as buildMppxComposeRails, f as formatUsdCents, h as hasMppxHeader, e as hasPaymentHeader, g as hasX402Header, l as loadSolanaFeePayer, r as readHeader, u as usdToAtomic } from '../default_rails-
|
|
8
|
+
export { B as BuildDefaultCheckoutRailsOptions, a as BuildMppxComposeRailsOptions, H as HeadersLike, b as asHeaders, c as buildDefaultCheckoutRails, d as buildMppxComposeRails, f as formatUsdCents, h as hasMppxHeader, e as hasPaymentHeader, g as hasX402Header, l as loadSolanaFeePayer, r as readHeader, u as usdToAtomic } from '../default_rails-DtR_E9N9.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Build the base64-encoded `request` blob for an MPP Payment directive (per the
|
package/dist/payment/index.js
CHANGED
|
@@ -762,11 +762,13 @@ async function registerSolana(spec) {
|
|
|
762
762
|
"createMppxServer: SolanaMppRailSpec requires a string recipient (per-order factories not supported here)."
|
|
763
763
|
);
|
|
764
764
|
}
|
|
765
|
+
const ataCreationRequired = spec.ataCreationRequired !== false;
|
|
765
766
|
const baseMethod = solanaMpp.charge({
|
|
766
767
|
recipient: spec.recipient,
|
|
767
768
|
currency: spec.token ?? defaultMint,
|
|
768
769
|
decimals: spec.decimals ?? defaultDecimals,
|
|
769
770
|
network,
|
|
771
|
+
...ataCreationRequired ? { splits: [{ recipient: spec.recipient, amount: "0", ataCreationRequired: true }] } : {},
|
|
770
772
|
...spec.rpcUrl ? { rpcUrl: spec.rpcUrl } : {},
|
|
771
773
|
...spec.signer ? { signer: spec.signer } : {},
|
|
772
774
|
...spec.tokenProgram ? { tokenProgram: spec.tokenProgram } : {}
|