@agent-cards/sdk 0.24.0 → 0.24.2
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 +32 -0
- package/README.md +61 -4
- package/dist/adyen-merchant-hosted.generated.d.ts +1 -1
- package/dist/adyen-merchant-hosted.generated.js +128 -35
- package/dist/agent-amount.generated.js +1 -1
- package/dist/aurus.d.ts +33 -0
- package/dist/aurus.js +75 -0
- package/dist/builtin-registry.generated.js +1 -1
- package/dist/capabilities.generated.js +1 -1
- package/dist/card-fields.generated.js +1854 -440
- package/dist/cardlink-vpos.d.ts +43 -0
- package/dist/cardlink-vpos.js +90 -0
- package/dist/cdp.js +22 -0
- package/dist/checkout-com.generated.js +5 -1
- package/dist/client.d.ts +75 -0
- package/dist/client.js +75 -0
- package/dist/cybersource-flex.generated.d.ts +39 -1
- package/dist/cybersource-flex.generated.js +100 -11
- package/dist/eghl.d.ts +40 -0
- package/dist/eghl.js +72 -0
- package/dist/gmo.generated.js +7 -2
- package/dist/hosted-entry.js +2 -0
- package/dist/lifecycle.d.ts +10 -0
- package/dist/lifecycle.js +25 -0
- package/dist/paddle-tokenex.generated.js +7 -2
- package/dist/payrails.generated.js +7 -2
- package/dist/pre-claim.d.ts +5 -0
- package/dist/pre-claim.js +90 -2
- package/dist/preflight-catalog.json +179 -1
- package/dist/preflight-schemas.json +16 -0
- package/dist/preflight.generated.d.ts +5 -0
- package/dist/preflight.generated.js +49 -3
- package/dist/preparation.d.ts +7 -0
- package/dist/preparation.js +21 -0
- package/dist/primer.generated.js +1856 -442
- package/dist/shiji-sts.generated.js +7 -2
- package/dist/stripe-checkout.generated.js +1837 -475
- package/dist/substitutions.generated.js +94 -1
- package/dist/tap-payments.generated.js +7 -2
- package/dist/token-repeats.d.ts +32 -0
- package/dist/token-repeats.js +64 -0
- package/dist/twoc2p.generated.js +7 -2
- package/examples/preflight/kernel-native/inventory.json +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// Generated from @agent-cards/payment-core. Do not edit.
|
|
3
|
-
// artifact-sha256:
|
|
3
|
+
// artifact-sha256: f402656dc29200331356e78d920979d00a0768d87ea6c630e17c211455679d4b
|
|
4
4
|
// src/adyen-jwe.js
|
|
5
5
|
var ADYEN_JWE_HEADER = { alg: "RSA-OAEP-256", enc: "A256GCM", version: "1" };
|
|
6
6
|
var BASE64URL = /^[A-Za-z0-9_-]+$/;
|
|
@@ -1117,6 +1117,99 @@ var MERCHANT_HOSTED_PROFILES = /* @__PURE__ */ deepFreeze([
|
|
|
1117
1117
|
clientKey: "live_P7RRXHAHEVFTLPS3XUD3ML7ZWUEZ6BXN",
|
|
1118
1118
|
publicKeySha256: "3e0d4366563b714feb233d12ce98adcef3b606381596e097ca3a8123b9a91d67"
|
|
1119
1119
|
}
|
|
1120
|
+
},
|
|
1121
|
+
{
|
|
1122
|
+
// Read Nov 3, 2026, from www.lego.com's shipped US checkout (a Next.js app under /checkout, Apollo GraphQL) and a
|
|
1123
|
+
// card-free run on its guest checkout up to the card form (test contact details, no card typed, nothing pressed;
|
|
1124
|
+
// every non-GET to adyen.com aborted). The checkout's cart answer (CheckoutV2State, paymentMethodsV3.primary) names
|
|
1125
|
+
// CREDIT_CARD_ADYEN with environment 'live' and this client key, and the card form is adyen-web 6's secured fields
|
|
1126
|
+
// (securedFields 6.0.0 on checkoutshopper-live.adyen.com). Place order's handler (chunk 487, the CreditCard submit)
|
|
1127
|
+
// copies encryptedCardNumber, encryptedExpiryMonth, encryptedExpiryYear, encryptedSecurityCode, type and holderName
|
|
1128
|
+
// out of adyen-web's state.data.paymentMethod, with no brand, and sends the Apollo mutation AddAdyenPayment with
|
|
1129
|
+
// variables {input: {paymentReference: <the cart's orderNumber>, telephoneNumber, browserInfo, origin, paymentMethod,
|
|
1130
|
+
// returnUrl, storePaymentMethod, tracking}}. Apollo posts {operationName, variables, query} as JSON to the gateway
|
|
1131
|
+
// (www.lego.com/checkout/api/graphql), whose link adds the operation name to the path: every checkout operation in
|
|
1132
|
+
// the run went to /checkout/api/graphql/<operationName>. So the card request is Lego's own server, Adyen's Advanced
|
|
1133
|
+
// flow. A saved card goes as AddAdyenSavedCardPaymentV2, a gift card as AddGiftCardPaymentV2Mutation, each on its
|
|
1134
|
+
// own path. The body names no amount. Public key read from checkoutshopper-live.adyen.com on 2026-11-03 (UTC). Not
|
|
1135
|
+
// yet seen on the wire: the card request itself, which leaves only on Place order.
|
|
1136
|
+
// Enabled on Nov 4, 2026 under D1, so the Vault's bundled copy of this table carries it at the next Vault release. No
|
|
1137
|
+
// company is admitted yet: Agentcard's proof company joins through a flip in backend merchant-profile-orgs.ts after that
|
|
1138
|
+
// release. Felipe's approval of this change is his D1 decision for LEGO, and Karen's its PCI review.
|
|
1139
|
+
// No afterPayment reader yet: nobody has seen what LEGO answers after a placed order, so the charge is not compared with
|
|
1140
|
+
// the approved amount after payment and merchantChargeVerdict has nothing to read (Greptile on this change). The amount
|
|
1141
|
+
// is checked before payment (amountSource below). Until a reviewed afterPayment lands, built from the response the first
|
|
1142
|
+
// live run captures, Agentcard's proof company makes no purchase LEGO's Adyen approves: its runs use a card Adyen declines.
|
|
1143
|
+
id: "lego_checkout_add_adyen_payment",
|
|
1144
|
+
merchant: "LEGO",
|
|
1145
|
+
status: "enabled",
|
|
1146
|
+
origins: [{ checkout: "https://www.lego.com", endpoint: "https://www.lego.com" }],
|
|
1147
|
+
method: "POST",
|
|
1148
|
+
path: "/checkout/api/graphql/AddAdyenPayment",
|
|
1149
|
+
query: {},
|
|
1150
|
+
requires: [
|
|
1151
|
+
{ path: ["operationName"], equals: "AddAdyenPayment" },
|
|
1152
|
+
{ path: ["variables", "input", "paymentMethod", "type"], equals: "scheme" }
|
|
1153
|
+
],
|
|
1154
|
+
holder: ["variables", "input", "paymentMethod"],
|
|
1155
|
+
fields: {
|
|
1156
|
+
encryptedCardNumber: "encryptedCardNumber",
|
|
1157
|
+
encryptedExpiryMonth: "encryptedExpiryMonth",
|
|
1158
|
+
encryptedExpiryYear: "encryptedExpiryYear",
|
|
1159
|
+
encryptedSecurityCode: "encryptedSecurityCode"
|
|
1160
|
+
},
|
|
1161
|
+
// The page copies no brand out of adyen-web's state.
|
|
1162
|
+
remove: [],
|
|
1163
|
+
refuse: [
|
|
1164
|
+
{ path: ["variables", "input", "storePaymentMethod"], when: "true" },
|
|
1165
|
+
{ path: ["variables", "input", "paymentMethod", "storedPaymentMethodId"], when: "present" },
|
|
1166
|
+
{ path: ["variables", "input", "paymentMethod", "recurringDetailReference"], when: "present" }
|
|
1167
|
+
],
|
|
1168
|
+
amount: null,
|
|
1169
|
+
// Read Nov 3, 2026 (the run above). The checkout's cart answers carry the whole cart: CheckoutV2State at
|
|
1170
|
+
// data.me.cart, the address step at data.updateCartAddresses and the shipping step at data.setCartShippingMethod.
|
|
1171
|
+
// remainingTotalToPay is what is left for the card, in cents (1191 in the run, the page's Order Total $11.91), and
|
|
1172
|
+
// orderNumber is the paymentReference the card request sends, which ties each answer to it. A gift card already
|
|
1173
|
+
// applied shows in payments and lowers what is left below the order's total, so a cart with one is refused. Cart
|
|
1174
|
+
// changes whose answers were not seen in the run make the chosen answer stale.
|
|
1175
|
+
amountSource: {
|
|
1176
|
+
id: "lego_cart_remaining_total",
|
|
1177
|
+
origin: "endpoint",
|
|
1178
|
+
format: "json",
|
|
1179
|
+
responses: [
|
|
1180
|
+
{ method: "POST", path: "/checkout/api/graphql/CheckoutV2State", query: {}, at: ["data", "me", "cart"] },
|
|
1181
|
+
{ method: "POST", path: "/checkout/api/graphql/SetAddressMutation", query: {}, at: ["data", "updateCartAddresses"] },
|
|
1182
|
+
{ method: "POST", path: "/checkout/api/graphql/SetShippingMethodV2Mutation", query: {}, at: ["data", "setCartShippingMethod"] }
|
|
1183
|
+
],
|
|
1184
|
+
total: { path: ["remainingTotalToPay", "centAmount"], format: "number" },
|
|
1185
|
+
unit: "minor",
|
|
1186
|
+
currency: "USD",
|
|
1187
|
+
currencyPath: ["remainingTotalToPay", "currencyCode"],
|
|
1188
|
+
bind: [{ source: ["orderNumber"], card: ["variables", "input", "paymentReference"] }],
|
|
1189
|
+
refuse: [
|
|
1190
|
+
{ path: ["payments"], when: "nonEmpty" },
|
|
1191
|
+
// A GraphQL error result is not a total, even beside partial data.
|
|
1192
|
+
{ path: ["errors"], when: "present", root: true }
|
|
1193
|
+
],
|
|
1194
|
+
voidedBy: [
|
|
1195
|
+
{ method: "POST", path: "/checkout/api/graphql/AddGiftCardPaymentV2Mutation", query: {} },
|
|
1196
|
+
{ method: "POST", path: "/checkout/api/graphql/AddGiftCardOnlyPayment", query: {} },
|
|
1197
|
+
{ method: "POST", path: "/checkout/api/graphql/RemoveGiftCardPaymentMutations", query: {} },
|
|
1198
|
+
{ method: "POST", path: "/checkout/api/graphql/AddVipLineItemCheckout", query: {} },
|
|
1199
|
+
{ method: "POST", path: "/checkout/api/graphql/EditVipLineItemCheckout", query: {} },
|
|
1200
|
+
{ method: "POST", path: "/checkout/api/graphql/RemoveVipPointsLineItemCheckout", query: {} },
|
|
1201
|
+
{ method: "POST", path: "/checkout/api/graphql/SetShippingMethodOnlyMutation", query: {} },
|
|
1202
|
+
{ method: "POST", path: "/checkout/api/graphql/SetAddressMutationWithoutEmail", query: {} },
|
|
1203
|
+
{ method: "POST", path: "/checkout/api/graphql/SetAddressesMutationV2", query: {} },
|
|
1204
|
+
{ method: "POST", path: "/checkout/api/graphql/saveCollectionPointMutation", query: {} }
|
|
1205
|
+
],
|
|
1206
|
+
maxAgeMs: 9e5
|
|
1207
|
+
},
|
|
1208
|
+
adyen: {
|
|
1209
|
+
environment: "live",
|
|
1210
|
+
clientKey: "live_P34BZ2Q6ANHNHAUEKOFOX3IMHQHZ75ES",
|
|
1211
|
+
publicKeySha256: "5659f43faa157b82b45844fdf35382a8b83b7bb24662b5e0fbcca15fd120bcc2"
|
|
1212
|
+
}
|
|
1120
1213
|
}
|
|
1121
1214
|
]);
|
|
1122
1215
|
function adyenKeyHost(environment) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// Generated from @agent-cards/payment-core. Do not edit.
|
|
3
|
-
// artifact-sha256:
|
|
3
|
+
// artifact-sha256: d5ba000080ddbaa60195e0755732280bb41d62120f820d0194b904dc510ebe4d
|
|
4
4
|
// src/sha256.js
|
|
5
5
|
var K = /* @__PURE__ */ new Uint32Array([
|
|
6
6
|
1116352408,
|
|
@@ -146,6 +146,7 @@ var BASE64 = /^[A-Za-z0-9+/]+={0,2}$/;
|
|
|
146
146
|
var SHA256_HEX = /^[0-9a-f]{64}$/;
|
|
147
147
|
var RSA_ALGORITHM = [48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0];
|
|
148
148
|
var MODULUS_BYTES = [128, 256, 384, 512];
|
|
149
|
+
var SMALL_MODULUS_BYTES = 64;
|
|
149
150
|
var MIN_PADDING = 8;
|
|
150
151
|
var MAX_DRAWS = 16;
|
|
151
152
|
var TYPED_ARRAY = Object.getPrototypeOf(Uint8Array.prototype);
|
|
@@ -156,6 +157,9 @@ function parseRsaPublicKey(key) {
|
|
|
156
157
|
const named = key && typeof key === "object" && Object.prototype.hasOwnProperty.call(key, "exponent") ? key.exponent : void 0;
|
|
157
158
|
if (named !== void 0 && named !== 17)
|
|
158
159
|
throw refuse("key");
|
|
160
|
+
const sized = key && typeof key === "object" && Object.prototype.hasOwnProperty.call(key, "bits") ? key.bits : void 0;
|
|
161
|
+
if (sized !== void 0 && sized !== 512)
|
|
162
|
+
throw refuse("key");
|
|
159
163
|
if (typeof spki !== "string" || spki.length > 1024 || spki.length % 4 !== 0 || !BASE64.test(spki))
|
|
160
164
|
throw refuse("key");
|
|
161
165
|
if (typeof pin !== "string" || !SHA256_HEX.test(pin))
|
|
@@ -188,7 +192,8 @@ function parseRsaPublicKey(key) {
|
|
|
188
192
|
if (exponent.end !== rsa.end)
|
|
189
193
|
throw refuse("key");
|
|
190
194
|
const n = modulus.bytes;
|
|
191
|
-
|
|
195
|
+
const sizes = sized === 512 ? [SMALL_MODULUS_BYTES] : MODULUS_BYTES;
|
|
196
|
+
if (!sizes.includes(n.length) || !(n[0] & 128) || !(n[n.length - 1] & 1))
|
|
192
197
|
throw refuse("key");
|
|
193
198
|
const e = exponent.bytes;
|
|
194
199
|
const expected = named === 17 ? [17] : [1, 0, 1];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ReplayResponse } from './client.js';
|
|
2
|
+
/** How long an approved answer may answer a re-send: the approval's own lifetime (cdp.ts HOSTED_FORM_REPEAT_QUIET_MS). */
|
|
3
|
+
export declare const TOKEN_REPEAT_WINDOW_MS: number;
|
|
4
|
+
/** How many re-sends one approved answer answers. Shopify's frame sent 11 in a row; past this the re-send is held. */
|
|
5
|
+
export declare const MAX_TOKEN_REPEATS = 3;
|
|
6
|
+
export interface TokenRepeatAnswer {
|
|
7
|
+
authorizationId: string;
|
|
8
|
+
response: {
|
|
9
|
+
status: number;
|
|
10
|
+
headers: Record<string, string>;
|
|
11
|
+
body: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare class TokenRepeats {
|
|
15
|
+
private readonly now;
|
|
16
|
+
private last;
|
|
17
|
+
constructor(now?: () => number);
|
|
18
|
+
/**
|
|
19
|
+
* Keep the answer a token replay handed to a card request, once it reached the page. Only a plain token answer the
|
|
20
|
+
* processor accepted (a 2xx): a hosted form, a card endpoint, a client-side encryption or a device's own send is
|
|
21
|
+
* never answered again from here. A new answer replaces the last, so an earlier approval answers nothing.
|
|
22
|
+
*/
|
|
23
|
+
remember(frame: unknown, url: string, body: string | null, replay: ReplayResponse): void;
|
|
24
|
+
/**
|
|
25
|
+
* The stored answer for a byte-identical re-send from the same frame under `authorizationId`, inside the window and
|
|
26
|
+
* the count, or null. Handing one out reserves a place in the count; the caller gives it back (released) when the
|
|
27
|
+
* answer never reached the page.
|
|
28
|
+
*/
|
|
29
|
+
answerFor(frame: unknown, url: string, body: string | null, authorizationId: string | null): TokenRepeatAnswer | null;
|
|
30
|
+
/** Give back a place answerFor reserved for an answer that never reached the page. */
|
|
31
|
+
released(authorizationId: string): void;
|
|
32
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// The page's own re-send of a card request this attachment already answered with an approved token.
|
|
2
|
+
//
|
|
3
|
+
// Once the cardholder's device replayed the card and the processor's token reached the page, a checkout can send the
|
|
4
|
+
// very same card request again before the merchant confirms the order: Shopify's card frame did, after a checkout that
|
|
5
|
+
// sat a few minutes between its total and Pay (lexmod.com, expedusa.com and four more stores, 2026-10-27 to 2026-11-05).
|
|
6
|
+
// The SDK held every such re-send while the merchant resolver read the order as pending (lifecycle.ts resolve), so the
|
|
7
|
+
// page never got a token it would submit and the order stayed unconfirmed with the card already out of the device.
|
|
8
|
+
//
|
|
9
|
+
// TokenRepeats keeps the one answer this attachment last handed a plain token request, and hands it out again only for
|
|
10
|
+
// a byte-identical request from the same frame to the same URL under the same approval: the same card fields, the same
|
|
11
|
+
// amount the approval was given for, and no new question for the cardholder. The pre-claim gate (pre-claim.ts tokenRepeatPreClaim) also
|
|
12
|
+
// asks the merchant resolver first and answers only while the order reads pending, so the stored token never reaches a
|
|
13
|
+
// later purchase. A token the processor takes once is refused by the processor the second time, and nothing charges
|
|
14
|
+
// twice: the page holds the same token it already had, never a second payment.
|
|
15
|
+
/** How long an approved answer may answer a re-send: the approval's own lifetime (cdp.ts HOSTED_FORM_REPEAT_QUIET_MS). */
|
|
16
|
+
export const TOKEN_REPEAT_WINDOW_MS = 15 * 60_000;
|
|
17
|
+
/** How many re-sends one approved answer answers. Shopify's frame sent 11 in a row; past this the re-send is held. */
|
|
18
|
+
export const MAX_TOKEN_REPEATS = 3;
|
|
19
|
+
export class TokenRepeats {
|
|
20
|
+
now;
|
|
21
|
+
last = null;
|
|
22
|
+
constructor(now = Date.now) {
|
|
23
|
+
this.now = now;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Keep the answer a token replay handed to a card request, once it reached the page. Only a plain token answer the
|
|
27
|
+
* processor accepted (a 2xx): a hosted form, a card endpoint, a client-side encryption or a device's own send is
|
|
28
|
+
* never answered again from here. A new answer replaces the last, so an earlier approval answers nothing.
|
|
29
|
+
*/
|
|
30
|
+
remember(frame, url, body, replay) {
|
|
31
|
+
try {
|
|
32
|
+
if (frame === undefined || frame === null || frame === '' || body === null || (replay.mode !== undefined && replay.mode !== 'token'))
|
|
33
|
+
return;
|
|
34
|
+
const { status, headers } = replay;
|
|
35
|
+
if (!(status >= 200 && status < 300) || typeof replay.body !== 'string')
|
|
36
|
+
return;
|
|
37
|
+
this.last = { frame, url, body, authorizationId: replay.authorizationId, response: { status, headers: { ...headers }, body: replay.body }, at: this.now(), answered: 0 };
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
this.last = null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The stored answer for a byte-identical re-send from the same frame under `authorizationId`, inside the window and
|
|
45
|
+
* the count, or null. Handing one out reserves a place in the count; the caller gives it back (released) when the
|
|
46
|
+
* answer never reached the page.
|
|
47
|
+
*/
|
|
48
|
+
answerFor(frame, url, body, authorizationId) {
|
|
49
|
+
const last = this.last;
|
|
50
|
+
if (!last || !authorizationId || body === null || frame === undefined || frame === null || frame === '')
|
|
51
|
+
return null;
|
|
52
|
+
if (last.authorizationId !== authorizationId || last.frame !== frame || last.url !== url || last.body !== body)
|
|
53
|
+
return null;
|
|
54
|
+
if (this.now() - last.at >= TOKEN_REPEAT_WINDOW_MS || last.answered >= MAX_TOKEN_REPEATS)
|
|
55
|
+
return null;
|
|
56
|
+
last.answered += 1;
|
|
57
|
+
return { authorizationId, response: { ...last.response, headers: { ...last.response.headers } } };
|
|
58
|
+
}
|
|
59
|
+
/** Give back a place answerFor reserved for an answer that never reached the page. */
|
|
60
|
+
released(authorizationId) {
|
|
61
|
+
if (this.last?.authorizationId === authorizationId && this.last.answered > 0)
|
|
62
|
+
this.last.answered -= 1;
|
|
63
|
+
}
|
|
64
|
+
}
|
package/dist/twoc2p.generated.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
// Generated from @agent-cards/payment-core. Do not edit.
|
|
3
|
-
// artifact-sha256:
|
|
3
|
+
// artifact-sha256: 9dd7f5576d8ac7125656bcf968be5604bf34bcabd516013e51a4768b5d84e791
|
|
4
4
|
// src/sha256.js
|
|
5
5
|
var K = /* @__PURE__ */ new Uint32Array([
|
|
6
6
|
1116352408,
|
|
@@ -146,6 +146,7 @@ var BASE64 = /^[A-Za-z0-9+/]+={0,2}$/;
|
|
|
146
146
|
var SHA256_HEX = /^[0-9a-f]{64}$/;
|
|
147
147
|
var RSA_ALGORITHM = [48, 13, 6, 9, 42, 134, 72, 134, 247, 13, 1, 1, 1, 5, 0];
|
|
148
148
|
var MODULUS_BYTES = [128, 256, 384, 512];
|
|
149
|
+
var SMALL_MODULUS_BYTES = 64;
|
|
149
150
|
var MIN_PADDING = 8;
|
|
150
151
|
var MAX_DRAWS = 16;
|
|
151
152
|
var TYPED_ARRAY = Object.getPrototypeOf(Uint8Array.prototype);
|
|
@@ -156,6 +157,9 @@ function parseRsaPublicKey(key) {
|
|
|
156
157
|
const named = key && typeof key === "object" && Object.prototype.hasOwnProperty.call(key, "exponent") ? key.exponent : void 0;
|
|
157
158
|
if (named !== void 0 && named !== 17)
|
|
158
159
|
throw refuse("key");
|
|
160
|
+
const sized = key && typeof key === "object" && Object.prototype.hasOwnProperty.call(key, "bits") ? key.bits : void 0;
|
|
161
|
+
if (sized !== void 0 && sized !== 512)
|
|
162
|
+
throw refuse("key");
|
|
159
163
|
if (typeof spki !== "string" || spki.length > 1024 || spki.length % 4 !== 0 || !BASE64.test(spki))
|
|
160
164
|
throw refuse("key");
|
|
161
165
|
if (typeof pin !== "string" || !SHA256_HEX.test(pin))
|
|
@@ -188,7 +192,8 @@ function parseRsaPublicKey(key) {
|
|
|
188
192
|
if (exponent.end !== rsa.end)
|
|
189
193
|
throw refuse("key");
|
|
190
194
|
const n = modulus.bytes;
|
|
191
|
-
|
|
195
|
+
const sizes = sized === 512 ? [SMALL_MODULUS_BYTES] : MODULUS_BYTES;
|
|
196
|
+
if (!sizes.includes(n.length) || !(n[0] & 128) || !(n[n.length - 1] & 1))
|
|
192
197
|
throw refuse("key");
|
|
193
198
|
const e = exponent.bytes;
|
|
194
199
|
const expected = named === 17 ? [17] : [1, 0, 1];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema_version": 1,
|
|
3
3
|
"catalog_version": "2026-09-15.1",
|
|
4
|
-
"catalog_sha256": "
|
|
4
|
+
"catalog_sha256": "87d4e75b981d7186a2cd39b6f382717acf5b757d053ed389cb8e181f261f0a49",
|
|
5
5
|
"baseline_version": "kernel-native-docs-2026-09-11.1",
|
|
6
6
|
"baseline_sha256": "d86722f49633d8223fccae54cd3d485df4375aee06aa156a273cc689b7c8507c",
|
|
7
7
|
"native_build": null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-cards/sdk",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.2",
|
|
4
4
|
"description": "Agentcard's SDK: one client, Agentcard, with two modules. checkout pauses a browser purchase and pays it with the person's own card; buy asks the Purchase API for a cart and places it. Card data never enters your process.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"_comment_test": "check:built runs first and names the command when a file the build generates (the copies in src/, the preflight contracts in dist/, the Kernel inventory) is missing or stale; verify:pack runs last, on the same dist.",
|
|
31
31
|
"check:built": "node scripts/generate-payment-core.mjs --check && node scripts/generate-url-masks.mjs --check && node scripts/generate-capabilities.mjs --check && node scripts/generate-agent-amount.mjs --check && node scripts/generate-preflight-contract.mjs --check && node scripts/generate-kernel-native-inventory.mjs --check",
|
|
32
32
|
"verify:pack": "node scripts/verify-pack.mjs",
|
|
33
|
-
"test": "npm run check:built && node test.mjs && node --test lifecycle.test.mjs merchant-abort.test.mjs preparation.test.mjs braintree.test.mjs pre-claim.test.mjs ekashu.test.mjs redsys.test.mjs quickpay.test.mjs paytrail.test.mjs paypal-hosted-fields.test.mjs paypal-card-forms.test.mjs cybersource-secure-acceptance.test.mjs ebanx.test.mjs payrexx.test.mjs payrexx-follow-ups.test.mjs payrexx-adapters.test.mjs nike-order.test.mjs nike-order-adapters.test.mjs autopilot.test.mjs stripe-checkout.test.mjs stripe-setup.test.mjs stripe-legacy-checkout.test.mjs payment-core.test.mjs prepared-processor.test.mjs merchant-hosted.test.mjs merchant-total.test.mjs sandbox-declaration.test.mjs minimum-delay.test.mjs paysafe.test.mjs wix-payments.test.mjs hipay.test.mjs openpay.test.mjs processout.test.mjs payu.test.mjs attachment.test.mjs worker-targets.test.mjs mercado-checkout.test.mjs mercado-polling.test.mjs amadeus.test.mjs pelecard.test.mjs aci.test.mjs primer.test.mjs payrails.test.mjs elavon-converge.test.mjs agentcard.test.mjs buy.test.mjs clean-dist.test.mjs approvals.test.mjs gmo.test.mjs cybersource-flex.test.mjs juspay-gate.test.mjs card-endpoint.test.mjs card-endpoint-fastspring.test.mjs card-endpoint-navigation.test.mjs merchant-session-probe.test.mjs datatrans.test.mjs authorize-net-dpm.test.mjs creditguard.test.mjs eprotect.test.mjs wspay.test.mjs shiji-sts.test.mjs worldline-mycheckout.test.mjs verifone.test.mjs gravy.test.mjs paddle-vgs.test.mjs sbps.test.mjs hold.test.mjs paddle-tokenex.test.mjs lyra.test.mjs gopay.test.mjs paygent.test.mjs twoc2p.test.mjs tap-payments.test.mjs pay-nl.test.mjs toast.test.mjs redact-url.test.mjs hosted-entry.test.mjs comgate.test.mjs przelewy24.test.mjs tokenex-iframe.test.mjs transbank.test.mjs sumup.test.mjs clover.test.mjs eximbay.test.mjs xendit.test.mjs omise.test.mjs fastspring.test.mjs amazon-payment-services.test.mjs barion.test.mjs paymob.test.mjs payu-latam.test.mjs nexi-checkout.test.mjs oceanpayment.test.mjs pin-payments.test.mjs payplug.test.mjs paymentwall.test.mjs vtex-payments.test.mjs vtex-payments-window.test.mjs iyzico.test.mjs usaepay.test.mjs && node --test preflight-package.test.mjs preflight-collector.test.mjs browser-tests.test.mjs && node --test kernel-native-qualification.test.mjs && node --test ../vault/scripts/recurly-validation/watch-duty-sdk-result.test.mjs && node scripts/verify-pack.mjs",
|
|
33
|
+
"test": "npm run check:built && node test.mjs && node --test lifecycle.test.mjs merchant-abort.test.mjs preparation.test.mjs braintree.test.mjs pre-claim.test.mjs ekashu.test.mjs redsys.test.mjs quickpay.test.mjs paytrail.test.mjs paypal-hosted-fields.test.mjs paypal-card-forms.test.mjs cybersource-secure-acceptance.test.mjs ebanx.test.mjs payrexx.test.mjs payrexx-follow-ups.test.mjs payrexx-adapters.test.mjs nike-order.test.mjs nike-order-adapters.test.mjs autopilot.test.mjs stripe-checkout.test.mjs stripe-setup.test.mjs stripe-legacy-checkout.test.mjs payment-core.test.mjs prepared-processor.test.mjs merchant-hosted.test.mjs merchant-total.test.mjs sandbox-declaration.test.mjs minimum-delay.test.mjs paysafe.test.mjs wix-payments.test.mjs hipay.test.mjs openpay.test.mjs processout.test.mjs payu.test.mjs attachment.test.mjs worker-targets.test.mjs mercado-checkout.test.mjs mercado-polling.test.mjs amadeus.test.mjs pelecard.test.mjs aci.test.mjs primer.test.mjs payrails.test.mjs elavon-converge.test.mjs agentcard.test.mjs buy.test.mjs clean-dist.test.mjs approvals.test.mjs gmo.test.mjs cybersource-flex.test.mjs juspay-gate.test.mjs card-endpoint.test.mjs card-endpoint-fastspring.test.mjs card-endpoint-navigation.test.mjs merchant-session-probe.test.mjs datatrans.test.mjs authorize-net-dpm.test.mjs creditguard.test.mjs eprotect.test.mjs wspay.test.mjs shiji-sts.test.mjs worldline-mycheckout.test.mjs verifone.test.mjs gravy.test.mjs paddle-vgs.test.mjs sbps.test.mjs hold.test.mjs paddle-tokenex.test.mjs lyra.test.mjs gopay.test.mjs paygent.test.mjs twoc2p.test.mjs tap-payments.test.mjs pay-nl.test.mjs toast.test.mjs redact-url.test.mjs hosted-entry.test.mjs comgate.test.mjs przelewy24.test.mjs tokenex-iframe.test.mjs transbank.test.mjs sumup.test.mjs clover.test.mjs eximbay.test.mjs xendit.test.mjs omise.test.mjs fastspring.test.mjs amazon-payment-services.test.mjs barion.test.mjs paymob.test.mjs payu-latam.test.mjs nexi-checkout.test.mjs oceanpayment.test.mjs pin-payments.test.mjs payplug.test.mjs cardlink-vpos.test.mjs eghl.test.mjs paymentwall.test.mjs vtex-payments.test.mjs vtex-payments-window.test.mjs iyzico.test.mjs usaepay.test.mjs viva-wallet.test.mjs aurus.test.mjs monei.test.mjs paystack.test.mjs frisbii.test.mjs token-repeat.test.mjs && node --test preflight-package.test.mjs preflight-collector.test.mjs browser-tests.test.mjs && node --test kernel-native-qualification.test.mjs && node --test ../vault/scripts/recurly-validation/watch-duty-sdk-result.test.mjs && node scripts/verify-pack.mjs",
|
|
34
34
|
"test:browser": "node browser-tests.mjs",
|
|
35
35
|
"check:payment-core": "node scripts/generate-payment-core.mjs --check",
|
|
36
36
|
"test:preflight": "node --test preflight-package.test.mjs preflight-collector.test.mjs kernel-native-qualification.test.mjs",
|