@stridge/kit 0.1.0-alpha.60 → 0.1.0-alpha.62

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 (295) hide show
  1. package/dist/KitProvider.d.ts +0 -21
  2. package/dist/KitProvider.js +1 -1
  3. package/dist/_internal/deposit/driver/index.d.ts +3 -3
  4. package/dist/_internal/drivers/stridge-mock/index.d.ts +3 -2
  5. package/dist/_internal/drivers/stridge-mock/index.js +1 -1
  6. package/dist/activity/compound/index.js +1 -1
  7. package/dist/deposit/compound/index.d.ts +21 -10
  8. package/dist/deposit/compound/index.js +1 -1
  9. package/dist/deposit/widgets/index.d.ts +6 -3
  10. package/dist/deposit/widgets/index.js +1 -1
  11. package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
  12. package/dist/drivers/stridge-mock/checkoutChannel.d.ts +31 -0
  13. package/dist/drivers/stridge-mock/checkoutChannel.js +1 -0
  14. package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +28 -0
  15. package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
  16. package/dist/drivers/stridge-mock/fixtures.d.ts +6 -2
  17. package/dist/drivers/stridge-mock/fixtures.js +1 -1
  18. package/dist/drivers/stridge-mock/triggers.d.ts +12 -0
  19. package/dist/events/emit/useDepositEmissions.js +1 -1
  20. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  21. package/dist/flows/deposit/driver/payloads.d.ts +206 -20
  22. package/dist/flows/deposit/driver/types.d.ts +106 -10
  23. package/dist/flows/deposit/orchestrator/controller.js +1 -1
  24. package/dist/flows/deposit/orchestrator/index.d.ts +1 -1
  25. package/dist/flows/deposit/orchestrator/reducer.js +1 -1
  26. package/dist/flows/deposit/orchestrator/types.d.ts +202 -66
  27. package/dist/flows/deposit/shared/checkoutPopup.js +1 -0
  28. package/dist/flows/deposit/shared/onramp.js +1 -0
  29. package/dist/flows/deposit/shared/onrampError.js +1 -0
  30. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
  31. package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
  32. package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +5 -5
  33. package/dist/flows/deposit/widgets/deposit/compound/components/Guards.js +1 -1
  34. package/dist/flows/deposit/widgets/deposit/compound/components/Methods.d.ts +1 -2
  35. package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.js +1 -1
  36. package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +9 -9
  37. package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
  38. package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.d.ts +68 -0
  39. package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.js +1 -0
  40. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.d.ts +66 -0
  41. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.js +1 -0
  42. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.d.ts +21 -0
  43. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.js +1 -0
  44. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.js +1 -0
  45. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/CurrencyChip.d.ts +12 -0
  46. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/CurrencyChip.js +1 -0
  47. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.d.ts +13 -0
  48. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.js +1 -0
  49. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ProviderCard.d.ts +12 -0
  50. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ProviderCard.js +1 -0
  51. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.d.ts +14 -0
  52. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.js +1 -0
  53. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/context.d.ts +14 -0
  54. package/dist/flows/deposit/widgets/{cash-amount-entry → onramp-amount-entry}/compound/context.js +1 -1
  55. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.d.ts +4 -0
  56. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.js +1 -0
  57. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/types.d.ts +40 -0
  58. package/dist/flows/deposit/widgets/onramp-amount-entry/index.d.ts +1 -0
  59. package/dist/flows/deposit/widgets/onramp-amount-entry/index.js +1 -0
  60. package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.d.ts +52 -0
  61. package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.js +1 -0
  62. package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.d.ts +44 -0
  63. package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.js +1 -0
  64. package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.d.ts +31 -0
  65. package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.js +1 -0
  66. package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.js +1 -0
  67. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.d.ts +16 -0
  68. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.js +1 -0
  69. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Disclaimer.d.ts +21 -0
  70. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Disclaimer.js +1 -0
  71. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.d.ts +15 -0
  72. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.js +1 -0
  73. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.d.ts +15 -0
  74. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.js +1 -0
  75. package/dist/flows/deposit/widgets/onramp-confirm/compound/context.d.ts +46 -0
  76. package/dist/flows/deposit/widgets/{cash-confirm → onramp-confirm}/compound/context.js +1 -1
  77. package/dist/flows/deposit/widgets/onramp-confirm/compound/index.d.ts +4 -0
  78. package/dist/flows/deposit/widgets/onramp-confirm/compound/index.js +1 -0
  79. package/dist/flows/deposit/widgets/onramp-confirm/compound/types.d.ts +67 -0
  80. package/dist/flows/deposit/widgets/onramp-confirm/index.d.ts +1 -0
  81. package/dist/flows/deposit/widgets/onramp-confirm/index.js +1 -0
  82. package/dist/flows/deposit/widgets/onramp-currency-picker/OnrampCurrencyPicker.d.ts +39 -0
  83. package/dist/flows/deposit/widgets/onramp-currency-picker/OnrampCurrencyPicker.js +1 -0
  84. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/OnrampCurrencyPicker.d.ts +37 -0
  85. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/OnrampCurrencyPicker.js +1 -0
  86. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/OnrampCurrencyPicker.slots.d.ts +17 -0
  87. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/OnrampCurrencyPicker.slots.js +1 -0
  88. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/OnrampCurrencyPicker.styles.js +1 -0
  89. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Body.d.ts +6 -0
  90. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Body.js +1 -0
  91. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/CurrencyRow.d.ts +12 -0
  92. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/CurrencyRow.js +1 -0
  93. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Empty.js +1 -0
  94. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Header.d.ts +10 -0
  95. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Header.js +1 -0
  96. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Search.d.ts +6 -0
  97. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/components/Search.js +1 -0
  98. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/context.js +1 -0
  99. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/index.d.ts +3 -0
  100. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/index.js +1 -0
  101. package/dist/flows/deposit/widgets/onramp-currency-picker/compound/types.d.ts +48 -0
  102. package/dist/flows/deposit/widgets/onramp-currency-picker/index.d.ts +1 -0
  103. package/dist/flows/deposit/widgets/onramp-currency-picker/index.js +1 -0
  104. package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.d.ts +50 -0
  105. package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.js +1 -0
  106. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.d.ts +68 -0
  107. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.js +1 -0
  108. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.d.ts +17 -0
  109. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.js +1 -0
  110. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/Flow.d.ts +13 -0
  111. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/Flow.js +1 -0
  112. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/Flow.styles.js +1 -0
  113. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.d.ts +11 -0
  114. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.js +1 -0
  115. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/context.d.ts +32 -0
  116. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/context.js +1 -0
  117. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.d.ts +3 -0
  118. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.js +1 -0
  119. package/dist/flows/deposit/widgets/onramp-payment-pending/index.d.ts +1 -0
  120. package/dist/flows/deposit/widgets/onramp-payment-pending/index.js +1 -0
  121. package/dist/flows/deposit/widgets/onramp-provider-picker/OnrampProviderPicker.d.ts +38 -0
  122. package/dist/flows/deposit/widgets/onramp-provider-picker/OnrampProviderPicker.js +1 -0
  123. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/OnrampProviderPicker.d.ts +35 -0
  124. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/OnrampProviderPicker.js +1 -0
  125. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/OnrampProviderPicker.slots.d.ts +19 -0
  126. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/OnrampProviderPicker.slots.js +1 -0
  127. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/OnrampProviderPicker.styles.js +1 -0
  128. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/Body.d.ts +6 -0
  129. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/Body.js +1 -0
  130. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/Header.d.ts +10 -0
  131. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/Header.js +1 -0
  132. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/ProviderRow.d.ts +15 -0
  133. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/components/ProviderRow.js +1 -0
  134. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/context.js +1 -0
  135. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/index.d.ts +3 -0
  136. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/index.js +1 -0
  137. package/dist/flows/deposit/widgets/onramp-provider-picker/compound/types.d.ts +50 -0
  138. package/dist/flows/deposit/widgets/onramp-provider-picker/index.d.ts +1 -0
  139. package/dist/flows/deposit/widgets/onramp-provider-picker/index.js +1 -0
  140. package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -1
  141. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
  142. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
  143. package/dist/format/index.d.ts +2 -1
  144. package/dist/format/index.js +1 -1
  145. package/dist/i18n/locales/ar.js +1 -1
  146. package/dist/i18n/locales/es.js +1 -1
  147. package/dist/i18n/locales/source-keys.d.ts +1 -1
  148. package/dist/icons/index.d.ts +4 -8
  149. package/dist/icons/index.js +1 -1
  150. package/dist/index.d.ts +3 -4
  151. package/dist/index.js +1 -1
  152. package/dist/package.js +1 -1
  153. package/dist/shared/attribution/Attribution.js +1 -1
  154. package/dist/shared/attribution/Attribution.styles.js +1 -1
  155. package/dist/shared/dialog/Frame.js +1 -1
  156. package/dist/shared/format/formatFiat.d.ts +31 -0
  157. package/dist/shared/format/formatFiat.js +1 -0
  158. package/dist/shared/icons/BellIcon.d.ts +7 -0
  159. package/dist/shared/icons/BellIcon.js +1 -0
  160. package/dist/shared/icons/BitcoinIcon.d.ts +5 -8
  161. package/dist/shared/icons/BitcoinIcon.js +1 -1
  162. package/dist/shared/icons/CardIcon.d.ts +3 -3
  163. package/dist/shared/icons/DirhamSignIcon.d.ts +16 -0
  164. package/dist/shared/icons/DirhamSignIcon.js +1 -0
  165. package/dist/shared/icons/SearchIcon.d.ts +7 -0
  166. package/dist/shared/icons/SearchIcon.js +1 -0
  167. package/dist/shared/orchestrator/index.js +1 -1
  168. package/dist/shared/orchestrator/useOnrampSessionWatcher.js +1 -0
  169. package/dist/shared/ui/AmountInput/useAutoShrinkFontSize.js +1 -1
  170. package/dist/shared/ui/Checkbox/Checkbox.d.ts +47 -0
  171. package/dist/shared/ui/Checkbox/Checkbox.js +1 -0
  172. package/dist/shared/ui/Checkbox/Checkbox.slots.d.ts +12 -0
  173. package/dist/shared/ui/Checkbox/Checkbox.slots.js +1 -0
  174. package/dist/shared/ui/Checkbox/Checkbox.styles.js +1 -0
  175. package/dist/shared/ui/Checkbox/index.d.ts +2 -0
  176. package/dist/shared/ui/Checkbox/index.js +1 -0
  177. package/dist/shared/ui/CurrencyGlyph/CurrencyGlyph.d.ts +36 -0
  178. package/dist/shared/ui/CurrencyGlyph/CurrencyGlyph.js +1 -0
  179. package/dist/shared/ui/CurrencyGlyph/CurrencyGlyph.slots.d.ts +12 -0
  180. package/dist/shared/ui/CurrencyGlyph/CurrencyGlyph.slots.js +1 -0
  181. package/dist/shared/ui/CurrencyGlyph/CurrencyGlyph.styles.js +1 -0
  182. package/dist/shared/ui/CurrencyGlyph/flags.js +1 -0
  183. package/dist/shared/ui/CurrencyGlyph/index.d.ts +2 -0
  184. package/dist/shared/ui/CurrencyGlyph/index.js +1 -0
  185. package/dist/shared/ui/DisclosureRow/DisclosureRow.d.ts +56 -0
  186. package/dist/shared/ui/DisclosureRow/DisclosureRow.js +1 -0
  187. package/dist/shared/ui/DisclosureRow/DisclosureRow.slots.d.ts +8 -0
  188. package/dist/shared/ui/DisclosureRow/DisclosureRow.slots.js +1 -0
  189. package/dist/shared/ui/DisclosureRow/DisclosureRow.styles.js +1 -0
  190. package/dist/shared/ui/DisclosureRow/index.d.ts +2 -0
  191. package/dist/shared/ui/DisclosureRow/index.js +1 -0
  192. package/dist/shared/ui/FiatSymbol/FiatAmount.d.ts +32 -0
  193. package/dist/shared/ui/FiatSymbol/FiatAmount.js +1 -0
  194. package/dist/shared/ui/FiatSymbol/FiatSymbol.d.ts +30 -0
  195. package/dist/shared/ui/FiatSymbol/FiatSymbol.js +1 -0
  196. package/dist/shared/ui/FiatSymbol/index.d.ts +2 -0
  197. package/dist/shared/ui/FiatSymbol/index.js +1 -0
  198. package/dist/shared/ui/Tabs/Tabs.d.ts +2 -2
  199. package/dist/shared/utils/logos/resolveLogoSrc.js +1 -1
  200. package/dist/shared/widgets/activity/compound/ActivityDetail.js +1 -1
  201. package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
  202. package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
  203. package/dist/shared/widgets/amount-entry/compound/components/Footer.js +1 -1
  204. package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.d.ts +2 -1
  205. package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -1
  206. package/dist/shared/widgets/amount-entry/compound/components/Hero/StaticBand.js +1 -1
  207. package/dist/shared/widgets/amount-entry/compound/types.d.ts +16 -0
  208. package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.js +1 -1
  209. package/dist/shared/widgets/error-state/compound/ErrorState.styles.js +1 -1
  210. package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +3 -3
  211. package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -1
  212. package/dist/shared/widgets/success-state/compound/SuccessState.styles.js +1 -1
  213. package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +2 -3
  214. package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -1
  215. package/dist/stridge/StridgeProvider.d.ts +0 -10
  216. package/dist/stridge/StridgeProvider.js +1 -1
  217. package/dist/stridge/stubs.js +1 -1
  218. package/dist/styles/index.css +118 -40
  219. package/dist/types.d.ts +3 -3
  220. package/dist/ui/index.d.ts +9 -1
  221. package/dist/ui/index.js +1 -1
  222. package/dist/version.js +1 -1
  223. package/dist/withdraw/compound/index.js +1 -1
  224. package/package.json +1 -1
  225. package/dist/flows/deposit/bindings/DepositBindings.d.ts +0 -87
  226. package/dist/flows/deposit/bindings/DepositBindings.js +0 -1
  227. package/dist/flows/deposit/bindings/index.d.ts +0 -1
  228. package/dist/flows/deposit/bindings/index.js +0 -1
  229. package/dist/flows/deposit/shared/cash.d.ts +0 -20
  230. package/dist/flows/deposit/shared/cash.js +0 -1
  231. package/dist/flows/deposit/widgets/cash-amount-entry/CashAmountEntry.d.ts +0 -71
  232. package/dist/flows/deposit/widgets/cash-amount-entry/CashAmountEntry.js +0 -1
  233. package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.d.ts +0 -69
  234. package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.js +0 -1
  235. package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.d.ts +0 -16
  236. package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.js +0 -1
  237. package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.js +0 -1
  238. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.d.ts +0 -13
  239. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.js +0 -1
  240. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.d.ts +0 -18
  241. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.js +0 -1
  242. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.d.ts +0 -14
  243. package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.js +0 -1
  244. package/dist/flows/deposit/widgets/cash-amount-entry/compound/index.d.ts +0 -3
  245. package/dist/flows/deposit/widgets/cash-amount-entry/compound/index.js +0 -1
  246. package/dist/flows/deposit/widgets/cash-amount-entry/compound/types.d.ts +0 -42
  247. package/dist/flows/deposit/widgets/cash-amount-entry/index.d.ts +0 -1
  248. package/dist/flows/deposit/widgets/cash-amount-entry/index.js +0 -1
  249. package/dist/flows/deposit/widgets/cash-confirm/CashConfirm.d.ts +0 -63
  250. package/dist/flows/deposit/widgets/cash-confirm/CashConfirm.js +0 -1
  251. package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.d.ts +0 -54
  252. package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.js +0 -1
  253. package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.d.ts +0 -33
  254. package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.js +0 -1
  255. package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.styles.js +0 -1
  256. package/dist/flows/deposit/widgets/cash-confirm/compound/cashConfirmDimensions.js +0 -1
  257. package/dist/flows/deposit/widgets/cash-confirm/compound/components/ApplePayBody.d.ts +0 -15
  258. package/dist/flows/deposit/widgets/cash-confirm/compound/components/ApplePayBody.js +0 -1
  259. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Body.d.ts +0 -22
  260. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Body.js +0 -1
  261. package/dist/flows/deposit/widgets/cash-confirm/compound/components/BodyLabel.js +0 -1
  262. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardBody.d.ts +0 -16
  263. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardBody.js +0 -1
  264. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.icons.js +0 -1
  265. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.js +0 -1
  266. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.keys.js +0 -1
  267. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.state.js +0 -1
  268. package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.js +0 -1
  269. package/dist/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.d.ts +0 -16
  270. package/dist/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.js +0 -1
  271. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Header.d.ts +0 -21
  272. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Header.js +0 -1
  273. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Summary.d.ts +0 -17
  274. package/dist/flows/deposit/widgets/cash-confirm/compound/components/Summary.js +0 -1
  275. package/dist/flows/deposit/widgets/cash-confirm/compound/components/cardFormat.js +0 -1
  276. package/dist/flows/deposit/widgets/cash-confirm/compound/index.d.ts +0 -3
  277. package/dist/flows/deposit/widgets/cash-confirm/compound/index.js +0 -1
  278. package/dist/flows/deposit/widgets/cash-confirm/compound/types.d.ts +0 -66
  279. package/dist/flows/deposit/widgets/cash-confirm/index.d.ts +0 -1
  280. package/dist/flows/deposit/widgets/cash-confirm/index.js +0 -1
  281. package/dist/flows/deposit/widgets/cash-confirm/mocks.js +0 -1
  282. package/dist/shared/icons/AmexIcon.d.ts +0 -14
  283. package/dist/shared/icons/AmexIcon.js +0 -1
  284. package/dist/shared/icons/ApplePayIcon.d.ts +0 -15
  285. package/dist/shared/icons/ApplePayIcon.js +0 -1
  286. package/dist/shared/icons/CashIcon.d.ts +0 -16
  287. package/dist/shared/icons/CashIcon.js +0 -1
  288. package/dist/shared/icons/DiscoverIcon.d.ts +0 -14
  289. package/dist/shared/icons/DiscoverIcon.js +0 -1
  290. package/dist/shared/icons/GooglePayIcon.d.ts +0 -15
  291. package/dist/shared/icons/GooglePayIcon.js +0 -1
  292. package/dist/shared/icons/MastercardIcon.d.ts +0 -16
  293. package/dist/shared/icons/MastercardIcon.js +0 -1
  294. package/dist/shared/icons/VisaIcon.d.ts +0 -15
  295. package/dist/shared/icons/VisaIcon.js +0 -1
@@ -1 +1 @@
1
- import{formatDurationCompact as e}from"../../shared/format/formatDurationCompact.js";import{formatPercent as t}from"../../shared/format/formatPercent.js";import{formatTimestamp as n}from"../../shared/format/formatTimestamp.js";import{formatTokenAmount as r}from"../../shared/format/formatTokenAmount.js";import{formatUsd as i}from"../../shared/format/formatUsd.js";import{shortenAddress as a}from"../../shared/format/shortenAddress.js";const o=`Stridge ACME`,s=`0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266`,c=`0x1d72b900dd9b4f9fb0e11c14978d9cbbff7b47db0b820911839aad7081f6b72a`,l=`0x268a11a1002eb7026e3a77999872695ee3a920e5c46172a43aa396da10ac5296`,u=`0xcae135e02df387bba14e231988126295a663c8d9f8e90c1ead5876cc2fee036d`,d=1778167499e3,f=1778169184e3,p=1778086787e3,m=1778087105e3,h=`0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`,g=`https://cdn.stridge.com/assets/usdc.svg`,_=`https://cdn.stridge.com/assets/usdt.svg`,v={1:`https://cdn.stridge.com/networks/60.svg`,8453:`https://cdn.stridge.com/networks/8453.svg`,42161:`https://cdn.stridge.com/networks/9001.svg`},y=`https://cdn.stridge.com/networks/9006.svg`,b=`https://cdn.stridge.com/networks/966.svg`,x=`0x166872371d1EB43B62c25861Bb7B1be4d5f09F56`,S={address:s,chainId:56},C={name:o},w={networkId:`9006`,networkName:`BSC`,eip155IdString:`56`,eip155IdNumber:56,chainLogoUrl:y,explorerBase:`https://bscscan.com`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,isNative:!1,nativeSymbol:`BNB`};function T(e){if(!e)return w;let t=e.networkId.toLowerCase(),n=O.find(n=>n.networkName.toLowerCase()===t||(j[n.eip155Id]??n.eip155Id)===e.networkId);if(!n)return w;let r=n.acceptedAssets.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(!r)return w;let i=n.acceptedAssets.find(e=>e.isNative);return{networkId:j[n.eip155Id]??n.eip155Id,networkName:n.networkName,eip155IdString:n.eip155Id,eip155IdNumber:Number(n.eip155Id),chainLogoUrl:n.chainLogoUrl,explorerBase:n.explorerBase,symbol:r.symbol,decimals:r.decimals,address:r.address,assetLogoUrl:r.assetLogoUrl??n.chainLogoUrl,isNative:r.isNative,nativeSymbol:i?.symbol??r.symbol}}function E(e=w){return{network_id:e.networkId,network_name:e.networkName,network_symbol:e.networkName.toLowerCase(),chain_type:`EVM`,eip155_id:e.eip155IdNumber,native_currency:{symbol:e.nativeSymbol,name:e.nativeSymbol,decimals:18,logo:e.chainLogoUrl},assets:[{symbol:e.symbol,decimals:e.decimals,address:e.address,logo:e.assetLogoUrl}]}}const D=E();function ee(e,t,n=w){return{networkId:n.networkId,networkName:n.networkName,eip155Id:n.eip155IdString,chainLogoUrl:n.chainLogoUrl,symbol:n.symbol,decimals:n.decimals,address:n.address,assetLogoUrl:n.assetLogoUrl,isNative:n.isNative,...t===void 0?{}:{minAmountUsd:{value:t,formatted:i(t,e)}}}}const O=[{eip155Id:`1`,networkName:`Ethereum`,chainLogoUrl:v[1],explorerBase:`https://etherscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[1],priceImpact:`0.15`},{symbol:`TUSD`,address:`0x0000000000085d4780B73119b644AE5ecd22b376`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`,priceImpact:`0.18`},{symbol:`PAXG`,address:`0x45804880De22913dAFE09f4980848ECE6EcbAf78`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/paxg.svg`,priceImpact:`0.42`},{symbol:`DAI`,address:`0x6B175474E89094C44Da98b954EedeAC495271d0F`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`,priceImpact:`0.09`},{symbol:`PYUSD`,address:`0x6c3ea9036406852006290770BEdFcAbA0e23A0e8`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/pyusd.svg`,priceImpact:`0.21`},{symbol:`USDC`,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,priceImpact:`0.05`},{symbol:`WETH`,address:`0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`,priceImpact:`0.31`},{symbol:`USDT`,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,decimals:6,isNative:!1,assetLogoUrl:_,priceImpact:`0.07`}]},{eip155Id:`56`,networkName:`BSC`,chainLogoUrl:y,explorerBase:`https://bscscan.com`,acceptedAssets:[{symbol:`BNB`,address:``,decimals:18,isNative:!0,assetLogoUrl:y,priceImpact:`0.21`},{symbol:`WETH`,address:`0x2170Ed0880ac9A755fd29B2688956BD959F933F8`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`,priceImpact:`0.34`},{symbol:`TUSD`,address:`0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`,priceImpact:`0.2`},{symbol:`USDT`,address:`0x55d398326f99059fF775485246999027B3197955`,decimals:18,isNative:!1,assetLogoUrl:_,priceImpact:`0.08`},{symbol:`USDC`,address:h,decimals:18,isNative:!1,assetLogoUrl:g,priceImpact:`0.06`}]},{eip155Id:`8453`,networkName:`Base`,chainLogoUrl:v[8453],explorerBase:`https://basescan.org`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[8453],priceImpact:`0.19`},{symbol:`WETH`,address:`0x4200000000000000000000000000000000000006`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`,priceImpact:`0.29`},{symbol:`DAI`,address:`0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`,priceImpact:`0.11`},{symbol:`USDC`,address:`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,priceImpact:`0.04`},{symbol:`USDT`,address:`0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2`,decimals:6,isNative:!1,assetLogoUrl:_,priceImpact:`0.07`}]},{eip155Id:`42161`,networkName:`Arbitrum`,chainLogoUrl:v[42161],explorerBase:`https://arbiscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[42161],priceImpact:`0.17`},{symbol:`TUSD`,address:`0x4D15a3A2286D883AF0AA1B3f21367843FAc63E07`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`,priceImpact:`0.16`},{symbol:`WETH`,address:`0x82aF49447D8a07e3bd95BD0d56f35241523fBab1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`,priceImpact:`0.27`},{symbol:`USDC`,address:`0xaf88d065e77c8cC2239327C5EDb3A432268e5831`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,priceImpact:`0.05`},{symbol:`DAI`,address:`0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`,priceImpact:`0.1`},{symbol:`USDT`,address:`0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9`,decimals:6,isNative:!1,assetLogoUrl:_,priceImpact:`0.06`}]},{eip155Id:`137`,networkName:`Polygon`,chainLogoUrl:b,explorerBase:`https://polygonscan.com`,acceptedAssets:[{symbol:`POL`,address:``,decimals:18,isNative:!0,assetLogoUrl:b,priceImpact:`0.33`},{symbol:`TUSD`,address:`0x2e1AD108fF1D8C782fcBbB89AAd783aC49586756`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`,priceImpact:`0.22`},{symbol:`USDC`,address:`0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,priceImpact:`0.08`},{symbol:`WETH`,address:`0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`,priceImpact:`0.36`},{symbol:`DAI`,address:`0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`,priceImpact:`0.13`},{symbol:`USDT`,address:`0xc2132D05D31c914a87C6611C10748AEb04B58e8F`,decimals:6,isNative:!1,assetLogoUrl:_,priceImpact:`0.09`}]}];function k(e,t){let n=t===void 0?{}:{minAmountUsd:{value:t,formatted:i(t,e)}};return O.map(({eip155Id:e,networkName:t,chainLogoUrl:r,explorerBase:i,acceptedAssets:o})=>({eip155Id:e,networkName:t,chainLogoUrl:r,address:{value:x,formatted:a(x)},explorerUrl:`${i}/address/${x}`,acceptedAssets:o,...n}))}const A=O.map(({eip155Id:e,networkName:t,chainLogoUrl:n,explorerBase:r,acceptedAssets:i})=>({eip155Id:e,networkName:t,chainLogoUrl:n,address:{value:x,formatted:a(x)},explorerUrl:`${r}/address/${x}`,acceptedAssets:i})),j={1:`60`,56:`9006`,137:`966`,8453:`8453`,42161:`9001`};function M(){return{assets:O.map(e=>{let t=e.acceptedAssets.find(e=>e.isNative),n=e.acceptedAssets.filter(e=>!e.isNative);return{eip155_id:Number(e.eip155Id),network_id:j[e.eip155Id]??e.eip155Id,network_name:e.networkName.toLowerCase(),network_symbol:e.networkName.toLowerCase(),chain_type:`EVM`,assets:n.map(e=>({address:e.address,decimals:e.decimals,logo:e.assetLogoUrl??``,name:e.symbol,symbol:e.symbol,...e.priceImpact?{price_impact:e.priceImpact}:{}})),native_currency:{symbol:t?.symbol??``,name:t?.symbol??``,decimals:t?.decimals??18,logo:t?.assetLogoUrl??e.chainLogoUrl,...t?.priceImpact?{price_impact:t.priceImpact}:{}}}})}}function N(e){return[{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,chainLogoUrl:y,isNative:!1,amount:{value:42.805864,formatted:r(42.805864,e,{compact:!0})},amountUsd:{value:42.81,formatted:i(42.81,e)},priceUsd:1},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`BNB`,decimals:18,address:``,assetLogoUrl:y,chainLogoUrl:y,isNative:!0,amount:{value:.016699,formatted:r(.016699,e,{compact:!0})},amountUsd:{value:10.86,formatted:i(10.86,e)},priceUsd:650.41},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDT`,decimals:6,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,assetLogoUrl:_,chainLogoUrl:v[1],isNative:!1,amount:{value:.757479,formatted:r(.757479,e,{compact:!0})},amountUsd:{value:.76,formatted:i(.76,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDT`,decimals:18,address:`0x55d398326f99059fF775485246999027B3197955`,assetLogoUrl:_,chainLogoUrl:y,isNative:!1,amount:{value:.595218,formatted:r(.595218,e,{compact:!0})},amountUsd:{value:.6,formatted:i(.6,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`ETH`,decimals:18,address:``,assetLogoUrl:v[1],chainLogoUrl:v[1],isNative:!0,amount:{value:167e-6,formatted:r(167e-6,e,{compact:!0})},amountUsd:{value:.39,formatted:i(.39,e)},priceUsd:2316.86,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,chainLogoUrl:v[1],isNative:!1,amount:{value:.10408,formatted:r(.10408,e,{compact:!0})},amountUsd:{value:.1,formatted:i(.1,e)},priceUsd:1,lowBalance:!0,disabled:!0}]}function P(e,n,a=w){return{heroAmountUsd:{value:1.999758,formatted:i(1.999758,e)},sendAsset:{symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,isNative:!1,chainId:1,networkName:`Ethereum`,eip155Id:`1`,chainLogoUrl:v[1]},sendAmount:{value:2,formatted:r(2,e)},receiveAsset:{symbol:a.symbol,decimals:a.decimals,address:a.address,assetLogoUrl:a.assetLogoUrl,isNative:a.isNative,chainId:a.eip155IdNumber,networkName:a.networkName,eip155Id:a.eip155IdString,chainLogoUrl:a.chainLogoUrl},receiveAmount:{value:1.9958,formatted:r(1.9958,e)},quoteTotalSeconds:30,expiresAt:n,etaSeconds:30,breakdown:{selectedRoute:{provider:`lifi`,scenario:`cross_chain_diff_token`,label:`LIFI · cross chain diff token`},networkCost:{value:.0042,formatted:i(.0042,e)},priceImpact:{value:.21,formatted:t(.21,e)}}}}function F(e,t=w){return{kind:`pending`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},creditedAsset:{symbol:t.symbol,decimals:t.decimals,address:t.address,assetLogoUrl:t.assetLogoUrl,isNative:t.isNative},creditedTo:o,txHash:{value:c,formatted:a(c)},txExplorerUrl:`https://etherscan.io/tx/${c}`,detectedAt:{value:d,formatted:n(d,e)},submittedAt:{value:d,formatted:n(d,e)},receiveAmount:{value:4.983615,formatted:r(4.983615,e)}}}function I(t,i=w){let u=f-d;return{kind:`succeeded`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:4.983615,formatted:r(4.983615,t)},routeHops:[{provider:`LIFI`,chainId:1},{provider:`LIFI`,chainId:i.eip155IdNumber}],totalTime:{value:u,formatted:e(u,t)},depositTx:{hash:{value:c,formatted:a(c)},explorerUrl:`https://etherscan.io/tx/${c}`},completionTx:{hash:{value:l,formatted:a(l)},explorerUrl:`${i.explorerBase}/tx/${l}`},submittedAt:{value:d,formatted:n(d,t)},filledAt:{value:f,formatted:n(f,t)}}}function L(e,t=`execution-reverted`,i=w){return{kind:`failed`,failureKind:t,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:0,formatted:r(0,e)},txHash:{value:u,formatted:a(u)},txExplorerUrl:`https://etherscan.io/tx/${u}`,submittedAt:{value:p,formatted:n(p,e)},failedAt:{value:m,formatted:n(m,e)}}}function R(e,t=S){let n=N(e).reduce((e,t)=>e+(t.amountUsd?.value??0),0);return{address:{value:t.address,formatted:a(t.address)},...t.chainId===void 0?{}:{chainId:t.chainId},balanceTotalUsd:{value:n,formatted:i(n,e)}}}const z=116e3,B={id:`D79cZK`,message:`Instant`};function V(e){let t=()=>({limit:{value:z,formatted:i(z,e)},processingTime:{value:0,formatted:e._(B)}});return{card:t(),applePay:t(),googlePay:t()}}const H={deposit_addresses:[],metadata:{brand_name:o}},U=[],W={assets:[]},G={chains:[]},K={},q={id:`mock-settlement`,status:`completed`,created_at:new Date(d).toISOString(),updated_at:new Date(f).toISOString()},J={settlements:[],is_terminal:!1},Y=`0x32995Fb47918BD37133dB46F21c5Ed906140Dd41`,X=`https://cdn.stridge.com/assets/usdc.svg`;function Z(e,t=Date.now()){let n=6e4,r=60*n,i=24*r,a=[Q({id:`mock-activity-deposit-pending`,status:`routing`,updatedAtMs:t-12*n,createdAtMs:t-15*n,amountUsd:`25.00`,toAddress:e}),Q({id:`mock-activity-deposit-failed`,status:`failed`,updatedAtMs:t-2*r,createdAtMs:t-2*r-35e3,amountUsd:`18.40`,toAddress:e,error:`destination chain reverted`}),Q({id:`mock-activity-deposit-success-recent`,status:`completed`,updatedAtMs:t-6*r,createdAtMs:t-6*r-23e3,amountUsd:`42.50`,toAddress:e}),Q({id:`mock-activity-deposit-success-yesterday`,status:`completed`,updatedAtMs:t-i-2*r,createdAtMs:t-i-2*r-17e3,amountUsd:`8.20`,toAddress:e}),Q({id:`mock-activity-deposit-success-week`,status:`completed`,updatedAtMs:t-9*i,createdAtMs:t-9*i-14e3,amountUsd:`120.00`,toAddress:e})],o=[$({id:`mock-activity-withdraw-failed`,status:`failed`,updatedAtMs:t-3*i,createdAtMs:t-3*i-9e4,amountUsd:`15.00`,error:`transaction failed on chain`}),$({id:`mock-activity-withdraw-success-recent`,status:`completed`,updatedAtMs:t-18*r,createdAtMs:t-18*r-12e3,amountUsd:`60.00`}),$({id:`mock-activity-withdraw-success-week`,status:`completed`,updatedAtMs:t-11*i,createdAtMs:t-11*i-19e3,amountUsd:`200.00`})];return{owner:e,filter:{},udas:[{uda_id:`mock-uda-deposit`,owner:e,is_terminal:!1,status:`from_detected`,created_at:new Date(t-30*i).toISOString(),updated_at:new Date(t-12*n).toISOString(),destination:{address:e,asset_address:h,asset_symbol:`USDC`,asset_decimals:18,network_id:`9006`,network_name:`BSC`,eip155_id:`56`},settlements:a,metadata:{kit_flow:`deposit`}},{uda_id:`mock-uda-withdraw`,owner:e,is_terminal:!1,status:`completed`,created_at:new Date(t-25*i).toISOString(),updated_at:new Date(t-18*r).toISOString(),destination:{address:Y,asset_address:``,asset_decimals:18,asset_symbol:`ETH`,network_id:`60`,network_name:`Ethereum`,eip155_id:`1`},settlements:o,metadata:{kit_flow:`withdraw`}}]}}function Q(e){return{id:e.id,status:e.status,created_at:new Date(e.createdAtMs).toISOString(),updated_at:new Date(e.updatedAtMs).toISOString(),events:[],fees:{},route:{provider:`lifi`},...e.error?{error:e.error}:{},from:{tx_id:`0x${e.id.padEnd(60,`0`)}`,asset_symbol:`USDC`,eip155_id:`1`,network_id:`60`,network_name:`Ethereum`,raw_amount:`0`,amount:e.amountUsd,amount_usd:e.amountUsd,logo:X},to:{address:e.toAddress,asset_address:h,asset_symbol:`USDC`,eip155_id:`56`,network_id:`9006`,network_name:`BSC`,raw_amount:`0`,amount:e.amountUsd,amount_usd:e.amountUsd,logo:X,tx_id:`0xto${e.id.padEnd(58,`0`)}`,settled_at:e.status===`completed`?new Date(e.updatedAtMs).toISOString():void 0}}}function $(e){return{id:e.id,status:e.status,created_at:new Date(e.createdAtMs).toISOString(),updated_at:new Date(e.updatedAtMs).toISOString(),events:[],fees:{},route:{provider:`lifi`},...e.error?{error:e.error}:{},from:{tx_id:`0x${e.id.padEnd(60,`0`)}`,asset_symbol:`USDC`,eip155_id:`56`,network_id:`9006`,network_name:`BSC`,raw_amount:`0`,amount:e.amountUsd,amount_usd:e.amountUsd,logo:X},to:{address:Y,asset_address:``,asset_symbol:`ETH`,eip155_id:`1`,network_id:`60`,network_name:`Ethereum`,raw_amount:`0`,amount:e.amountUsd,amount_usd:e.amountUsd,logo:`https://cdn.stridge.com/networks/60.svg`,tx_id:`0xto${e.id.padEnd(58,`0`)}`,settled_at:e.status===`completed`?new Date(e.updatedAtMs).toISOString():void 0}}}function te(e,t,n,r){return t===`pending`?F(e,n&&typeof n!=`string`?n:void 0):t===`succeeded`?I(e,n&&typeof n!=`string`?n:void 0):L(e,typeof n==`string`?n:void 0,r)}export{A as DEFAULT_ADDRESSES_PAYLOAD,C as DEFAULT_BRAND_PAYLOAD,w as DEFAULT_MOCK_ASSET,D as DEFAULT_TARGET_RAW,S as DEFAULT_WALLET_INFO,U as STUB_DEPOSIT_ADDRESSES_RAW,J as STUB_GATEWAY_POLL_RESPONSE,q as STUB_GATEWAY_SETTLEMENT_DTO,H as STUB_GATEWAY_START_RESPONSE,G as STUB_ONCHAIN_BALANCE_RESPONSE,K as STUB_QUOTE_RESPONSE,W as STUB_SUPPORTED_ASSETS_RESPONSE,k as buildDefaultAddressesPayload,N as buildDefaultBalances,V as buildDefaultCashMethodsPayload,L as buildDefaultFailurePayload,F as buildDefaultPendingPayload,P as buildDefaultQuotePayload,I as buildDefaultSuccessPayload,M as buildDefaultSupportedAssetsResponse,ee as buildDefaultTargetPayload,E as buildDefaultTargetRaw,R as buildDefaultWalletPayload,Z as buildMockActivityResponse,te as buildSettlementPayload,T as resolveMockAsset};
1
+ import{formatDurationCompact as e}from"../../shared/format/formatDurationCompact.js";import{formatFiat as t}from"../../shared/format/formatFiat.js";import{formatPercent as n}from"../../shared/format/formatPercent.js";import{formatTimestamp as r}from"../../shared/format/formatTimestamp.js";import{formatTokenAmount as i}from"../../shared/format/formatTokenAmount.js";import{formatUsd as a}from"../../shared/format/formatUsd.js";import{shortenAddress as o}from"../../shared/format/shortenAddress.js";import{BANXA_LOGO_DATA_URI as s}from"../../flows/deposit/shared/onramp.js";const c=`Stridge ACME`,l=`0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266`,u=`0x1d72b900dd9b4f9fb0e11c14978d9cbbff7b47db0b820911839aad7081f6b72a`,d=`0x268a11a1002eb7026e3a77999872695ee3a920e5c46172a43aa396da10ac5296`,f=`0xcae135e02df387bba14e231988126295a663c8d9f8e90c1ead5876cc2fee036d`,p=1778167499e3,m=1778169184e3,h=1778086787e3,g=1778087105e3,_=`0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`,v=`https://cdn.stridge.com/assets/usdc.svg`,y=`https://cdn.stridge.com/assets/usdt.svg`,b={1:`https://cdn.stridge.com/networks/60.svg`,8453:`https://cdn.stridge.com/networks/8453.svg`,42161:`https://cdn.stridge.com/networks/9001.svg`},x=`https://cdn.stridge.com/networks/9006.svg`,S=`https://cdn.stridge.com/networks/966.svg`,C=`0x166872371d1EB43B62c25861Bb7B1be4d5f09F56`,w={address:l,chainId:56},T={name:c},E={networkId:`9006`,networkName:`BSC`,eip155IdString:`56`,eip155IdNumber:56,chainLogoUrl:x,explorerBase:`https://bscscan.com`,symbol:`USDC`,decimals:18,address:_,assetLogoUrl:v,isNative:!1,nativeSymbol:`BNB`};function ee(e){if(!e)return E;let t=e.networkId.toLowerCase(),n=k.find(n=>n.networkName.toLowerCase()===t||(M[n.eip155Id]??n.eip155Id)===e.networkId);if(!n)return E;let r=n.acceptedAssets.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(!r)return E;let i=n.acceptedAssets.find(e=>e.isNative);return{networkId:M[n.eip155Id]??n.eip155Id,networkName:n.networkName,eip155IdString:n.eip155Id,eip155IdNumber:Number(n.eip155Id),chainLogoUrl:n.chainLogoUrl,explorerBase:n.explorerBase,symbol:r.symbol,decimals:r.decimals,address:r.address,assetLogoUrl:r.assetLogoUrl??n.chainLogoUrl,isNative:r.isNative,nativeSymbol:i?.symbol??r.symbol}}function D(e=E){return{network_id:e.networkId,network_name:e.networkName,network_symbol:e.networkName.toLowerCase(),chain_type:`EVM`,eip155_id:e.eip155IdNumber,native_currency:{symbol:e.nativeSymbol,name:e.nativeSymbol,decimals:18,logo:e.chainLogoUrl},assets:[{symbol:e.symbol,decimals:e.decimals,address:e.address,logo:e.assetLogoUrl}]}}const te=D();function O(e,t,n=E){return{networkId:n.networkId,networkName:n.networkName,eip155Id:n.eip155IdString,chainLogoUrl:n.chainLogoUrl,symbol:n.symbol,decimals:n.decimals,address:n.address,assetLogoUrl:n.assetLogoUrl,isNative:n.isNative,...t===void 0?{}:{minAmountUsd:{value:t,formatted:a(t,e)}}}}const k=[{eip155Id:`1`,networkName:`Ethereum`,chainLogoUrl:b[1],explorerBase:`https://etherscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:b[1],priceImpact:`0.15`},{symbol:`TUSD`,address:`0x0000000000085d4780B73119b644AE5ecd22b376`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`,priceImpact:`0.18`},{symbol:`PAXG`,address:`0x45804880De22913dAFE09f4980848ECE6EcbAf78`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/paxg.svg`,priceImpact:`0.42`},{symbol:`DAI`,address:`0x6B175474E89094C44Da98b954EedeAC495271d0F`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`,priceImpact:`0.09`},{symbol:`PYUSD`,address:`0x6c3ea9036406852006290770BEdFcAbA0e23A0e8`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/pyusd.svg`,priceImpact:`0.21`},{symbol:`USDC`,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,priceImpact:`0.05`},{symbol:`WETH`,address:`0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`,priceImpact:`0.31`},{symbol:`USDT`,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,decimals:6,isNative:!1,assetLogoUrl:y,priceImpact:`0.07`}]},{eip155Id:`56`,networkName:`BSC`,chainLogoUrl:x,explorerBase:`https://bscscan.com`,acceptedAssets:[{symbol:`BNB`,address:``,decimals:18,isNative:!0,assetLogoUrl:x,priceImpact:`0.21`},{symbol:`WETH`,address:`0x2170Ed0880ac9A755fd29B2688956BD959F933F8`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`,priceImpact:`0.34`},{symbol:`TUSD`,address:`0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`,priceImpact:`0.2`},{symbol:`USDT`,address:`0x55d398326f99059fF775485246999027B3197955`,decimals:18,isNative:!1,assetLogoUrl:y,priceImpact:`0.08`},{symbol:`USDC`,address:_,decimals:18,isNative:!1,assetLogoUrl:v,priceImpact:`0.06`}]},{eip155Id:`8453`,networkName:`Base`,chainLogoUrl:b[8453],explorerBase:`https://basescan.org`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:b[8453],priceImpact:`0.19`},{symbol:`WETH`,address:`0x4200000000000000000000000000000000000006`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`,priceImpact:`0.29`},{symbol:`DAI`,address:`0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`,priceImpact:`0.11`},{symbol:`USDC`,address:`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,priceImpact:`0.04`},{symbol:`USDT`,address:`0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2`,decimals:6,isNative:!1,assetLogoUrl:y,priceImpact:`0.07`}]},{eip155Id:`42161`,networkName:`Arbitrum`,chainLogoUrl:b[42161],explorerBase:`https://arbiscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:b[42161],priceImpact:`0.17`},{symbol:`TUSD`,address:`0x4D15a3A2286D883AF0AA1B3f21367843FAc63E07`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`,priceImpact:`0.16`},{symbol:`WETH`,address:`0x82aF49447D8a07e3bd95BD0d56f35241523fBab1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`,priceImpact:`0.27`},{symbol:`USDC`,address:`0xaf88d065e77c8cC2239327C5EDb3A432268e5831`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,priceImpact:`0.05`},{symbol:`DAI`,address:`0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`,priceImpact:`0.1`},{symbol:`USDT`,address:`0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9`,decimals:6,isNative:!1,assetLogoUrl:y,priceImpact:`0.06`}]},{eip155Id:`137`,networkName:`Polygon`,chainLogoUrl:S,explorerBase:`https://polygonscan.com`,acceptedAssets:[{symbol:`POL`,address:``,decimals:18,isNative:!0,assetLogoUrl:S,priceImpact:`0.33`},{symbol:`TUSD`,address:`0x2e1AD108fF1D8C782fcBbB89AAd783aC49586756`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`,priceImpact:`0.22`},{symbol:`USDC`,address:`0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,priceImpact:`0.08`},{symbol:`WETH`,address:`0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`,priceImpact:`0.36`},{symbol:`DAI`,address:`0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`,priceImpact:`0.13`},{symbol:`USDT`,address:`0xc2132D05D31c914a87C6611C10748AEb04B58e8F`,decimals:6,isNative:!1,assetLogoUrl:y,priceImpact:`0.09`}]}];function A(e,t){let n=t===void 0?{}:{minAmountUsd:{value:t,formatted:a(t,e)}};return k.map(({eip155Id:e,networkName:t,chainLogoUrl:r,explorerBase:i,acceptedAssets:a})=>({eip155Id:e,networkName:t,chainLogoUrl:r,address:{value:C,formatted:o(C)},explorerUrl:`${i}/address/${C}`,acceptedAssets:a,...n}))}const j=k.map(({eip155Id:e,networkName:t,chainLogoUrl:n,explorerBase:r,acceptedAssets:i})=>({eip155Id:e,networkName:t,chainLogoUrl:n,address:{value:C,formatted:o(C)},explorerUrl:`${r}/address/${C}`,acceptedAssets:i})),M={1:`60`,56:`9006`,137:`966`,8453:`8453`,42161:`9001`};function N(){return{assets:k.map(e=>{let t=e.acceptedAssets.find(e=>e.isNative),n=e.acceptedAssets.filter(e=>!e.isNative);return{eip155_id:Number(e.eip155Id),network_id:M[e.eip155Id]??e.eip155Id,network_name:e.networkName.toLowerCase(),network_symbol:e.networkName.toLowerCase(),chain_type:`EVM`,assets:n.map(e=>({address:e.address,decimals:e.decimals,logo:e.assetLogoUrl??``,name:e.symbol,symbol:e.symbol,...e.priceImpact?{price_impact:e.priceImpact}:{}})),native_currency:{symbol:t?.symbol??``,name:t?.symbol??``,decimals:t?.decimals??18,logo:t?.assetLogoUrl??e.chainLogoUrl,...t?.priceImpact?{price_impact:t.priceImpact}:{}}}})}}function P(e){return[{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDC`,decimals:18,address:_,assetLogoUrl:v,chainLogoUrl:x,isNative:!1,amount:{value:42.805864,formatted:i(42.805864,e,{compact:!0})},amountUsd:{value:42.81,formatted:a(42.81,e)},priceUsd:1},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`BNB`,decimals:18,address:``,assetLogoUrl:x,chainLogoUrl:x,isNative:!0,amount:{value:.016699,formatted:i(.016699,e,{compact:!0})},amountUsd:{value:10.86,formatted:a(10.86,e)},priceUsd:650.41},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDT`,decimals:6,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,assetLogoUrl:y,chainLogoUrl:b[1],isNative:!1,amount:{value:.757479,formatted:i(.757479,e,{compact:!0})},amountUsd:{value:.76,formatted:a(.76,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDT`,decimals:18,address:`0x55d398326f99059fF775485246999027B3197955`,assetLogoUrl:y,chainLogoUrl:x,isNative:!1,amount:{value:.595218,formatted:i(.595218,e,{compact:!0})},amountUsd:{value:.6,formatted:a(.6,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`ETH`,decimals:18,address:``,assetLogoUrl:b[1],chainLogoUrl:b[1],isNative:!0,amount:{value:167e-6,formatted:i(167e-6,e,{compact:!0})},amountUsd:{value:.39,formatted:a(.39,e)},priceUsd:2316.86,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,chainLogoUrl:b[1],isNative:!1,amount:{value:.10408,formatted:i(.10408,e,{compact:!0})},amountUsd:{value:.1,formatted:a(.1,e)},priceUsd:1,lowBalance:!0,disabled:!0}]}function ne(e,t,r=E){return{heroAmountUsd:{value:1.999758,formatted:a(1.999758,e)},sendAsset:{symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,isNative:!1,chainId:1,networkName:`Ethereum`,eip155Id:`1`,chainLogoUrl:b[1]},sendAmount:{value:2,formatted:i(2,e)},receiveAsset:{symbol:r.symbol,decimals:r.decimals,address:r.address,assetLogoUrl:r.assetLogoUrl,isNative:r.isNative,chainId:r.eip155IdNumber,networkName:r.networkName,eip155Id:r.eip155IdString,chainLogoUrl:r.chainLogoUrl},receiveAmount:{value:1.9958,formatted:i(1.9958,e)},quoteTotalSeconds:30,expiresAt:t,etaSeconds:30,breakdown:{selectedRoute:{provider:`lifi`,scenario:`cross_chain_diff_token`,label:`LIFI · cross chain diff token`},networkCost:{value:.0042,formatted:a(.0042,e)},priceImpact:{value:.21,formatted:n(.21,e)}}}}function F(e,t=E){return{kind:`pending`,sourceWallet:{name:`Wallet`,address:{value:l,formatted:o(l)},explorerUrl:`https://etherscan.io/address/${l}`},creditedAsset:{symbol:t.symbol,decimals:t.decimals,address:t.address,assetLogoUrl:t.assetLogoUrl,isNative:t.isNative},creditedTo:c,txHash:{value:u,formatted:o(u)},txExplorerUrl:`https://etherscan.io/tx/${u}`,detectedAt:{value:p,formatted:r(p,e)},submittedAt:{value:p,formatted:r(p,e)},receiveAmount:{value:4.983615,formatted:i(4.983615,e)}}}function I(t,n=E){let a=m-p;return{kind:`succeeded`,sourceWallet:{name:`Wallet`,address:{value:l,formatted:o(l)},explorerUrl:`https://etherscan.io/address/${l}`},destination:{name:c,address:{value:l,formatted:o(l)}},creditedAsset:{symbol:n.symbol,decimals:n.decimals,address:n.address,assetLogoUrl:n.assetLogoUrl,isNative:n.isNative},receiveAmount:{value:4.983615,formatted:i(4.983615,t)},routeHops:[{provider:`LIFI`,chainId:1},{provider:`LIFI`,chainId:n.eip155IdNumber}],totalTime:{value:a,formatted:e(a,t)},depositTx:{hash:{value:u,formatted:o(u)},explorerUrl:`https://etherscan.io/tx/${u}`},completionTx:{hash:{value:d,formatted:o(d)},explorerUrl:`${n.explorerBase}/tx/${d}`},submittedAt:{value:p,formatted:r(p,t)},filledAt:{value:m,formatted:r(m,t)}}}function L(e,t=`execution-reverted`,n=E){return{kind:`failed`,failureKind:t,sourceWallet:{name:`Wallet`,address:{value:l,formatted:o(l)},explorerUrl:`https://etherscan.io/address/${l}`},destination:{name:c,address:{value:l,formatted:o(l)}},creditedAsset:{symbol:n.symbol,decimals:n.decimals,address:n.address,assetLogoUrl:n.assetLogoUrl,isNative:n.isNative},receiveAmount:{value:0,formatted:i(0,e)},txHash:{value:f,formatted:o(f)},txExplorerUrl:`https://etherscan.io/tx/${f}`,submittedAt:{value:h,formatted:r(h,e)},failedAt:{value:g,formatted:r(g,e)}}}function re(e,t=w){let n=P(e).reduce((e,t)=>e+(t.amountUsd?.value??0),0);return{address:{value:t.address,formatted:o(t.address)},...t.chainId===void 0?{}:{chainId:t.chainId},balanceTotalUsd:{value:n,formatted:a(n,e)}}}const R=116e3,z={id:`D79cZK`,message:`Instant`};function B(e){return{limit:{value:R,formatted:a(R,e)},processingTime:{value:0,formatted:e._(z)}}}const V=[{code:`USD`,name:`US Dollar`,symbol:`$`,popular:!0},{code:`EUR`,name:`Euro`,symbol:`€`,popular:!0},{code:`GBP`,name:`British Pound`,symbol:`£`,popular:!0},{code:`JPY`,name:`Japanese Yen`,symbol:`¥`,popular:!0},{code:`CNY`,name:`Chinese Yuan`,symbol:`¥`,popular:!0},{code:`AUD`,name:`Australian Dollar`,symbol:`A$`,popular:!0},{code:`CAD`,name:`Canadian Dollar`,symbol:`C$`,popular:!0},{code:`CHF`,name:`Swiss Franc`,symbol:`CHF`,popular:!0},{code:`AED`,name:`UAE Dirham`,symbol:`د.إ`,popular:!1},{code:`ARS`,name:`Argentine Peso`,symbol:`$`,popular:!1},{code:`BRL`,name:`Brazilian Real`,symbol:`R$`,popular:!1},{code:`INR`,name:`Indian Rupee`,symbol:`₹`,popular:!1},{code:`KRW`,name:`South Korean Won`,symbol:`₩`,popular:!1},{code:`MXN`,name:`Mexican Peso`,symbol:`$`,popular:!1},{code:`NGN`,name:`Nigerian Naira`,symbol:`₦`,popular:!1},{code:`SGD`,name:`Singapore Dollar`,symbol:`S$`,popular:!1},{code:`THB`,name:`Thai Baht`,symbol:`฿`,popular:!1},{code:`TRY`,name:`Turkish Lira`,symbol:`₺`,popular:!1},{code:`ZAR`,name:`South African Rand`,symbol:`R`,popular:!1}];function H(e){return V.find(t=>t.code===e)?.symbol??e}function U(){return{suggested:`USD`,currencies:V.map(e=>({code:e.code,name:e.name,symbol:e.symbol,popular:e.popular}))}}function W(e,n,r,a=`USD`){let o=Number.isFinite(n)&&n>0?n:0,s=+(o*.019).toFixed(2),c=.4,l=+(s+c).toFixed(2),u=Math.max(0,o-l),d=H(a);return{amountUsd:{value:o,formatted:t(o,e,a)},amountFiat:{value:o,formatted:t(o,e,a)},fiatCurrency:a,fiatSymbol:d,receiveAmount:{value:u,formatted:i(u,e)},receiveAsset:{symbol:r.symbol,decimals:r.decimals,address:r.address,isNative:r.isNative,chainId:r.eip155IdNumber},rate:{value:1,formatted:i(1,e)},processingFeeUsd:{value:s,formatted:t(s,e,a)},networkFeeUsd:{value:c,formatted:t(c,e,a)},totalFeeUsd:{value:l,formatted:t(l,e,a)},provider:`mock-onramp-provider`}}function G(e){return{activeId:`primary`,providers:[{id:`primary`,name:`Banxa`,status:`active`,logoUrl:s,receiveAsset:{symbol:e.symbol},disclaimer:{providerName:`Banxa`,links:[{kind:`terms`,url:`https://banxa.com/terms-of-use/`},{kind:`privacy`,url:`https://banxa.com/privacy-policy/`}]}}]}}const K=`mock-onramp-order-0001`,q=`https://checkout.mock-onramp-provider.example/?orderId=${K}`;function J(e,t,n,r=`SESSION_PENDING`,i=q){let a=W(e,t,n);return{sessionId:`mock-onramp-session-0001`,state:r,checkoutUrl:i,providerOrderId:K,receiveAmount:a.receiveAmount,fiatAmount:a.amountFiat,fiatCurrency:a.fiatCurrency,depositAsset:`ETH`,destinationAsset:a.receiveAsset.symbol,destinationAddress:{value:l,formatted:o(l)}}}const Y={provider:`mock-onramp-provider`,country:{code:`US`,source:`tenant`,confidence:`high`},suggested:`USD`,fiats:V.map(e=>({code:e.code,name:e.name,symbol:e.symbol}))},ie={provider:`mock-onramp-provider`,fiatCurrency:`USD`,fiatAmount:`0`,assetName:`USDC`,assetAmount:`0`,rate:`1`,fees:{total:`0`}},ae={sessionId:`mock-onramp-session-0001`,state:`SESSION_PENDING`,externalOrderId:`mock-onramp-session-0001`,flow:{fiat:{currency:`USD`,amount:`0`},udaEntry:{address:`0x0`,networkId:`60`,asset:`USDC`},destination:{address:`0x0`,networkId:`60`,asset:`USDC`,amount:`0`}},etag:`mock-0`},oe={deposit_addresses:[],metadata:{brand_name:c}},se=[],ce={assets:[]},le={chains:[]},ue={},de={id:`mock-settlement`,status:`completed`,created_at:new Date(p).toISOString(),updated_at:new Date(m).toISOString()},fe={settlements:[],is_terminal:!1},X=`0x32995Fb47918BD37133dB46F21c5Ed906140Dd41`,Z=`https://cdn.stridge.com/assets/usdc.svg`;function pe(e,t=Date.now()){let n=6e4,r=60*n,i=24*r,a=[Q({id:`mock-activity-deposit-pending`,status:`routing`,updatedAtMs:t-12*n,createdAtMs:t-15*n,amountUsd:`25.00`,toAddress:e}),Q({id:`mock-activity-deposit-failed`,status:`failed`,updatedAtMs:t-2*r,createdAtMs:t-2*r-35e3,amountUsd:`18.40`,toAddress:e,error:`destination chain reverted`}),Q({id:`mock-activity-deposit-success-recent`,status:`completed`,updatedAtMs:t-6*r,createdAtMs:t-6*r-23e3,amountUsd:`42.50`,toAddress:e}),Q({id:`mock-activity-deposit-success-yesterday`,status:`completed`,updatedAtMs:t-i-2*r,createdAtMs:t-i-2*r-17e3,amountUsd:`8.20`,toAddress:e}),Q({id:`mock-activity-deposit-success-week`,status:`completed`,updatedAtMs:t-9*i,createdAtMs:t-9*i-14e3,amountUsd:`120.00`,toAddress:e})],o=[$({id:`mock-activity-withdraw-failed`,status:`failed`,updatedAtMs:t-3*i,createdAtMs:t-3*i-9e4,amountUsd:`15.00`,error:`transaction failed on chain`}),$({id:`mock-activity-withdraw-success-recent`,status:`completed`,updatedAtMs:t-18*r,createdAtMs:t-18*r-12e3,amountUsd:`60.00`}),$({id:`mock-activity-withdraw-success-week`,status:`completed`,updatedAtMs:t-11*i,createdAtMs:t-11*i-19e3,amountUsd:`200.00`})];return{owner:e,filter:{},udas:[{uda_id:`mock-uda-deposit`,owner:e,is_terminal:!1,status:`from_detected`,created_at:new Date(t-30*i).toISOString(),updated_at:new Date(t-12*n).toISOString(),destination:{address:e,asset_address:_,asset_symbol:`USDC`,asset_decimals:18,network_id:`9006`,network_name:`BSC`,eip155_id:`56`},settlements:a,metadata:{kit_flow:`deposit`}},{uda_id:`mock-uda-withdraw`,owner:e,is_terminal:!1,status:`completed`,created_at:new Date(t-25*i).toISOString(),updated_at:new Date(t-18*r).toISOString(),destination:{address:X,asset_address:``,asset_decimals:18,asset_symbol:`ETH`,network_id:`60`,network_name:`Ethereum`,eip155_id:`1`},settlements:o,metadata:{kit_flow:`withdraw`}}]}}function Q(e){return{id:e.id,status:e.status,created_at:new Date(e.createdAtMs).toISOString(),updated_at:new Date(e.updatedAtMs).toISOString(),events:[],fees:{},route:{provider:`lifi`},...e.error?{error:e.error}:{},from:{tx_id:`0x${e.id.padEnd(60,`0`)}`,asset_symbol:`USDC`,eip155_id:`1`,network_id:`60`,network_name:`Ethereum`,raw_amount:`0`,amount:e.amountUsd,amount_usd:e.amountUsd,logo:Z},to:{address:e.toAddress,asset_address:_,asset_symbol:`USDC`,eip155_id:`56`,network_id:`9006`,network_name:`BSC`,raw_amount:`0`,amount:e.amountUsd,amount_usd:e.amountUsd,logo:Z,tx_id:`0xto${e.id.padEnd(58,`0`)}`,settled_at:e.status===`completed`?new Date(e.updatedAtMs).toISOString():void 0}}}function $(e){return{id:e.id,status:e.status,created_at:new Date(e.createdAtMs).toISOString(),updated_at:new Date(e.updatedAtMs).toISOString(),events:[],fees:{},route:{provider:`lifi`},...e.error?{error:e.error}:{},from:{tx_id:`0x${e.id.padEnd(60,`0`)}`,asset_symbol:`USDC`,eip155_id:`56`,network_id:`9006`,network_name:`BSC`,raw_amount:`0`,amount:e.amountUsd,amount_usd:e.amountUsd,logo:Z},to:{address:X,asset_address:``,asset_symbol:`ETH`,eip155_id:`1`,network_id:`60`,network_name:`Ethereum`,raw_amount:`0`,amount:e.amountUsd,amount_usd:e.amountUsd,logo:`https://cdn.stridge.com/networks/60.svg`,tx_id:`0xto${e.id.padEnd(58,`0`)}`,settled_at:e.status===`completed`?new Date(e.updatedAtMs).toISOString():void 0}}}function me(e,t,n,r){return t===`pending`?F(e,n&&typeof n!=`string`?n:void 0):t===`succeeded`?I(e,n&&typeof n!=`string`?n:void 0):L(e,typeof n==`string`?n:void 0,r)}export{j as DEFAULT_ADDRESSES_PAYLOAD,T as DEFAULT_BRAND_PAYLOAD,E as DEFAULT_MOCK_ASSET,te as DEFAULT_TARGET_RAW,w as DEFAULT_WALLET_INFO,q as MOCK_ONRAMP_CHECKOUT_URL,K as MOCK_ONRAMP_ORDER_ID,se as STUB_DEPOSIT_ADDRESSES_RAW,fe as STUB_GATEWAY_POLL_RESPONSE,de as STUB_GATEWAY_SETTLEMENT_DTO,oe as STUB_GATEWAY_START_RESPONSE,le as STUB_ONCHAIN_BALANCE_RESPONSE,Y as STUB_ONRAMP_FIATS_RESPONSE,ie as STUB_ONRAMP_QUOTE_RESPONSE,ae as STUB_ONRAMP_SESSION_RESPONSE,ue as STUB_QUOTE_RESPONSE,ce as STUB_SUPPORTED_ASSETS_RESPONSE,A as buildDefaultAddressesPayload,P as buildDefaultBalances,L as buildDefaultFailurePayload,B as buildDefaultOnrampMethodsPayload,F as buildDefaultPendingPayload,ne as buildDefaultQuotePayload,I as buildDefaultSuccessPayload,N as buildDefaultSupportedAssetsResponse,O as buildDefaultTargetPayload,D as buildDefaultTargetRaw,re as buildDefaultWalletPayload,pe as buildMockActivityResponse,U as buildMockOnrampCurrenciesPayload,G as buildMockOnrampProvidersPayload,W as buildMockOnrampQuotePayload,J as buildMockOnrampSessionPayload,me as buildSettlementPayload,ee as resolveMockAsset};
@@ -34,6 +34,18 @@ interface MockTriggers {
34
34
  * gateway failure.
35
35
  */
36
36
  triggerQuoteFailure(error: Error): void;
37
+ /**
38
+ * Settles the active onramp checkout session to `SESSION_COMPLETED` — the imperative twin of
39
+ * the stand-in checkout page's "Payment successful" verdict. Drives `onrampPaymentPending` →
40
+ * `success`. No-ops unless a session has been created.
41
+ */
42
+ triggerOnrampSessionCompleted(): void;
43
+ /**
44
+ * Settles the active onramp checkout session to `SESSION_FAILED` with an optional provider
45
+ * `failureCode` (default `"payment_declined"`), driving `onrampPaymentPending` → `error`. The
46
+ * imperative twin of the stand-in checkout page's "Payment failed" verdict.
47
+ */
48
+ triggerOnrampSessionFailed(failureCode?: string): void;
37
49
  /** Restores every entity to the snapshot the factory was constructed with. */
38
50
  reset(): void;
39
51
  }
@@ -1 +1 @@
1
- "use client";import{StridgeEventsContext as e}from"../context.js";import{useDialogLifecycle as t}from"../../shared/orchestrator/useDialogLifecycle.js";import"../../shared/orchestrator/index.js";import{mapFailureInfoToPayload as n}from"./mapFailure.js";import{closeFlowSession as r,openFlowSession as i,publishEvent as a}from"../publish.js";import{use as o,useRef as s}from"react";function c(n){let r=o(e),i=s(n.metadata);i.current=n.metadata,t({state:n.state,settlement:n.settlement,quote:n.quote,fireFsm:(e,t)=>{r&&d(r,e,t,i.current)},fireSettlement:(e,t)=>{r&&p(r,e,t,n.state)},fireQuote:(e,t)=>{r&&t.status===`ready`&&e!==`ready`&&a(r,{type:`deposit.quote.resolved`,flow:`deposit`,tier:`flow`,payload:{quote:t.payload}})}})}function l(e){if(e.name!==`deposit`){if(e.name===`transferCrypto`)return{method:`transfer`};if(e.name===`assetPicker`)return{method:`wallet`};if(e.name===`amountEntry`)return{method:`wallet`,asset:e.ctx.asset};if(e.name!==`cashAmountEntry`&&e.name!==`cashConfirm`){if(e.name===`confirmDeposit`)return{method:`wallet`,asset:e.ctx.asset};if(e.name===`processing`||e.name===`success`)return e.ctx.method===`transfer`?{method:`transfer`}:{method:`wallet`}}}}function u(e){return e.name===`confirmDeposit`?e.ctx.phase.kind===`submitting`?`submitting`:`confirming`:e.name===`processing`?`processing`:e.name===`deposit`||e.name===`assetPicker`||e.name===`amountEntry`||e.name===`cashAmountEntry`||e.name===`cashConfirm`||e.name===`transferCrypto`?`quoting`:`unknown`}function d(e,t,o,s){if(o.name===`confirmDeposit`&&t.name===`confirmDeposit`){f(e,t.ctx.phase,o.ctx.phase,o);return}if(t.name!==o.name){if(t.name===`closed`&&o.name!==`closed`&&i(e,`deposit`,s,{type:`deposit.opened`,flow:`deposit`,tier:`ui`,payload:{input:l(o)}}),a(e,{type:`deposit.step.changed`,flow:`deposit`,tier:`ui`,payload:{from:t.name,to:o.name}}),t.name===`deposit`&&o.name===`assetPicker`&&a(e,{type:`deposit.method.clicked`,flow:`deposit`,tier:`ui`,payload:{method:`wallet`}}),t.name===`deposit`&&o.name===`transferCrypto`&&a(e,{type:`deposit.method.clicked`,flow:`deposit`,tier:`ui`,payload:{method:`transfer`}}),t.name===`assetPicker`&&o.name===`amountEntry`&&a(e,{type:`deposit.asset.clicked`,flow:`deposit`,tier:`ui`,payload:{asset:o.ctx.asset}}),t.name===`amountEntry`&&o.name===`confirmDeposit`&&a(e,{type:`deposit.amount.submitted`,flow:`deposit`,tier:`ui`,payload:{amount:o.ctx.amount}}),o.name===`confirmDeposit`&&f(e,t.name===`confirmDeposit`?t.ctx.phase:void 0,o.ctx.phase,o),t.name===`confirmDeposit`&&o.name===`processing`&&a(e,{type:`deposit.submission.broadcast`,flow:`deposit`,tier:`flow`,payload:{tx:o.ctx.tx}}),t.name!==`error`&&o.name===`error`&&o.ctx.failure){let r=t.name===`confirmDeposit`?t.ctx.phase:void 0,i=n(o.ctx.failure,o.ctx.failure.cause);r?.kind===`submitting`&&a(e,{type:`deposit.submission.failed`,flow:`deposit`,tier:`flow`,payload:i}),a(e,{type:`deposit.settlement.failed`,flow:`deposit`,tier:`flow`,payload:{...i,kind:`unknown`}})}o.name!==`closed`&&t.name!==`closed`&&`backTarget`in t.ctx&&o.name===t.ctx.backTarget&&a(e,{type:`deposit.back.clicked`,flow:`deposit`,tier:`ui`,payload:{fromStep:t.name}}),t.name!==`closed`&&o.name===`closed`&&(t.name===`success`||t.name===`error`||a(e,{type:`deposit.cancelled`,flow:`deposit`,tier:`flow`,payload:{phase:u(t)}}),r(e,`deposit`,{type:`deposit.closed`,flow:`deposit`,tier:`ui`,payload:{atStep:t.name}}))}}function f(e,t,r,i){t?.kind!==r.kind&&((r.kind===`loading`||r.kind===`regenerating`)&&(a(e,{type:`deposit.quote.requested`,flow:`deposit`,tier:`flow`,payload:{input:{asset:i.ctx.asset,amount:i.ctx.amount}}}),r.kind===`regenerating`&&(t?.kind===`submitting`?a(e,{type:`deposit.submission.declined`,flow:`deposit`,tier:`flow`,payload:{}}):t?.kind===`ready`&&a(e,{type:`deposit.quote.expired`,flow:`deposit`,tier:`flow`,payload:{}}))),r.kind===`failed`&&a(e,{type:`deposit.quote.failed`,flow:`deposit`,tier:`flow`,payload:n(r.failure,r.failure.cause)}),r.kind===`submitting`&&a(e,{type:`deposit.submission.confirmed`,flow:`deposit`,tier:`ui`,payload:{}}))}function p(e,t,r,o){if(r.status!==`ready`&&r.status!==`stale`)return;let s=r.payload;if(s.kind===`pending`){t===null?(o.name===`closed`&&i(e,`deposit`,void 0,{type:`deposit.opened`,flow:`deposit`,tier:`ui`,payload:{input:void 0}}),a(e,{type:`deposit.settlement.resumed`,flow:`deposit`,tier:`flow`,payload:{settlement:s}})):a(e,{type:`deposit.settlement.progressed`,flow:`deposit`,tier:`flow`,payload:{settlement:s}});return}if(s.kind===`succeeded`){a(e,{type:`deposit.settlement.succeeded`,flow:`deposit`,tier:`flow`,payload:{settlement:s}});return}s.kind===`failed`&&a(e,{type:`deposit.settlement.failed`,flow:`deposit`,tier:`flow`,payload:{...n({reason:m(s.failureKind)}),kind:s.failureKind,...s.txHash?.value?{txHash:s.txHash.value}:{}}})}function m(e){return e===`slippage`?`Quote slipped before settlement landed.`:e===`insufficient-gas`?`Bridge gas budget exhausted before settlement.`:e===`execution-reverted`?`Destination transaction reverted on-chain.`:`Settlement failed.`}export{c as useDepositEmissions};
1
+ "use client";import{StridgeEventsContext as e}from"../context.js";import{useDialogLifecycle as t}from"../../shared/orchestrator/useDialogLifecycle.js";import"../../shared/orchestrator/index.js";import{mapFailureInfoToPayload as n}from"./mapFailure.js";import{closeFlowSession as r,openFlowSession as i,publishEvent as a}from"../publish.js";import{use as o,useRef as s}from"react";function c(n){let r=o(e),i=s(n.metadata);i.current=n.metadata,t({state:n.state,settlement:n.settlement,quote:n.quote,fireFsm:(e,t)=>{r&&d(r,e,t,i.current)},fireSettlement:(e,t)=>{r&&p(r,e,t,n.state)},fireQuote:(e,t)=>{r&&t.status===`ready`&&e!==`ready`&&a(r,{type:`deposit.quote.resolved`,flow:`deposit`,tier:`flow`,payload:{quote:t.payload}})}})}function l(e){if(e.name!==`deposit`){if(e.name===`transferCrypto`)return{method:`transfer`};if(e.name===`assetPicker`)return{method:`wallet`};if(e.name===`amountEntry`)return{method:`wallet`,asset:e.ctx.asset};if(e.name!==`onrampAmountEntry`&&e.name!==`onrampConfirm`&&e.name!==`onrampPaymentPending`){if(e.name===`confirmDeposit`)return{method:`wallet`,asset:e.ctx.asset};if(e.name===`processing`||e.name===`success`)return e.ctx.method===`transfer`?{method:`transfer`}:{method:`wallet`}}}}function u(e){return e.name===`confirmDeposit`?e.ctx.phase.kind===`submitting`?`submitting`:`confirming`:e.name===`processing`?`processing`:e.name===`deposit`||e.name===`assetPicker`||e.name===`amountEntry`||e.name===`onrampAmountEntry`||e.name===`onrampConfirm`||e.name===`onrampPaymentPending`||e.name===`transferCrypto`?`quoting`:`unknown`}function d(e,t,o,s){if(o.name===`confirmDeposit`&&t.name===`confirmDeposit`){f(e,t.ctx.phase,o.ctx.phase,o);return}if(t.name!==o.name){if(t.name===`closed`&&o.name!==`closed`&&i(e,`deposit`,s,{type:`deposit.opened`,flow:`deposit`,tier:`ui`,payload:{input:l(o)}}),a(e,{type:`deposit.step.changed`,flow:`deposit`,tier:`ui`,payload:{from:t.name,to:o.name}}),t.name===`deposit`&&o.name===`assetPicker`&&a(e,{type:`deposit.method.clicked`,flow:`deposit`,tier:`ui`,payload:{method:`wallet`}}),t.name===`deposit`&&o.name===`transferCrypto`&&a(e,{type:`deposit.method.clicked`,flow:`deposit`,tier:`ui`,payload:{method:`transfer`}}),t.name===`assetPicker`&&o.name===`amountEntry`&&a(e,{type:`deposit.asset.clicked`,flow:`deposit`,tier:`ui`,payload:{asset:o.ctx.asset}}),t.name===`amountEntry`&&o.name===`confirmDeposit`&&a(e,{type:`deposit.amount.submitted`,flow:`deposit`,tier:`ui`,payload:{amount:o.ctx.amount}}),o.name===`confirmDeposit`&&f(e,t.name===`confirmDeposit`?t.ctx.phase:void 0,o.ctx.phase,o),t.name===`confirmDeposit`&&o.name===`processing`&&a(e,{type:`deposit.submission.broadcast`,flow:`deposit`,tier:`flow`,payload:{tx:o.ctx.tx}}),t.name!==`error`&&o.name===`error`&&o.ctx.failure){let r=t.name===`confirmDeposit`?t.ctx.phase:void 0,i=n(o.ctx.failure,o.ctx.failure.cause);r?.kind===`submitting`&&a(e,{type:`deposit.submission.failed`,flow:`deposit`,tier:`flow`,payload:i}),a(e,{type:`deposit.settlement.failed`,flow:`deposit`,tier:`flow`,payload:{...i,kind:`unknown`}})}o.name!==`closed`&&t.name!==`closed`&&`backTarget`in t.ctx&&o.name===t.ctx.backTarget&&a(e,{type:`deposit.back.clicked`,flow:`deposit`,tier:`ui`,payload:{fromStep:t.name}}),t.name!==`closed`&&o.name===`closed`&&(t.name===`success`||t.name===`error`||a(e,{type:`deposit.cancelled`,flow:`deposit`,tier:`flow`,payload:{phase:u(t)}}),r(e,`deposit`,{type:`deposit.closed`,flow:`deposit`,tier:`ui`,payload:{atStep:t.name}}))}}function f(e,t,r,i){t?.kind!==r.kind&&((r.kind===`loading`||r.kind===`regenerating`)&&(a(e,{type:`deposit.quote.requested`,flow:`deposit`,tier:`flow`,payload:{input:{asset:i.ctx.asset,amount:i.ctx.amount}}}),r.kind===`regenerating`&&(t?.kind===`submitting`?a(e,{type:`deposit.submission.declined`,flow:`deposit`,tier:`flow`,payload:{}}):t?.kind===`ready`&&a(e,{type:`deposit.quote.expired`,flow:`deposit`,tier:`flow`,payload:{}}))),r.kind===`failed`&&a(e,{type:`deposit.quote.failed`,flow:`deposit`,tier:`flow`,payload:n(r.failure,r.failure.cause)}),r.kind===`submitting`&&a(e,{type:`deposit.submission.confirmed`,flow:`deposit`,tier:`ui`,payload:{}}))}function p(e,t,r,o){if(r.status!==`ready`&&r.status!==`stale`)return;let s=r.payload;if(s.kind===`pending`){t===null?(o.name===`closed`&&i(e,`deposit`,void 0,{type:`deposit.opened`,flow:`deposit`,tier:`ui`,payload:{input:void 0}}),a(e,{type:`deposit.settlement.resumed`,flow:`deposit`,tier:`flow`,payload:{settlement:s}})):a(e,{type:`deposit.settlement.progressed`,flow:`deposit`,tier:`flow`,payload:{settlement:s}});return}if(s.kind===`succeeded`){a(e,{type:`deposit.settlement.succeeded`,flow:`deposit`,tier:`flow`,payload:{settlement:s}});return}s.kind===`failed`&&a(e,{type:`deposit.settlement.failed`,flow:`deposit`,tier:`flow`,payload:{...n({reason:m(s.failureKind)}),kind:s.failureKind,...s.txHash?.value?{txHash:s.txHash.value}:{}}})}function m(e){return e===`slippage`?`Quote slipped before settlement landed.`:e===`insufficient-gas`?`Bridge gas budget exhausted before settlement.`:e===`execution-reverted`?`Destination transaction reverted on-chain.`:`Settlement failed.`}export{c as useDepositEmissions};
@@ -1 +1 @@
1
- "use client";import{useDepositSnapshot as e}from"../driver/context.js";import{useControllerContext as t}from"../orchestrator/controller.js";import{useDepositEmissions as n}from"../../../events/emit/useDepositEmissions.js";import"../../../events/emit/index.js";import{useIntercomShutdownOnUnmount as r}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{AdaptiveSurface as i}from"../../../shared/ui/AdaptiveSurface/AdaptiveSurface.js";import"../../../shared/ui/AdaptiveSurface/index.js";import{Deposit as a}from"../widgets/deposit/compound/Deposit.js";import"../widgets/deposit/compound/index.js";import{DepositActivityDetail as o}from"../widgets/activity/DepositActivityDetail.js";import{DepositActivityList as s}from"../widgets/activity/DepositActivityList.js";import"../widgets/activity/index.js";import{AmountEntry as c}from"../widgets/amount-entry/AmountEntry.js";import"../widgets/amount-entry/index.js";import{AssetPicker as l}from"../widgets/asset-picker/AssetPicker.js";import"../widgets/asset-picker/index.js";import{CashAmountEntry as u}from"../widgets/cash-amount-entry/CashAmountEntry.js";import"../widgets/cash-amount-entry/index.js";import{CashConfirm as d}from"../widgets/cash-confirm/CashConfirm.js";import"../widgets/cash-confirm/index.js";import{ConfirmDeposit as f}from"../widgets/confirm-deposit/ConfirmDeposit.js";import"../widgets/confirm-deposit/index.js";import{Deposit as p}from"../widgets/deposit/Deposit.js";import"../widgets/deposit/index.js";import{DepositStatusBanner as m}from"../widgets/deposit-status-banner/DepositStatusBanner.js";import"../widgets/deposit-status-banner/index.js";import{ErrorState as h}from"../widgets/error-state/ErrorState.js";import"../widgets/error-state/index.js";import{ProcessingState as g}from"../widgets/processing-state/ProcessingState.js";import"../widgets/processing-state/index.js";import{SuccessState as _}from"../widgets/success-state/SuccessState.js";import"../widgets/success-state/index.js";import{TransferCrypto as v}from"../widgets/transfer-crypto/TransferCrypto.js";import"../widgets/transfer-crypto/index.js";import{jsx as y,jsxs as b}from"react/jsx-runtime";function x({container:x,metadata:S,onError:C,presentation:w}={}){let{state:T,controller:E}=t(),D=e(),O=T.name!==`closed`;return n({state:T,settlement:D.settlement,quote:D.quote,metadata:S}),r(),y(i,{open:O,onOpenChange:e=>{e||E.close()},container:x,...w?{presentation:w}:{},children:b(a.Boundary,{...C?{onError:C}:{},children:[y(a.Guards,{children:b(a.Steps,{children:[y(a.Step,{name:`deposit`,children:y(p,{})}),y(a.Step,{name:`assetPicker`,children:y(l,{})}),y(a.Step,{name:`amountEntry`,children:y(c,{})}),y(a.Step,{name:`cashAmountEntry`,children:y(u,{})}),y(a.Step,{name:`cashConfirm`,children:y(d,{})}),y(a.Step,{name:`confirmDeposit`,children:y(f,{})}),y(a.Step,{name:`transferCrypto`,children:y(v,{})}),y(a.Step,{name:`processing`,children:y(g,{})}),y(a.Step,{name:`success`,children:y(_,{})}),y(a.Step,{name:`error`,children:y(h,{})}),y(a.Step,{name:`activityList`,children:y(s,{})}),y(a.Step,{name:`activityDetail`,children:y(o,{})})]})}),y(m,{})]})})}export{x as DepositDialog};
1
+ "use client";import{useDepositSnapshot as e}from"../driver/context.js";import{useControllerContext as t}from"../orchestrator/controller.js";import{useDepositEmissions as n}from"../../../events/emit/useDepositEmissions.js";import"../../../events/emit/index.js";import{useIntercomShutdownOnUnmount as r}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{AdaptiveSurface as i}from"../../../shared/ui/AdaptiveSurface/AdaptiveSurface.js";import"../../../shared/ui/AdaptiveSurface/index.js";import{Deposit as a}from"../widgets/deposit/compound/Deposit.js";import"../widgets/deposit/compound/index.js";import{DepositActivityDetail as o}from"../widgets/activity/DepositActivityDetail.js";import{DepositActivityList as s}from"../widgets/activity/DepositActivityList.js";import"../widgets/activity/index.js";import{AmountEntry as c}from"../widgets/amount-entry/AmountEntry.js";import"../widgets/amount-entry/index.js";import{AssetPicker as l}from"../widgets/asset-picker/AssetPicker.js";import"../widgets/asset-picker/index.js";import{ConfirmDeposit as u}from"../widgets/confirm-deposit/ConfirmDeposit.js";import"../widgets/confirm-deposit/index.js";import{Deposit as d}from"../widgets/deposit/Deposit.js";import"../widgets/deposit/index.js";import{DepositStatusBanner as f}from"../widgets/deposit-status-banner/DepositStatusBanner.js";import"../widgets/deposit-status-banner/index.js";import{ErrorState as p}from"../widgets/error-state/ErrorState.js";import"../widgets/error-state/index.js";import{OnrampAmountEntry as m}from"../widgets/onramp-amount-entry/OnrampAmountEntry.js";import"../widgets/onramp-amount-entry/index.js";import{OnrampConfirm as h}from"../widgets/onramp-confirm/OnrampConfirm.js";import"../widgets/onramp-confirm/index.js";import{OnrampCurrencyPicker as g}from"../widgets/onramp-currency-picker/OnrampCurrencyPicker.js";import"../widgets/onramp-currency-picker/index.js";import{OnrampPaymentPending as _}from"../widgets/onramp-payment-pending/OnrampPaymentPending.js";import"../widgets/onramp-payment-pending/index.js";import{OnrampProviderPicker as v}from"../widgets/onramp-provider-picker/OnrampProviderPicker.js";import"../widgets/onramp-provider-picker/index.js";import{ProcessingState as y}from"../widgets/processing-state/ProcessingState.js";import"../widgets/processing-state/index.js";import{SuccessState as b}from"../widgets/success-state/SuccessState.js";import"../widgets/success-state/index.js";import{TransferCrypto as x}from"../widgets/transfer-crypto/TransferCrypto.js";import"../widgets/transfer-crypto/index.js";import{jsx as S,jsxs as C}from"react/jsx-runtime";function w({container:w,metadata:T,onError:E,presentation:D}={}){let{state:O,controller:k}=t(),A=e(),j=O.name!==`closed`;return n({state:O,settlement:A.settlement,quote:A.quote,metadata:T}),r(),S(i,{open:j,onOpenChange:e=>{e||k.close()},container:w,...D?{presentation:D}:{},children:C(a.Boundary,{...E?{onError:E}:{},children:[S(a.Guards,{children:C(a.Steps,{children:[S(a.Step,{name:`deposit`,children:S(d,{})}),S(a.Step,{name:`assetPicker`,children:S(l,{})}),S(a.Step,{name:`amountEntry`,children:S(c,{})}),S(a.Step,{name:`onrampAmountEntry`,children:S(m,{})}),S(a.Step,{name:`onrampCurrencyPicker`,children:S(g,{})}),S(a.Step,{name:`onrampProviderPicker`,children:S(v,{})}),S(a.Step,{name:`onrampConfirm`,children:S(h,{})}),S(a.Step,{name:`onrampPaymentPending`,children:S(_,{})}),S(a.Step,{name:`confirmDeposit`,children:S(u,{})}),S(a.Step,{name:`transferCrypto`,children:S(x,{})}),S(a.Step,{name:`processing`,children:S(y,{})}),S(a.Step,{name:`success`,children:S(b,{})}),S(a.Step,{name:`error`,children:S(p,{})}),S(a.Step,{name:`activityList`,children:S(s,{})}),S(a.Step,{name:`activityDetail`,children:S(o,{})})]})}),S(f,{})]})})}export{w as DepositDialog};
@@ -41,16 +41,17 @@ interface WalletPayload {
41
41
  balanceTotalUsd?: FormattedField<number>;
42
42
  }
43
43
  /**
44
- * Capability descriptor for a single cash-rail payment method (Card / Apple Pay / Google Pay).
45
- * Drivers populate the per-method limit + processing-time the deposit-method picker surfaces on
46
- * the cash rows' meta line (`"$116,000.00 limit · Instant"`). Both fields are optional so the
47
- * meta line drops segments gracefully when the driver doesn't surface them yet.
44
+ * Capability descriptor for the onramp ("Cash") rail. The rail is single-method the
45
+ * provider's hosted checkout collects the payment instrument so drivers populate one capability
46
+ * bag with the limit + processing-time the deposit-method picker surfaces on the row's meta line
47
+ * (`"$116,000.00 limit · Instant"`). Both fields are optional so the meta line drops segments
48
+ * gracefully when the driver doesn't surface them yet.
48
49
  */
49
- interface CashMethodCapability {
50
+ interface OnrampMethodCapability {
50
51
  /**
51
- * Per-method maximum deposit, in USD. `value` is the raw ceiling for sorting / range checks;
52
- * `formatted` is the localized currency string (`"$116,000.00"`). The widget composes the
53
- * meta segment from the formatted string plus a localized `" limit"` suffix.
52
+ * Maximum deposit, in USD. `value` is the raw ceiling for sorting / range checks; `formatted`
53
+ * is the localized currency string (`"$116,000.00"`). The widget composes the meta segment
54
+ * from the formatted string plus a localized `" limit"` suffix.
54
55
  */
55
56
  limit?: FormattedField<number>;
56
57
  /**
@@ -61,18 +62,203 @@ interface CashMethodCapability {
61
62
  processingTime?: FormattedField<number>;
62
63
  }
63
64
  /**
64
- * Per-cash-method capability bag surfaced on `DepositSnapshot.cashMethods`. Each key matches a
65
- * method id rendered inside `Deposit.MethodSection`; the orchestrated `Deposit` widget reads each
66
- * row's `limit` + `processingTime` and maps them into the row's meta line. Future cash methods
67
- * (`bankTransfer`, `cashPickup`, …) extend this shape additively.
65
+ * Onramp-rail capability bag surfaced on `DepositSnapshot.onrampMethods`. The rail is single-method
66
+ * (the hosted-checkout provider collects the payment instrument), so this carries one capability
67
+ * directly rather than a per-method map. The orchestrated `Deposit` widget reads the `limit` +
68
+ * `processingTime` and maps them into the "Cash" row's meta line; the onramp amount-entry
69
+ * reads `limit` for its over-limit / unavailable notices.
68
70
  */
69
- interface CashMethodsPayload {
70
- /** Capabilities for the Card method (`Deposit.Method` row in the cash rail). */
71
- card?: CashMethodCapability;
72
- /** Capabilities for the Apple Pay method. */
73
- applePay?: CashMethodCapability;
74
- /** Capabilities for the Google Pay method. */
75
- googlePay?: CashMethodCapability;
71
+ type OnrampMethodsPayload = OnrampMethodCapability;
72
+ /**
73
+ * Receive-asset descriptor for the onramp rail — the crypto the user ends up with after the fiat
74
+ * purchase settles. Mirrors {@link AssetPayload} plus the `chainId` the kit's `TokenLogo` resolver
75
+ * needs, so the onramp amount-entry / confirm screens render the destination token without reaching
76
+ * into another entity.
77
+ */
78
+ interface OnrampReceiveAssetPayload extends AssetPayload {
79
+ /** EIP-155 chain id of the receive asset (drives the token-logo resolver). */
80
+ chainId: number;
81
+ }
82
+ /**
83
+ * Formatted onramp-quote result surfaced on `DepositSnapshot.onrampQuote` — the fiat→crypto pricing
84
+ * the onramp amount-entry hero, receive chip, and fee-breakdown rows read. Backed by the SDK's
85
+ * `OnrampQuoteResponse`. Raw numeric `value`s are kept on the {@link FormattedField}s so widgets can
86
+ * re-derive (e.g. net-of-fees) locally.
87
+ */
88
+ interface OnrampQuotePayload {
89
+ /**
90
+ * Fiat amount the user pays, in the selected currency (not necessarily USD). Retained for
91
+ * back-compat with readers that predate multi-currency; new readers prefer {@link amountFiat},
92
+ * which is the same value carrying explicit currency metadata via {@link fiatCurrency} /
93
+ * {@link fiatSymbol}.
94
+ */
95
+ amountUsd: FormattedField<number>;
96
+ /**
97
+ * Fiat amount the user pays, formatted in the selected currency via the currency-aware
98
+ * `formatFiat` helper (correct symbol placement + fraction digits per currency). Drives the
99
+ * hero / breakdown "Amount" row.
100
+ */
101
+ amountFiat: FormattedField<number>;
102
+ /** ISO-4217 code of the fiat currency this quote is priced in (e.g. `"USD"`, `"EUR"`, `"JPY"`). */
103
+ fiatCurrency: string;
104
+ /** Narrow currency symbol for `fiatCurrency` (e.g. `"$"`, `"€"`, `"¥"`). Drives the hero prefix. */
105
+ fiatSymbol: string;
106
+ /** Crypto amount the user receives after fees. Drives the Receive chip + hero sub-line. */
107
+ receiveAmount: FormattedField<number>;
108
+ /** The crypto asset the user receives. */
109
+ receiveAsset: OnrampReceiveAssetPayload;
110
+ /** Crypto-per-fiat rate (e.g. USDC per fiat unit). Drives the price row. */
111
+ rate: FormattedField<number>;
112
+ /** Provider processing fee, in the selected currency. Omitted when the provider doesn't surface it. */
113
+ processingFeeUsd?: FormattedField<number>;
114
+ /** Network/settlement fee, in the selected currency. Omitted when zero / unknown. */
115
+ networkFeeUsd?: FormattedField<number>;
116
+ /** Total fee charged on top of the received crypto, in the selected currency. */
117
+ totalFeeUsd: FormattedField<number>;
118
+ /**
119
+ * Resolved hosted-checkout provider — the raw BSP id the backend returns. NEVER rendered in the
120
+ * UI (Architectural Rule 2); provider display identity comes from the driver-shaped
121
+ * {@link OnrampProviderPayload} instead.
122
+ */
123
+ provider?: string;
124
+ }
125
+ /**
126
+ * One selectable fiat currency surfaced in the onramp currency picker. The backend supports any
127
+ * fiat the resolved BSP offers (`GET /gateway/onramp/fiats`); drivers map each `OnrampFiatDto` into
128
+ * this shape. `popular` is a UI-ordering hint (popular currencies sort to the top of the list); `iconUrl`
129
+ * is an OPTIONAL driver-supplied flag/emblem — the kit's default is the symbol/code
130
+ * {@link import("#/shared/ui").CurrencyGlyph}, never a bundled flag set.
131
+ */
132
+ interface OnrampCurrencyPayload {
133
+ /** ISO-4217 currency code (e.g. `"USD"`, `"EUR"`). Used as the row's stable id + hero symbol lookup. */
134
+ code: string;
135
+ /** Display name (e.g. `"US Dollar"`). Primary row label + search target. */
136
+ name: string;
137
+ /** Narrow currency symbol (e.g. `"$"`, `"€"`). Drives the {@link CurrencyGlyph} + hero prefix. */
138
+ symbol: string;
139
+ /** When true, the currency sorts to the top of the picker list ahead of the alphabetical rest. */
140
+ popular?: boolean;
141
+ /** Optional driver-supplied flag/emblem URL — rendered through the `Image` fallback when present. */
142
+ iconUrl?: string;
143
+ }
144
+ /**
145
+ * Currency catalog surfaced on `DepositSnapshot.onrampCurrencies` — the country-resolved default
146
+ * plus the full selectable list. The currency picker derives its Popular / All sections from each
147
+ * entry's `popular` flag; the amount-entry chip preselects {@link suggested} when the FSM has no
148
+ * persisted choice yet.
149
+ */
150
+ interface OnrampCurrenciesPayload {
151
+ /** Country-resolved default currency code to preselect (e.g. `"USD"`). Empty when unresolved. */
152
+ suggested: string;
153
+ /** Full list of selectable currencies (popular-first ordering handled in the UI via `popular`). */
154
+ currencies: OnrampCurrencyPayload[];
155
+ }
156
+ /**
157
+ * Lifecycle status of an onramp provider row.
158
+ *
159
+ * - `active` — the integrated provider that carries the one real quote; selectable + preselected.
160
+ * - `available` — a future selectable provider (reserved; not used while the backend resolves a
161
+ * single provider server-side).
162
+ * - `coming-soon` — a driver-curated teaser row; dimmed, badged, non-selectable, carries no amounts.
163
+ */
164
+ type OnrampProviderStatus = "active" | "available" | "coming-soon";
165
+ /**
166
+ * Legally-required third-party-consent content for the pre-redirect disclaimer gate. `providerName`
167
+ * + `links` are DRIVER-supplied — this is the single sanctioned surface where the integrated
168
+ * provider is named (Architectural Rule 2). The kit renders its own translated acknowledgement copy
169
+ * interpolating `providerName` and the `links`; `bodyOverride` lets the driver substitute exact
170
+ * legal wording when mandated.
171
+ */
172
+ interface OnrampProviderDisclaimer {
173
+ /** Neutral, driver-supplied provider name interpolated into the kit's acknowledgement copy. */
174
+ providerName: string;
175
+ /** Legal links rendered as inline anchors (open in a new tab with `rel="noopener noreferrer"`). */
176
+ links: ReadonlyArray<{
177
+ kind: "terms" | "privacy" | "support";
178
+ url: string;
179
+ }>;
180
+ /** When set, the kit renders this verbatim instead of its translated template (still with checkbox + links). */
181
+ bodyOverride?: string;
182
+ }
183
+ /**
184
+ * One onramp provider row. `name` / `logoUrl` are NEUTRAL, driver-supplied display identity — the
185
+ * kit NEVER hardcodes a BSP brand (Architectural Rule 2). `receive` is populated only for the
186
+ * `active` provider (we have one real quote); `coming-soon` rows carry no amounts. `disclaimer`,
187
+ * when present on the active provider, gates the pre-redirect consent panel on the confirm screen.
188
+ */
189
+ interface OnrampProviderPayload {
190
+ /** Stable internal id (e.g. `"primary"`) — NOT the raw BSP brand id. Drives selection + `activeId`. */
191
+ id: string;
192
+ /** Neutral, driver-supplied display name (e.g. `"Card & bank checkout"`). */
193
+ name: string;
194
+ /** Lifecycle status — see {@link OnrampProviderStatus}. */
195
+ status: OnrampProviderStatus;
196
+ /** Optional driver-supplied logo URL — rendered through the `Image` fallback; else a neutral monogram. */
197
+ logoUrl?: string;
198
+ /** Optional sub-line (e.g. a short capability note). Falls back to "Auto-picked for you" for the active row. */
199
+ note?: string;
200
+ /** Live receive amount — populated ONLY for the active provider (the one real quote). */
201
+ receive?: FormattedField<number>;
202
+ /** Symbol of the crypto the user receives (pairs with {@link receive}). */
203
+ receiveAsset?: {
204
+ symbol: string;
205
+ };
206
+ /** Pre-redirect third-party consent content. Present → the confirm screen gates the CTA on acknowledgement. */
207
+ disclaimer?: OnrampProviderDisclaimer;
208
+ }
209
+ /**
210
+ * Provider catalog surfaced on `DepositSnapshot.onrampProviders` — the active/default provider plus
211
+ * any driver-curated coming-soon rows. `activeId` preselects the amount-entry provider card and the
212
+ * provider picker's selected row. Driver-shaped (no single SDK response backs it); the backend
213
+ * resolves one provider server-side, so additional rows are pure driver data.
214
+ */
215
+ interface OnrampProvidersPayload {
216
+ /** Id of the active/default provider (matches one `providers[].id` with `status: "active"`). */
217
+ activeId: string;
218
+ /** All provider rows — the active one first, then any coming-soon teasers. */
219
+ providers: OnrampProviderPayload[];
220
+ }
221
+ /**
222
+ * Lifecycle state of an onramp checkout session, mirrored 1:1 from the SDK's
223
+ * `OnrampSessionState`. The kit's reducer maps the three terminal values onto its shared
224
+ * `processing` / `success` / `error` screens.
225
+ */
226
+ type OnrampSessionStateName = "SESSION_PENDING" | "SESSION_COMPLETED" | "SESSION_EXPIRED" | "SESSION_FAILED";
227
+ /**
228
+ * Onramp checkout-session payload surfaced on `DepositSnapshot.onrampSession`. Created by
229
+ * {@link import("./types").DepositDriver.createOnrampSession} and advanced by
230
+ * {@link import("./types").DepositDriver.watchOnrampSession}. The `checkoutUrl` is the provider-hosted
231
+ * page the kit redirects (or pops out) to; `state` drives the redirect → poll → terminal UI.
232
+ */
233
+ interface OnrampSessionPayload {
234
+ /** Provider session id (UUID). */
235
+ sessionId: string;
236
+ /** Current session state. */
237
+ state: OnrampSessionStateName;
238
+ /** Provider-hosted checkout URL the user completes payment on. Present once the session is created. */
239
+ checkoutUrl?: string;
240
+ /** Provider order id, once allocated. */
241
+ providerOrderId?: string;
242
+ /** Crypto amount the user receives, captured at create time (display units). */
243
+ receiveAmount?: FormattedField<number>;
244
+ /** Fiat the user paid — currency-formatted (`"€100.00"`), from the session's fiat leg. */
245
+ fiatAmount?: FormattedField<number>;
246
+ /** Fiat currency code the user paid in (`"EUR"`), from the session's fiat leg. Drives the flow-strip glyph. */
247
+ fiatCurrency?: string;
248
+ /** Asset the provider buys + deposits at the UDA (`"ETH"`) — the bridged "buy" leg shown on the flow strip. */
249
+ depositAsset?: string;
250
+ /**
251
+ * Asset the user ultimately receives (`"USDC"`), from the session's destination leg. Authoritative
252
+ * over the quote's `receiveAsset` for the flow strip's "receive" node — the quote can drift from
253
+ * the created session, so the strip prefers this symbol for both the label and the token logo.
254
+ */
255
+ destinationAsset?: string;
256
+ /** The user's destination wallet address — `value` raw, `formatted` shortened — from the destination leg. */
257
+ destinationAddress?: FormattedField<string>;
258
+ /** Failure code when `state === "SESSION_FAILED"` (e.g. `"payment_declined"`). */
259
+ failureCode?: string;
260
+ /** Session/checkout expiry timestamp (Unix-ms). */
261
+ expiresAt?: number;
76
262
  }
77
263
  /**
78
264
  * Brand context surfaced across the kit's chrome — `<DialogShell>` title, `<ConfirmDeposit>`
@@ -386,4 +572,4 @@ interface SettlementFailurePayload {
386
572
  */
387
573
  type SettlementPayload = SettlementPendingPayload | SettlementSuccessPayload | SettlementFailurePayload;
388
574
  //#endregion
389
- export { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, CashMethodCapability, CashMethodsPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload };
575
+ export { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, OnrampCurrenciesPayload, OnrampCurrencyPayload, OnrampMethodCapability, OnrampMethodsPayload, OnrampProviderDisclaimer, OnrampProviderPayload, OnrampProviderStatus, OnrampProvidersPayload, OnrampQuotePayload, OnrampReceiveAssetPayload, OnrampSessionPayload, OnrampSessionStateName, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload };
@@ -1,6 +1,6 @@
1
1
  import { Entity, SettlementFailureKind, TxRef } from "../../../shared/driver/types.js";
2
- import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, CashMethodCapability, CashMethodsPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload } from "./payloads.js";
3
- import { DepositAddressDto, GatewaySettlementDto, GatewayStartResponse, GatewayUdaDto, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
2
+ import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, OnrampCurrenciesPayload, OnrampCurrencyPayload, OnrampMethodCapability, OnrampMethodsPayload, OnrampProviderDisclaimer, OnrampProviderPayload, OnrampProviderStatus, OnrampProvidersPayload, OnrampQuotePayload, OnrampReceiveAssetPayload, OnrampSessionPayload, OnrampSessionStateName, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload } from "./payloads.js";
3
+ import { DepositAddressDto, GatewaySettlementDto, GatewayStartResponse, GatewayUdaDto, OnchainBalanceResponse, OnrampFiatsResponse, OnrampQuoteResponse, OnrampSessionResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
4
4
 
5
5
  //#region src/flows/deposit/driver/types.d.ts
6
6
  /**
@@ -48,14 +48,41 @@ interface DepositSnapshot {
48
48
  */
49
49
  wallet: Entity<WalletPayload, WalletInfo, WalletInfo>;
50
50
  /**
51
- * Per-cash-method capability bag — limits + processing times surfaced on the cash-rail
52
- * method rows' meta line. Optional so BYO drivers shipped before the cash rail existed
53
- * keep type-checking against the contract; readers null-coalesce a missing entity to
54
- * `idle`, which already means "no cash backend wired up yet" in the kit's reducer. The
55
- * live stridge driver wires this through `getCashMethods()` once the cash API ships; the
56
- * mock driver seeds fixtures today.
51
+ * Onramp-rail capability bag — the limit + processing time surfaced on the "Cash"
52
+ * method row's meta line and read by the onramp amount-entry for its over-limit / unavailable
53
+ * notices. Optional so BYO drivers shipped before the onramp rail existed keep type-checking
54
+ * against the contract; readers null-coalesce a missing entity to `idle`, which means "no
55
+ * onramp backend wired up yet". The live stridge driver leaves this `idle` until the rail is
56
+ * exercised; the mock driver seeds a fixture today.
57
57
  */
58
- cashMethods?: Entity<CashMethodsPayload, CashMethodsPayload, CashMethodsPayload>;
58
+ onrampMethods?: Entity<OnrampMethodsPayload, OnrampMethodsPayload, OnrampMethodsPayload>;
59
+ /**
60
+ * Formatted fiat→crypto onramp quote backing the onramp amount-entry hero / receive chip / fee
61
+ * rows. Optional (same back-compat rationale as {@link onrampMethods}); `idle` until
62
+ * {@link DepositDriver.requestOnrampQuote} runs. Backed by the SDK's `OnrampQuoteResponse`.
63
+ */
64
+ onrampQuote?: Entity<OnrampQuotePayload, OnrampQuoteResponse, OnrampQuoteResponse>;
65
+ /**
66
+ * The active onramp checkout session — carries the provider-hosted `checkoutUrl` and the
67
+ * session state the kit polls to a terminal verdict. Optional; `idle` until
68
+ * {@link DepositDriver.createOnrampSession} runs. Backed by the SDK's `OnrampSessionResponse`.
69
+ */
70
+ onrampSession?: Entity<OnrampSessionPayload, OnrampSessionResponse, OnrampSessionResponse>;
71
+ /**
72
+ * Selectable fiat currencies for the onramp rail — the country-resolved default + the full
73
+ * list the currency picker renders. Optional (same back-compat rationale as
74
+ * {@link onrampMethods}); `idle` until {@link DepositDriver.requestOnrampCurrencies} runs, in
75
+ * which case the currency chip falls back to USD. Backed by the SDK's `OnrampFiatsResponse`.
76
+ */
77
+ onrampCurrencies?: Entity<OnrampCurrenciesPayload, OnrampFiatsResponse, OnrampFiatsResponse>;
78
+ /**
79
+ * Onramp provider catalog — the active/default provider (carrying the one real quote) plus any
80
+ * driver-curated coming-soon rows. Optional; `idle` until
81
+ * {@link DepositDriver.requestOnrampProviders} runs, in which case the provider card hides. No
82
+ * single SDK response backs it — the backend resolves one provider server-side, so the shape is
83
+ * driver-defined.
84
+ */
85
+ onrampProviders?: Entity<OnrampProvidersPayload, unknown, unknown>;
59
86
  }
60
87
  /**
61
88
  * Input to {@link DepositDriver.requestQuote}.
@@ -89,6 +116,33 @@ interface SubmitDepositInput {
89
116
  /** Send amount in display units. */
90
117
  amount: number;
91
118
  }
119
+ /**
120
+ * Input to {@link DepositDriver.requestOnrampQuote}. The fiat side is all the backend needs — the
121
+ * receive crypto is derived from the tenant's deposit preferences. The onramp rail is single-method
122
+ * (the provider's hosted checkout collects the payment instrument), so there is no method selector.
123
+ */
124
+ interface RequestOnrampQuoteInput {
125
+ /** Fiat amount the user wants to spend (display units, e.g. dollars). */
126
+ amount: number;
127
+ /** ISO-4217 code of the fiat currency to price in (e.g. `"USD"`, `"EUR"`). Threaded into `quote.fiatCurrency`. */
128
+ currency: string;
129
+ }
130
+ /**
131
+ * Input to {@link DepositDriver.createOnrampSession}. Binds the priced amount to a provider checkout.
132
+ */
133
+ interface CreateOnrampSessionInput {
134
+ /** Fiat amount to charge (display units). */
135
+ amount: number;
136
+ /** ISO-4217 code of the fiat currency to charge in. Threaded into `createSession.fiatCurrency`. */
137
+ currency: string;
138
+ }
139
+ /**
140
+ * Input to {@link DepositDriver.watchOnrampSession}. Scopes the poll to a single created session.
141
+ */
142
+ interface WatchOnrampSessionInput {
143
+ /** The session id returned by {@link DepositDriver.createOnrampSession}. */
144
+ sessionId: string;
145
+ }
92
146
  /**
93
147
  * Input to {@link DepositDriver.watchSourceTx}. Path B — kit waits for an inbound transfer to the
94
148
  * deposit address.
@@ -205,6 +259,48 @@ interface DepositDriver {
205
259
  * method picker.
206
260
  */
207
261
  fetchActiveSettlement?(input: FetchActiveSettlementInput, signal: AbortSignal): Promise<SettlementSnapshot | null>;
262
+ /**
263
+ * Onramp rail — fetches a fiat→crypto quote and updates the `onrampQuote` entity through its
264
+ * lifecycle (`idle | loading → ready | error`). Optional: drivers without an onramp backend
265
+ * omit it, and the onramp amount-entry falls back to its empty-quote surface. Mirrors
266
+ * {@link requestQuote} for the fiat side.
267
+ */
268
+ requestOnrampQuote?(input: RequestOnrampQuoteInput, signal: AbortSignal): Promise<void>;
269
+ /**
270
+ * Onramp rail — populates the `onrampMethods` capability entity (rail limit + processing time)
271
+ * from the country-scoped catalog. The kit fires this on onramp entry (when the user picks
272
+ * "Cash"), NOT on mount, so a deposit that never opens the Cash rail makes no catalog request.
273
+ * The rail's visibility is independent of this entity (host opt-in only); it supplies the meta
274
+ * line once Cash is chosen. Optional — drivers without an onramp backend omit it; a failure
275
+ * leaves the entity `idle`.
276
+ */
277
+ requestOnrampMethods?(signal: AbortSignal): Promise<void>;
278
+ /**
279
+ * Onramp rail — populates the `onrampCurrencies` entity with the selectable fiat list (the
280
+ * country-resolved default + the full catalog). The kit fires this once on onramp entry; a
281
+ * failure leaves the entity `idle` and the currency chip falls back to USD. Optional — drivers
282
+ * without an onramp backend omit it. Mirrors the fire-and-forget posture of {@link requestOnrampQuote}.
283
+ */
284
+ requestOnrampCurrencies?(signal: AbortSignal): Promise<void>;
285
+ /**
286
+ * Onramp rail — populates the `onrampProviders` entity with the active/default provider (carrying
287
+ * the live receive amount) plus any driver-curated coming-soon rows. The kit fires this once on
288
+ * onramp entry; a failure leaves the entity `idle` and the provider card hides. Optional. The
289
+ * backend resolves one provider server-side, so this is driver-shaped data, not a network list.
290
+ */
291
+ requestOnrampProviders?(signal: AbortSignal): Promise<void>;
292
+ /**
293
+ * Onramp rail — binds the priced amount to a provider checkout session, populates the
294
+ * `onrampSession` entity, and resolves with the created session (carrying `checkoutUrl`). The kit
295
+ * opens `checkoutUrl` in a new tab, then calls {@link watchOnrampSession} to poll. Optional.
296
+ */
297
+ createOnrampSession?(input: CreateOnrampSessionInput, signal: AbortSignal): Promise<OnrampSessionPayload>;
298
+ /**
299
+ * Onramp rail — polls a created session until it reaches a terminal state, firing the listener on
300
+ * every transition (the kit maps `SESSION_COMPLETED` / `SESSION_EXPIRED` / `SESSION_FAILED` onto
301
+ * its shared success / error screens). Mirrors {@link watchSettlement}. Optional.
302
+ */
303
+ watchOnrampSession?(input: WatchOnrampSessionInput, listener: (entity: DepositSnapshot["onrampSession"]) => void, signal: AbortSignal): void;
208
304
  }
209
305
  //#endregion
210
- export { DepositDriver, DepositSnapshot, FetchActiveSettlementInput, RequestQuoteInput, SettlementSnapshot, SubmitDepositInput, WatchSettlementInput, WatchSourceTxInput };
306
+ export { CreateOnrampSessionInput, DepositDriver, DepositSnapshot, FetchActiveSettlementInput, RequestOnrampQuoteInput, RequestQuoteInput, SettlementSnapshot, SubmitDepositInput, WatchOnrampSessionInput, WatchSettlementInput, WatchSourceTxInput };