@wirexapp/card-sdk-core 1.1.0-beta.4 → 1.1.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.
@@ -132,12 +132,14 @@ export interface PciAppearanceVariables {
132
132
  colorDivider?: string;
133
133
  /** Wallet review screen: emphasis colour of the total ("you pay") value. */
134
134
  colorEmphasis?: string;
135
- /** Reveal frame: square size of the copy-button glyph (e.g. `24px`).
136
- * Default `20px`. */
135
+ /** Square size of the in-frame icon controls (e.g. `24px`): the reveal
136
+ * frame's copy button and show/hide eye, and the collect CVV field's
137
+ * show/hide eye. Default `20px`. */
137
138
  copyIconSize?: string;
138
- /** Reveal frame: copy-button glyph colour. Defaults to `colorLabel`. */
139
+ /** Colour of the same controls (icon or text shape). Defaults to
140
+ * `colorLabel`. */
139
141
  colorCopyIcon?: string;
140
- /** Reveal frame: copy-button glyph colour on hover. Defaults to `colorText`. */
142
+ /** Their colour on hover. Defaults to `colorText`. */
141
143
  colorCopyIconHover?: string;
142
144
  /** Reveal frame: glyph colour of the transient "copied" checkmark.
143
145
  * Defaults to `colorFocus`. */
@@ -195,12 +197,65 @@ export interface PciFrameAuth {
195
197
  userEmail?: string;
196
198
  userWallet?: string;
197
199
  }
198
- export interface PciCollectInitConfig {
200
+ /**
201
+ * Optional diagnostics passthrough, shared by every init mode
202
+ * (docs/ERROR-TRACKING.md §5, §7). Additive within protocol v1: older frames
203
+ * ignore it, older hosts never send it.
204
+ */
205
+ export interface PciDiagnosticsInit {
206
+ /** An OPAQUE, host-chosen id so Wirex can answer "user X could not top up
207
+ * at 10:03" — the same id the host gives its own error tracker. Never an
208
+ * email, phone number or wallet address: the frame validates
209
+ * (`[A-Za-z0-9_\-:.]{1,128}`, no `@`, not digits only, not an EVM or
210
+ * Bitcoin address) and DROPS a value that fails, without echoing it.
211
+ * Sent as `user.id` and nothing
212
+ * else; held in memory for the document's lifetime only. */
213
+ userId?: string;
214
+ }
215
+ /** The in-frame show/hide control of the collect CVV input — see
216
+ * `PciCollectMaskInit.maskToggle`. The reveal's shapes minus `'row'`: a tap
217
+ * on an input must focus it, so the field itself is never the control. */
218
+ export type PciCollectMaskToggleMode = 'button' | 'text' | 'none';
219
+ /** Why a `collect-masked-changed` happened: the init option (`'init'`), the
220
+ * user's in-frame toggle (`'user'`), the host's `collect-set-masked`
221
+ * (`'host'`) or the frame's own `maskAfter` timer (`'timeout'`). The same
222
+ * reasons as the reveal's. */
223
+ export type PciCollectMaskedReason = 'init' | 'user' | 'host' | 'timeout';
224
+ /**
225
+ * Masking of the CVV INPUT while the user types — the three init options the
226
+ * collect frames share (the combined form applies them to its CVV control,
227
+ * the per-field frame only when it renders `cvv`; the card number is never
228
+ * masked). Mirrors the reveal's model: the state lives in the frame, the
229
+ * user's in-frame toggle and the host's `collect-set-masked` change it, and
230
+ * `collect-masked-changed` reports it. Differences, all by design: the
231
+ * masked rendering is the browser's own password bullet (the input flips
232
+ * between `type="password"` and `type="text"`), so there is no
233
+ * `maskedPlaceholder`; and there is no reveal gate — the value is what the
234
+ * user is typing, there is nothing to authorise. Every option is re-validated
235
+ * in the frame; an older frame ignores all three and keeps the CVV masked.
236
+ */
237
+ export interface PciCollectMaskInit {
238
+ /** Start with the CVV masked. Default `true` — the behaviour before this
239
+ * option existed. Only a literal `false` starts it shown. */
240
+ masked?: boolean;
241
+ /** The user's control inside the field, at its right edge. `'button'` — the
242
+ * reveal's eye / eye-off icon, themed by the same `copyIcon*` tokens;
243
+ * `'text'` — a text button from the `show` / `hide` strings, sized to the
244
+ * wider word; `'none'` (default) — no control, the host drives the state
245
+ * through `collect-set-masked` or not at all. */
246
+ maskToggle?: PciCollectMaskToggleMode;
247
+ /** Re-mask a SHOWN CVV after this many milliseconds, counted from the
248
+ * moment typed digits are visible; masking it earlier cancels the timer.
249
+ * `0` / absent = never. Reported with reason `'timeout'`. */
250
+ maskAfter?: number;
251
+ }
252
+ export interface PciCollectInitConfig extends PciCollectMaskInit {
199
253
  mode: 'collect';
200
254
  profile: PciCollectProfile;
201
255
  auth: PciFrameAuth;
202
256
  appearance?: PciAppearance;
203
257
  strings?: PciFrameStrings;
258
+ diagnostics?: PciDiagnosticsInit;
204
259
  }
205
260
  /**
206
261
  * Per-field (split) Collect frame — one iframe renders a single card field,
@@ -209,20 +264,45 @@ export interface PciCollectInitConfig {
209
264
  * tokenization over a same-origin BroadcastChannel — the value never reaches
210
265
  * the host page. Only the aggregator field (`number`) POSTs; the target URL is
211
266
  * the frame service's own `window.__WX_ENDPOINTS__`, not host-supplied. It
212
- * receives the fresh bearer with the `tokenize` message.
267
+ * receives the fresh bearer with the `tokenize` message. The masking options
268
+ * (`PciCollectMaskInit`) apply to the `cvv` field only; every other field
269
+ * ignores them.
213
270
  */
214
- export interface PciCollectFieldInitConfig {
271
+ export interface PciCollectFieldInitConfig extends PciCollectMaskInit {
215
272
  mode: 'collect-field';
216
273
  field: PciCollectFieldName;
217
274
  /** Shared BroadcastChannel group id; siblings aggregate values under it. */
218
275
  groupId: string;
219
276
  appearance?: PciAppearance;
220
277
  strings?: PciFrameStrings;
278
+ diagnostics?: PciDiagnosticsInit;
221
279
  }
222
280
  /** A reveal row. Used to render one field per iframe (`fields`). */
223
281
  export type PciRevealField = 'cardholder' | 'number' | 'expiry' | 'cvv' | 'pin';
224
282
  /** How a reveal row's value gets copied — see `PciRevealInitConfig.copy`. */
225
- export type PciRevealCopyMode = 'button' | 'row' | 'none';
283
+ export type PciRevealCopyMode = 'button' | 'text' | 'row' | 'none';
284
+ /** Per-row copy modes — see `PciRevealInitConfig.copyByField`. */
285
+ export type PciRevealCopyByField = Partial<Record<PciRevealField, PciRevealCopyMode>>;
286
+ /** How a reveal row's masked state gets toggled by the USER — the in-frame
287
+ * control, see `PciRevealInitConfig.maskToggle`. Same shapes as the copy
288
+ * control: an icon button (eye / eye-off), a text button (`show` / `hide`
289
+ * strings), the row itself, or nothing. */
290
+ export type PciRevealMaskToggleMode = 'button' | 'text' | 'row' | 'none';
291
+ /** Per-row mask-toggle modes — see `PciRevealInitConfig.maskToggleByField`. */
292
+ export type PciRevealMaskToggleByField = Partial<Record<PciRevealField, PciRevealMaskToggleMode>>;
293
+ /** A masked state PER ROW, as the host sends it: `true` masks the row,
294
+ * `false` shows it, an absent row is left as it is. The cardholder row is
295
+ * never masked (it is not sensitive): an entry for it is ignored. */
296
+ export type PciRevealMaskedFields = Partial<Record<PciRevealField, boolean>>;
297
+ /** The masked state of every RENDERED row, as the frame reports it. */
298
+ export type PciRevealMaskedState = Partial<Record<PciRevealField, boolean>>;
299
+ /** Why a `reveal-masked-changed` happened: the init option (`'init'`), the
300
+ * user's in-frame toggle (`'user'`), the host's `reveal-set-masked`
301
+ * (`'host'`) or the frame's own `maskAfter` timer (`'timeout'`). */
302
+ export type PciRevealMaskedReason = 'init' | 'user' | 'host' | 'timeout';
303
+ /** Who may REVEAL a masked row from the in-frame toggle — see
304
+ * `PciRevealInitConfig.revealGate`. Hiding is never gated. */
305
+ export type PciRevealGate = 'frame' | 'host';
226
306
  /** How a reveal row is drawn — see `PciRevealInitConfig.rowStyle`. */
227
307
  export type PciRevealRowStyle = 'plain' | 'boxed';
228
308
  /** How a reveal frame arranges its rows — see `PciRevealInitConfig.layout`. */
@@ -245,7 +325,9 @@ export interface PciRevealInitConfig {
245
325
  appearance?: PciAppearance;
246
326
  strings?: PciFrameStrings;
247
327
  /** Copy affordance per row. `'button'` (default) — the icon button beside
248
- * the value, as today; `'row'` — the whole row is the copy control (a real
328
+ * the value, as today; `'text'` — a text button drawn from the `copy` /
329
+ * `copied` strings (sized to the wider of the two, so the row never
330
+ * shifts); `'row'` — the whole row is the copy control (a real
249
331
  * `<button>`: click, Enter, Space), no icon and no reserved width, with the
250
332
  * copied state shown on the value and announced to assistive tech;
251
333
  * `'none'` — no copy affordance at all, the value stays selectable text.
@@ -283,6 +365,60 @@ export interface PciRevealInitConfig {
283
365
  * (one field full-width above a row of others) is two frames. Enumerated
284
366
  * and re-validated in the frame; older frames ignore it and stack. */
285
367
  layout?: PciRevealLayout;
368
+ /** Copy affordance per ROW, overriding `copy` for the named fields only —
369
+ * e.g. `{ pin: 'none' }` keeps the icon button on every row but the PIN.
370
+ * Each entry is validated in the frame against the same closed set as
371
+ * `copy` (`'button' | 'row' | 'none'`); an entry that fails, or names an
372
+ * unknown row, is dropped and that row follows `copy`. Older frames
373
+ * ignore the whole map and render every row in the `copy` mode. */
374
+ copyByField?: PciRevealCopyByField;
375
+ /** Start with the values MASKED. `true` masks every sensitive row, a
376
+ * `PciRevealMaskedFields` map masks the named rows only (default: nothing
377
+ * masked, rendered as today). While masked the frame replaces the value
378
+ * TEXT in its DOM — the card number shows the masked glyph for every
379
+ * digit but the last four, the expiry `••/••`, CVV and PIN one glyph per
380
+ * character; the cardholder row is never masked (it is not sensitive).
381
+ * The values are still fetched at mount, under the same step-up, and the
382
+ * copy control still copies the real value: masking is a shoulder-surfing
383
+ * measure, not a second authorisation. The state lives in the frame, per
384
+ * row; two things change it: the user's in-frame toggle (`maskToggle`)
385
+ * and the host's `reveal-set-masked` (`PciRevealElement.setMasked`) — no
386
+ * refetch, no new action token either way. The glyph is the
387
+ * `maskedPlaceholder` string (default `•`). Re-validated in the frame
388
+ * (only booleans count); an older frame ignores it and shows the values —
389
+ * hosts that depend on masking must run against frames that carry it
390
+ * (`reveal-masked-changed` confirms the applied state). */
391
+ masked?: boolean | PciRevealMaskedFields;
392
+ /** The in-frame show/hide control of every sensitive row (default
393
+ * `'none'`: no control, the host drives masking through
394
+ * `reveal-set-masked`). `'button'` — an eye / eye-off icon button beside
395
+ * the value, before the copy button, themed by the same `copyIcon*`
396
+ * tokens; `'text'` — a text button from the `show` / `hide` strings,
397
+ * sized to the wider word; `'row'` — tapping the value toggles it (when
398
+ * the row is ALSO the copy control — `copy: 'row'` — copying wins and the
399
+ * toggle for that row renders as `'none'`). Enumerated and re-validated
400
+ * in the frame; older frames ignore it. */
401
+ maskToggle?: PciRevealMaskToggleMode;
402
+ /** `maskToggle` per ROW, overriding it for the named rows only, validated
403
+ * entry by entry like `copyByField`. */
404
+ maskToggleByField?: PciRevealMaskToggleByField;
405
+ /** Re-mask a SHOWN row after this many milliseconds, counted from the
406
+ * moment its value is visible (at load, after a toggle, after a host
407
+ * `reveal-set-masked`); masking it earlier cancels the timer. A number
408
+ * applies to every sensitive row, a map names rows; `0` / absent = never
409
+ * (the default — a display timeout is the operator's policy, see
410
+ * PCI SSC FAQ 1071). The frame reports the re-mask with reason
411
+ * `'timeout'`. Hosts with their own policy need none of this: they re-mask
412
+ * through `reveal-set-masked`. Validated in the frame (finite, ≥ 0). */
413
+ maskAfter?: number | Partial<Record<PciRevealField, number>>;
414
+ /** Who may reveal a masked row from the in-frame toggle. `'frame'`
415
+ * (default): the toggle shows the value in place. `'host'`: the toggle
416
+ * leaves the row masked and the frame posts `reveal-requested` with the
417
+ * field name — the host decides (its own step-up, biometrics, …) and
418
+ * reveals with `reveal-set-masked`. Hiding is never gated. Mirrors the
419
+ * mobile SDK's controlled `masked` + `revealRequested`. */
420
+ revealGate?: PciRevealGate;
421
+ diagnostics?: PciDiagnosticsInit;
286
422
  }
287
423
  /** Availability probe — no transaction context, no backend calls. The `init`
288
424
  * request's result carries `PciWalletAvailability`. */
@@ -293,6 +429,7 @@ export interface PciWalletProbeInitConfig {
293
429
  * values (auth methods, networks) are used verbatim so the availability
294
430
  * answer reflects the real tokenization path instead of built-in defaults. */
295
431
  config?: PciWalletProviderConfig;
432
+ diagnostics?: PciDiagnosticsInit;
296
433
  }
297
434
  export interface PciWalletAvailability {
298
435
  applePay: boolean;
@@ -303,7 +440,50 @@ export interface PciWalletAvailability {
303
440
  * (token mode only — see `PciWalletCheckoutAuth`). Absent on frames that
304
441
  * predate WPAY-4431. */
305
442
  googlePayHandoff?: boolean;
306
- }
443
+ /** One summary of Google Pay for this context; the states are mutually
444
+ * exclusive. `googlePay` stays the "can pay HERE" boolean, so a host that
445
+ * ignores this field behaves exactly as before. Absent on frames that
446
+ * predate it (`checkWalletAvailability` derives it from the booleans).
447
+ * - `ready`: tokenizes here (= `googlePay: true`)
448
+ * - `handoff`: no native Google Pay here; the desktop QR can finish it
449
+ * (token mode only, exactly like `googlePayHandoff`)
450
+ * - `needs_card`: Android, Google Pay works, but no card in Google Wallet
451
+ * on this phone is one the top-up accepts (CRYPTOGRAM_3DS). A host may
452
+ * keep the row and send the user to Google Wallet instead of checkout.
453
+ * Never reported when the provider block passed to the probe omits
454
+ * `google_pay` (the provider does not offer it)
455
+ * - `unavailable`: hide the row */
456
+ googlePayState?: PciGooglePayState;
457
+ }
458
+ export type PciGooglePayState = 'ready' | 'handoff' | 'needs_card' | 'unavailable';
459
+ /** Google Pay with no transaction (WPAY-4115) — for the probe's `needs_card`:
460
+ * Google's own sheet with no price (`totalPriceStatus: NOT_CURRENTLY_KNOWN`),
461
+ * so a user whose Google Wallet holds no usable card sees what Google Pay
462
+ * offers here. No quote, no Wirex backend call: whatever the sheet returns is
463
+ * dropped in the frame, and only the outcome reaches the host
464
+ * (`wallet-preview-closed`). The `init` result is empty; it fails when the
465
+ * block has no `google_pay` or Google Pay JS cannot load. Hosted by native
466
+ * WebView shells (Android). */
467
+ export interface PciWalletPreviewInitConfig {
468
+ mode: 'wallet-preview';
469
+ /** The DEFAULT provider block, pre-quote; its `google_pay` values are used
470
+ * verbatim, exactly as the checkout would use them. */
471
+ config?: PciWalletProviderConfig;
472
+ /** ISO 4217 — Google wants one even with no price. Default `EUR`. */
473
+ currency?: string;
474
+ /** Open the sheet straight away instead of waiting for a tap on the frame's
475
+ * Google Pay button. Android WebView allows it; where the platform wants a
476
+ * user gesture the button stays (`wallet-preview-auto` says which). */
477
+ autoOpen?: boolean;
478
+ /** The button preset (see `PciWalletButtonAppearance`). Default white, plain. */
479
+ buttons?: Pick<PciWalletButtonAppearance, 'googlePay'>;
480
+ }
481
+ /** How a preview sheet closed: `continued` — the user pressed the sheet's
482
+ * action (nothing is charged; the result is dropped); `cancelled` — the user
483
+ * dismissed it; `failed` — it never opened. `statusCode` says why: Google's
484
+ * status code, or for a launch the platform refused the DOMException name
485
+ * (`NotAllowedError` …), which pay.js would otherwise report as `CANCELED`. */
486
+ export type PciWalletPreviewOutcome = 'continued' | 'cancelled' | 'failed';
307
487
  /**
308
488
  * Wallet-button presentation presets. Both wallets brand-control their buttons,
309
489
  * so only their allowed presets are exposed — validated in-frame like every
@@ -525,14 +705,20 @@ export interface PciWalletCheckoutInitConfig {
525
705
  /** The estimate's `provider` name — required for the desktop Google Pay QR
526
706
  * (the phone resolves the provider block by name); harmless otherwise. */
527
707
  provider?: string;
528
- /** STANDALONE launches only (a partner Android app opening this document
529
- * top-level in Chrome Custom Tabs with `#init=`): an `https` App Link the
530
- * result screen offers as "Return to the app", with `estimation_id` and
708
+ /** STANDALONE launches only (a partner app opening this document
709
+ * top-level in Chrome Custom Tabs with `#init=` or the launch fragment):
710
+ * the link the result screen offers as "Return to the app" — an `https`
711
+ * App Link / Universal Link (OS-verified for the partner's package,
712
+ * preferred) or the app's own scheme (`com.partner.app:/wallet/return`;
713
+ * any installed app may claim a scheme) — with `estimation_id` and
531
714
  * `outcome` (`completed` | `pending` | `failed` | `already_executed`)
532
715
  * appended as query parameters — never the token, never the wallet
533
- * payload. Validated in-frame (https only; anything else is ignored);
534
- * hosted documents (iframe, popup, native WebView) ignore it. The app
535
- * reconciles by estimation status — the link is a UX signal only. */
716
+ * payload. Validated in-frame after URL parsing: the schemes a browser
717
+ * would execute in the frame's origin (`javascript:`, `data:`, `blob:`,
718
+ * …), browser-internal ones and `http:` are ignored
719
+ * (`resolveWalletReturnUrl`); hosted documents (iframe, popup, native
720
+ * WebView) ignore it entirely. The app reconciles by estimation status —
721
+ * the link is a UX signal only. */
536
722
  returnUrl?: string;
537
723
  /** DEV ONLY: arm the frame's `wallet-debug` channel — in-frame JS errors,
538
724
  * unhandled rejections and console output stream to the host as
@@ -540,6 +726,7 @@ export interface PciWalletCheckoutInitConfig {
540
726
  * Wallet frames only — the PCI collect/reveal frames never forward
541
727
  * console output (cardholder data risk). Never enable in production. */
542
728
  debug?: boolean;
729
+ diagnostics?: PciDiagnosticsInit;
543
730
  }
544
731
  /** Wallet checkout lifecycle. `sheet-open` = the OS wallet sheet is up;
545
732
  * token mode adds `executing` (the frame is calling execute) and
@@ -587,7 +774,7 @@ export interface PciWalletPaymentTokenDto {
587
774
  /** Apple's `transactionIdentifier` — absent on Google Pay (no analogue). */
588
775
  walletTransactionId?: string;
589
776
  }
590
- export type PciInitConfig = PciCollectInitConfig | PciCollectFieldInitConfig | PciRevealInitConfig | PciWalletProbeInitConfig | PciWalletCheckoutInitConfig;
777
+ export type PciInitConfig = PciCollectInitConfig | PciCollectFieldInitConfig | PciRevealInitConfig | PciWalletProbeInitConfig | PciWalletPreviewInitConfig | PciWalletCheckoutInitConfig;
591
778
  /** Extra non-sensitive data merged into the tokenize call by the frame. */
592
779
  export interface PciTokenizeTopUpRequest {
593
780
  kind: 'topup';
@@ -633,9 +820,24 @@ export interface PciTokenizeOctResult {
633
820
  bin: string;
634
821
  last4: string;
635
822
  }
823
+ /**
824
+ * How a failed collect request is classified: the mobile SDK's codes. A FROZEN set of six, safe to
825
+ * switch over exhaustively.
826
+ */
827
+ export type PciFrameErrorCode = 'unauthorized' | 'actionRequired' | 'updateRequired' | 'invalidInput' | 'temporary' | 'failed';
636
828
  export interface PciFrameError {
637
829
  message: string;
638
830
  status?: number;
831
+ /** Absent from a frame that predates the classification. */
832
+ code?: PciFrameErrorCode;
833
+ retryable?: boolean;
834
+ /**
835
+ * Why, when `code` alone cannot say. `invalidInput` covers both `cardAlreadyLinked` (enter another
836
+ * card) and `cardLimitReached` (remove one first).
837
+ *
838
+ * GROWABLE. Always handle the unknown case.
839
+ */
840
+ reason?: string;
639
841
  }
640
842
  interface Envelope {
641
843
  v: typeof PCI_PROTOCOL_VERSION;
@@ -650,6 +852,28 @@ export type PciHostToFrameMessage = Envelope & ({
650
852
  requestId: string;
651
853
  payload: PciTokenizeRequest;
652
854
  }
855
+ /** Reveal: mask or show the values in place (see
856
+ * `PciRevealInitConfig.masked`). An EVENT, not a request — no
857
+ * `requestId`, no reply, no timeout: the frame answers with
858
+ * `reveal-masked-changed` when the state actually changed. Sent only
859
+ * after init (the bridge drops anything earlier); older frames ignore it. */
860
+ | {
861
+ type: 'reveal-set-masked';
862
+ masked: boolean | PciRevealMaskedFields;
863
+ }
864
+ /** Collect: mask or show the CVV input in place (see
865
+ * `PciCollectMaskInit`). The collect twin of `reveal-set-masked` — an
866
+ * EVENT with no `requestId` and no reply; the frame answers with
867
+ * `collect-masked-changed` when the state actually changed. A frame
868
+ * without a CVV control (the OCT profile, a non-CVV field) and an older
869
+ * frame both ignore it. Its own type rather than a shared `set-masked`:
870
+ * the deployed reveal frames already answer to `reveal-set-masked`,
871
+ * each frame document handles only its own event, and the payloads
872
+ * differ (a boolean here, a boolean or a per-row map there). */
873
+ | {
874
+ type: 'collect-set-masked';
875
+ masked: boolean;
876
+ }
653
877
  /** Re-arm a mounted wallet checkout frame with a fresh quote (typically
654
878
  * after expiry) — re-renders in place, no remount. `config` rides along
655
879
  * because the fresh estimate's `provider` may differ from the last one. */
@@ -669,6 +893,16 @@ export type PciFrameToHostMessage = Envelope & ({
669
893
  } | {
670
894
  type: 'change';
671
895
  state: PciCollectChangeState;
896
+ }
897
+ /** The collect CVV input's masked state as applied: once at init (an
898
+ * older frame never sends it — that is how a host tells) and after every
899
+ * change, whoever made it (`reason`). Sent only by a frame that renders
900
+ * a CVV control. A boolean and a reason — never the value, its length
901
+ * or anything derived from it. */
902
+ | {
903
+ type: 'collect-masked-changed';
904
+ masked: boolean;
905
+ reason: PciCollectMaskedReason;
672
906
  } | {
673
907
  type: 'resize';
674
908
  height: number;
@@ -684,6 +918,27 @@ export type PciFrameToHostMessage = Envelope & ({
684
918
  type: 'reveal-copied';
685
919
  field: PciRevealField;
686
920
  }
921
+ /** The reveal frame's masked state as applied — the state of every
922
+ * rendered MASKABLE row (number, expiry, cvv, pin; the cardholder row is
923
+ * never masked and is not listed, so "every value true" means all
924
+ * hidden): once at init (confirming the `masked` option was honoured)
925
+ * and after every change, whoever made it (`reason`). `field`
926
+ * names the one row the user toggled or the timer re-masked; a host
927
+ * `reveal-set-masked` and the init report carry no `field`. Metadata
928
+ * only: field names, booleans, a reason. */
929
+ | {
930
+ type: 'reveal-masked-changed';
931
+ masked: PciRevealMaskedState;
932
+ field?: PciRevealField;
933
+ reason: PciRevealMaskedReason;
934
+ }
935
+ /** `revealGate: 'host'` only: the user asked to reveal a masked row with
936
+ * the in-frame toggle. The row stays masked until the host answers with
937
+ * `reveal-set-masked`. Field name only. */
938
+ | {
939
+ type: 'reveal-requested';
940
+ field: PciRevealField;
941
+ }
687
942
  /** Wallet checkout lifecycle. `sheet-open` = the OS wallet sheet is up. */
688
943
  | {
689
944
  type: 'wallet-state';
@@ -729,6 +984,20 @@ export type PciFrameToHostMessage = Envelope & ({
729
984
  | {
730
985
  type: 'wallet-execute-failed';
731
986
  error: PciWalletExecuteError;
987
+ }
988
+ /** PREVIEW: the sheet closed. `trigger` — opened by `autoOpen` or by a tap. */
989
+ | {
990
+ type: 'wallet-preview-closed';
991
+ outcome: PciWalletPreviewOutcome;
992
+ trigger: 'auto' | 'button';
993
+ statusCode?: string;
994
+ }
995
+ /** PREVIEW, with `autoOpen`: whether the sheet opened without a tap, sent
996
+ * once the attempt settles. `false` leaves the frame's Google Pay button
997
+ * as the way in. */
998
+ | {
999
+ type: 'wallet-preview-auto';
1000
+ opened: boolean;
732
1001
  } | {
733
1002
  type: 'result';
734
1003
  requestId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../src/protocol.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH;;8DAE8D;AAC9D,eAAO,MAAM,oBAAoB,EAAE,MAAwB,CAAC;AAE5D,8DAA8D;AAC9D,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,iBAAiB,CAAC;AAE5D,u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M,EAAE,MAAM,CAAA;CAAE;AACnD;oDACoD;GAClD;IAAE,IAAI,EAAE,2BAA2B,CAAA;CAAE;AACvC;;8BAE8B;GAC5B;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,KAAK,EAAE,wBAAwB,CAAA;CAAE;AAC3D;+EAC+E;GAC7E;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,MAAM,EAAE,sBAAsB,CAAA;CAAE;AAC7D;2EAC2E;GACzE;IAAE,IAAI,EAAE,uBAAuB,CAAC;IAAC,KAAK,EAAE,qBAAqB,CAAA;CAAE;AACjE,+EAA+E;GAC7E;IACE,IAAI,EAAE,uBAAuB,CAAC;IAC9B,OAAO,EAAE,uBAAuB,CAAC;IACjC,OAAO,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AACH;;qBAEqB;GACnB;IAAE,IAAI,EAAE,qBAAqB,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GAC9D;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,aAAa,CAAA;CAAE,CACzE,CAAC"}
@@ -17,7 +17,9 @@ export interface PciWalletLaunchParams {
17
17
  quote: PciWalletQuote;
18
18
  /** The estimate's `provider` — selects the block in the public config. */
19
19
  provider: string;
20
- /** https App Link the result screen offers as "Return to the app". */
20
+ /** The link the result screen offers as "Return to the app": an `https`
21
+ * App Link / Universal Link (preferred) or the app's own scheme — see
22
+ * {@link resolveWalletReturnUrl} for what is refused. */
21
23
  returnUrl?: string;
22
24
  }
23
25
  /** Fragment keys (single letters: the fragment is QR payload). */
@@ -31,8 +33,11 @@ export declare const PCI_WALLET_LAUNCH_KEYS: {
31
33
  readonly provider: "p";
32
34
  readonly returnUrl: "r";
33
35
  };
34
- /** `t=<token>&e=<estimationId>&s=<amount>:<CUR>[&d=…][&f=…][&x=<unix seconds>]&p=<provider>[&r=<https url>]`
35
- * (no leading `#`). */
36
+ /** `t=<token>&e=<estimationId>&s=<amount>:<CUR>[&d=…][&f=…][&x=<unix seconds>]&p=<provider>[&r=<return link>]`
37
+ * (no leading `#`). Throws a `TypeError` for a `returnUrl` the frame would
38
+ * refuse (the frame ignores such a link silently — fail here, at build
39
+ * time, instead). The raw value is encoded, never a normalised form, so the
40
+ * fragment stays byte-identical across the SDKs. */
36
41
  export declare const buildWalletLaunchFragment: (params: PciWalletLaunchParams) => string;
37
42
  /** The full URL to open top-level (Custom Tab) or to encode in a QR. */
38
43
  export declare const buildWalletLaunchUrl: (frameOrigin: string, params: PciWalletLaunchParams, client?: string) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"walletLaunch.d.ts","sourceRoot":"","sources":["../src/walletLaunch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,cAAc,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,kEAAkE;AAClE,eAAO,MAAM,sBAAsB;;;;;;;;;CASzB,CAAC;AAIX;wBACwB;AACxB,eAAO,MAAM,yBAAyB,GAAI,QAAQ,qBAAqB,KAAG,MAYzE,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,EAAE,QAAQ,qBAAqB,EAAE,SAAS,MAAM,KAAG,MAI1G,CAAC"}
1
+ {"version":3,"file":"walletLaunch.d.ts","sourceRoot":"","sources":["../src/walletLaunch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAGjD;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,cAAc,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,CAAC;IACjB;;8DAE0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,kEAAkE;AAClE,eAAO,MAAM,sBAAsB;;;;;;;;;CASzB,CAAC;AAIX;;;;qDAIqD;AACrD,eAAO,MAAM,yBAAyB,GAAI,QAAQ,qBAAqB,KAAG,MAiBzE,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,EAAE,QAAQ,qBAAqB,EAAE,SAAS,MAAM,KAAG,MAI1G,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { resolveWalletReturnUrl } from './walletReturnUrl.js';
1
2
  /** Fragment keys (single letters: the fragment is QR payload). */
2
3
  export const PCI_WALLET_LAUNCH_KEYS = {
3
4
  token: 't',
@@ -10,9 +11,15 @@ export const PCI_WALLET_LAUNCH_KEYS = {
10
11
  returnUrl: 'r',
11
12
  };
12
13
  const money = (value) => `${value.amount}:${value.currency}`;
13
- /** `t=<token>&e=<estimationId>&s=<amount>:<CUR>[&d=…][&f=…][&x=<unix seconds>]&p=<provider>[&r=<https url>]`
14
- * (no leading `#`). */
14
+ /** `t=<token>&e=<estimationId>&s=<amount>:<CUR>[&d=…][&f=…][&x=<unix seconds>]&p=<provider>[&r=<return link>]`
15
+ * (no leading `#`). Throws a `TypeError` for a `returnUrl` the frame would
16
+ * refuse (the frame ignores such a link silently — fail here, at build
17
+ * time, instead). The raw value is encoded, never a normalised form, so the
18
+ * fragment stays byte-identical across the SDKs. */
15
19
  export const buildWalletLaunchFragment = (params) => {
20
+ if (params.returnUrl !== undefined && !resolveWalletReturnUrl(params.returnUrl)) {
21
+ throw new TypeError("returnUrl must be an https App Link or your app's own scheme — javascript:, data:, blob:, file:, about: and http: are refused");
22
+ }
16
23
  const keys = PCI_WALLET_LAUNCH_KEYS;
17
24
  const query = new URLSearchParams();
18
25
  query.set(keys.token, params.checkoutToken);
@@ -1 +1 @@
1
- {"version":3,"file":"walletLaunch.js","sourceRoot":"","sources":["../src/walletLaunch.ts"],"names":[],"mappings":"AAwBA,kEAAkE;AAClE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,KAAK,EAAE,GAAG;IACV,YAAY,EAAE,GAAG;IACjB,YAAY,EAAE,GAAG;IACjB,iBAAiB,EAAE,GAAG;IACtB,GAAG,EAAE,GAAG;IACR,SAAS,EAAE,GAAG;IACd,QAAQ,EAAE,GAAG;IACb,SAAS,EAAE,GAAG;CACN,CAAC;AAEX,MAAM,KAAK,GAAG,CAAC,KAAoD,EAAU,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;AAEpH;wBACwB;AACxB,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,MAA6B,EAAU,EAAE;IACjF,MAAM,IAAI,GAAG,sBAAsB,CAAC;IACpC,MAAM,KAAK,GAAG,IAAI,eAAe,EAAE,CAAC;IACpC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IAC5C,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACxD,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/D,IAAI,MAAM,CAAC,KAAK,CAAC,iBAAiB;QAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAA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EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;IACnE,IAAI,MAAM,CAAC,KAAK,CAAC,WAAW;QAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IAC7G,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1C,IAAI,MAAM,CAAC,SAAS;QAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAClE,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;AAC1B,CAAC,CAAC;AAEF,wEAAwE;AACxE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,WAAmB,EAAE,MAA6B,EAAE,MAAe,EAAU,EAAE;IAClH,MAAM,IAAI,GAAG,GAAG,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,uBAAuB,CAAC;IACvE,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,WAAW,kBAAkB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACpE,OAAO,GAAG,IAAI,GAAG,KAAK,IAAI,yBAAyB,CAAC,MAAM,CAAC,EAAE,CAAC;AAChE,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Return-link policy for STANDALONE launches (the result screen's "Return to
3
+ * the app" — `returnUrl` in the init, `r` in the launch fragment).
4
+ *
5
+ * Any scheme an app can register is accepted: `https:` (an Android App Link /
6
+ * iOS Universal Link — the OS verifies it for the partner's package, the
7
+ * preferred form) or the app's own scheme (`com.partner.app:/wallet/return` —
8
+ * works on both platforms without a domain; any installed app may claim it,
9
+ * which the partner accepts). Refused are only the schemes that differ IN
10
+ * KIND from "open the partner's app": the ones a browser executes as content
11
+ * in the checkout's own origin (`javascript:`, `data:`, `blob:`, …),
12
+ * browser-internal ones, and cleartext `http:`. Everything else is reachable
13
+ * through an https redirect anyway, so a longer denylist would be theatre.
14
+ *
15
+ * The link carries `estimation_id` and `outcome` only — never the token,
16
+ * never the wallet payload — and is a UX signal: the app reconciles by
17
+ * estimation status. Mirrored byte-for-byte in
18
+ * `sdk-service/frames-src/src/returnLink.ts` (the frames bundle must not
19
+ * pull the host SDK in) — change both.
20
+ */
21
+ export declare const PCI_WALLET_RETURN_URL_BLOCKED_SCHEMES: readonly string[];
22
+ /**
23
+ * The normalised href when `candidate` is an acceptable return link, else
24
+ * `null`. Parsed with the WHATWG URL parser BEFORE the scheme check, so case
25
+ * tricks and embedded tabs / newlines in the scheme (`JavaScript:`,
26
+ * `java\tscript:`) are normalised away rather than slipping past a string
27
+ * compare.
28
+ */
29
+ export declare const resolveWalletReturnUrl: (candidate: unknown) => string | null;
30
+ //# sourceMappingURL=walletReturnUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"walletReturnUrl.d.ts","sourceRoot":"","sources":["../src/walletReturnUrl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,qCAAqC,EAAE,SAAS,MAAM,EAkBlE,CAAC;AAQF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,WAAW,OAAO,KAAG,MAAM,GAAG,IASpE,CAAC"}