@astrasyncai/verification-gateway 5.18.0 → 5.19.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/CHANGELOG.md +178 -0
- package/README.md +168 -4
- package/dist/adapters/express.d.mts +9 -1
- package/dist/adapters/express.d.ts +9 -1
- package/dist/adapters/express.js +96 -37
- package/dist/adapters/express.js.map +1 -1
- package/dist/adapters/express.mjs +96 -37
- package/dist/adapters/express.mjs.map +1 -1
- package/dist/adapters/http-pdlss.d.mts +7 -1
- package/dist/adapters/http-pdlss.d.ts +7 -1
- package/dist/adapters/http-pdlss.js +18 -2
- package/dist/adapters/http-pdlss.js.map +1 -1
- package/dist/adapters/http-pdlss.mjs +16 -1
- package/dist/adapters/http-pdlss.mjs.map +1 -1
- package/dist/adapters/kit-express.d.mts +93 -1
- package/dist/adapters/kit-express.d.ts +93 -1
- package/dist/adapters/kit-express.js +181 -2
- package/dist/adapters/kit-express.js.map +1 -1
- package/dist/adapters/kit-express.mjs +180 -2
- package/dist/adapters/kit-express.mjs.map +1 -1
- package/dist/adapters/mcp.d.mts +80 -9
- package/dist/adapters/mcp.d.ts +80 -9
- package/dist/adapters/mcp.js +153 -5
- package/dist/adapters/mcp.js.map +1 -1
- package/dist/adapters/mcp.mjs +151 -5
- package/dist/adapters/mcp.mjs.map +1 -1
- package/dist/adapters/nextjs.d.mts +1 -1
- package/dist/adapters/nextjs.d.ts +1 -1
- package/dist/adapters/nextjs.js +41 -4
- package/dist/adapters/nextjs.js.map +1 -1
- package/dist/adapters/nextjs.mjs +41 -4
- package/dist/adapters/nextjs.mjs.map +1 -1
- package/dist/adapters/sdk.d.mts +44 -1
- package/dist/adapters/sdk.d.ts +44 -1
- package/dist/adapters/sdk.js +76 -2
- package/dist/adapters/sdk.js.map +1 -1
- package/dist/adapters/sdk.mjs +76 -2
- package/dist/adapters/sdk.mjs.map +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.js.map +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/agent/index.mjs.map +1 -1
- package/dist/bin/astrasync-claude-hook.js +46 -6
- package/dist/bin/astrasync-codex-hook.js +46 -6
- package/dist/bin/astrasync-guard.js +375 -117
- package/dist/bin/astrasync.js +417 -117
- package/dist/browser/background.js +46 -6
- package/dist/browser/background.js.map +1 -1
- package/dist/browser/background.mjs +46 -6
- package/dist/browser/background.mjs.map +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/cli/index.mjs.map +1 -1
- package/dist/codex/index.js +46 -6
- package/dist/codex/index.js.map +1 -1
- package/dist/codex/index.mjs +46 -6
- package/dist/codex/index.mjs.map +1 -1
- package/dist/cursor/extension.js +46 -6
- package/dist/cursor/extension.js.map +1 -1
- package/dist/cursor/extension.mjs +46 -6
- package/dist/cursor/extension.mjs.map +1 -1
- package/dist/edge-config.d.mts +1 -1
- package/dist/edge-config.d.ts +1 -1
- package/dist/edge-config.js +1 -1
- package/dist/edge-config.js.map +1 -1
- package/dist/edge-config.mjs +1 -1
- package/dist/edge-config.mjs.map +1 -1
- package/dist/edge-core/index.d.mts +1 -1
- package/dist/edge-core/index.d.ts +1 -1
- package/dist/edge-core/index.js +21 -2
- package/dist/edge-core/index.js.map +1 -1
- package/dist/edge-core/index.mjs +21 -2
- package/dist/edge-core/index.mjs.map +1 -1
- package/dist/gateway/gateway.js +46 -6
- package/dist/gateway/gateway.js.map +1 -1
- package/dist/gateway/gateway.mjs +46 -6
- package/dist/gateway/gateway.mjs.map +1 -1
- package/dist/git-trigger/git-hooks.d.mts +1 -1
- package/dist/git-trigger/git-hooks.d.ts +1 -1
- package/dist/index.d.mts +542 -30
- package/dist/index.d.ts +542 -30
- package/dist/index.js +1171 -183
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1157 -173
- package/dist/index.mjs.map +1 -1
- package/dist/registration/index.d.mts +1 -1
- package/dist/registration/index.d.ts +1 -1
- package/dist/registration/index.js +1 -1
- package/dist/registration/index.js.map +1 -1
- package/dist/registration/index.mjs +1 -1
- package/dist/registration/index.mjs.map +1 -1
- package/dist/transport/index.js +3 -2
- package/dist/transport/index.js.map +1 -1
- package/dist/transport/index.mjs +3 -2
- package/dist/transport/index.mjs.map +1 -1
- package/dist/{types-3ObBpsnf.d.mts → types-BoGjyon0.d.mts} +81 -2
- package/dist/{types-Cns4l8gX.d.mts → types-DqWPkiYl.d.mts} +90 -12
- package/dist/{types-Cns4l8gX.d.ts → types-DqWPkiYl.d.ts} +90 -12
- package/dist/{types-BoxZEYPS.d.ts → types-eWyZuz-3.d.ts} +81 -2
- package/dist/ui/index.d.mts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/verify.d.mts +23 -2
- package/dist/verify.d.ts +23 -2
- package/dist/verify.js +23 -4
- package/dist/verify.js.map +1 -1
- package/dist/verify.mjs +23 -4
- package/dist/verify.mjs.map +1 -1
- package/dist/webhooks.d.mts +16 -3
- package/dist/webhooks.d.ts +16 -3
- package/dist/webhooks.js +24 -13
- package/dist/webhooks.js.map +1 -1
- package/dist/webhooks.mjs +24 -13
- package/dist/webhooks.mjs.map +1 -1
- package/package.json +1 -1
package/dist/adapters/sdk.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TrustLevel, S as SDKOptions,
|
|
1
|
+
import { T as TrustLevel, S as SDKOptions, e as VerificationResult, d as VerificationRequest, A as AgentArtifacts, C as CheckoutMetadata } from '../types-DqWPkiYl.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Universal Verification Gateway — Trust Level helpers.
|
|
@@ -68,6 +68,37 @@ declare class VerificationGatewayClient {
|
|
|
68
68
|
subAgentDepth?: number;
|
|
69
69
|
counterpartyUrl?: string;
|
|
70
70
|
counterpartyType?: string;
|
|
71
|
+
/**
|
|
72
|
+
* 5.19.0: `'quote'` marks a price / limit check (peek only: no order, no
|
|
73
|
+
* approval redeemed) — prefer `quoteCheckout()`. Omitted with a
|
|
74
|
+
* `transactionValue`, the call is a PURCHASE leg (see the warning below).
|
|
75
|
+
*/
|
|
76
|
+
commercePhase?: 'quote';
|
|
77
|
+
}): Promise<VerificationResult>;
|
|
78
|
+
/**
|
|
79
|
+
* 5.19.0: the QUOTE leg of a checkout — a price / limit check before the
|
|
80
|
+
* purchase. Sends `commercePhase: 'quote'`: verify-access evaluates the
|
|
81
|
+
* agent's policy at this value and tells you whether a purchase would be
|
|
82
|
+
* granted, held for the owner's approval, or denied, but records no order,
|
|
83
|
+
* moves no money and never redeems an approval. Always reaches the backend
|
|
84
|
+
* (no verdict cache).
|
|
85
|
+
*
|
|
86
|
+
* Quotes count toward limit-probing detection: a run of rising quotes is
|
|
87
|
+
* how an agent (or a merchant) maps a spending limit. Quote what the buyer
|
|
88
|
+
* asked for, not a ladder of values.
|
|
89
|
+
*/
|
|
90
|
+
quoteCheckout(options: {
|
|
91
|
+
astraId?: string;
|
|
92
|
+
apiKey?: string;
|
|
93
|
+
jwt?: string;
|
|
94
|
+
purpose?: string;
|
|
95
|
+
action?: string;
|
|
96
|
+
transactionValue?: number;
|
|
97
|
+
currency?: string;
|
|
98
|
+
checkoutSessionId?: string;
|
|
99
|
+
attemptId?: string;
|
|
100
|
+
counterpartyUrl?: string;
|
|
101
|
+
counterpartyType?: string;
|
|
71
102
|
}): Promise<VerificationResult>;
|
|
72
103
|
/**
|
|
73
104
|
* 5.4.0 (astra-pay): confirm-leg of a checkout — the ONLY call that may fire
|
|
@@ -107,6 +138,14 @@ declare class VerificationGatewayClient {
|
|
|
107
138
|
* is matched to — and only to — this confirm. A held cart's approval is
|
|
108
139
|
* bound to its checkout session and exact value; a confirm for any other
|
|
109
140
|
* cart is held for its own approval.
|
|
141
|
+
*
|
|
142
|
+
* 5.19.0 checkout kits: pass the kit's `agentArtifacts` (the inbound agent
|
|
143
|
+
* request — signed RFC 9421 headers with the public URL and raw-body
|
|
144
|
+
* digest, or `{ unsigned: true }`) and `metadata` (`{ kitSessionId,
|
|
145
|
+
* protocol }`) from the `verifyPurchase` context. The platform attributes
|
|
146
|
+
* the confirm to the agent from the artifacts, and stores the metadata on
|
|
147
|
+
* any approval this confirm creates so the approval event
|
|
148
|
+
* (`handleApprovalEvents`) can find the kit session.
|
|
110
149
|
*/
|
|
111
150
|
confirmCheckout(options: {
|
|
112
151
|
astraId?: string;
|
|
@@ -125,6 +164,10 @@ declare class VerificationGatewayClient {
|
|
|
125
164
|
/** 5.6.0: alternate receipt/delivery email (transit-only) — omit to let
|
|
126
165
|
* the platform default `fulfilment.email` to the buyer's account email. */
|
|
127
166
|
buyerEmail?: string;
|
|
167
|
+
/** 5.19.0: the inbound agent request behind this confirm (from the kit's verifyPurchase ctx). */
|
|
168
|
+
agentArtifacts?: AgentArtifacts;
|
|
169
|
+
/** 5.19.0: `{ kitSessionId, protocol }` (from the kit's verifyPurchase ctx). */
|
|
170
|
+
metadata?: CheckoutMetadata;
|
|
128
171
|
counterpartyUrl?: string;
|
|
129
172
|
counterpartyType?: string;
|
|
130
173
|
}): Promise<VerificationResult>;
|
package/dist/adapters/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TrustLevel, S as SDKOptions,
|
|
1
|
+
import { T as TrustLevel, S as SDKOptions, e as VerificationResult, d as VerificationRequest, A as AgentArtifacts, C as CheckoutMetadata } from '../types-DqWPkiYl.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* AstraSync Universal Verification Gateway — Trust Level helpers.
|
|
@@ -68,6 +68,37 @@ declare class VerificationGatewayClient {
|
|
|
68
68
|
subAgentDepth?: number;
|
|
69
69
|
counterpartyUrl?: string;
|
|
70
70
|
counterpartyType?: string;
|
|
71
|
+
/**
|
|
72
|
+
* 5.19.0: `'quote'` marks a price / limit check (peek only: no order, no
|
|
73
|
+
* approval redeemed) — prefer `quoteCheckout()`. Omitted with a
|
|
74
|
+
* `transactionValue`, the call is a PURCHASE leg (see the warning below).
|
|
75
|
+
*/
|
|
76
|
+
commercePhase?: 'quote';
|
|
77
|
+
}): Promise<VerificationResult>;
|
|
78
|
+
/**
|
|
79
|
+
* 5.19.0: the QUOTE leg of a checkout — a price / limit check before the
|
|
80
|
+
* purchase. Sends `commercePhase: 'quote'`: verify-access evaluates the
|
|
81
|
+
* agent's policy at this value and tells you whether a purchase would be
|
|
82
|
+
* granted, held for the owner's approval, or denied, but records no order,
|
|
83
|
+
* moves no money and never redeems an approval. Always reaches the backend
|
|
84
|
+
* (no verdict cache).
|
|
85
|
+
*
|
|
86
|
+
* Quotes count toward limit-probing detection: a run of rising quotes is
|
|
87
|
+
* how an agent (or a merchant) maps a spending limit. Quote what the buyer
|
|
88
|
+
* asked for, not a ladder of values.
|
|
89
|
+
*/
|
|
90
|
+
quoteCheckout(options: {
|
|
91
|
+
astraId?: string;
|
|
92
|
+
apiKey?: string;
|
|
93
|
+
jwt?: string;
|
|
94
|
+
purpose?: string;
|
|
95
|
+
action?: string;
|
|
96
|
+
transactionValue?: number;
|
|
97
|
+
currency?: string;
|
|
98
|
+
checkoutSessionId?: string;
|
|
99
|
+
attemptId?: string;
|
|
100
|
+
counterpartyUrl?: string;
|
|
101
|
+
counterpartyType?: string;
|
|
71
102
|
}): Promise<VerificationResult>;
|
|
72
103
|
/**
|
|
73
104
|
* 5.4.0 (astra-pay): confirm-leg of a checkout — the ONLY call that may fire
|
|
@@ -107,6 +138,14 @@ declare class VerificationGatewayClient {
|
|
|
107
138
|
* is matched to — and only to — this confirm. A held cart's approval is
|
|
108
139
|
* bound to its checkout session and exact value; a confirm for any other
|
|
109
140
|
* cart is held for its own approval.
|
|
141
|
+
*
|
|
142
|
+
* 5.19.0 checkout kits: pass the kit's `agentArtifacts` (the inbound agent
|
|
143
|
+
* request — signed RFC 9421 headers with the public URL and raw-body
|
|
144
|
+
* digest, or `{ unsigned: true }`) and `metadata` (`{ kitSessionId,
|
|
145
|
+
* protocol }`) from the `verifyPurchase` context. The platform attributes
|
|
146
|
+
* the confirm to the agent from the artifacts, and stores the metadata on
|
|
147
|
+
* any approval this confirm creates so the approval event
|
|
148
|
+
* (`handleApprovalEvents`) can find the kit session.
|
|
110
149
|
*/
|
|
111
150
|
confirmCheckout(options: {
|
|
112
151
|
astraId?: string;
|
|
@@ -125,6 +164,10 @@ declare class VerificationGatewayClient {
|
|
|
125
164
|
/** 5.6.0: alternate receipt/delivery email (transit-only) — omit to let
|
|
126
165
|
* the platform default `fulfilment.email` to the buyer's account email. */
|
|
127
166
|
buyerEmail?: string;
|
|
167
|
+
/** 5.19.0: the inbound agent request behind this confirm (from the kit's verifyPurchase ctx). */
|
|
168
|
+
agentArtifacts?: AgentArtifacts;
|
|
169
|
+
/** 5.19.0: `{ kitSessionId, protocol }` (from the kit's verifyPurchase ctx). */
|
|
170
|
+
metadata?: CheckoutMetadata;
|
|
128
171
|
counterpartyUrl?: string;
|
|
129
172
|
counterpartyType?: string;
|
|
130
173
|
}): Promise<VerificationResult>;
|
package/dist/adapters/sdk.js
CHANGED
|
@@ -28,7 +28,7 @@ __export(sdk_exports, {
|
|
|
28
28
|
module.exports = __toCommonJS(sdk_exports);
|
|
29
29
|
|
|
30
30
|
// src/version.ts
|
|
31
|
-
var SDK_VERSION = "5.
|
|
31
|
+
var SDK_VERSION = "5.19.0";
|
|
32
32
|
|
|
33
33
|
// src/http.ts
|
|
34
34
|
var SDK_USER_AGENT = `astrasync-sdk/${SDK_VERSION}`;
|
|
@@ -206,7 +206,12 @@ function getCacheKey(request, counterpartyId) {
|
|
|
206
206
|
// its start_checkout quote was served the cached quote-leg grant (no
|
|
207
207
|
// settlementOutcome) and never reached the backend. Same F-A1-07 bug class.
|
|
208
208
|
request.commercePhase || "",
|
|
209
|
-
request.checkoutSessionId || ""
|
|
209
|
+
request.checkoutSessionId || "",
|
|
210
|
+
// 5.19.0: a route_config purpose claim is checked server-side against
|
|
211
|
+
// the stored rule for this method + path, so it changes the verdict.
|
|
212
|
+
request.purposeSource || "",
|
|
213
|
+
request.requestMethod || "",
|
|
214
|
+
request.requestPath || ""
|
|
210
215
|
].join("|");
|
|
211
216
|
}
|
|
212
217
|
function getCachedResult(request, counterpartyId) {
|
|
@@ -383,6 +388,11 @@ async function callVerifyAccessAPI(config, request) {
|
|
|
383
388
|
if (requestData.buyerEmail) body.buyerEmail = requestData.buyerEmail;
|
|
384
389
|
if (requestData.commerceArtifacts) body.commerceArtifacts = requestData.commerceArtifacts;
|
|
385
390
|
if (requestData.attemptId) body.attemptId = requestData.attemptId;
|
|
391
|
+
if (requestData.purposeSource) body.purposeSource = requestData.purposeSource;
|
|
392
|
+
if (requestData.agentArtifacts) body.agentArtifacts = requestData.agentArtifacts;
|
|
393
|
+
if (requestData.metadata) body.metadata = requestData.metadata;
|
|
394
|
+
if (requestData.requestMethod) body.requestMethod = requestData.requestMethod;
|
|
395
|
+
if (requestData.requestPath) body.requestPath = requestData.requestPath;
|
|
386
396
|
if (requestData.considerationSet) body.considerationSet = requestData.considerationSet;
|
|
387
397
|
body.sdkVersion = SDK_VERSION;
|
|
388
398
|
if (requestData.callerMetadata || requestData.clientIp || requestData.userAgent) {
|
|
@@ -572,9 +582,18 @@ async function verify(config, request, options) {
|
|
|
572
582
|
if (!apiResponse.access?.allowed) {
|
|
573
583
|
const aggregatedFailures = apiResponse.access?.failures;
|
|
574
584
|
const idVerifiedFromBackend = apiResponse.verificationContext?.idVerified === true && !aggregatedFailures?.some((f) => REJECTED_IDENTITY_DIMENSIONS.has(f.dimension));
|
|
585
|
+
const denyAgent = idVerifiedFromBackend && apiResponse.agent ? {
|
|
586
|
+
astraId: apiResponse.agent.astraId,
|
|
587
|
+
name: apiResponse.agent.name,
|
|
588
|
+
trustScore: apiResponse.agent.trustScore,
|
|
589
|
+
trustLevel: getTrustLevel(apiResponse.agent.trustScore),
|
|
590
|
+
blockchainAnchored: apiResponse.agent.blockchainStatus === "anchored",
|
|
591
|
+
status: apiResponse.agent.agentStatus
|
|
592
|
+
} : void 0;
|
|
575
593
|
const result2 = {
|
|
576
594
|
identityVerified: idVerifiedFromBackend,
|
|
577
595
|
policyAllowed: false,
|
|
596
|
+
...denyAgent && { agent: denyAgent },
|
|
578
597
|
// 3.6.0: the server now emits top-level denialReasons on every deny
|
|
579
598
|
// path — prefer it verbatim; the failure-message reconstruction remains
|
|
580
599
|
// as the fallback for older backends.
|
|
@@ -745,6 +764,7 @@ var SettlementReportError = class extends AstraSyncError {
|
|
|
745
764
|
};
|
|
746
765
|
|
|
747
766
|
// src/adapters/sdk.ts
|
|
767
|
+
var warnedPhaselessValue = false;
|
|
748
768
|
var VerificationGatewayClient = class {
|
|
749
769
|
constructor(options) {
|
|
750
770
|
this.config = {
|
|
@@ -776,9 +796,16 @@ var VerificationGatewayClient = class {
|
|
|
776
796
|
apiKey: options.apiKey,
|
|
777
797
|
jwt: options.jwt
|
|
778
798
|
};
|
|
799
|
+
if (options.transactionValue && !options.commercePhase && !warnedPhaselessValue) {
|
|
800
|
+
warnedPhaselessValue = true;
|
|
801
|
+
console.warn(
|
|
802
|
+
"[astrasync] verify() with a transactionValue and no commercePhase is a purchase leg: it records a pending order and redeems a matching owner approval. Use quoteCheckout() for a price / limit check (commercePhase 'quote') and confirmCheckout() for the purchase. The default becomes 'quote' in 6.0."
|
|
803
|
+
);
|
|
804
|
+
}
|
|
779
805
|
return this.executeWithRetry(
|
|
780
806
|
() => verify(this.config, {
|
|
781
807
|
credentials,
|
|
808
|
+
...options.commercePhase && { commercePhase: options.commercePhase },
|
|
782
809
|
purpose: options.purpose,
|
|
783
810
|
action: options.action,
|
|
784
811
|
resourceType: options.resourceType,
|
|
@@ -794,6 +821,43 @@ var VerificationGatewayClient = class {
|
|
|
794
821
|
})
|
|
795
822
|
);
|
|
796
823
|
}
|
|
824
|
+
/**
|
|
825
|
+
* 5.19.0: the QUOTE leg of a checkout — a price / limit check before the
|
|
826
|
+
* purchase. Sends `commercePhase: 'quote'`: verify-access evaluates the
|
|
827
|
+
* agent's policy at this value and tells you whether a purchase would be
|
|
828
|
+
* granted, held for the owner's approval, or denied, but records no order,
|
|
829
|
+
* moves no money and never redeems an approval. Always reaches the backend
|
|
830
|
+
* (no verdict cache).
|
|
831
|
+
*
|
|
832
|
+
* Quotes count toward limit-probing detection: a run of rising quotes is
|
|
833
|
+
* how an agent (or a merchant) maps a spending limit. Quote what the buyer
|
|
834
|
+
* asked for, not a ladder of values.
|
|
835
|
+
*/
|
|
836
|
+
async quoteCheckout(options) {
|
|
837
|
+
const credentials = {
|
|
838
|
+
astraId: options.astraId,
|
|
839
|
+
apiKey: options.apiKey,
|
|
840
|
+
jwt: options.jwt
|
|
841
|
+
};
|
|
842
|
+
return this.executeWithRetry(
|
|
843
|
+
() => verify(
|
|
844
|
+
this.config,
|
|
845
|
+
{
|
|
846
|
+
credentials,
|
|
847
|
+
purpose: options.purpose ?? "shopping",
|
|
848
|
+
action: options.action ?? "shopping.purchase",
|
|
849
|
+
transactionValue: options.transactionValue,
|
|
850
|
+
currency: options.currency,
|
|
851
|
+
commercePhase: "quote",
|
|
852
|
+
...options.checkoutSessionId && { checkoutSessionId: options.checkoutSessionId },
|
|
853
|
+
...options.attemptId && { attemptId: options.attemptId },
|
|
854
|
+
counterpartyUrl: options.counterpartyUrl,
|
|
855
|
+
counterpartyType: options.counterpartyType
|
|
856
|
+
},
|
|
857
|
+
{ bypassCache: true }
|
|
858
|
+
)
|
|
859
|
+
);
|
|
860
|
+
}
|
|
797
861
|
/**
|
|
798
862
|
* 5.4.0 (astra-pay): confirm-leg of a checkout — the ONLY call that may fire
|
|
799
863
|
* first-party charge-at-redeem (server-side settlement on the owner's saved
|
|
@@ -832,6 +896,14 @@ var VerificationGatewayClient = class {
|
|
|
832
896
|
* is matched to — and only to — this confirm. A held cart's approval is
|
|
833
897
|
* bound to its checkout session and exact value; a confirm for any other
|
|
834
898
|
* cart is held for its own approval.
|
|
899
|
+
*
|
|
900
|
+
* 5.19.0 checkout kits: pass the kit's `agentArtifacts` (the inbound agent
|
|
901
|
+
* request — signed RFC 9421 headers with the public URL and raw-body
|
|
902
|
+
* digest, or `{ unsigned: true }`) and `metadata` (`{ kitSessionId,
|
|
903
|
+
* protocol }`) from the `verifyPurchase` context. The platform attributes
|
|
904
|
+
* the confirm to the agent from the artifacts, and stores the metadata on
|
|
905
|
+
* any approval this confirm creates so the approval event
|
|
906
|
+
* (`handleApprovalEvents`) can find the kit session.
|
|
835
907
|
*/
|
|
836
908
|
async confirmCheckout(options) {
|
|
837
909
|
const credentials = {
|
|
@@ -854,6 +926,8 @@ var VerificationGatewayClient = class {
|
|
|
854
926
|
...options.checkoutJwt && { checkoutJwt: options.checkoutJwt },
|
|
855
927
|
...options.attemptId && { attemptId: options.attemptId },
|
|
856
928
|
buyerEmail: options.buyerEmail,
|
|
929
|
+
...options.agentArtifacts && { agentArtifacts: options.agentArtifacts },
|
|
930
|
+
...options.metadata && { metadata: options.metadata },
|
|
857
931
|
counterpartyUrl: options.counterpartyUrl,
|
|
858
932
|
counterpartyType: options.counterpartyType
|
|
859
933
|
},
|