@stridge/kit 0.1.0-alpha.6 → 0.1.0-alpha.61

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 (580) hide show
  1. package/README.md +22 -6
  2. package/dist/KitProvider.d.ts +40 -0
  3. package/dist/KitProvider.js +1 -1
  4. package/dist/_internal/activity/driver/index.d.ts +3 -0
  5. package/dist/_internal/activity/driver/index.js +1 -0
  6. package/dist/_internal/deposit/driver/index.d.ts +3 -3
  7. package/dist/_internal/drivers/stridge/index.d.ts +4 -2
  8. package/dist/_internal/drivers/stridge/index.js +1 -1
  9. package/dist/_internal/drivers/stridge-mock/index.d.ts +4 -2
  10. package/dist/_internal/drivers/stridge-mock/index.js +1 -1
  11. package/dist/_internal/withdraw/driver/index.d.ts +2 -2
  12. package/dist/activity/compound/index.d.ts +19 -0
  13. package/dist/activity/compound/index.js +1 -0
  14. package/dist/activity/dialog/index.d.ts +4 -0
  15. package/dist/activity/dialog/index.js +1 -0
  16. package/dist/activity/widgets/index.d.ts +5 -0
  17. package/dist/activity/widgets/index.js +1 -0
  18. package/dist/deposit/compound/index.d.ts +25 -15
  19. package/dist/deposit/compound/index.js +1 -1
  20. package/dist/deposit/dialog/index.d.ts +2 -1
  21. package/dist/deposit/widgets/index.d.ts +17 -0
  22. package/dist/deposit/widgets/index.js +1 -0
  23. package/dist/drivers/stridge/catalog.d.ts +54 -0
  24. package/dist/drivers/stridge/catalog.js +1 -0
  25. package/dist/drivers/stridge/createStridgeActivityDriver.d.ts +44 -0
  26. package/dist/drivers/stridge/createStridgeActivityDriver.js +1 -0
  27. package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +10 -1
  28. package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
  29. package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +37 -14
  30. package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
  31. package/dist/drivers/stridge/internal/ensureWalletChain.js +1 -0
  32. package/dist/drivers/stridge/internal/pollOnce.js +1 -1
  33. package/dist/drivers/stridge/internal/resolveAddEthereumChain.js +1 -0
  34. package/dist/drivers/stridge/internal/retry.js +1 -0
  35. package/dist/drivers/stridge/internal/supportedChains.js +1 -0
  36. package/dist/drivers/stridge/types.d.ts +20 -14
  37. package/dist/drivers/stridge/types.js +1 -1
  38. package/dist/drivers/stridge/wagmiSigner.js +1 -1
  39. package/dist/drivers/stridge-mock/checkoutChannel.d.ts +31 -0
  40. package/dist/drivers/stridge-mock/checkoutChannel.js +1 -0
  41. package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.d.ts +44 -0
  42. package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.js +1 -0
  43. package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +30 -2
  44. package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
  45. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +15 -3
  46. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
  47. package/dist/drivers/stridge-mock/fixtures.d.ts +19 -13
  48. package/dist/drivers/stridge-mock/fixtures.js +1 -1
  49. package/dist/drivers/stridge-mock/triggers.d.ts +12 -0
  50. package/dist/events/bus/createBus.d.ts +26 -0
  51. package/dist/events/bus/createBus.js +1 -0
  52. package/dist/events/bus/flowIdRegistry.d.ts +17 -0
  53. package/dist/events/bus/flowIdRegistry.js +1 -0
  54. package/dist/events/bus/index.js +1 -0
  55. package/dist/events/bus/metadata.js +1 -0
  56. package/dist/events/context.js +1 -0
  57. package/dist/events/emit/index.js +1 -0
  58. package/dist/events/emit/mapFailure.js +1 -0
  59. package/dist/events/emit/useActivityEmissions.js +1 -0
  60. package/dist/events/emit/useDepositEmissions.js +1 -0
  61. package/dist/events/emit/useKitEmitter.js +1 -0
  62. package/dist/events/emit/useWithdrawEmissions.js +1 -0
  63. package/dist/events/hooks/index.d.ts +6 -0
  64. package/dist/events/hooks/index.js +1 -0
  65. package/dist/events/hooks/useCurrentFlowId.d.ts +6 -0
  66. package/dist/events/hooks/useCurrentFlowId.js +1 -0
  67. package/dist/events/hooks/useStableHandler.js +1 -0
  68. package/dist/events/hooks/useStridgeEvent.d.ts +9 -0
  69. package/dist/events/hooks/useStridgeEvent.js +1 -0
  70. package/dist/events/hooks/useStridgeEventBus.d.ts +34 -0
  71. package/dist/events/hooks/useStridgeEventBus.js +1 -0
  72. package/dist/events/hooks/useStridgeEvents.d.ts +7 -0
  73. package/dist/events/hooks/useStridgeEvents.js +1 -0
  74. package/dist/events/hooks/useStridgeFlowEvent.d.ts +8 -0
  75. package/dist/events/hooks/useStridgeFlowEvent.js +1 -0
  76. package/dist/events/hooks/useStridgeFlowEvents.d.ts +6 -0
  77. package/dist/events/hooks/useStridgeFlowEvents.js +1 -0
  78. package/dist/events/index.d.ts +17 -0
  79. package/dist/events/index.js +1 -0
  80. package/dist/events/publish.js +1 -0
  81. package/dist/events/redact.d.ts +34 -0
  82. package/dist/events/redact.js +1 -0
  83. package/dist/events/types/activity.d.ts +53 -0
  84. package/dist/events/types/deposit.d.ts +235 -0
  85. package/dist/events/types/envelope.d.ts +145 -0
  86. package/dist/events/types/index.d.ts +32 -0
  87. package/dist/events/types/kit.d.ts +23 -0
  88. package/dist/events/types/withdraw.d.ts +150 -0
  89. package/dist/flows/activity/compound/ActivityFlow.d.ts +46 -0
  90. package/dist/flows/activity/compound/ActivityFlow.js +1 -0
  91. package/dist/flows/activity/compound/components/Boundary.d.ts +29 -0
  92. package/dist/flows/activity/compound/components/Boundary.js +1 -0
  93. package/dist/flows/activity/compound/components/Steps.d.ts +24 -0
  94. package/dist/flows/activity/compound/components/Steps.js +1 -0
  95. package/dist/flows/activity/dialog/ActivityDialog.d.ts +55 -0
  96. package/dist/flows/activity/dialog/ActivityDialog.js +1 -0
  97. package/dist/flows/activity/dialog/ActivityFlowBoundary.d.ts +1 -0
  98. package/dist/flows/activity/dialog/ActivityFlowBoundary.js +1 -0
  99. package/dist/flows/activity/driver/context.d.ts +38 -0
  100. package/dist/flows/activity/driver/context.js +1 -0
  101. package/dist/flows/activity/driver/types.d.ts +58 -0
  102. package/dist/flows/activity/orchestrator/controller.d.ts +11 -0
  103. package/dist/flows/activity/orchestrator/controller.js +1 -0
  104. package/dist/flows/activity/orchestrator/index.d.ts +4 -0
  105. package/dist/flows/activity/orchestrator/index.js +1 -0
  106. package/dist/flows/activity/orchestrator/reducer.d.ts +1 -0
  107. package/dist/flows/activity/orchestrator/reducer.js +1 -0
  108. package/dist/flows/activity/orchestrator/types.d.ts +71 -0
  109. package/dist/flows/activity/orchestrator/useActivity.d.ts +94 -0
  110. package/dist/flows/activity/orchestrator/useActivity.js +1 -0
  111. package/dist/flows/activity/widgets/ActivityDetail.d.ts +41 -0
  112. package/dist/flows/activity/widgets/ActivityDetail.js +1 -0
  113. package/dist/flows/activity/widgets/ActivityList.d.ts +38 -0
  114. package/dist/flows/activity/widgets/ActivityList.js +1 -0
  115. package/dist/flows/activity/widgets/useStandaloneActivitySource.js +1 -0
  116. package/dist/flows/deposit/dialog/DepositBootstrapErrorState.js +1 -1
  117. package/dist/flows/deposit/dialog/DepositDialog.d.ts +26 -79
  118. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  119. package/dist/flows/deposit/dialog/WalletRequiredState.js +1 -0
  120. package/dist/flows/deposit/dialog/WalletRequiredState.styles.js +1 -0
  121. package/dist/flows/deposit/driver/payloads.d.ts +109 -5
  122. package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.d.ts +2 -0
  123. package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -1
  124. package/dist/flows/deposit/driver/transformers/index.d.ts +1 -0
  125. package/dist/flows/deposit/driver/transformers/quoteToPayload.d.ts +2 -0
  126. package/dist/flows/deposit/driver/transformers/settlementToPayload.d.ts +25 -0
  127. package/dist/flows/deposit/driver/transformers/settlementToPayload.js +1 -1
  128. package/dist/flows/deposit/driver/transformers/startToAddressesPayload.d.ts +2 -0
  129. package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -1
  130. package/dist/flows/deposit/driver/transformers/startToBrandPayload.d.ts +1 -0
  131. package/dist/flows/deposit/driver/transformers/startToTargetPayload.d.ts +2 -0
  132. package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -1
  133. package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.d.ts +1 -0
  134. package/dist/flows/deposit/driver/types.d.ts +92 -5
  135. package/dist/flows/deposit/orchestrator/controller.js +1 -1
  136. package/dist/flows/deposit/orchestrator/index.d.ts +5 -0
  137. package/dist/flows/deposit/orchestrator/reducer.d.ts +1 -0
  138. package/dist/flows/deposit/orchestrator/reducer.js +1 -1
  139. package/dist/flows/deposit/orchestrator/types.d.ts +276 -12
  140. package/dist/flows/deposit/orchestrator/useDeposit.d.ts +45 -1
  141. package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
  142. package/dist/flows/deposit/shared/checkoutPopup.js +1 -0
  143. package/dist/flows/deposit/shared/onramp.js +1 -0
  144. package/dist/flows/deposit/widgets/activity/DepositActivityDetail.d.ts +40 -0
  145. package/dist/flows/deposit/widgets/activity/DepositActivityDetail.js +1 -0
  146. package/dist/flows/deposit/widgets/activity/DepositActivityList.d.ts +38 -0
  147. package/dist/flows/deposit/widgets/activity/DepositActivityList.js +1 -0
  148. package/dist/flows/deposit/widgets/activity/index.d.ts +2 -0
  149. package/dist/flows/deposit/widgets/activity/index.js +1 -0
  150. package/dist/flows/deposit/widgets/activity/useDepositActivitySource.js +1 -0
  151. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +32 -5
  152. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
  153. package/dist/flows/deposit/widgets/amount-entry/footerIntent.js +1 -0
  154. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.d.ts +24 -4
  155. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
  156. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts +37 -4
  157. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -1
  158. package/dist/flows/deposit/widgets/deposit/Deposit.d.ts +39 -4
  159. package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
  160. package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +58 -1
  161. package/dist/flows/deposit/widgets/deposit/compound/Deposit.js +1 -1
  162. package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.d.ts +6 -0
  163. package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.js +1 -1
  164. package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -1
  165. package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.d.ts +29 -0
  166. package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.js +1 -0
  167. package/dist/flows/deposit/widgets/deposit/compound/components/Guards.d.ts +28 -0
  168. package/dist/flows/deposit/widgets/deposit/compound/components/Guards.js +1 -0
  169. package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +11 -0
  170. package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
  171. package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +7 -0
  172. package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -1
  173. package/dist/flows/deposit/widgets/deposit/compound/components/MethodSection.d.ts +40 -0
  174. package/dist/flows/deposit/widgets/deposit/compound/components/MethodSection.js +1 -0
  175. package/dist/flows/deposit/widgets/deposit/compound/components/Methods.d.ts +15 -9
  176. package/dist/flows/deposit/widgets/deposit/compound/components/Methods.js +1 -1
  177. package/dist/flows/deposit/widgets/deposit/compound/components/Rail.d.ts +18 -0
  178. package/dist/flows/deposit/widgets/deposit/compound/components/Rail.js +1 -0
  179. package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.d.ts +43 -0
  180. package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.js +1 -0
  181. package/dist/flows/deposit/widgets/deposit/compound/components/Steps.d.ts +24 -0
  182. package/dist/flows/deposit/widgets/deposit/compound/components/Steps.js +1 -0
  183. package/dist/flows/deposit/widgets/deposit/compound/index.d.ts +2 -1
  184. package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +106 -4
  185. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +41 -1
  186. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
  187. package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -1
  188. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.js +1 -1
  189. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.js +1 -1
  190. package/dist/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts +5 -5
  191. package/dist/flows/deposit/widgets/error-state/ErrorState.d.ts +39 -4
  192. package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
  193. package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.d.ts +64 -0
  194. package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.js +1 -0
  195. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.d.ts +62 -0
  196. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.js +1 -0
  197. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.d.ts +14 -0
  198. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.js +1 -0
  199. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.js +1 -0
  200. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.d.ts +13 -0
  201. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.js +1 -0
  202. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.d.ts +14 -0
  203. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.js +1 -0
  204. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/context.js +1 -0
  205. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.d.ts +3 -0
  206. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.js +1 -0
  207. package/dist/flows/deposit/widgets/onramp-amount-entry/compound/types.d.ts +29 -0
  208. package/dist/flows/deposit/widgets/onramp-amount-entry/index.d.ts +1 -0
  209. package/dist/flows/deposit/widgets/onramp-amount-entry/index.js +1 -0
  210. package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.d.ts +50 -0
  211. package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.js +1 -0
  212. package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.d.ts +42 -0
  213. package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.js +1 -0
  214. package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.d.ts +24 -0
  215. package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.js +1 -0
  216. package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.js +1 -0
  217. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.d.ts +16 -0
  218. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.js +1 -0
  219. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.d.ts +15 -0
  220. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.js +1 -0
  221. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.d.ts +15 -0
  222. package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.js +1 -0
  223. package/dist/flows/deposit/widgets/onramp-confirm/compound/context.d.ts +25 -0
  224. package/dist/flows/deposit/widgets/onramp-confirm/compound/context.js +1 -0
  225. package/dist/flows/deposit/widgets/onramp-confirm/compound/index.d.ts +4 -0
  226. package/dist/flows/deposit/widgets/onramp-confirm/compound/index.js +1 -0
  227. package/dist/flows/deposit/widgets/onramp-confirm/compound/types.d.ts +62 -0
  228. package/dist/flows/deposit/widgets/onramp-confirm/index.d.ts +1 -0
  229. package/dist/flows/deposit/widgets/onramp-confirm/index.js +1 -0
  230. package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.d.ts +48 -0
  231. package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.js +1 -0
  232. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.d.ts +63 -0
  233. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.js +1 -0
  234. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.d.ts +14 -0
  235. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.js +1 -0
  236. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.d.ts +11 -0
  237. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.js +1 -0
  238. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/context.js +1 -0
  239. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.d.ts +2 -0
  240. package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.js +1 -0
  241. package/dist/flows/deposit/widgets/onramp-payment-pending/index.d.ts +1 -0
  242. package/dist/flows/deposit/widgets/onramp-payment-pending/index.js +1 -0
  243. package/dist/flows/deposit/widgets/processing-state/ProcessingState.d.ts +30 -4
  244. package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -1
  245. package/dist/flows/deposit/widgets/success-state/SuccessState.d.ts +38 -4
  246. package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -1
  247. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.d.ts +34 -3
  248. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -1
  249. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +1 -1
  250. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -1
  251. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
  252. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +5 -2
  253. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -1
  254. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +6 -0
  255. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
  256. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.d.ts +4 -10
  257. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
  258. package/dist/flows/deposit/widgets/transfer-crypto/compound/types.d.ts +16 -2
  259. package/dist/flows/shared/transformers/computeQuoteAttrs.d.ts +1 -0
  260. package/dist/flows/shared/transformers/index.d.ts +1 -0
  261. package/dist/flows/shared/transformers/pickRelevantSettlement.d.ts +1 -0
  262. package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -1
  263. package/dist/flows/shared/transformers/testnets.js +1 -0
  264. package/dist/flows/withdraw/bindings/WithdrawBindings.d.ts +92 -0
  265. package/dist/flows/withdraw/bindings/WithdrawBindings.js +1 -0
  266. package/dist/flows/withdraw/bindings/index.d.ts +1 -0
  267. package/dist/flows/withdraw/bindings/index.js +1 -0
  268. package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +44 -71
  269. package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
  270. package/dist/flows/withdraw/driver/dto.d.ts +8 -7
  271. package/dist/flows/withdraw/driver/payloads.d.ts +16 -1
  272. package/dist/flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js +1 -1
  273. package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js +1 -1
  274. package/dist/flows/withdraw/driver/types.d.ts +77 -14
  275. package/dist/flows/withdraw/orchestrator/controller.js +1 -1
  276. package/dist/flows/withdraw/orchestrator/index.d.ts +1 -1
  277. package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
  278. package/dist/flows/withdraw/orchestrator/types.d.ts +218 -35
  279. package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +36 -1
  280. package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -1
  281. package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.d.ts +39 -0
  282. package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.js +1 -0
  283. package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.d.ts +36 -0
  284. package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.js +1 -0
  285. package/dist/flows/withdraw/widgets/activity/index.d.ts +2 -0
  286. package/dist/flows/withdraw/widgets/activity/index.js +1 -0
  287. package/dist/flows/withdraw/widgets/activity/useWithdrawActivitySource.js +1 -0
  288. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.d.ts +60 -0
  289. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.js +1 -0
  290. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.d.ts +13 -0
  291. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.js +1 -0
  292. package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.d.ts +29 -0
  293. package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.js +1 -0
  294. package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.d.ts +25 -0
  295. package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.js +1 -0
  296. package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.d.ts +27 -0
  297. package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.js +1 -0
  298. package/dist/flows/withdraw/widgets/withdraw/compound/index.d.ts +3 -0
  299. package/dist/flows/withdraw/widgets/withdraw/compound/index.js +1 -0
  300. package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.d.ts +45 -2
  301. package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.js +1 -1
  302. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +32 -12
  303. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
  304. package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -1
  305. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.d.ts +7 -6
  306. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +6 -1
  307. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -1
  308. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +7 -5
  309. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
  310. package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +15 -5
  311. package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -1
  312. package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +39 -3
  313. package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -1
  314. package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.d.ts +46 -2
  315. package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js +1 -1
  316. package/dist/format/index.d.ts +2 -1
  317. package/dist/format/index.js +1 -1
  318. package/dist/i18n/index.d.ts +5 -4
  319. package/dist/i18n/index.js +1 -1
  320. package/dist/i18n/locales/ar.js +1 -1
  321. package/dist/i18n/locales/es.js +1 -1
  322. package/dist/i18n/locales/source-keys.d.ts +12 -0
  323. package/dist/i18n/locales/source-keys.js +0 -0
  324. package/dist/icons/index.d.ts +5 -1
  325. package/dist/icons/index.js +1 -1
  326. package/dist/index.d.ts +35 -11
  327. package/dist/index.js +1 -1
  328. package/dist/package.js +1 -1
  329. package/dist/scope/KitPortalScope.js +1 -1
  330. package/dist/scope/KitScope.d.ts +27 -1
  331. package/dist/scope/KitScope.js +1 -1
  332. package/dist/scope/context.d.ts +24 -1
  333. package/dist/scope/index.d.ts +1 -1
  334. package/dist/shared/attribution/Attribution.js +1 -0
  335. package/dist/shared/attribution/Attribution.slots.js +1 -0
  336. package/dist/shared/attribution/Attribution.styles.js +1 -0
  337. package/dist/shared/attribution/index.js +1 -0
  338. package/dist/shared/chains/index.d.ts +48 -29
  339. package/dist/shared/chains/index.js +1 -1
  340. package/dist/shared/constants/brand-intercom.js +1 -0
  341. package/dist/shared/cuer/Cuer.js +1 -1
  342. package/dist/shared/dialog/DialogShell.d.ts +21 -6
  343. package/dist/shared/dialog/DialogShell.js +1 -1
  344. package/dist/shared/dialog/Frame.js +1 -1
  345. package/dist/shared/dialog/LoadingState.js +1 -0
  346. package/dist/shared/dialog/LoadingState.styles.js +1 -0
  347. package/dist/shared/dialog/StepTransition.js +1 -1
  348. package/dist/shared/dialog/useDirectionalChevronTransform.js +1 -1
  349. package/dist/shared/driver/types.d.ts +4 -3
  350. package/dist/shared/format/formatSmartRelative.d.ts +25 -0
  351. package/dist/shared/format/formatSmartRelative.js +1 -0
  352. package/dist/shared/format/formatUsd.js +1 -1
  353. package/dist/shared/i18n/KitI18nProvider.d.ts +11 -8
  354. package/dist/shared/i18n/KitI18nProvider.js +1 -1
  355. package/dist/shared/i18n/createKitI18n.d.ts +79 -16
  356. package/dist/shared/i18n/createKitI18n.js +1 -1
  357. package/dist/shared/i18n/useLingui.d.ts +11 -3
  358. package/dist/shared/icons/ActivityIcon.d.ts +12 -0
  359. package/dist/shared/icons/ActivityIcon.js +1 -0
  360. package/dist/shared/icons/BitcoinIcon.d.ts +14 -0
  361. package/dist/shared/icons/BitcoinIcon.js +1 -0
  362. package/dist/shared/icons/CardIcon.d.ts +16 -0
  363. package/dist/shared/icons/CardIcon.js +1 -0
  364. package/dist/shared/icons/LogoIcon.d.ts +13 -0
  365. package/dist/shared/icons/LogoIcon.js +1 -0
  366. package/dist/shared/merchant-link/MerchantLink.d.ts +1 -0
  367. package/dist/shared/merchant-link/MerchantLink.js +1 -0
  368. package/dist/shared/merchant-link/MerchantLinkButton.d.ts +1 -0
  369. package/dist/shared/merchant-link/MerchantLinkButton.js +1 -0
  370. package/dist/shared/merchant-link/index.d.ts +1 -0
  371. package/dist/shared/merchant-link/index.js +1 -0
  372. package/dist/shared/merchant-link/resolveMerchantLink.js +1 -0
  373. package/dist/shared/orchestrator/activityOpenInput.d.ts +21 -0
  374. package/dist/shared/orchestrator/createActivityReducers.js +1 -0
  375. package/dist/shared/orchestrator/index.d.ts +2 -0
  376. package/dist/shared/orchestrator/index.js +1 -1
  377. package/dist/shared/orchestrator/resolveActivityEntry.d.ts +1 -0
  378. package/dist/shared/orchestrator/resolveActivityEntry.js +1 -0
  379. package/dist/shared/orchestrator/toFailure.js +1 -1
  380. package/dist/shared/orchestrator/types.d.ts +8 -0
  381. package/dist/shared/orchestrator/useOnrampSessionWatcher.js +1 -0
  382. package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
  383. package/dist/shared/presentation/index.js +1 -0
  384. package/dist/shared/presentation/types.d.ts +30 -0
  385. package/dist/shared/presentation/types.js +1 -0
  386. package/dist/shared/presentation/useResolvedSurfaceKind.js +1 -0
  387. package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
  388. package/dist/shared/support/SupportConfigContext.d.ts +1 -0
  389. package/dist/shared/support/SupportConfigContext.js +1 -0
  390. package/dist/shared/support/SupportLink.d.ts +1 -0
  391. package/dist/shared/support/SupportLink.js +1 -0
  392. package/dist/shared/support/SupportSpinner.d.ts +1 -0
  393. package/dist/shared/support/SupportSpinner.js +1 -0
  394. package/dist/shared/support/index.d.ts +2 -0
  395. package/dist/shared/support/index.js +1 -0
  396. package/dist/shared/support/intercom-loader.d.ts +17 -0
  397. package/dist/shared/support/intercom-loader.js +1 -0
  398. package/dist/shared/support/types.d.ts +43 -0
  399. package/dist/shared/support/useIntercomMerchantContext.d.ts +27 -0
  400. package/dist/shared/support/useIntercomMerchantContext.js +1 -0
  401. package/dist/shared/support/useIntercomShutdownOnUnmount.js +1 -0
  402. package/dist/shared/support/useMerchantContext.d.ts +1 -0
  403. package/dist/shared/support/useMerchantContext.js +1 -0
  404. package/dist/shared/support/useSupportTrigger.js +1 -0
  405. package/dist/shared/terms/TermsConfigContext.d.ts +1 -0
  406. package/dist/shared/terms/TermsConfigContext.js +1 -0
  407. package/dist/shared/terms/TermsLink.d.ts +1 -0
  408. package/dist/shared/terms/TermsLink.js +1 -0
  409. package/dist/shared/terms/index.d.ts +1 -0
  410. package/dist/shared/terms/index.js +1 -0
  411. package/dist/shared/terms/types.d.ts +43 -0
  412. package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.d.ts +52 -0
  413. package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.js +1 -0
  414. package/dist/shared/ui/AdaptiveSurface/index.d.ts +2 -0
  415. package/dist/shared/ui/AdaptiveSurface/index.js +1 -0
  416. package/dist/shared/ui/Card/Card.d.ts +12 -9
  417. package/dist/shared/ui/Card/Card.js +1 -1
  418. package/dist/shared/ui/Card/Card.styles.js +1 -1
  419. package/dist/shared/ui/Details/Details.d.ts +9 -1
  420. package/dist/shared/ui/Details/Details.styles.js +1 -1
  421. package/dist/shared/ui/Dialog/Dialog.d.ts +10 -8
  422. package/dist/shared/ui/Dialog/Dialog.js +1 -1
  423. package/dist/shared/ui/Dialog/Dialog.styles.js +1 -1
  424. package/dist/shared/ui/Drawer/Drawer.d.ts +135 -0
  425. package/dist/shared/ui/Drawer/Drawer.js +1 -0
  426. package/dist/shared/ui/Drawer/Drawer.slots.d.ts +19 -0
  427. package/dist/shared/ui/Drawer/Drawer.slots.js +1 -0
  428. package/dist/shared/ui/Drawer/Drawer.styles.js +1 -0
  429. package/dist/shared/ui/Drawer/index.d.ts +2 -0
  430. package/dist/shared/ui/Drawer/index.js +1 -0
  431. package/dist/shared/ui/Select/Select.js +1 -1
  432. package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +21 -8
  433. package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -1
  434. package/dist/shared/ui/Steps/Steps.d.ts +52 -0
  435. package/dist/shared/ui/Steps/Steps.js +1 -0
  436. package/dist/shared/ui/Steps/Steps.slots.d.ts +7 -0
  437. package/dist/shared/ui/Steps/Steps.slots.js +1 -0
  438. package/dist/shared/ui/Steps/Steps.styles.js +1 -0
  439. package/dist/shared/ui/Steps/index.d.ts +2 -0
  440. package/dist/shared/ui/Steps/index.js +1 -0
  441. package/dist/shared/ui/Tabs/Tabs.d.ts +79 -0
  442. package/dist/shared/ui/Tabs/Tabs.js +1 -0
  443. package/dist/shared/ui/Tabs/Tabs.slots.d.ts +11 -0
  444. package/dist/shared/ui/Tabs/Tabs.slots.js +1 -0
  445. package/dist/shared/ui/Tabs/Tabs.styles.js +1 -0
  446. package/dist/shared/ui/Tabs/index.d.ts +2 -0
  447. package/dist/shared/ui/Tabs/index.js +1 -0
  448. package/dist/shared/ui/WalletRow/WalletRow.d.ts +1 -1
  449. package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
  450. package/dist/shared/ui/surfaceContext.d.ts +9 -0
  451. package/dist/shared/ui/surfaceContext.js +1 -0
  452. package/dist/shared/utils/assertNever.js +1 -0
  453. package/dist/shared/utils/logos/types.d.ts +1 -1
  454. package/dist/shared/utils/useDeepMemo.js +1 -0
  455. package/dist/shared/wallet/ConnectWalletContext.d.ts +17 -0
  456. package/dist/shared/wallet/ConnectWalletContext.js +1 -0
  457. package/dist/shared/widgets/activity/ActivityTrigger.js +1 -0
  458. package/dist/shared/widgets/activity/ActivityTrigger.styles.js +1 -0
  459. package/dist/shared/widgets/activity/adapters/settlementToWidgetProps.js +1 -0
  460. package/dist/shared/widgets/activity/compound/Activity.d.ts +95 -0
  461. package/dist/shared/widgets/activity/compound/Activity.js +1 -0
  462. package/dist/shared/widgets/activity/compound/Activity.slots.d.ts +22 -0
  463. package/dist/shared/widgets/activity/compound/Activity.slots.js +1 -0
  464. package/dist/shared/widgets/activity/compound/Activity.styles.js +1 -0
  465. package/dist/shared/widgets/activity/compound/ActivityDetail.d.ts +82 -0
  466. package/dist/shared/widgets/activity/compound/ActivityDetail.js +1 -0
  467. package/dist/shared/widgets/activity/compound/Row.slots.d.ts +21 -0
  468. package/dist/shared/widgets/activity/compound/Row.slots.js +1 -0
  469. package/dist/shared/widgets/activity/compound/Row.styles.js +1 -0
  470. package/dist/shared/widgets/activity/compound/components/ActivityHeader.d.ts +39 -0
  471. package/dist/shared/widgets/activity/compound/components/ActivityHeader.js +1 -0
  472. package/dist/shared/widgets/activity/compound/components/Empty.d.ts +15 -0
  473. package/dist/shared/widgets/activity/compound/components/Empty.js +1 -0
  474. package/dist/shared/widgets/activity/compound/components/ErrorView.d.ts +26 -0
  475. package/dist/shared/widgets/activity/compound/components/ErrorView.js +1 -0
  476. package/dist/shared/widgets/activity/compound/components/List.d.ts +23 -0
  477. package/dist/shared/widgets/activity/compound/components/List.js +1 -0
  478. package/dist/shared/widgets/activity/compound/components/Row.d.ts +51 -0
  479. package/dist/shared/widgets/activity/compound/components/Row.js +1 -0
  480. package/dist/shared/widgets/activity/compound/components/StatusPip.js +1 -0
  481. package/dist/shared/widgets/activity/compound/context.d.ts +95 -0
  482. package/dist/shared/widgets/activity/compound/context.js +1 -0
  483. package/dist/shared/widgets/activity/compound/index.d.ts +8 -0
  484. package/dist/shared/widgets/activity/compound/index.js +1 -0
  485. package/dist/shared/widgets/activity/index.js +1 -0
  486. package/dist/shared/widgets/activity/payloads.d.ts +108 -0
  487. package/dist/shared/widgets/activity/transformers/activityResponseToPayload.js +1 -0
  488. package/dist/shared/widgets/activity/transformers/resolveDirection.js +1 -0
  489. package/dist/shared/widgets/amount-entry/compound/AmountEntry.d.ts +10 -2
  490. package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
  491. package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.d.ts +6 -0
  492. package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.js +1 -1
  493. package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
  494. package/dist/shared/widgets/amount-entry/compound/components/Details.d.ts +34 -0
  495. package/dist/shared/widgets/amount-entry/compound/components/Details.js +1 -0
  496. package/dist/shared/widgets/amount-entry/compound/components/Footer.d.ts +2 -1
  497. package/dist/shared/widgets/amount-entry/compound/components/Footer.js +1 -1
  498. package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +6 -1
  499. package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -1
  500. package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -1
  501. package/dist/shared/widgets/amount-entry/compound/components/Hero/SwapBackdrop.js +1 -1
  502. package/dist/shared/widgets/amount-entry/compound/components/Notice.d.ts +7 -0
  503. package/dist/shared/widgets/amount-entry/compound/components/Notice.js +1 -0
  504. package/dist/shared/widgets/amount-entry/compound/index.d.ts +1 -1
  505. package/dist/shared/widgets/amount-entry/compound/types.d.ts +69 -3
  506. package/dist/shared/widgets/asset-picker/compound/AssetPicker.d.ts +3 -0
  507. package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -1
  508. package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.d.ts +2 -0
  509. package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.js +1 -1
  510. package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -1
  511. package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +7 -1
  512. package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -1
  513. package/dist/shared/widgets/asset-picker/compound/components/Empty.d.ts +15 -0
  514. package/dist/shared/widgets/asset-picker/compound/components/Empty.js +1 -0
  515. package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +6 -1
  516. package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -1
  517. package/dist/shared/widgets/asset-picker/compound/types.d.ts +15 -1
  518. package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.styles.js +1 -1
  519. package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.js +1 -1
  520. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.d.ts +4 -3
  521. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -1
  522. package/dist/shared/widgets/confirm-transfer/compound/components/QuoteTimer.js +1 -1
  523. package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -1
  524. package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -1
  525. package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +1 -1
  526. package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -1
  527. package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -1
  528. package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +1 -5
  529. package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -1
  530. package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +0 -1
  531. package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -1
  532. package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -1
  533. package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +6 -1
  534. package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -1
  535. package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +4 -3
  536. package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -1
  537. package/dist/shared/widgets/processing-state/compound/components/Hero.d.ts +14 -7
  538. package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -1
  539. package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -1
  540. package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -1
  541. package/dist/shared/widgets/processing-state/compound/components/splitAmount.js +1 -0
  542. package/dist/shared/widgets/processing-state/compound/index.d.ts +1 -1
  543. package/dist/shared/widgets/processing-state/compound/types.d.ts +11 -29
  544. package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -1
  545. package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -1
  546. package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +1 -1
  547. package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -1
  548. package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -1
  549. package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -1
  550. package/dist/shared/widgets/success-state/compound/types.d.ts +5 -5
  551. package/dist/storage/context.d.ts +9 -1
  552. package/dist/storage/context.js +1 -1
  553. package/dist/storage/index.d.ts +1 -1
  554. package/dist/stridge/StridgeProvider.d.ts +177 -35
  555. package/dist/stridge/StridgeProvider.js +1 -1
  556. package/dist/stridge/depositOwner.js +1 -0
  557. package/dist/stridge/optionalWagmi.js +1 -0
  558. package/dist/stridge/stubs.js +1 -1
  559. package/dist/styles/index.css +567 -12
  560. package/dist/types.d.ts +8 -6
  561. package/dist/ui/index.d.ts +9 -1
  562. package/dist/ui/index.js +1 -1
  563. package/dist/version.d.ts +10 -0
  564. package/dist/version.js +1 -0
  565. package/dist/withdraw/compound/index.d.ts +11 -8
  566. package/dist/withdraw/compound/index.js +1 -1
  567. package/dist/withdraw/dialog/index.d.ts +4 -1
  568. package/dist/withdraw/widgets/index.d.ts +7 -0
  569. package/dist/withdraw/widgets/index.js +1 -0
  570. package/package.json +31 -7
  571. package/dist/_internal/deposit/widgets/index.d.ts +0 -11
  572. package/dist/_internal/deposit/widgets/index.js +0 -1
  573. package/dist/_internal/withdraw/widgets/index.d.ts +0 -5
  574. package/dist/_internal/withdraw/widgets/index.js +0 -1
  575. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +0 -36
  576. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +0 -1
  577. package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +0 -17
  578. package/dist/shared/widgets/processing-state/compound/components/Actions.js +0 -1
  579. package/dist/stridge/StridgeContext.d.ts +0 -29
  580. package/dist/stridge/StridgeContext.js +0 -1
@@ -1,7 +1,4 @@
1
- import { TxRef } from "../../../shared/driver/types.js";
2
- import { BalanceItemPayload, QuotePayload, SettlementFailurePayload, SettlementPendingPayload, SettlementSuccessPayload } from "../driver/payloads.js";
3
- import { FailureInfo } from "../../../shared/orchestrator/types.js";
4
- import { DepositMethod, DepositState, DepositStateName, ResolvedOpenInput } from "../orchestrator/types.js";
1
+ import { Presentation } from "../../../shared/presentation/types.js";
5
2
  import { ErrorInfo } from "react";
6
3
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
7
4
 
@@ -12,23 +9,23 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
12
9
  * bound to the controller's `state.name !== "closed"`, so the dialog appears / disappears
13
10
  * automatically as descendants call `useDeposit().open()` / `.close()`.
14
11
  *
15
- * Each widget gates rendering on its own FSM state, so the dialog stacks them and only one
16
- * renders content per state. Skip the dialog entirely for fully custom UI — render against
17
- * `useDeposit()` / `useDepositState()` / `useDepositSnapshot()` directly.
12
+ * The dialog is a pure composition of compound parts `<Deposit.Boundary>` for crash
13
+ * recovery, `<Deposit.Guards>` for the wallet-required / bootstrap-fatal / bootstrap-loading
14
+ * cascade, `<Deposit.Steps>` for FSM-driven screen routing, and `<DepositStatusBanner />` for
15
+ * the inline settlement banner. Each piece is independently overrideable via the compound
16
+ * surface; this is the canonical shape integrators can copy verbatim.
18
17
  *
19
- * Three top-level callbacks (`onOpened`, `onClosed`, `onStepChanged`) describe the dialog as a
20
- * stateful component. The grouped `events={{ }}` prop carries the operational lifecycle —
21
- * user actions, async outcomes from the orchestrator, and settlement-entity transitions for
22
- * pending / succeeded / failed deposits.
18
+ * Lifecycle observability is delivered by the unified event bus exported from
19
+ * `@stridge/kit/events`. The dialog itself takes no `on*` callback props subscribe via
20
+ * `useStridgeFlowEvents` / `useStridgeEvents` (or the single-event variants) anywhere in
21
+ * the provider subtree.
23
22
  */
24
23
  declare function DepositDialog({
25
24
  container,
26
- onOpened,
27
- onClosed,
28
- onStepChanged,
25
+ metadata,
29
26
  onError,
30
- events
31
- }: DepositDialog.Props): _$react_jsx_runtime0.JSX.Element;
27
+ presentation
28
+ }?: DepositDialog.Props): _$react_jsx_runtime0.JSX.Element;
32
29
  declare namespace DepositDialog {
33
30
  interface Props {
34
31
  /**
@@ -37,76 +34,26 @@ declare namespace DepositDialog {
37
34
  * dialog's width, height, and backdrop to that rect.
38
35
  */
39
36
  container?: HTMLElement | null;
40
- /** Forwarded to the dialog's internal {@link GatewayKitBoundary} for crash reporting. */
41
- onError?: (error: Error, errorInfo: ErrorInfo) => void;
42
37
  /**
43
- * Fires once when the dialog transitions from `closed` to any open step. Receives the
44
- * resolved open input derived from the entry state.
38
+ * Consumer-attached metadata that rides along on every bus event emitted from this
39
+ * dialog's session. Snapshotted at `deposit.opened` and frozen for the session
40
+ * mid-flow prop changes are ignored to keep correlation consistent from `opened` to
41
+ * the terminal event. The kit does not validate or normalise the shape.
45
42
  */
46
- onOpened?: (input: ResolvedOpenInput) => void;
47
- /** Fires once when the dialog transitions back to `closed`. `atStep` is the last open step. */
48
- onClosed?: (atStep: DepositStateName) => void;
49
- /** Fires on every logical step transition. */
50
- onStepChanged?: (event: {
51
- from: DepositStateName;
52
- to: DepositStateName;
53
- ctx: GatewayContext | null;
54
- }) => void;
55
- /** Operational events — user actions, async outcomes, settlement-entity transitions. */
56
- events?: Events;
57
- }
58
- /**
59
- * Operational lifecycle hooks. Fire after the controller has acted (state machine has
60
- * transitioned, driver entity has settled), so payloads are guaranteed valid for the named
61
- * event.
62
- */
63
- interface Events {
64
- /** User picked a deposit method on the `Deposit` step. */
65
- onMethodSelected?: (method: DepositMethod) => void;
66
- /** User confirmed an asset on the `AssetPicker` step. The asset is the driver-shaped balance row. */
67
- onAssetSelected?: (asset: BalanceItemPayload) => void;
68
- /** User submitted an amount on the `AmountEntry` step. */
69
- onAmountSubmitted?: (amount: number) => void;
70
- /** User confirmed the deposit on the `ConfirmDeposit` step (wallet prompt is about to fire). */
71
- onDepositConfirmed?: () => void;
72
- /** User pressed Back on a non-root step. */
73
- onBackPressed?: (fromStep: DepositStateName) => void;
74
- /** Orchestrator requested a quote (`confirmDeposit` entered `loading` or `regenerating`). */
75
- onQuoteRequested?: (input: {
76
- asset: BalanceItemPayload;
77
- amount: number;
78
- }) => void;
79
- /** Orchestrator received a successful quote — fires when the driver's `quote` entity transitions to `ready`. */
80
- onQuoteResolved?: (quote: QuotePayload) => void;
81
- /** Quote fetch failed (FSM `confirmDeposit{phase: failed, recoverFrom: "quote"}`). */
82
- onQuoteFailed?: (failure: FailureInfo) => void;
83
- /** A quote silently expired and a regeneration started (no user interaction). */
84
- onQuoteExpired?: () => void;
85
- /** Wallet broadcast a deposit tx; the orchestrator transitioned into `processing`. */
86
- onDepositSubmitted?: (tx: TxRef) => void;
87
- /** User declined the wallet signature prompt; orchestrator regenerated the quote. */
88
- onSignatureDeclined?: () => void;
89
- /** Deposit submission failed for a non-rejection reason. */
90
- onSubmissionFailed?: (failure: FailureInfo) => void;
91
- /** The driver's `settlement` entity emitted a progressive pending update. */
92
- onProcessingProgress?: (update: SettlementPendingPayload) => void;
93
- /** Terminal success — settlement entity reached `ready{kind: "succeeded"}`. */
94
- onSucceeded?: (result: SettlementSuccessPayload) => void;
43
+ metadata?: Record<string, unknown>;
95
44
  /**
96
- * Terminal failure either a settlement failure (driver-emitted classification) or an
97
- * FSM-derived failure (quote / submission rejection escalated to the global error arm).
45
+ * Forwarded to the dialog's internal `<Deposit.Boundary>` for crash reporting. The
46
+ * boundary's `onReset` is wired automatically through `useDeposit().close()`.
98
47
  */
99
- onFailed?: (failure: SettlementFailurePayload | FailureInfo) => void;
48
+ onError?: (error: Error, errorInfo: ErrorInfo) => void;
100
49
  /**
101
- * Background `fetchActiveSettlement` probe surfaced a pending deposit the driver's
102
- * `settlement` entity transitioned from `idle` / `loading` straight to a pending payload.
50
+ * Per-dialog surface override. `"auto"` (default) renders a centred dialog on wide
51
+ * containers and a bottom-sheet drawer below the breakpoint; `"dialog"` / `"drawer"`
52
+ * force one surface. Pass `{ mode, breakpoint }` to tune the px threshold (default 600).
53
+ * Wins over the provider's `appearance.presentation`; omit to inherit it.
103
54
  */
104
- onPendingSnapshotDetected?: (snapshot: SettlementPendingPayload) => void;
55
+ presentation?: Presentation;
105
56
  }
106
57
  }
107
- /** Convenience union — the `ctx` payload on `onStepChanged`. */
108
- type GatewayContext = Exclude<DepositState, {
109
- name: "closed";
110
- }>["ctx"];
111
58
  //#endregion
112
59
  export { DepositDialog };
@@ -1 +1 @@
1
- "use client";import{useDepositSnapshot as e}from"../driver/context.js";import{useDialogLifecycle as t}from"../../../shared/orchestrator/useDialogLifecycle.js";import"../../../shared/orchestrator/index.js";import{useControllerContext as n}from"../orchestrator/controller.js";import{Dialog as r}from"../../../shared/ui/Dialog/Dialog.js";import"../../../shared/ui/Dialog/index.js";import{AmountEntry as i}from"../widgets/amount-entry/AmountEntry.js";import"../widgets/amount-entry/index.js";import{AssetPicker as a}from"../widgets/asset-picker/AssetPicker.js";import"../widgets/asset-picker/index.js";import{ConfirmDeposit as o}from"../widgets/confirm-deposit/ConfirmDeposit.js";import"../widgets/confirm-deposit/index.js";import{Deposit as s}from"../widgets/deposit/Deposit.js";import"../widgets/deposit/index.js";import{DepositStatusBanner as c}from"../widgets/deposit-status-banner/DepositStatusBanner.js";import"../widgets/deposit-status-banner/index.js";import{ErrorState as l}from"../widgets/error-state/ErrorState.js";import"../widgets/error-state/index.js";import{ProcessingState as u}from"../widgets/processing-state/ProcessingState.js";import"../widgets/processing-state/index.js";import{SuccessState as d}from"../widgets/success-state/SuccessState.js";import"../widgets/success-state/index.js";import{TransferCrypto as f}from"../widgets/transfer-crypto/TransferCrypto.js";import"../widgets/transfer-crypto/index.js";import{StepTransition as p}from"../../../shared/dialog/StepTransition.js";import{GatewayKitBoundary as m}from"../../../shared/error-handling/components/GatewayKitBoundary.js";import"../../../shared/error-handling/index.js";import{DepositBootstrapErrorState as h}from"./DepositBootstrapErrorState.js";import{useRef as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";const y=new Set([`deposit`,`assetPicker`,`amountEntry`,`confirmDeposit`,`transferCrypto`]);function b({container:t,onOpened:g,onClosed:b,onStepChanged:S,onError:C,events:w}){let{state:T,effectiveState:E,controller:D}=n(),O=e(),k=T.name!==`closed`;x(T,O.settlement,O.quote,{onOpened:g,onClosed:b,onStepChanged:S,events:w});let A=E,j=O.target.status===`error`&&y.has(A.name);return _(r,{open:k,onOpenChange:e=>{e||D.close()},children:_(r.Content,{container:t,children:v(m,{onError:C,onReset:D.close,children:[j?_(h,{}):v(p,{stateKey:A.name,children:[A.name===`deposit`?_(s,{}):null,A.name===`assetPicker`?_(a,{}):null,A.name===`amountEntry`?_(i,{}):null,A.name===`confirmDeposit`?_(o,{}):null,A.name===`transferCrypto`?_(f,{}):null,A.name===`processing`?_(u,{}):null,A.name===`success`?_(d,{}):null,A.name===`error`?_(l,{}):null]}),_(c,{})]})})})}function x(e,n,r,i){let a=g(i);a.current=i,t({state:e,settlement:n,quote:r,fireFsm:(e,t)=>S(e,t,a.current),fireSettlement:(e,t)=>T(e,t,a.current),fireQuote:(e,t)=>{t.status===`ready`&&e!==`ready`&&a.current.events?.onQuoteResolved?.(t.payload)}})}function S(e,t,n){let{onOpened:r,onClosed:i,onStepChanged:a,events:o}=n;if(e.name===t.name){t.name===`confirmDeposit`&&e.name===`confirmDeposit`&&w(e.ctx.phase,t.ctx.phase,t,o);return}e.name===`closed`&&t.name!==`closed`&&r?.(C(t)),e.name!==`closed`&&t.name===`closed`&&i?.(e.name),a?.({from:e.name,to:t.name,ctx:t.name===`closed`?null:t.ctx}),e.name===`deposit`&&t.name===`assetPicker`&&o?.onMethodSelected?.(`wallet`),e.name===`deposit`&&t.name===`transferCrypto`&&o?.onMethodSelected?.(`transfer`),e.name===`assetPicker`&&t.name===`amountEntry`&&o?.onAssetSelected?.(t.ctx.asset),e.name===`amountEntry`&&t.name===`confirmDeposit`&&o?.onAmountSubmitted?.(t.ctx.amount),t.name===`confirmDeposit`&&(e.name!==`confirmDeposit`||e.ctx.phase.kind!==t.ctx.phase.kind)&&w(e.name===`confirmDeposit`?e.ctx.phase:void 0,t.ctx.phase,t,o),e.name===`confirmDeposit`&&t.name===`processing`&&o?.onDepositSubmitted?.(t.ctx.tx),e.name!==`error`&&t.name===`error`&&t.ctx.failure&&(o?.onFailed?.(t.ctx.failure),(e.name===`confirmDeposit`?e.ctx.phase:void 0)?.kind===`submitting`&&o?.onSubmissionFailed?.(t.ctx.failure)),t.name!==`closed`&&e.name!==`closed`&&`backTarget`in e.ctx&&t.name===e.ctx.backTarget&&o?.onBackPressed?.(e.name)}function C(e){if(e.name!==`deposit`){if(e.name===`transferCrypto`)return{method:`transfer`};if(e.name===`assetPicker`)return{method:`wallet`};if(e.name===`amountEntry`||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 w(e,t,n,r){r&&e?.kind!==t.kind&&((t.kind===`loading`||t.kind===`regenerating`)&&(r.onQuoteRequested?.({asset:n.ctx.asset,amount:n.ctx.amount}),t.kind===`regenerating`&&(e?.kind===`submitting`?r.onSignatureDeclined?.():e?.kind===`ready`&&r.onQuoteExpired?.())),t.kind===`failed`&&r.onQuoteFailed?.(t.failure),t.kind===`submitting`&&r.onDepositConfirmed?.())}function T(e,t,n){if(t.status!==`ready`&&t.status!==`stale`)return;let r=t.payload,i=n.events;if(i){if(r.kind===`pending`){e===null?i.onPendingSnapshotDetected?.(r):i.onProcessingProgress?.(r);return}if(r.kind===`succeeded`){i.onSucceeded?.(r);return}r.kind===`failed`&&i.onFailed?.(r)}}export{b 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{OnrampPaymentPending as g}from"../widgets/onramp-payment-pending/OnrampPaymentPending.js";import"../widgets/onramp-payment-pending/index.js";import{ProcessingState as _}from"../widgets/processing-state/ProcessingState.js";import"../widgets/processing-state/index.js";import{SuccessState as v}from"../widgets/success-state/SuccessState.js";import"../widgets/success-state/index.js";import{TransferCrypto as y}from"../widgets/transfer-crypto/TransferCrypto.js";import"../widgets/transfer-crypto/index.js";import{jsx as b,jsxs as x}from"react/jsx-runtime";function S({container:S,metadata:C,onError:w,presentation:T}={}){let{state:E,controller:D}=t(),O=e(),k=E.name!==`closed`;return n({state:E,settlement:O.settlement,quote:O.quote,metadata:C}),r(),b(i,{open:k,onOpenChange:e=>{e||D.close()},container:S,...T?{presentation:T}:{},children:x(a.Boundary,{...w?{onError:w}:{},children:[b(a.Guards,{children:x(a.Steps,{children:[b(a.Step,{name:`deposit`,children:b(d,{})}),b(a.Step,{name:`assetPicker`,children:b(l,{})}),b(a.Step,{name:`amountEntry`,children:b(c,{})}),b(a.Step,{name:`onrampAmountEntry`,children:b(m,{})}),b(a.Step,{name:`onrampConfirm`,children:b(h,{})}),b(a.Step,{name:`onrampPaymentPending`,children:b(g,{})}),b(a.Step,{name:`confirmDeposit`,children:b(u,{})}),b(a.Step,{name:`transferCrypto`,children:b(y,{})}),b(a.Step,{name:`processing`,children:b(_,{})}),b(a.Step,{name:`success`,children:b(v,{})}),b(a.Step,{name:`error`,children:b(p,{})}),b(a.Step,{name:`activityList`,children:b(s,{})}),b(a.Step,{name:`activityDetail`,children:b(o,{})})]})}),b(f,{})]})})}export{S as DepositDialog};
@@ -0,0 +1 @@
1
+ "use client";import{Trans as e}from"../../../shared/i18n/Trans.js";import"../../../i18n/index.js";import{useDepositActions as t}from"../orchestrator/controller.js";import{WalletIcon as n}from"../../../shared/icons/WalletIcon.js";import"../../../icons/index.js";import{useConnectWallet as r}from"../../../shared/wallet/ConnectWalletContext.js";import{Button as i}from"../../../shared/ui/Button/Button.js";import{Dialog as a}from"../../../shared/ui/Dialog/Dialog.js";import"../../../shared/ui/Dialog/index.js";import{Card as o}from"../../../shared/ui/Card/Card.js";import{text as s}from"../../../shared/ui/Text/Text.js";import"../../../ui/index.js";import{Frame as c}from"../../../shared/dialog/Frame.js";import{styles as l}from"./WalletRequiredState.styles.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import*as f from"@stylexjs/stylex";function p(){return d(`div`,{"aria-hidden":!0,...f.props(l.heroRing),children:[d(`svg`,{viewBox:`0 0 64 64`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,...f.props(l.heroRingSvg),children:[u(`circle`,{cx:`32`,cy:`32`,r:`28`,strokeWidth:`2`,style:{stroke:`color-mix(in oklab, var(--stridge-kit-info) 55%, transparent)`}}),u(`circle`,{cx:`32`,cy:`32`,r:`20`,style:{fill:`var(--stridge-kit-info)`}})]}),u(n,{style:{color:`var(--stridge-kit-info-foreground)`},...f.props(l.heroRingGlyph)})]})}function m(){let{close:n}=t(),m=r();return d(c,{"data-stridge-slot":`deposit-wallet-required`,"data-testid":`deposit-wallet-required`,...f.props(l.root),children:[d(o.Header,{...f.props(l.header),children:[u(s.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,children:u(e,{id:`5AApJw`,message:`Connect a wallet to continue`})}),u(a.CloseButton,{})]}),u(o.Body,{children:d(`div`,{"data-stridge-slot":`deposit-wallet-required-hero`,...f.props(l.hero),children:[u(p,{}),u(s.span,{size:`lg`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,align:`center`,...f.props(l.heroHeadline),children:u(e,{id:`BoQOH3`,message:`A wallet is required to deposit`})}),u(s.span,{size:`sm`,leading:`normal`,align:`center`,color:`subdued`,...f.props(l.heroReason),children:u(e,{id:`mF_ucv`,message:`Connect a wallet so the gateway can provision a deposit address and route your transfer.`})})]})}),d(o.Footer,{...f.props(l.footer),children:[m?u(i,{variant:`default`,size:`cta`,onClick:()=>{m.onClick()},"data-stridge-slot":`deposit-wallet-required-connect`,...f.props(l.cta),children:m.label??u(e,{id:`VHOVEJ`,message:`Connect wallet`})}):null,u(i,{variant:m?`ghost`:`default`,size:`cta`,onClick:n,"data-stridge-slot":`deposit-wallet-required-close`,...f.props(l.cta),children:u(e,{id:`yz7wBu`,message:`Close`})})]})]})}export{m as WalletRequiredState};
@@ -0,0 +1 @@
1
+ const e={root:{"WalletRequiredState__styles.root":`WalletRequiredState__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/flows/deposit/dialog/WalletRequiredState.styles.ts:25`},header:{"WalletRequiredState__styles.header":`WalletRequiredState__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/flows/deposit/dialog/WalletRequiredState.styles.ts:34`},hero:{"WalletRequiredState__styles.hero":`WalletRequiredState__styles.hero`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x883omv`,"paddingTop-kLKAdn":`x9desvi`,"paddingInline-kg3NbH":`x65v0h`,"paddingBottom-kGO01o":`x1hhzuzn`,"animationName-kKVMdj":`xv305lp`,"animationDuration-k44tkh":`xmprevt x1s1fvk8`,"animationTimingFunction-kyAemX":`xrkt6z0`,"animationFillMode-kWV6AL":`x1u6ievf`,$$css:`@stridge/kit:src/flows/deposit/dialog/WalletRequiredState.styles.ts:42`},heroRing:{"WalletRequiredState__styles.heroRing":`WalletRequiredState__styles.heroRing`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`x1fu8urw`,"height-kZKoxP":`x1peatla`,"flexShrink-kmuXW":`x2lah0s`,$$css:`@stridge/kit:src/flows/deposit/dialog/WalletRequiredState.styles.ts:64`},heroRingSvg:{"WalletRequiredState__styles.heroRingSvg":`WalletRequiredState__styles.heroRingSvg`,"display-k1xSpc":`x1lliihq`,"width-kzqmXN":`xh8yej3`,"height-kZKoxP":`x5yr21d`,$$css:`@stridge/kit:src/flows/deposit/dialog/WalletRequiredState.styles.ts:73`},heroRingGlyph:{"WalletRequiredState__styles.heroRingGlyph":`WalletRequiredState__styles.heroRingGlyph`,"position-kVAEAm":`x10l6tqk`,"insetInlineStart-kLqNvP":`xbudbmw`,"top-k87sOh":`xwa60dl`,"transform-k3aq6I":`x11lhmoz`,"width-kzqmXN":`xgd8bvy`,"height-kZKoxP":`x1fgtraw`,"strokeWidth-kfJifR":`xvlca1e`,$$css:`@stridge/kit:src/flows/deposit/dialog/WalletRequiredState.styles.ts:87`},heroHeadline:{"WalletRequiredState__styles.heroHeadline":`WalletRequiredState__styles.heroHeadline`,"marginTop-keoZOQ":`x1k70j0n`,$$css:`@stridge/kit:src/flows/deposit/dialog/WalletRequiredState.styles.ts:96`},heroReason:{"WalletRequiredState__styles.heroReason":`WalletRequiredState__styles.heroReason`,"maxWidth-ks0D6T":`x1va8c73`,$$css:`@stridge/kit:src/flows/deposit/dialog/WalletRequiredState.styles.ts:99`},footer:{"WalletRequiredState__styles.footer":`WalletRequiredState__styles.footer`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"alignItems-kGNEyG":`x1qjc9v5`,"gap-kOIVth":`x1a6yh9e`,"paddingTop-kLKAdn":`x109j2v6`,"paddingInline-kg3NbH":`x65v0h`,"paddingBottom-kGO01o":`x1t4gjm`,$$css:`@stridge/kit:src/flows/deposit/dialog/WalletRequiredState.styles.ts:107`},cta:{"WalletRequiredState__styles.cta":`WalletRequiredState__styles.cta`,"width-kzqmXN":`xh8yej3`,"alignSelf-kSGwAc":`xkh2ocl`,$$css:`@stridge/kit:src/flows/deposit/dialog/WalletRequiredState.styles.ts:116`}};export{e as styles};
@@ -40,6 +40,97 @@ interface WalletPayload {
40
40
  */
41
41
  balanceTotalUsd?: FormattedField<number>;
42
42
  }
43
+ /**
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.
49
+ */
50
+ interface OnrampMethodCapability {
51
+ /**
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.
55
+ */
56
+ limit?: FormattedField<number>;
57
+ /**
58
+ * Estimated time from confirmation to credit. `value` is seconds (`0` = instant); `formatted`
59
+ * is the localized display label the widget renders verbatim (`"Instant"`, `"5 min"`, …).
60
+ * Drivers pre-format because the kit's i18n macros do not have driver-thread access.
61
+ */
62
+ processingTime?: FormattedField<number>;
63
+ }
64
+ /**
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.
70
+ */
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
+ /** Fiat amount the user pays (USD). */
90
+ amountUsd: FormattedField<number>;
91
+ /** Crypto amount the user receives after fees. Drives the Receive chip + hero sub-line. */
92
+ receiveAmount: FormattedField<number>;
93
+ /** The crypto asset the user receives. */
94
+ receiveAsset: OnrampReceiveAssetPayload;
95
+ /** Crypto-per-fiat rate (e.g. USDC per USD). Drives the price row. */
96
+ rate: FormattedField<number>;
97
+ /** Provider processing fee (USD). Omitted when the provider doesn't surface it. */
98
+ processingFeeUsd?: FormattedField<number>;
99
+ /** Network/settlement fee (USD). Omitted when zero / unknown. */
100
+ networkFeeUsd?: FormattedField<number>;
101
+ /** Total fee charged on top of the received crypto (USD). */
102
+ totalFeeUsd: FormattedField<number>;
103
+ /** Resolved hosted-checkout provider name. */
104
+ provider?: string;
105
+ }
106
+ /**
107
+ * Lifecycle state of an onramp checkout session, mirrored 1:1 from the SDK's
108
+ * `OnrampSessionState`. The kit's reducer maps the three terminal values onto its shared
109
+ * `processing` / `success` / `error` screens.
110
+ */
111
+ type OnrampSessionStateName = "SESSION_PENDING" | "SESSION_COMPLETED" | "SESSION_EXPIRED" | "SESSION_FAILED";
112
+ /**
113
+ * Onramp checkout-session payload surfaced on `DepositSnapshot.onrampSession`. Created by
114
+ * {@link import("./types").DepositDriver.createOnrampSession} and advanced by
115
+ * {@link import("./types").DepositDriver.watchOnrampSession}. The `checkoutUrl` is the provider-hosted
116
+ * page the kit redirects (or pops out) to; `state` drives the redirect → poll → terminal UI.
117
+ */
118
+ interface OnrampSessionPayload {
119
+ /** Provider session id (UUID). */
120
+ sessionId: string;
121
+ /** Current session state. */
122
+ state: OnrampSessionStateName;
123
+ /** Provider-hosted checkout URL the user completes payment on. Present once the session is created. */
124
+ checkoutUrl?: string;
125
+ /** Provider order id, once allocated. */
126
+ providerOrderId?: string;
127
+ /** Crypto amount the user receives, captured at create time (display units). */
128
+ receiveAmount?: FormattedField<number>;
129
+ /** Failure code when `state === "SESSION_FAILED"` (e.g. `"payment_declined"`). */
130
+ failureCode?: string;
131
+ /** Session/checkout expiry timestamp (Unix-ms). */
132
+ expiresAt?: number;
133
+ }
43
134
  /**
44
135
  * Brand context surfaced across the kit's chrome — `<DialogShell>` title, `<ConfirmDeposit>`
45
136
  * destination row, `<ProcessingState>` header pill, `<SuccessState>` "credited to" line. The host
@@ -95,7 +186,13 @@ interface AssetPayload {
95
186
  */
96
187
  interface TargetPayload extends ChainPayload, AssetPayload {
97
188
  /** Optional minimum-deposit USD floor surfaced on amount-entry / asset-picker chrome. */
98
- minDepositUsd?: FormattedField<number>;
189
+ minAmountUsd?: FormattedField<number>;
190
+ /**
191
+ * Optional upper USD bound on the deposit amount. When set, the amount-entry treats
192
+ * `min(walletBalanceUsd, maxAmountUsd.value)` as the effective ceiling. Omitted when the
193
+ * host did not configure `flows.deposit.maxAmountUsd`.
194
+ */
195
+ maxAmountUsd?: FormattedField<number>;
99
196
  }
100
197
  /**
101
198
  * Per-chain deposit address provisioned by `gateway/start`. The kit ships one envelope item per
@@ -111,9 +208,9 @@ interface AddressItemPayload extends ChainPayload {
111
208
  * Per-chain minimum-deposit USD floor surfaced next to the chain row in the transfer-crypto
112
209
  * picker (`"Min $5"`). Drivers populate this from `supportedAssets`'s per-(chain × asset)
113
210
  * floors so the user sees the right number for the chain they're funding from. Optional —
114
- * the picker falls back to {@link TargetPayload.minDepositUsd} when this isn't available.
211
+ * the picker falls back to {@link TargetPayload.minAmountUsd} when this isn't available.
115
212
  */
116
- minDepositUsd?: FormattedField<number>;
213
+ minAmountUsd?: FormattedField<number>;
117
214
  /**
118
215
  * Tokens the gateway accepts on this chain (`gateway/start.deposit_addresses[i].accepted_assets`).
119
216
  * Drives the transfer-crypto Tokens dropdown — when the user picks a chain, the dropdown
@@ -140,6 +237,13 @@ interface AcceptedAssetPayload {
140
237
  assetLogoUrl?: string;
141
238
  /** True for the chain's native gas token (synthesized from an empty `address`). */
142
239
  isNative: boolean;
240
+ /**
241
+ * Estimated price impact of depositing this asset, as a percentage decimal string
242
+ * (`"0.5"`, `"1.25"`). Joined from the `gateway/assets` catalog by (chain × contract address)
243
+ * — the wire's `accepted_assets` doesn't carry it. Drives the price-impact hint on the
244
+ * transfer-crypto disclosure row. Omitted when the catalog has no estimate for this asset.
245
+ */
246
+ priceImpact?: string;
143
247
  }
144
248
  /**
145
249
  * Source-side per-asset balance — what the connected wallet holds across supported chains. Drives
@@ -154,7 +258,7 @@ interface BalanceItemPayload extends ChainPayload, AssetPayload {
154
258
  priceUsd?: number;
155
259
  /**
156
260
  * `true` when this row's USD value is below the kit's deposit floor
157
- * ({@link TargetPayload.minDepositUsd}). Drives the muted "Low Balance" badge in the asset
261
+ * ({@link TargetPayload.minAmountUsd}). Drives the muted "Low Balance" badge in the asset
158
262
  * picker; the row remains visible so the user knows the asset exists in the wallet.
159
263
  */
160
264
  lowBalance?: boolean;
@@ -339,4 +443,4 @@ interface SettlementFailurePayload {
339
443
  */
340
444
  type SettlementPayload = SettlementPendingPayload | SettlementSuccessPayload | SettlementFailurePayload;
341
445
  //#endregion
342
- export { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload };
446
+ export { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, OnrampMethodCapability, OnrampMethodsPayload, OnrampQuotePayload, OnrampReceiveAssetPayload, OnrampSessionPayload, OnrampSessionStateName, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload };
@@ -0,0 +1,2 @@
1
+ import { I18n } from "@lingui/core";
2
+ import { OnchainBalanceResponse, SupportedAssetsResponse } from "@stridge/sdk";
@@ -1 +1 @@
1
- import{parseDecimalSafe as e}from"../../../shared/transformers/parseSmallestUnit.js";import{formatTokenAmount as t}from"../../../../shared/format/formatTokenAmount.js";import{formatUsd as n}from"../../../../shared/format/formatUsd.js";function r(e){let t=new Set,n=new Set;for(let r of e.assets){let e=String(r.eip155_id);t.add(e);for(let t of r.assets)t.address&&n.add(`${e}:${t.address.toLowerCase()}`)}return{nativeChains:t,tokens:n}}function i(e,t){let n=t.routable!==void 0&&(t.routable.nativeChains.size>0||t.routable.tokens.size>0),r=[];for(let i of e.chains)for(let e of i.tokens)e.is_spam||n&&t.routable&&!o(i.eip155_id,e,t.routable)||r.push(a(i.label,i.eip155_id,i.stridge_network_id,e,t));return r.sort(s),r}function a(r,i,a,o,s){let c=e(o.amount),l=e(o.amount_usd),u=e(o.usd_price),d=s.resolveTokenIcon?.({chainId:i,tokenAddress:o.token_address,symbol:o.symbol,isNative:o.is_native})??s.logos?.(i,o.token_address,o.is_native)??o.logo??void 0,f=s.minDepositUsd!==void 0&&s.minDepositUsd>0&&l<s.minDepositUsd;return{networkId:a,networkName:r,eip155Id:String(i),symbol:o.symbol,decimals:o.decimals,address:o.token_address||`0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee`,isNative:o.is_native,...d?{assetLogoUrl:d}:{},amount:{value:c,formatted:t(c,s.i18n,{compact:!0})},...l>0?{amountUsd:{value:l,formatted:n(l,s.i18n)}}:{},...u>0?{priceUsd:u}:{},...f?{lowBalance:!0,disabled:!0}:{}}}function o(e,t,n){let r=String(e);return t.is_native?n.nativeChains.has(r):t.token_address?n.tokens.has(`${r}:${t.token_address.toLowerCase()}`):!1}function s(e,t){return(t.amountUsd?.value??0)-(e.amountUsd?.value??0)}export{i as balanceToBalancesPayload,r as buildRoutableAllowlist};
1
+ import{parseDecimalSafe as e}from"../../../shared/transformers/parseSmallestUnit.js";import{formatTokenAmount as t}from"../../../../shared/format/formatTokenAmount.js";import{formatUsd as n}from"../../../../shared/format/formatUsd.js";function r(e){let t=new Set,n=new Set;for(let r of e.assets){let e=String(r.eip155_id);t.add(e);for(let t of r.assets)t.address&&n.add(`${e}:${t.address.toLowerCase()}`)}return{nativeChains:t,tokens:n}}function i(e,t){let n=t.routable!==void 0&&(t.routable.nativeChains.size>0||t.routable.tokens.size>0),r=[];for(let i of e.chains)for(let e of i.tokens)e.is_spam||n&&t.routable&&!o(i.eip155_id,e,t.routable)||r.push(a(i.label,i.eip155_id,i.stridge_network_id,e,t));return r.sort(s),r}function a(r,i,a,o,s){let c=e(o.amount),l=e(o.amount_usd),u=e(o.usd_price),d=s.resolveTokenIcon?.({chainId:i,tokenAddress:o.token_address,symbol:o.symbol,isNative:o.is_native})??s.logos?.(i,o.token_address,o.is_native)??o.logo??void 0,f=s.minAmountUsd!==void 0&&s.minAmountUsd>0&&l<s.minAmountUsd;return{networkId:a,networkName:r,eip155Id:String(i),symbol:o.symbol,decimals:o.decimals,address:o.token_address||`0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee`,isNative:o.is_native,...d?{assetLogoUrl:d}:{},amount:{value:c,formatted:t(c,s.i18n,{compact:!0})},...l>0?{amountUsd:{value:l,formatted:n(l,s.i18n)}}:{},...u>0?{priceUsd:u}:{},...f?{lowBalance:!0,disabled:!0}:{}}}function o(e,t,n){let r=String(e);return t.is_native?n.nativeChains.has(r):t.token_address?n.tokens.has(`${r}:${t.token_address.toLowerCase()}`):!1}function s(e,t){return(t.amountUsd?.value??0)-(e.amountUsd?.value??0)}export{i as balanceToBalancesPayload,r as buildRoutableAllowlist};
@@ -0,0 +1 @@
1
+ import { SettlementPayloadContext } from "./settlementToPayload.js";
@@ -0,0 +1,2 @@
1
+ import { I18n } from "@lingui/core";
2
+ import { QuoteResponse } from "@stridge/sdk";
@@ -0,0 +1,25 @@
1
+ import { I18n } from "@lingui/core";
2
+ import { GatewaySettlementDto, GatewayUdaDto } from "@stridge/sdk";
3
+
4
+ //#region src/flows/deposit/driver/transformers/settlementToPayload.d.ts
5
+ /**
6
+ * Inputs the {@link settlementToPayload} transformer needs from the driver. The driver carries
7
+ * connected-wallet metadata and explorer info; the transformer composes the per-leg URLs and
8
+ * shortened address forms that the widget renders.
9
+ */
10
+ interface SettlementPayloadContext {
11
+ /** Lingui i18n instance — drives every formatter call. */
12
+ i18n: I18n;
13
+ /** Connected wallet's source-side metadata — name + address (full hex). */
14
+ sourceWallet: {
15
+ name?: string;
16
+ address: string;
17
+ explorerUrl?: string;
18
+ };
19
+ /** Per-EIP-155 block-explorer base URLs (e.g. `{ 1: "https://etherscan.io" }`). */
20
+ explorers?: Record<number, string>;
21
+ /** Optional brand label rendered in place of the destination address (`gateway/start.metadata.brand_name`). */
22
+ brandName?: string;
23
+ }
24
+ //#endregion
25
+ export { SettlementPayloadContext };
@@ -1 +1 @@
1
- import{classifyFailureKind as e,classifySettlementStatus as t}from"../../../shared/transformers/classifySettlementStatus.js";import{parseDecimalSafe as n,parseSmallestUnit as r}from"../../../shared/transformers/parseSmallestUnit.js";import{parseIsoMs as i}from"../../../shared/transformers/parseIsoMs.js";import"../../../shared/transformers/pickRelevantSettlement.js";import{formatDurationCompact as a}from"../../../../shared/format/formatDurationCompact.js";import{formatTimestamp as o}from"../../../../shared/format/formatTimestamp.js";import{formatTokenAmount as s}from"../../../../shared/format/formatTokenAmount.js";import{shortenAddress as c}from"../../../../shared/format/shortenAddress.js";function l(e,n,r){let i=t(e.status);return i===`completed`?d(e,n,r):i===`failed`?f(e,n,r):u(e,n,r)}function u(e,t,n){let r=e.from,a=i(r?.confirmed_at)??i(e.created_at),l=i(r?.confirmed_at)??i(e.created_at)??Date.now(),u=m(e.to,t.destination.asset_decimals);return{kind:`pending`,sourceWallet:p(n),creditedAsset:{symbol:t.destination.asset_symbol,decimals:t.destination.asset_decimals,address:t.destination.asset_address??``,isNative:!t.destination.asset_address},creditedTo:n.brandName??t.destination.address,...r?.tx_id?{txHash:{value:r.tx_id,formatted:c(r.tx_id)},...h(r,n,r.tx_id)?{txExplorerUrl:h(r,n,r.tx_id)}:{}}:{},...a===void 0?{}:{detectedAt:{value:a,formatted:o(a,n.i18n)}},submittedAt:{value:l,formatted:o(l,n.i18n)},receiveAmount:{value:u,formatted:s(u,n.i18n,{maxDecimals:t.destination.asset_decimals})}}}function d(e,t,n){let r=e.from,l=e.to,u=i(r?.confirmed_at)??i(e.created_at)??Date.now(),d=i(l?.settled_at)??i(e.updated_at)??Date.now(),f=Math.max(0,d-u),_=m(l,t.destination.asset_decimals),v=t.destination.address;return{kind:`succeeded`,sourceWallet:p(n),destination:{...n.brandName?{name:n.brandName}:{},address:{value:v,formatted:c(v)}},creditedAsset:{symbol:t.destination.asset_symbol,decimals:t.destination.asset_decimals,address:t.destination.asset_address??``,isNative:!t.destination.asset_address},receiveAmount:{value:_,formatted:s(_,n.i18n,{maxDecimals:t.destination.asset_decimals})},routeHops:g(e),totalTime:{value:f,formatted:a(f,n.i18n)},...r?.tx_id?{depositTx:{hash:{value:r.tx_id,formatted:c(r.tx_id)},...h(r,n,r.tx_id)?{explorerUrl:h(r,n,r.tx_id)}:{}}}:{depositTx:{hash:{value:``,formatted:``}}},...l?.tx_id?{completionTx:{hash:{value:l.tx_id,formatted:c(l.tx_id)},...h(l,n,l.tx_id)?{explorerUrl:h(l,n,l.tx_id)}:{}}}:{},submittedAt:{value:u,formatted:o(u,n.i18n)},filledAt:{value:d,formatted:o(d,n.i18n)}}}function f(t,n,r){let a=t.from,l=i(a?.confirmed_at)??i(t.created_at)??Date.now(),u=i(t.updated_at)??Date.now(),d=a?.tx_id??``,f=n.destination.address;return{kind:`failed`,failureKind:e(t.error),sourceWallet:p(r),destination:{...r.brandName?{name:r.brandName}:{},address:{value:f,formatted:c(f)}},creditedAsset:{symbol:n.destination.asset_symbol,decimals:n.destination.asset_decimals,address:n.destination.asset_address??``,isNative:!n.destination.asset_address},receiveAmount:{value:0,formatted:s(0,r.i18n)},txHash:{value:d,formatted:d?c(d):``},...h(a,r,d)?{txExplorerUrl:h(a,r,d)}:{},submittedAt:{value:l,formatted:o(l,r.i18n)},failedAt:{value:u,formatted:o(u,r.i18n)}}}function p(e){return{...e.sourceWallet.name?{name:e.sourceWallet.name}:{},address:{value:e.sourceWallet.address,formatted:c(e.sourceWallet.address)},...e.sourceWallet.explorerUrl?{explorerUrl:e.sourceWallet.explorerUrl}:{}}}function m(e,t){if(!e)return 0;if(e.amount){let t=n(e.amount);if(t>0)return t}return e.raw_amount?r(e.raw_amount,t):0}function h(e,t,n){if(!e||!n)return;let r=e.eip155_id===void 0?void 0:Number(e.eip155_id);if(r===void 0||!t.explorers)return;let i=t.explorers[r];if(i)return`${i.replace(/\/+$/,``)}/tx/${n}`}function g(e){let t=e.from,n=e.to,r=e.route?.provider??``,i=[];return t?.eip155_id!==void 0&&i.push({provider:r,chainId:Number(t.eip155_id)}),n?.eip155_id!==void 0&&n.eip155_id!==t?.eip155_id&&i.push({provider:r,chainId:Number(n.eip155_id)}),i}export{l as settlementToPayload};
1
+ import{classifyFailureKind as e,classifySettlementStatus as t}from"../../../shared/transformers/classifySettlementStatus.js";import{parseDecimalSafe as n,parseSmallestUnit as r}from"../../../shared/transformers/parseSmallestUnit.js";import{parseIsoMs as i}from"../../../shared/transformers/parseIsoMs.js";import"../../../shared/transformers/pickRelevantSettlement.js";import{formatDurationCompact as a}from"../../../../shared/format/formatDurationCompact.js";import{formatTimestamp as o}from"../../../../shared/format/formatTimestamp.js";import{formatTokenAmount as s}from"../../../../shared/format/formatTokenAmount.js";import{shortenAddress as c}from"../../../../shared/format/shortenAddress.js";function l(e,n,r){let i=t(e.status);return i===`completed`?d(e,n,r):i===`failed`?f(e,n,r):u(e,n,r)}function u(e,t,n){let r=e.from,a=i(r?.confirmed_at)??i(e.created_at),l=i(r?.confirmed_at)??i(e.created_at)??Date.now(),u=m(e.to,t.destination.asset_decimals);return{kind:`pending`,sourceWallet:p(n),creditedAsset:{symbol:t.destination.asset_symbol,decimals:t.destination.asset_decimals,address:t.destination.asset_address??``,isNative:!t.destination.asset_address},creditedTo:n.brandName??c(t.destination.address),...r?.tx_id?{txHash:{value:r.tx_id,formatted:c(r.tx_id)},...h(r,n,r.tx_id)?{txExplorerUrl:h(r,n,r.tx_id)}:{}}:{},...a===void 0?{}:{detectedAt:{value:a,formatted:o(a,n.i18n)}},submittedAt:{value:l,formatted:o(l,n.i18n)},receiveAmount:{value:u,formatted:s(u,n.i18n,{maxDecimals:t.destination.asset_decimals})}}}function d(e,t,n){let r=e.from,l=e.to,u=i(r?.confirmed_at)??i(e.created_at)??Date.now(),d=i(l?.settled_at)??i(e.updated_at)??Date.now(),f=Math.max(0,d-u),_=m(l,t.destination.asset_decimals),v=t.destination.address;return{kind:`succeeded`,sourceWallet:p(n),destination:{...n.brandName?{name:n.brandName}:{},address:{value:v,formatted:c(v)}},creditedAsset:{symbol:t.destination.asset_symbol,decimals:t.destination.asset_decimals,address:t.destination.asset_address??``,isNative:!t.destination.asset_address},receiveAmount:{value:_,formatted:s(_,n.i18n,{maxDecimals:t.destination.asset_decimals})},routeHops:g(e),totalTime:{value:f,formatted:a(f,n.i18n)},...r?.tx_id?{depositTx:{hash:{value:r.tx_id,formatted:c(r.tx_id)},...h(r,n,r.tx_id)?{explorerUrl:h(r,n,r.tx_id)}:{}}}:{depositTx:{hash:{value:``,formatted:``}}},...l?.tx_id?{completionTx:{hash:{value:l.tx_id,formatted:c(l.tx_id)},...h(l,n,l.tx_id)?{explorerUrl:h(l,n,l.tx_id)}:{}}}:{},submittedAt:{value:u,formatted:o(u,n.i18n)},filledAt:{value:d,formatted:o(d,n.i18n)}}}function f(t,n,r){let a=t.from,l=i(a?.confirmed_at)??i(t.created_at)??Date.now(),u=i(t.updated_at)??Date.now(),d=a?.tx_id??``,f=n.destination.address;return{kind:`failed`,failureKind:e(t.error),sourceWallet:p(r),destination:{...r.brandName?{name:r.brandName}:{},address:{value:f,formatted:c(f)}},creditedAsset:{symbol:n.destination.asset_symbol,decimals:n.destination.asset_decimals,address:n.destination.asset_address??``,isNative:!n.destination.asset_address},receiveAmount:{value:0,formatted:s(0,r.i18n)},txHash:{value:d,formatted:d?c(d):``},...h(a,r,d)?{txExplorerUrl:h(a,r,d)}:{},submittedAt:{value:l,formatted:o(l,r.i18n)},failedAt:{value:u,formatted:o(u,r.i18n)}}}function p(e){return{...e.sourceWallet.name?{name:e.sourceWallet.name}:{},address:{value:e.sourceWallet.address,formatted:c(e.sourceWallet.address)},...e.sourceWallet.explorerUrl?{explorerUrl:e.sourceWallet.explorerUrl}:{}}}function m(e,t){if(!e)return 0;if(e.amount){let t=n(e.amount);if(t>0)return t}return e.raw_amount?r(e.raw_amount,t):0}function h(e,t,n){if(!e||!n)return;let r=e.eip155_id===void 0?void 0:Number(e.eip155_id);if(r===void 0||!t.explorers)return;let i=t.explorers[r];if(i)return`${i.replace(/\/+$/,``)}/tx/${n}`}function g(e){let t=e.from,n=e.to,r=e.route?.provider??``,i=[];return t?.eip155_id!==void 0&&i.push({provider:r,chainId:Number(t.eip155_id)}),n?.eip155_id!==void 0&&n.eip155_id!==t?.eip155_id&&i.push({provider:r,chainId:Number(n.eip155_id)}),i}export{l as settlementToPayload};
@@ -0,0 +1,2 @@
1
+ import { I18n } from "@lingui/core";
2
+ import { DepositAddressDto } from "@stridge/sdk";
@@ -1 +1 @@
1
- import{formatNetworkName as e}from"../../../../shared/format/formatNetworkName.js";import{formatUsd as t}from"../../../../shared/format/formatUsd.js";import{shortenAddress as n}from"../../../../shared/format/shortenAddress.js";const r=new Set([11155111,5,80001,80002,84532,421614,11155420,97]);function i(i,o={}){let s=o.includeTestnets??!1;return i.flatMap(i=>{let c=String(i.eip155_id??``),l=Number(c);if(!s&&Number.isFinite(l)&&r.has(l))return[];let u=o.explorers?.[l],d=o.i18n&&c?o.minDepositUsdByEip155Id?.[c]:void 0,f=a(i.accepted_assets,c?o.nativeAssetByEip155Id?.[c]:void 0);return[{networkName:e(i.network_name??``),...c?{eip155Id:c}:{},...o.chainLogos?.[c]?{chainLogoUrl:o.chainLogos[c]}:{},address:{value:i.address,formatted:n(i.address)},...u?{explorerUrl:`${u.replace(/\/+$/,``)}/address/${i.address}`}:{},...d!==void 0&&o.i18n?{minDepositUsd:{value:d,formatted:t(d,o.i18n)}}:{},...f.length>0?{acceptedAssets:f}:{}}]})}function a(e,t){let n=Array.isArray(e)?e.map(o):[];return!t||new Set(n.map(e=>e.symbol.toUpperCase())).has(t.symbol.toUpperCase())?n:[t,...n]}function o(e){let t=e.logo,n=!e.address;return{symbol:e.symbol,address:e.address,decimals:e.decimals,...typeof t==`string`&&t.length>0?{assetLogoUrl:t}:{},isNative:n}}export{i as startToAddressesPayload};
1
+ import{KNOWN_TESTNET_EIP155_IDS as e}from"../../../shared/transformers/testnets.js";import{formatNetworkName as t}from"../../../../shared/format/formatNetworkName.js";import{formatUsd as n}from"../../../../shared/format/formatUsd.js";import{shortenAddress as r}from"../../../../shared/format/shortenAddress.js";function i(i,o={}){let s=o.includeTestnets??!1;return i.flatMap(i=>{let c=String(i.eip155_id??``),l=Number(c);if(!s&&Number.isFinite(l)&&e.has(l))return[];let u=o.explorers?.[l],d=o.i18n&&c?o.minAmountUsdByEip155Id?.[c]:void 0,f=a(i.accepted_assets,c?o.nativeAssetByEip155Id?.[c]:void 0,c?o.priceImpactByEip155Id?.[c]:void 0);return[{networkName:t(i.network_name??``),...c?{eip155Id:c}:{},...o.chainLogos?.[c]?{chainLogoUrl:o.chainLogos[c]}:{},address:{value:i.address,formatted:r(i.address)},...u?{explorerUrl:`${u.replace(/\/+$/,``)}/address/${i.address}`}:{},...d!==void 0&&o.i18n?{minAmountUsd:{value:d,formatted:n(d,o.i18n)}}:{},...f.length>0?{acceptedAssets:f}:{}}]})}function a(e,t,n){let r=Array.isArray(e)?e.map(e=>o(e,n)):[];if(!t)return r;let i=r.findIndex(e=>e.symbol.toUpperCase()===t.symbol.toUpperCase());if(i>=0){let e=r[i];return e&&!e.priceImpact&&t.priceImpact&&(r[i]={...e,priceImpact:t.priceImpact}),r}return[t,...r]}function o(e,t){let n=e.logo,r=!e.address,i=e.address?t?.[e.address.toLowerCase()]:void 0;return{symbol:e.symbol,address:e.address,decimals:e.decimals,...typeof n==`string`&&n.length>0?{assetLogoUrl:n}:{},isNative:r,...i?{priceImpact:i}:{}}}export{i as startToAddressesPayload};
@@ -0,0 +1 @@
1
+ import { GatewayStartResponse } from "@stridge/sdk";
@@ -0,0 +1,2 @@
1
+ import { I18n } from "@lingui/core";
2
+ import { SupportedAssetsResponse } from "@stridge/sdk";
@@ -1 +1 @@
1
- import{formatNetworkName as e}from"../../../../shared/format/formatNetworkName.js";import{formatUsd as t}from"../../../../shared/format/formatUsd.js";function n(n,r){let i=n.assets.find(e=>String(e.network_id)===r.networkId);if(!i)return;let a=i.assets.find(e=>e.symbol.toUpperCase()===r.assetSymbol.toUpperCase());if(!a)return;let o=i.native_currency?.logo;return{networkId:r.networkId,networkName:e(i.network_name),eip155Id:String(i.eip155_id),...o?{chainLogoUrl:o}:{},symbol:a.symbol,decimals:a.decimals,address:a.address??``,isNative:!a.address,...a.logo?{assetLogoUrl:a.logo}:{},...r.minDepositUsd===void 0?{}:{minDepositUsd:{value:r.minDepositUsd,formatted:t(r.minDepositUsd,r.i18n)}}}}export{n as startToTargetPayload};
1
+ import{formatNetworkName as e}from"../../../../shared/format/formatNetworkName.js";import{formatUsd as t}from"../../../../shared/format/formatUsd.js";function n(n,r){let i=n.assets.find(e=>String(e.network_id)===r.networkId);if(!i)return;let a=i.assets.find(e=>e.symbol.toUpperCase()===r.assetSymbol.toUpperCase());if(!a)return;let o=i.native_currency?.logo;return{networkId:r.networkId,networkName:e(i.network_name),eip155Id:String(i.eip155_id),...o?{chainLogoUrl:o}:{},symbol:a.symbol,decimals:a.decimals,address:a.address??``,isNative:!a.address,...a.logo?{assetLogoUrl:a.logo}:{},...r.minAmountUsd===void 0?{}:{minAmountUsd:{value:r.minAmountUsd,formatted:t(r.minAmountUsd,r.i18n)}},...r.maxAmountUsd===void 0?{}:{maxAmountUsd:{value:r.maxAmountUsd,formatted:t(r.maxAmountUsd,r.i18n)}}}}export{n as startToTargetPayload};
@@ -1,6 +1,6 @@
1
1
  import { Entity, SettlementFailureKind, TxRef } from "../../../shared/driver/types.js";
2
- import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload } from "./payloads.js";
3
- import { DepositAddressDto, GatewayPollResponse, GatewaySettlementDto, GatewayStartResponse, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
2
+ import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, OnrampMethodCapability, OnrampMethodsPayload, 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, OnrampQuoteResponse, OnrampSessionResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
4
4
 
5
5
  //#region src/flows/deposit/driver/types.d.ts
6
6
  /**
@@ -39,7 +39,7 @@ interface DepositSnapshot {
39
39
  * the payload (`pending` / `succeeded` / `failed`) drives whether `<ProcessingState>`,
40
40
  * `<SuccessState>`, or `<ErrorState>` is shown.
41
41
  */
42
- settlement: Entity<SettlementPayload, GatewaySettlementDto, GatewayPollResponse>;
42
+ settlement: Entity<SettlementPayload, GatewaySettlementDto, GatewayUdaDto>;
43
43
  /**
44
44
  * Connected-wallet identity. `idle` when no wallet is connected; `ready` once the host has
45
45
  * supplied an address. The `payload.address.formatted` field is the canonical
@@ -47,6 +47,27 @@ interface DepositSnapshot {
47
47
  * settlement (deposit-method tile, amount-entry source pill, banner disconnected-state copy).
48
48
  */
49
49
  wallet: Entity<WalletPayload, WalletInfo, WalletInfo>;
50
+ /**
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
+ */
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>;
50
71
  }
51
72
  /**
52
73
  * Input to {@link DepositDriver.requestQuote}.
@@ -80,6 +101,29 @@ interface SubmitDepositInput {
80
101
  /** Send amount in display units. */
81
102
  amount: number;
82
103
  }
104
+ /**
105
+ * Input to {@link DepositDriver.requestOnrampQuote}. The fiat side is all the backend needs — the
106
+ * receive crypto is derived from the tenant's deposit preferences. The onramp rail is single-method
107
+ * (the provider's hosted checkout collects the payment instrument), so there is no method selector.
108
+ */
109
+ interface RequestOnrampQuoteInput {
110
+ /** Fiat amount the user wants to spend (display units, e.g. dollars). */
111
+ amount: number;
112
+ }
113
+ /**
114
+ * Input to {@link DepositDriver.createOnrampSession}. Binds the priced amount to a provider checkout.
115
+ */
116
+ interface CreateOnrampSessionInput {
117
+ /** Fiat amount to charge (display units). */
118
+ amount: number;
119
+ }
120
+ /**
121
+ * Input to {@link DepositDriver.watchOnrampSession}. Scopes the poll to a single created session.
122
+ */
123
+ interface WatchOnrampSessionInput {
124
+ /** The session id returned by {@link DepositDriver.createOnrampSession}. */
125
+ sessionId: string;
126
+ }
83
127
  /**
84
128
  * Input to {@link DepositDriver.watchSourceTx}. Path B — kit waits for an inbound transfer to the
85
129
  * deposit address.
@@ -107,7 +151,7 @@ type FetchActiveSettlementInput = Record<string, never>;
107
151
  interface SettlementSnapshot {
108
152
  payload: SettlementPayload;
109
153
  raw: GatewaySettlementDto;
110
- response: GatewayPollResponse;
154
+ response: GatewayUdaDto;
111
155
  }
112
156
  /**
113
157
  * Unified driver contract. A `DepositDriver` is the single host-supplied source of both reactive
@@ -139,6 +183,17 @@ interface DepositDriver {
139
183
  getSnapshot(): DepositSnapshot;
140
184
  /** Lets you subscribe to entity transitions outside React (analytics, headless integrations). */
141
185
  subscribe(listener: () => void): () => void;
186
+ /**
187
+ * Idempotent bootstrap trigger. The kit calls this from `useDeposit().open()` and the
188
+ * headless `usePrefetchDeposit()` hook. First call kicks off any deferred network work
189
+ * (`gateway/start`, `supportedAssets`, the initial `balance/onchain` fetch); subsequent
190
+ * calls are no-ops while bootstrap is in flight or completed.
191
+ *
192
+ * BYO drivers that bootstrap eagerly can implement this as a no-op — the contract is "after
193
+ * `arm()` returns, the driver's entities are either already populated or will populate as
194
+ * soon as the first network round-trips land".
195
+ */
196
+ arm(): void;
142
197
  /**
143
198
  * Fetches a fresh quote for `input` and updates the `quote` entity through its lifecycle
144
199
  * (`idle | loading → ready | error`). The optional `signal` cancels in-flight work.
@@ -154,6 +209,19 @@ interface DepositDriver {
154
209
  * — when omitted, the asset-picker hides its USD-balance overlay.
155
210
  */
156
211
  watchBalances?(input: Record<string, never>, listener: (entity: DepositSnapshot["balances"]) => void, signal: AbortSignal): void;
212
+ /**
213
+ * Invalidate any cached `balances` and force the driver to fetch fresh on its next tick. The
214
+ * orchestrator calls this after `submitDeposit` resolves and on every `settlement` kind
215
+ * transition (`pending` / `succeeded` / `failed`) so the user never advances on stale
216
+ * source-chain balance numbers — the `balance/onchain` SWR window otherwise hides the
217
+ * just-sent funds until it elapses.
218
+ *
219
+ * Drivers that do not cache balances (no SWR layer, no in-memory snapshot) can omit this; the
220
+ * kit calls it via optional chaining. When implemented, drivers should both invalidate the
221
+ * cache stamp and kick off an immediate refetch so `useDepositSnapshot().balances` reflects
222
+ * post-deposit reality without waiting for the next scheduled watcher tick.
223
+ */
224
+ invalidateBalances?(): void;
157
225
  /**
158
226
  * Path B watcher — observes the deposit address until an inbound source-chain tx is detected,
159
227
  * then fires the listener with the {@link TxRef}. Optional — when omitted, the orchestrator
@@ -172,6 +240,25 @@ interface DepositDriver {
172
240
  * method picker.
173
241
  */
174
242
  fetchActiveSettlement?(input: FetchActiveSettlementInput, signal: AbortSignal): Promise<SettlementSnapshot | null>;
243
+ /**
244
+ * Onramp rail — fetches a fiat→crypto quote and updates the `onrampQuote` entity through its
245
+ * lifecycle (`idle | loading → ready | error`). Optional: drivers without an onramp backend
246
+ * omit it, and the onramp amount-entry falls back to its empty-quote surface. Mirrors
247
+ * {@link requestQuote} for the fiat side.
248
+ */
249
+ requestOnrampQuote?(input: RequestOnrampQuoteInput, signal: AbortSignal): Promise<void>;
250
+ /**
251
+ * Onramp rail — binds the priced amount to a provider checkout session, populates the
252
+ * `onrampSession` entity, and resolves with the created session (carrying `checkoutUrl`). The kit
253
+ * opens `checkoutUrl` in a new tab, then calls {@link watchOnrampSession} to poll. Optional.
254
+ */
255
+ createOnrampSession?(input: CreateOnrampSessionInput, signal: AbortSignal): Promise<OnrampSessionPayload>;
256
+ /**
257
+ * Onramp rail — polls a created session until it reaches a terminal state, firing the listener on
258
+ * every transition (the kit maps `SESSION_COMPLETED` / `SESSION_EXPIRED` / `SESSION_FAILED` onto
259
+ * its shared success / error screens). Mirrors {@link watchSettlement}. Optional.
260
+ */
261
+ watchOnrampSession?(input: WatchOnrampSessionInput, listener: (entity: DepositSnapshot["onrampSession"]) => void, signal: AbortSignal): void;
175
262
  }
176
263
  //#endregion
177
- export { DepositDriver, DepositSnapshot, FetchActiveSettlementInput, RequestQuoteInput, SettlementSnapshot, SubmitDepositInput, WatchSettlementInput, WatchSourceTxInput };
264
+ export { CreateOnrampSessionInput, DepositDriver, DepositSnapshot, FetchActiveSettlementInput, RequestOnrampQuoteInput, RequestQuoteInput, SettlementSnapshot, SubmitDepositInput, WatchOnrampSessionInput, WatchSettlementInput, WatchSourceTxInput };