@stridge/kit 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (763) hide show
  1. package/LICENSE +21 -0
  2. package/dist/KitProvider.d.ts +91 -0
  3. package/dist/KitProvider.js +1 -0
  4. package/dist/_internal/deposit/driver/index.d.ts +5 -0
  5. package/dist/_internal/deposit/driver/index.js +1 -0
  6. package/dist/_internal/deposit/widgets/index.d.ts +11 -0
  7. package/dist/_internal/deposit/widgets/index.js +1 -0
  8. package/dist/_internal/drivers/stridge/index.d.ts +6 -0
  9. package/dist/_internal/drivers/stridge/index.js +1 -0
  10. package/dist/_internal/drivers/stridge-mock/index.d.ts +5 -0
  11. package/dist/_internal/drivers/stridge-mock/index.js +1 -0
  12. package/dist/_internal/index.d.ts +2 -0
  13. package/dist/_internal/index.js +1 -0
  14. package/dist/_internal/withdraw/driver/index.d.ts +6 -0
  15. package/dist/_internal/withdraw/driver/index.js +1 -0
  16. package/dist/_internal/withdraw/widgets/index.d.ts +5 -0
  17. package/dist/_internal/withdraw/widgets/index.js +1 -0
  18. package/dist/banners/index.d.ts +1 -0
  19. package/dist/banners/index.js +1 -0
  20. package/dist/banners/useBannerAck.d.ts +61 -0
  21. package/dist/banners/useBannerAck.js +1 -0
  22. package/dist/deposit/compound/index.d.ts +28 -0
  23. package/dist/deposit/compound/index.js +1 -0
  24. package/dist/deposit/dialog/index.d.ts +2 -0
  25. package/dist/deposit/dialog/index.js +1 -0
  26. package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +29 -0
  27. package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -0
  28. package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +113 -0
  29. package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -0
  30. package/dist/drivers/stridge/internal/encoding.js +1 -0
  31. package/dist/drivers/stridge/internal/env.js +1 -0
  32. package/dist/drivers/stridge/internal/metadata.js +1 -0
  33. package/dist/drivers/stridge/internal/pollOnce.js +1 -0
  34. package/dist/drivers/stridge/internal/signAndConfirm.js +1 -0
  35. package/dist/drivers/stridge/poll.js +1 -0
  36. package/dist/drivers/stridge/rpc.d.ts +77 -0
  37. package/dist/drivers/stridge/rpc.js +1 -0
  38. package/dist/drivers/stridge/types.d.ts +145 -0
  39. package/dist/drivers/stridge/types.js +1 -0
  40. package/dist/drivers/stridge/wagmiSigner.js +1 -0
  41. package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +120 -0
  42. package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -0
  43. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +118 -0
  44. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -0
  45. package/dist/drivers/stridge-mock/fixtures.d.ts +127 -0
  46. package/dist/drivers/stridge-mock/fixtures.js +1 -0
  47. package/dist/drivers/stridge-mock/store.js +1 -0
  48. package/dist/drivers/stridge-mock/triggers.d.ts +41 -0
  49. package/dist/flows/deposit/dialog/DepositBootstrapErrorState.js +1 -0
  50. package/dist/flows/deposit/dialog/DepositBootstrapErrorState.styles.js +1 -0
  51. package/dist/flows/deposit/dialog/DepositDialog.d.ts +112 -0
  52. package/dist/flows/deposit/dialog/DepositDialog.js +1 -0
  53. package/dist/flows/deposit/driver/context.d.ts +37 -0
  54. package/dist/flows/deposit/driver/context.js +1 -0
  55. package/dist/flows/deposit/driver/payloads.d.ts +342 -0
  56. package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -0
  57. package/dist/flows/deposit/driver/transformers/quoteToPayload.js +1 -0
  58. package/dist/flows/deposit/driver/transformers/settlementToPayload.js +1 -0
  59. package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -0
  60. package/dist/flows/deposit/driver/transformers/startToBrandPayload.js +1 -0
  61. package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -0
  62. package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.js +1 -0
  63. package/dist/flows/deposit/driver/types.d.ts +177 -0
  64. package/dist/flows/deposit/orchestrator/controller.d.ts +11 -0
  65. package/dist/flows/deposit/orchestrator/controller.js +1 -0
  66. package/dist/flows/deposit/orchestrator/reducer.js +1 -0
  67. package/dist/flows/deposit/orchestrator/resolveAssetById.js +1 -0
  68. package/dist/flows/deposit/orchestrator/steps.d.ts +23 -0
  69. package/dist/flows/deposit/orchestrator/steps.js +1 -0
  70. package/dist/flows/deposit/orchestrator/types.d.ts +266 -0
  71. package/dist/flows/deposit/orchestrator/useDeposit.d.ts +35 -0
  72. package/dist/flows/deposit/orchestrator/useDeposit.js +1 -0
  73. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +35 -0
  74. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -0
  75. package/dist/flows/deposit/widgets/amount-entry/index.d.ts +1 -0
  76. package/dist/flows/deposit/widgets/amount-entry/index.js +1 -0
  77. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.d.ts +25 -0
  78. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -0
  79. package/dist/flows/deposit/widgets/asset-picker/index.d.ts +1 -0
  80. package/dist/flows/deposit/widgets/asset-picker/index.js +1 -0
  81. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts +31 -0
  82. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -0
  83. package/dist/flows/deposit/widgets/confirm-deposit/index.d.ts +1 -0
  84. package/dist/flows/deposit/widgets/confirm-deposit/index.js +1 -0
  85. package/dist/flows/deposit/widgets/deposit/Deposit.d.ts +30 -0
  86. package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -0
  87. package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +51 -0
  88. package/dist/flows/deposit/widgets/deposit/compound/Deposit.js +1 -0
  89. package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.d.ts +11 -0
  90. package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.js +1 -0
  91. package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -0
  92. package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +15 -0
  93. package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -0
  94. package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +32 -0
  95. package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -0
  96. package/dist/flows/deposit/widgets/deposit/compound/components/Methods.d.ts +23 -0
  97. package/dist/flows/deposit/widgets/deposit/compound/components/Methods.js +1 -0
  98. package/dist/flows/deposit/widgets/deposit/compound/context.js +1 -0
  99. package/dist/flows/deposit/widgets/deposit/compound/index.d.ts +3 -0
  100. package/dist/flows/deposit/widgets/deposit/compound/index.js +1 -0
  101. package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +129 -0
  102. package/dist/flows/deposit/widgets/deposit/index.d.ts +1 -0
  103. package/dist/flows/deposit/widgets/deposit/index.js +1 -0
  104. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +20 -0
  105. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -0
  106. package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.d.ts +102 -0
  107. package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -0
  108. package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.slots.d.ts +20 -0
  109. package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.slots.js +1 -0
  110. package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.styles.js +1 -0
  111. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Body.d.ts +17 -0
  112. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Body.js +1 -0
  113. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Close.d.ts +13 -0
  114. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Close.js +1 -0
  115. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Detail.d.ts +14 -0
  116. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Detail.js +1 -0
  117. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Details.d.ts +20 -0
  118. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Details.js +1 -0
  119. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Footer.d.ts +17 -0
  120. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Footer.js +1 -0
  121. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.d.ts +17 -0
  122. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.js +1 -0
  123. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.d.ts +26 -0
  124. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.js +1 -0
  125. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Rows.d.ts +35 -0
  126. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Rows.js +1 -0
  127. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Toggle.d.ts +18 -0
  128. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Toggle.js +1 -0
  129. package/dist/flows/deposit/widgets/deposit-status-banner/compound/context.js +1 -0
  130. package/dist/flows/deposit/widgets/deposit-status-banner/compound/index.d.ts +3 -0
  131. package/dist/flows/deposit/widgets/deposit-status-banner/compound/index.js +1 -0
  132. package/dist/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts +188 -0
  133. package/dist/flows/deposit/widgets/deposit-status-banner/index.d.ts +1 -0
  134. package/dist/flows/deposit/widgets/deposit-status-banner/index.js +1 -0
  135. package/dist/flows/deposit/widgets/error-state/ErrorState.d.ts +30 -0
  136. package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -0
  137. package/dist/flows/deposit/widgets/error-state/index.d.ts +1 -0
  138. package/dist/flows/deposit/widgets/error-state/index.js +1 -0
  139. package/dist/flows/deposit/widgets/processing-state/ProcessingState.d.ts +31 -0
  140. package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -0
  141. package/dist/flows/deposit/widgets/processing-state/index.d.ts +1 -0
  142. package/dist/flows/deposit/widgets/processing-state/index.js +1 -0
  143. package/dist/flows/deposit/widgets/success-state/SuccessState.d.ts +30 -0
  144. package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -0
  145. package/dist/flows/deposit/widgets/success-state/index.d.ts +1 -0
  146. package/dist/flows/deposit/widgets/success-state/index.js +1 -0
  147. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.d.ts +41 -0
  148. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -0
  149. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +56 -0
  150. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.js +1 -0
  151. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.slots.d.ts +15 -0
  152. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.slots.js +1 -0
  153. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -0
  154. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.d.ts +10 -0
  155. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -0
  156. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +17 -0
  157. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -0
  158. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +15 -0
  159. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -0
  160. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/InfoTooltip.js +1 -0
  161. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.d.ts +21 -0
  162. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -0
  163. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Selectors.d.ts +11 -0
  164. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Selectors.js +1 -0
  165. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Summary.d.ts +11 -0
  166. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Summary.js +1 -0
  167. package/dist/flows/deposit/widgets/transfer-crypto/compound/context.js +1 -0
  168. package/dist/flows/deposit/widgets/transfer-crypto/compound/index.d.ts +3 -0
  169. package/dist/flows/deposit/widgets/transfer-crypto/compound/index.js +1 -0
  170. package/dist/flows/deposit/widgets/transfer-crypto/compound/types.d.ts +187 -0
  171. package/dist/flows/deposit/widgets/transfer-crypto/index.d.ts +1 -0
  172. package/dist/flows/deposit/widgets/transfer-crypto/index.js +1 -0
  173. package/dist/flows/shared/transformers/classifySettlementStatus.js +1 -0
  174. package/dist/flows/shared/transformers/computeQuoteAttrs.js +1 -0
  175. package/dist/flows/shared/transformers/parseIsoMs.js +1 -0
  176. package/dist/flows/shared/transformers/parseSmallestUnit.js +1 -0
  177. package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -0
  178. package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +103 -0
  179. package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -0
  180. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +36 -0
  181. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +1 -0
  182. package/dist/flows/withdraw/driver/context.d.ts +24 -0
  183. package/dist/flows/withdraw/driver/context.js +1 -0
  184. package/dist/flows/withdraw/driver/dto.d.ts +41 -0
  185. package/dist/flows/withdraw/driver/payloads.d.ts +206 -0
  186. package/dist/flows/withdraw/driver/transformers/balanceToWithdrawableBalancesPayload.js +1 -0
  187. package/dist/flows/withdraw/driver/transformers/quoteToWithdrawalPayload.js +1 -0
  188. package/dist/flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js +1 -0
  189. package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js +1 -0
  190. package/dist/flows/withdraw/driver/types.d.ts +133 -0
  191. package/dist/flows/withdraw/orchestrator/controller.d.ts +11 -0
  192. package/dist/flows/withdraw/orchestrator/controller.js +1 -0
  193. package/dist/flows/withdraw/orchestrator/index.d.ts +4 -0
  194. package/dist/flows/withdraw/orchestrator/index.js +1 -0
  195. package/dist/flows/withdraw/orchestrator/reducer.js +1 -0
  196. package/dist/flows/withdraw/orchestrator/types.d.ts +156 -0
  197. package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +23 -0
  198. package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -0
  199. package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.d.ts +22 -0
  200. package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.js +1 -0
  201. package/dist/flows/withdraw/widgets/withdraw-error/index.d.ts +1 -0
  202. package/dist/flows/withdraw/widgets/withdraw-error/index.js +1 -0
  203. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +29 -0
  204. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -0
  205. package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.d.ts +55 -0
  206. package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -0
  207. package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.slots.d.ts +31 -0
  208. package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.slots.js +1 -0
  209. package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.styles.js +1 -0
  210. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/AmountField.d.ts +12 -0
  211. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/AmountField.js +1 -0
  212. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.d.ts +20 -0
  213. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.js +1 -0
  214. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/BreakdownCard.d.ts +17 -0
  215. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/BreakdownCard.js +1 -0
  216. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Footer.d.ts +18 -0
  217. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Footer.js +1 -0
  218. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +21 -0
  219. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -0
  220. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/InfoTooltip.js +1 -0
  221. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/ReceiveSelectors.d.ts +13 -0
  222. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/ReceiveSelectors.js +1 -0
  223. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +19 -0
  224. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -0
  225. package/dist/flows/withdraw/widgets/withdraw-form/compound/context.js +1 -0
  226. package/dist/flows/withdraw/widgets/withdraw-form/compound/index.d.ts +3 -0
  227. package/dist/flows/withdraw/widgets/withdraw-form/compound/index.js +1 -0
  228. package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +149 -0
  229. package/dist/flows/withdraw/widgets/withdraw-form/index.d.ts +1 -0
  230. package/dist/flows/withdraw/widgets/withdraw-form/index.js +1 -0
  231. package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -0
  232. package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +19 -0
  233. package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -0
  234. package/dist/flows/withdraw/widgets/withdraw-in-progress/index.d.ts +1 -0
  235. package/dist/flows/withdraw/widgets/withdraw-in-progress/index.js +1 -0
  236. package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.d.ts +20 -0
  237. package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js +1 -0
  238. package/dist/flows/withdraw/widgets/withdraw-success/index.d.ts +1 -0
  239. package/dist/flows/withdraw/widgets/withdraw-success/index.js +1 -0
  240. package/dist/format/index.d.ts +10 -0
  241. package/dist/format/index.js +1 -0
  242. package/dist/i18n/index.d.ts +9 -0
  243. package/dist/i18n/index.js +1 -0
  244. package/dist/i18n/locales/ar.d.ts +6 -0
  245. package/dist/i18n/locales/ar.js +1 -0
  246. package/dist/i18n/locales/es.d.ts +6 -0
  247. package/dist/i18n/locales/es.js +1 -0
  248. package/dist/icons/index.d.ts +27 -0
  249. package/dist/icons/index.js +1 -0
  250. package/dist/index.d.ts +26 -0
  251. package/dist/index.js +1 -0
  252. package/dist/kit/package.js +1 -0
  253. package/dist/scope/KitPortalScope.d.ts +31 -0
  254. package/dist/scope/KitPortalScope.js +1 -0
  255. package/dist/scope/KitScope.d.ts +63 -0
  256. package/dist/scope/KitScope.js +1 -0
  257. package/dist/scope/KitScope.slots.js +1 -0
  258. package/dist/scope/context.d.ts +67 -0
  259. package/dist/scope/context.js +1 -0
  260. package/dist/scope/index.d.ts +3 -0
  261. package/dist/scope/index.js +1 -0
  262. package/dist/shared/chains/index.d.ts +40 -0
  263. package/dist/shared/chains/index.js +1 -0
  264. package/dist/shared/constants/brand-links.js +1 -0
  265. package/dist/shared/dialog/DialogShell.d.ts +63 -0
  266. package/dist/shared/dialog/DialogShell.js +1 -0
  267. package/dist/shared/dialog/Frame.js +1 -0
  268. package/dist/shared/dialog/GatewayKitRoot.js +1 -0
  269. package/dist/shared/dialog/StepTransition.js +1 -0
  270. package/dist/shared/dialog/useDirectionalChevronTransform.js +1 -0
  271. package/dist/shared/driver/types.d.ts +69 -0
  272. package/dist/shared/error-handling/components/GatewayKitBoundary.js +1 -0
  273. package/dist/shared/error-handling/components/GatewayKitErrorCard/GatewayKitErrorCard.js +1 -0
  274. package/dist/shared/error-handling/components/GatewayKitErrorCard/GatewayKitErrorCard.slots.js +1 -0
  275. package/dist/shared/error-handling/components/GatewayKitErrorCard/GatewayKitErrorCard.styles.js +1 -0
  276. package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Action.js +1 -0
  277. package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Actions.js +1 -0
  278. package/dist/shared/error-handling/components/GatewayKitErrorCard/components/CodeSample.js +1 -0
  279. package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Description.js +1 -0
  280. package/dist/shared/error-handling/components/GatewayKitErrorCard/components/DetailRow.js +1 -0
  281. package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Guidance.js +1 -0
  282. package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Section.js +1 -0
  283. package/dist/shared/error-handling/components/GatewayKitErrorCard/components/TechnicalDetails.js +1 -0
  284. package/dist/shared/error-handling/components/GatewayKitErrorCard/components/TechnicalDetailsToggle.js +1 -0
  285. package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Title.js +1 -0
  286. package/dist/shared/error-handling/components/GatewayKitErrorCard/context.js +1 -0
  287. package/dist/shared/error-handling/components/GatewayKitErrorCard/index.js +1 -0
  288. package/dist/shared/error-handling/components/GatewayKitRecoveryError.js +1 -0
  289. package/dist/shared/error-handling/components/GatewayKitSetupError.js +1 -0
  290. package/dist/shared/error-handling/constants/guides.js +1 -0
  291. package/dist/shared/error-handling/constants/snippets.js +6 -0
  292. package/dist/shared/error-handling/index.js +1 -0
  293. package/dist/shared/error-handling/lib/isWagmiProviderMissingError.js +1 -0
  294. package/dist/shared/format/formatDurationCoarse.d.ts +29 -0
  295. package/dist/shared/format/formatDurationCoarse.js +1 -0
  296. package/dist/shared/format/formatDurationCompact.d.ts +28 -0
  297. package/dist/shared/format/formatDurationCompact.js +1 -0
  298. package/dist/shared/format/formatNetworkName.d.ts +27 -0
  299. package/dist/shared/format/formatNetworkName.js +1 -0
  300. package/dist/shared/format/formatPercent.d.ts +23 -0
  301. package/dist/shared/format/formatPercent.js +1 -0
  302. package/dist/shared/format/formatTimestamp.d.ts +22 -0
  303. package/dist/shared/format/formatTimestamp.js +1 -0
  304. package/dist/shared/format/formatTokenAmount.d.ts +46 -0
  305. package/dist/shared/format/formatTokenAmount.js +1 -0
  306. package/dist/shared/format/formatUsd.d.ts +41 -0
  307. package/dist/shared/format/formatUsd.js +1 -0
  308. package/dist/shared/format/shortenAddress.d.ts +27 -0
  309. package/dist/shared/format/shortenAddress.js +1 -0
  310. package/dist/shared/format/types.d.ts +33 -0
  311. package/dist/shared/i18n/KitI18nProvider.d.ts +23 -0
  312. package/dist/shared/i18n/KitI18nProvider.js +1 -0
  313. package/dist/shared/i18n/Trans.d.ts +39 -0
  314. package/dist/shared/i18n/Trans.js +1 -0
  315. package/dist/shared/i18n/createKitI18n.d.ts +41 -0
  316. package/dist/shared/i18n/createKitI18n.js +1 -0
  317. package/dist/shared/i18n/defaultI18n.js +1 -0
  318. package/dist/shared/i18n/getLocaleDirection.d.ts +24 -0
  319. package/dist/shared/i18n/getLocaleDirection.js +1 -0
  320. package/dist/shared/i18n/locales.d.ts +31 -0
  321. package/dist/shared/i18n/locales.js +1 -0
  322. package/dist/shared/i18n/useKitI18n.d.ts +14 -0
  323. package/dist/shared/i18n/useKitI18n.js +1 -0
  324. package/dist/shared/i18n/useLingui.d.ts +35 -0
  325. package/dist/shared/i18n/useLingui.js +1 -0
  326. package/dist/shared/i18n/useT.d.ts +25 -0
  327. package/dist/shared/i18n/useT.js +1 -0
  328. package/dist/shared/icons/AlertIcon.d.ts +12 -0
  329. package/dist/shared/icons/AlertIcon.js +1 -0
  330. package/dist/shared/icons/ArrowDownIcon.d.ts +7 -0
  331. package/dist/shared/icons/ArrowDownIcon.js +1 -0
  332. package/dist/shared/icons/ArrowRightIcon.d.ts +7 -0
  333. package/dist/shared/icons/ArrowRightIcon.js +1 -0
  334. package/dist/shared/icons/ArrowRightLeftIcon.d.ts +7 -0
  335. package/dist/shared/icons/ArrowRightLeftIcon.js +1 -0
  336. package/dist/shared/icons/CheckIcon.d.ts +7 -0
  337. package/dist/shared/icons/CheckIcon.js +1 -0
  338. package/dist/shared/icons/ChevronDownIcon.d.ts +7 -0
  339. package/dist/shared/icons/ChevronDownIcon.js +1 -0
  340. package/dist/shared/icons/ChevronLeftIcon.d.ts +7 -0
  341. package/dist/shared/icons/ChevronLeftIcon.js +1 -0
  342. package/dist/shared/icons/ChevronRightIcon.d.ts +7 -0
  343. package/dist/shared/icons/ChevronRightIcon.js +1 -0
  344. package/dist/shared/icons/ChevronUpIcon.d.ts +7 -0
  345. package/dist/shared/icons/ChevronUpIcon.js +1 -0
  346. package/dist/shared/icons/CircleArrowUpIcon.d.ts +7 -0
  347. package/dist/shared/icons/CircleArrowUpIcon.js +1 -0
  348. package/dist/shared/icons/CircleHelpIcon.d.ts +7 -0
  349. package/dist/shared/icons/CircleHelpIcon.js +1 -0
  350. package/dist/shared/icons/ClockIcon.d.ts +7 -0
  351. package/dist/shared/icons/ClockIcon.js +1 -0
  352. package/dist/shared/icons/CopyIcon.d.ts +7 -0
  353. package/dist/shared/icons/CopyIcon.js +1 -0
  354. package/dist/shared/icons/ExternalLinkIcon.d.ts +7 -0
  355. package/dist/shared/icons/ExternalLinkIcon.js +1 -0
  356. package/dist/shared/icons/InfoIcon.d.ts +7 -0
  357. package/dist/shared/icons/InfoIcon.js +1 -0
  358. package/dist/shared/icons/LoaderIcon.d.ts +7 -0
  359. package/dist/shared/icons/LoaderIcon.js +1 -0
  360. package/dist/shared/icons/MailIcon.d.ts +7 -0
  361. package/dist/shared/icons/MailIcon.js +1 -0
  362. package/dist/shared/icons/PackageIcon.d.ts +7 -0
  363. package/dist/shared/icons/PackageIcon.js +1 -0
  364. package/dist/shared/icons/QrCodeIcon.d.ts +7 -0
  365. package/dist/shared/icons/QrCodeIcon.js +1 -0
  366. package/dist/shared/icons/WalletIcon.d.ts +7 -0
  367. package/dist/shared/icons/WalletIcon.js +1 -0
  368. package/dist/shared/icons/XIcon.d.ts +7 -0
  369. package/dist/shared/icons/XIcon.js +1 -0
  370. package/dist/shared/icons/exchanges/BinanceIcon.d.ts +7 -0
  371. package/dist/shared/icons/exchanges/BinanceIcon.js +1 -0
  372. package/dist/shared/icons/exchanges/CoinbaseIcon.d.ts +7 -0
  373. package/dist/shared/icons/exchanges/CoinbaseIcon.js +1 -0
  374. package/dist/shared/icons/exchanges/KrakenIcon.d.ts +7 -0
  375. package/dist/shared/icons/exchanges/KrakenIcon.js +1 -0
  376. package/dist/shared/icons/exchanges/OkxIcon.d.ts +7 -0
  377. package/dist/shared/icons/exchanges/OkxIcon.js +1 -0
  378. package/dist/shared/icons/exchanges/RobinhoodIcon.d.ts +7 -0
  379. package/dist/shared/icons/exchanges/RobinhoodIcon.js +1 -0
  380. package/dist/shared/icons/exchanges/index.d.ts +5 -0
  381. package/dist/shared/icons/exchanges/index.js +1 -0
  382. package/dist/shared/orchestrator/failureReason.js +1 -0
  383. package/dist/shared/orchestrator/index.js +1 -0
  384. package/dist/shared/orchestrator/toFailure.js +1 -0
  385. package/dist/shared/orchestrator/types.d.ts +20 -0
  386. package/dist/shared/orchestrator/useDialogLifecycle.js +1 -0
  387. package/dist/shared/orchestrator/useDriverSettlementListener.js +1 -0
  388. package/dist/shared/orchestrator/useEffectiveState.js +1 -0
  389. package/dist/shared/orchestrator/useSettlementWatcher.js +1 -0
  390. package/dist/shared/orchestrator/userRejection.js +1 -0
  391. package/dist/shared/primitives/TxHashValue/TxHashValue.d.ts +20 -0
  392. package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -0
  393. package/dist/shared/primitives/TxHashValue/TxHashValue.slots.js +1 -0
  394. package/dist/shared/primitives/TxHashValue/TxHashValue.styles.js +1 -0
  395. package/dist/shared/primitives/TxHashValue/index.d.ts +2 -0
  396. package/dist/shared/primitives/TxHashValue/index.js +1 -0
  397. package/dist/shared/primitives/TxHashValue/types.d.ts +25 -0
  398. package/dist/shared/primitives/WalletValue/WalletValue.d.ts +40 -0
  399. package/dist/shared/primitives/WalletValue/WalletValue.js +1 -0
  400. package/dist/shared/primitives/WalletValue/index.d.ts +1 -0
  401. package/dist/shared/primitives/WalletValue/index.js +1 -0
  402. package/dist/shared/quote/index.js +1 -0
  403. package/dist/shared/quote/useQuoteCountdown.js +1 -0
  404. package/dist/shared/styles/tokens.stylex.js +1 -0
  405. package/dist/shared/ui/Alert/Alert.d.ts +105 -0
  406. package/dist/shared/ui/Alert/Alert.js +1 -0
  407. package/dist/shared/ui/Alert/Alert.slots.d.ts +10 -0
  408. package/dist/shared/ui/Alert/Alert.slots.js +1 -0
  409. package/dist/shared/ui/Alert/Alert.styles.js +1 -0
  410. package/dist/shared/ui/Alert/index.d.ts +2 -0
  411. package/dist/shared/ui/Alert/index.js +1 -0
  412. package/dist/shared/ui/AmountInput/AmountInput.d.ts +132 -0
  413. package/dist/shared/ui/AmountInput/AmountInput.js +1 -0
  414. package/dist/shared/ui/AmountInput/AmountInput.slots.d.ts +11 -0
  415. package/dist/shared/ui/AmountInput/AmountInput.slots.js +1 -0
  416. package/dist/shared/ui/AmountInput/AmountInput.styles.js +1 -0
  417. package/dist/shared/ui/AmountInput/attachInputNormalization.js +1 -0
  418. package/dist/shared/ui/AmountInput/context.js +1 -0
  419. package/dist/shared/ui/AmountInput/index.d.ts +3 -0
  420. package/dist/shared/ui/AmountInput/index.js +1 -0
  421. package/dist/shared/ui/AmountInput/useAutoShrinkFontSize.js +14 -0
  422. package/dist/shared/ui/AmountInput/utils.d.ts +12 -0
  423. package/dist/shared/ui/AmountInput/utils.js +1 -0
  424. package/dist/shared/ui/Badge/Badge.d.ts +89 -0
  425. package/dist/shared/ui/Badge/Badge.js +1 -0
  426. package/dist/shared/ui/Badge/Badge.slots.d.ts +7 -0
  427. package/dist/shared/ui/Badge/Badge.slots.js +1 -0
  428. package/dist/shared/ui/Badge/Badge.styles.js +1 -0
  429. package/dist/shared/ui/Badge/index.d.ts +2 -0
  430. package/dist/shared/ui/Badge/index.js +1 -0
  431. package/dist/shared/ui/Button/Button.d.ts +82 -0
  432. package/dist/shared/ui/Button/Button.js +1 -0
  433. package/dist/shared/ui/Button/Button.slots.d.ts +7 -0
  434. package/dist/shared/ui/Button/Button.slots.js +1 -0
  435. package/dist/shared/ui/Button/Button.styles.js +1 -0
  436. package/dist/shared/ui/Button/index.d.ts +2 -0
  437. package/dist/shared/ui/Button/index.js +1 -0
  438. package/dist/shared/ui/Card/Card.d.ts +93 -0
  439. package/dist/shared/ui/Card/Card.js +1 -0
  440. package/dist/shared/ui/Card/Card.slots.d.ts +10 -0
  441. package/dist/shared/ui/Card/Card.slots.js +1 -0
  442. package/dist/shared/ui/Card/Card.styles.js +1 -0
  443. package/dist/shared/ui/Card/index.d.ts +2 -0
  444. package/dist/shared/ui/Card/index.js +1 -0
  445. package/dist/shared/ui/Collapsible/Collapsible.d.ts +57 -0
  446. package/dist/shared/ui/Collapsible/Collapsible.js +1 -0
  447. package/dist/shared/ui/Collapsible/Collapsible.slots.d.ts +10 -0
  448. package/dist/shared/ui/Collapsible/Collapsible.slots.js +1 -0
  449. package/dist/shared/ui/Collapsible/Collapsible.styles.js +1 -0
  450. package/dist/shared/ui/Collapsible/index.d.ts +2 -0
  451. package/dist/shared/ui/Collapsible/index.js +1 -0
  452. package/dist/shared/ui/Details/Details.d.ts +76 -0
  453. package/dist/shared/ui/Details/Details.js +1 -0
  454. package/dist/shared/ui/Details/Details.slots.d.ts +9 -0
  455. package/dist/shared/ui/Details/Details.slots.js +1 -0
  456. package/dist/shared/ui/Details/Details.styles.js +1 -0
  457. package/dist/shared/ui/Details/index.d.ts +2 -0
  458. package/dist/shared/ui/Details/index.js +1 -0
  459. package/dist/shared/ui/Dialog/Dialog.d.ts +147 -0
  460. package/dist/shared/ui/Dialog/Dialog.js +1 -0
  461. package/dist/shared/ui/Dialog/Dialog.slots.d.ts +17 -0
  462. package/dist/shared/ui/Dialog/Dialog.slots.js +1 -0
  463. package/dist/shared/ui/Dialog/Dialog.styles.js +1 -0
  464. package/dist/shared/ui/Dialog/index.d.ts +2 -0
  465. package/dist/shared/ui/Dialog/index.js +1 -0
  466. package/dist/shared/ui/ExternalLink/ExternalLink.d.ts +41 -0
  467. package/dist/shared/ui/ExternalLink/ExternalLink.js +1 -0
  468. package/dist/shared/ui/ExternalLink/ExternalLink.slots.d.ts +7 -0
  469. package/dist/shared/ui/ExternalLink/ExternalLink.slots.js +1 -0
  470. package/dist/shared/ui/ExternalLink/ExternalLink.styles.js +1 -0
  471. package/dist/shared/ui/ExternalLink/index.d.ts +2 -0
  472. package/dist/shared/ui/ExternalLink/index.js +1 -0
  473. package/dist/shared/ui/ExternalLink/toSafeHref.js +1 -0
  474. package/dist/shared/ui/Field/Field.d.ts +185 -0
  475. package/dist/shared/ui/Field/Field.js +1 -0
  476. package/dist/shared/ui/Field/Field.slots.d.ts +21 -0
  477. package/dist/shared/ui/Field/Field.slots.js +1 -0
  478. package/dist/shared/ui/Field/Field.styles.js +1 -0
  479. package/dist/shared/ui/Field/index.d.ts +2 -0
  480. package/dist/shared/ui/Field/index.js +1 -0
  481. package/dist/shared/ui/IconButton/IconButton.d.ts +48 -0
  482. package/dist/shared/ui/IconButton/IconButton.js +1 -0
  483. package/dist/shared/ui/IconButton/IconButton.slots.d.ts +7 -0
  484. package/dist/shared/ui/IconButton/IconButton.slots.js +1 -0
  485. package/dist/shared/ui/IconButton/IconButton.styles.js +1 -0
  486. package/dist/shared/ui/IconButton/index.d.ts +2 -0
  487. package/dist/shared/ui/IconButton/index.js +1 -0
  488. package/dist/shared/ui/Image/Image.d.ts +43 -0
  489. package/dist/shared/ui/Image/Image.js +1 -0
  490. package/dist/shared/ui/Image/Image.slots.d.ts +14 -0
  491. package/dist/shared/ui/Image/Image.slots.js +1 -0
  492. package/dist/shared/ui/Image/Image.styles.js +1 -0
  493. package/dist/shared/ui/Image/index.d.ts +3 -0
  494. package/dist/shared/ui/Image/index.js +1 -0
  495. package/dist/shared/ui/Image/types.d.ts +131 -0
  496. package/dist/shared/ui/InputGroup/InputGroup.d.ts +129 -0
  497. package/dist/shared/ui/InputGroup/InputGroup.js +1 -0
  498. package/dist/shared/ui/InputGroup/InputGroup.slots.d.ts +16 -0
  499. package/dist/shared/ui/InputGroup/InputGroup.slots.js +1 -0
  500. package/dist/shared/ui/InputGroup/InputGroup.styles.js +1 -0
  501. package/dist/shared/ui/InputGroup/index.d.ts +2 -0
  502. package/dist/shared/ui/InputGroup/index.js +1 -0
  503. package/dist/shared/ui/LtrAtom/LtrAtom.d.ts +31 -0
  504. package/dist/shared/ui/LtrAtom/LtrAtom.js +1 -0
  505. package/dist/shared/ui/LtrAtom/index.d.ts +1 -0
  506. package/dist/shared/ui/LtrAtom/index.js +1 -0
  507. package/dist/shared/ui/ScrollArea/ScrollArea.d.ts +86 -0
  508. package/dist/shared/ui/ScrollArea/ScrollArea.js +1 -0
  509. package/dist/shared/ui/ScrollArea/ScrollArea.slots.d.ts +12 -0
  510. package/dist/shared/ui/ScrollArea/ScrollArea.slots.js +1 -0
  511. package/dist/shared/ui/ScrollArea/ScrollArea.styles.js +1 -0
  512. package/dist/shared/ui/ScrollArea/index.d.ts +2 -0
  513. package/dist/shared/ui/ScrollArea/index.js +1 -0
  514. package/dist/shared/ui/Select/Select.context.d.ts +10 -0
  515. package/dist/shared/ui/Select/Select.context.js +1 -0
  516. package/dist/shared/ui/Select/Select.d.ts +243 -0
  517. package/dist/shared/ui/Select/Select.js +1 -0
  518. package/dist/shared/ui/Select/Select.slots.d.ts +20 -0
  519. package/dist/shared/ui/Select/Select.slots.js +1 -0
  520. package/dist/shared/ui/Select/Select.styles.js +1 -0
  521. package/dist/shared/ui/Select/index.d.ts +3 -0
  522. package/dist/shared/ui/Select/index.js +1 -0
  523. package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +83 -0
  524. package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -0
  525. package/dist/shared/ui/SelectableTile/SelectableTile.slots.d.ts +7 -0
  526. package/dist/shared/ui/SelectableTile/SelectableTile.slots.js +1 -0
  527. package/dist/shared/ui/SelectableTile/SelectableTile.styles.js +1 -0
  528. package/dist/shared/ui/SelectableTile/SelectableTileGroup.d.ts +82 -0
  529. package/dist/shared/ui/SelectableTile/SelectableTileGroup.js +1 -0
  530. package/dist/shared/ui/SelectableTile/index.d.ts +3 -0
  531. package/dist/shared/ui/SelectableTile/index.js +1 -0
  532. package/dist/shared/ui/Skeleton/Skeleton.d.ts +41 -0
  533. package/dist/shared/ui/Skeleton/Skeleton.js +1 -0
  534. package/dist/shared/ui/Skeleton/Skeleton.slots.d.ts +7 -0
  535. package/dist/shared/ui/Skeleton/Skeleton.slots.js +1 -0
  536. package/dist/shared/ui/Skeleton/Skeleton.styles.js +1 -0
  537. package/dist/shared/ui/Skeleton/index.d.ts +2 -0
  538. package/dist/shared/ui/Skeleton/index.js +1 -0
  539. package/dist/shared/ui/Text/Text.d.ts +87 -0
  540. package/dist/shared/ui/Text/Text.js +1 -0
  541. package/dist/shared/ui/Text/Text.slots.d.ts +7 -0
  542. package/dist/shared/ui/Text/Text.slots.js +1 -0
  543. package/dist/shared/ui/Text/Text.styles.js +1 -0
  544. package/dist/shared/ui/Text/index.d.ts +2 -0
  545. package/dist/shared/ui/Text/index.js +1 -0
  546. package/dist/shared/ui/TokenLogo/TokenLogo.d.ts +41 -0
  547. package/dist/shared/ui/TokenLogo/TokenLogo.js +1 -0
  548. package/dist/shared/ui/TokenLogo/index.d.ts +2 -0
  549. package/dist/shared/ui/TokenLogo/index.js +1 -0
  550. package/dist/shared/ui/TokenLogo/types.d.ts +64 -0
  551. package/dist/shared/ui/Tooltip/Tooltip.d.ts +171 -0
  552. package/dist/shared/ui/Tooltip/Tooltip.js +1 -0
  553. package/dist/shared/ui/Tooltip/Tooltip.slots.d.ts +11 -0
  554. package/dist/shared/ui/Tooltip/Tooltip.slots.js +1 -0
  555. package/dist/shared/ui/Tooltip/Tooltip.styles.js +1 -0
  556. package/dist/shared/ui/Tooltip/index.d.ts +2 -0
  557. package/dist/shared/ui/Tooltip/index.js +1 -0
  558. package/dist/shared/ui/WalletRow/WalletRow.d.ts +55 -0
  559. package/dist/shared/ui/WalletRow/WalletRow.js +1 -0
  560. package/dist/shared/ui/WalletRow/WalletRow.slots.d.ts +7 -0
  561. package/dist/shared/ui/WalletRow/WalletRow.slots.js +1 -0
  562. package/dist/shared/ui/WalletRow/WalletRow.styles.js +1 -0
  563. package/dist/shared/ui/WalletRow/index.d.ts +2 -0
  564. package/dist/shared/ui/WalletRow/index.js +1 -0
  565. package/dist/shared/utils/explorers.js +1 -0
  566. package/dist/shared/utils/joinClassNames.js +1 -0
  567. package/dist/shared/utils/logos/api.d.ts +54 -0
  568. package/dist/shared/utils/logos/api.js +1 -0
  569. package/dist/shared/utils/logos/chains.d.ts +32 -0
  570. package/dist/shared/utils/logos/chains.js +1 -0
  571. package/dist/shared/utils/logos/conventionUrls.js +1 -0
  572. package/dist/shared/utils/logos/index.js +1 -0
  573. package/dist/shared/utils/logos/resolveLogoSrc.js +1 -0
  574. package/dist/shared/utils/logos/types.d.ts +62 -0
  575. package/dist/shared/utils/mergeClassName.js +1 -0
  576. package/dist/shared/utils/mergeStyle.js +1 -0
  577. package/dist/shared/wallet/resolveSupportedChainIds.js +1 -0
  578. package/dist/shared/wallet/resolveSupportedChains.js +1 -0
  579. package/dist/shared/wallet/types.d.ts +103 -0
  580. package/dist/shared/wallet/useWalletState.d.ts +21 -0
  581. package/dist/shared/wallet/useWalletState.js +1 -0
  582. package/dist/shared/widgets/amount-entry/compound/AmountEntry.d.ts +59 -0
  583. package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -0
  584. package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.d.ts +15 -0
  585. package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.js +1 -0
  586. package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -0
  587. package/dist/shared/widgets/amount-entry/compound/components/Flow.d.ts +14 -0
  588. package/dist/shared/widgets/amount-entry/compound/components/Flow.js +1 -0
  589. package/dist/shared/widgets/amount-entry/compound/components/Footer.d.ts +22 -0
  590. package/dist/shared/widgets/amount-entry/compound/components/Footer.js +1 -0
  591. package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +15 -0
  592. package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -0
  593. package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.d.ts +22 -0
  594. package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -0
  595. package/dist/shared/widgets/amount-entry/compound/components/Hero/StaticBand.js +1 -0
  596. package/dist/shared/widgets/amount-entry/compound/components/Hero/SwapBackdrop.js +1 -0
  597. package/dist/shared/widgets/amount-entry/compound/components/Hero/index.d.ts +1 -0
  598. package/dist/shared/widgets/amount-entry/compound/components/Hero/index.js +1 -0
  599. package/dist/shared/widgets/amount-entry/compound/components/Hero/transitions.js +1 -0
  600. package/dist/shared/widgets/amount-entry/compound/components/Hero/useSwapState.js +1 -0
  601. package/dist/shared/widgets/amount-entry/compound/components/Hero/utils.js +1 -0
  602. package/dist/shared/widgets/amount-entry/compound/components/Pills.d.ts +22 -0
  603. package/dist/shared/widgets/amount-entry/compound/components/Pills.js +1 -0
  604. package/dist/shared/widgets/amount-entry/compound/context.js +1 -0
  605. package/dist/shared/widgets/amount-entry/compound/index.d.ts +3 -0
  606. package/dist/shared/widgets/amount-entry/compound/index.js +1 -0
  607. package/dist/shared/widgets/amount-entry/compound/types.d.ts +224 -0
  608. package/dist/shared/widgets/asset-descriptor.d.ts +27 -0
  609. package/dist/shared/widgets/asset-descriptor.js +1 -0
  610. package/dist/shared/widgets/asset-picker/compound/AssetPicker.d.ts +51 -0
  611. package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -0
  612. package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.d.ts +11 -0
  613. package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.js +1 -0
  614. package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -0
  615. package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +30 -0
  616. package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -0
  617. package/dist/shared/widgets/asset-picker/compound/components/Footer.d.ts +16 -0
  618. package/dist/shared/widgets/asset-picker/compound/components/Footer.js +1 -0
  619. package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +19 -0
  620. package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -0
  621. package/dist/shared/widgets/asset-picker/compound/components/List.d.ts +22 -0
  622. package/dist/shared/widgets/asset-picker/compound/components/List.js +1 -0
  623. package/dist/shared/widgets/asset-picker/compound/context.js +1 -0
  624. package/dist/shared/widgets/asset-picker/compound/index.d.ts +3 -0
  625. package/dist/shared/widgets/asset-picker/compound/index.js +1 -0
  626. package/dist/shared/widgets/asset-picker/compound/types.d.ts +212 -0
  627. package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.d.ts +64 -0
  628. package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.js +1 -0
  629. package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.d.ts +16 -0
  630. package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.js +1 -0
  631. package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.styles.js +1 -0
  632. package/dist/shared/widgets/confirm-transfer/compound/components/Amounts.d.ts +15 -0
  633. package/dist/shared/widgets/confirm-transfer/compound/components/Amounts.js +1 -0
  634. package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.d.ts +17 -0
  635. package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.js +1 -0
  636. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.d.ts +15 -0
  637. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -0
  638. package/dist/shared/widgets/confirm-transfer/compound/components/Footer.d.ts +26 -0
  639. package/dist/shared/widgets/confirm-transfer/compound/components/Footer.js +1 -0
  640. package/dist/shared/widgets/confirm-transfer/compound/components/Header.d.ts +13 -0
  641. package/dist/shared/widgets/confirm-transfer/compound/components/Header.js +1 -0
  642. package/dist/shared/widgets/confirm-transfer/compound/components/Hero.d.ts +16 -0
  643. package/dist/shared/widgets/confirm-transfer/compound/components/Hero.js +1 -0
  644. package/dist/shared/widgets/confirm-transfer/compound/components/Meta.d.ts +16 -0
  645. package/dist/shared/widgets/confirm-transfer/compound/components/Meta.js +1 -0
  646. package/dist/shared/widgets/confirm-transfer/compound/components/QuoteTimer.js +1 -0
  647. package/dist/shared/widgets/confirm-transfer/compound/components/splitAmount.js +1 -0
  648. package/dist/shared/widgets/confirm-transfer/compound/context.js +1 -0
  649. package/dist/shared/widgets/confirm-transfer/compound/index.d.ts +3 -0
  650. package/dist/shared/widgets/confirm-transfer/compound/index.js +1 -0
  651. package/dist/shared/widgets/confirm-transfer/compound/types.d.ts +338 -0
  652. package/dist/shared/widgets/error-state/compound/ErrorState.d.ts +96 -0
  653. package/dist/shared/widgets/error-state/compound/ErrorState.js +1 -0
  654. package/dist/shared/widgets/error-state/compound/ErrorState.slots.d.ts +18 -0
  655. package/dist/shared/widgets/error-state/compound/ErrorState.slots.js +1 -0
  656. package/dist/shared/widgets/error-state/compound/ErrorState.styles.js +1 -0
  657. package/dist/shared/widgets/error-state/compound/components/Actions.d.ts +17 -0
  658. package/dist/shared/widgets/error-state/compound/components/Actions.js +1 -0
  659. package/dist/shared/widgets/error-state/compound/components/AssetValue.d.ts +20 -0
  660. package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -0
  661. package/dist/shared/widgets/error-state/compound/components/Detail.d.ts +14 -0
  662. package/dist/shared/widgets/error-state/compound/components/Detail.js +1 -0
  663. package/dist/shared/widgets/error-state/compound/components/Details.d.ts +12 -0
  664. package/dist/shared/widgets/error-state/compound/components/Details.js +1 -0
  665. package/dist/shared/widgets/error-state/compound/components/DisclosureChevron.d.ts +11 -0
  666. package/dist/shared/widgets/error-state/compound/components/DisclosureChevron.js +1 -0
  667. package/dist/shared/widgets/error-state/compound/components/Header.d.ts +13 -0
  668. package/dist/shared/widgets/error-state/compound/components/Header.js +1 -0
  669. package/dist/shared/widgets/error-state/compound/components/HelpInfo.d.ts +10 -0
  670. package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -0
  671. package/dist/shared/widgets/error-state/compound/components/Hero.d.ts +9 -0
  672. package/dist/shared/widgets/error-state/compound/components/Hero.js +1 -0
  673. package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +18 -0
  674. package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -0
  675. package/dist/shared/widgets/error-state/compound/components/Rows.d.ts +57 -0
  676. package/dist/shared/widgets/error-state/compound/components/Rows.js +1 -0
  677. package/dist/shared/widgets/error-state/compound/components/StatusValue.d.ts +14 -0
  678. package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -0
  679. package/dist/shared/widgets/error-state/compound/context.js +1 -0
  680. package/dist/shared/widgets/error-state/compound/index.d.ts +3 -0
  681. package/dist/shared/widgets/error-state/compound/index.js +1 -0
  682. package/dist/shared/widgets/error-state/compound/types.d.ts +291 -0
  683. package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +77 -0
  684. package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -0
  685. package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +15 -0
  686. package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -0
  687. package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -0
  688. package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +17 -0
  689. package/dist/shared/widgets/processing-state/compound/components/Actions.js +1 -0
  690. package/dist/shared/widgets/processing-state/compound/components/Detail.d.ts +14 -0
  691. package/dist/shared/widgets/processing-state/compound/components/Detail.js +1 -0
  692. package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +12 -0
  693. package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -0
  694. package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +15 -0
  695. package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -0
  696. package/dist/shared/widgets/processing-state/compound/components/Hero.d.ts +16 -0
  697. package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -0
  698. package/dist/shared/widgets/processing-state/compound/components/Rows.d.ts +36 -0
  699. package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -0
  700. package/dist/shared/widgets/processing-state/compound/components/StatusPill.d.ts +13 -0
  701. package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -0
  702. package/dist/shared/widgets/processing-state/compound/context.js +1 -0
  703. package/dist/shared/widgets/processing-state/compound/index.d.ts +3 -0
  704. package/dist/shared/widgets/processing-state/compound/index.js +1 -0
  705. package/dist/shared/widgets/processing-state/compound/types.d.ts +216 -0
  706. package/dist/shared/widgets/success-state/compound/SuccessState.d.ts +105 -0
  707. package/dist/shared/widgets/success-state/compound/SuccessState.js +1 -0
  708. package/dist/shared/widgets/success-state/compound/SuccessState.slots.d.ts +21 -0
  709. package/dist/shared/widgets/success-state/compound/SuccessState.slots.js +1 -0
  710. package/dist/shared/widgets/success-state/compound/SuccessState.styles.js +1 -0
  711. package/dist/shared/widgets/success-state/compound/components/Actions.d.ts +18 -0
  712. package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -0
  713. package/dist/shared/widgets/success-state/compound/components/AssetValue.d.ts +18 -0
  714. package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -0
  715. package/dist/shared/widgets/success-state/compound/components/Detail.d.ts +18 -0
  716. package/dist/shared/widgets/success-state/compound/components/Detail.js +1 -0
  717. package/dist/shared/widgets/success-state/compound/components/Details.d.ts +16 -0
  718. package/dist/shared/widgets/success-state/compound/components/Details.js +1 -0
  719. package/dist/shared/widgets/success-state/compound/components/Header.d.ts +13 -0
  720. package/dist/shared/widgets/success-state/compound/components/Header.js +1 -0
  721. package/dist/shared/widgets/success-state/compound/components/Headline.d.ts +16 -0
  722. package/dist/shared/widgets/success-state/compound/components/Headline.js +1 -0
  723. package/dist/shared/widgets/success-state/compound/components/Hero.d.ts +10 -0
  724. package/dist/shared/widgets/success-state/compound/components/Hero.js +1 -0
  725. package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +19 -0
  726. package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -0
  727. package/dist/shared/widgets/success-state/compound/components/RouteValue.d.ts +15 -0
  728. package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -0
  729. package/dist/shared/widgets/success-state/compound/components/Rows.d.ts +69 -0
  730. package/dist/shared/widgets/success-state/compound/components/Rows.js +1 -0
  731. package/dist/shared/widgets/success-state/compound/components/StatusPill.d.ts +13 -0
  732. package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -0
  733. package/dist/shared/widgets/success-state/compound/context.js +1 -0
  734. package/dist/shared/widgets/success-state/compound/index.d.ts +3 -0
  735. package/dist/shared/widgets/success-state/compound/index.js +1 -0
  736. package/dist/shared/widgets/success-state/compound/types.d.ts +307 -0
  737. package/dist/storage/adapters.d.ts +29 -0
  738. package/dist/storage/adapters.js +1 -0
  739. package/dist/storage/context.d.ts +62 -0
  740. package/dist/storage/context.js +1 -0
  741. package/dist/storage/createKitStorage.d.ts +45 -0
  742. package/dist/storage/createKitStorage.js +1 -0
  743. package/dist/storage/index.d.ts +4 -0
  744. package/dist/storage/index.js +1 -0
  745. package/dist/storage/types.d.ts +26 -0
  746. package/dist/stridge/StridgeContext.d.ts +29 -0
  747. package/dist/stridge/StridgeContext.js +1 -0
  748. package/dist/stridge/StridgeProvider.d.ts +158 -0
  749. package/dist/stridge/StridgeProvider.js +1 -0
  750. package/dist/stridge/stubs.js +1 -0
  751. package/dist/styles/index.css +3494 -0
  752. package/dist/types.d.ts +15 -0
  753. package/dist/types.js +1 -0
  754. package/dist/ui/index.d.ts +48 -0
  755. package/dist/ui/index.js +1 -0
  756. package/dist/utils/src/use-copy-to-clipboard.js +1 -0
  757. package/dist/wallet/index.d.ts +3 -0
  758. package/dist/wallet/index.js +1 -0
  759. package/dist/withdraw/compound/index.d.ts +22 -0
  760. package/dist/withdraw/compound/index.js +1 -0
  761. package/dist/withdraw/dialog/index.d.ts +2 -0
  762. package/dist/withdraw/dialog/index.js +1 -0
  763. package/package.json +156 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Stridge Foundation
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,91 @@
1
+ import { DepositDriver } from "./flows/deposit/driver/types.js";
2
+ import { WithdrawDriver } from "./flows/withdraw/driver/types.js";
3
+ import { KitScope } from "./scope/KitScope.js";
4
+ import { KitI18nConfig } from "./shared/i18n/createKitI18n.js";
5
+ import { KitStoragePersistence } from "./storage/types.js";
6
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
7
+
8
+ //#region src/KitProvider.d.ts
9
+ /**
10
+ * Lower-level provider for `@stridge/kit`. Establishes kit scope (theme / accent / radius /
11
+ * direction), the active locale (`i18n`), and mounts whichever flow drivers + state machines
12
+ * the host enables.
13
+ *
14
+ * Pass `deposit` to enable the deposit flow. Pass `withdraw` to enable the withdraw flow. Both
15
+ * are optional; mount the slot that matches the dialogs you want active. At least one is
16
+ * expected (the kit currently has nothing to do without a flow driver).
17
+ *
18
+ * Most integrators reach for `<StridgeProvider />` instead, which pre-wires the entire flow
19
+ * against Stridge's gateway. Reach for `<KitProvider />` directly only when you're plugging in a
20
+ * custom (non-Stridge) {@link DepositDriver} or {@link WithdrawDriver}.
21
+ *
22
+ * The provider does not render any dialog UI on its own — mount `<DepositDialog />` from
23
+ * `@stridge/kit/deposit/dialog` and / or `<WithdrawDialog />` from `@stridge/kit/withdraw/dialog`
24
+ * wherever you want the dialogs to live.
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * import { KitProvider, useDeposit } from "@stridge/kit";
29
+ * import { messages as es } from "@stridge/kit/i18n/locales/es";
30
+ * import { DepositDialog } from "@stridge/kit/deposit/dialog";
31
+ *
32
+ * <KitProvider deposit={depositDriver} i18n={{ locale: "es", catalogs: { es } }}>
33
+ * <YourApp />
34
+ * <DepositDialog />
35
+ * </KitProvider>;
36
+ *
37
+ * function DepositButton() {
38
+ * const { open } = useDeposit();
39
+ * return <button onClick={() => open()}>Deposit</button>;
40
+ * }
41
+ * ```
42
+ */
43
+ declare function KitProvider({
44
+ children,
45
+ i18n,
46
+ direction,
47
+ deposit,
48
+ withdraw,
49
+ storage,
50
+ storageNamespace,
51
+ ...scopeProps
52
+ }: KitProvider.Props): _$react_jsx_runtime0.JSX.Element;
53
+ declare namespace KitProvider {
54
+ interface Props extends KitScope.Props {
55
+ /**
56
+ * Active locale config. Pass `{ locale, catalogs }` — the kit mounts a per-request `I18n`
57
+ * instance from this config. Locales not present in `catalogs` fall back to the source
58
+ * English string per leaf.
59
+ */
60
+ i18n?: KitI18nConfig;
61
+ /**
62
+ * Host-supplied {@link DepositDriver} — source of reactive data + imperative actions for
63
+ * the deposit flow. When supplied, the provider mounts the deposit driver context and
64
+ * FSM controller; widgets at `@stridge/kit/deposit/widgets` and the dialog at
65
+ * `@stridge/kit/deposit/dialog` read from it.
66
+ */
67
+ deposit?: DepositDriver;
68
+ /**
69
+ * Host-supplied {@link WithdrawDriver} — source of reactive data + imperative actions for
70
+ * the withdraw flow. When supplied, the provider mounts the withdraw driver context and
71
+ * FSM controller; widgets at `@stridge/kit/withdraw/widgets` and the dialog at
72
+ * `@stridge/kit/withdraw/dialog` read from it.
73
+ */
74
+ withdraw?: WithdrawDriver;
75
+ /**
76
+ * Persistence backing the kit's per-tab state (banner acknowledgments, future kit-wide
77
+ * features). One of `"session"` (default — `sessionStorage`, forgotten on tab close),
78
+ * `"local"` (`localStorage`, survives restarts), `"memory"` (in-process only, ideal for
79
+ * tests), or a custom adapter object. See {@link KitStoragePersistence}.
80
+ */
81
+ storage?: KitStoragePersistence;
82
+ /**
83
+ * Prefix every key the kit writes under. Two `<KitProvider />` instances on the same
84
+ * page sharing a backend (e.g. both on `"session"`) should pick distinct namespaces to
85
+ * keep state isolated. Defaults to `stridge-kit:storage:v1`.
86
+ */
87
+ storageNamespace?: string;
88
+ }
89
+ }
90
+ //#endregion
91
+ export { KitProvider };
@@ -0,0 +1 @@
1
+ "use client";import{KitStorageProvider as e}from"./storage/context.js";import"./storage/index.js";import{DepositDriverProvider as t}from"./flows/deposit/driver/context.js";import{getLocaleDirection as n}from"./shared/i18n/getLocaleDirection.js";import{KitI18nProvider as r}from"./shared/i18n/KitI18nProvider.js";import"./i18n/index.js";import{GatewayController as i}from"./flows/deposit/orchestrator/controller.js";import{WithdrawDriverProvider as a}from"./flows/withdraw/driver/context.js";import{WithdrawControllerProvider as o}from"./flows/withdraw/orchestrator/controller.js";import{KitScope as s}from"./scope/KitScope.js";import"./scope/index.js";import{jsx as c}from"react/jsx-runtime";function l({children:l,i18n:u,direction:d,deposit:f,withdraw:p,storage:m,storageNamespace:h,...g}){let _=n(u?.locale),v=l;return p&&(v=c(a,{driver:p,children:c(o,{children:v})})),f&&(v=c(t,{driver:f,children:c(i,{children:v})})),c(r,{locale:u?.locale,catalogs:u?.catalogs,children:c(s,{...g,direction:d??_,children:c(e,{storage:m,namespace:h,children:v})})})}export{l as KitProvider};
@@ -0,0 +1,5 @@
1
+ import { Entity, SettlementFailureKind, TxRef } from "../../../shared/driver/types.js";
2
+ import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload } from "../../../flows/deposit/driver/payloads.js";
3
+ import { DepositDriver, DepositSnapshot, FetchActiveSettlementInput, RequestQuoteInput, SettlementSnapshot, SubmitDepositInput, WatchSettlementInput, WatchSourceTxInput } from "../../../flows/deposit/driver/types.js";
4
+ import { DepositDriverProvider, KitDriverContext, useDepositDriverInstance, useDepositSnapshot } from "../../../flows/deposit/driver/context.js";
5
+ export { type AcceptedAssetPayload, type AddressItemPayload, type AssetPayload, type BalanceItemPayload, type BrandPayload, type ChainPayload, type DepositDriver, DepositDriverProvider, type DepositSnapshot, type Entity, type FetchActiveSettlementInput, KitDriverContext, type QuoteBreakdownPayload, type QuotePayload, type QuoteRoutePayload, type RequestQuoteInput, type SettlementFailureKind, type SettlementFailurePayload, type SettlementPayload, type SettlementPendingPayload, type SettlementSnapshot, type SettlementSuccessPayload, type SourceWalletPayload, type SubmitDepositInput, type TargetPayload, type TxRef, type WalletInfo, type WalletPayload, type WatchSettlementInput, type WatchSourceTxInput, useDepositDriverInstance, useDepositSnapshot };
@@ -0,0 +1 @@
1
+ import{DepositDriverProvider as e,KitDriverContext as t,useDepositDriverInstance as n,useDepositSnapshot as r}from"../../../flows/deposit/driver/context.js";export{e as DepositDriverProvider,t as KitDriverContext,n as useDepositDriverInstance,r as useDepositSnapshot};
@@ -0,0 +1,11 @@
1
+ import { DialogShell, DialogShellControls, DialogShellProps } from "../../../shared/dialog/DialogShell.js";
2
+ import { AmountEntry } from "../../../flows/deposit/widgets/amount-entry/AmountEntry.js";
3
+ import { AssetPicker } from "../../../flows/deposit/widgets/asset-picker/AssetPicker.js";
4
+ import { ConfirmDeposit } from "../../../flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js";
5
+ import { Deposit } from "../../../flows/deposit/widgets/deposit/Deposit.js";
6
+ import { DepositStatusBanner } from "../../../flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js";
7
+ import { ErrorState } from "../../../flows/deposit/widgets/error-state/ErrorState.js";
8
+ import { ProcessingState } from "../../../flows/deposit/widgets/processing-state/ProcessingState.js";
9
+ import { SuccessState } from "../../../flows/deposit/widgets/success-state/SuccessState.js";
10
+ import { TransferCrypto } from "../../../flows/deposit/widgets/transfer-crypto/TransferCrypto.js";
11
+ export { AmountEntry, AssetPicker, ConfirmDeposit, Deposit, DepositStatusBanner, DialogShell, type DialogShellControls, type DialogShellProps, ErrorState, ProcessingState, SuccessState, TransferCrypto };
@@ -0,0 +1 @@
1
+ import{DialogShell as e}from"../../../shared/dialog/DialogShell.js";import{AmountEntry as t}from"../../../flows/deposit/widgets/amount-entry/AmountEntry.js";import"../../../flows/deposit/widgets/amount-entry/index.js";import{AssetPicker as n}from"../../../flows/deposit/widgets/asset-picker/AssetPicker.js";import"../../../flows/deposit/widgets/asset-picker/index.js";import{ConfirmDeposit as r}from"../../../flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js";import"../../../flows/deposit/widgets/confirm-deposit/index.js";import{Deposit as i}from"../../../flows/deposit/widgets/deposit/Deposit.js";import"../../../flows/deposit/widgets/deposit/index.js";import{DepositStatusBanner as a}from"../../../flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js";import"../../../flows/deposit/widgets/deposit-status-banner/index.js";import{ErrorState as o}from"../../../flows/deposit/widgets/error-state/ErrorState.js";import"../../../flows/deposit/widgets/error-state/index.js";import{ProcessingState as s}from"../../../flows/deposit/widgets/processing-state/ProcessingState.js";import"../../../flows/deposit/widgets/processing-state/index.js";import{SuccessState as c}from"../../../flows/deposit/widgets/success-state/SuccessState.js";import"../../../flows/deposit/widgets/success-state/index.js";import{TransferCrypto as l}from"../../../flows/deposit/widgets/transfer-crypto/TransferCrypto.js";import"../../../flows/deposit/widgets/transfer-crypto/index.js";export{t as AmountEntry,n as AssetPicker,r as ConfirmDeposit,i as Deposit,a as DepositStatusBanner,e as DialogShell,o as ErrorState,s as ProcessingState,c as SuccessState,l as TransferCrypto};
@@ -0,0 +1,6 @@
1
+ import { StridgeChainSlug, StridgeRpc, StridgeRpcConfig, StridgeRpcWaitInput, createStridgeRpc } from "../../../drivers/stridge/rpc.js";
2
+ import { STRIDGE_DEFAULT_ENVIRONMENT, STRIDGE_DEFAULT_MIN_DEPOSIT_USD, StridgeDriverConfig, StridgeDriverDestination, StridgeEnvironment, StridgePollIntervals, StridgeTokenIconResolverEntry } from "../../../drivers/stridge/types.js";
3
+ import { CreateStridgeDepositDriverInput, createStridgeDepositDriver } from "../../../drivers/stridge/createStridgeDepositDriver.js";
4
+ import { CreateStridgeWithdrawDriverInput, StridgeWithdrawCurrency, createStridgeWithdrawDriver } from "../../../drivers/stridge/createStridgeWithdrawDriver.js";
5
+ import { GatewayStartResponse, SupportedAssetsResponse } from "@stridge/sdk";
6
+ export { type CreateStridgeDepositDriverInput, type CreateStridgeWithdrawDriverInput, type GatewayStartResponse, STRIDGE_DEFAULT_ENVIRONMENT, STRIDGE_DEFAULT_MIN_DEPOSIT_USD, type StridgeChainSlug, type StridgeDriverConfig, type StridgeDriverDestination, type StridgeEnvironment, type StridgePollIntervals, type StridgeRpc, type StridgeRpcConfig, type StridgeRpcWaitInput, type StridgeTokenIconResolverEntry, type StridgeWithdrawCurrency, type SupportedAssetsResponse, createStridgeDepositDriver, createStridgeRpc, createStridgeWithdrawDriver };
@@ -0,0 +1 @@
1
+ import{STRIDGE_DEFAULT_ENVIRONMENT as e,STRIDGE_DEFAULT_MIN_DEPOSIT_USD as t}from"../../../drivers/stridge/types.js";import{createStridgeRpc as n}from"../../../drivers/stridge/rpc.js";import{createStridgeDepositDriver as r}from"../../../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as i}from"../../../drivers/stridge/createStridgeWithdrawDriver.js";export{e as STRIDGE_DEFAULT_ENVIRONMENT,t as STRIDGE_DEFAULT_MIN_DEPOSIT_USD,r as createStridgeDepositDriver,n as createStridgeRpc,i as createStridgeWithdrawDriver};
@@ -0,0 +1,5 @@
1
+ import { DEFAULT_ADDRESSES_PAYLOAD, DEFAULT_BRAND_PAYLOAD, DEFAULT_TARGET_RAW, DEFAULT_WALLET_INFO, buildDefaultAddressesPayload, buildDefaultBalances, buildDefaultFailurePayload, buildDefaultPendingPayload, buildDefaultQuotePayload, buildDefaultSuccessPayload, buildDefaultTargetPayload, buildDefaultWalletPayload, buildSettlementPayload } from "../../../drivers/stridge-mock/fixtures.js";
2
+ import { MockTriggers } from "../../../drivers/stridge-mock/triggers.js";
3
+ import { CreateStridgeMockDriverInput, MockDriverHandle, createStridgeMockDriver } from "../../../drivers/stridge-mock/createStridgeMockDriver.js";
4
+ import { CreateStridgeMockWithdrawDriverInput, MockWithdrawDriverHandle, MockWithdrawTriggers, buildDefaultWithdrawableBalances, buildDefaultWithdrawalFailurePayload, buildDefaultWithdrawalPendingPayload, buildDefaultWithdrawalQuotePayload, buildDefaultWithdrawalSuccessPayload, createStridgeMockWithdrawDriver } from "../../../drivers/stridge-mock/createStridgeMockWithdrawDriver.js";
5
+ export { type CreateStridgeMockDriverInput, type CreateStridgeMockWithdrawDriverInput, DEFAULT_ADDRESSES_PAYLOAD, DEFAULT_BRAND_PAYLOAD, DEFAULT_TARGET_RAW, DEFAULT_WALLET_INFO, type MockDriverHandle, type MockTriggers, type MockWithdrawDriverHandle, type MockWithdrawTriggers, buildDefaultAddressesPayload, buildDefaultBalances, buildDefaultFailurePayload, buildDefaultPendingPayload, buildDefaultQuotePayload, buildDefaultSuccessPayload, buildDefaultTargetPayload, buildDefaultWalletPayload, buildDefaultWithdrawableBalances, buildDefaultWithdrawalFailurePayload, buildDefaultWithdrawalPendingPayload, buildDefaultWithdrawalQuotePayload, buildDefaultWithdrawalSuccessPayload, buildSettlementPayload, createStridgeMockDriver as createStridgeMockDepositDriver, createStridgeMockDriver, createStridgeMockWithdrawDriver };
@@ -0,0 +1 @@
1
+ import{DEFAULT_ADDRESSES_PAYLOAD as e,DEFAULT_BRAND_PAYLOAD as t,DEFAULT_TARGET_RAW as n,DEFAULT_WALLET_INFO as r,buildDefaultAddressesPayload as i,buildDefaultBalances as a,buildDefaultFailurePayload as o,buildDefaultPendingPayload as s,buildDefaultQuotePayload as c,buildDefaultSuccessPayload as l,buildDefaultTargetPayload as u,buildDefaultWalletPayload as d,buildSettlementPayload as f}from"../../../drivers/stridge-mock/fixtures.js";import{createStridgeMockDriver as p}from"../../../drivers/stridge-mock/createStridgeMockDriver.js";import{buildDefaultWithdrawableBalances as m,buildDefaultWithdrawalFailurePayload as h,buildDefaultWithdrawalPendingPayload as g,buildDefaultWithdrawalQuotePayload as _,buildDefaultWithdrawalSuccessPayload as v,createStridgeMockWithdrawDriver as y}from"../../../drivers/stridge-mock/createStridgeMockWithdrawDriver.js";export{e as DEFAULT_ADDRESSES_PAYLOAD,t as DEFAULT_BRAND_PAYLOAD,n as DEFAULT_TARGET_RAW,r as DEFAULT_WALLET_INFO,i as buildDefaultAddressesPayload,a as buildDefaultBalances,o as buildDefaultFailurePayload,s as buildDefaultPendingPayload,c as buildDefaultQuotePayload,l as buildDefaultSuccessPayload,u as buildDefaultTargetPayload,d as buildDefaultWalletPayload,m as buildDefaultWithdrawableBalances,h as buildDefaultWithdrawalFailurePayload,g as buildDefaultWithdrawalPendingPayload,_ as buildDefaultWithdrawalQuotePayload,v as buildDefaultWithdrawalSuccessPayload,f as buildSettlementPayload,p as createStridgeMockDepositDriver,p as createStridgeMockDriver,y as createStridgeMockWithdrawDriver};
@@ -0,0 +1,2 @@
1
+ import { KitProvider } from "../KitProvider.js";
2
+ export { KitProvider };
@@ -0,0 +1 @@
1
+ import{KitProvider as e}from"../KitProvider.js";export{e as KitProvider};
@@ -0,0 +1,6 @@
1
+ import { Entity, SettlementFailureKind, TxRef } from "../../../shared/driver/types.js";
2
+ import { ReceiveOptionDto, ReceiveOptionsResponse, WithdrawableBalanceDto, WithdrawableBalancesResponse, WithdrawalQuoteDto, WithdrawalQuoteResponse, WithdrawalSettlementDto, WithdrawalSettlementResponse } from "../../../flows/withdraw/driver/dto.js";
3
+ import { ReceiveChainPayload, ReceiveTokenOptionPayload, WithdrawableBalanceItemPayload, WithdrawalQuoteBreakdownPayload, WithdrawalQuotePayload, WithdrawalReceiveAssetPayload, WithdrawalSettlementFailurePayload, WithdrawalSettlementPayload, WithdrawalSettlementPendingPayload, WithdrawalSettlementSuccessPayload } from "../../../flows/withdraw/driver/payloads.js";
4
+ import { RequestWithdrawalQuoteInput, SubmitWithdrawalInput, WatchWithdrawableBalancesInput, WatchWithdrawalSettlementInput, WithdrawDriver, WithdrawSnapshot } from "../../../flows/withdraw/driver/types.js";
5
+ import { WithdrawDriverProvider, useWithdrawDriverInstance, useWithdrawSnapshot } from "../../../flows/withdraw/driver/context.js";
6
+ export { type Entity, type ReceiveChainPayload, type ReceiveOptionDto, type ReceiveOptionsResponse, type ReceiveTokenOptionPayload, type RequestWithdrawalQuoteInput, type SettlementFailureKind, type SubmitWithdrawalInput, type TxRef, type WatchWithdrawableBalancesInput, type WatchWithdrawalSettlementInput, type WithdrawDriver, WithdrawDriverProvider, type WithdrawSnapshot, type WithdrawableBalanceDto, type WithdrawableBalanceItemPayload, type WithdrawableBalancesResponse, type WithdrawalQuoteBreakdownPayload, type WithdrawalQuoteDto, type WithdrawalQuotePayload, type WithdrawalQuoteResponse, type WithdrawalReceiveAssetPayload, type WithdrawalSettlementDto, type WithdrawalSettlementFailurePayload, type WithdrawalSettlementPayload, type WithdrawalSettlementPendingPayload, type WithdrawalSettlementResponse, type WithdrawalSettlementSuccessPayload, useWithdrawDriverInstance, useWithdrawSnapshot };
@@ -0,0 +1 @@
1
+ import{WithdrawDriverProvider as e,useWithdrawDriverInstance as t,useWithdrawSnapshot as n}from"../../../flows/withdraw/driver/context.js";export{e as WithdrawDriverProvider,t as useWithdrawDriverInstance,n as useWithdrawSnapshot};
@@ -0,0 +1,5 @@
1
+ import { WithdrawError } from "../../../flows/withdraw/widgets/withdraw-error/WithdrawError.js";
2
+ import { WithdrawForm } from "../../../flows/withdraw/widgets/withdraw-form/WithdrawForm.js";
3
+ import { WithdrawInProgress } from "../../../flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js";
4
+ import { WithdrawSuccess } from "../../../flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js";
5
+ export { WithdrawError, WithdrawForm, WithdrawInProgress, WithdrawSuccess };
@@ -0,0 +1 @@
1
+ import{WithdrawError as e}from"../../../flows/withdraw/widgets/withdraw-error/WithdrawError.js";import"../../../flows/withdraw/widgets/withdraw-error/index.js";import{WithdrawForm as t}from"../../../flows/withdraw/widgets/withdraw-form/WithdrawForm.js";import"../../../flows/withdraw/widgets/withdraw-form/index.js";import{WithdrawInProgress as n}from"../../../flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js";import"../../../flows/withdraw/widgets/withdraw-in-progress/index.js";import{WithdrawSuccess as r}from"../../../flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js";import"../../../flows/withdraw/widgets/withdraw-success/index.js";export{e as WithdrawError,t as WithdrawForm,n as WithdrawInProgress,r as WithdrawSuccess};
@@ -0,0 +1 @@
1
+ import { BannerAckBucket, bannerAckStorageKey, bucketFromSettlement, useBannerAck, useBannerAckForSettlement } from "./useBannerAck.js";
@@ -0,0 +1 @@
1
+ import"./useBannerAck.js";
@@ -0,0 +1,61 @@
1
+ import { SettlementPayload } from "../flows/deposit/driver/payloads.js";
2
+ //#region src/banners/useBannerAck.d.ts
3
+ /**
4
+ * Lifecycle bucket a banner ack is recorded against. Splitting "in-flight" from "terminal"
5
+ * lets the user acknowledge a pending deposit without silently suppressing the eventual
6
+ * success / failure banner for the same source-chain tx.
7
+ */
8
+ type BannerAckBucket = "inflight" | "terminal";
9
+ /**
10
+ * Resolve the active bucket + ack key from a settlement payload. Returns `null` while the
11
+ * payload doesn't yet carry a stable identity (e.g. a freshly-detected pending settlement
12
+ * before its source-chain tx hash has landed) — callers treat `null` as "no ackable banner
13
+ * yet" and keep the banner visible without recording an ack.
14
+ */
15
+ declare function bucketFromSettlement(payload: SettlementPayload | undefined): {
16
+ txHash: string;
17
+ bucket: BannerAckBucket;
18
+ } | null;
19
+ /**
20
+ * Build the kit-storage key for a `<txHash, bucket>` ack. Exposed for tests + advanced
21
+ * integrators who want to seed / inspect ack state directly through `useKitStorage()`.
22
+ */
23
+ declare function bannerAckStorageKey(txHash: string, bucket: BannerAckBucket): string;
24
+ interface UseBannerAckResult {
25
+ /**
26
+ * `true` once an ack has been recorded against the active `<txHash, bucket>` — either by
27
+ * this hook's `ack()` callback or by another consumer writing the same key through
28
+ * `useKitStorage()`. Reactive — flips back to `false` if the underlying entry is cleared
29
+ * and a new tx hash lands.
30
+ */
31
+ acked: boolean;
32
+ /**
33
+ * Record an ack for the active `<txHash, bucket>`. No-op when either input is `null`
34
+ * (no stable identity yet) — safe to call inside event handlers without nullish guards.
35
+ */
36
+ ack: () => void;
37
+ }
38
+ /**
39
+ * Reactive ack state for a single `<txHash, bucket>` pair. Backed by the kit's persistent
40
+ * `KitStorage`; ack writes coordinate across every consumer of the same provider — the dialog's
41
+ * orchestrated banner and a headless demo's custom banner share state automatically.
42
+ *
43
+ * Pass `null` for either argument while the settlement payload doesn't yet carry the identity
44
+ * — the hook returns `acked: false` and `ack()` is a no-op.
45
+ *
46
+ * Pair with {@link bucketFromSettlement} when wiring against a settlement payload:
47
+ *
48
+ * ```tsx
49
+ * const handle = bucketFromSettlement(settlement.payload);
50
+ * const { acked, ack } = useBannerAck(handle?.txHash ?? null, handle?.bucket ?? null);
51
+ * ```
52
+ */
53
+ declare function useBannerAck(txHash: string | null, bucket: BannerAckBucket | null): UseBannerAckResult;
54
+ /**
55
+ * Reactive ack state derived from a settlement payload. Convenience wrapper over
56
+ * {@link useBannerAck} + {@link bucketFromSettlement} for the common case where a banner
57
+ * surface reads directly from the driver's `settlement` entity.
58
+ */
59
+ declare function useBannerAckForSettlement(payload: SettlementPayload | undefined): UseBannerAckResult;
60
+ //#endregion
61
+ export { BannerAckBucket, bannerAckStorageKey, bucketFromSettlement, useBannerAck, useBannerAckForSettlement };
@@ -0,0 +1 @@
1
+ "use client";import{useKitStorage as e,useKitStorageValue as t}from"../storage/context.js";import"../storage/index.js";import{useCallback as n}from"react";function r(e){if(!e)return null;if(e.kind===`succeeded`)return{txHash:e.depositTx.hash.value,bucket:`terminal`};if(e.kind===`failed`)return{txHash:e.txHash.value,bucket:`terminal`};let t=e.txHash?.value;return t?{txHash:t,bucket:`inflight`}:null}function i(e,t){return`banner-ack:${e}:${t}`}function a(r,a){let o=e(),s=r!==null&&a!==null?i(r,a):null;return{acked:t(s)!==null,ack:n(()=>{s!==null&&o.set(s,`1`)},[o,s])}}function o(e){let t=r(e);return a(t?.txHash??null,t?.bucket??null)}export{i as bannerAckStorageKey,r as bucketFromSettlement,a as useBannerAck,o as useBannerAckForSettlement};
@@ -0,0 +1,28 @@
1
+ import { ConfirmTransferAmountsProps, ConfirmTransferBodyProps, ConfirmTransferBreakdown, ConfirmTransferBreakdownPercentRow, ConfirmTransferBreakdownProps, ConfirmTransferBreakdownTextRow, ConfirmTransferBreakdownUsdRow, ConfirmTransferDialogProps, ConfirmTransferDisclaimerProps, ConfirmTransferFooterProps, ConfirmTransferHeaderProps, ConfirmTransferHeroProps, ConfirmTransferMetaProps, ConfirmTransferProps, ConfirmTransferToken, ConfirmTransferTransfer } from "../../shared/widgets/confirm-transfer/compound/types.js";
2
+ import { ConfirmTransfer } from "../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.js";
3
+ import { CONFIRM_TRANSFER_SLOTS, ConfirmTransferSlot } from "../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.js";
4
+ import { DepositBodyProps, DepositDialogProps, DepositHeaderProps, DepositMethodInput, DepositMethodOption, DepositMethodProps, DepositMethodsProps, DepositProps } from "../../flows/deposit/widgets/deposit/compound/types.js";
5
+ import { Deposit } from "../../flows/deposit/widgets/deposit/compound/Deposit.js";
6
+ import { DEPOSIT_SLOTS, DepositSlot } from "../../flows/deposit/widgets/deposit/compound/Deposit.slots.js";
7
+ import { DepositStatusBannerAsset, DepositStatusBannerBodyProps, DepositStatusBannerCloseProps, DepositStatusBannerDetailProps, DepositStatusBannerDetailsProps, DepositStatusBannerFooterProps, DepositStatusBannerHeroProps, DepositStatusBannerKind, DepositStatusBannerPrimaryActionProps, DepositStatusBannerProps, DepositStatusBannerRowProps, DepositStatusBannerToggleProps, DepositStatusBannerTxRef } from "../../flows/deposit/widgets/deposit-status-banner/compound/types.js";
8
+ import { DepositStatusBanner } from "../../flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js";
9
+ import { DEPOSIT_STATUS_BANNER_SLOTS, DepositStatusBannerSlot } from "../../flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.slots.js";
10
+ import { TransferCryptoAsset, TransferCryptoBodyProps, TransferCryptoChain, TransferCryptoDialogProps, TransferCryptoDisclosureProps, TransferCryptoHeaderProps, TransferCryptoProps, TransferCryptoToken } from "../../flows/deposit/widgets/transfer-crypto/compound/types.js";
11
+ import { TransferCrypto } from "../../flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.js";
12
+ import { TRANSFER_CRYPTO_SLOTS, TransferCryptoSlot } from "../../flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.slots.js";
13
+ import { AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntryToken } from "../../shared/widgets/amount-entry/compound/types.js";
14
+ import { AmountEntry } from "../../shared/widgets/amount-entry/compound/AmountEntry.js";
15
+ import { AMOUNT_ENTRY_SLOTS, AmountEntrySlot } from "../../shared/widgets/amount-entry/compound/AmountEntry.slots.js";
16
+ import { AssetOption, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerToken } from "../../shared/widgets/asset-picker/compound/types.js";
17
+ import { AssetPicker } from "../../shared/widgets/asset-picker/compound/AssetPicker.js";
18
+ import { ASSET_PICKER_SLOTS, AssetPickerSlot } from "../../shared/widgets/asset-picker/compound/AssetPicker.slots.js";
19
+ import { ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef } from "../../shared/widgets/error-state/compound/types.js";
20
+ import { ErrorState } from "../../shared/widgets/error-state/compound/ErrorState.js";
21
+ import { ERROR_STATE_SLOTS, ErrorStateSlot } from "../../shared/widgets/error-state/compound/ErrorState.slots.js";
22
+ import { ProcessingStateActionsProps, ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef } from "../../shared/widgets/processing-state/compound/types.js";
23
+ import { ProcessingState } from "../../shared/widgets/processing-state/compound/ProcessingState.js";
24
+ import { PROCESSING_STATE_SLOTS, ProcessingStateSlot } from "../../shared/widgets/processing-state/compound/ProcessingState.slots.js";
25
+ import { SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef } from "../../shared/widgets/success-state/compound/types.js";
26
+ import { SuccessState } from "../../shared/widgets/success-state/compound/SuccessState.js";
27
+ import { SUCCESS_STATE_SLOTS, SuccessStateSlot } from "../../shared/widgets/success-state/compound/SuccessState.slots.js";
28
+ export { AMOUNT_ENTRY_SLOTS, ASSET_PICKER_SLOTS, AmountEntry, AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntrySlot, AmountEntryToken, AssetOption, AssetPicker, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerSlot, AssetPickerToken, CONFIRM_TRANSFER_SLOTS, ConfirmTransfer, ConfirmTransferAmountsProps, ConfirmTransferBodyProps, ConfirmTransferBreakdown, ConfirmTransferBreakdownPercentRow, ConfirmTransferBreakdownProps, ConfirmTransferBreakdownTextRow, ConfirmTransferBreakdownUsdRow, ConfirmTransferDialogProps, ConfirmTransferDisclaimerProps, ConfirmTransferFooterProps, ConfirmTransferHeaderProps, ConfirmTransferHeroProps, ConfirmTransferMetaProps, ConfirmTransferProps, ConfirmTransferSlot, ConfirmTransferToken, ConfirmTransferTransfer, DEPOSIT_SLOTS, DEPOSIT_STATUS_BANNER_SLOTS, Deposit, DepositBodyProps, DepositDialogProps, DepositHeaderProps, DepositMethodInput, DepositMethodOption, DepositMethodProps, DepositMethodsProps, DepositProps, DepositSlot, DepositStatusBanner, DepositStatusBannerAsset, DepositStatusBannerBodyProps, DepositStatusBannerCloseProps, DepositStatusBannerDetailProps, DepositStatusBannerDetailsProps, DepositStatusBannerFooterProps, DepositStatusBannerHeroProps, DepositStatusBannerKind, DepositStatusBannerPrimaryActionProps, DepositStatusBannerProps, DepositStatusBannerRowProps, DepositStatusBannerSlot, DepositStatusBannerToggleProps, DepositStatusBannerTxRef, ERROR_STATE_SLOTS, ErrorState, ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSlot, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef, PROCESSING_STATE_SLOTS, ProcessingState, ProcessingStateActionsProps, ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSlot, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef, SUCCESS_STATE_SLOTS, SuccessState, SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSlot, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef, TRANSFER_CRYPTO_SLOTS, TransferCrypto, TransferCryptoAsset, TransferCryptoBodyProps, TransferCryptoChain, TransferCryptoDialogProps, TransferCryptoDisclosureProps, TransferCryptoHeaderProps, TransferCryptoProps, TransferCryptoSlot, TransferCryptoToken };
@@ -0,0 +1 @@
1
+ import{DEPOSIT_SLOTS as e}from"../../flows/deposit/widgets/deposit/compound/Deposit.slots.js";import{Deposit as t}from"../../flows/deposit/widgets/deposit/compound/Deposit.js";import"../../flows/deposit/widgets/deposit/compound/index.js";import{DEPOSIT_STATUS_BANNER_SLOTS as n}from"../../flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.slots.js";import{DepositStatusBanner as r}from"../../flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js";import"../../flows/deposit/widgets/deposit-status-banner/compound/index.js";import{TRANSFER_CRYPTO_SLOTS as i}from"../../flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.slots.js";import{TransferCrypto as a}from"../../flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.js";import"../../flows/deposit/widgets/transfer-crypto/compound/index.js";import{AMOUNT_ENTRY_SLOTS as o}from"../../shared/widgets/amount-entry/compound/AmountEntry.slots.js";import{AmountEntry as s}from"../../shared/widgets/amount-entry/compound/AmountEntry.js";import"../../shared/widgets/amount-entry/compound/index.js";import{ASSET_PICKER_SLOTS as c}from"../../shared/widgets/asset-picker/compound/AssetPicker.slots.js";import{AssetPicker as l}from"../../shared/widgets/asset-picker/compound/AssetPicker.js";import"../../shared/widgets/asset-picker/compound/index.js";import{CONFIRM_TRANSFER_SLOTS as u}from"../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.js";import{ConfirmTransfer as d}from"../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.js";import"../../shared/widgets/confirm-transfer/compound/index.js";import{ERROR_STATE_SLOTS as f}from"../../shared/widgets/error-state/compound/ErrorState.slots.js";import{ErrorState as p}from"../../shared/widgets/error-state/compound/ErrorState.js";import"../../shared/widgets/error-state/compound/index.js";import{PROCESSING_STATE_SLOTS as m}from"../../shared/widgets/processing-state/compound/ProcessingState.slots.js";import{ProcessingState as h}from"../../shared/widgets/processing-state/compound/ProcessingState.js";import"../../shared/widgets/processing-state/compound/index.js";import{SUCCESS_STATE_SLOTS as g}from"../../shared/widgets/success-state/compound/SuccessState.slots.js";import{SuccessState as _}from"../../shared/widgets/success-state/compound/SuccessState.js";import"../../shared/widgets/success-state/compound/index.js";export{o as AMOUNT_ENTRY_SLOTS,c as ASSET_PICKER_SLOTS,s as AmountEntry,l as AssetPicker,u as CONFIRM_TRANSFER_SLOTS,d as ConfirmTransfer,e as DEPOSIT_SLOTS,n as DEPOSIT_STATUS_BANNER_SLOTS,t as Deposit,r as DepositStatusBanner,f as ERROR_STATE_SLOTS,p as ErrorState,m as PROCESSING_STATE_SLOTS,h as ProcessingState,g as SUCCESS_STATE_SLOTS,_ as SuccessState,i as TRANSFER_CRYPTO_SLOTS,a as TransferCrypto};
@@ -0,0 +1,2 @@
1
+ import { DepositDialog } from "../../flows/deposit/dialog/DepositDialog.js";
2
+ export { DepositDialog };
@@ -0,0 +1 @@
1
+ import{DepositDialog as e}from"../../flows/deposit/dialog/DepositDialog.js";export{e as DepositDialog};
@@ -0,0 +1,29 @@
1
+ import { DepositDriver } from "../../flows/deposit/driver/types.js";
2
+ import { StridgeDriverConfig } from "./types.js";
3
+ import { I18n } from "@lingui/core";
4
+
5
+ //#region src/drivers/stridge/createStridgeDepositDriver.d.ts
6
+ /**
7
+ * Configuration accepted by {@link createStridgeDepositDriver}. Extends {@link StridgeDriverConfig}
8
+ * with the driver-required `getI18n` ref-getter.
9
+ */
10
+ interface CreateStridgeDepositDriverInput extends StridgeDriverConfig {
11
+ /**
12
+ * Stable `I18n` ref-getter. The driver re-runs transformers on read so locale flips don't
13
+ * re-bootstrap. When omitted, falls back to the kit's English-only {@link defaultI18n}.
14
+ */
15
+ getI18n?: () => I18n;
16
+ }
17
+ /**
18
+ * Builds a Stridge-backed {@link DepositDriver}. Returns the unified driver contract — the kit's
19
+ * `<KitProvider deposit={…}>` consumes this directly, no separate `dataSource` / `operations`
20
+ * adapter layer.
21
+ *
22
+ * Bootstrap kicks off `gateway/start` + `Uda.supportedAssets()` in parallel on creation; the
23
+ * driver's `brand`, `target`, and `addresses` entities transition `loading` → `ready` once both
24
+ * responses land. The first `balance/onchain` fetch fires alongside, populating `balances`.
25
+ * Wallet identity is published synchronously from `userAddress`.
26
+ */
27
+ declare function createStridgeDepositDriver(config: CreateStridgeDepositDriverInput): DepositDriver;
28
+ //#endregion
29
+ export { CreateStridgeDepositDriverInput, createStridgeDepositDriver };
@@ -0,0 +1 @@
1
+ import{defaultI18n as e}from"../../shared/i18n/defaultI18n.js";import{pickRelevantSettlement as t}from"../../flows/shared/transformers/pickRelevantSettlement.js";import{formatUsd as n}from"../../shared/format/formatUsd.js";import{balanceToBalancesPayload as r,buildRoutableAllowlist as i}from"../../flows/deposit/driver/transformers/balanceToBalancesPayload.js";import{quoteToPayload as a}from"../../flows/deposit/driver/transformers/quoteToPayload.js";import{settlementToPayload as o}from"../../flows/deposit/driver/transformers/settlementToPayload.js";import{startToAddressesPayload as s}from"../../flows/deposit/driver/transformers/startToAddressesPayload.js";import{startToBrandPayload as c}from"../../flows/deposit/driver/transformers/startToBrandPayload.js";import{startToTargetPayload as l}from"../../flows/deposit/driver/transformers/startToTargetPayload.js";import{walletAddressToWalletPayload as u}from"../../flows/deposit/driver/transformers/walletAddressToWalletPayload.js";import{defaultBlockExplorers as d}from"../../shared/utils/explorers.js";import{createEntityStore as f}from"../stridge-mock/store.js";import{NATIVE_QUOTE_ADDRESS as p,isStablecoinSymbol as m,toBaseUnits as ee}from"./internal/encoding.js";import"./types.js";import{resolveSdkEnv as h}from"./internal/env.js";import{buildKitMetadata as g}from"./internal/metadata.js";import{pollOnce as _}from"./internal/pollOnce.js";import{buildErc20OrNativeStep as v,signAndConfirm as y}from"./internal/signAndConfirm.js";import{startPoll as b}from"./poll.js";import{createStridgeRpc as te}from"./rpc.js";import{createWagmiSigner as x}from"./wagmiSigner.js";import{createApiClient as S}from"@stridge/sdk";function C(C){let O=S({projectKey:C.projectKey,env:h(C.environment)}),k=C.pollIntervals??{},A=k.detectionMs??2e3,j=k.processingMs??2e3,M=k.terminalMs??1e4,N=k.balancesMs??6e4,P=C.minDepositUsd??3,F=C.getI18n??(()=>e),I={...d(),...C.explorers??{}},L=C.destination.network_id,R=C.destination.asset_symbol,z=C.destination.to_address??C.userAddress,B=x({wagmiConfig:C.wagmiConfig}),V=C.rpc??te(),H={address:C.userAddress},U=f({brand:{status:`loading`},target:{status:`loading`},addresses:{status:`loading`},balances:{status:`loading`},quote:{status:`idle`},settlement:{status:`idle`},wallet:{status:`ready`,payload:u(H),raw:H,response:H}}),W,G,K,q;function J(){if(G)return K??=i(G),K}let Y=(async()=>{try{let[e,t]=await Promise.all([O.gateway.start({owner:C.userAddress,destination:{network_id:L,to_address:z,asset_symbol:R},metadata:g({flow:`deposit`,...C.metadata?{hostMetadata:C.metadata}:{},extras:{destination:{networkId:L,assetSymbol:R}}})}),O.uda.supportedAssets().catch(()=>null)]);W=e;let n=e.metadata?.brand_name;typeof n==`string`&&n.trim().length>0&&(q=n.trim());let r=F();if(t&&(G=t,K=void 0),U.update({brand:{status:`ready`,payload:c(e.metadata),raw:e.metadata,response:e},addresses:{status:`ready`,payload:s(e.deposit_addresses,{i18n:r,explorers:I,...t?{chainLogos:T(t)}:{},...t?{minDepositUsdByEip155Id:D(t,P),nativeAssetByEip155Id:E(t)}:{}}),raw:e.deposit_addresses,response:e}}),t){let e=l(t,{i18n:r,networkId:L,assetSymbol:R,minDepositUsd:P}),n=t.assets.find(e=>String(e.network_id)===L);e&&n?U.update({target:{status:`ready`,payload:e,raw:n,response:t}}):U.update({target:{status:`error`,error:Error(`Destination not found in supportedAssets catalog.`)}})}else U.update({target:{status:`error`,error:Error(`supportedAssets fetch failed.`)}})}catch(e){let t=e instanceof Error?e:Error(String(e));U.update({brand:{status:`error`,error:t},target:{status:`error`,error:t},addresses:{status:`error`,error:t}})}})(),X=!1,Z=(async()=>{try{let e=await O.balance.onchain(C.userAddress,{includeSpam:!1,includeZero:!1});await Y;let t=J();if(!t)return null;let n=r(e,{i18n:F(),routable:t,minDepositUsd:P,...C.resolveTokenIcon?{resolveTokenIcon:C.resolveTokenIcon}:{}});return U.update({balances:{status:`ready`,payload:n,raw:e,response:e},wallet:Q(n,F())}),e}catch(e){let t=e instanceof Error?e:Error(String(e));return U.update({balances:{status:`error`,error:t}}),null}})();function Q(e,t){let r=e.reduce((e,t)=>e+(t.amountUsd?.value??0),0);return{status:`ready`,payload:{...u(H),balanceTotalUsd:{value:r,formatted:n(r,t)}},raw:H,response:H}}return{getSnapshot(){return U.getSnapshot()},subscribe(e){return U.subscribe(e)},async requestQuote(e,t){U.update({quote:{status:`loading`}});let n=W;if(!n){U.update({quote:{status:`error`,error:Error(`gateway/start not yet resolved.`)}});return}try{let r=e.sourceChainId,i=e.sourceIsNative?p:e.sourceTokenAddress,o=ee(e.amount,e.sourceTokenDecimals),s=await O.uda.quote({fromNetworkId:r,fromAsset:i,toNetworkId:Number(n.destination.eip155_id),toAsset:n.destination.asset_address||`0x0000000000000000000000000000000000000000`,amount:o,fromAddress:C.userAddress,toAddress:z},{signal:t});if(t.aborted)return;let c=F(),l={chainId:r,networkName:w(r),eip155Id:String(r),symbol:e.sourceTokenSymbol,decimals:e.sourceTokenDecimals,address:e.sourceTokenAddress,isNative:e.sourceIsNative},u={chainId:Number(n.destination.eip155_id),networkName:n.destination.network_name,eip155Id:n.destination.eip155_id,symbol:n.destination.asset_symbol,decimals:n.destination.asset_decimals,address:n.destination.asset_address,isNative:!n.destination.asset_address},d=m(n.destination.asset_symbol)?1:void 0,f=a(s,{i18n:c,sendSide:l,receiveSide:u,sourceAmount:e.amount,now:Date.now(),...e.sourcePriceUsd===void 0?{}:{sendPriceUsd:e.sourcePriceUsd},...d===void 0?{}:{receivePriceUsd:d}});U.update({quote:{status:`ready`,payload:f,raw:s,response:s}})}catch(e){if(t.aborted)return;let n=e instanceof Error?e:Error(String(e));U.update({quote:{status:`error`,error:n}})}},async submitDeposit(e,t){let n=W;if(!n)throw Error(`gateway/start not yet resolved.`);let r=n.deposit_addresses.find(t=>Number(t.eip155_id)===Number(e.sourceChainId));if(!r)throw Error(`No Stridge deposit address provisioned on chain ${e.sourceChainId}. Pick a supported source chain.`);return y({signer:B,rpc:V,step:v({chainId:e.sourceChainId,from:C.userAddress,udaDepositAddress:r.address,amount:e.amount,decimals:e.sourceTokenDecimals,isNative:e.sourceIsNative,...e.sourceIsNative?{}:{sourceTokenAddress:e.sourceTokenAddress}}),signal:t,explorers:I,...C.receiptConfirmations===void 0?{}:{receiptConfirmations:C.receiptConfirmations},...C.receiptPollingIntervalMs===void 0?{}:{receiptPollingIntervalMs:C.receiptPollingIntervalMs}})},watchBalances(e,t,n){b({signal:n,fetch:async e=>{if(!X)return X=!0,Z;try{let t=await O.balance.onchain(C.userAddress,{signal:e,includeSpam:!1,includeZero:!1});await Y;let n=J();if(!n)return null;let i=r(t,{i18n:F(),routable:n,minDepositUsd:P,...C.resolveTokenIcon?{resolveTokenIcon:C.resolveTokenIcon}:{}});return U.update({balances:{status:`ready`,payload:i,raw:t,response:t},wallet:Q(i,F())}),t}catch{return null}},listener:()=>{t(U.getSnapshot().balances)},nextIntervalMs:()=>N})},watchSourceTx(e,t,n){let r=new Set,i={current:!1},a=!1;b({signal:n,fetch:e=>_(O,C.userAddress,$(),e),listener:e=>{if(a||!e)return;let n=e.settlements??[];if(!i.current){for(let e of n)r.add(e.id);i.current=!0;return}let o=n.find(e=>!r.has(e.id));if(!o)return;a=!0;let s=Number(o.from?.eip155_id??`0`);t({hash:o.from?.tx_id??``,...I[s]&&o.from?.tx_id?{explorerUrl:`${I[s].replace(/\/+$/,``)}/tx/${o.from.tx_id}`}:{}})},nextIntervalMs:()=>a?0:A})},watchSettlement(e,n,r){let i=e=>_(O,C.userAddress,$(),e),a=!1;b({signal:r,fetch:i,listener:r=>{if(!r)return;let i=t(r,{txHash:e.tx.hash});if(!i)return;let s=o(i,r,{i18n:F(),sourceWallet:{name:`Wallet`,address:C.userAddress},explorers:I,...q?{brandName:q}:{}});s.kind!==`pending`&&(a=!0);let c={status:`ready`,payload:s,raw:i,response:r};U.update({settlement:c}),n(c)},nextIntervalMs:()=>a?M:j})},async fetchActiveSettlement(e,n){let r=await _(O,C.userAddress,$(),n);if(!r)return null;let i=t(r);if(!i)return null;let a=o(i,r,{i18n:F(),sourceWallet:{name:`Wallet`,address:C.userAddress},explorers:I,...q?{brandName:q}:{}});return a.kind===`pending`?{payload:a,raw:i,response:r}:null}};function $(){return{network_id:L,asset_symbol:R,to_address:z}}}function w(e){switch(e){case 1:return`Ethereum`;case 56:return`BSC`;case 137:return`Polygon`;case 42161:return`Arbitrum`;case 10:return`Optimism`;case 8453:return`Base`;default:return`Chain ${e}`}}function T(e){let t={};for(let n of e.assets){let e=String(n.eip155_id),r=n.native_currency?.logo;r&&(t[e]=r)}return t}function E(e){let t={};for(let n of e.assets){let e=n.native_currency;if(!e?.symbol)continue;let r=String(n.eip155_id);t[r]={symbol:e.symbol,address:``,decimals:typeof e.decimals==`number`?e.decimals:18,isNative:!0,...e.logo?{assetLogoUrl:e.logo}:{}}}return t}function D(e,t){let n={};for(let r of e.assets){let e=String(r.eip155_id),i=r.native_currency?.min_deposit_usd,a=typeof i==`string`&&i.trim().length>0?Number.parseFloat(i):NaN;n[e]=Number.isFinite(a)?a:t}return n}export{C as createStridgeDepositDriver};
@@ -0,0 +1,113 @@
1
+ import { WithdrawDriver } from "../../flows/withdraw/driver/types.js";
2
+ import { StridgeRpc } from "./rpc.js";
3
+ import { StridgeEnvironment, StridgePollIntervals, StridgeTokenIconResolverEntry } from "./types.js";
4
+ import { I18n } from "@lingui/core";
5
+ import { Config } from "wagmi";
6
+
7
+ //#region src/drivers/stridge/createStridgeWithdrawDriver.d.ts
8
+ /**
9
+ * Brand-currency tuple — the source row the withdraw driver targets. The driver polls
10
+ * `balance/onchain` filtered to this `(networkId, assetSymbol)` pair on every balances tick and
11
+ * uses the resolved on-chain contract for both quote requests and the wagmi-signed transfer.
12
+ */
13
+ interface StridgeWithdrawCurrency {
14
+ /** Stridge network id (string-encoded). E.g. `"60"` for Ethereum mainnet, `"9006"` for BSC. */
15
+ networkId: string;
16
+ /** Brand-currency asset symbol (e.g. `"USDC"`). */
17
+ assetSymbol: string;
18
+ }
19
+ /**
20
+ * Configuration accepted by {@link createStridgeWithdrawDriver}. Mirrors
21
+ * {@link import("./types").StridgeDriverConfig} field-for-field where applicable so hosts mounting
22
+ * both deposit and withdraw flows configure them symmetrically.
23
+ *
24
+ * Differences vs deposit:
25
+ *
26
+ * - `currency` (required) replaces deposit's `destination` — the brand-currency the driver
27
+ * withdraws from. Each submit mints a fresh UDA whose destination is the user-picked
28
+ * recipient/chain/token, so the destination is per-submit (closure state) rather than
29
+ * driver-config.
30
+ * - No `confirmDisplay` — withdraw doesn't ship a confirm-deposit step.
31
+ * - No `minDepositUsd` — withdraw v1 doesn't surface a USD floor on the form.
32
+ */
33
+ interface CreateStridgeWithdrawDriverInput {
34
+ /** Connected wallet EOA. Threaded as `gateway/start.owner` and `uda/quote.from_address`. */
35
+ userAddress: string;
36
+ /**
37
+ * Stridge project key — sent as `X-Gateway-Key` by the SDK's HttpClient. Pull from your
38
+ * workspace dashboard (Developer → Gateway Kit → Connection).
39
+ */
40
+ projectKey: string;
41
+ /**
42
+ * Which Stridge API host to target. Defaults to {@link STRIDGE_DEFAULT_ENVIRONMENT}
43
+ * (`"production"` → `api.stridge.com`). Pass `"staging"` to route through `api.stridge.dev`
44
+ * for integration testing — note that staging gateway keys won't authenticate against
45
+ * production and vice versa.
46
+ */
47
+ environment?: StridgeEnvironment;
48
+ /**
49
+ * Brand-currency tuple. The user's withdrawable balance row reads from
50
+ * `balance/onchain` filtered to this pair; the wagmi-signed source-chain transfer broadcasts
51
+ * the same pair to the UDA's matching `deposit_addresses[]` row.
52
+ */
53
+ currency: StridgeWithdrawCurrency;
54
+ /**
55
+ * Wagmi config used to sign and broadcast the source-chain transfer. Receipt polling uses an
56
+ * internal Stridge RPC client (see `rpc.ts`) — withdraws don't depend on the host's wagmi
57
+ * public client (which falls through to viem's hard-coded public defaults — unreliable for
58
+ * live tx flow).
59
+ */
60
+ wagmiConfig: Config;
61
+ /**
62
+ * Stable `I18n` ref-getter. The driver re-runs transformers on read so locale flips don't
63
+ * re-bootstrap. When omitted, falls back to the kit's English-only {@link defaultI18n}.
64
+ */
65
+ getI18n?: () => I18n;
66
+ /**
67
+ * Per-chain block-explorer base URL keyed by EIP-155 id. The driver appends `/tx/{hash}` to
68
+ * the matching entry when building `TxRef.explorerUrl` and the settlement payload's
69
+ * `txExplorerUrl`. Hosts typically derive this map from `viem` chain definitions; the driver
70
+ * itself ships {@link defaultBlockExplorers} as the baseline.
71
+ */
72
+ explorers?: Record<number, string>;
73
+ /**
74
+ * Optional icon resolver for the source row. Returning `undefined` falls back to the upstream
75
+ * Moralis logo. Same shape as deposit's resolver so hosts can share one implementation.
76
+ */
77
+ resolveTokenIcon?: (entry: StridgeTokenIconResolverEntry) => string | undefined;
78
+ /** Polling cadence overrides. */
79
+ pollIntervals?: StridgePollIntervals;
80
+ /**
81
+ * Advanced escape hatch: inject a custom Stridge RPC client (e.g. for tests or a self-hosted
82
+ * proxy). Defaults to a client that targets `https://${chainId}.nodes.stridge.com`.
83
+ */
84
+ rpc?: StridgeRpc;
85
+ /** Block confirmations to wait on before treating the broadcast tx as mined. Defaults to `1`. */
86
+ receiptConfirmations?: number;
87
+ /** Receipt polling interval in milliseconds while waiting for mining. */
88
+ receiptPollingIntervalMs?: number;
89
+ /**
90
+ * Optional metadata persisted on every UDA the driver provisions. Echoed back on
91
+ * `gateway/{owner}` and webhook payloads. Treat as untrusted display data on read. Merged
92
+ * UNDER the kit-set `kit_flow` / `kit_version` / `source` keys (kit keys win).
93
+ */
94
+ metadata?: Record<string, unknown>;
95
+ }
96
+ /**
97
+ * Builds a Stridge-backed {@link WithdrawDriver}. Returns the unified driver contract — the kit's
98
+ * `<KitProvider withdraw={…}>` consumes this directly, no separate `dataSource` / `operations`
99
+ * adapter layer.
100
+ *
101
+ * Bootstrap kicks off `Uda.supportedAssets()` and `balance/onchain` in parallel on creation. The
102
+ * `receiveOptions` entity transitions `loading → ready` once supportedAssets lands; the
103
+ * `withdrawableBalances` entity flips `loading → ready` after the first balance fetch (and the
104
+ * supportedAssets-derived source-currency lookup completes).
105
+ *
106
+ * `gateway/start` is **not** part of bootstrap — the destination is user-picked at submit time, so
107
+ * each `submitWithdrawal` call provisions a fresh UDA scoped to the chosen recipient/chain/token.
108
+ * The destination is idempotent on `(owner, destination)`, so repeat submits to the same target
109
+ * dedupe to one UDA.
110
+ */
111
+ declare function createStridgeWithdrawDriver(config: CreateStridgeWithdrawDriverInput): WithdrawDriver;
112
+ //#endregion
113
+ export { CreateStridgeWithdrawDriverInput, StridgeWithdrawCurrency, createStridgeWithdrawDriver };
@@ -0,0 +1 @@
1
+ "use client";import{defaultI18n as e}from"../../shared/i18n/defaultI18n.js";import{pickRelevantSettlement as t}from"../../flows/shared/transformers/pickRelevantSettlement.js";import{defaultBlockExplorers as n}from"../../shared/utils/explorers.js";import{createEntityStore as r}from"../stridge-mock/store.js";import{NATIVE_QUOTE_ADDRESS as i,isStablecoinSymbol as a,toBaseUnits as o}from"./internal/encoding.js";import{resolveSdkEnv as s}from"./internal/env.js";import{buildKitMetadata as c}from"./internal/metadata.js";import{pollOnce as l}from"./internal/pollOnce.js";import{buildErc20OrNativeStep as u,signAndConfirm as d}from"./internal/signAndConfirm.js";import{startPoll as f}from"./poll.js";import{createStridgeRpc as p}from"./rpc.js";import{createWagmiSigner as m}from"./wagmiSigner.js";import{balanceToWithdrawableBalancesPayload as h}from"../../flows/withdraw/driver/transformers/balanceToWithdrawableBalancesPayload.js";import{quoteToWithdrawalPayload as g}from"../../flows/withdraw/driver/transformers/quoteToWithdrawalPayload.js";import{settlementToWithdrawalPayload as _}from"../../flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js";import{supportedAssetsToReceiveOptionsPayload as v}from"../../flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js";import{createApiClient as y}from"@stridge/sdk";function b(b){let x=y({projectKey:b.projectKey,env:s(b.environment)}),S=b.pollIntervals??{},C=S.processingMs??2e3,w=S.terminalMs??1e4,T=S.balancesMs??6e4,E=b.getI18n??(()=>e),D={...n(),...b.explorers??{}},O=m({wagmiConfig:b.wagmiConfig}),k=b.rpc??p(),A=r({withdrawableBalances:{status:`loading`},receiveOptions:{status:`loading`},quote:{status:`idle`},settlement:{status:`idle`}}),j,M,N;function P(e){let t=e.assets.find(e=>e.network_id===b.currency.networkId);if(!t)return;let n=b.currency.assetSymbol.toUpperCase(),r=t.native_currency?.symbol?.toUpperCase()===n?t.native_currency:void 0,i=t.assets.find(e=>e.symbol?.toUpperCase()===n),a={networkId:t.network_id,eip155Id:t.eip155_id,networkName:t.network_name,...t.native_currency?.logo?{chainLogoUrl:t.native_currency.logo}:{},decimals:i?.decimals??r?.decimals??18,address:i?.address??``,isNative:!i&&!!r,...i?.logo?{assetLogoUrl:i.logo}:r?.logo?{assetLogoUrl:r.logo}:{}};return i||r?a:void 0}function F(e){let t=E(),n=M,r=h(e,{i18n:t,networkId:b.currency.networkId,assetSymbol:b.currency.assetSymbol,...n?{fallbackMeta:{decimals:n.decimals,address:n.address,isNative:n.isNative,eip155Id:String(n.eip155Id),networkName:n.networkName,...n.chainLogoUrl?{chainLogoUrl:n.chainLogoUrl}:{},...n.assetLogoUrl?{assetLogoUrl:n.assetLogoUrl}:{}}}:{}});A.update({withdrawableBalances:{status:`ready`,payload:r,raw:e,response:e}})}let I=(async()=>{try{let[e,t]=await Promise.all([x.uda.supportedAssets(),x.balance.onchain(b.userAddress,{includeSpam:!1,includeZero:!1}).catch(()=>null)]);j=e,M=P(e);let n=v(e);A.update({receiveOptions:{status:`ready`,payload:n,raw:e.assets,response:e}}),t?F(t):M&&F({wallet_address:b.userAddress,fetched_at:new Date().toISOString(),total_usd:`0`,chains:[]})}catch(e){let t=e instanceof Error?e:Error(String(e));A.update({receiveOptions:{status:`error`,error:t}})}})();function L(){return c({flow:`withdraw`,...b.metadata?{hostMetadata:b.metadata}:{},extras:{source:{networkId:b.currency.networkId,assetSymbol:b.currency.assetSymbol}}})}function R(e,t){if(!j)return;let n=j.assets.find(t=>t.eip155_id===e);if(!n)return;let r=t.toUpperCase(),i=n.native_currency?.symbol?.toUpperCase()===r?n.native_currency:void 0,a=n.assets.find(e=>e.symbol?.toUpperCase()===r);if(!(!i&&!a))return{chainId:n.eip155_id,symbol:a?.symbol??i?.symbol??t,decimals:a?.decimals??i?.decimals??18,address:a?.address??``,isNative:!a&&!!i,...a?.logo?{assetLogoUrl:a.logo}:i?.logo?{assetLogoUrl:i.logo}:{},networkId:n.network_id,networkName:n.network_name,...i?.logo?{chainLogoUrl:i.logo}:{}}}function z(e){let t=A.getSnapshot().receiveOptions;if(!(t.status!==`ready`&&t.status!==`stale`))return t.payload.find(t=>t.eip155Id===e)}return{getSnapshot(){return A.getSnapshot()},subscribe(e){return A.subscribe(e)},async requestQuote(e,t){A.update({quote:{status:`loading`}});try{if(await I,t.aborted)return;let n=M;if(!n)throw Error(`Stridge withdraw driver: source currency ${b.currency.assetSymbol} not found on network ${b.currency.networkId} in supportedAssets.`);let r=R(e.receiveChainId,e.receiveTokenSymbol);if(!r)throw Error(`Stridge withdraw driver: receive asset ${e.receiveTokenSymbol} not found on chain ${e.receiveChainId} in supportedAssets.`);let s=o(e.amount,n.decimals),c=await x.uda.quote({fromNetworkId:n.eip155Id,fromAsset:n.isNative?i:n.address,toNetworkId:r.chainId,toAsset:r.isNative?i:r.address,amount:s,fromAddress:b.userAddress,toAddress:e.recipientAddress},{signal:t});if(t.aborted)return;let l=a(b.currency.assetSymbol)?1:void 0,u=a(r.symbol)?1:void 0,d=g(c,{i18n:E(),receiveSide:r,sourceAmount:e.amount,sendDecimals:n.decimals,sendSymbol:b.currency.assetSymbol,now:Date.now(),...l===void 0?{}:{sendPriceUsd:l},...u===void 0?{}:{receivePriceUsd:u}});A.update({quote:{status:`ready`,payload:d,raw:c,response:c}})}catch(e){if(t.aborted)return;let n=e instanceof Error?e:Error(String(e));A.update({quote:{status:`error`,error:n}})}},async submitWithdrawal(e,t){if(await I,t.aborted)throw new DOMException(`Aborted`,`AbortError`);let n=M;if(!n)throw Error(`Stridge withdraw driver: source currency ${b.currency.assetSymbol} not found on network ${b.currency.networkId} in supportedAssets.`);let r=R(e.receiveChainId,e.receiveTokenSymbol);if(!r)throw Error(`Stridge withdraw driver: receive asset ${e.receiveTokenSymbol} not found on chain ${e.receiveChainId} in supportedAssets.`);let i=await x.gateway.start({owner:b.userAddress,destination:{network_id:r.networkId??String(e.receiveChainId),asset_symbol:r.symbol,to_address:e.recipientAddress},metadata:L()},{signal:t});if(t.aborted)throw new DOMException(`Aborted`,`AbortError`);let a=i.deposit_addresses.find(e=>Number(e.eip155_id)===n.eip155Id);if(!a)throw Error(`Stridge withdraw driver: no UDA deposit address provisioned on chain ${n.eip155Id} for the brand currency. Check that supportedAssets advertises this chain.`);return N={network_id:r.networkId??String(e.receiveChainId),asset_symbol:r.symbol,to_address:e.recipientAddress},d({signer:O,rpc:k,step:u({chainId:n.eip155Id,from:b.userAddress,udaDepositAddress:a.address,amount:e.amount,decimals:n.decimals,isNative:n.isNative,...n.isNative?{}:{sourceTokenAddress:n.address}}),signal:t,explorers:D,...b.receiptConfirmations===void 0?{}:{receiptConfirmations:b.receiptConfirmations},...b.receiptPollingIntervalMs===void 0?{}:{receiptPollingIntervalMs:b.receiptPollingIntervalMs}})},watchSettlement(e,n,r){let i=e=>l(x,b.userAddress,N,e),a=!1;f({signal:r,fetch:i,listener:r=>{if(!r)return;let i=t(r,{txHash:e.tx.hash});if(!i)return;let o=E(),s=z(Number(r.destination.eip155_id)),c=s?.tokens.find(e=>e.symbol===r.destination.asset_symbol),l={...s?.chainLogoUrl?{chainLogoUrl:s.chainLogoUrl}:{},...c?.assetLogoUrl?{assetLogoUrl:c.assetLogoUrl}:{},...s?.networkName?{networkName:s.networkName}:{}},u=_(i,r,{i18n:o,explorers:D,...Object.keys(l).length>0?{receiveAssetEnrichment:l}:{}});u.kind!==`pending`&&(a=!0);let d={status:`ready`,payload:u,raw:i,response:r};A.update({settlement:d}),n(d)},nextIntervalMs:()=>a?w:C})},watchWithdrawableBalances(e,t,n){f({signal:n,fetch:async e=>{try{return await I,e.aborted?null:await x.balance.onchain(b.userAddress,{signal:e,includeSpam:!1,includeZero:!1})}catch{return null}},listener:e=>{e&&F(e),t(A.getSnapshot().withdrawableBalances)},nextIntervalMs:()=>T})}}}export{b as createStridgeWithdrawDriver};
@@ -0,0 +1 @@
1
+ const e=`0x0000000000000000000000000000000000000000`,t=new Set([`USDC`,`USDT`,`DAI`,`PYUSD`,`TUSD`]);function n(e){return t.has(e.toUpperCase())}function r(e,t){if(!Number.isFinite(e)||e<0)return`0`;let n=String(e),r=n.indexOf(`.`),i=r===-1?n:n.slice(0,r),a=r===-1?``:n.slice(r+1);if(n.includes(`e`)||n.includes(`E`)){let[n,r=``]=e.toFixed(t).split(`.`),i=r.padEnd(t,`0`).slice(0,t);return BigInt((n??`0`)+i).toString()}let o=a.padEnd(t,`0`).slice(0,t);return BigInt(i+o).toString()}function i(e,t){return`0xa9059cbb${e.replace(/^0x/,``).toLowerCase().padStart(64,`0`)}${t.toString(16).padStart(64,`0`)}`}function a(e,t=0){if(!e||typeof e!=`object`||t>6)return!1;let n=e;return n.name===`UserRejectedRequestError`||n.code===4001||n.code===`ACTION_REJECTED`||[n.message,n.shortMessage,n.details].filter(e=>typeof e==`string`).some(e=>/user (rejected|denied)|rejected the request|user cancel|user disapproved/i.test(e))?!0:n.cause&&n.cause!==e?a(n.cause,t+1):!1}export{e as NATIVE_QUOTE_ADDRESS,i as encodeErc20Transfer,n as isStablecoinSymbol,a as looksLikeUserRejection,r as toBaseUnits};
@@ -0,0 +1 @@
1
+ import"../types.js";function e(e){return(e??`production`)===`staging`?`dev`:`prod`}export{e as resolveSdkEnv};
@@ -0,0 +1 @@
1
+ import{version as e}from"../../../kit/package.js";function t(t){return{...t.hostMetadata??{},kit_flow:t.flow,kit_version:e,...t.extras??{}}}export{t as buildKitMetadata};
@@ -0,0 +1 @@
1
+ async function e(e,t,n,r){try{return await e.gateway.poll(t,{...n?{network_id:n.network_id,to_address:n.to_address,asset_symbol:n.asset_symbol}:{},signal:r})}catch(e){if(r.aborted)throw e;if(e.statusCode===404)return null;throw e}}export{e as pollOnce};
@@ -0,0 +1 @@
1
+ import{encodeErc20Transfer as e,looksLikeUserRejection as t,toBaseUnits as n}from"./encoding.js";function r(t){let r=BigInt(n(t.amount,t.decimals));if(t.isNative)return{to:t.udaDepositAddress,data:`0x`,value:r,chainId:t.chainId,from:t.from};if(!t.sourceTokenAddress)throw Error(`Stridge driver: ERC-20 transfer requires a sourceTokenAddress.`);return{to:t.sourceTokenAddress,data:e(t.udaDepositAddress,r),value:0n,chainId:t.chainId,from:t.from}}async function i(e){if(e.signal.aborted)throw new DOMException(`Aborted`,`AbortError`);let n;try{n=await e.signer.signAndBroadcastStep(e.step,e.signal)}catch(e){if(t(e)){let t=Error(`User rejected the request.`);throw t.name=`UserRejectedRequestError`,Object.assign(t,{code:4001,cause:e}),t}throw e}if(e.signal.aborted)throw new DOMException(`Aborted`,`AbortError`);let r=await e.rpc.waitForTransactionReceipt({chain:e.step.chainId,hash:n,...e.receiptConfirmations===void 0?{}:{confirmations:e.receiptConfirmations},...e.receiptPollingIntervalMs===void 0?{}:{pollingIntervalMs:e.receiptPollingIntervalMs},signal:e.signal});return{hash:r,...e.explorers[e.step.chainId]?{explorerUrl:`${e.explorers[e.step.chainId].replace(/\/+$/,``)}/tx/${r}`}:{}}}export{r as buildErc20OrNativeStep,i as signAndConfirm};
@@ -0,0 +1 @@
1
+ function e(e){let n=0,r;e.signal.addEventListener(`abort`,()=>{r!==void 0&&clearTimeout(r)},{once:!0});let i=async()=>{if(e.signal.aborted)return;n+=1;let a;try{a=await e.fetch(e.signal)}catch{if(e.signal.aborted)return;r=setTimeout(i,t);return}if(e.signal.aborted)return;try{e.listener(a)}catch{}let o=e.nextIntervalMs(a,n);o<=0||e.signal.aborted||(r=setTimeout(i,o))};r=setTimeout(i,e.initialDelayMs??0)}const t=5e3;export{e as startPoll};