@fun-xyz/fiat-contract 0.7.0 → 0.9.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/dist/index.js CHANGED
@@ -21,6 +21,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
23
  AuthChallengeSchema: () => AuthChallengeSchema,
24
+ BlockedReasonSchema: () => BlockedReasonSchema,
24
25
  BlockedStateSchema: () => BlockedStateSchema,
25
26
  COUNTRY_NAMES: () => COUNTRY_NAMES,
26
27
  COUNTRY_TO_CURRENCY: () => COUNTRY_TO_CURRENCY,
@@ -65,6 +66,7 @@ __export(index_exports, {
65
66
  PaymentInstructStateSchema: () => PaymentInstructStateSchema,
66
67
  PendingOrderStateSchema: () => PendingOrderStateSchema,
67
68
  PollSpecSchema: () => PollSpecSchema,
69
+ QuoteLimitsSchema: () => QuoteLimitsSchema,
68
70
  QuoteSchema: () => QuoteSchema,
69
71
  QuoteStateSchema: () => QuoteStateSchema,
70
72
  RecoverySchema: () => RecoverySchema,
@@ -387,7 +389,15 @@ var HTTP_VERBS = ["GET", "POST"];
387
389
  var ENDPOINT_PATTERN = /^(GET|POST) \/fiat\/[^\s]*$/;
388
390
  var $endpoint = import_zod.z.string().regex(ENDPOINT_PATTERN, 'endpoint must read "<GET|POST> /fiat/\u2026"');
389
391
  var FiatEndpointSchema = $endpoint;
390
- var $provider = import_zod.z.enum(["TRANSAK", "SWAPPED", "BANXA"]);
392
+ var $provider = import_zod.z.enum([
393
+ "TRANSAK",
394
+ "SWAPPED",
395
+ "BANXA",
396
+ "MOONPAY",
397
+ "STRIPE",
398
+ "COINBASE",
399
+ "CROSSMINT"
400
+ ]);
391
401
  var FiatProviderSchema = $provider;
392
402
  var $kycProvider = import_zod.z.enum(["SUMSUB"]);
393
403
  var KYCProviderSchema = $kycProvider;
@@ -454,6 +464,8 @@ var $quote = obj({
454
464
  expiresAt: import_zod.z.string()
455
465
  });
456
466
  var QuoteSchema = $quote;
467
+ var $quoteLimits = obj({ min: import_zod.z.string(), max: import_zod.z.string() });
468
+ var QuoteLimitsSchema = $quoteLimits;
457
469
  var $instrument = obj({ brandLabel: import_zod.z.string(), last4: import_zod.z.string() });
458
470
  var InstrumentSchema = $instrument;
459
471
  var $orderRef = obj({
@@ -484,7 +496,14 @@ var $refund = obj({
484
496
  expectedBy: import_zod.z.string()
485
497
  });
486
498
  var RefundSchema = $refund;
487
- var $surfaceKind = import_zod.z.enum(["URL_REDIRECT", "URL_EMBED", "PCI_COMPONENT", "PAY_SHEET", "ACH_COMPONENT"]);
499
+ var $surfaceKind = import_zod.z.enum([
500
+ "URL_REDIRECT",
501
+ "KYC_SDK",
502
+ "PCI_COMPONENT",
503
+ "PAY_SHEET",
504
+ "ACH_COMPONENT",
505
+ "AUTH_COMPONENT"
506
+ ]);
488
507
  var SurfaceKindSchema = $surfaceKind;
489
508
  var $surface = obj({
490
509
  kind: $surfaceKind,
@@ -629,6 +648,8 @@ var AuthChallengeSchema = $authChallenge;
629
648
  var $quoteState = obj({
630
649
  kind: import_zod.z.literal("QUOTE"),
631
650
  quote: $quote,
651
+ limits: $quoteLimits,
652
+ helper: import_zod.z.string().optional(),
632
653
  /** Present when the provider's component is the primary CTA, inline on the entry screen. */
633
654
  surface: $surface.optional(),
634
655
  error: $failureReason.optional()
@@ -642,13 +663,15 @@ var $funAuthState = obj({
642
663
  var FunAuthStateSchema = $funAuthState;
643
664
  var $sessionAuthState = obj({
644
665
  kind: import_zod.z.literal("SESSION_AUTH"),
645
- channel: import_zod.z.literal("EMAIL_OTP"),
666
+ channel: import_zod.z.enum(["EMAIL_OTP", "SMS_OTP", "PROVIDER_RENDERED"]),
667
+ surface: $surface.optional(),
646
668
  error: $failureReason.optional()
647
669
  });
648
670
  var SessionAuthStateSchema = $sessionAuthState;
649
671
  var $kycCaptureState = obj({
650
672
  kind: import_zod.z.literal("KYC"),
651
673
  phase: import_zod.z.literal("CAPTURE"),
674
+ quote: $quote,
652
675
  surface: $surface,
653
676
  error: $failureReason.optional()
654
677
  });
@@ -656,6 +679,7 @@ var KycCaptureStateSchema = $kycCaptureState;
656
679
  var $kycInputRequiredState = obj({
657
680
  kind: import_zod.z.literal("KYC"),
658
681
  phase: import_zod.z.literal("INPUT_REQUIRED"),
682
+ quote: $quote,
659
683
  form: $formDescriptor,
660
684
  error: $failureReason.optional()
661
685
  });
@@ -663,6 +687,7 @@ var KycInputRequiredStateSchema = $kycInputRequiredState;
663
687
  var $kycNoActionRequiredState = obj({
664
688
  kind: import_zod.z.literal("KYC"),
665
689
  phase: import_zod.z.literal("NO_ACTION_REQUIRED"),
690
+ quote: $quote,
666
691
  reason: import_zod.z.enum(["IN_REVIEW", "ON_HOLD", "REJECTED"]),
667
692
  retryAfter: import_zod.z.string().optional(),
668
693
  failureReason: $failureReason.optional(),
@@ -675,9 +700,16 @@ var $pendingOrderState = obj({
675
700
  error: $failureReason.optional()
676
701
  });
677
702
  var PendingOrderStateSchema = $pendingOrderState;
703
+ var $blockedReason = import_zod.z.enum([
704
+ "REGION_UNSUPPORTED",
705
+ "ASSET_UNSUPPORTED",
706
+ "ALL_PROVIDERS_DECLINED",
707
+ "AMOUNT_UNSERVABLE"
708
+ ]);
709
+ var BlockedReasonSchema = $blockedReason;
678
710
  var $blockedState = obj({
679
711
  kind: import_zod.z.literal("BLOCKED"),
680
- reason: import_zod.z.string(),
712
+ reason: $blockedReason,
681
713
  retryAfter: import_zod.z.string().nullable().optional(),
682
714
  error: $failureReason.optional()
683
715
  });
@@ -740,7 +772,7 @@ var $stepResponse = obj({
740
772
  var FiatStepResponseSchema = $stepResponse;
741
773
 
742
774
  // package.json
743
- var version = "0.7.0";
775
+ var version = "0.9.0";
744
776
 
745
777
  // src/table.ts
746
778
  var TABLE_VERSION = version;
@@ -846,6 +878,8 @@ var TRANSITION_TABLE = {
846
878
  ],
847
879
  mayReturn: [
848
880
  "SESSION_AUTH",
881
+ "QUOTE",
882
+ "PAYMENT/CAPTURE",
849
883
  ...KYC_ANY,
850
884
  "ORDER/AWAITING_CONFIRMATION",
851
885
  "PENDING_ORDER"
@@ -866,21 +900,23 @@ var TRANSITION_TABLE = {
866
900
  {
867
901
  id: "capture",
868
902
  mode: "CLIENT_SURFACE",
869
- endpoint: "GET /fiat/kyc",
870
- note: 'report target per FE bindings ("POST surface report \u2192 GET /fiat/kyc") and contract Flow C.'
903
+ endpoint: "POST /fiat/kyc/capture",
904
+ note: "Reports SDK submission; provider eligibility is re-evaluated through quote orchestration."
871
905
  }
872
906
  ],
873
907
  mayReturn: [
908
+ "KYC/CAPTURE",
874
909
  "KYC/INPUT_REQUIRED",
875
910
  "KYC/NO_ACTION_REQUIRED:IN_REVIEW",
876
911
  "KYC/NO_ACTION_REQUIRED:ON_HOLD",
877
912
  "KYC/NO_ACTION_REQUIRED:REJECTED",
913
+ "QUOTE",
914
+ "PAYMENT/CAPTURE",
915
+ "PAYMENT/INSTRUCT",
878
916
  "ORDER/AWAITING_CONFIRMATION"
879
917
  ],
880
918
  terminal: false,
881
- notes: [
882
- "Dropped from v1 (no UK headless-module coverage) \u2014 FE Screen 8 is a tombstone. Kind retained as vocabulary; the handshake (supportedStepKinds) keeps the backend from routing v1 SDKs here."
883
- ]
919
+ notes: ["Carries the handshake-gated KYC_SDK surface; provider selects the identity-vendor adapter."]
884
920
  },
885
921
  "KYC/INPUT_REQUIRED": {
886
922
  key: "KYC/INPUT_REQUIRED",
@@ -892,16 +928,20 @@ var TRANSITION_TABLE = {
892
928
  { id: "submit_round", mode: "SUBMIT", endpoint: "POST /fiat/kyc/form" }
893
929
  ],
894
930
  mayReturn: [
931
+ "KYC/CAPTURE",
895
932
  "KYC/INPUT_REQUIRED",
896
933
  "KYC/NO_ACTION_REQUIRED:IN_REVIEW",
897
934
  "KYC/NO_ACTION_REQUIRED:ON_HOLD",
898
935
  "KYC/NO_ACTION_REQUIRED:REJECTED",
936
+ "QUOTE",
937
+ "PAYMENT/CAPTURE",
938
+ "PAYMENT/INSTRUCT",
899
939
  "ORDER/AWAITING_CONFIRMATION"
900
940
  ],
901
941
  terminal: false,
902
942
  notes: [
903
943
  "One POST per round; conditional requirements may open another round.",
904
- "FILE fields stream to POST /fiat/kyc/document \u2014 an upload path the harness owns, not a transition.",
944
+ "FILE fields use POST /fiat/kyc/document to obtain or report a direct provider/vendor upload; document bytes never transit Fun. The harness owns this auxiliary path, not a transition.",
905
945
  "Hosted KYC links arrive as HOSTED_LINK form fields, not as a Surface."
906
946
  ]
907
947
  },
@@ -912,12 +952,16 @@ var TRANSITION_TABLE = {
912
952
  reason: "IN_REVIEW",
913
953
  screens: [9],
914
954
  docStatus: "SPECIFIED",
915
- allowedTransitions: [{ id: "poll", mode: "AWAIT", endpoint: "GET /fiat/kyc" }],
955
+ allowedTransitions: [{ id: "poll", mode: "AWAIT", endpoint: "GET /fiat/quotes/:quoteRef" }],
916
956
  mayReturn: [
917
957
  "KYC/NO_ACTION_REQUIRED:IN_REVIEW",
958
+ "KYC/CAPTURE",
918
959
  "KYC/INPUT_REQUIRED",
919
960
  "KYC/NO_ACTION_REQUIRED:ON_HOLD",
920
961
  "KYC/NO_ACTION_REQUIRED:REJECTED",
962
+ "QUOTE",
963
+ "PAYMENT/CAPTURE",
964
+ "PAYMENT/INSTRUCT",
921
965
  "ORDER/AWAITING_CONFIRMATION"
922
966
  ],
923
967
  terminal: false,
@@ -947,20 +991,11 @@ var TRANSITION_TABLE = {
947
991
  reason: "REJECTED",
948
992
  screens: [11],
949
993
  docStatus: "SPECIFIED",
950
- allowedTransitions: [
951
- {
952
- id: "escalate",
953
- mode: "SUBMIT",
954
- endpoint: "GET /fiat/kyc",
955
- when: "an escalation round is offered",
956
- note: "TODO(open-decision): placeholder shape \u2014 the FE doc flags that a GET carrying params is not a real request shape, and OQ7 owns which rejections escalate. FE doc open question 7."
957
- }
958
- ],
959
- mayReturn: KYC_ANY,
960
- terminal: false,
994
+ allowedTransitions: [],
995
+ mayReturn: [],
996
+ terminal: true,
961
997
  notes: [
962
- "Terminal *variant*: failureReason {KYC_REJECTED, retryable: false, recovery: CONTACT_SUPPORT} + transitions [] \u2014 renders in place, never routes through ORDER{CREATED, FAILED}. Because escalation is also legal here, the entry is not flatly terminal.",
963
- "TODO(open-decision): contract OQ7 \u2014 terminal vs escalating rejections are not enumerated."
998
+ "Only explicit non-retryable outcomes reach REJECTED. Correctable failures return CAPTURE or INPUT_REQUIRED; provider-specific declines re-route before becoming user rejection."
964
999
  ]
965
1000
  },
966
1001
  PENDING_ORDER: {
@@ -1122,8 +1157,10 @@ var DOCUMENTED_ENDPOINTS = [
1122
1157
  "POST /fiat/payment-session",
1123
1158
  "POST /fiat/session",
1124
1159
  "POST /fiat/session/verify",
1125
- "GET /fiat/kyc",
1160
+ "GET /fiat/quotes/:quoteRef",
1126
1161
  "POST /fiat/kyc/form",
1162
+ "POST /fiat/kyc/capture",
1163
+ "POST /fiat/kyc/sdk-token",
1127
1164
  "POST /fiat/kyc/document",
1128
1165
  "POST /fiat/instruments",
1129
1166
  "POST /fiat/orders",
@@ -1135,13 +1172,17 @@ var DOCUMENTED_ENDPOINTS = [
1135
1172
  "POST /fiat/orders/:id/surface-result"
1136
1173
  ];
1137
1174
  var UNOFFERED_ENDPOINTS = [
1175
+ {
1176
+ endpoint: "POST /fiat/kyc/sdk-token",
1177
+ reason: "SDK token refresh is adapter-driven rather than a flow transition."
1178
+ },
1138
1179
  {
1139
1180
  endpoint: "GET /fiat/payment-methods",
1140
1181
  reason: "Discovery, called before any flow state exists \u2014 there is no state to hang it off."
1141
1182
  },
1142
1183
  {
1143
1184
  endpoint: "POST /fiat/kyc/document",
1144
- reason: "FILE fields stream to it directly; the harness owns that upload path and it is not a transition (see KYC/INPUT_REQUIRED notes)."
1185
+ reason: "FILE fields use it for a direct provider/vendor upload handshake and completion report; the harness owns that auxiliary path and it is not a transition (see KYC/INPUT_REQUIRED notes)."
1145
1186
  },
1146
1187
  {
1147
1188
  endpoint: "POST /fiat/instruments",
@@ -1223,6 +1264,10 @@ var FIXTURE_DATA = {
1223
1264
  "screen-01-quote": {
1224
1265
  "state": {
1225
1266
  "kind": "QUOTE",
1267
+ "limits": {
1268
+ "min": "1.00",
1269
+ "max": "3000.00"
1270
+ },
1226
1271
  "quote": {
1227
1272
  "quoteRef": "q_8f2",
1228
1273
  "fiat": {
@@ -1267,6 +1312,10 @@ var FIXTURE_DATA = {
1267
1312
  "screen-01b-quote-with-pay-sheet": {
1268
1313
  "state": {
1269
1314
  "kind": "QUOTE",
1315
+ "limits": {
1316
+ "min": "1.00",
1317
+ "max": "3000.00"
1318
+ },
1270
1319
  "quote": {
1271
1320
  "quoteRef": "q_8f2",
1272
1321
  "fiat": {
@@ -1349,45 +1398,43 @@ var FIXTURE_DATA = {
1349
1398
  "state": {
1350
1399
  "kind": "KYC",
1351
1400
  "phase": "INPUT_REQUIRED",
1401
+ "quote": {
1402
+ "quoteRef": "q_8f2",
1403
+ "fiat": {
1404
+ "currency": "GBP",
1405
+ "amount": "100.00"
1406
+ },
1407
+ "crypto": {
1408
+ "currency": "USDC",
1409
+ "network": "polygon",
1410
+ "amount": "98.41"
1411
+ },
1412
+ "rate": "0.9841",
1413
+ "totalFee": "1.59",
1414
+ "feeBreakdown": [
1415
+ {
1416
+ "id": "provider_fee",
1417
+ "labelFallback": "Processing fee",
1418
+ "amount": "1.59"
1419
+ }
1420
+ ],
1421
+ "paymentMethod": "bank_transfer",
1422
+ "expiresAt": "\u2026"
1423
+ },
1352
1424
  "form": {
1353
- "formId": "personal_details",
1425
+ "formId": "kyc_q_8f2_1",
1354
1426
  "fields": [
1355
1427
  {
1356
- "id": "firstName",
1428
+ "id": "tin",
1357
1429
  "type": "TEXT",
1358
- "labelFallback": "First name",
1430
+ "labelFallback": "Tax ID",
1359
1431
  "required": true
1360
1432
  },
1361
1433
  {
1362
- "id": "dob",
1363
- "type": "DATE",
1364
- "labelFallback": "Date of birth",
1365
- "required": true
1366
- },
1367
- {
1368
- "id": "country",
1369
- "type": "COUNTRY",
1370
- "labelFallback": "Country",
1434
+ "id": "address",
1435
+ "type": "TEXT",
1436
+ "labelFallback": "Home address",
1371
1437
  "required": true
1372
- },
1373
- {
1374
- "id": "sourceOfFunds",
1375
- "type": "SELECT",
1376
- "labelFallback": "Source of funds",
1377
- "required": true,
1378
- "options": [
1379
- {
1380
- "id": "salary",
1381
- "labelFallback": "Salary"
1382
- }
1383
- ]
1384
- },
1385
- {
1386
- "id": "idProof",
1387
- "type": "HOSTED_LINK",
1388
- "labelFallback": "Verify your ID",
1389
- "required": true,
1390
- "url": "\u2026"
1391
1438
  }
1392
1439
  ]
1393
1440
  }
@@ -1399,7 +1446,8 @@ var FIXTURE_DATA = {
1399
1446
  "mode": "SUBMIT",
1400
1447
  "endpoint": "POST /fiat/kyc/form",
1401
1448
  "params": {
1402
- "formId": "personal_details"
1449
+ "quoteRef": "q_8f2",
1450
+ "formId": "kyc_q_8f2_1"
1403
1451
  },
1404
1452
  "inputs": {
1405
1453
  "values": {
@@ -1484,11 +1532,84 @@ var FIXTURE_DATA = {
1484
1532
  }
1485
1533
  ]
1486
1534
  },
1535
+ "screen-08-kyc-capture": {
1536
+ "state": {
1537
+ "kind": "KYC",
1538
+ "phase": "CAPTURE",
1539
+ "quote": {
1540
+ "quoteRef": "q_8f2",
1541
+ "fiat": {
1542
+ "currency": "GBP",
1543
+ "amount": "100.00"
1544
+ },
1545
+ "crypto": {
1546
+ "currency": "USDC",
1547
+ "network": "polygon",
1548
+ "amount": "98.41"
1549
+ },
1550
+ "rate": "0.9841",
1551
+ "totalFee": "1.59",
1552
+ "feeBreakdown": [
1553
+ {
1554
+ "id": "provider_fee",
1555
+ "labelFallback": "Processing fee",
1556
+ "amount": "1.59"
1557
+ }
1558
+ ],
1559
+ "paymentMethod": "bank_transfer",
1560
+ "expiresAt": "\u2026"
1561
+ },
1562
+ "surface": {
1563
+ "kind": "KYC_SDK",
1564
+ "provider": "SUMSUB",
1565
+ "params": {
1566
+ "accessToken": "eyJ\u2026"
1567
+ },
1568
+ "expiresAt": "\u2026"
1569
+ }
1570
+ },
1571
+ "provider": "TRANSAK",
1572
+ "transitions": [
1573
+ {
1574
+ "id": "capture",
1575
+ "mode": "CLIENT_SURFACE",
1576
+ "report": {
1577
+ "endpoint": "POST /fiat/kyc/capture",
1578
+ "params": {
1579
+ "quoteRef": "q_8f2"
1580
+ }
1581
+ }
1582
+ }
1583
+ ]
1584
+ },
1487
1585
  "screen-09-kyc-in-review": {
1488
1586
  "state": {
1489
1587
  "kind": "KYC",
1490
1588
  "phase": "NO_ACTION_REQUIRED",
1491
- "reason": "IN_REVIEW"
1589
+ "reason": "IN_REVIEW",
1590
+ "quote": {
1591
+ "quoteRef": "q_8f2",
1592
+ "fiat": {
1593
+ "currency": "GBP",
1594
+ "amount": "100.00"
1595
+ },
1596
+ "crypto": {
1597
+ "currency": "USDC",
1598
+ "network": "polygon",
1599
+ "amount": "98.41"
1600
+ },
1601
+ "rate": "0.9841",
1602
+ "totalFee": "1.59",
1603
+ "feeBreakdown": [
1604
+ {
1605
+ "id": "provider_fee",
1606
+ "labelFallback": "Processing fee",
1607
+ "amount": "1.59"
1608
+ }
1609
+ ],
1610
+ "paymentMethod": "bank_transfer",
1611
+ "expiresAt": "\u2026"
1612
+ }
1492
1613
  },
1493
1614
  "provider": "TRANSAK",
1494
1615
  "transitions": [
@@ -1496,10 +1617,7 @@ var FIXTURE_DATA = {
1496
1617
  "id": "poll",
1497
1618
  "mode": "AWAIT",
1498
1619
  "poll": {
1499
- "endpoint": "GET /fiat/kyc",
1500
- "params": {
1501
- "quoteRef": "q_8f2"
1502
- },
1620
+ "endpoint": "GET /fiat/quotes/q_8f2",
1503
1621
  "intervalMs": 3e3,
1504
1622
  "backoffFactor": 1.5,
1505
1623
  "maxIntervalMs": 1e4,
@@ -1513,28 +1631,70 @@ var FIXTURE_DATA = {
1513
1631
  "kind": "KYC",
1514
1632
  "phase": "NO_ACTION_REQUIRED",
1515
1633
  "reason": "ON_HOLD",
1516
- "retryAfter": "2026-08-20T09:00:00Z"
1634
+ "retryAfter": "2026-08-20T09:00:00Z",
1635
+ "quote": {
1636
+ "quoteRef": "q_8f2",
1637
+ "fiat": {
1638
+ "currency": "GBP",
1639
+ "amount": "100.00"
1640
+ },
1641
+ "crypto": {
1642
+ "currency": "USDC",
1643
+ "network": "polygon",
1644
+ "amount": "98.41"
1645
+ },
1646
+ "rate": "0.9841",
1647
+ "totalFee": "1.59",
1648
+ "feeBreakdown": [
1649
+ {
1650
+ "id": "provider_fee",
1651
+ "labelFallback": "Processing fee",
1652
+ "amount": "1.59"
1653
+ }
1654
+ ],
1655
+ "paymentMethod": "bank_transfer",
1656
+ "expiresAt": "\u2026"
1657
+ }
1517
1658
  },
1518
1659
  "provider": "TRANSAK",
1519
1660
  "transitions": []
1520
1661
  },
1521
- "screen-11-kyc-rejected-escalation": {
1662
+ "screen-11-kyc-rejected": {
1522
1663
  "state": {
1523
1664
  "kind": "KYC",
1524
1665
  "phase": "NO_ACTION_REQUIRED",
1525
- "reason": "REJECTED"
1666
+ "reason": "REJECTED",
1667
+ "quote": {
1668
+ "quoteRef": "q_8f2",
1669
+ "fiat": {
1670
+ "currency": "GBP",
1671
+ "amount": "100.00"
1672
+ },
1673
+ "crypto": {
1674
+ "currency": "USDC",
1675
+ "network": "polygon",
1676
+ "amount": "98.41"
1677
+ },
1678
+ "rate": "0.9841",
1679
+ "totalFee": "1.59",
1680
+ "feeBreakdown": [
1681
+ {
1682
+ "id": "provider_fee",
1683
+ "labelFallback": "Processing fee",
1684
+ "amount": "1.59"
1685
+ }
1686
+ ],
1687
+ "paymentMethod": "bank_transfer",
1688
+ "expiresAt": "\u2026"
1689
+ },
1690
+ "failureReason": {
1691
+ "category": "KYC_REJECTED",
1692
+ "retryable": false,
1693
+ "recovery": "CONTACT_SUPPORT"
1694
+ }
1526
1695
  },
1527
1696
  "provider": "TRANSAK",
1528
- "transitions": [
1529
- {
1530
- "id": "escalate",
1531
- "mode": "SUBMIT",
1532
- "endpoint": "GET /fiat/kyc",
1533
- "params": {
1534
- "tier": "escalated"
1535
- }
1536
- }
1537
- ]
1697
+ "transitions": []
1538
1698
  },
1539
1699
  "screen-12-pending-order": {
1540
1700
  "state": {
@@ -1667,6 +1827,10 @@ var FIXTURE_DATA = {
1667
1827
  "worked-example-01-quote": {
1668
1828
  "state": {
1669
1829
  "kind": "QUOTE",
1830
+ "limits": {
1831
+ "min": "1.00",
1832
+ "max": "3000.00"
1833
+ },
1670
1834
  "quote": {
1671
1835
  "quoteRef": "q_8f2",
1672
1836
  "fiat": {
@@ -1812,8 +1976,8 @@ var FIXTURES = [
1812
1976
  {
1813
1977
  id: "screen-03-kyc-input-required",
1814
1978
  file: "screen-03-kyc-input-required.json",
1815
- source: "FE_DOC",
1816
- docRef: "Screen 3 \xB7 Identity form (KYC)",
1979
+ source: "KYC_DOC",
1980
+ docRef: "Fiat KYC \xB7 L1 input round",
1817
1981
  screen: 3,
1818
1982
  stateKey: "KYC/INPUT_REQUIRED",
1819
1983
  notes: ["Carries the FORM_VALUES input spec \u2014 the no-double-carry case of the accepted split."]
@@ -1841,34 +2005,40 @@ var FIXTURES = [
1841
2005
  "TODO(open-decision): report target per card topology is a Transak ask (contract Flow A)."
1842
2006
  ]
1843
2007
  },
2008
+ {
2009
+ id: "screen-08-kyc-capture",
2010
+ file: "screen-08-kyc-capture.json",
2011
+ source: "KYC_DOC",
2012
+ docRef: "Fiat KYC \xB7 embedded Sumsub WebSDK",
2013
+ screen: 8,
2014
+ stateKey: "KYC/CAPTURE",
2015
+ notes: ["The client mounts the Sumsub adapter; no URL or iframe is emitted."]
2016
+ },
1844
2017
  {
1845
2018
  id: "screen-09-kyc-in-review",
1846
2019
  file: "screen-09-kyc-in-review.json",
1847
- source: "FE_DOC",
1848
- docRef: "Screen 9 \xB7 Verifying identity",
2020
+ source: "KYC_DOC",
2021
+ docRef: "Fiat KYC \xB7 pending quote",
1849
2022
  screen: 9,
1850
2023
  stateKey: "KYC/NO_ACTION_REQUIRED:IN_REVIEW"
1851
2024
  },
1852
2025
  {
1853
2026
  id: "screen-10-kyc-on-hold",
1854
2027
  file: "screen-10-kyc-on-hold.json",
1855
- source: "FE_DOC",
1856
- docRef: "Screen 10 \xB7 Verification on hold",
2028
+ source: "KYC_DOC",
2029
+ docRef: "Fiat KYC \xB7 verification on hold",
1857
2030
  screen: 10,
1858
2031
  stateKey: "KYC/NO_ACTION_REQUIRED:ON_HOLD",
1859
2032
  notes: ["transitions: [] and NOT terminal \u2014 the fixture that proves terminality is table data."]
1860
2033
  },
1861
2034
  {
1862
- id: "screen-11-kyc-rejected-escalation",
1863
- file: "screen-11-kyc-rejected-escalation.json",
1864
- source: "FE_DOC",
1865
- docRef: "Screen 11 \xB7 Verification unsuccessful",
2035
+ id: "screen-11-kyc-rejected",
2036
+ file: "screen-11-kyc-rejected.json",
2037
+ source: "KYC_DOC",
2038
+ docRef: "Fiat KYC \xB7 non-retryable rejection",
1866
2039
  screen: 11,
1867
2040
  stateKey: "KYC/NO_ACTION_REQUIRED:REJECTED",
1868
- notes: [
1869
- "TODO(open-decision): the escalation transition is a flagged placeholder \u2014 a GET carrying params is not a real request shape (FE doc Screen 11 + open question 7).",
1870
- "The terminal REJECTED variant (failureReason + transitions []) is described in prose, not published as JSON \u2014 no fixture."
1871
- ]
2041
+ notes: ["Only an explicit non-retryable provider or identity-vendor outcome reaches this state."]
1872
2042
  },
1873
2043
  {
1874
2044
  id: "screen-12-pending-order",
@@ -1913,7 +2083,7 @@ var FIXTURES = [
1913
2083
  docRef: "Screen 16 \xB7 Not available",
1914
2084
  screen: 16,
1915
2085
  stateKey: "BLOCKED",
1916
- notes: ["The only flatly terminal state entry in the table."]
2086
+ notes: ["A flatly terminal availability state; explicit non-retryable KYC rejection is terminal too."]
1917
2087
  },
1918
2088
  {
1919
2089
  id: "worked-example-01-quote",
@@ -1945,10 +2115,6 @@ var FIXTURE_COVERAGE_GAPS = [
1945
2115
  {
1946
2116
  stateKey: "FUN_AUTH",
1947
2117
  reason: "No step response exists in either doc \u2014 shape owned by the auth spike, and FUN_AUTH never renders in fomo. TODO(open-decision): contract \xA7Auth & ref binding, item 5."
1948
- },
1949
- {
1950
- stateKey: "KYC/CAPTURE",
1951
- reason: "Dropped from v1 (FE Screen 8 tombstone, no UK module coverage); no step response was ever published. Kind retained as handshake-gated vocabulary."
1952
2118
  }
1953
2119
  ];
1954
2120
  var fixtureMeta = (id) => {