@stridge/kit 0.1.0-alpha.5 → 0.1.0-alpha.51

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 (398) hide show
  1. package/README.md +22 -6
  2. package/dist/KitProvider.d.ts +29 -0
  3. package/dist/KitProvider.js +1 -1
  4. package/dist/_internal/drivers/stridge/index.d.ts +3 -2
  5. package/dist/_internal/drivers/stridge/index.js +1 -1
  6. package/dist/_internal/withdraw/driver/index.d.ts +2 -2
  7. package/dist/activity-history/compound/index.d.ts +9 -0
  8. package/dist/activity-history/compound/index.js +1 -0
  9. package/dist/deposit/compound/index.d.ts +4 -3
  10. package/dist/deposit/widgets/index.d.ts +13 -0
  11. package/dist/deposit/widgets/index.js +1 -0
  12. package/dist/drivers/stridge/catalog.d.ts +54 -0
  13. package/dist/drivers/stridge/catalog.js +1 -0
  14. package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +10 -1
  15. package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
  16. package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +37 -14
  17. package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
  18. package/dist/drivers/stridge/internal/ensureWalletChain.js +1 -0
  19. package/dist/drivers/stridge/internal/pollOnce.js +1 -1
  20. package/dist/drivers/stridge/internal/resolveAddEthereumChain.js +1 -0
  21. package/dist/drivers/stridge/internal/retry.js +1 -0
  22. package/dist/drivers/stridge/internal/supportedChains.js +1 -0
  23. package/dist/drivers/stridge/types.d.ts +20 -14
  24. package/dist/drivers/stridge/types.js +1 -1
  25. package/dist/drivers/stridge/wagmiSigner.js +1 -1
  26. package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +4 -2
  27. package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
  28. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +17 -4
  29. package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
  30. package/dist/drivers/stridge-mock/fixtures.d.ts +14 -12
  31. package/dist/drivers/stridge-mock/fixtures.js +1 -1
  32. package/dist/events/bus/createBus.d.ts +7 -0
  33. package/dist/events/bus/createBus.js +1 -0
  34. package/dist/events/bus/flowIdRegistry.d.ts +17 -0
  35. package/dist/events/bus/flowIdRegistry.js +1 -0
  36. package/dist/events/bus/index.js +1 -0
  37. package/dist/events/bus/metadata.js +1 -0
  38. package/dist/events/context.js +1 -0
  39. package/dist/events/emit/index.js +1 -0
  40. package/dist/events/emit/mapFailure.js +1 -0
  41. package/dist/events/emit/useDepositEmissions.js +1 -0
  42. package/dist/events/emit/useKitEmitter.js +1 -0
  43. package/dist/events/emit/useWithdrawEmissions.js +1 -0
  44. package/dist/events/hooks/index.d.ts +6 -0
  45. package/dist/events/hooks/index.js +1 -0
  46. package/dist/events/hooks/useCurrentFlowId.d.ts +6 -0
  47. package/dist/events/hooks/useCurrentFlowId.js +1 -0
  48. package/dist/events/hooks/useStableHandler.js +1 -0
  49. package/dist/events/hooks/useStridgeEvent.d.ts +8 -0
  50. package/dist/events/hooks/useStridgeEvent.js +1 -0
  51. package/dist/events/hooks/useStridgeEventBus.d.ts +33 -0
  52. package/dist/events/hooks/useStridgeEventBus.js +1 -0
  53. package/dist/events/hooks/useStridgeEvents.d.ts +6 -0
  54. package/dist/events/hooks/useStridgeEvents.js +1 -0
  55. package/dist/events/hooks/useStridgeFlowEvent.d.ts +8 -0
  56. package/dist/events/hooks/useStridgeFlowEvent.js +1 -0
  57. package/dist/events/hooks/useStridgeFlowEvents.d.ts +6 -0
  58. package/dist/events/hooks/useStridgeFlowEvents.js +1 -0
  59. package/dist/events/index.d.ts +14 -0
  60. package/dist/events/index.js +1 -0
  61. package/dist/events/publish.js +1 -0
  62. package/dist/events/types/deposit.d.ts +235 -0
  63. package/dist/events/types/envelope.d.ts +145 -0
  64. package/dist/events/types/index.d.ts +31 -0
  65. package/dist/events/types/kit.d.ts +23 -0
  66. package/dist/events/types/withdraw.d.ts +150 -0
  67. package/dist/flows/deposit/dialog/DepositDialog.d.ts +20 -82
  68. package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
  69. package/dist/flows/deposit/dialog/WalletRequiredState.js +1 -0
  70. package/dist/flows/deposit/dialog/WalletRequiredState.styles.js +1 -0
  71. package/dist/flows/deposit/driver/payloads.d.ts +17 -4
  72. package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.d.ts +2 -0
  73. package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -1
  74. package/dist/flows/deposit/driver/transformers/index.d.ts +1 -0
  75. package/dist/flows/deposit/driver/transformers/quoteToPayload.d.ts +2 -0
  76. package/dist/flows/deposit/driver/transformers/settlementToPayload.d.ts +25 -0
  77. package/dist/flows/deposit/driver/transformers/startToAddressesPayload.d.ts +2 -0
  78. package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -1
  79. package/dist/flows/deposit/driver/transformers/startToBrandPayload.d.ts +1 -0
  80. package/dist/flows/deposit/driver/transformers/startToTargetPayload.d.ts +2 -0
  81. package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -1
  82. package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.d.ts +1 -0
  83. package/dist/flows/deposit/driver/types.d.ts +64 -3
  84. package/dist/flows/deposit/orchestrator/controller.js +1 -1
  85. package/dist/flows/deposit/orchestrator/reducer.js +1 -1
  86. package/dist/flows/deposit/orchestrator/types.d.ts +103 -1
  87. package/dist/flows/deposit/orchestrator/useDeposit.d.ts +45 -1
  88. package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
  89. package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.d.ts +40 -0
  90. package/dist/flows/deposit/widgets/activity-history/DepositHistoryDetail.js +1 -0
  91. package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.d.ts +38 -0
  92. package/dist/flows/deposit/widgets/activity-history/DepositHistoryList.js +1 -0
  93. package/dist/flows/deposit/widgets/activity-history/index.d.ts +2 -0
  94. package/dist/flows/deposit/widgets/activity-history/index.js +1 -0
  95. package/dist/flows/deposit/widgets/activity-history/useDepositActivityHistorySource.js +1 -0
  96. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +32 -5
  97. package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
  98. package/dist/flows/deposit/widgets/amount-entry/footerIntent.js +1 -0
  99. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.d.ts +22 -4
  100. package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
  101. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts +37 -4
  102. package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -1
  103. package/dist/flows/deposit/widgets/deposit/Deposit.d.ts +33 -4
  104. package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
  105. package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +32 -0
  106. package/dist/flows/deposit/widgets/deposit/compound/Deposit.js +1 -1
  107. package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -1
  108. package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.d.ts +29 -0
  109. package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.js +1 -0
  110. package/dist/flows/deposit/widgets/deposit/compound/components/Guards.d.ts +28 -0
  111. package/dist/flows/deposit/widgets/deposit/compound/components/Guards.js +1 -0
  112. package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +10 -0
  113. package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
  114. package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +6 -0
  115. package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -1
  116. package/dist/flows/deposit/widgets/deposit/compound/components/Steps.d.ts +24 -0
  117. package/dist/flows/deposit/widgets/deposit/compound/components/Steps.js +1 -0
  118. package/dist/flows/deposit/widgets/deposit/compound/index.d.ts +1 -0
  119. package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +6 -3
  120. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +41 -1
  121. package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
  122. package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -1
  123. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.js +1 -1
  124. package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.js +1 -1
  125. package/dist/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts +5 -5
  126. package/dist/flows/deposit/widgets/error-state/ErrorState.d.ts +39 -4
  127. package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
  128. package/dist/flows/deposit/widgets/processing-state/ProcessingState.d.ts +30 -4
  129. package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -1
  130. package/dist/flows/deposit/widgets/success-state/SuccessState.d.ts +38 -4
  131. package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -1
  132. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.d.ts +34 -3
  133. package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -1
  134. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +1 -1
  135. package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -1
  136. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
  137. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +5 -2
  138. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -1
  139. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +5 -0
  140. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
  141. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.d.ts +4 -10
  142. package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
  143. package/dist/flows/deposit/widgets/transfer-crypto/compound/types.d.ts +16 -2
  144. package/dist/flows/shared/transformers/computeQuoteAttrs.d.ts +1 -0
  145. package/dist/flows/shared/transformers/index.d.ts +1 -0
  146. package/dist/flows/shared/transformers/pickRelevantSettlement.d.ts +1 -0
  147. package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -1
  148. package/dist/flows/shared/transformers/testnets.js +1 -0
  149. package/dist/flows/withdraw/bindings/WithdrawBindings.d.ts +92 -0
  150. package/dist/flows/withdraw/bindings/WithdrawBindings.js +1 -0
  151. package/dist/flows/withdraw/bindings/index.d.ts +1 -0
  152. package/dist/flows/withdraw/bindings/index.js +1 -0
  153. package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +35 -71
  154. package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
  155. package/dist/flows/withdraw/driver/dto.d.ts +8 -7
  156. package/dist/flows/withdraw/driver/payloads.d.ts +16 -1
  157. package/dist/flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js +1 -1
  158. package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js +1 -1
  159. package/dist/flows/withdraw/driver/types.d.ts +111 -14
  160. package/dist/flows/withdraw/orchestrator/controller.js +1 -1
  161. package/dist/flows/withdraw/orchestrator/index.d.ts +1 -1
  162. package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
  163. package/dist/flows/withdraw/orchestrator/types.d.ts +201 -32
  164. package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +36 -1
  165. package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -1
  166. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.d.ts +39 -0
  167. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryDetail.js +1 -0
  168. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.d.ts +36 -0
  169. package/dist/flows/withdraw/widgets/activity-history/WithdrawHistoryList.js +1 -0
  170. package/dist/flows/withdraw/widgets/activity-history/index.d.ts +2 -0
  171. package/dist/flows/withdraw/widgets/activity-history/index.js +1 -0
  172. package/dist/flows/withdraw/widgets/activity-history/useWithdrawActivityHistorySource.js +1 -0
  173. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.d.ts +60 -0
  174. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.js +1 -0
  175. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.d.ts +13 -0
  176. package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.js +1 -0
  177. package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.d.ts +29 -0
  178. package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.js +1 -0
  179. package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.d.ts +25 -0
  180. package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.js +1 -0
  181. package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.d.ts +27 -0
  182. package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.js +1 -0
  183. package/dist/flows/withdraw/widgets/withdraw/compound/index.d.ts +3 -0
  184. package/dist/flows/withdraw/widgets/withdraw/compound/index.js +1 -0
  185. package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.d.ts +45 -2
  186. package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.js +1 -1
  187. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +32 -12
  188. package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
  189. package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -1
  190. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +6 -1
  191. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -1
  192. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +7 -5
  193. package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
  194. package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +15 -5
  195. package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -1
  196. package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +39 -3
  197. package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -1
  198. package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.d.ts +46 -2
  199. package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js +1 -1
  200. package/dist/i18n/index.d.ts +5 -4
  201. package/dist/i18n/index.js +1 -1
  202. package/dist/i18n/locales/ar.js +1 -1
  203. package/dist/i18n/locales/es.js +1 -1
  204. package/dist/i18n/locales/source-keys.d.ts +12 -0
  205. package/dist/i18n/locales/source-keys.js +0 -0
  206. package/dist/icons/index.d.ts +3 -1
  207. package/dist/icons/index.js +1 -1
  208. package/dist/index.d.ts +22 -9
  209. package/dist/index.js +1 -1
  210. package/dist/package.js +1 -1
  211. package/dist/scope/KitPortalScope.js +1 -1
  212. package/dist/scope/KitScope.d.ts +18 -1
  213. package/dist/scope/KitScope.js +1 -1
  214. package/dist/scope/context.d.ts +17 -1
  215. package/dist/scope/index.d.ts +1 -1
  216. package/dist/shared/attribution/Attribution.js +1 -0
  217. package/dist/shared/attribution/Attribution.slots.js +1 -0
  218. package/dist/shared/attribution/Attribution.styles.js +1 -0
  219. package/dist/shared/attribution/index.js +1 -0
  220. package/dist/shared/chains/index.d.ts +48 -29
  221. package/dist/shared/chains/index.js +1 -1
  222. package/dist/shared/constants/brand-intercom.js +1 -0
  223. package/dist/shared/cuer/Cuer.js +1 -1
  224. package/dist/shared/dialog/Frame.js +1 -1
  225. package/dist/shared/dialog/LoadingState.js +1 -0
  226. package/dist/shared/dialog/LoadingState.styles.js +1 -0
  227. package/dist/shared/dialog/StepTransition.js +1 -1
  228. package/dist/shared/dialog/useDirectionalChevronTransform.js +1 -1
  229. package/dist/shared/driver/types.d.ts +4 -3
  230. package/dist/shared/i18n/KitI18nProvider.d.ts +11 -8
  231. package/dist/shared/i18n/KitI18nProvider.js +1 -1
  232. package/dist/shared/i18n/createKitI18n.d.ts +79 -16
  233. package/dist/shared/i18n/createKitI18n.js +1 -1
  234. package/dist/shared/i18n/useLingui.d.ts +11 -3
  235. package/dist/shared/icons/HistoryIcon.d.ts +12 -0
  236. package/dist/shared/icons/HistoryIcon.js +1 -0
  237. package/dist/shared/icons/LogoIcon.d.ts +13 -0
  238. package/dist/shared/icons/LogoIcon.js +1 -0
  239. package/dist/shared/merchant-link/MerchantLink.d.ts +1 -0
  240. package/dist/shared/merchant-link/MerchantLink.js +1 -0
  241. package/dist/shared/merchant-link/MerchantLinkButton.d.ts +1 -0
  242. package/dist/shared/merchant-link/MerchantLinkButton.js +1 -0
  243. package/dist/shared/merchant-link/index.d.ts +1 -0
  244. package/dist/shared/merchant-link/index.js +1 -0
  245. package/dist/shared/merchant-link/resolveMerchantLink.js +1 -0
  246. package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
  247. package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
  248. package/dist/shared/support/SupportConfigContext.d.ts +1 -0
  249. package/dist/shared/support/SupportConfigContext.js +1 -0
  250. package/dist/shared/support/SupportLink.d.ts +1 -0
  251. package/dist/shared/support/SupportLink.js +1 -0
  252. package/dist/shared/support/SupportSpinner.d.ts +1 -0
  253. package/dist/shared/support/SupportSpinner.js +1 -0
  254. package/dist/shared/support/index.d.ts +2 -0
  255. package/dist/shared/support/index.js +1 -0
  256. package/dist/shared/support/intercom-loader.d.ts +17 -0
  257. package/dist/shared/support/intercom-loader.js +1 -0
  258. package/dist/shared/support/types.d.ts +43 -0
  259. package/dist/shared/support/useIntercomMerchantContext.d.ts +27 -0
  260. package/dist/shared/support/useIntercomMerchantContext.js +1 -0
  261. package/dist/shared/support/useIntercomShutdownOnUnmount.js +1 -0
  262. package/dist/shared/support/useMerchantContext.d.ts +1 -0
  263. package/dist/shared/support/useMerchantContext.js +1 -0
  264. package/dist/shared/support/useSupportTrigger.js +1 -0
  265. package/dist/shared/terms/TermsConfigContext.d.ts +1 -0
  266. package/dist/shared/terms/TermsConfigContext.js +1 -0
  267. package/dist/shared/terms/TermsLink.d.ts +1 -0
  268. package/dist/shared/terms/TermsLink.js +1 -0
  269. package/dist/shared/terms/index.d.ts +1 -0
  270. package/dist/shared/terms/index.js +1 -0
  271. package/dist/shared/terms/types.d.ts +43 -0
  272. package/dist/shared/ui/Card/Card.styles.js +1 -1
  273. package/dist/shared/ui/Details/Details.d.ts +9 -1
  274. package/dist/shared/ui/Details/Details.styles.js +1 -1
  275. package/dist/shared/ui/Dialog/Dialog.js +1 -1
  276. package/dist/shared/ui/Dialog/Dialog.styles.js +1 -1
  277. package/dist/shared/ui/Select/Select.js +1 -1
  278. package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +21 -8
  279. package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -1
  280. package/dist/shared/ui/Steps/Steps.d.ts +52 -0
  281. package/dist/shared/ui/Steps/Steps.js +1 -0
  282. package/dist/shared/ui/Steps/Steps.slots.d.ts +7 -0
  283. package/dist/shared/ui/Steps/Steps.slots.js +1 -0
  284. package/dist/shared/ui/Steps/Steps.styles.js +1 -0
  285. package/dist/shared/ui/Steps/index.d.ts +2 -0
  286. package/dist/shared/ui/Steps/index.js +1 -0
  287. package/dist/shared/ui/WalletRow/WalletRow.d.ts +1 -1
  288. package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
  289. package/dist/shared/utils/logos/types.d.ts +1 -1
  290. package/dist/shared/utils/useDeepMemo.js +1 -0
  291. package/dist/shared/wallet/ConnectWalletContext.d.ts +17 -0
  292. package/dist/shared/wallet/ConnectWalletContext.js +1 -0
  293. package/dist/shared/widgets/activity-history/ActivityTrigger.js +1 -0
  294. package/dist/shared/widgets/activity-history/ActivityTrigger.styles.js +1 -0
  295. package/dist/shared/widgets/activity-history/adapters/settlementToWidgetProps.js +1 -0
  296. package/dist/shared/widgets/activity-history/compound/ActivityHistory.d.ts +95 -0
  297. package/dist/shared/widgets/activity-history/compound/ActivityHistory.js +1 -0
  298. package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.d.ts +22 -0
  299. package/dist/shared/widgets/activity-history/compound/ActivityHistory.slots.js +1 -0
  300. package/dist/shared/widgets/activity-history/compound/ActivityHistory.styles.js +1 -0
  301. package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.d.ts +75 -0
  302. package/dist/shared/widgets/activity-history/compound/ActivityHistoryDetail.js +1 -0
  303. package/dist/shared/widgets/activity-history/compound/Row.slots.d.ts +21 -0
  304. package/dist/shared/widgets/activity-history/compound/Row.slots.js +1 -0
  305. package/dist/shared/widgets/activity-history/compound/Row.styles.js +1 -0
  306. package/dist/shared/widgets/activity-history/compound/components/Empty.d.ts +15 -0
  307. package/dist/shared/widgets/activity-history/compound/components/Empty.js +1 -0
  308. package/dist/shared/widgets/activity-history/compound/components/ErrorView.d.ts +26 -0
  309. package/dist/shared/widgets/activity-history/compound/components/ErrorView.js +1 -0
  310. package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.d.ts +39 -0
  311. package/dist/shared/widgets/activity-history/compound/components/HistoryHeader.js +1 -0
  312. package/dist/shared/widgets/activity-history/compound/components/List.d.ts +23 -0
  313. package/dist/shared/widgets/activity-history/compound/components/List.js +1 -0
  314. package/dist/shared/widgets/activity-history/compound/components/Row.d.ts +54 -0
  315. package/dist/shared/widgets/activity-history/compound/components/Row.js +1 -0
  316. package/dist/shared/widgets/activity-history/compound/components/StatusPip.js +1 -0
  317. package/dist/shared/widgets/activity-history/compound/context.d.ts +79 -0
  318. package/dist/shared/widgets/activity-history/compound/context.js +1 -0
  319. package/dist/shared/widgets/activity-history/index.js +1 -0
  320. package/dist/shared/widgets/activity-history/payloads.d.ts +81 -0
  321. package/dist/shared/widgets/activity-history/transformers/historyResponseToPayload.js +1 -0
  322. package/dist/shared/widgets/activity-history/transformers/resolveDirection.js +1 -0
  323. package/dist/shared/widgets/amount-entry/compound/AmountEntry.d.ts +4 -1
  324. package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
  325. package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.d.ts +1 -0
  326. package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.js +1 -1
  327. package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
  328. package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +6 -1
  329. package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -1
  330. package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -1
  331. package/dist/shared/widgets/amount-entry/compound/components/Hero/SwapBackdrop.js +1 -1
  332. package/dist/shared/widgets/amount-entry/compound/components/Notice.d.ts +7 -0
  333. package/dist/shared/widgets/amount-entry/compound/components/Notice.js +1 -0
  334. package/dist/shared/widgets/amount-entry/compound/types.d.ts +26 -1
  335. package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -1
  336. package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -1
  337. package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +7 -1
  338. package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -1
  339. package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +6 -1
  340. package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -1
  341. package/dist/shared/widgets/asset-picker/compound/types.d.ts +14 -0
  342. package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.styles.js +1 -1
  343. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.d.ts +4 -3
  344. package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -1
  345. package/dist/shared/widgets/confirm-transfer/compound/components/QuoteTimer.js +1 -1
  346. package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -1
  347. package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -1
  348. package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +1 -1
  349. package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -1
  350. package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -1
  351. package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +1 -5
  352. package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -1
  353. package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +0 -1
  354. package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -1
  355. package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -1
  356. package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +6 -1
  357. package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -1
  358. package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +4 -3
  359. package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -1
  360. package/dist/shared/widgets/processing-state/compound/components/Hero.d.ts +14 -7
  361. package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -1
  362. package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -1
  363. package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -1
  364. package/dist/shared/widgets/processing-state/compound/components/splitAmount.js +1 -0
  365. package/dist/shared/widgets/processing-state/compound/index.d.ts +1 -1
  366. package/dist/shared/widgets/processing-state/compound/types.d.ts +11 -29
  367. package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -1
  368. package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -1
  369. package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +1 -1
  370. package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -1
  371. package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -1
  372. package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -1
  373. package/dist/shared/widgets/success-state/compound/types.d.ts +5 -5
  374. package/dist/stridge/StridgeProvider.d.ts +165 -35
  375. package/dist/stridge/StridgeProvider.js +1 -1
  376. package/dist/stridge/depositOwner.js +1 -0
  377. package/dist/stridge/optionalWagmi.js +1 -0
  378. package/dist/stridge/stubs.js +1 -1
  379. package/dist/styles/index.css +228 -10
  380. package/dist/types.d.ts +5 -4
  381. package/dist/ui/index.d.ts +3 -1
  382. package/dist/ui/index.js +1 -1
  383. package/dist/withdraw/compound/index.d.ts +5 -2
  384. package/dist/withdraw/compound/index.js +1 -1
  385. package/dist/withdraw/dialog/index.d.ts +3 -1
  386. package/dist/withdraw/widgets/index.d.ts +7 -0
  387. package/dist/withdraw/widgets/index.js +1 -0
  388. package/package.json +23 -7
  389. package/dist/_internal/deposit/widgets/index.d.ts +0 -11
  390. package/dist/_internal/deposit/widgets/index.js +0 -1
  391. package/dist/_internal/withdraw/widgets/index.d.ts +0 -5
  392. package/dist/_internal/withdraw/widgets/index.js +0 -1
  393. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +0 -36
  394. package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +0 -1
  395. package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +0 -17
  396. package/dist/shared/widgets/processing-state/compound/components/Actions.js +0 -1
  397. package/dist/stridge/StridgeContext.d.ts +0 -29
  398. package/dist/stridge/StridgeContext.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { DialogShellControls } from "../../../dialog/DialogShell.js";
2
2
  import { AssetDescriptor } from "../../asset-descriptor.js";
3
3
  import { ComponentProps, ReactNode } from "react";
4
- import { DestinationDto, GatewayLegFromDto, GatewayLegToDto, GatewayPollResponse } from "@stridge/sdk";
4
+ import { DestinationDto, GatewayLegFromDto, GatewayLegToDto, GatewayUdaDto } from "@stridge/sdk";
5
5
 
6
6
  //#region src/shared/widgets/success-state/compound/types.d.ts
7
7
  /**
@@ -15,9 +15,9 @@ interface SuccessStateAsset extends AssetDescriptor {
15
15
  */
16
16
  raw?: DestinationDto;
17
17
  /**
18
- * Full `gateway/{owner}` poll response that produced the destination.
18
+ * Per-UDA view picked from `gateway/{owner}` that produced the destination metadata.
19
19
  */
20
- responseRaw?: GatewayPollResponse;
20
+ responseRaw?: GatewayUdaDto;
21
21
  }
22
22
  /**
23
23
  * Config for the secondary "View on …" link rendered inside the Actions
@@ -50,9 +50,9 @@ interface SuccessStateTxRef {
50
50
  */
51
51
  raw?: GatewayLegFromDto | GatewayLegToDto;
52
52
  /**
53
- * Full `gateway/{owner}` poll response that produced the leg.
53
+ * Per-UDA view picked from `gateway/{owner}` that produced the leg.
54
54
  */
55
- responseRaw?: GatewayPollResponse;
55
+ responseRaw?: GatewayUdaDto;
56
56
  }
57
57
  /**
58
58
  * Public props accepted by the {@link SuccessState} root.
@@ -1,47 +1,115 @@
1
+ import { DepositMethodConfig, DepositMethodsConfig } from "../flows/deposit/orchestrator/types.js";
1
2
  import { KitI18nConfig } from "../shared/i18n/createKitI18n.js";
3
+ import { SupportConfig } from "../shared/support/types.js";
4
+ import { TermsConfig } from "../shared/terms/types.js";
2
5
  import { StridgeEnvironment } from "../drivers/stridge/types.js";
3
- import { ChainInput } from "../shared/chains/index.js";
6
+ import { ConnectWalletConfig } from "../shared/wallet/ConnectWalletContext.js";
7
+ import { Address } from "viem";
4
8
  import { ReactNode } from "react";
5
9
  import * as _$react_jsx_runtime0 from "react/jsx-runtime";
6
10
 
7
11
  //#region src/stridge/StridgeProvider.d.ts
8
12
  /**
9
- * Settlement-asset tuple. `chain` accepts any of: an EIP-155 chain id (`56`), a slug from the
10
- * `chains` namespace (`chains.bsc`), or a Stridge `network_id` string (`"9006"`). `symbol` is
11
- * the asset symbol on that chain (e.g. `"USDC"`). The kit normalizes `chain` internally the
12
- * gateway always receives the wire-shape `network_id`.
13
+ * Settlement-asset tuple. `networkId` is the Stridge network id the wire value the gateway
14
+ * routes against, read straight off `Gateway.assets()` (`"9006"` for BSC, `"195"` for
15
+ * Tron, …). The kit forwards it to `gateway/start` verbatim; it does not ship a chain catalog,
16
+ * so any network the backend lists works without a kit release. `symbol` is the asset symbol
17
+ * on that network (e.g. `"USDC"`).
13
18
  *
14
19
  * The same `asset` drives both flows:
15
20
  *
16
- * - **Deposit** settles to this `(chain, symbol)` at the connected wallet (same-owner pattern).
17
- * - **Withdraw** sources from this `(chain, symbol)` of the user's on-chain balance.
21
+ * - **Deposit** settles to this `(networkId, symbol)` at the connected wallet (same-owner pattern).
22
+ * - **Withdraw** sources from this `(networkId, symbol)` of the user's on-chain balance.
18
23
  */
19
24
  interface StridgeAsset {
20
- chain: ChainInput;
25
+ networkId: string;
21
26
  symbol: string;
22
27
  }
23
28
  /**
24
- * Per-flow deposit tuning. Pass `deposit: {}` to enable the deposit flow with defaults.
29
+ * Settlement destination for the deposit flow. The kit does not infer a destination from any
30
+ * connected wagmi wallet — businesses pass the treasury / settlement address where deposited
31
+ * funds should land.
32
+ *
33
+ * @remarks
34
+ * If the gateway-kit admin config has "Same-owner only" enabled (default), `address` must
35
+ * equal the deposit owner. Turn the toggle off — and optionally pair it with a destination
36
+ * whitelist — to route funds to an address that differs from the owner.
37
+ */
38
+ interface StridgeDepositDestination {
39
+ address: Address;
40
+ }
41
+ /**
42
+ * Stridge `gateway/start.owner` identifier for a single flow. Scopes UDA provisioning and the
43
+ * proactive `gateway/{owner}` settlement poll. The kit treats the address as opaque — businesses
44
+ * pick whatever per-customer (real EOA, derived per-user EOA) or shared (treasury) granularity
45
+ * fits their model.
46
+ */
47
+ interface StridgeFlowOwner {
48
+ address: Address;
49
+ }
50
+ /**
51
+ * Per-flow deposit tuning.
25
52
  */
26
53
  interface StridgeDepositFlowConfig {
54
+ /** Settlement destination address — where settled brand-currency funds land at completion. */
55
+ destination: StridgeDepositDestination;
56
+ /**
57
+ * Owner used as `gateway/start.owner` for deposit UDAs. Optional — falls back to the
58
+ * connected wagmi wallet address, then to `dev.userAddressOverride`.
59
+ */
60
+ owner?: StridgeFlowOwner;
27
61
  /**
28
- * Low-balance / amount-entry USD floor. Defaults to the kit's internal default
29
- * (`STRIDGE_DEFAULT_MIN_DEPOSIT_USD`) when omitted.
62
+ * Lower USD bound on the deposit amount. Drives the asset-picker's "Low Balance" pill,
63
+ * prefills the amount-entry hero, and gates the confirm CTA.
30
64
  */
31
- minDepositUsd?: number;
65
+ minAmountUsd?: number;
66
+ /**
67
+ * Upper USD bound on the deposit amount. When set, the effective ceiling is
68
+ * `min(walletBalanceUsd, maxAmountUsd)`.
69
+ */
70
+ maxAmountUsd?: number;
32
71
  /**
33
72
  * Metadata persisted on the UDA at `gateway/start` time. Echoed back on `gateway/{owner}`
34
- * and webhook payloads. Treat as untrusted display data.
73
+ * and webhook payloads.
35
74
  */
36
75
  metadata?: Record<string, unknown>;
76
+ /**
77
+ * Per-method host disable lever for the deposit-method picker. Disabled tiles stay in the
78
+ * picker (preserves "I can see my options" UX), render natively disabled, and show
79
+ * `disabledHint` inline as the tile's meta line.
80
+ */
81
+ methods?: StridgeDepositMethodsConfig;
37
82
  }
38
83
  /**
39
- * Per-flow withdraw tuning. Pass `withdraw: {}` to enable the withdraw flow with defaults.
84
+ * Host-supplied disable lever for a single payment method on the deposit-method picker.
85
+ */
86
+ type StridgeDepositMethodConfig = DepositMethodConfig;
87
+ /**
88
+ * Per-method host configuration for the deposit picker. Omitting a method keeps default behavior.
89
+ */
90
+ type StridgeDepositMethodsConfig = DepositMethodsConfig;
91
+ /**
92
+ * Per-flow withdraw tuning.
40
93
  */
41
94
  interface StridgeWithdrawFlowConfig {
42
95
  /**
43
- * Metadata persisted on every UDA the withdraw flow provisions. Merged under the kit-set
44
- * `kit_flow` / `kit_version` / `source` keys (kit keys win).
96
+ * Owner used as `gateway/start.owner` for every withdraw UDA the flow provisions. Required
97
+ * the withdraw flow has no wagmi fallback because the business (not the end-user) is the
98
+ * party broadcasting the source-chain tx to the UDA.
99
+ */
100
+ owner: StridgeFlowOwner;
101
+ /**
102
+ * Lower USD bound on the withdraw amount. When set, the form blocks submit with a localized
103
+ * "Min $X" CTA while the typed amount sits below the floor.
104
+ */
105
+ minAmountUsd?: number;
106
+ /**
107
+ * Upper USD bound on the withdraw amount. When set, the form blocks submit with a localized
108
+ * "Max $X" CTA while the typed amount sits above the cap.
109
+ */
110
+ maxAmountUsd?: number;
111
+ /**
112
+ * Metadata persisted on every UDA the withdraw flow provisions.
45
113
  */
46
114
  metadata?: Record<string, unknown>;
47
115
  }
@@ -56,30 +124,56 @@ interface StridgeAppearance {
56
124
  accent?: string;
57
125
  /** Border-radius preset. `"sharp" | "subtle" | "rounded" | "pill"`. */
58
126
  radius?: "sharp" | "subtle" | "rounded" | "pill";
127
+ /** Text direction the kit's primitives render with. */
128
+ direction?: "ltr" | "rtl";
59
129
  /**
60
- * Text direction the kit's primitives render with. Falls back to a locale-derived default
61
- * (`"rtl"` for Arabic, Hebrew, Persian, Urdu) when omitted.
130
+ * Controls the "Powered by Stridge" attribution row inside every gateway widget frame.
62
131
  */
63
- direction?: "ltr" | "rtl";
132
+ attribution?: "visible" | "hidden";
64
133
  }
65
134
  /**
66
- * Persistence configuration for the kit's per-tab state (settlement banner acks, future
67
- * kit-wide features).
135
+ * Development / preview-only knobs. Grouped under a single `dev` prop so production integrations
136
+ * never reach for these accidentally.
137
+ */
138
+ interface StridgeDevConfig {
139
+ /**
140
+ * Address-only override used when no wagmi account is connected. Lets demos, sample apps,
141
+ * and read-only previews bootstrap the kit against a pasted EOA without firing up a wallet.
142
+ * The wagmi-connected account always wins — the override only fills in when `useAccount()`
143
+ * returns no address.
144
+ */
145
+ userAddressOverride?: Address;
146
+ }
147
+ /**
148
+ * Persistence configuration for the kit's per-tab state (settlement banner acks, future kit-wide
149
+ * features).
68
150
  */
69
151
  interface StridgeStorageConfig {
70
152
  /**
71
153
  * Storage backend. `"session"` (default — `sessionStorage`, forgotten on tab close),
72
- * `"local"` (`localStorage`, survives restarts), or `"memory"` (in-process only, ideal for
73
- * tests).
154
+ * `"local"` (`localStorage`, survives restarts), or `"memory"` (in-process only).
74
155
  */
75
156
  driver?: "session" | "local" | "memory";
76
157
  /**
77
- * Prefix every key the kit writes under. Two `<StridgeProvider />` instances on the same
78
- * page sharing a backend should pick distinct namespaces to keep state isolated. Defaults
79
- * to `stridge-kit:storage:v1`.
158
+ * Prefix every key the kit writes under. Defaults to `stridge-kit:storage:v1`.
80
159
  */
81
160
  namespace?: string;
82
161
  }
162
+ /**
163
+ * Eager-bootstrap opt-in. Set on `<StridgeProvider prefetch={…}>` to fire the driver `arm()` at
164
+ * mount instead of waiting for `useDeposit().open()` / `usePrefetchDeposit()` to do it. Two
165
+ * shapes:
166
+ *
167
+ * - `true` — arm every enabled flow at mount.
168
+ * - `("deposit" | "withdraw")[]` — arm only the listed flows.
169
+ *
170
+ * Default is unset (no eager arm). Reach for this only when the host KNOWS the dialog will
171
+ * open (e.g. a checkout page whose entire purpose is the gateway widget). The default trade —
172
+ * pay bootstrap cost when the user actually opens the dialog — is the right call for every
173
+ * other integration; flipping the prop "just to be safe" re-creates the eager-load problem at
174
+ * a different layer.
175
+ */
176
+ type StridgePrefetchConfig = true | ReadonlyArray<"deposit" | "withdraw">;
83
177
  declare namespace StridgeProvider {
84
178
  interface Props {
85
179
  /**
@@ -90,13 +184,11 @@ declare namespace StridgeProvider {
90
184
  /**
91
185
  * Which Stridge API host the kit talks to. Defaults to `"production"`
92
186
  * (`api.stridge.com`). Pass `"staging"` (`api.stridge.dev`) for integration testing.
93
- * Note that gateway keys are environment-scoped — a staging key won't authenticate
94
- * against production and vice versa.
95
187
  */
96
188
  environment?: StridgeEnvironment;
97
189
  /**
98
- * Settlement asset — the single source of truth for which `(chain, symbol)` the gateway
99
- * operates in. Deposit settles to this asset; withdraw sources from this asset.
190
+ * Settlement asset — the single source of truth for which `(networkId, symbol)` the
191
+ * gateway operates in.
100
192
  */
101
193
  asset: StridgeAsset;
102
194
  /**
@@ -113,6 +205,34 @@ declare namespace StridgeProvider {
113
205
  i18n?: KitI18nConfig;
114
206
  /** Persistence configuration for kit-internal state. */
115
207
  storage?: StridgeStorageConfig;
208
+ /**
209
+ * Development / preview-only knobs. Grouped under `dev` so production integrations
210
+ * never reach for them accidentally.
211
+ */
212
+ dev?: StridgeDevConfig;
213
+ /**
214
+ * Customer-support entry point configuration.
215
+ *
216
+ * Omit to use Stridge Intercom. Provide `url`, `onOpen`, or both to use merchant-owned
217
+ * support and opt out of Stridge messenger globals.
218
+ */
219
+ support?: SupportConfig;
220
+ /**
221
+ * Terms link configuration. Omit to point the kit's terms links at Stridge's terms page.
222
+ */
223
+ terms?: TermsConfig;
224
+ /**
225
+ * Eager-bootstrap opt-in. See {@link StridgePrefetchConfig}.
226
+ */
227
+ prefetch?: StridgePrefetchConfig;
228
+ /**
229
+ * Host-supplied "Connect a wallet" CTA. Rendered by the dialog's wallet-required state
230
+ * when the deposit flow is enabled but no owner can be resolved (no `flows.deposit.owner`,
231
+ * no wagmi connection, no `dev.userAddressOverride`). Omit to show the prompt without an
232
+ * actionable button — useful when the host surfaces the connect affordance elsewhere on
233
+ * the page.
234
+ */
235
+ connectWallet?: ConnectWalletConfig;
116
236
  /** Optional className applied to the kit's scope root `<div>`. */
117
237
  className?: string;
118
238
  children?: ReactNode;
@@ -127,16 +247,21 @@ declare namespace StridgeProvider {
127
247
  * from the per-flow `/dialog` subpaths anywhere inside; open them with `useDeposit().open()` /
128
248
  * `useWithdraw().open()`.
129
249
  *
250
+ * Bootstrap is lazy — no Stridge requests fire at provider mount. The driver instances stay
251
+ * idle until the user opens a dialog or the headless `usePrefetchDeposit()` /
252
+ * `usePrefetchWithdraw()` hook is called. Pass `prefetch` to opt into eager bootstrap when the
253
+ * host knows the dialog will open (rare).
254
+ *
130
255
  * @example
131
256
  * ```tsx
132
- * import { StridgeProvider, chains } from "@stridge/kit";
257
+ * import { StridgeProvider } from "@stridge/kit";
133
258
  * import { DepositDialog } from "@stridge/kit/deposit/dialog";
134
259
  *
135
260
  * <StridgeProvider
136
261
  * gatewayKey={process.env.NEXT_PUBLIC_STRIDGE_GATEWAY_KEY!}
137
- * asset={{ chain: chains.bsc, symbol: "USDC" }}
138
- * flows={{ deposit: {} }}
139
- * appearance={{ theme: "dark", accent: "oklch(78% 0.15 240)", radius: "rounded" }}
262
+ * asset={{ networkId: "9006", symbol: "USDC" }}
263
+ * flows={{ deposit: { destination: { address: treasury } } }}
264
+ * connectWallet={{ onClick: openConnectModal }}
140
265
  * >
141
266
  * <YourApp />
142
267
  * <DepositDialog />
@@ -151,8 +276,13 @@ declare function StridgeProvider({
151
276
  appearance,
152
277
  i18n,
153
278
  storage,
279
+ dev,
280
+ support,
281
+ terms,
282
+ prefetch,
283
+ connectWallet,
154
284
  className,
155
285
  children
156
286
  }: StridgeProvider.Props): _$react_jsx_runtime0.JSX.Element;
157
287
  //#endregion
158
- export { StridgeAppearance, StridgeAsset, StridgeDepositFlowConfig, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig };
288
+ export { StridgeAppearance, StridgeAsset, StridgeDepositDestination, StridgeDepositFlowConfig, StridgeDepositMethodConfig, StridgeDepositMethodsConfig, StridgeFlowOwner, StridgePrefetchConfig, StridgeProvider, StridgeStorageConfig, StridgeWithdrawFlowConfig };
@@ -1 +1 @@
1
- "use client";import{normalizeChainToNetworkId as e}from"../shared/chains/index.js";import{createKitI18n as t}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{StridgeContext as n}from"./StridgeContext.js";import{createStridgeDepositDriver as r}from"../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as i}from"../drivers/stridge/createStridgeWithdrawDriver.js";import"../_internal/drivers/stridge/index.js";import{KitProvider as a}from"../KitProvider.js";import{createStubDepositDriver as o,createStubWithdrawDriver as s}from"./stubs.js";import{useMemo as c,useRef as l,useSyncExternalStore as u}from"react";import{jsx as d}from"react/jsx-runtime";import{useAccount as f,useConfig as p}from"wagmi";function m({gatewayKey:m,environment:h,asset:g,flows:_,appearance:v,i18n:y,storage:b,className:x,children:S}){if(!_.deposit&&!_.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!g)throw Error("<StridgeProvider /> requires `asset: { chain, symbol }`.");let C=p(),{address:w}=f(),T=c(()=>t(y??{}),[y?.locale,y?.catalogs]),E=l(T);E.current=T;let D=c(()=>e(g.chain),[g.chain]),O=g.symbol,k=_.deposit,A=_.withdraw,j=c(()=>{if(!(!k||!w))return r({userAddress:w,projectKey:m,destination:{network_id:D,asset_symbol:O},wagmiConfig:C,getI18n:()=>E.current,...h?{environment:h}:{},...k.minDepositUsd===void 0?{}:{minDepositUsd:k.minDepositUsd},...k.metadata?{metadata:k.metadata}:{}})},[k,w,m,h,D,O,C]),M=c(()=>o(),[]),N=k?j??M:void 0,P=c(()=>{if(!(!A||!w))return i({userAddress:w,projectKey:m,currency:{networkId:D,assetSymbol:O},wagmiConfig:C,getI18n:()=>E.current,...h?{environment:h}:{},...A.metadata?{metadata:A.metadata}:{}})},[A,w,m,h,D,O,C]),F=c(()=>s(),[]),I=A?P??F:void 0,L=j??P,R=u(e=>L?.subscribe(e)??(()=>{}),()=>{if(j){let e=j.getSnapshot();return e.brand.status===`ready`&&e.target.status===`ready`}return P?P.getSnapshot().receiveOptions.status===`ready`:!1},()=>!1);return d(n,{value:c(()=>({isReady:R,driver:j}),[R,j]),children:d(a,{theme:v?.theme,accent:v?.accent,radius:v?.radius,direction:v?.direction,i18n:y,storage:b?.driver,storageNamespace:b?.namespace,className:x,...N?{deposit:N}:{},...I?{withdraw:I}:{},children:S})})}export{m as StridgeProvider};
1
+ "use client";import{StridgeEventsContext as e}from"../events/context.js";import{createKitI18n as t}from"../shared/i18n/createKitI18n.js";import"../i18n/index.js";import{createStridgeCatalog as n}from"../drivers/stridge/catalog.js";import{createStridgeDepositDriver as r}from"../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as i}from"../drivers/stridge/createStridgeWithdrawDriver.js";import"../_internal/drivers/stridge/index.js";import{createBus as a}from"../events/bus/createBus.js";import{createFlowIdRegistry as o}from"../events/bus/flowIdRegistry.js";import{createMetadataStore as s}from"../events/bus/metadata.js";import"../events/bus/index.js";import{KitProvider as c}from"../KitProvider.js";import{resolveMerchantLink as l}from"../shared/merchant-link/resolveMerchantLink.js";import"../shared/merchant-link/index.js";import{useIntercomMerchantContext as u}from"../shared/support/useIntercomMerchantContext.js";import{useMerchantContext as ee}from"../shared/support/useMerchantContext.js";import"../shared/support/index.js";import{useDeepMemo as d}from"../shared/utils/useDeepMemo.js";import{ConnectWalletContext as f}from"../shared/wallet/ConnectWalletContext.js";import{DepositOwnerContext as p}from"./depositOwner.js";import{useOptionalWagmi as m}from"./optionalWagmi.js";import{createStubDepositDriver as h,createStubWithdrawDriver as g}from"./stubs.js";import{useEffect as _,useMemo as v,useRef as y}from"react";import{jsx as b}from"react/jsx-runtime";function x({gatewayKey:x,environment:S,asset:C,flows:w,appearance:T,i18n:E,storage:D,dev:O,support:k,terms:te,prefetch:A,connectWallet:j,className:M,children:N}){if(!w.deposit&&!w.withdraw)throw Error("<StridgeProvider /> requires at least one of `flows.deposit` or `flows.withdraw`.");if(!C)throw Error("<StridgeProvider /> requires `asset: { networkId, symbol }`.");let{config:P,address:F}=m(),I=v(()=>t(E??{}),[E?.locale,E?.messages]),L=y(I);L.current=I;let R=d(C),z=d(w.deposit),B=d(w.withdraw),V=R.networkId,H=R.symbol,U=z?.owner?.address??F??O?.userAddressOverride,W=B?.owner.address,G=v(()=>n({projectKey:x,...S?{environment:S}:{}}),[x,S]),K=v(()=>{if(!(!z||!U))return r({userAddress:U,projectKey:x,destination:{network_id:V,asset_symbol:H,to_address:z.destination.address},wagmiConfig:P,catalog:G,getI18n:()=>L.current,...S?{environment:S}:{},...z.minAmountUsd===void 0?{}:{minAmountUsd:z.minAmountUsd},...z.maxAmountUsd===void 0?{}:{maxAmountUsd:z.maxAmountUsd},...z.metadata?{metadata:z.metadata}:{}})},[z,U,x,S,V,H,P,G]),q=v(()=>h(),[]),J=z?K??q:void 0,Y=v(()=>{if(!(!B||!W))return i({userAddress:W,projectKey:x,currency:{networkId:V,assetSymbol:H},wagmiConfig:P,catalog:G,getI18n:()=>L.current,...S?{environment:S}:{},...B.minAmountUsd===void 0?{}:{minAmountUsd:B.minAmountUsd},...B.maxAmountUsd===void 0?{}:{maxAmountUsd:B.maxAmountUsd},...B.metadata?{metadata:B.metadata}:{}})},[B,W,x,S,V,H,P,G]),X=v(()=>g(),[]),Z=B?Y??X:void 0;_(()=>{if(!A)return;let e=A===!0||A.includes(`deposit`),t=A===!0||A.includes(`withdraw`);e&&K?.arm(),t&&Y?.arm()},[A,K,Y]);let ne=v(()=>z?{resolved:U!==void 0}:null,[z,U]),re=v(()=>j?{onClick:j.onClick,...j.label===void 0?{}:{label:j.label}}:null,[j?.onClick,j?.label]),Q=U??W,$=ee({gatewayKey:x,environment:S??`production`,assetChain:V,assetSymbol:H,...Q?{userAddress:Q}:{},...K?{depositDriver:K}:{}});return u(l(k?{url:k.url,onSelect:k.onOpen}:void 0).kind===`default`?$:null),b(e,{value:v(()=>({bus:a(),flowIds:o(),metadata:s()}),[]),children:b(f,{value:re,children:b(p,{value:ne,children:b(c,{theme:T?.theme,accent:T?.accent,radius:T?.radius,direction:T?.direction,attribution:T?.attribution,i18n:E,storage:D?.driver,storageNamespace:D?.namespace,className:M,support:k,merchantContext:$,terms:te,...J?{deposit:J}:{},...z?.methods?{depositMethods:z.methods}:{},...Z?{withdraw:Z}:{},children:N})})})})}export{x as StridgeProvider};
@@ -0,0 +1 @@
1
+ "use client";import{createContext as e,use as t}from"react";const n=e(null);n.displayName=`DepositOwnerContext`;function r(){return t(n)}export{n as DepositOwnerContext,r as useDepositOwnerContext};
@@ -0,0 +1 @@
1
+ "use client";import{use as e,useCallback as t,useSyncExternalStore as n}from"react";import{getAccount as r,watchAccount as i}from"wagmi/actions";import{WagmiContext as a}from"wagmi";function o(){let o=e(a);return{config:o,address:n(t(e=>o?i(o,{onChange:()=>e()}):()=>{},[o]),t(()=>{if(o)return r(o).address},[o]),()=>void 0)}}export{o as useOptionalWagmi};
@@ -1 +1 @@
1
- const e=Object.freeze({status:`idle`}),t=Object.freeze({brand:e,target:e,addresses:e,balances:e,quote:e,settlement:e,wallet:e}),n=Object.freeze({withdrawableBalances:e,receiveOptions:e,quote:e,settlement:e}),r=()=>{};function i(){if(typeof DOMException==`function`)return new DOMException(`Aborted`,`AbortError`);let e=Error(`Aborted`);return e.name=`AbortError`,e}function a(e){return new Promise((t,n)=>{if(e.aborted){n(i());return}e.addEventListener(`abort`,()=>n(i()),{once:!0})})}function o(){return{getSnapshot:()=>t,subscribe:()=>r,requestQuote:(e,t)=>a(t),submitDeposit:(e,t)=>a(t),watchSettlement:()=>{},fetchActiveSettlement:async()=>null}}function s(){return{getSnapshot:()=>n,subscribe:()=>r,requestQuote:(e,t)=>a(t),submitWithdrawal:(e,t)=>a(t),watchSettlement:()=>{}}}export{o as createStubDepositDriver,s as createStubWithdrawDriver};
1
+ const e=Object.freeze({status:`idle`}),t=Object.freeze({brand:e,target:e,addresses:e,balances:e,quote:e,settlement:e,wallet:e,history:e}),n=Object.freeze({withdrawableBalances:e,receiveOptions:e,quote:e,settlement:e,history:e}),r=()=>{};function i(){if(typeof DOMException==`function`)return new DOMException(`Aborted`,`AbortError`);let e=Error(`Aborted`);return e.name=`AbortError`,e}function a(e){return new Promise((t,n)=>{if(e.aborted){n(i());return}e.addEventListener(`abort`,()=>n(i()),{once:!0})})}function o(){return{getSnapshot:()=>t,subscribe:()=>r,arm:()=>{},requestQuote:(e,t)=>a(t),submitDeposit:(e,t)=>a(t),watchSettlement:()=>{},fetchActiveSettlement:async()=>null}}function s(){return{getSnapshot:()=>n,subscribe:()=>r,arm:()=>{},requestQuote:(e,t)=>a(t),prepareWithdrawal:(e,t)=>a(t),watchSettlement:()=>{}}}export{o as createStubDepositDriver,s as createStubWithdrawDriver};