@rhinestone/deposit-modal 0.18.0 → 0.20.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.
Files changed (83) hide show
  1. package/README.md +179 -48
  2. package/dist/BankOnrampStep-JG32OCM2.mjs +435 -0
  3. package/dist/BankOnrampStep-NPGXAA7U.cjs +435 -0
  4. package/dist/{DepositModalReown-VCY65DJX.mjs → DepositModalReown-3FGTPER6.mjs} +6 -5
  5. package/dist/{DepositModalReown-TVO3ZQQK.cjs → DepositModalReown-ALVWADG7.cjs} +21 -20
  6. package/dist/WithdrawModal-5YWFJSYY.cjs +12 -0
  7. package/dist/WithdrawModal-LL4Z5WZP.mjs +12 -0
  8. package/dist/{bearer-transport-CVHNBgoV.d.cts → bearer-transport-DZyeDG64.d.cts} +5 -1
  9. package/dist/{bearer-transport-CVHNBgoV.d.ts → bearer-transport-DZyeDG64.d.ts} +5 -1
  10. package/dist/{caip-BMi-9t09.d.cts → caip-nwFFL46o.d.cts} +2 -2
  11. package/dist/{caip-BMi-9t09.d.ts → caip-nwFFL46o.d.ts} +2 -2
  12. package/dist/{chunk-EKC2IRQG.mjs → chunk-247GJH57.mjs} +687 -299
  13. package/dist/{chunk-FTWKAJGN.mjs → chunk-2FOPO4N5.mjs} +1 -1
  14. package/dist/{chunk-AIZKGFVA.mjs → chunk-32ERBFMO.mjs} +1499 -978
  15. package/dist/chunk-5QUWEFD4.mjs +19 -0
  16. package/dist/chunk-6CTJFR3T.mjs +113 -0
  17. package/dist/{chunk-3TEVMP76.mjs → chunk-B2LZQIGB.mjs} +1 -1
  18. package/dist/{chunk-34JVJZEZ.cjs → chunk-BTEG2VNZ.cjs} +171 -130
  19. package/dist/{chunk-N3AAT6BS.cjs → chunk-CXRH5MKO.cjs} +1556 -1035
  20. package/dist/chunk-E7IMWVMN.mjs +346 -0
  21. package/dist/{chunk-N6JJG57R.cjs → chunk-EKFXUF5A.cjs} +1 -1
  22. package/dist/chunk-FKJ6EJHH.cjs +346 -0
  23. package/dist/chunk-FMUSY563.cjs +19 -0
  24. package/dist/{chunk-LVCD6RHF.cjs → chunk-FVJKUTHF.cjs} +2 -2
  25. package/dist/chunk-G264OM23.cjs +224 -0
  26. package/dist/{chunk-R2B6VD4E.mjs → chunk-HP7S7AD6.mjs} +73 -32
  27. package/dist/{chunk-O4JZKKCZ.cjs → chunk-OPT5EW6L.cjs} +10 -5
  28. package/dist/chunk-PYRXOP2Y.cjs +113 -0
  29. package/dist/{chunk-X4EUXBHJ.mjs → chunk-XBJCZYBX.mjs} +8 -3
  30. package/dist/chunk-YY4ZOAH5.mjs +224 -0
  31. package/dist/{chunk-JV5OGG53.cjs → chunk-Z4RBTNKX.cjs} +1202 -814
  32. package/dist/compliance.cjs +4 -7
  33. package/dist/compliance.d.cts +26 -3
  34. package/dist/compliance.d.ts +26 -3
  35. package/dist/compliance.mjs +6 -9
  36. package/dist/constants-BQDxVNgr.d.cts +29 -0
  37. package/dist/constants-DjGQW5N5.d.ts +29 -0
  38. package/dist/constants.cjs +3 -37
  39. package/dist/constants.d.cts +4 -20
  40. package/dist/constants.d.ts +4 -20
  41. package/dist/constants.mjs +4 -38
  42. package/dist/deposit.cjs +7 -6
  43. package/dist/deposit.d.cts +5 -3
  44. package/dist/deposit.d.ts +5 -3
  45. package/dist/deposit.mjs +6 -5
  46. package/dist/embed.cjs +21 -20
  47. package/dist/embed.d.cts +3 -2
  48. package/dist/embed.d.ts +3 -2
  49. package/dist/embed.mjs +7 -6
  50. package/dist/index.cjs +8 -35
  51. package/dist/index.d.cts +5 -3
  52. package/dist/index.d.ts +5 -3
  53. package/dist/index.mjs +9 -36
  54. package/dist/onramp.cjs +4 -20
  55. package/dist/onramp.d.cts +59 -23
  56. package/dist/onramp.d.ts +59 -23
  57. package/dist/onramp.mjs +5 -21
  58. package/dist/polymarket.cjs +6 -6
  59. package/dist/polymarket.mjs +2 -2
  60. package/dist/ramp-types-HYWd7CW0.d.cts +108 -0
  61. package/dist/ramp-types-HYWd7CW0.d.ts +108 -0
  62. package/dist/styles.css +280 -0
  63. package/dist/{types-CbUs4boj.d.cts → types-BxSrazbq.d.ts} +56 -3
  64. package/dist/{types-CZYypODQ.d.ts → types-CixUBhrM.d.cts} +56 -3
  65. package/dist/withdraw.cjs +6 -5
  66. package/dist/withdraw.d.cts +4 -3
  67. package/dist/withdraw.d.ts +4 -3
  68. package/dist/withdraw.mjs +5 -4
  69. package/package.json +9 -17
  70. package/dist/WithdrawModal-GR3HLYXU.cjs +0 -11
  71. package/dist/WithdrawModal-RMCYJJ4S.mjs +0 -11
  72. package/dist/chunk-ADEWTBSN.cjs +0 -19
  73. package/dist/chunk-EAGMY3QE.mjs +0 -962
  74. package/dist/chunk-OY5N3E6L.cjs +0 -962
  75. package/dist/chunk-PP4QE32S.mjs +0 -19
  76. package/dist/constants-BT4ctuHo.d.cts +0 -64
  77. package/dist/constants-D21ZdNOP.d.ts +0 -64
  78. package/dist/offramp.cjs +0 -25
  79. package/dist/offramp.d.cts +0 -28
  80. package/dist/offramp.d.ts +0 -28
  81. package/dist/offramp.mjs +0 -25
  82. package/dist/ramp-types-C6aUz4SZ.d.cts +0 -43
  83. package/dist/ramp-types-C6aUz4SZ.d.ts +0 -43
@@ -0,0 +1,108 @@
1
+ type RampCurrency = "EUR" | "USD";
2
+ interface BankIntent {
3
+ currency: RampCurrency;
4
+ optionId?: string;
5
+ }
6
+ interface RampOption {
7
+ optionId: string;
8
+ currency: RampCurrency;
9
+ }
10
+ type ReceiptStage = {
11
+ status: "not_started" | "pending" | "processing" | "completed";
12
+ } | {
13
+ status: "on_hold";
14
+ reason: "kyc_required" | "rfi_open" | "review";
15
+ } | {
16
+ status: "failed";
17
+ reason: "cancelled" | "declined" | "expired" | "provider_error";
18
+ };
19
+ type ConversionStage = {
20
+ status: "not_started" | "processing" | "completed";
21
+ } | {
22
+ status: "on_hold";
23
+ reason: "rfi_open" | "review";
24
+ } | {
25
+ status: "failed";
26
+ reason: "sub_fee" | "provider_error";
27
+ };
28
+ /**
29
+ * `submitted` means the provider reported the transfer; only `completed`, with
30
+ * the deposit it landed as, means the funds arrived.
31
+ */
32
+ type DeliveryStage = {
33
+ status: "not_started" | "pending";
34
+ } | {
35
+ status: "on_hold";
36
+ reason: "rfi_open" | "review";
37
+ } | {
38
+ status: "submitted";
39
+ txHash: string;
40
+ } | {
41
+ status: "completed";
42
+ txHash: string;
43
+ depositId: string;
44
+ } | {
45
+ status: "failed";
46
+ reason: "sub_fee" | "provider_error";
47
+ };
48
+ type ReturnStage = {
49
+ status: "none" | "pending" | "processing" | "failed";
50
+ } | {
51
+ status: "completed";
52
+ outcome: "full_refund" | "adjustment" | "unresolved";
53
+ };
54
+ interface FiatFigure {
55
+ total: string | null;
56
+ net: string | null;
57
+ }
58
+ /** One order, as `GET /onramp/orders/{id}` serves it. */
59
+ interface OnrampOrder {
60
+ id: string;
61
+ provider: "noah" | "swapped";
62
+ kind: "fiat" | "exchange";
63
+ status: "pending" | "processing" | "completed" | "failed" | "refunded";
64
+ terminal: boolean;
65
+ stages: {
66
+ receipt: ReceiptStage;
67
+ conversion: ConversionStage;
68
+ delivery: DeliveryStage;
69
+ return: ReturnStage;
70
+ };
71
+ rail: {
72
+ kind: "fiat";
73
+ method: string;
74
+ } | {
75
+ kind: "exchange";
76
+ connection: string;
77
+ };
78
+ fiat: {
79
+ charged: (FiatFigure & {
80
+ currency: string;
81
+ }) | null;
82
+ eur: FiatFigure | null;
83
+ usd: FiatFigure | null;
84
+ };
85
+ crypto: {
86
+ asset: string;
87
+ network: string;
88
+ amount: string;
89
+ } | null;
90
+ account: string;
91
+ deliveryAddress: string | null;
92
+ /** CAIP-2; absent from processors that predate it. */
93
+ deliveryChain?: string | null;
94
+ /** The provider's own status; informational, never branch on it. */
95
+ providerStatus: string;
96
+ createdAt: string;
97
+ updatedAt: string;
98
+ }
99
+ interface RampPage<T> {
100
+ items: T[];
101
+ nextCursor: string | null;
102
+ }
103
+ interface RampPagination {
104
+ cursor?: string;
105
+ limit?: number;
106
+ }
107
+
108
+ export type { BankIntent as B, ConversionStage as C, DeliveryStage as D, FiatFigure as F, OnrampOrder as O, RampCurrency as R, RampOption as a, RampPagination as b, RampPage as c, ReceiptStage as d, ReturnStage as e };
@@ -0,0 +1,108 @@
1
+ type RampCurrency = "EUR" | "USD";
2
+ interface BankIntent {
3
+ currency: RampCurrency;
4
+ optionId?: string;
5
+ }
6
+ interface RampOption {
7
+ optionId: string;
8
+ currency: RampCurrency;
9
+ }
10
+ type ReceiptStage = {
11
+ status: "not_started" | "pending" | "processing" | "completed";
12
+ } | {
13
+ status: "on_hold";
14
+ reason: "kyc_required" | "rfi_open" | "review";
15
+ } | {
16
+ status: "failed";
17
+ reason: "cancelled" | "declined" | "expired" | "provider_error";
18
+ };
19
+ type ConversionStage = {
20
+ status: "not_started" | "processing" | "completed";
21
+ } | {
22
+ status: "on_hold";
23
+ reason: "rfi_open" | "review";
24
+ } | {
25
+ status: "failed";
26
+ reason: "sub_fee" | "provider_error";
27
+ };
28
+ /**
29
+ * `submitted` means the provider reported the transfer; only `completed`, with
30
+ * the deposit it landed as, means the funds arrived.
31
+ */
32
+ type DeliveryStage = {
33
+ status: "not_started" | "pending";
34
+ } | {
35
+ status: "on_hold";
36
+ reason: "rfi_open" | "review";
37
+ } | {
38
+ status: "submitted";
39
+ txHash: string;
40
+ } | {
41
+ status: "completed";
42
+ txHash: string;
43
+ depositId: string;
44
+ } | {
45
+ status: "failed";
46
+ reason: "sub_fee" | "provider_error";
47
+ };
48
+ type ReturnStage = {
49
+ status: "none" | "pending" | "processing" | "failed";
50
+ } | {
51
+ status: "completed";
52
+ outcome: "full_refund" | "adjustment" | "unresolved";
53
+ };
54
+ interface FiatFigure {
55
+ total: string | null;
56
+ net: string | null;
57
+ }
58
+ /** One order, as `GET /onramp/orders/{id}` serves it. */
59
+ interface OnrampOrder {
60
+ id: string;
61
+ provider: "noah" | "swapped";
62
+ kind: "fiat" | "exchange";
63
+ status: "pending" | "processing" | "completed" | "failed" | "refunded";
64
+ terminal: boolean;
65
+ stages: {
66
+ receipt: ReceiptStage;
67
+ conversion: ConversionStage;
68
+ delivery: DeliveryStage;
69
+ return: ReturnStage;
70
+ };
71
+ rail: {
72
+ kind: "fiat";
73
+ method: string;
74
+ } | {
75
+ kind: "exchange";
76
+ connection: string;
77
+ };
78
+ fiat: {
79
+ charged: (FiatFigure & {
80
+ currency: string;
81
+ }) | null;
82
+ eur: FiatFigure | null;
83
+ usd: FiatFigure | null;
84
+ };
85
+ crypto: {
86
+ asset: string;
87
+ network: string;
88
+ amount: string;
89
+ } | null;
90
+ account: string;
91
+ deliveryAddress: string | null;
92
+ /** CAIP-2; absent from processors that predate it. */
93
+ deliveryChain?: string | null;
94
+ /** The provider's own status; informational, never branch on it. */
95
+ providerStatus: string;
96
+ createdAt: string;
97
+ updatedAt: string;
98
+ }
99
+ interface RampPage<T> {
100
+ items: T[];
101
+ nextCursor: string | null;
102
+ }
103
+ interface RampPagination {
104
+ cursor?: string;
105
+ limit?: number;
106
+ }
107
+
108
+ export type { BankIntent as B, ConversionStage as C, DeliveryStage as D, FiatFigure as F, OnrampOrder as O, RampCurrency as R, RampOption as a, RampPagination as b, RampPage as c, ReceiptStage as d, ReturnStage as e };
package/dist/styles.css CHANGED
@@ -2176,6 +2176,18 @@
2176
2176
  font-feature-settings: "tnum";
2177
2177
  }
2178
2178
 
2179
+ /* Payment mode's price. Same weight as the input it replaces, but sized down:
2180
+ a token amount carries more digits than a USD figure and must not wrap. */
2181
+ .rs-amount-fixed {
2182
+ width: 100%;
2183
+ font-size: 40px;
2184
+ font-weight: 700;
2185
+ line-height: 1.1;
2186
+ color: var(--rs-foreground);
2187
+ font-feature-settings: "tnum";
2188
+ overflow-wrap: anywhere;
2189
+ }
2190
+
2179
2191
  .rs-amount-prefix {
2180
2192
  flex: none;
2181
2193
  user-select: none;
@@ -2646,6 +2658,28 @@
2646
2658
  animation: rs-token-icon-pulse 1.2s ease-in-out infinite;
2647
2659
  }
2648
2660
 
2661
+ .rs-token-icon--pending {
2662
+ display: inline-block;
2663
+ width: 100%;
2664
+ height: 100%;
2665
+ border-radius: 50%;
2666
+ }
2667
+
2668
+ /* Text badge for a token with no hosted logo; fills whatever slot holds it. */
2669
+ .rs-token-initials {
2670
+ display: flex;
2671
+ align-items: center;
2672
+ justify-content: center;
2673
+ width: 100%;
2674
+ height: 100%;
2675
+ border-radius: 50%;
2676
+ background-color: var(--rs-border-surface);
2677
+ color: var(--rs-muted-foreground);
2678
+ font-size: 9px;
2679
+ font-weight: 600;
2680
+ line-height: 1;
2681
+ }
2682
+
2649
2683
  @keyframes rs-token-icon-pulse {
2650
2684
  0%,
2651
2685
  100% {
@@ -3491,6 +3525,19 @@
3491
3525
  height: 190px;
3492
3526
  }
3493
3527
 
3528
+ /* Sits above the address and outranks it: the amount is the instruction the
3529
+ payer has to get right, the address is what the QR already carries. */
3530
+ .rs-deposit-address-amount {
3531
+ width: 100%;
3532
+ padding: 0 16px 4px;
3533
+ font-size: 15px;
3534
+ font-weight: 600;
3535
+ line-height: normal;
3536
+ color: var(--rs-foreground);
3537
+ text-align: center;
3538
+ font-feature-settings: "tnum";
3539
+ }
3540
+
3494
3541
  .rs-deposit-address-value {
3495
3542
  width: 100%;
3496
3543
  padding: 0 16px 12px;
@@ -4384,6 +4431,11 @@
4384
4431
  color: var(--rs-muted);
4385
4432
  }
4386
4433
 
4434
+ /* The overlap is for the chain badge; without one the label needs the room. */
4435
+ .rs-history-card-token:last-child {
4436
+ margin-right: 0;
4437
+ }
4438
+
4387
4439
  .rs-history-card-token img {
4388
4440
  width: 100%;
4389
4441
  height: 100%;
@@ -5118,6 +5170,219 @@
5118
5170
  Fiat On-Ramp (Swapped iframe flow)
5119
5171
  ============================================================================= */
5120
5172
 
5173
+ /* =============================================================================
5174
+ Hosted-frame sizing.
5175
+
5176
+ Noah's hosted views are a provider surface carrying a form and a QR code,
5177
+ and at the default size the customer scrolls a ~420px box to reach either.
5178
+ These rules give them the same treatment the Swapped iframe already gets:
5179
+ span the modal and grow with the viewport rather than scroll inside it.
5180
+
5181
+ Every rule is scoped to `:has(.rs-bank-onramp-hosted)` — i.e. only while a
5182
+ frame is actually mounted. The currency picker is a three-row list, and a
5183
+ tall floor there would leave dead space under it, which is the same reason
5184
+ the Swapped rules exclude their tracker phase.
5185
+
5186
+ The modal's own `max-height` is already lifted for us: BankOnrampStep renders
5187
+ inside `data-flow-mode="fiat-onramp"`, which raises it to
5188
+ `calc(100vh - 40px)`. What was missing is everything below.
5189
+ ============================================================================= */
5190
+
5191
+ /* Matches the width Swapped Connect uses for its embedded widget rather than
5192
+ inventing a number; Noah's forms are laid out for roughly the same measure. */
5193
+ .rs-modal-content:has(.rs-bank-onramp-hosted) {
5194
+ max-width: 445px;
5195
+ }
5196
+
5197
+ /* Full-bleed while a frame is mounted, matching the Swapped iframe phase. The
5198
+ header and the Back rows that used to sit beside the frame are gone, so the
5199
+ only remaining siblings are the payment status line and the currency switch,
5200
+ which keep their own inset below. Historic note kept because the reasoning
5201
+ reads backwards otherwise: this was inset while those siblings existed, and they
5202
+ would end up flush against the modal edges. Width comes from the raised
5203
+ max-width above instead.
5204
+
5205
+ The actual cause of the scrolling: `.rs-screen-body` does not grow, so the
5206
+ frame's `flex: 1` had nothing to fill and collapsed to its floor however tall
5207
+ the modal was. `min-height: 0` lets a flex child shrink below its content
5208
+ size, without which the frame would push the modal past the viewport. */
5209
+ .rs-bank-onramp:has(.rs-bank-onramp-hosted) .rs-screen-body {
5210
+ flex: 1;
5211
+ min-height: 0;
5212
+ }
5213
+
5214
+ .rs-bank-onramp-hosted {
5215
+ position: relative;
5216
+ display: flex;
5217
+ flex: 1;
5218
+ /* Floor, not the target: the frame grows to whatever the modal offers. This
5219
+ only matters on a viewport too short to give it more. */
5220
+ min-height: 586px;
5221
+ flex-direction: column;
5222
+ gap: 12px;
5223
+ }
5224
+
5225
+ .rs-bank-onramp-hosted iframe {
5226
+ width: 100%;
5227
+ min-height: 420px;
5228
+ flex: 1;
5229
+ border: 0;
5230
+ border-radius: 8px;
5231
+ background: var(--rs-background-secondary);
5232
+ }
5233
+
5234
+ .rs-bank-onramp-frame-loading {
5235
+ position: absolute;
5236
+ inset: 0 0 52px;
5237
+ display: flex;
5238
+ align-items: center;
5239
+ justify-content: center;
5240
+ background: var(--rs-background);
5241
+ }
5242
+
5243
+ /* Payment position, shown under the bank details. Colour is carried by the
5244
+ accent bar rather than the text so the copy stays readable in both themes
5245
+ and the state is still distinguishable without relying on hue alone. */
5246
+ .rs-bank-onramp-status {
5247
+ display: flex;
5248
+ flex-direction: column;
5249
+ gap: 2px;
5250
+ padding: 10px 12px;
5251
+ border-radius: 8px;
5252
+ border-left: 3px solid var(--rs-text-secondary);
5253
+ background: var(--rs-background-secondary);
5254
+ }
5255
+
5256
+ .rs-bank-native {
5257
+ display: flex;
5258
+ flex-direction: column;
5259
+ gap: 16px;
5260
+ }
5261
+
5262
+ .rs-bank-rails {
5263
+ display: grid;
5264
+ grid-auto-flow: column;
5265
+ grid-auto-columns: 1fr;
5266
+ padding: 3px;
5267
+ background: var(--rs-segmented-track);
5268
+ border-radius: var(--rs-radius-full);
5269
+ }
5270
+
5271
+ .rs-bank-rail {
5272
+ appearance: none;
5273
+ border: 0;
5274
+ background: transparent;
5275
+ padding: 6px 12px;
5276
+ border-radius: var(--rs-radius-full);
5277
+ font-family: inherit;
5278
+ font-size: 13px;
5279
+ font-weight: 500;
5280
+ color: var(--rs-segmented-idle-fg);
5281
+ cursor: pointer;
5282
+ }
5283
+
5284
+ .rs-bank-rail[aria-pressed="true"] {
5285
+ background: var(--rs-segmented-active-bg);
5286
+ color: var(--rs-segmented-active-fg);
5287
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
5288
+ }
5289
+
5290
+ .rs-bank-rail:focus-visible {
5291
+ outline: 2px solid var(--rs-border-accent);
5292
+ outline-offset: 2px;
5293
+ }
5294
+
5295
+ .rs-bank-fields {
5296
+ border-radius: var(--rs-radius-lg);
5297
+ border: 1px solid var(--rs-border-surface);
5298
+ background: var(--rs-background-secondary);
5299
+ padding: 4px 16px;
5300
+ }
5301
+
5302
+ .rs-bank-detail + .rs-bank-detail {
5303
+ border-top: 1px solid var(--rs-border-surface);
5304
+ }
5305
+
5306
+ .rs-bank-copy {
5307
+ display: inline-flex;
5308
+ align-items: center;
5309
+ justify-content: center;
5310
+ flex: none;
5311
+ width: 32px;
5312
+ height: 32px;
5313
+ border: 1px solid var(--rs-border-surface);
5314
+ border-radius: var(--rs-radius-sm);
5315
+ background: var(--rs-background);
5316
+ color: var(--rs-icon);
5317
+ cursor: pointer;
5318
+ }
5319
+
5320
+ .rs-bank-copy:hover {
5321
+ background: var(--rs-surface-hover);
5322
+ }
5323
+
5324
+ .rs-bank-copy:focus-visible {
5325
+ outline: none;
5326
+ box-shadow:
5327
+ 0 0 0 2px var(--rs-background),
5328
+ 0 0 0 4px var(--rs-border-accent);
5329
+ }
5330
+
5331
+ .rs-bank-detail {
5332
+ display: flex;
5333
+ align-items: center;
5334
+ justify-content: space-between;
5335
+ gap: 12px;
5336
+ padding: 12px 0;
5337
+ }
5338
+
5339
+ .rs-bank-detail-text {
5340
+ min-width: 0;
5341
+ }
5342
+
5343
+ .rs-bank-detail-label {
5344
+ color: var(--rs-muted);
5345
+ font-size: 12px;
5346
+ line-height: 1.5;
5347
+ margin: 0;
5348
+ }
5349
+
5350
+ .rs-bank-detail-value {
5351
+ color: var(--rs-foreground);
5352
+ font-size: 14px;
5353
+ overflow-wrap: anywhere;
5354
+ user-select: text;
5355
+ }
5356
+
5357
+ .rs-bank-fee {
5358
+ font-size: 13px;
5359
+ line-height: 1.5;
5360
+ }
5361
+
5362
+ .rs-bank-onramp-status-title {
5363
+ font-size: 14px;
5364
+ font-weight: 600;
5365
+ color: var(--rs-text-primary);
5366
+ }
5367
+
5368
+ .rs-bank-onramp-status-subtitle {
5369
+ font-size: 12px;
5370
+ color: var(--rs-text-secondary);
5371
+ }
5372
+
5373
+ .rs-bank-onramp-status--delivered {
5374
+ border-left-color: var(--rs-success, #1f9d55);
5375
+ }
5376
+
5377
+ .rs-bank-onramp-status--on_hold {
5378
+ border-left-color: var(--rs-warning, #b7791f);
5379
+ }
5380
+
5381
+ .rs-bank-onramp-status--failed,
5382
+ .rs-bank-onramp-status--returned {
5383
+ border-left-color: var(--rs-error, #c53030);
5384
+ }
5385
+
5121
5386
  /* `.rs-fiat-onramp` is a marker class on the .rs-screen root so the
5122
5387
  modal-content `:has()` rules below can size correctly. The Swapped iframe
5123
5388
  phase intentionally omits our header chrome so the embedded widget owns the
@@ -5171,6 +5436,21 @@
5171
5436
  padding-inline: 0;
5172
5437
  }
5173
5438
 
5439
+ /* Same treatment for Noah's frames. Scoped to `:has(.rs-bank-onramp-hosted)`
5440
+ so the currency picker — a three-row list — keeps the normal inset. */
5441
+ .rs-modal-body[data-flow-mode="fiat-onramp"]:has(.rs-bank-onramp-hosted) {
5442
+ padding-inline: 0;
5443
+ }
5444
+
5445
+ /* The status line is the only sibling left beside the frame, and it keeps its
5446
+ inset. Padding is deliberately NOT applied to `.rs-screen-button-row`: that
5447
+ row is `width: 100%` in a content box, so an inset there makes it 32px wider
5448
+ than the full-bleed body, and the body clips the overflow — losing the right
5449
+ edge rather than insetting both. No button row renders beside a frame now. */
5450
+ .rs-bank-onramp:has(.rs-bank-onramp-hosted) .rs-bank-onramp-status {
5451
+ padding-inline: 16px;
5452
+ }
5453
+
5174
5454
  /* Connect keeps our back/close chrome above the embedded widget. In the iframe
5175
5455
  phase, drop only the bottom shell padding so the iframe lands flush with the
5176
5456
  modal bottom edge; the side inset still lets the body negative margin expand
@@ -1,5 +1,6 @@
1
- import { D as DisplayChainId, d as TargetChain } from './caip-BMi-9t09.cjs';
1
+ import { D as DisplayChainId, d as TargetChain } from './caip-nwFFL46o.js';
2
2
  import { TypedDataDefinition, Address, Hex, WalletClient, PublicClient, Chain } from 'viem';
3
+ import { a as CustomerSession } from './bearer-transport-DZyeDG64.js';
3
4
 
4
5
  /**
5
6
  * Consumer-supplied RPC URL overrides, scoped to a single modal instance (see
@@ -93,6 +94,17 @@ type RecoveryErrorCode = "DEPOSIT_NOT_RECOVERABLE" | "RECOVERY_UNSUPPORTED" | "S
93
94
  */
94
95
  type HistoryStatus = "pending" | "processing" | "completed" | "failed" | "refunded" | "spam";
95
96
 
97
+ /** Opt-in customer session and locale for hosted bank-transfer setup. */
98
+ interface BankOnrampConfig {
99
+ /** HTTPS support page or mailto address for bank-transfer questions. */
100
+ supportUrl?: string;
101
+ /**
102
+ * Return a short-lived customer session for the registered deposit account.
103
+ * The modal requests a fresh session for each backend request and never stores
104
+ * its bearer token.
105
+ */
106
+ getSession: (smartAccount: Address) => CustomerSession | Promise<CustomerSession>;
107
+ }
96
108
  type Caip2ChainId = `eip155:${number}` | `solana:${string}`;
97
109
  type ChainId = DisplayChainId | Caip2ChainId;
98
110
  interface DepositModalTheme {
@@ -199,6 +211,32 @@ interface FiatMethodsConfig {
199
211
  "bank-transfer"?: boolean;
200
212
  "apple-pay"?: boolean;
201
213
  }
214
+ /**
215
+ * Turns the modal into a checkout for one order: the amount is the merchant's
216
+ * price rather than the payer's choice, and the account is the order's rather
217
+ * than the recipient's.
218
+ *
219
+ * Every funding method stays available, and only the wallet path can hold a
220
+ * payer to the amount — a QR, exchange or card payer can still send the wrong
221
+ * one. Reconcile what arrives; `destinationAmount` on the `complete` lifecycle
222
+ * event is the delivered figure.
223
+ */
224
+ interface PaymentConfig {
225
+ /**
226
+ * The order's account salt, as the merchant's server registered it. Both sides
227
+ * must pass the same 32 bytes: the address is derived from it, so a different
228
+ * salt is a different account and the payment lands somewhere the merchant is
229
+ * not watching. It replaces the (recipient, target) derivation entirely, which
230
+ * is what lets one recipient hold many orders.
231
+ */
232
+ salt: Hex;
233
+ /**
234
+ * Required destination amount, in base units of `targetToken`. NOT a USD
235
+ * figure — the amount screen's own input is USD, and this is deliberately not
236
+ * that, since it is the quantity the merchant must receive.
237
+ */
238
+ amount: string;
239
+ }
202
240
  interface DepositModalProps {
203
241
  /**
204
242
  * A wallet the host app already has connected. Pass this to reuse the user's
@@ -227,6 +265,8 @@ interface DepositModalProps {
227
265
  */
228
266
  defaultAmount?: string;
229
267
  recipient: Address | string;
268
+ /** Renders the modal as a checkout for one order. See {@link PaymentConfig}. */
269
+ payment?: PaymentConfig;
230
270
  /**
231
271
  * The user's current in-app balance, in USD, as the consuming app displays
232
272
  * it. When provided, the amount screen shows a "Balance after deposit" row
@@ -271,6 +311,12 @@ interface DepositModalProps {
271
311
  */
272
312
  enableWallet?: boolean;
273
313
  enableFiatOnramp?: boolean;
314
+ /**
315
+ * Use Noah for Bank transfer when provisioned; unavailable routes use Swapped.
316
+ * Other fiat methods continue to use Swapped. When
317
+ * `fiatMethods` is provided, it must explicitly enable `"bank-transfer"`.
318
+ */
319
+ bankOnramp?: BankOnrampConfig;
274
320
  /** Show the Transfer Crypto / QR row. Default: true. */
275
321
  enableQrTransfer?: boolean;
276
322
  /**
@@ -487,6 +533,13 @@ type DepositLifecycleEvent = {
487
533
  destinationTxHash?: string;
488
534
  /** Source-token base units (e.g. "1100000" for 1.10 USDC). */
489
535
  amount: string;
536
+ /**
537
+ * What actually arrived, in `targetToken` base units, once the bridge
538
+ * reports it — the only field that answers "was the invoice paid in
539
+ * full?". `amount` is the source side and says nothing about delivery.
540
+ * Absent until the completing event carries a destination leg.
541
+ */
542
+ destinationAmount?: string;
490
543
  sourceChain: ChainId | "unknown";
491
544
  sourceToken?: string;
492
545
  /**
@@ -894,7 +947,7 @@ type WithdrawAnalyticsEvent = WithdrawAnalyticsEventPayload & AnalyticsEventEnve
894
947
  */
895
948
  type ClaimAnalyticsStep = "lookup" | "select" | "review" | "submit";
896
949
  /** Every reason has a call site in the claim flow; none is aspirational. */
897
- type ClaimAnalyticsFailureReason = RoutableAnalyticsReason<"lookup_transaction_hash_invalid" | "lookup_failed" | "lookup_no_deposits_found" | "lookup_no_eligible_deposits" | "refund_destination_invalid" | "recovery_deposit_data_incomplete" | "signature_rejected" | "signature_invalid" | "recovery_deposit_not_recoverable" | "recovery_unsupported" | "signature_verification_unavailable" | "refund_reconciliation_required" | "refund_failed" | "refund_service_unreachable" | "modal_close_refused_in_flight">;
950
+ type ClaimAnalyticsFailureReason = RoutableAnalyticsReason<"lookup_transaction_hash_invalid" | "lookup_failed" | "lookup_no_deposits_found" | "lookup_no_eligible_deposits" | "refund_destination_invalid" | "refund_destination_is_deposit_address" | "recovery_deposit_data_incomplete" | "signature_rejected" | "signature_invalid" | "recovery_deposit_not_recoverable" | "recovery_unsupported" | "signature_verification_unavailable" | "refund_reconciliation_required" | "refund_failed" | "refund_service_unreachable" | "modal_close_refused_in_flight">;
898
951
  type ClaimAnalyticsAbandonmentReason = "back" | "modal_close";
899
952
  type ClaimAnalyticsCloseSource = "header_button" | "escape" | "overlay" | "host_controlled" | "success_done" | "failure_cancel"
900
953
  /** The labelled control back to the history list a recovery was started from. */
@@ -1017,4 +1070,4 @@ interface AnalyticsIngestFailureEvent {
1017
1070
  }
1018
1071
  type ModalAnalyticsEvent = DepositAnalyticsEvent | WithdrawAnalyticsEvent | ClaimAnalyticsEvent | AnalyticsIngestFailureEvent;
1019
1072
 
1020
- export type { OutputTokenRule as $, AnalyticsEventEnvelope as A, DepositAnalyticsStep as B, ChainId as C, DepositAnalyticsAbandonmentReason as D, DepositAnalyticsTransferStep as E, DepositAnalyticsUiOutcome as F, DepositAnalyticsWalletStep as G, DepositAssetMigrationMethodIdentifiers as H, DepositCompleteEventData as I, DepositExchangeConnectMethodIdentifiers as J, DepositFailedEventData as K, DepositFiatOnrampMethodIdentifiers as L, DepositFundingMethod as M, DepositLifecycleEvent as N, DepositModalProps as O, DepositModalTheme as P, DepositModalUIConfig as Q, DepositSubmittedEventData as R, DepositTransferHandoffIdentifiers as S, DepositWalletIntegration as T, DepositWalletMethodIdentifiers as U, ErrorEventData as V, FiatMethodsConfig as W, HistoryAnalyticsBadge as X, HistoryClaimEntrySource as Y, HistoryStatus as Z, ModalAnalyticsEvent as _, AnalyticsIngestFailureEvent as a, RecoveryErrorCode as a0, RpcUrlMap as a1, SignRecovery as a2, SignRecoveryPayload as a3, WithdrawAnalyticsAbandonmentReason as a4, WithdrawAnalyticsCloseSource as a5, WithdrawAnalyticsEvent as a6, WithdrawAnalyticsEventPayload as a7, WithdrawAnalyticsFailureReason as a8, WithdrawAnalyticsSessionProperties as a9, WithdrawAnalyticsStep as aa, WithdrawAnalyticsUiOutcome as ab, WithdrawCompleteEventData as ac, WithdrawFailedEventData as ad, WithdrawLifecycleEvent as ae, WithdrawModalProps as af, WithdrawSubmittedEventData as ag, WithdrawTransferRequest as ah, AnalyticsIngestFailureReason as b, AnalyticsReasonFamily as c, AssetMigrationsConfig as d, AssetOption as e, ClaimAnalyticsAbandonmentReason as f, ClaimAnalyticsCloseSource as g, ClaimAnalyticsCorrelation as h, ClaimAnalyticsEntrySource as i, ClaimAnalyticsEvent as j, ClaimAnalyticsEventPayload as k, ClaimAnalyticsFailureReason as l, ClaimAnalyticsSessionProperties as m, ClaimAnalyticsStep as n, ClaimAnalyticsUiOutcome as o, ConnectedEventData as p, DepositAnalyticsCloseSource as q, DepositAnalyticsCorrelator as r, DepositAnalyticsEvent as s, DepositAnalyticsEventPayload as t, DepositAnalyticsExchangeStep as u, DepositAnalyticsFailureReason as v, DepositAnalyticsFiatStep as w, DepositAnalyticsMigrationStep as x, DepositAnalyticsSessionProperties as y, DepositAnalyticsSharedStep as z };
1073
+ export type { ModalAnalyticsEvent as $, AnalyticsEventEnvelope as A, BankOnrampConfig as B, ChainId as C, DepositAnalyticsAbandonmentReason as D, DepositAnalyticsStep as E, DepositAnalyticsTransferStep as F, DepositAnalyticsUiOutcome as G, DepositAnalyticsWalletStep as H, DepositAssetMigrationMethodIdentifiers as I, DepositCompleteEventData as J, DepositExchangeConnectMethodIdentifiers as K, DepositFailedEventData as L, DepositFiatOnrampMethodIdentifiers as M, DepositFundingMethod as N, DepositLifecycleEvent as O, DepositModalProps as P, DepositModalTheme as Q, DepositModalUIConfig as R, DepositSubmittedEventData as S, DepositTransferHandoffIdentifiers as T, DepositWalletIntegration as U, DepositWalletMethodIdentifiers as V, ErrorEventData as W, FiatMethodsConfig as X, HistoryAnalyticsBadge as Y, HistoryClaimEntrySource as Z, HistoryStatus as _, AnalyticsIngestFailureEvent as a, OutputTokenRule as a0, PaymentConfig as a1, RecoveryErrorCode as a2, RpcUrlMap as a3, SignRecovery as a4, SignRecoveryPayload as a5, WithdrawAnalyticsAbandonmentReason as a6, WithdrawAnalyticsCloseSource as a7, WithdrawAnalyticsEvent as a8, WithdrawAnalyticsEventPayload as a9, WithdrawAnalyticsFailureReason as aa, WithdrawAnalyticsSessionProperties as ab, WithdrawAnalyticsStep as ac, WithdrawAnalyticsUiOutcome as ad, WithdrawCompleteEventData as ae, WithdrawFailedEventData as af, WithdrawLifecycleEvent as ag, WithdrawModalProps as ah, WithdrawSubmittedEventData as ai, WithdrawTransferRequest as aj, AnalyticsIngestFailureReason as b, AnalyticsReasonFamily as c, AssetMigrationsConfig as d, AssetOption as e, ClaimAnalyticsAbandonmentReason as f, ClaimAnalyticsCloseSource as g, ClaimAnalyticsCorrelation as h, ClaimAnalyticsEntrySource as i, ClaimAnalyticsEvent as j, ClaimAnalyticsEventPayload as k, ClaimAnalyticsFailureReason as l, ClaimAnalyticsSessionProperties as m, ClaimAnalyticsStep as n, ClaimAnalyticsUiOutcome as o, ConnectedEventData as p, DepositAnalyticsCloseSource as q, DepositAnalyticsCorrelator as r, DepositAnalyticsEvent as s, DepositAnalyticsEventPayload as t, DepositAnalyticsExchangeStep as u, DepositAnalyticsFailureReason as v, DepositAnalyticsFiatStep as w, DepositAnalyticsMigrationStep as x, DepositAnalyticsSessionProperties as y, DepositAnalyticsSharedStep as z };