@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 +1 @@
1
- "use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{CopyIcon as t}from"../../../../../../shared/icons/CopyIcon.js";import{InfoIcon as n}from"../../../../../../shared/icons/InfoIcon.js";import"../../../../../../icons/index.js";import{Button as r}from"../../../../../../shared/ui/Button/Button.js";import"../../../../../../shared/ui/Button/index.js";import{Card as i}from"../../../../../../shared/ui/Card/Card.js";import{ExternalLink as a}from"../../../../../../shared/ui/ExternalLink/ExternalLink.js";import"../../../../../../shared/ui/ExternalLink/index.js";import{text as o}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{BRAND_LINKS as s}from"../../../../../../shared/constants/brand-links.js";import{useCopyToClipboard as c}from"../../../../../../shared/utils/useCopyToClipboard.js";import{useTransferCryptoContext as l}from"../context.js";import{TRANSFER_CRYPTO_SLOTS as u}from"../TransferCrypto.slots.js";import{styles as d}from"../TransferCrypto.styles.js";import{InfoTooltip as f}from"./InfoTooltip.js";import{useCallback as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";import*as g from"@stylexjs/stylex";function _(){let _=l(`TransferCrypto.Address`),{_:v}=e(),{isCopied:y,copy:b}=c(_.depositAddress),x=v({id:`6D8qH6`,message:`Send the selected token on the selected chain to this address. Funds appear in your account once the network confirms the transfer.`}),S=p(async()=>{await b()&&_.onCopy?.(_.depositAddress)},[b,_]);return h(`div`,{"data-stridge-slot":u.address,...g.props(d.addressSection),children:[h(`div`,{...g.props(d.addressLabelRow),children:[h(o.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,...g.props(d.addressLabel),children:[v({id:`pCzTTC`,message:`Your deposit address`}),m(f,{content:x,children:m(n,{"aria-hidden":!0,...g.props(d.addressLabelInfo)})})]}),m(a,{href:s.terms,...g.props(d.termsLink),children:m(o.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:v({id:`cGYrpE`,message:`Terms apply`})})})]}),h(i,{variant:`subdued`,dir:`ltr`,...g.props(d.addressPill),children:[m(o.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,tracking:`normal`,font:`mono`,...g.props(d.addressText),children:_.depositAddress}),h(r,{variant:`secondary`,onClick:S,"aria-label":v({id:`SOVBoe`,message:`Copy deposit address`}),...g.props(d.copyButton),children:[m(t,{"aria-hidden":!0,...g.props(d.copyIcon)}),m(o.span,{size:`meta`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:`inherit`,children:v(y?{id:`PiH3UR`,message:`Copied!`}:{id:`he3ygx`,message:`Copy`})})]})]})]})}export{_ as TransferCryptoAddress};
1
+ "use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{CopyIcon as t}from"../../../../../../shared/icons/CopyIcon.js";import{InfoIcon as n}from"../../../../../../shared/icons/InfoIcon.js";import"../../../../../../icons/index.js";import{Button as r}from"../../../../../../shared/ui/Button/Button.js";import"../../../../../../shared/ui/Button/index.js";import{Card as i}from"../../../../../../shared/ui/Card/Card.js";import{text as a}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{TermsLink as o}from"../../../../../../shared/terms/TermsLink.js";import"../../../../../../shared/terms/index.js";import{useCopyToClipboard as s}from"../../../../../../shared/utils/useCopyToClipboard.js";import{useTransferCryptoContext as c}from"../context.js";import{TRANSFER_CRYPTO_SLOTS as l}from"../TransferCrypto.slots.js";import{styles as u}from"../TransferCrypto.styles.js";import{InfoTooltip as d}from"./InfoTooltip.js";import{useCallback as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import*as h from"@stylexjs/stylex";function g(){let g=c(`TransferCrypto.Address`),{_}=e(),{isCopied:v,copy:y}=s(g.depositAddress),b=_({id:`6D8qH6`,message:`Send the selected token on the selected chain to this address. Funds appear in your account once the network confirms the transfer.`}),x=f(async()=>{await y()&&g.onCopy?.(g.depositAddress)},[y,g]);return m(`div`,{"data-stridge-slot":l.address,...h.props(u.addressSection),children:[m(`div`,{...h.props(u.addressLabelRow),children:[m(a.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,...h.props(u.addressLabel),children:[_({id:`pCzTTC`,message:`Your deposit address`}),p(d,{content:b,children:p(n,{"aria-hidden":!0,...h.props(u.addressLabelInfo)})})]}),p(o,{...h.props(u.termsLink),children:p(a.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:_({id:`cGYrpE`,message:`Terms apply`})})})]}),m(i,{variant:`subdued`,dir:`ltr`,...h.props(u.addressPill),children:[p(a.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,tracking:`normal`,font:`mono`,"data-stridge-selectable":``,...h.props(u.addressText),children:g.depositAddress}),m(r,{variant:`secondary`,onClick:x,"aria-label":_({id:`SOVBoe`,message:`Copy deposit address`}),...h.props(u.copyButton),children:[p(t,{"aria-hidden":!0,...h.props(u.copyIcon)}),p(a.span,{size:`meta`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,color:`inherit`,children:_(v?{id:`PiH3UR`,message:`Copied!`}:{id:`he3ygx`,message:`Copy`})})]})]})]})}export{g as TransferCryptoAddress};
@@ -5,13 +5,16 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
5
  /**
6
6
  * Disclosure part — collapsible footer surfacing the rough processing-time
7
7
  * hint as the trigger and the "Have questions?" help row inside the panel.
8
- * The help row always renders and links to {@link BRAND_LINKS.support}.
8
+ * The trigger also carries the selected token's price-impact hint when the
9
+ * gateway supplies one. The help row always renders and opens the Stridge
10
+ * messenger via {@link SupportLink}.
9
11
  */
10
12
  declare function TransferCryptoDisclosure({
11
13
  defaultOpen,
12
14
  open,
13
15
  onOpenChange,
14
- processingTime
16
+ processingTime,
17
+ priceImpact
15
18
  }: TransferCryptoDisclosureProps): _$react_jsx_runtime0.JSX.Element;
16
19
  //#endregion
17
20
  export { TransferCryptoDisclosure };
@@ -1 +1 @@
1
- "use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ChevronDownIcon as t}from"../../../../../../shared/icons/ChevronDownIcon.js";import{CircleHelpIcon as n}from"../../../../../../shared/icons/CircleHelpIcon.js";import{ClockIcon as r}from"../../../../../../shared/icons/ClockIcon.js";import"../../../../../../icons/index.js";import{Card as i}from"../../../../../../shared/ui/Card/Card.js";import{Collapsible as a}from"../../../../../../shared/ui/Collapsible/Collapsible.js";import"../../../../../../shared/ui/Collapsible/index.js";import{ExternalLink as o}from"../../../../../../shared/ui/ExternalLink/ExternalLink.js";import"../../../../../../shared/ui/ExternalLink/index.js";import{text as s}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{BRAND_LINKS as c}from"../../../../../../shared/constants/brand-links.js";import{TRANSFER_CRYPTO_SLOTS as l}from"../TransferCrypto.slots.js";import{styles as u}from"../TransferCrypto.styles.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";function m({defaultOpen:m=!1,open:h,onOpenChange:g,processingTime:_}){let{_:v}=e(),y=_??v({id:`KuqCAK`,message:`~ 2 min`});return f(a,{"data-stridge-slot":l.disclosure,defaultOpen:m,open:h,onOpenChange:g,render:d(i,{variant:`subdued`}),...p.props(u.disclosure),children:[f(a.Trigger,{render:d(`div`,{}),nativeButton:!1,...p.props(u.disclosureHeader),children:[d(r,{"aria-hidden":!0,...p.props(u.disclosureRowIcon)}),d(`div`,{...p.props(u.disclosureRowTextWithInfo),children:d(s.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,children:v({id:`7evBec`,message:`Processing time: {resolvedProcessingTime}`,values:{resolvedProcessingTime:y}})})}),d(t,{"aria-hidden":!0,...p.props(u.disclosureChevron,u.disclosureHeaderChevron)})]}),d(a.Panel,{children:d(`div`,{...p.props(u.disclosurePanelInner),children:f(`div`,{...p.props(u.disclosureRow),children:[d(n,{"aria-hidden":!0,...p.props(u.disclosureRowIcon)}),f(`div`,{children:[d(s.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,...p.props(u.helpQuestion),children:v({id:`QU2cIs`,message:`Have questions?`})}),d(o,{href:c.support,...p.props(u.helpLink),children:d(s.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:v({id:`AWtGgd`,message:`Get help`})})})]})]})})})]})}export{m as TransferCryptoDisclosure};
1
+ "use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ChevronDownIcon as t}from"../../../../../../shared/icons/ChevronDownIcon.js";import{CircleHelpIcon as n}from"../../../../../../shared/icons/CircleHelpIcon.js";import{ClockIcon as r}from"../../../../../../shared/icons/ClockIcon.js";import"../../../../../../icons/index.js";import{SupportLink as i}from"../../../../../../shared/support/SupportLink.js";import"../../../../../../shared/support/index.js";import{Card as a}from"../../../../../../shared/ui/Card/Card.js";import{Collapsible as o}from"../../../../../../shared/ui/Collapsible/Collapsible.js";import"../../../../../../shared/ui/Collapsible/index.js";import{text as s}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{useTransferCryptoContext as c}from"../context.js";import{TRANSFER_CRYPTO_SLOTS as l}from"../TransferCrypto.slots.js";import{styles as u}from"../TransferCrypto.styles.js";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import*as m from"@stylexjs/stylex";function h({defaultOpen:h=!1,open:g,onOpenChange:_,processingTime:v,priceImpact:y}){let{_:b}=e(),x=c(`TransferCrypto.Disclosure`),S=v??b({id:`KuqCAK`,message:`~ 2 min`}),C=y??x.token.priceImpact;return p(o,{"data-stridge-slot":l.disclosure,defaultOpen:h,open:g,onOpenChange:_,render:f(a,{variant:`subdued`}),...m.props(u.disclosure),children:[p(o.Trigger,{render:f(`div`,{}),nativeButton:!1,...m.props(u.disclosureHeader),children:[f(r,{"aria-hidden":!0,...m.props(u.disclosureRowIcon)}),p(`div`,{...m.props(u.disclosureRowTextWithInfo),children:[f(s.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,children:b({id:`7evBec`,message:`Processing time: {resolvedProcessingTime}`,values:{resolvedProcessingTime:S}})}),C?p(d,{children:[f(s.span,{size:`meta`,leading:`tight`,color:`subdued`,"aria-hidden":!0,children:`·`}),f(s.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,color:`subdued`,children:b({id:`yLEjmm`,message:`{resolvedPriceImpact}% price impact`,values:{resolvedPriceImpact:C}})})]}):null]}),f(t,{"aria-hidden":!0,...m.props(u.disclosureChevron,u.disclosureHeaderChevron)})]}),f(o.Panel,{children:f(`div`,{...m.props(u.disclosurePanelInner),children:p(`div`,{...m.props(u.disclosureRow),children:[f(n,{"aria-hidden":!0,...m.props(u.disclosureRowIcon)}),p(`div`,{children:[f(s.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,...m.props(u.helpQuestion),children:b({id:`QU2cIs`,message:`Have questions?`})}),f(i,{...m.props(u.helpLink),children:f(s.span,{size:`meta`,fontWeight:`medium`,leading:`tight`,color:`inherit`,children:b({id:`AWtGgd`,message:`Get help`})})})]})]})})})]})}export{h as TransferCryptoDisclosure};
@@ -6,6 +6,12 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
6
  * Header part — back button and title. `Dialog.CloseButton` renders as
7
7
  * the trailing flex child only when the widget is mounted inside
8
8
  * `Dialog.Content`.
9
+ *
10
+ * Activity trigger — when the host mounts the standalone {@link ActivityDriver}, an
11
+ * `<ActivityTrigger>` button renders next to the close X and opens the cross-flow activity
12
+ * surface. Q4=(D) — activity is owned by the standalone driver; the icon hides gracefully when
13
+ * the host opts out. The steps router only mounts this header on `transferCrypto`, so no
14
+ * additional FSM-state gating is needed.
9
15
  */
10
16
  declare function TransferCryptoHeader({
11
17
  onBack,
@@ -1 +1 @@
1
- "use client";import{useLingui as e}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{ChevronLeftIcon as t}from"../../../../../../shared/icons/ChevronLeftIcon.js";import"../../../../../../icons/index.js";import{IconButton as n}from"../../../../../../shared/ui/IconButton/IconButton.js";import{Dialog as r}from"../../../../../../shared/ui/Dialog/Dialog.js";import"../../../../../../shared/ui/Dialog/index.js";import{Card as i}from"../../../../../../shared/ui/Card/Card.js";import{text as a}from"../../../../../../shared/ui/Text/Text.js";import"../../../../../../ui/index.js";import{TRANSFER_CRYPTO_SLOTS as o}from"../TransferCrypto.slots.js";import{styles as s}from"../TransferCrypto.styles.js";import{jsx as c,jsxs as l}from"react/jsx-runtime";import*as u from"@stylexjs/stylex";function d({onBack:d,title:f}){let{_:p}=e(),m=f??p({id:`3dqPLT`,message:`Transfer Crypto`});return l(i.Header,{"data-stridge-slot":o.header,...u.props(s.header),children:[l(`div`,{...u.props(s.headerLeft),children:[typeof d==`function`?c(n,{"aria-label":p({id:`iH8pgl`,message:`Back`}),onClick:d,children:c(t,{"aria-hidden":!0,...u.props(s.backIcon)})}):null,c(a.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,style:{margin:0},children:m})]}),c(r.CloseButton,{})]})}export{d as TransferCryptoHeader};
1
+ "use client";import{useOptionalActivityDriverInstance as e}from"../../../../../activity/driver/context.js";import{useLingui as t}from"../../../../../../shared/i18n/useLingui.js";import"../../../../../../i18n/index.js";import{useDepositActions as n}from"../../../../orchestrator/controller.js";import{ChevronLeftIcon as r}from"../../../../../../shared/icons/ChevronLeftIcon.js";import"../../../../../../icons/index.js";import{IconButton as i}from"../../../../../../shared/ui/IconButton/IconButton.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{ActivityTrigger as c}from"../../../../../../shared/widgets/activity/ActivityTrigger.js";import"../../../../../../shared/widgets/activity/index.js";import{TRANSFER_CRYPTO_SLOTS as l}from"../TransferCrypto.slots.js";import{styles as u}from"../TransferCrypto.styles.js";import{jsx as d,jsxs as f}from"react/jsx-runtime";import*as p from"@stylexjs/stylex";function m({onBack:m,title:h}){let{_:g}=t(),{openActivity:_}=n(),v=e()!==null,y=h??g({id:`3dqPLT`,message:`Transfer Crypto`});return f(o.Header,{"data-stridge-slot":l.header,...p.props(u.header),children:[f(`div`,{...p.props(u.headerLeft),children:[typeof m==`function`?d(i,{"aria-label":g({id:`iH8pgl`,message:`Back`}),onClick:m,children:d(r,{"aria-hidden":!0,...p.props(u.backIcon)})}):null,d(s.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,style:{margin:0},children:y})]}),f(`div`,{...p.props(u.headerTrailing),children:[v?d(c,{onOpen:_}):null,d(a.CloseButton,{})]})]})}export{m as TransferCryptoHeader};
@@ -5,16 +5,10 @@ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
5
5
  * QR code part — renders the deposit address as a QR code with the
6
6
  * selected chain's logo punched out at the center.
7
7
  *
8
- * The arena is rendered inside an SVG `<foreignObject>` whose
9
- * coordinate system is the QR's viewBox (cells, ~33 user units across)
10
- * rather than CSS pixels. So `px` values on HTML descendants get
11
- * scaled by the SVG factor (~4.85× for a 160-pixel QR with a 33-cell
12
- * grid) — `height: 36px` on the icon turned into ~175 actual pixels
13
- * and the SVG ballooned. Percentages resolve correctly because they
14
- * stay in the local user-unit space, so the img sizes against Cuer's
15
- * arena `<foreignObject>` width/height directly. `object-fit: contain`
16
- * preserves aspect ratio so chain logos with non-square viewBoxes
17
- * (Ethereum is 784×1277) don't squish.
8
+ * The logo is rendered via `Cuer.Arena` as a native SVG `<image>`
9
+ * `preserveAspectRatio="xMidYMid meet"` (the SVG equivalent of
10
+ * `object-fit: contain`) keeps non-square chain artwork from squishing,
11
+ * and the SVG coordinate system places it exactly on the QR centre.
18
12
  */
19
13
  declare function TransferCryptoQrCode(): _$react_jsx_runtime0.JSX.Element;
20
14
  //#endregion
@@ -1 +1 @@
1
- "use client";import{resolveChainLogoChain as e}from"../../../../../../shared/utils/logos/resolveLogoSrc.js";import"../../../../../../shared/utils/logos/index.js";import{useTransferCryptoContext as t}from"../context.js";import{TRANSFER_CRYPTO_SLOTS as n}from"../TransferCrypto.slots.js";import{styles as r}from"../TransferCrypto.styles.js";import{Cuer as i}from"../../../../../../shared/cuer/Cuer.js";import"../../../../../../shared/cuer/index.js";import{useEffect as a,useState as o}from"react";import{jsx as s}from"react/jsx-runtime";import*as c from"@stylexjs/stylex";function l(){let l=t(`TransferCrypto.QrCode`),u=e({...l.chain.chainId===void 0?{}:{chainId:l.chain.chainId},...l.chain.logoUrl===void 0?{}:{chainLogoUrl:l.chain.logoUrl}}),[d,f]=o(0);a(()=>{f(0)},[u.join(`|`)]);let p=u[d];return s(`div`,{"data-stridge-slot":n.qr,...c.props(r.qrFrame),children:s(i,{value:l.depositAddress,size:160,arena:p?s(`img`,{src:p,alt:l.chain.symbol,"data-stridge-slot":n.qrArena,onError:()=>{d<u.length-1&&f(d+1)},style:{width:`100%`,height:`100%`,objectFit:`contain`,display:`block`,borderRadius:`var(--stridge-kit-radius-lg)`}},p):null,...c.props(r.qrSvg)})})}export{l as TransferCryptoQrCode};
1
+ "use client";import{resolveChainLogoChain as e}from"../../../../../../shared/utils/logos/resolveLogoSrc.js";import"../../../../../../shared/utils/logos/index.js";import{useTransferCryptoContext as t}from"../context.js";import{TRANSFER_CRYPTO_SLOTS as n}from"../TransferCrypto.slots.js";import{styles as r}from"../TransferCrypto.styles.js";import{Cuer as i}from"../../../../../../shared/cuer/Cuer.js";import"../../../../../../shared/cuer/index.js";import{useEffect as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import*as l from"@stylexjs/stylex";function u(){let u=t(`TransferCrypto.QrCode`),d=e({...u.chain.chainId===void 0?{}:{chainId:u.chain.chainId},...u.chain.logoUrl===void 0?{}:{chainLogoUrl:u.chain.logoUrl}}),[f,p]=o(0);a(()=>{p(0)},[d.join(`|`)]);let m=d[f];return s(`div`,{"data-stridge-slot":n.qr,...l.props(r.qrFrame),children:c(i.Root,{value:u.depositAddress,size:160,...l.props(r.qrSvg),children:[s(i.Finder,{}),s(i.Cells,{}),m&&s(i.Arena,{href:m,"aria-label":u.chain.symbol,"data-stridge-slot":n.qrArena,onError:()=>{f<d.length-1&&p(f+1)}},m)]})})}export{u as TransferCryptoQrCode};
@@ -58,7 +58,7 @@ interface TransferCryptoChain extends TransferCryptoAsset {
58
58
  */
59
59
  raw?: SupportedAssetDto;
60
60
  /**
61
- * Full `Uda.supportedAssets()` response that produced the network entry.
61
+ * Full `Gateway.assets()` response that produced the network entry.
62
62
  */
63
63
  responseRaw?: SupportedAssetsResponse;
64
64
  }
@@ -67,13 +67,19 @@ interface TransferCryptoChain extends TransferCryptoAsset {
67
67
  * pins to the first-encountered chain's entry; per-chain context lives on `chainsByToken`.
68
68
  */
69
69
  interface TransferCryptoToken extends TransferCryptoAsset {
70
+ /**
71
+ * Estimated price impact of depositing this token, as a percentage decimal string
72
+ * (e.g. `"0.5"`). Surfaced on the disclosure row next to the processing-time hint. Omit when
73
+ * the gateway has no estimate — the row then shows the processing-time hint alone.
74
+ */
75
+ priceImpact?: string;
70
76
  /**
71
77
  * Source token DTO from the pinned chain — `AssetDto` for ERC-20s, `NativeCurrencyDto` for
72
78
  * chain-natives. Reflects the first chain the symbol was encountered on; integrators reading
73
79
  * per-chain `raw` walk `chainsByToken[symbol]`.
74
80
  */
75
81
  raw?: AssetDto | NativeCurrencyDto;
76
- /** Full `Uda.supportedAssets()` response that produced the token entry. */
82
+ /** Full `Gateway.assets()` response that produced the token entry. */
77
83
  responseRaw?: SupportedAssetsResponse;
78
84
  }
79
85
  /**
@@ -182,6 +188,14 @@ interface TransferCryptoDisclosureProps {
182
188
  * override per route.
183
189
  */
184
190
  processingTime?: string;
191
+ /**
192
+ * Price-impact percentage surfaced on the trigger next to the
193
+ * processing-time hint (e.g. `"0.5"` renders `"0.5% price impact"`).
194
+ * Defaults to the active token's `priceImpact`; pass to override per
195
+ * route. When neither is set the trigger shows the processing-time
196
+ * hint alone.
197
+ */
198
+ priceImpact?: string;
185
199
  }
186
200
  //#endregion
187
201
  export { TransferCryptoAsset, TransferCryptoBodyProps, TransferCryptoChain, TransferCryptoDialogProps, TransferCryptoDisclosureProps, TransferCryptoHeaderProps, TransferCryptoProps, TransferCryptoToken };
@@ -0,0 +1 @@
1
+ import { QuoteResponse } from "@stridge/sdk";
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ import { GatewaySettlementDto, GatewayUdaDto } from "@stridge/sdk";
@@ -1 +1 @@
1
- function e(e,t={}){let n=e.settlements??[],r=t.txHash?.toLowerCase(),i=t.sinceIso??``,a=n.filter(e=>r?e.from?.tx_id?.toLowerCase()===r:(e.created_at??``)>=i);if(a.length!==0)return[...a].sort((e,t)=>(t.updated_at??``).localeCompare(e.updated_at??``))[0]}export{e as pickRelevantSettlement};
1
+ function e(e,t={}){let n=e.settlements??[],r=t.txHash?.toLowerCase();if(r){let e=n.filter(e=>e.from?.tx_id?.toLowerCase()===r);return e.length===0?void 0:[...e].sort((e,t)=>(t.updated_at??``).localeCompare(e.updated_at??``))[0]}let i=t.bestMatch;if(i){let t=i.destination.recipientAddress.toLowerCase(),r=i.destination.tokenSymbol.toLowerCase(),a=new Date(i.submittedAt).toISOString(),o=i.sourceAmountBaseUnits,s=n.filter(n=>{let s=n.created_at??``;if(s&&s<a)return!1;let c=e.destination;return!(Number(c.eip155_id)!==i.destination.chainId||(c.asset_symbol??``).toLowerCase()!==r||(c.address??``).toLowerCase()!==t||o!==void 0&&n.from?.raw_amount!==o)});return s.length===0?void 0:[...s].sort((e,t)=>(t.updated_at??``).localeCompare(e.updated_at??``))[0]}let a=t.sinceIso??``,o=n.filter(e=>(e.created_at??``)>=a);if(o.length!==0)return[...o].sort((e,t)=>(t.updated_at??``).localeCompare(e.updated_at??``))[0]}export{e as pickRelevantSettlement};
@@ -0,0 +1 @@
1
+ const e=new Set([11155111,5,80001,80002,84532,421614,11155420,97]);export{e as KNOWN_TESTNET_EIP155_IDS};
@@ -0,0 +1,92 @@
1
+ import { WithdrawSubmitCallback } from "../orchestrator/types.js";
2
+ import { ReactNode } from "react";
3
+ //#region src/flows/withdraw/bindings/WithdrawBindings.d.ts
4
+ /**
5
+ * Withdrawable balance the host surfaces to the withdraw form. Two accepted forms:
6
+ *
7
+ * - `number` — bare amount in display units (kit infers symbol from the provider-level
8
+ * `asset.symbol`; USD value is derived for known stablecoins or hidden otherwise).
9
+ * - `{ amount, amountUsd? }` — explicit amount plus optional pre-computed USD value.
10
+ *
11
+ * `undefined` represents the loading state — the kit renders a skeleton / em-dashes instead
12
+ * of a value.
13
+ */
14
+ type WithdrawBalanceInput = number | {
15
+ amount: number;
16
+ amountUsd?: number;
17
+ };
18
+ /**
19
+ * Trusted-recipient prefill chip surfaced next to the recipient address input. The kit no
20
+ * longer auto-derives a chip from `wagmi.address` — that misled users on embedded-wallet
21
+ * integrations, where `wagmi.address` is the integration's generated wallet rather than the
22
+ * user's primary self-custodial wallet. Hosts that have a verified, user-trusted address (a
23
+ * saved wallet on the user's profile, a KYC-bound payout destination, a whitelisted withdrawal
24
+ * address) pass it via {@link useWithdrawBindings} (or the `<WithdrawDialog>` prop of the same
25
+ * name); the chip's `aria-label` reads off `label` so the affordance is unambiguous about which
26
+ * address the user is filling with.
27
+ */
28
+ interface WithdrawSuggestedRecipient {
29
+ /** Address that fills the recipient input when the chip is clicked. */
30
+ address: string;
31
+ /**
32
+ * Short human label for the chip — used as the accessible name (`aria-label`) so screen
33
+ * readers and click targets describe the saved address concretely (e.g. `"Saved wallet"`,
34
+ * `"Your verified address"`). When omitted, the chip falls back to a generic kit-default.
35
+ */
36
+ label?: string;
37
+ /**
38
+ * Receive-side chain id this address belongs to (EIP-155 numeric). When set, the chip is
39
+ * surfaced only while the form's selected receive chain matches — prevents the user from
40
+ * one-click-filling an Ethereum address while routing to BSC, etc. When omitted, the chip
41
+ * is surfaced unconditionally and address-chain compatibility is the integrator's concern.
42
+ */
43
+ chainId?: number;
44
+ }
45
+ /**
46
+ * Render-time inputs the host supplies to the withdraw flow. Whoever renders the withdraw UI —
47
+ * the kit's `<WithdrawDialog>` or a fully custom headless surface — publishes these via
48
+ * {@link useWithdrawBindings}. Form widgets read the display values reactively; the orchestrator's
49
+ * submit action reads `onSubmit` at submit time to fire the host's callback.
50
+ */
51
+ interface WithdrawBindings {
52
+ /** Host-supplied source-side balance the form renders. */
53
+ balance?: WithdrawBalanceInput;
54
+ /**
55
+ * Host-supplied submit handler. Fired when the user submits the form (after the kit has
56
+ * prepared a fresh UDA target). The host calls the supplied actions to advance the FSM at
57
+ * the points its backend reaches the matching state.
58
+ */
59
+ onSubmit?: WithdrawSubmitCallback;
60
+ /**
61
+ * Trusted recipient address surfaced as a prefill chip on the recipient field. See
62
+ * {@link WithdrawSuggestedRecipient}.
63
+ */
64
+ suggestedRecipient?: WithdrawSuggestedRecipient;
65
+ }
66
+ /**
67
+ * Publish the host's render-time withdraw inputs (`balance`, `onSubmit`, `suggestedRecipient`)
68
+ * into the kit's withdraw scope. Call it once from whatever component renders the withdraw UI:
69
+ *
70
+ * - The kit's `<WithdrawDialog>` calls it internally with its render-time props.
71
+ * - A **headless** host that renders fully custom withdraw UI from `useWithdraw()` /
72
+ * `useWithdrawState()` / `useWithdrawSnapshot()` calls it directly — it's the supported way
73
+ * to wire `onSubmit` (and the optional display inputs) without mounting the dialog.
74
+ *
75
+ * Writes synchronously to the bridge ref during render so the controller's submit action always
76
+ * reads the latest `onSubmit`; a deferred `setState` updates the reactive state read by display
77
+ * widgets. Clears the bridge on unmount.
78
+ *
79
+ * @example Headless usage
80
+ * ```tsx
81
+ * useWithdrawBindings({
82
+ * balance: walletBalance,
83
+ * onSubmit: async (input, actions) => {
84
+ * const txHash = await backend.broadcastWithdrawal(input.depositTarget);
85
+ * actions.beginProcessing({ hash: txHash });
86
+ * },
87
+ * });
88
+ * ```
89
+ */
90
+ declare function useWithdrawBindings(bindings: WithdrawBindings): void;
91
+ //#endregion
92
+ export { WithdrawBalanceInput, WithdrawBindings, WithdrawSuggestedRecipient, useWithdrawBindings };
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,use as t,useEffect as n,useMemo as r,useRef as i,useState as a}from"react";import{jsx as o}from"react/jsx-runtime";const s=e(null);s.displayName=`WithdrawBindingsContext`;function c({children:e}){let[t,n]=a({}),c=i({});return o(s,{value:r(()=>({bindings:t,setBindings:n,ref:c}),[t]),children:e})}function l(){return t(s)?.bindings??{}}function u(){let e=t(s),n=i({});return e?.ref??n}function d(e){let r=t(s),a=e.balance,o=e.onSubmit,c=e.suggestedRecipient;r&&(r.ref.current={...a===void 0?{}:{balance:a},...o?{onSubmit:o}:{},...c?{suggestedRecipient:c}:{}});let l=i(r?.setBindings);l.current=r?.setBindings;let u=i(r?.ref);u.current=r?.ref,n(()=>{let e=l.current;if(e)return e({...a===void 0?{}:{balance:a},...o?{onSubmit:o}:{},...c?{suggestedRecipient:c}:{}}),()=>{let e=l.current,t=u.current;t&&(t.current={}),e&&e({})}},[a,o,c])}export{c as WithdrawBindingsProvider,d as useWithdrawBindings,u as useWithdrawBindingsRef,l as useWithdrawBindingsValue};
@@ -0,0 +1 @@
1
+ import { WithdrawBalanceInput, WithdrawBindings, WithdrawSuggestedRecipient, useWithdrawBindings } from "./WithdrawBindings.js";
@@ -0,0 +1 @@
1
+ import"./WithdrawBindings.js";
@@ -1,102 +1,75 @@
1
- import { TxRef } from "../../../shared/driver/types.js";
2
- import { WithdrawalQuotePayload, WithdrawalSettlementFailurePayload, WithdrawalSettlementPendingPayload, WithdrawalSettlementSuccessPayload } from "../driver/payloads.js";
3
- import { SubmitWithdrawalInput } from "../driver/types.js";
4
- import { FailureInfo } from "../../../shared/orchestrator/types.js";
5
- import { WithdrawStateName } from "../orchestrator/types.js";
6
- import { WithdrawFormEventCallbacks } from "./WithdrawDialogEventsContext.js";
1
+ import { Presentation } from "../../../shared/presentation/types.js";
2
+ import { WithdrawSubmitCallback } from "../orchestrator/types.js";
3
+ import { WithdrawBalanceInput, WithdrawSuggestedRecipient } from "../bindings/WithdrawBindings.js";
7
4
  import { ErrorInfo } from "react";
8
5
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
9
6
 
10
7
  //#region src/flows/withdraw/dialog/WithdrawDialog.d.ts
11
8
  /**
12
- * Top-level withdraw dialog. Mounts inside `<KitProvider withdraw={…} />` once at the host's
13
- * app root and binds open state to the controller's `state.name !== "closed"`.
9
+ * Top-level withdraw dialog. Mounts inside `<StridgeProvider>` and binds open state to the
10
+ * controller's `state.name !== "closed"`.
14
11
  *
15
12
  * Body switch is keyed off the orchestrator's *effective* state (not logical state) so the
16
13
  * widget the user was looking at stays mounted through the dialog's close animation.
17
14
  *
18
- * Three top-level callbacks (`onOpened`, `onClosed`, `onStepChanged`) describe the dialog as a
19
- * stateful component. The grouped `events={{ }}` prop carries the operational lifecycle —
20
- * form-level inputs, quote / submit / settlement transitions for the active withdrawal.
15
+ * Lifecycle observability is delivered by the unified event bus exported from
16
+ * `@stridge/kit/events`. The dialog takes no `on*` callback props; subscribe via
17
+ * `useStridgeFlowEvents` / `useStridgeEvents` for analytics or behavioural reactions.
18
+ * `onSubmit` is the host contract — its return value drives the FSM, distinct from any bus
19
+ * event.
21
20
  */
22
21
  declare function WithdrawDialog({
23
22
  container,
23
+ metadata,
24
24
  onError,
25
- onOpened,
26
- onClosed,
27
- onStepChanged,
28
- events
25
+ balance,
26
+ onSubmit,
27
+ suggestedRecipient,
28
+ presentation
29
29
  }?: WithdrawDialog.Props): _$react_jsx_runtime0.JSX.Element;
30
30
  declare namespace WithdrawDialog {
31
31
  interface Props {
32
32
  /**
33
33
  * Element the dialog portals into. Defaults to `document.body` (full-page overlay).
34
- * Pass a transformed ancestor with `overflow: clip` — e.g. a mobile mockup frame — to
35
- * scope the dialog's width, height, and backdrop to that rect.
36
34
  */
37
35
  container?: HTMLElement | null;
36
+ /**
37
+ * Consumer-attached metadata that rides along on every bus event emitted from this
38
+ * dialog's session. Snapshotted at `withdraw.opened` and frozen for the session.
39
+ */
40
+ metadata?: Record<string, unknown>;
38
41
  /** Forwarded to the dialog's internal {@link GatewayKitBoundary} for crash reporting. */
39
42
  onError?: (error: Error, errorInfo: ErrorInfo) => void;
40
43
  /**
41
- * Fires once when the dialog transitions from `closed` to any open step. The withdraw
42
- * flow has no `open({ method })` overload `onOpened` carries no payload.
44
+ * Withdrawable balance to display in the form. Either a bare amount in display units
45
+ * (kit short-circuits USD to $1 for known stablecoins) or `{ amount, amountUsd? }`
46
+ * with an explicit pre-computed USD value. Pass `undefined` while loading; the form
47
+ * renders a skeleton until a value arrives.
43
48
  */
44
- onOpened?: () => void;
45
- /** Fires once when the dialog transitions back to `closed`. `atStep` is the last open step. */
46
- onClosed?: (atStep: WithdrawStateName) => void;
47
- /** Fires on every logical step transition. */
48
- onStepChanged?: (event: {
49
- from: WithdrawStateName;
50
- to: WithdrawStateName;
51
- }) => void;
49
+ balance?: WithdrawBalanceInput;
52
50
  /**
53
- * Operational eventsuser actions, quote / submit / settlement transitions for the
54
- * active withdrawal. Each callback is optional and fires after the controller has acted
55
- * (state machine has transitioned, driver entity has settled), so payloads are guaranteed
56
- * valid for the named event.
51
+ * Submit handlerfires once the kit has prepared a fresh UDA target for the
52
+ * withdrawal. The host's backend is responsible for broadcasting a transfer of the
53
+ * brand currency to that UDA; the kit hands a `WithdrawSubmitActions` handle the host
54
+ * calls (`beginProcessing` / `setTxHash` / `succeed` / `fail` / `decline`) to advance
55
+ * the FSM. Required when the dialog is used — a missing callback lands the user on
56
+ * the error screen instead of an infinite spinner. This is a contract, not a bus
57
+ * event: return value drives the FSM.
57
58
  */
58
- events?: Events;
59
- }
60
- /**
61
- * Operational lifecycle hooks. Splits cleanly into:
62
- *
63
- * - **Form-level inputs** (`onRecipientChanged` / `onAmountChanged` / `onReceiveTokenChanged`
64
- * / `onReceiveChainChanged`) — fire on every change of the form's local state.
65
- * - **User actions** (`onWithdrawalConfirmed`) — fire when the user submits the form.
66
- * - **Quote lifecycle** — track the form's quote entity through `loading → ready / error`.
67
- * - **Submit lifecycle** — track the wagmi-driven broadcast through wagmi → receipt → terminal
68
- * verdict.
69
- * - **Settlement entity** — track the gateway's settlement payload through pending / succeeded /
70
- * failed.
71
- */
72
- interface Events extends WithdrawFormEventCallbacks {
73
- /** User submitted the form (the SUBMIT action — wallet prompt is about to fire). */
74
- onWithdrawalConfirmed?: () => void;
75
- /** Quote entity reached `ready` with the formatted payload. */
76
- onQuoteResolved?: (quote: WithdrawalQuotePayload) => void;
77
- /** Quote entity reached `error`. */
78
- onQuoteFailed?: (failure: {
79
- reason: string;
80
- code?: string;
81
- }) => void;
82
- /** Wagmi broadcast completed and the orchestrator transitioned into `inProgress`. */
83
- onWithdrawalSubmitted?: (event: {
84
- input: SubmitWithdrawalInput;
85
- tx: TxRef;
86
- }) => void;
87
- /** User declined the wallet signature prompt; orchestrator transitioned into `error`. */
88
- onSignatureDeclined?: () => void;
89
- /** Submission failed for a non-rejection reason (network, bad input, etc). */
90
- onSubmissionFailed?: (failure: FailureInfo) => void;
91
- /** The driver's `settlement` entity emitted a progressive pending update. */
92
- onProcessingProgress?: (update: WithdrawalSettlementPendingPayload) => void;
93
- /** Terminal success — settlement entity reached `ready{kind: "succeeded"}`. */
94
- onSucceeded?: (result: WithdrawalSettlementSuccessPayload) => void;
59
+ onSubmit?: WithdrawSubmitCallback;
60
+ /**
61
+ * Trusted recipient address surfaced as a one-click prefill chip next to the
62
+ * recipient input. The kit no longer auto-derives this from `wagmi.address`. Pass an
63
+ * explicit address you trust the user wants to fill with. Omit to hide the chip.
64
+ */
65
+ suggestedRecipient?: WithdrawSuggestedRecipient;
95
66
  /**
96
- * Terminal failure either a settlement-driven failure (driver-emitted classification) or
97
- * an FSM-derived failure (submission rejection escalated to the global error arm).
67
+ * Per-dialog surface override. `"auto"` (default) renders a centred dialog on wide
68
+ * containers and a bottom-sheet drawer below the breakpoint; `"dialog"` / `"drawer"`
69
+ * force one surface. Pass `{ mode, breakpoint }` to tune the px threshold (default 600).
70
+ * Wins over the provider's `appearance.presentation`; omit to inherit it.
98
71
  */
99
- onFailed?: (failure: WithdrawalSettlementFailurePayload | FailureInfo) => void;
72
+ presentation?: Presentation;
100
73
  }
101
74
  }
102
75
  //#endregion
@@ -1 +1 @@
1
- "use client";import{useDialogLifecycle as e}from"../../../shared/orchestrator/useDialogLifecycle.js";import"../../../shared/orchestrator/index.js";import{useWithdrawSnapshot as t}from"../driver/context.js";import{useWithdrawEffectiveState as n,useWithdrawState as r}from"../orchestrator/controller.js";import{useWithdraw as i}from"../orchestrator/useWithdraw.js";import"../orchestrator/index.js";import{Dialog as a}from"../../../shared/ui/Dialog/Dialog.js";import"../../../shared/ui/Dialog/index.js";import{StepTransition as o}from"../../../shared/dialog/StepTransition.js";import{GatewayKitBoundary as s}from"../../../shared/error-handling/components/GatewayKitBoundary.js";import"../../../shared/error-handling/index.js";import{WithdrawError as c}from"../widgets/withdraw-error/WithdrawError.js";import{WithdrawDialogEventsProvider as l}from"./WithdrawDialogEventsContext.js";import{WithdrawForm as u}from"../widgets/withdraw-form/WithdrawForm.js";import{WithdrawInProgress as d}from"../widgets/withdraw-in-progress/WithdrawInProgress.js";import{WithdrawSuccess as f}from"../widgets/withdraw-success/WithdrawSuccess.js";import"../../../_internal/withdraw/widgets/index.js";import{useRef as p}from"react";import{jsx as m,jsxs as h}from"react/jsx-runtime";function g({container:e,onError:p,onOpened:g,onClosed:v,onStepChanged:y,events:b}={}){let x=r(),S=n(),{close:C}=i(),w=t(),T=x.name!==`closed`;_(x,w.settlement,w.quote,{onOpened:g,onClosed:v,onStepChanged:y,events:b});let E=S.name===`submitting`?`form`:S.name;return m(a,{open:T,onOpenChange:e=>e?void 0:C(),children:m(a.Content,{container:e,children:m(s,{onError:p,onReset:C,children:m(l,{events:b??{},children:h(o,{stateKey:E,children:[S.name===`form`||S.name===`submitting`?m(u,{}):null,S.name===`inProgress`?m(d,{}):null,S.name===`success`?m(f,{}):null,S.name===`error`?m(c,{}):null]})})})})})}function _(t,n,r,i){let a=p(i);a.current=i,e({state:t,settlement:n,quote:r,fireFsm:(e,t)=>v(e,t,a.current),fireSettlement:(e,t)=>y(t,a.current),fireQuote:(e,t)=>{if(t.status===e)return;let n=a.current.events;t.status===`ready`&&n?.onQuoteResolved?.(t.payload),t.status===`error`&&n?.onQuoteFailed?.({reason:t.error.message||`Quote failed.`,...t.error.name?{code:t.error.name}:{}})}})}function v(e,t,n){let{onOpened:r,onClosed:i,onStepChanged:a,events:o}=n,s=e.name===`form`&&!!e.ctx?.notice;if(t.name===`form`&&t.ctx?.notice&&!s&&o?.onSignatureDeclined?.(),e.name!==t.name&&(e.name===`closed`&&t.name!==`closed`&&r?.(),e.name!==`closed`&&t.name===`closed`&&i?.(e.name),a?.({from:e.name,to:t.name}),e.name===`form`&&t.name===`submitting`&&o?.onWithdrawalConfirmed?.(),e.name===`submitting`&&t.name===`inProgress`&&o?.onWithdrawalSubmitted?.({input:t.ctx.input,tx:t.ctx.tx}),t.name===`error`)){let e=t.ctx.failure;e!==void 0&&t.ctx.tx===void 0&&e&&(o?.onSubmissionFailed?.(e),o?.onFailed?.(e))}}function y(e,t){if(e.status!==`ready`&&e.status!==`stale`)return;let n=e.payload,r=t.events;if(r){if(n.kind===`pending`){r.onProcessingProgress?.(n);return}if(n.kind===`succeeded`){r.onSucceeded?.(n);return}n.kind===`failed`&&r.onFailed?.(n)}}export{g as WithdrawDialog};
1
+ "use client";import{useWithdrawBindings as e}from"../bindings/WithdrawBindings.js";import"../bindings/index.js";import{useWithdrawSnapshot as t}from"../driver/context.js";import{useWithdrawState as n}from"../orchestrator/controller.js";import{useWithdraw as r}from"../orchestrator/useWithdraw.js";import"../orchestrator/index.js";import{useWithdrawEmissions as i}from"../../../events/emit/useWithdrawEmissions.js";import"../../../events/emit/index.js";import{useIntercomShutdownOnUnmount as a}from"../../../shared/support/useIntercomShutdownOnUnmount.js";import"../../../shared/support/index.js";import{AdaptiveSurface as o}from"../../../shared/ui/AdaptiveSurface/AdaptiveSurface.js";import"../../../shared/ui/AdaptiveSurface/index.js";import{Withdraw as s}from"../widgets/withdraw/compound/Withdraw.js";import"../../../withdraw/compound/index.js";import{WithdrawActivityDetail as c}from"../widgets/activity/WithdrawActivityDetail.js";import{WithdrawActivityList as l}from"../widgets/activity/WithdrawActivityList.js";import{WithdrawError as u}from"../widgets/withdraw-error/WithdrawError.js";import{WithdrawForm as d}from"../widgets/withdraw-form/WithdrawForm.js";import{WithdrawInProgress as f}from"../widgets/withdraw-in-progress/WithdrawInProgress.js";import{WithdrawSuccess as p}from"../widgets/withdraw-success/WithdrawSuccess.js";import"../../../withdraw/widgets/index.js";import{jsx as m,jsxs as h}from"react/jsx-runtime";function g({container:g,metadata:_,onError:v,balance:y,onSubmit:b,suggestedRecipient:x,presentation:S}={}){let C=n(),{close:w}=r(),T=t(),E=C.name!==`closed`;return i({state:C,settlement:T.settlement,quote:T.quote,metadata:_}),a(),e({...y===void 0?{}:{balance:y},...b?{onSubmit:b}:{},...x?{suggestedRecipient:x}:{}}),m(o,{open:E,onOpenChange:e=>e?void 0:w(),container:g,...S?{presentation:S}:{},children:m(s.Boundary,{...v?{onError:v}:{},children:m(s.Guards,{children:h(s.Steps,{children:[m(s.Step,{name:`form`,children:m(d,{})}),m(s.Step,{name:`inProgress`,children:m(f,{})}),m(s.Step,{name:`success`,children:m(p,{})}),m(s.Step,{name:`error`,children:m(u,{})}),m(s.Step,{name:`activityList`,children:m(l,{})}),m(s.Step,{name:`activityDetail`,children:m(c,{})})]})})})})}export{g as WithdrawDialog};
@@ -1,4 +1,4 @@
1
- import { GatewayPollResponse, GatewaySettlementDto, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
1
+ import { GatewaySettlementDto, GatewayUdaDto, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
2
2
 
3
3
  //#region src/flows/withdraw/driver/dto.d.ts
4
4
  /**
@@ -22,18 +22,19 @@ type WithdrawalQuoteResponse = QuoteResponse;
22
22
  */
23
23
  type WithdrawalSettlementDto = GatewaySettlementDto;
24
24
  /**
25
- * Full `gateway/{owner}` poll response. Carries `destination` plus `settlements[]`. Used as the
26
- * `response` slot on the settlement entity envelope so headless integrators can correlate against
27
- * the UDA-level destination metadata.
25
+ * Per-UDA view from `gateway/{owner}`. Carries the UDA's `destination` plus `settlements[]`. Used
26
+ * as the `response` slot on the settlement entity envelope so headless integrators can correlate
27
+ * against the UDA-level destination metadata. The kit's `pollOnce` boundary picks the matching
28
+ * UDA out of the gateway's multi-UDA envelope before this type is observed downstream.
28
29
  */
29
- type WithdrawalSettlementResponse = GatewayPollResponse;
30
+ type WithdrawalSettlementResponse = GatewayUdaDto;
30
31
  /**
31
- * Per-network entry from `Uda.supportedAssets()`. Surfaced as the `raw` slot on the
32
+ * Per-network entry from `Gateway.assets()`. Surfaced as the `raw` slot on the
32
33
  * `receiveOptions` entity so headless integrators can navigate the catalog without re-fetching.
33
34
  */
34
35
  type ReceiveOptionDto = SupportedAssetDto;
35
36
  /**
36
- * Full `Uda.supportedAssets()` response. Drives the receive chain + receive token dropdowns on
37
+ * Full `Gateway.assets()` response. Drives the receive chain + receive token dropdowns on
37
38
  * the form.
38
39
  */
39
40
  type ReceiveOptionsResponse = SupportedAssetsResponse;
@@ -1,5 +1,7 @@
1
1
  import { SettlementFailureKind } from "../../../shared/driver/types.js";
2
2
  import { FormattedField } from "../../../shared/format/types.js";
3
+ import { ChainType } from "../../../shared/chains/index.js";
4
+
3
5
  //#region src/flows/withdraw/driver/payloads.d.ts
4
6
  /**
5
7
  * Per-asset balance available to withdraw — the brand-managed source the cash-out flow draws
@@ -108,6 +110,12 @@ interface WithdrawalSettlementPendingPayload {
108
110
  kind: "pending";
109
111
  receiveAsset: WithdrawalReceiveAssetPayload;
110
112
  receiveAmount: FormattedField<number>;
113
+ /**
114
+ * USD value of `receiveAmount` at the settlement leg's price snapshot. Sourced from the
115
+ * gateway leg's `amount_usd` (`to` preferred, `from` fallback). Omitted when neither leg
116
+ * carries a priced amount — the in-progress hero then falls back to the quote's USD figure.
117
+ */
118
+ receiveAmountUsd?: FormattedField<number>;
111
119
  /** Recipient address — the destination the user supplied on the form. */
112
120
  recipient: FormattedField<string>;
113
121
  /** Unix-ms timestamp when the withdrawal was submitted. */
@@ -191,8 +199,15 @@ interface ReceiveChainPayload {
191
199
  networkId: string;
192
200
  /** Human-readable network name (e.g. `"Polygon"`). */
193
201
  networkName: string;
194
- /** EIP-155 chain id (numeric). */
202
+ /** EIP-155 chain id (numeric). Only meaningful when `chainType === "evm"`. */
195
203
  eip155Id: number;
204
+ /**
205
+ * Chain family this network belongs to — driver-populated from the gateway's `chain_type`
206
+ * tag. The withdraw form drives recipient-address validation off this so a non-EVM receive
207
+ * chain accepts its own address shape instead of the EVM `0x…` form. Drivers that can't
208
+ * determine the family tag it `"unknown"`, which keeps the address gate permissive.
209
+ */
210
+ chainType: ChainType;
196
211
  /** Resolved chain icon URL — derived from the chain's native_currency.logo. */
197
212
  chainLogoUrl?: string;
198
213
  /**
@@ -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{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=e.to,l=i(r?.confirmed_at)??i(e.created_at)??Date.now(),u=p(t,n),d=m(a,t.destination.asset_decimals)||m(r,r?.asset_decimals??t.destination.asset_decimals),f=t.destination.address,g=r?.tx_id,_=r?.eip155_id===void 0?void 0:Number(r.eip155_id);return{kind:`pending`,receiveAsset:u,receiveAmount:{value:d,formatted:s(d,n.i18n,{maxDecimals:t.destination.asset_decimals})},recipient:{value:f,formatted:c(f)},submittedAt:{value:l,formatted:o(l,n.i18n)},...g?{txHash:{value:g,formatted:c(g)},...h(n,_,g)?{txExplorerUrl:h(n,_,g)}:{}}:{}}}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),_=Math.round(f/1e3),v=p(t,n),y=m(l,t.destination.asset_decimals),b=t.destination.address,x=r?.tx_id??``,S=r?.eip155_id===void 0?void 0:Number(r.eip155_id),C=l?.tx_id,w=h(n,g(l?.eip155_id)??g(t.destination.eip155_id),C);return{kind:`succeeded`,receiveAsset:v,receiveAmount:{value:y,formatted:s(y,n.i18n,{maxDecimals:t.destination.asset_decimals})},recipient:{value:b,formatted:c(b)},submittedAt:{value:u,formatted:o(u,n.i18n)},filledAt:{value:d,formatted:o(d,n.i18n)},totalTime:{value:_,formatted:a(f,n.i18n)},txHash:{value:x,formatted:x?c(x):``},...h(n,S,x)?{txExplorerUrl:h(n,S,x)}:{},...C?{completionTx:{hash:{value:C,formatted:c(C)},...w?{explorerUrl:w}:{}}}:{}}}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=p(n,r),f=n.destination.address,m=a?.tx_id,g=a?.eip155_id===void 0?void 0:Number(a.eip155_id);return{kind:`failed`,failureKind:e(t.error),receiveAsset:d,receiveAmount:{value:0,formatted:s(0,r.i18n)},recipient:{value:f,formatted:c(f)},submittedAt:{value:l,formatted:o(l,r.i18n)},failedAt:{value:u,formatted:o(u,r.i18n)},...m?{txHash:{value:m,formatted:c(m)},...h(r,g,m)?{txExplorerUrl:h(r,g,m)}:{}}:{}}}function p(e,t){let n=t.receiveAssetEnrichment,r=Number(e.destination.eip155_id);return{symbol:e.destination.asset_symbol,decimals:e.destination.asset_decimals,address:e.destination.asset_address,isNative:!e.destination.asset_address,...n?.assetLogoUrl?{assetLogoUrl:n.assetLogoUrl}:{},networkId:e.destination.network_id,networkName:n?.networkName??e.destination.network_name,...Number.isFinite(r)?{eip155Id:e.destination.eip155_id}:{},...n?.chainLogoUrl?{chainLogoUrl:n.chainLogoUrl}:{}}}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(!n||t===void 0)return;let r=e.explorers?.[t];if(r)return`${r.replace(/\/+$/,``)}/tx/${n}`}function g(e){if(e==null||e===``)return;let t=Number(e);return Number.isFinite(t)?t:void 0}export{l as settlementToWithdrawalPayload};
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{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{formatUsd as c}from"../../../../shared/format/formatUsd.js";import{shortenAddress as l}from"../../../../shared/format/shortenAddress.js";function u(e,n,r){let i=t(e.status);return i===`completed`?f(e,n,r):i===`failed`?p(e,n,r):d(e,n,r)}function d(e,t,r){let a=e.from,u=e.to,d=i(a?.confirmed_at)??i(e.created_at)??Date.now(),f=m(t,r),p=g(u,t,r),v=h(u,p),y=n(u?.amount_usd)||n(a?.amount_usd),b=t.destination.address,x=a?.tx_id,S=a?.eip155_id===void 0?void 0:Number(a.eip155_id);return{kind:`pending`,receiveAsset:f,receiveAmount:{value:v,formatted:s(v,r.i18n,{maxDecimals:p})},...y>0?{receiveAmountUsd:{value:y,formatted:c(y,r.i18n)}}:{},recipient:{value:b,formatted:l(b)},submittedAt:{value:d,formatted:o(d,r.i18n)},...x?{txHash:{value:x,formatted:l(x)},..._(r,S,x)?{txExplorerUrl:_(r,S,x)}:{}}:{}}}function f(e,t,n){let r=e.from,c=e.to,u=i(r?.confirmed_at)??i(e.created_at)??Date.now(),d=i(c?.settled_at)??i(e.updated_at)??Date.now(),f=Math.max(0,d-u),p=Math.round(f/1e3),y=m(t,n),b=g(c,t,n),x=h(c,b),S=t.destination.address,C=r?.tx_id??``,w=r?.eip155_id===void 0?void 0:Number(r.eip155_id),T=c?.tx_id,E=_(n,v(c?.eip155_id)??v(t.destination.eip155_id),T);return{kind:`succeeded`,receiveAsset:y,receiveAmount:{value:x,formatted:s(x,n.i18n,{maxDecimals:b})},recipient:{value:S,formatted:l(S)},submittedAt:{value:u,formatted:o(u,n.i18n)},filledAt:{value:d,formatted:o(d,n.i18n)},totalTime:{value:p,formatted:a(f,n.i18n)},txHash:{value:C,formatted:C?l(C):``},..._(n,w,C)?{txExplorerUrl:_(n,w,C)}:{},...T?{completionTx:{hash:{value:T,formatted:l(T)},...E?{explorerUrl:E}:{}}}:{}}}function p(t,n,r){let a=t.from,c=i(a?.confirmed_at)??i(t.created_at)??Date.now(),u=i(t.updated_at)??Date.now(),d=m(n,r),f=n.destination.address,p=a?.tx_id,h=a?.eip155_id===void 0?void 0:Number(a.eip155_id);return{kind:`failed`,failureKind:e(t.error),receiveAsset:d,receiveAmount:{value:0,formatted:s(0,r.i18n)},recipient:{value:f,formatted:l(f)},submittedAt:{value:c,formatted:o(c,r.i18n)},failedAt:{value:u,formatted:o(u,r.i18n)},...p?{txHash:{value:p,formatted:l(p)},..._(r,h,p)?{txExplorerUrl:_(r,h,p)}:{}}:{}}}function m(e,t){let n=t.receiveAssetEnrichment,r=Number(e.destination.eip155_id);return{symbol:e.destination.asset_symbol,decimals:e.destination.asset_decimals,address:e.destination.asset_address,isNative:!e.destination.asset_address,...n?.assetLogoUrl?{assetLogoUrl:n.assetLogoUrl}:{},networkId:e.destination.network_id,networkName:n?.networkName??e.destination.network_name,...Number.isFinite(r)?{eip155Id:e.destination.eip155_id}:{},...n?.chainLogoUrl?{chainLogoUrl:n.chainLogoUrl}:{}}}function h(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 g(e,t,n){return n.receiveAssetDecimals??e?.asset_decimals??t.destination.asset_decimals}function _(e,t,n){if(!n||t===void 0)return;let r=e.explorers?.[t];if(r)return`${r.replace(/\/+$/,``)}/tx/${n}`}function v(e){if(e==null||e===``)return;let t=Number(e);return Number.isFinite(t)?t:void 0}export{u as settlementToWithdrawalPayload};
@@ -1 +1 @@
1
- import{formatNetworkName as e}from"../../../../shared/format/formatNetworkName.js";function t(t,n={}){let r=n.excludedChainIds,i=[];for(let n of t.assets){if(r?.has(n.eip155_id))continue;let t=n.native_currency,a=new Set,o=(e,t)=>`${e.toUpperCase()}@${t.toLowerCase()}`,s=[];if(t?.symbol){let e={symbol:t.symbol,name:t.name??t.symbol,address:``,decimals:typeof t.decimals==`number`?t.decimals:18,isNative:!0,...t.logo?{assetLogoUrl:t.logo}:{}};s.push(e),a.add(o(e.symbol,e.address))}let c=t?.symbol?.toUpperCase();for(let e of n.assets){if(!e.symbol||!e.address||c&&e.symbol.toUpperCase()===c)continue;let t=o(e.symbol,e.address);a.has(t)||(a.add(t),s.push({symbol:e.symbol,name:e.name??e.symbol,address:e.address,decimals:e.decimals,isNative:!1,...e.logo?{assetLogoUrl:e.logo}:{}}))}s.length!==0&&i.push({networkId:n.network_id,networkName:e(n.network_name),eip155Id:n.eip155_id,...t?.logo?{chainLogoUrl:t.logo}:{},tokens:s})}return i.sort((e,t)=>e.eip155Id-t.eip155Id),i}export{t as supportedAssetsToReceiveOptionsPayload};
1
+ import{toChainType as e}from"../../../../shared/chains/index.js";import{formatNetworkName as t}from"../../../../shared/format/formatNetworkName.js";function n(n,r={}){let i=r.excludedChainIds,a=[];for(let r of n.assets){if(i?.has(r.eip155_id))continue;let n=r.native_currency,o=new Set,s=(e,t)=>`${e.toUpperCase()}@${t.toLowerCase()}`,c=[];if(n?.symbol){let e={symbol:n.symbol,name:n.name??n.symbol,address:``,decimals:typeof n.decimals==`number`?n.decimals:18,isNative:!0,...n.logo?{assetLogoUrl:n.logo}:{}};c.push(e),o.add(s(e.symbol,e.address))}let l=n?.symbol?.toUpperCase();for(let e of r.assets){if(!e.symbol||!e.address||l&&e.symbol.toUpperCase()===l)continue;let t=s(e.symbol,e.address);o.has(t)||(o.add(t),c.push({symbol:e.symbol,name:e.name??e.symbol,address:e.address,decimals:e.decimals,isNative:!1,...e.logo?{assetLogoUrl:e.logo}:{}}))}c.length!==0&&a.push({networkId:r.network_id,networkName:t(r.network_name),eip155Id:r.eip155_id,chainType:e(r.chain_type),...n?.logo?{chainLogoUrl:n.logo}:{},tokens:c})}return a.sort((e,t)=>e.eip155Id-t.eip155Id),a}export{n as supportedAssetsToReceiveOptionsPayload};