@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.
- package/LICENSE +21 -0
- package/dist/KitProvider.d.ts +91 -0
- package/dist/KitProvider.js +1 -0
- package/dist/_internal/deposit/driver/index.d.ts +5 -0
- package/dist/_internal/deposit/driver/index.js +1 -0
- package/dist/_internal/deposit/widgets/index.d.ts +11 -0
- package/dist/_internal/deposit/widgets/index.js +1 -0
- package/dist/_internal/drivers/stridge/index.d.ts +6 -0
- package/dist/_internal/drivers/stridge/index.js +1 -0
- package/dist/_internal/drivers/stridge-mock/index.d.ts +5 -0
- package/dist/_internal/drivers/stridge-mock/index.js +1 -0
- package/dist/_internal/index.d.ts +2 -0
- package/dist/_internal/index.js +1 -0
- package/dist/_internal/withdraw/driver/index.d.ts +6 -0
- package/dist/_internal/withdraw/driver/index.js +1 -0
- package/dist/_internal/withdraw/widgets/index.d.ts +5 -0
- package/dist/_internal/withdraw/widgets/index.js +1 -0
- package/dist/banners/index.d.ts +1 -0
- package/dist/banners/index.js +1 -0
- package/dist/banners/useBannerAck.d.ts +61 -0
- package/dist/banners/useBannerAck.js +1 -0
- package/dist/deposit/compound/index.d.ts +28 -0
- package/dist/deposit/compound/index.js +1 -0
- package/dist/deposit/dialog/index.d.ts +2 -0
- package/dist/deposit/dialog/index.js +1 -0
- package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +29 -0
- package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -0
- package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +113 -0
- package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -0
- package/dist/drivers/stridge/internal/encoding.js +1 -0
- package/dist/drivers/stridge/internal/env.js +1 -0
- package/dist/drivers/stridge/internal/metadata.js +1 -0
- package/dist/drivers/stridge/internal/pollOnce.js +1 -0
- package/dist/drivers/stridge/internal/signAndConfirm.js +1 -0
- package/dist/drivers/stridge/poll.js +1 -0
- package/dist/drivers/stridge/rpc.d.ts +77 -0
- package/dist/drivers/stridge/rpc.js +1 -0
- package/dist/drivers/stridge/types.d.ts +145 -0
- package/dist/drivers/stridge/types.js +1 -0
- package/dist/drivers/stridge/wagmiSigner.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +120 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +118 -0
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -0
- package/dist/drivers/stridge-mock/fixtures.d.ts +127 -0
- package/dist/drivers/stridge-mock/fixtures.js +1 -0
- package/dist/drivers/stridge-mock/store.js +1 -0
- package/dist/drivers/stridge-mock/triggers.d.ts +41 -0
- package/dist/flows/deposit/dialog/DepositBootstrapErrorState.js +1 -0
- package/dist/flows/deposit/dialog/DepositBootstrapErrorState.styles.js +1 -0
- package/dist/flows/deposit/dialog/DepositDialog.d.ts +112 -0
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -0
- package/dist/flows/deposit/driver/context.d.ts +37 -0
- package/dist/flows/deposit/driver/context.js +1 -0
- package/dist/flows/deposit/driver/payloads.d.ts +342 -0
- package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/quoteToPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/settlementToPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/startToBrandPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -0
- package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.js +1 -0
- package/dist/flows/deposit/driver/types.d.ts +177 -0
- package/dist/flows/deposit/orchestrator/controller.d.ts +11 -0
- package/dist/flows/deposit/orchestrator/controller.js +1 -0
- package/dist/flows/deposit/orchestrator/reducer.js +1 -0
- package/dist/flows/deposit/orchestrator/resolveAssetById.js +1 -0
- package/dist/flows/deposit/orchestrator/steps.d.ts +23 -0
- package/dist/flows/deposit/orchestrator/steps.js +1 -0
- package/dist/flows/deposit/orchestrator/types.d.ts +266 -0
- package/dist/flows/deposit/orchestrator/useDeposit.d.ts +35 -0
- package/dist/flows/deposit/orchestrator/useDeposit.js +1 -0
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +35 -0
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/amount-entry/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/amount-entry/index.js +1 -0
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.d.ts +25 -0
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -0
- package/dist/flows/deposit/widgets/asset-picker/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/asset-picker/index.js +1 -0
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts +31 -0
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -0
- package/dist/flows/deposit/widgets/confirm-deposit/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/confirm-deposit/index.js +1 -0
- package/dist/flows/deposit/widgets/deposit/Deposit.d.ts +30 -0
- package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +51 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.d.ts +11 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +15 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +32 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.d.ts +23 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/deposit/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +129 -0
- package/dist/flows/deposit/widgets/deposit/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/deposit/index.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +20 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.d.ts +102 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.slots.d.ts +20 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.slots.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.styles.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Body.d.ts +17 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Body.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Close.d.ts +13 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Close.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Detail.d.ts +14 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Detail.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Details.d.ts +20 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Details.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Footer.d.ts +17 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Footer.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.d.ts +17 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.d.ts +26 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Rows.d.ts +35 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Rows.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Toggle.d.ts +18 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Toggle.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts +188 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/deposit-status-banner/index.js +1 -0
- package/dist/flows/deposit/widgets/error-state/ErrorState.d.ts +30 -0
- package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -0
- package/dist/flows/deposit/widgets/error-state/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/error-state/index.js +1 -0
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.d.ts +31 -0
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -0
- package/dist/flows/deposit/widgets/processing-state/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/processing-state/index.js +1 -0
- package/dist/flows/deposit/widgets/success-state/SuccessState.d.ts +30 -0
- package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -0
- package/dist/flows/deposit/widgets/success-state/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/success-state/index.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.d.ts +41 -0
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +56 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.slots.d.ts +15 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.slots.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.d.ts +10 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +17 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +15 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/InfoTooltip.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.d.ts +21 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Selectors.d.ts +11 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Selectors.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Summary.d.ts +11 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Summary.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/types.d.ts +187 -0
- package/dist/flows/deposit/widgets/transfer-crypto/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/transfer-crypto/index.js +1 -0
- package/dist/flows/shared/transformers/classifySettlementStatus.js +1 -0
- package/dist/flows/shared/transformers/computeQuoteAttrs.js +1 -0
- package/dist/flows/shared/transformers/parseIsoMs.js +1 -0
- package/dist/flows/shared/transformers/parseSmallestUnit.js +1 -0
- package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -0
- package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +103 -0
- package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -0
- package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +36 -0
- package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +1 -0
- package/dist/flows/withdraw/driver/context.d.ts +24 -0
- package/dist/flows/withdraw/driver/context.js +1 -0
- package/dist/flows/withdraw/driver/dto.d.ts +41 -0
- package/dist/flows/withdraw/driver/payloads.d.ts +206 -0
- package/dist/flows/withdraw/driver/transformers/balanceToWithdrawableBalancesPayload.js +1 -0
- package/dist/flows/withdraw/driver/transformers/quoteToWithdrawalPayload.js +1 -0
- package/dist/flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js +1 -0
- package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js +1 -0
- package/dist/flows/withdraw/driver/types.d.ts +133 -0
- package/dist/flows/withdraw/orchestrator/controller.d.ts +11 -0
- package/dist/flows/withdraw/orchestrator/controller.js +1 -0
- package/dist/flows/withdraw/orchestrator/index.d.ts +4 -0
- package/dist/flows/withdraw/orchestrator/index.js +1 -0
- package/dist/flows/withdraw/orchestrator/reducer.js +1 -0
- package/dist/flows/withdraw/orchestrator/types.d.ts +156 -0
- package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +23 -0
- package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.d.ts +22 -0
- package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-error/index.d.ts +1 -0
- package/dist/flows/withdraw/widgets/withdraw-error/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +29 -0
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.d.ts +55 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.slots.d.ts +31 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.slots.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.styles.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/AmountField.d.ts +12 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/AmountField.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.d.ts +20 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/BreakdownCard.d.ts +17 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/BreakdownCard.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Footer.d.ts +18 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Footer.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +21 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/InfoTooltip.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/ReceiveSelectors.d.ts +13 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/ReceiveSelectors.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +19 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/context.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/index.d.ts +3 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +149 -0
- package/dist/flows/withdraw/widgets/withdraw-form/index.d.ts +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +19 -0
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-in-progress/index.d.ts +1 -0
- package/dist/flows/withdraw/widgets/withdraw-in-progress/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.d.ts +20 -0
- package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-success/index.d.ts +1 -0
- package/dist/flows/withdraw/widgets/withdraw-success/index.js +1 -0
- package/dist/format/index.d.ts +10 -0
- package/dist/format/index.js +1 -0
- package/dist/i18n/index.d.ts +9 -0
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/locales/ar.d.ts +6 -0
- package/dist/i18n/locales/ar.js +1 -0
- package/dist/i18n/locales/es.d.ts +6 -0
- package/dist/i18n/locales/es.js +1 -0
- package/dist/icons/index.d.ts +27 -0
- package/dist/icons/index.js +1 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +1 -0
- package/dist/kit/package.js +1 -0
- package/dist/scope/KitPortalScope.d.ts +31 -0
- package/dist/scope/KitPortalScope.js +1 -0
- package/dist/scope/KitScope.d.ts +63 -0
- package/dist/scope/KitScope.js +1 -0
- package/dist/scope/KitScope.slots.js +1 -0
- package/dist/scope/context.d.ts +67 -0
- package/dist/scope/context.js +1 -0
- package/dist/scope/index.d.ts +3 -0
- package/dist/scope/index.js +1 -0
- package/dist/shared/chains/index.d.ts +40 -0
- package/dist/shared/chains/index.js +1 -0
- package/dist/shared/constants/brand-links.js +1 -0
- package/dist/shared/dialog/DialogShell.d.ts +63 -0
- package/dist/shared/dialog/DialogShell.js +1 -0
- package/dist/shared/dialog/Frame.js +1 -0
- package/dist/shared/dialog/GatewayKitRoot.js +1 -0
- package/dist/shared/dialog/StepTransition.js +1 -0
- package/dist/shared/dialog/useDirectionalChevronTransform.js +1 -0
- package/dist/shared/driver/types.d.ts +69 -0
- package/dist/shared/error-handling/components/GatewayKitBoundary.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/GatewayKitErrorCard.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/GatewayKitErrorCard.slots.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/GatewayKitErrorCard.styles.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Action.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Actions.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/CodeSample.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Description.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/DetailRow.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Guidance.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Section.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/TechnicalDetails.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/TechnicalDetailsToggle.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/components/Title.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/context.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitErrorCard/index.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitRecoveryError.js +1 -0
- package/dist/shared/error-handling/components/GatewayKitSetupError.js +1 -0
- package/dist/shared/error-handling/constants/guides.js +1 -0
- package/dist/shared/error-handling/constants/snippets.js +6 -0
- package/dist/shared/error-handling/index.js +1 -0
- package/dist/shared/error-handling/lib/isWagmiProviderMissingError.js +1 -0
- package/dist/shared/format/formatDurationCoarse.d.ts +29 -0
- package/dist/shared/format/formatDurationCoarse.js +1 -0
- package/dist/shared/format/formatDurationCompact.d.ts +28 -0
- package/dist/shared/format/formatDurationCompact.js +1 -0
- package/dist/shared/format/formatNetworkName.d.ts +27 -0
- package/dist/shared/format/formatNetworkName.js +1 -0
- package/dist/shared/format/formatPercent.d.ts +23 -0
- package/dist/shared/format/formatPercent.js +1 -0
- package/dist/shared/format/formatTimestamp.d.ts +22 -0
- package/dist/shared/format/formatTimestamp.js +1 -0
- package/dist/shared/format/formatTokenAmount.d.ts +46 -0
- package/dist/shared/format/formatTokenAmount.js +1 -0
- package/dist/shared/format/formatUsd.d.ts +41 -0
- package/dist/shared/format/formatUsd.js +1 -0
- package/dist/shared/format/shortenAddress.d.ts +27 -0
- package/dist/shared/format/shortenAddress.js +1 -0
- package/dist/shared/format/types.d.ts +33 -0
- package/dist/shared/i18n/KitI18nProvider.d.ts +23 -0
- package/dist/shared/i18n/KitI18nProvider.js +1 -0
- package/dist/shared/i18n/Trans.d.ts +39 -0
- package/dist/shared/i18n/Trans.js +1 -0
- package/dist/shared/i18n/createKitI18n.d.ts +41 -0
- package/dist/shared/i18n/createKitI18n.js +1 -0
- package/dist/shared/i18n/defaultI18n.js +1 -0
- package/dist/shared/i18n/getLocaleDirection.d.ts +24 -0
- package/dist/shared/i18n/getLocaleDirection.js +1 -0
- package/dist/shared/i18n/locales.d.ts +31 -0
- package/dist/shared/i18n/locales.js +1 -0
- package/dist/shared/i18n/useKitI18n.d.ts +14 -0
- package/dist/shared/i18n/useKitI18n.js +1 -0
- package/dist/shared/i18n/useLingui.d.ts +35 -0
- package/dist/shared/i18n/useLingui.js +1 -0
- package/dist/shared/i18n/useT.d.ts +25 -0
- package/dist/shared/i18n/useT.js +1 -0
- package/dist/shared/icons/AlertIcon.d.ts +12 -0
- package/dist/shared/icons/AlertIcon.js +1 -0
- package/dist/shared/icons/ArrowDownIcon.d.ts +7 -0
- package/dist/shared/icons/ArrowDownIcon.js +1 -0
- package/dist/shared/icons/ArrowRightIcon.d.ts +7 -0
- package/dist/shared/icons/ArrowRightIcon.js +1 -0
- package/dist/shared/icons/ArrowRightLeftIcon.d.ts +7 -0
- package/dist/shared/icons/ArrowRightLeftIcon.js +1 -0
- package/dist/shared/icons/CheckIcon.d.ts +7 -0
- package/dist/shared/icons/CheckIcon.js +1 -0
- package/dist/shared/icons/ChevronDownIcon.d.ts +7 -0
- package/dist/shared/icons/ChevronDownIcon.js +1 -0
- package/dist/shared/icons/ChevronLeftIcon.d.ts +7 -0
- package/dist/shared/icons/ChevronLeftIcon.js +1 -0
- package/dist/shared/icons/ChevronRightIcon.d.ts +7 -0
- package/dist/shared/icons/ChevronRightIcon.js +1 -0
- package/dist/shared/icons/ChevronUpIcon.d.ts +7 -0
- package/dist/shared/icons/ChevronUpIcon.js +1 -0
- package/dist/shared/icons/CircleArrowUpIcon.d.ts +7 -0
- package/dist/shared/icons/CircleArrowUpIcon.js +1 -0
- package/dist/shared/icons/CircleHelpIcon.d.ts +7 -0
- package/dist/shared/icons/CircleHelpIcon.js +1 -0
- package/dist/shared/icons/ClockIcon.d.ts +7 -0
- package/dist/shared/icons/ClockIcon.js +1 -0
- package/dist/shared/icons/CopyIcon.d.ts +7 -0
- package/dist/shared/icons/CopyIcon.js +1 -0
- package/dist/shared/icons/ExternalLinkIcon.d.ts +7 -0
- package/dist/shared/icons/ExternalLinkIcon.js +1 -0
- package/dist/shared/icons/InfoIcon.d.ts +7 -0
- package/dist/shared/icons/InfoIcon.js +1 -0
- package/dist/shared/icons/LoaderIcon.d.ts +7 -0
- package/dist/shared/icons/LoaderIcon.js +1 -0
- package/dist/shared/icons/MailIcon.d.ts +7 -0
- package/dist/shared/icons/MailIcon.js +1 -0
- package/dist/shared/icons/PackageIcon.d.ts +7 -0
- package/dist/shared/icons/PackageIcon.js +1 -0
- package/dist/shared/icons/QrCodeIcon.d.ts +7 -0
- package/dist/shared/icons/QrCodeIcon.js +1 -0
- package/dist/shared/icons/WalletIcon.d.ts +7 -0
- package/dist/shared/icons/WalletIcon.js +1 -0
- package/dist/shared/icons/XIcon.d.ts +7 -0
- package/dist/shared/icons/XIcon.js +1 -0
- package/dist/shared/icons/exchanges/BinanceIcon.d.ts +7 -0
- package/dist/shared/icons/exchanges/BinanceIcon.js +1 -0
- package/dist/shared/icons/exchanges/CoinbaseIcon.d.ts +7 -0
- package/dist/shared/icons/exchanges/CoinbaseIcon.js +1 -0
- package/dist/shared/icons/exchanges/KrakenIcon.d.ts +7 -0
- package/dist/shared/icons/exchanges/KrakenIcon.js +1 -0
- package/dist/shared/icons/exchanges/OkxIcon.d.ts +7 -0
- package/dist/shared/icons/exchanges/OkxIcon.js +1 -0
- package/dist/shared/icons/exchanges/RobinhoodIcon.d.ts +7 -0
- package/dist/shared/icons/exchanges/RobinhoodIcon.js +1 -0
- package/dist/shared/icons/exchanges/index.d.ts +5 -0
- package/dist/shared/icons/exchanges/index.js +1 -0
- package/dist/shared/orchestrator/failureReason.js +1 -0
- package/dist/shared/orchestrator/index.js +1 -0
- package/dist/shared/orchestrator/toFailure.js +1 -0
- package/dist/shared/orchestrator/types.d.ts +20 -0
- package/dist/shared/orchestrator/useDialogLifecycle.js +1 -0
- package/dist/shared/orchestrator/useDriverSettlementListener.js +1 -0
- package/dist/shared/orchestrator/useEffectiveState.js +1 -0
- package/dist/shared/orchestrator/useSettlementWatcher.js +1 -0
- package/dist/shared/orchestrator/userRejection.js +1 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.d.ts +20 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.slots.js +1 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.styles.js +1 -0
- package/dist/shared/primitives/TxHashValue/index.d.ts +2 -0
- package/dist/shared/primitives/TxHashValue/index.js +1 -0
- package/dist/shared/primitives/TxHashValue/types.d.ts +25 -0
- package/dist/shared/primitives/WalletValue/WalletValue.d.ts +40 -0
- package/dist/shared/primitives/WalletValue/WalletValue.js +1 -0
- package/dist/shared/primitives/WalletValue/index.d.ts +1 -0
- package/dist/shared/primitives/WalletValue/index.js +1 -0
- package/dist/shared/quote/index.js +1 -0
- package/dist/shared/quote/useQuoteCountdown.js +1 -0
- package/dist/shared/styles/tokens.stylex.js +1 -0
- package/dist/shared/ui/Alert/Alert.d.ts +105 -0
- package/dist/shared/ui/Alert/Alert.js +1 -0
- package/dist/shared/ui/Alert/Alert.slots.d.ts +10 -0
- package/dist/shared/ui/Alert/Alert.slots.js +1 -0
- package/dist/shared/ui/Alert/Alert.styles.js +1 -0
- package/dist/shared/ui/Alert/index.d.ts +2 -0
- package/dist/shared/ui/Alert/index.js +1 -0
- package/dist/shared/ui/AmountInput/AmountInput.d.ts +132 -0
- package/dist/shared/ui/AmountInput/AmountInput.js +1 -0
- package/dist/shared/ui/AmountInput/AmountInput.slots.d.ts +11 -0
- package/dist/shared/ui/AmountInput/AmountInput.slots.js +1 -0
- package/dist/shared/ui/AmountInput/AmountInput.styles.js +1 -0
- package/dist/shared/ui/AmountInput/attachInputNormalization.js +1 -0
- package/dist/shared/ui/AmountInput/context.js +1 -0
- package/dist/shared/ui/AmountInput/index.d.ts +3 -0
- package/dist/shared/ui/AmountInput/index.js +1 -0
- package/dist/shared/ui/AmountInput/useAutoShrinkFontSize.js +14 -0
- package/dist/shared/ui/AmountInput/utils.d.ts +12 -0
- package/dist/shared/ui/AmountInput/utils.js +1 -0
- package/dist/shared/ui/Badge/Badge.d.ts +89 -0
- package/dist/shared/ui/Badge/Badge.js +1 -0
- package/dist/shared/ui/Badge/Badge.slots.d.ts +7 -0
- package/dist/shared/ui/Badge/Badge.slots.js +1 -0
- package/dist/shared/ui/Badge/Badge.styles.js +1 -0
- package/dist/shared/ui/Badge/index.d.ts +2 -0
- package/dist/shared/ui/Badge/index.js +1 -0
- package/dist/shared/ui/Button/Button.d.ts +82 -0
- package/dist/shared/ui/Button/Button.js +1 -0
- package/dist/shared/ui/Button/Button.slots.d.ts +7 -0
- package/dist/shared/ui/Button/Button.slots.js +1 -0
- package/dist/shared/ui/Button/Button.styles.js +1 -0
- package/dist/shared/ui/Button/index.d.ts +2 -0
- package/dist/shared/ui/Button/index.js +1 -0
- package/dist/shared/ui/Card/Card.d.ts +93 -0
- package/dist/shared/ui/Card/Card.js +1 -0
- package/dist/shared/ui/Card/Card.slots.d.ts +10 -0
- package/dist/shared/ui/Card/Card.slots.js +1 -0
- package/dist/shared/ui/Card/Card.styles.js +1 -0
- package/dist/shared/ui/Card/index.d.ts +2 -0
- package/dist/shared/ui/Card/index.js +1 -0
- package/dist/shared/ui/Collapsible/Collapsible.d.ts +57 -0
- package/dist/shared/ui/Collapsible/Collapsible.js +1 -0
- package/dist/shared/ui/Collapsible/Collapsible.slots.d.ts +10 -0
- package/dist/shared/ui/Collapsible/Collapsible.slots.js +1 -0
- package/dist/shared/ui/Collapsible/Collapsible.styles.js +1 -0
- package/dist/shared/ui/Collapsible/index.d.ts +2 -0
- package/dist/shared/ui/Collapsible/index.js +1 -0
- package/dist/shared/ui/Details/Details.d.ts +76 -0
- package/dist/shared/ui/Details/Details.js +1 -0
- package/dist/shared/ui/Details/Details.slots.d.ts +9 -0
- package/dist/shared/ui/Details/Details.slots.js +1 -0
- package/dist/shared/ui/Details/Details.styles.js +1 -0
- package/dist/shared/ui/Details/index.d.ts +2 -0
- package/dist/shared/ui/Details/index.js +1 -0
- package/dist/shared/ui/Dialog/Dialog.d.ts +147 -0
- package/dist/shared/ui/Dialog/Dialog.js +1 -0
- package/dist/shared/ui/Dialog/Dialog.slots.d.ts +17 -0
- package/dist/shared/ui/Dialog/Dialog.slots.js +1 -0
- package/dist/shared/ui/Dialog/Dialog.styles.js +1 -0
- package/dist/shared/ui/Dialog/index.d.ts +2 -0
- package/dist/shared/ui/Dialog/index.js +1 -0
- package/dist/shared/ui/ExternalLink/ExternalLink.d.ts +41 -0
- package/dist/shared/ui/ExternalLink/ExternalLink.js +1 -0
- package/dist/shared/ui/ExternalLink/ExternalLink.slots.d.ts +7 -0
- package/dist/shared/ui/ExternalLink/ExternalLink.slots.js +1 -0
- package/dist/shared/ui/ExternalLink/ExternalLink.styles.js +1 -0
- package/dist/shared/ui/ExternalLink/index.d.ts +2 -0
- package/dist/shared/ui/ExternalLink/index.js +1 -0
- package/dist/shared/ui/ExternalLink/toSafeHref.js +1 -0
- package/dist/shared/ui/Field/Field.d.ts +185 -0
- package/dist/shared/ui/Field/Field.js +1 -0
- package/dist/shared/ui/Field/Field.slots.d.ts +21 -0
- package/dist/shared/ui/Field/Field.slots.js +1 -0
- package/dist/shared/ui/Field/Field.styles.js +1 -0
- package/dist/shared/ui/Field/index.d.ts +2 -0
- package/dist/shared/ui/Field/index.js +1 -0
- package/dist/shared/ui/IconButton/IconButton.d.ts +48 -0
- package/dist/shared/ui/IconButton/IconButton.js +1 -0
- package/dist/shared/ui/IconButton/IconButton.slots.d.ts +7 -0
- package/dist/shared/ui/IconButton/IconButton.slots.js +1 -0
- package/dist/shared/ui/IconButton/IconButton.styles.js +1 -0
- package/dist/shared/ui/IconButton/index.d.ts +2 -0
- package/dist/shared/ui/IconButton/index.js +1 -0
- package/dist/shared/ui/Image/Image.d.ts +43 -0
- package/dist/shared/ui/Image/Image.js +1 -0
- package/dist/shared/ui/Image/Image.slots.d.ts +14 -0
- package/dist/shared/ui/Image/Image.slots.js +1 -0
- package/dist/shared/ui/Image/Image.styles.js +1 -0
- package/dist/shared/ui/Image/index.d.ts +3 -0
- package/dist/shared/ui/Image/index.js +1 -0
- package/dist/shared/ui/Image/types.d.ts +131 -0
- package/dist/shared/ui/InputGroup/InputGroup.d.ts +129 -0
- package/dist/shared/ui/InputGroup/InputGroup.js +1 -0
- package/dist/shared/ui/InputGroup/InputGroup.slots.d.ts +16 -0
- package/dist/shared/ui/InputGroup/InputGroup.slots.js +1 -0
- package/dist/shared/ui/InputGroup/InputGroup.styles.js +1 -0
- package/dist/shared/ui/InputGroup/index.d.ts +2 -0
- package/dist/shared/ui/InputGroup/index.js +1 -0
- package/dist/shared/ui/LtrAtom/LtrAtom.d.ts +31 -0
- package/dist/shared/ui/LtrAtom/LtrAtom.js +1 -0
- package/dist/shared/ui/LtrAtom/index.d.ts +1 -0
- package/dist/shared/ui/LtrAtom/index.js +1 -0
- package/dist/shared/ui/ScrollArea/ScrollArea.d.ts +86 -0
- package/dist/shared/ui/ScrollArea/ScrollArea.js +1 -0
- package/dist/shared/ui/ScrollArea/ScrollArea.slots.d.ts +12 -0
- package/dist/shared/ui/ScrollArea/ScrollArea.slots.js +1 -0
- package/dist/shared/ui/ScrollArea/ScrollArea.styles.js +1 -0
- package/dist/shared/ui/ScrollArea/index.d.ts +2 -0
- package/dist/shared/ui/ScrollArea/index.js +1 -0
- package/dist/shared/ui/Select/Select.context.d.ts +10 -0
- package/dist/shared/ui/Select/Select.context.js +1 -0
- package/dist/shared/ui/Select/Select.d.ts +243 -0
- package/dist/shared/ui/Select/Select.js +1 -0
- package/dist/shared/ui/Select/Select.slots.d.ts +20 -0
- package/dist/shared/ui/Select/Select.slots.js +1 -0
- package/dist/shared/ui/Select/Select.styles.js +1 -0
- package/dist/shared/ui/Select/index.d.ts +3 -0
- package/dist/shared/ui/Select/index.js +1 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +83 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.slots.d.ts +7 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.slots.js +1 -0
- package/dist/shared/ui/SelectableTile/SelectableTile.styles.js +1 -0
- package/dist/shared/ui/SelectableTile/SelectableTileGroup.d.ts +82 -0
- package/dist/shared/ui/SelectableTile/SelectableTileGroup.js +1 -0
- package/dist/shared/ui/SelectableTile/index.d.ts +3 -0
- package/dist/shared/ui/SelectableTile/index.js +1 -0
- package/dist/shared/ui/Skeleton/Skeleton.d.ts +41 -0
- package/dist/shared/ui/Skeleton/Skeleton.js +1 -0
- package/dist/shared/ui/Skeleton/Skeleton.slots.d.ts +7 -0
- package/dist/shared/ui/Skeleton/Skeleton.slots.js +1 -0
- package/dist/shared/ui/Skeleton/Skeleton.styles.js +1 -0
- package/dist/shared/ui/Skeleton/index.d.ts +2 -0
- package/dist/shared/ui/Skeleton/index.js +1 -0
- package/dist/shared/ui/Text/Text.d.ts +87 -0
- package/dist/shared/ui/Text/Text.js +1 -0
- package/dist/shared/ui/Text/Text.slots.d.ts +7 -0
- package/dist/shared/ui/Text/Text.slots.js +1 -0
- package/dist/shared/ui/Text/Text.styles.js +1 -0
- package/dist/shared/ui/Text/index.d.ts +2 -0
- package/dist/shared/ui/Text/index.js +1 -0
- package/dist/shared/ui/TokenLogo/TokenLogo.d.ts +41 -0
- package/dist/shared/ui/TokenLogo/TokenLogo.js +1 -0
- package/dist/shared/ui/TokenLogo/index.d.ts +2 -0
- package/dist/shared/ui/TokenLogo/index.js +1 -0
- package/dist/shared/ui/TokenLogo/types.d.ts +64 -0
- package/dist/shared/ui/Tooltip/Tooltip.d.ts +171 -0
- package/dist/shared/ui/Tooltip/Tooltip.js +1 -0
- package/dist/shared/ui/Tooltip/Tooltip.slots.d.ts +11 -0
- package/dist/shared/ui/Tooltip/Tooltip.slots.js +1 -0
- package/dist/shared/ui/Tooltip/Tooltip.styles.js +1 -0
- package/dist/shared/ui/Tooltip/index.d.ts +2 -0
- package/dist/shared/ui/Tooltip/index.js +1 -0
- package/dist/shared/ui/WalletRow/WalletRow.d.ts +55 -0
- package/dist/shared/ui/WalletRow/WalletRow.js +1 -0
- package/dist/shared/ui/WalletRow/WalletRow.slots.d.ts +7 -0
- package/dist/shared/ui/WalletRow/WalletRow.slots.js +1 -0
- package/dist/shared/ui/WalletRow/WalletRow.styles.js +1 -0
- package/dist/shared/ui/WalletRow/index.d.ts +2 -0
- package/dist/shared/ui/WalletRow/index.js +1 -0
- package/dist/shared/utils/explorers.js +1 -0
- package/dist/shared/utils/joinClassNames.js +1 -0
- package/dist/shared/utils/logos/api.d.ts +54 -0
- package/dist/shared/utils/logos/api.js +1 -0
- package/dist/shared/utils/logos/chains.d.ts +32 -0
- package/dist/shared/utils/logos/chains.js +1 -0
- package/dist/shared/utils/logos/conventionUrls.js +1 -0
- package/dist/shared/utils/logos/index.js +1 -0
- package/dist/shared/utils/logos/resolveLogoSrc.js +1 -0
- package/dist/shared/utils/logos/types.d.ts +62 -0
- package/dist/shared/utils/mergeClassName.js +1 -0
- package/dist/shared/utils/mergeStyle.js +1 -0
- package/dist/shared/wallet/resolveSupportedChainIds.js +1 -0
- package/dist/shared/wallet/resolveSupportedChains.js +1 -0
- package/dist/shared/wallet/types.d.ts +103 -0
- package/dist/shared/wallet/useWalletState.d.ts +21 -0
- package/dist/shared/wallet/useWalletState.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.d.ts +59 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.d.ts +15 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Flow.d.ts +14 -0
- package/dist/shared/widgets/amount-entry/compound/components/Flow.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Footer.d.ts +22 -0
- package/dist/shared/widgets/amount-entry/compound/components/Footer.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +15 -0
- package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.d.ts +22 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/StaticBand.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/SwapBackdrop.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/index.d.ts +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/index.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/transitions.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/useSwapState.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Hero/utils.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Pills.d.ts +22 -0
- package/dist/shared/widgets/amount-entry/compound/components/Pills.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/context.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/index.d.ts +3 -0
- package/dist/shared/widgets/amount-entry/compound/index.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/types.d.ts +224 -0
- package/dist/shared/widgets/asset-descriptor.d.ts +27 -0
- package/dist/shared/widgets/asset-descriptor.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.d.ts +51 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.d.ts +11 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +30 -0
- package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/Footer.d.ts +16 -0
- package/dist/shared/widgets/asset-picker/compound/components/Footer.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +19 -0
- package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/List.d.ts +22 -0
- package/dist/shared/widgets/asset-picker/compound/components/List.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/context.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/index.d.ts +3 -0
- package/dist/shared/widgets/asset-picker/compound/index.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/types.d.ts +212 -0
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.d.ts +64 -0
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.d.ts +16 -0
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.styles.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Amounts.d.ts +15 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Amounts.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.d.ts +17 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.d.ts +15 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Footer.d.ts +26 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Footer.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Header.d.ts +13 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Header.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Hero.d.ts +16 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Hero.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Meta.d.ts +16 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/Meta.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/QuoteTimer.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/components/splitAmount.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/context.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/index.d.ts +3 -0
- package/dist/shared/widgets/confirm-transfer/compound/index.js +1 -0
- package/dist/shared/widgets/confirm-transfer/compound/types.d.ts +338 -0
- package/dist/shared/widgets/error-state/compound/ErrorState.d.ts +96 -0
- package/dist/shared/widgets/error-state/compound/ErrorState.js +1 -0
- package/dist/shared/widgets/error-state/compound/ErrorState.slots.d.ts +18 -0
- package/dist/shared/widgets/error-state/compound/ErrorState.slots.js +1 -0
- package/dist/shared/widgets/error-state/compound/ErrorState.styles.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Actions.d.ts +17 -0
- package/dist/shared/widgets/error-state/compound/components/Actions.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/AssetValue.d.ts +20 -0
- package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Detail.d.ts +14 -0
- package/dist/shared/widgets/error-state/compound/components/Detail.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Details.d.ts +12 -0
- package/dist/shared/widgets/error-state/compound/components/Details.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/DisclosureChevron.d.ts +11 -0
- package/dist/shared/widgets/error-state/compound/components/DisclosureChevron.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Header.d.ts +13 -0
- package/dist/shared/widgets/error-state/compound/components/Header.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/HelpInfo.d.ts +10 -0
- package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Hero.d.ts +9 -0
- package/dist/shared/widgets/error-state/compound/components/Hero.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +18 -0
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/Rows.d.ts +57 -0
- package/dist/shared/widgets/error-state/compound/components/Rows.js +1 -0
- package/dist/shared/widgets/error-state/compound/components/StatusValue.d.ts +14 -0
- package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -0
- package/dist/shared/widgets/error-state/compound/context.js +1 -0
- package/dist/shared/widgets/error-state/compound/index.d.ts +3 -0
- package/dist/shared/widgets/error-state/compound/index.js +1 -0
- package/dist/shared/widgets/error-state/compound/types.d.ts +291 -0
- package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +77 -0
- package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -0
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +15 -0
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -0
- package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +17 -0
- package/dist/shared/widgets/processing-state/compound/components/Actions.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Detail.d.ts +14 -0
- package/dist/shared/widgets/processing-state/compound/components/Detail.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +12 -0
- package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +15 -0
- package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Hero.d.ts +16 -0
- package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/Rows.d.ts +36 -0
- package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -0
- package/dist/shared/widgets/processing-state/compound/components/StatusPill.d.ts +13 -0
- package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -0
- package/dist/shared/widgets/processing-state/compound/context.js +1 -0
- package/dist/shared/widgets/processing-state/compound/index.d.ts +3 -0
- package/dist/shared/widgets/processing-state/compound/index.js +1 -0
- package/dist/shared/widgets/processing-state/compound/types.d.ts +216 -0
- package/dist/shared/widgets/success-state/compound/SuccessState.d.ts +105 -0
- package/dist/shared/widgets/success-state/compound/SuccessState.js +1 -0
- package/dist/shared/widgets/success-state/compound/SuccessState.slots.d.ts +21 -0
- package/dist/shared/widgets/success-state/compound/SuccessState.slots.js +1 -0
- package/dist/shared/widgets/success-state/compound/SuccessState.styles.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Actions.d.ts +18 -0
- package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/AssetValue.d.ts +18 -0
- package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Detail.d.ts +18 -0
- package/dist/shared/widgets/success-state/compound/components/Detail.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Details.d.ts +16 -0
- package/dist/shared/widgets/success-state/compound/components/Details.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Header.d.ts +13 -0
- package/dist/shared/widgets/success-state/compound/components/Header.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Headline.d.ts +16 -0
- package/dist/shared/widgets/success-state/compound/components/Headline.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Hero.d.ts +10 -0
- package/dist/shared/widgets/success-state/compound/components/Hero.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +19 -0
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/RouteValue.d.ts +15 -0
- package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/Rows.d.ts +69 -0
- package/dist/shared/widgets/success-state/compound/components/Rows.js +1 -0
- package/dist/shared/widgets/success-state/compound/components/StatusPill.d.ts +13 -0
- package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -0
- package/dist/shared/widgets/success-state/compound/context.js +1 -0
- package/dist/shared/widgets/success-state/compound/index.d.ts +3 -0
- package/dist/shared/widgets/success-state/compound/index.js +1 -0
- package/dist/shared/widgets/success-state/compound/types.d.ts +307 -0
- package/dist/storage/adapters.d.ts +29 -0
- package/dist/storage/adapters.js +1 -0
- package/dist/storage/context.d.ts +62 -0
- package/dist/storage/context.js +1 -0
- package/dist/storage/createKitStorage.d.ts +45 -0
- package/dist/storage/createKitStorage.js +1 -0
- package/dist/storage/index.d.ts +4 -0
- package/dist/storage/index.js +1 -0
- package/dist/storage/types.d.ts +26 -0
- package/dist/stridge/StridgeContext.d.ts +29 -0
- package/dist/stridge/StridgeContext.js +1 -0
- package/dist/stridge/StridgeProvider.d.ts +158 -0
- package/dist/stridge/StridgeProvider.js +1 -0
- package/dist/stridge/stubs.js +1 -0
- package/dist/styles/index.css +3494 -0
- package/dist/types.d.ts +15 -0
- package/dist/types.js +1 -0
- package/dist/ui/index.d.ts +48 -0
- package/dist/ui/index.js +1 -0
- package/dist/utils/src/use-copy-to-clipboard.js +1 -0
- package/dist/wallet/index.d.ts +3 -0
- package/dist/wallet/index.js +1 -0
- package/dist/withdraw/compound/index.d.ts +22 -0
- package/dist/withdraw/compound/index.js +1 -0
- package/dist/withdraw/dialog/index.d.ts +2 -0
- package/dist/withdraw/dialog/index.js +1 -0
- package/package.json +156 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{classifyFailureKind as e,classifySettlementStatus as t}from"../../../shared/transformers/classifySettlementStatus.js";import{parseDecimalSafe as n,parseSmallestUnit as r}from"../../../shared/transformers/parseSmallestUnit.js";import{parseIsoMs as i}from"../../../shared/transformers/parseIsoMs.js";import"../../../shared/transformers/pickRelevantSettlement.js";import{formatDurationCompact as a}from"../../../../shared/format/formatDurationCompact.js";import{formatTimestamp as o}from"../../../../shared/format/formatTimestamp.js";import{formatTokenAmount as s}from"../../../../shared/format/formatTokenAmount.js";import{shortenAddress as c}from"../../../../shared/format/shortenAddress.js";function l(e,n,r){let i=t(e.status);return i===`completed`?d(e,n,r):i===`failed`?f(e,n,r):u(e,n,r)}function u(e,t,n){let r=e.from,a=i(r?.confirmed_at)??i(e.created_at),l=i(r?.confirmed_at)??i(e.created_at)??Date.now(),u=m(e.to,t.destination.asset_decimals);return{kind:`pending`,sourceWallet:p(n),creditedAsset:{symbol:t.destination.asset_symbol,decimals:t.destination.asset_decimals,address:t.destination.asset_address??``,isNative:!t.destination.asset_address},creditedTo:n.brandName??t.destination.address,...r?.tx_id?{txHash:{value:r.tx_id,formatted:c(r.tx_id)},...h(r,n,r.tx_id)?{txExplorerUrl:h(r,n,r.tx_id)}:{}}:{},...a===void 0?{}:{detectedAt:{value:a,formatted:o(a,n.i18n)}},submittedAt:{value:l,formatted:o(l,n.i18n)},receiveAmount:{value:u,formatted:s(u,n.i18n,{maxDecimals:t.destination.asset_decimals})}}}function d(e,t,n){let r=e.from,l=e.to,u=i(r?.confirmed_at)??i(e.created_at)??Date.now(),d=i(l?.settled_at)??i(e.updated_at)??Date.now(),f=Math.max(0,d-u),_=m(l,t.destination.asset_decimals),v=t.destination.address;return{kind:`succeeded`,sourceWallet:p(n),destination:{...n.brandName?{name:n.brandName}:{},address:{value:v,formatted:c(v)}},creditedAsset:{symbol:t.destination.asset_symbol,decimals:t.destination.asset_decimals,address:t.destination.asset_address??``,isNative:!t.destination.asset_address},receiveAmount:{value:_,formatted:s(_,n.i18n,{maxDecimals:t.destination.asset_decimals})},routeHops:g(e),totalTime:{value:f,formatted:a(f,n.i18n)},...r?.tx_id?{depositTx:{hash:{value:r.tx_id,formatted:c(r.tx_id)},...h(r,n,r.tx_id)?{explorerUrl:h(r,n,r.tx_id)}:{}}}:{depositTx:{hash:{value:``,formatted:``}}},...l?.tx_id?{completionTx:{hash:{value:l.tx_id,formatted:c(l.tx_id)},...h(l,n,l.tx_id)?{explorerUrl:h(l,n,l.tx_id)}:{}}}:{},submittedAt:{value:u,formatted:o(u,n.i18n)},filledAt:{value:d,formatted:o(d,n.i18n)}}}function f(t,n,r){let a=t.from,l=i(a?.confirmed_at)??i(t.created_at)??Date.now(),u=i(t.updated_at)??Date.now(),d=a?.tx_id??``,f=n.destination.address;return{kind:`failed`,failureKind:e(t.error),sourceWallet:p(r),destination:{...r.brandName?{name:r.brandName}:{},address:{value:f,formatted:c(f)}},creditedAsset:{symbol:n.destination.asset_symbol,decimals:n.destination.asset_decimals,address:n.destination.asset_address??``,isNative:!n.destination.asset_address},receiveAmount:{value:0,formatted:s(0,r.i18n)},txHash:{value:d,formatted:d?c(d):``},...h(a,r,d)?{txExplorerUrl:h(a,r,d)}:{},submittedAt:{value:l,formatted:o(l,r.i18n)},failedAt:{value:u,formatted:o(u,r.i18n)}}}function p(e){return{...e.sourceWallet.name?{name:e.sourceWallet.name}:{},address:{value:e.sourceWallet.address,formatted:c(e.sourceWallet.address)},...e.sourceWallet.explorerUrl?{explorerUrl:e.sourceWallet.explorerUrl}:{}}}function m(e,t){if(!e)return 0;if(e.amount){let t=n(e.amount);if(t>0)return t}return e.raw_amount?r(e.raw_amount,t):0}function h(e,t,n){if(!e||!n)return;let r=e.eip155_id===void 0?void 0:Number(e.eip155_id);if(r===void 0||!t.explorers)return;let i=t.explorers[r];if(i)return`${i.replace(/\/+$/,``)}/tx/${n}`}function g(e){let t=e.from,n=e.to,r=e.route?.provider??``,i=[];return t?.eip155_id!==void 0&&i.push({provider:r,chainId:Number(t.eip155_id)}),n?.eip155_id!==void 0&&n.eip155_id!==t?.eip155_id&&i.push({provider:r,chainId:Number(n.eip155_id)}),i}export{l as settlementToPayload};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{formatNetworkName as e}from"../../../../shared/format/formatNetworkName.js";import{formatUsd as t}from"../../../../shared/format/formatUsd.js";import{shortenAddress as n}from"../../../../shared/format/shortenAddress.js";const r=new Set([11155111,5,80001,80002,84532,421614,11155420,97]);function i(i,o={}){let s=o.includeTestnets??!1;return i.flatMap(i=>{let c=String(i.eip155_id??``),l=Number(c);if(!s&&Number.isFinite(l)&&r.has(l))return[];let u=o.explorers?.[l],d=o.i18n&&c?o.minDepositUsdByEip155Id?.[c]:void 0,f=a(i.accepted_assets,c?o.nativeAssetByEip155Id?.[c]:void 0);return[{networkName:e(i.network_name??``),...c?{eip155Id:c}:{},...o.chainLogos?.[c]?{chainLogoUrl:o.chainLogos[c]}:{},address:{value:i.address,formatted:n(i.address)},...u?{explorerUrl:`${u.replace(/\/+$/,``)}/address/${i.address}`}:{},...d!==void 0&&o.i18n?{minDepositUsd:{value:d,formatted:t(d,o.i18n)}}:{},...f.length>0?{acceptedAssets:f}:{}}]})}function a(e,t){let n=Array.isArray(e)?e.map(o):[];return!t||new Set(n.map(e=>e.symbol.toUpperCase())).has(t.symbol.toUpperCase())?n:[t,...n]}function o(e){let t=e.logo,n=!e.address;return{symbol:e.symbol,address:e.address,decimals:e.decimals,...typeof t==`string`&&t.length>0?{assetLogoUrl:t}:{},isNative:n}}export{i as startToAddressesPayload};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let n=t(e,`brand_name`),r=t(e,`checkout_item_title`),i={};return n!==void 0&&(i.name=n),r!==void 0&&(i.checkoutItemTitle=r),i}function t(e,t){if(!e)return;let n=e[t];if(typeof n!=`string`)return;let r=n.trim();return r.length>0?r:void 0}export{e as startToBrandPayload};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{formatNetworkName as e}from"../../../../shared/format/formatNetworkName.js";import{formatUsd as t}from"../../../../shared/format/formatUsd.js";function n(n,r){let i=n.assets.find(e=>String(e.network_id)===r.networkId);if(!i)return;let a=i.assets.find(e=>e.symbol.toUpperCase()===r.assetSymbol.toUpperCase());if(!a)return;let o=i.native_currency?.logo;return{networkId:r.networkId,networkName:e(i.network_name),eip155Id:String(i.eip155_id),...o?{chainLogoUrl:o}:{},symbol:a.symbol,decimals:a.decimals,address:a.address??``,isNative:!a.address,...a.logo?{assetLogoUrl:a.logo}:{},...r.minDepositUsd===void 0?{}:{minDepositUsd:{value:r.minDepositUsd,formatted:t(r.minDepositUsd,r.i18n)}}}}export{n as startToTargetPayload};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{shortenAddress as e}from"../../../../shared/format/shortenAddress.js";function t(t){return{address:{value:t.address,formatted:e(t.address)},...t.chainId===void 0?{}:{chainId:t.chainId}}}export{t as walletAddressToWalletPayload};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { Entity, SettlementFailureKind, TxRef } from "../../../shared/driver/types.js";
|
|
2
|
+
import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload } from "./payloads.js";
|
|
3
|
+
import { DepositAddressDto, GatewayPollResponse, GatewaySettlementDto, GatewayStartResponse, OnchainBalanceResponse, QuoteResponse, SupportedAssetDto, SupportedAssetsResponse } from "@stridge/sdk";
|
|
4
|
+
|
|
5
|
+
//#region src/flows/deposit/driver/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Snapshot of every entity the driver currently exposes. Returned by {@link DepositDriver.getSnapshot}
|
|
8
|
+
* and consumed by `useSyncExternalStore`. The kit's `useDepositSnapshot()` hook returns this shape.
|
|
9
|
+
*
|
|
10
|
+
* Each field is an {@link Entity} envelope — components switch on `status` and read `payload` on
|
|
11
|
+
* the `ready` / `stale` variants.
|
|
12
|
+
*/
|
|
13
|
+
interface DepositSnapshot {
|
|
14
|
+
/** Brand metadata — merchant name, checkout item title. Backed by `gateway/start.metadata`. */
|
|
15
|
+
brand: Entity<BrandPayload, GatewayStartResponse["metadata"], GatewayStartResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Settlement destination — the (network × asset) tuple the host configured. Backed by the
|
|
18
|
+
* matched supported-assets entry.
|
|
19
|
+
*/
|
|
20
|
+
target: Entity<TargetPayload, SupportedAssetDto, SupportedAssetsResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Provisioned deposit addresses (one per supported source chain). List-shaped envelope —
|
|
23
|
+
* `payload` is an array, `raw` is the underlying `deposit_addresses` array, `response` is the
|
|
24
|
+
* full `gateway/start` response.
|
|
25
|
+
*/
|
|
26
|
+
addresses: Entity<ReadonlyArray<AddressItemPayload>, ReadonlyArray<DepositAddressDto>, GatewayStartResponse>;
|
|
27
|
+
/**
|
|
28
|
+
* Source-side per-asset balances for the connected wallet. List-shaped envelope. The list is
|
|
29
|
+
* derived from the response's `chains[].tokens[]` so `raw` carries the entire response
|
|
30
|
+
* (there is no single per-row DTO that backs an individual `BalanceItemPayload` 1:1).
|
|
31
|
+
*/
|
|
32
|
+
balances: Entity<ReadonlyArray<BalanceItemPayload>, OnchainBalanceResponse, OnchainBalanceResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Active deposit quote. Drives the confirm-deposit widget. Transitions to `stale` on expiry.
|
|
35
|
+
*/
|
|
36
|
+
quote: Entity<QuotePayload, QuoteResponse, QuoteResponse>;
|
|
37
|
+
/**
|
|
38
|
+
* The most-recent settlement observed for the connected wallet. The discriminated `kind` on
|
|
39
|
+
* the payload (`pending` / `succeeded` / `failed`) drives whether `<ProcessingState>`,
|
|
40
|
+
* `<SuccessState>`, or `<ErrorState>` is shown.
|
|
41
|
+
*/
|
|
42
|
+
settlement: Entity<SettlementPayload, GatewaySettlementDto, GatewayPollResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Connected-wallet identity. `idle` when no wallet is connected; `ready` once the host has
|
|
45
|
+
* supplied an address. The `payload.address.formatted` field is the canonical
|
|
46
|
+
* `0x…<last 4>` form components render anywhere a connected-wallet pill appears outside a
|
|
47
|
+
* settlement (deposit-method tile, amount-entry source pill, banner disconnected-state copy).
|
|
48
|
+
*/
|
|
49
|
+
wallet: Entity<WalletPayload, WalletInfo, WalletInfo>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Input to {@link DepositDriver.requestQuote}.
|
|
53
|
+
*/
|
|
54
|
+
interface RequestQuoteInput {
|
|
55
|
+
sourceChainId: number;
|
|
56
|
+
sourceTokenAddress: string;
|
|
57
|
+
sourceTokenDecimals: number;
|
|
58
|
+
sourceTokenSymbol: string;
|
|
59
|
+
sourceIsNative: boolean;
|
|
60
|
+
/** Send amount in display units (post-decimals). */
|
|
61
|
+
amount: number;
|
|
62
|
+
/**
|
|
63
|
+
* Optional source-token unit price in USD. Drives the confirm-deposit hero amount: when set,
|
|
64
|
+
* the live driver passes it through to {@link import("./transformers").quoteToPayload}'s
|
|
65
|
+
* `sendPriceUsd` so the hero reads `$<amount × priceUsd>` instead of falling back to the raw
|
|
66
|
+
* source-token amount. The kit's orchestrator pulls this from the picked
|
|
67
|
+
* {@link BalanceItemPayload}'s `priceUsd` at confirm time; BYO drivers can ignore it if they
|
|
68
|
+
* surface their own hero math.
|
|
69
|
+
*/
|
|
70
|
+
sourcePriceUsd?: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Input to {@link DepositDriver.submitDeposit}.
|
|
74
|
+
*/
|
|
75
|
+
interface SubmitDepositInput {
|
|
76
|
+
sourceChainId: number;
|
|
77
|
+
sourceTokenAddress: string;
|
|
78
|
+
sourceTokenDecimals: number;
|
|
79
|
+
sourceIsNative: boolean;
|
|
80
|
+
/** Send amount in display units. */
|
|
81
|
+
amount: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Input to {@link DepositDriver.watchSourceTx}. Path B — kit waits for an inbound transfer to the
|
|
85
|
+
* deposit address.
|
|
86
|
+
*/
|
|
87
|
+
interface WatchSourceTxInput {
|
|
88
|
+
/** Optional last-known tx hash (used to ack snapshots on dialog reopen). */
|
|
89
|
+
sinceTxHash?: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Input to {@link DepositDriver.watchSettlement}. Carries the source-chain tx hash so the watcher can
|
|
93
|
+
* scope its poll to a specific in-flight settlement.
|
|
94
|
+
*/
|
|
95
|
+
interface WatchSettlementInput {
|
|
96
|
+
tx: TxRef;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Input to {@link DepositDriver.fetchActiveSettlement}. The kit calls this on dialog open so a
|
|
100
|
+
* still-in-flight deposit lands the user straight on the processing screen.
|
|
101
|
+
*/
|
|
102
|
+
type FetchActiveSettlementInput = Record<string, never>;
|
|
103
|
+
/**
|
|
104
|
+
* One-shot snapshot returned by {@link DepositDriver.fetchActiveSettlement}. Resolves to `null` when
|
|
105
|
+
* nothing is in-flight.
|
|
106
|
+
*/
|
|
107
|
+
interface SettlementSnapshot {
|
|
108
|
+
payload: SettlementPayload;
|
|
109
|
+
raw: GatewaySettlementDto;
|
|
110
|
+
response: GatewayPollResponse;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Unified driver contract. A `DepositDriver` is the single host-supplied source of both reactive
|
|
114
|
+
* data (the 6 entities) and imperative actions (quote / submit / watch / fetch). One contract,
|
|
115
|
+
* one implementation per backend — `createStridgeDriver` for live Stridge integrations,
|
|
116
|
+
* `createStridgeMockDriver` for demos / tests / Storybook.
|
|
117
|
+
*
|
|
118
|
+
* The driver also implements the `useSyncExternalStore` contract (`subscribe` + `getSnapshot`) so
|
|
119
|
+
* `<KitProvider />` + `useDepositSnapshot()` get standard React 18+ external-store semantics.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
*
|
|
123
|
+
* ```ts
|
|
124
|
+
* import { createStridgeDriver } from "@stridge/kit/drivers/stridge";
|
|
125
|
+
*
|
|
126
|
+
* const driver = createStridgeDriver({
|
|
127
|
+
* projectKey: process.env.NEXT_PUBLIC_STRIDGE_GATEWAY_KEY!,
|
|
128
|
+
* wagmiConfig,
|
|
129
|
+
* destination: { network_id: "9006", asset_symbol: "USDC" },
|
|
130
|
+
* userAddress,
|
|
131
|
+
* getI18n: () => i18n,
|
|
132
|
+
* });
|
|
133
|
+
*
|
|
134
|
+
* <KitProvider deposit={driver}>{children}</KitProvider>;
|
|
135
|
+
* ```
|
|
136
|
+
*/
|
|
137
|
+
interface DepositDriver {
|
|
138
|
+
/** Lets you read the current snapshot of every reactive entity (used by `useSyncExternalStore`). */
|
|
139
|
+
getSnapshot(): DepositSnapshot;
|
|
140
|
+
/** Lets you subscribe to entity transitions outside React (analytics, headless integrations). */
|
|
141
|
+
subscribe(listener: () => void): () => void;
|
|
142
|
+
/**
|
|
143
|
+
* Fetches a fresh quote for `input` and updates the `quote` entity through its lifecycle
|
|
144
|
+
* (`idle | loading → ready | error`). The optional `signal` cancels in-flight work.
|
|
145
|
+
*/
|
|
146
|
+
requestQuote(input: RequestQuoteInput, signal: AbortSignal): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Submits the confirmed deposit. Resolves with the broadcast tx ref. Settlement watcher takes
|
|
149
|
+
* over from there to populate the `settlement` entity.
|
|
150
|
+
*/
|
|
151
|
+
submitDeposit(input: SubmitDepositInput, signal: AbortSignal): Promise<TxRef>;
|
|
152
|
+
/**
|
|
153
|
+
* Watches the connected wallet's source-side balances. Updates the `balances` entity. Optional
|
|
154
|
+
* — when omitted, the asset-picker hides its USD-balance overlay.
|
|
155
|
+
*/
|
|
156
|
+
watchBalances?(input: Record<string, never>, listener: (entity: DepositSnapshot["balances"]) => void, signal: AbortSignal): void;
|
|
157
|
+
/**
|
|
158
|
+
* Path B watcher — observes the deposit address until an inbound source-chain tx is detected,
|
|
159
|
+
* then fires the listener with the {@link TxRef}. Optional — when omitted, the orchestrator
|
|
160
|
+
* hides the transfer-crypto method tile.
|
|
161
|
+
*/
|
|
162
|
+
watchSourceTx?(input: WatchSourceTxInput, listener: (tx: TxRef) => void, signal: AbortSignal): void;
|
|
163
|
+
/**
|
|
164
|
+
* Watches the settlement entity through its lifecycle (pending → succeeded / failed). Listener
|
|
165
|
+
* fires on every transition with the new envelope; the FSM consumes these to advance phases.
|
|
166
|
+
*/
|
|
167
|
+
watchSettlement(input: WatchSettlementInput, listener: (entity: DepositSnapshot["settlement"]) => void, signal: AbortSignal): void;
|
|
168
|
+
/**
|
|
169
|
+
* One-shot resume probe — called at dialog `open()` time. Resolves with the most-recent
|
|
170
|
+
* **pending** settlement if any, so the dialog routes straight to `<ProcessingState>` instead
|
|
171
|
+
* of making the user re-do work. Optional — when omitted, the kit always opens at the deposit
|
|
172
|
+
* method picker.
|
|
173
|
+
*/
|
|
174
|
+
fetchActiveSettlement?(input: FetchActiveSettlementInput, signal: AbortSignal): Promise<SettlementSnapshot | null>;
|
|
175
|
+
}
|
|
176
|
+
//#endregion
|
|
177
|
+
export { DepositDriver, DepositSnapshot, FetchActiveSettlementInput, RequestQuoteInput, SettlementSnapshot, SubmitDepositInput, WatchSettlementInput, WatchSourceTxInput };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DepositState } from "./types.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
//#region src/flows/deposit/orchestrator/controller.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Read the **logical** gateway state — what the reducer says. Transitions to `closed` are
|
|
6
|
+
* surfaced synchronously, so this is the right hook for "is the dialog open?" gating, analytics,
|
|
7
|
+
* and any headless UI that drives off live machine state.
|
|
8
|
+
*/
|
|
9
|
+
declare function useDepositState(): DepositState;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { useDepositState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useDepositDriverInstance as e}from"../driver/context.js";import{useLingui as t}from"../../../shared/i18n/useLingui.js";import"../../../i18n/index.js";import{toFailure as n}from"../../../shared/orchestrator/toFailure.js";import{useDriverSettlementListener as r}from"../../../shared/orchestrator/useDriverSettlementListener.js";import{useEffectiveState as i}from"../../../shared/orchestrator/useEffectiveState.js";import{isUserRejectionFailure as a}from"../../../shared/orchestrator/userRejection.js";import{useSettlementWatcher as o}from"../../../shared/orchestrator/useSettlementWatcher.js";import"../../../shared/orchestrator/index.js";import{initialState as s,reducer as c}from"./reducer.js";import{resolveAssetById as l}from"./resolveAssetById.js";import{createContext as u,use as d,useCallback as f,useEffect as p,useMemo as m,useReducer as h,useRef as g}from"react";import{jsx as _}from"react/jsx-runtime";const v={id:`ELhVSL`,message:`Failed to submit deposit.`},y={id:`Ej5HL9`,message:`Signature declined. Please try again.`},b=u(null);b.displayName=`GatewayControllerContext`;function x(){let e=d(b);if(!e)throw Error(`useDeposit / GatewayController must be used inside <KitProvider deposit={…} />. Mount KitProvider once at the host's app root.`);return e}function S(){return x().state}function C(){return x().effectiveState}function w(){return x().actions}function T({children:t}){let n=e(),[r,a]=h(c,s),o=D(r,a,n);O(r,a,n),k(r,a,n);let l=i(r),u=E(r,a,n,o);return _(b,{value:m(()=>({state:r,effectiveState:l,dispatch:a,controller:u,actions:o}),[r,l,u,o]),children:t})}function E(e,t,n,r){let i=g(n);i.current=n;let a=f(e=>{if(!e)return t({type:`OPEN`,input:void 0}),!0;if(e.method===`transfer`)return t({type:`OPEN`,input:{method:`transfer`}}),!0;if(e.method===`wallet`&&e.assetId!==void 0){let n=l(i.current.getSnapshot(),e.assetId);return n?(t({type:`OPEN`,input:{method:`wallet`,asset:n}}),!0):!1}return t({type:`OPEN`,input:{method:`wallet`}}),!0},[t]),o=f(()=>{t({type:`CLOSE`})},[t]);return m(()=>({open:a,close:o,actions:r}),[a,o,r])}function D(e,r,i){let o=g(e);o.current=e;let s=g(i);s.current=i;let c=g(r);c.current=r;let{i18n:l}=t(),u=g(l);u.current=l;let d=f((e,t)=>{let r=s.current,i=new AbortController,o=j(e,t);r.submitDeposit(o,i.signal).then(e=>{i.signal.aborted||c.current({type:`DEPOSIT_SUBMITTED`,tx:e})}).catch(e=>{if(i.signal.aborted)return;let t=n(e,u.current._(v));if(a(t)){c.current({type:`DEPOSIT_SIGNATURE_DECLINED`,notice:u.current._(y)});return}c.current({type:`DEPOSIT_SUBMISSION_FAILED`,failure:t})})},[]),p=f(e=>{c.current({type:`DEPOSIT_METHOD_SELECTED`,method:e})},[]),h=f(e=>{c.current({type:`ASSET_CONFIRMED`,asset:e})},[]),_=f(e=>{o.current.name===`amountEntry`&&c.current({type:`AMOUNT_CONFIRMED`,amount:e})},[]),b=f(()=>{let e=o.current;if(e.name!==`confirmDeposit`)return;let t=e.ctx.phase;if(t.kind===`failed`){c.current({type:`QUOTE_RETRY`});return}if(t.kind!==`ready`)return;let{asset:n,amount:r}=e.ctx;c.current({type:`DEPOSIT_CONFIRMED`}),d(n,r)},[d]),x=f(()=>{c.current({type:`BACK`})},[]),S=f(()=>{c.current({type:`CLOSE`})},[]),C=f(()=>{c.current({type:`SUCCESS_DONE`})},[]),w=f(()=>{c.current({type:`ERROR_TRY_AGAIN`})},[]),T=f((e,t)=>{c.current({type:`RESUME_TO_PROCESSING`,method:e,tx:t})},[]),E=f((e,t)=>{c.current({type:`RESUME_TO_SUCCESS`,method:e,tx:t})},[]),D=f(e=>{c.current({type:`RESUME_TO_ERROR`,...e?{tx:e}:{}})},[]);return m(()=>({selectMethod:p,confirmAsset:h,confirmAmount:_,confirmDeposit:b,back:x,close:S,successDone:C,tryAgain:w,resumeToProcessing:T,resumeToSuccess:E,resumeToError:D}),[p,h,_,b,x,S,C,w,T,E,D])}function O(e,t,r){p(()=>{if(e.name!==`confirmDeposit`||e.ctx.phase.kind!==`loading`&&e.ctx.phase.kind!==`regenerating`)return;let i=new AbortController,a=A(e.ctx.asset,e.ctx.amount);return r.requestQuote(a,i.signal).catch(e=>{i.signal.aborted||t({type:`QUOTE_FAILED`,failure:n(e,`Failed to fetch quote.`)})}),()=>i.abort()},[e.name,e.name===`confirmDeposit`?e.ctx.phase.kind:void 0,e.name===`confirmDeposit`?e.ctx.asset:void 0,e.name===`confirmDeposit`?e.ctx.amount:void 0,r,t]),p(()=>{if(e.name!==`confirmDeposit`||e.ctx.phase.kind!==`ready`)return;let n=e.ctx.phase.quoteExpiresAt,r=Math.max(0,n-Date.now()),i=setTimeout(()=>{t({type:`QUOTE_EXPIRED`})},r);return()=>clearTimeout(i)},[e.name,e.name===`confirmDeposit`&&e.ctx.phase.kind===`ready`?e.ctx.phase.quoteExpiresAt:void 0,t])}function k(e,t,n){o(n,e.name===`processing`?e.ctx.tx:void 0),p(()=>{if(e.name!==`transferCrypto`||!n.watchSourceTx)return;let t=new AbortController,r;return n.watchSourceTx({},e=>{t.signal.aborted||r||(r=new AbortController,n.watchSettlement({tx:e},()=>{},r.signal))},t.signal),()=>{t.abort(),r?.abort()}},[e.name,n]),p(()=>{if(e.name===`closed`||e.name===`transferCrypto`||e.name===`processing`||!n.fetchActiveSettlement)return;let t=new AbortController,r,i,a=!1,o=async()=>{try{let e=await n.fetchActiveSettlement({},t.signal);if(a)return;if(e&&!r&&e.payload.kind===`pending`){let t=e.payload.txHash?.value;t&&(r=new AbortController,n.watchSettlement({tx:{hash:t}},()=>{},r.signal))}}catch{}a||(i=setTimeout(o,5e3))};return o(),()=>{a=!0,t.abort(),r?.abort(),i&&clearTimeout(i)}},[e.name,n]);let i=g(e);i.current=e,r(n,e=>{i.current.name===`processing`&&(e===`succeeded`?t({type:`PROCESSING_SUCCEEDED`}):e===`failed`&&t({type:`PROCESSING_FAILED`}))});let a=g(null);p(()=>{let e=()=>{let e=n.getSnapshot(),r=i.current,o=e.quote;o.status!==a.current&&(a.current=o.status,o.status===`ready`&&r.name===`confirmDeposit`?(r.ctx.phase.kind===`loading`||r.ctx.phase.kind===`regenerating`)&&t({type:`QUOTE_RESOLVED`,expiresAt:o.payload.expiresAt}):o.status===`error`&&r.name===`confirmDeposit`&&(r.ctx.phase.kind===`loading`||r.ctx.phase.kind===`regenerating`)&&t({type:`QUOTE_FAILED`,failure:{reason:o.error.message,code:o.error.name}}))},r=n.subscribe(e);return e(),r},[n,t])}function A(e,t){let n=e.eip155Id;if(!n)throw Error(`Asset ${e.symbol} is missing eip155Id; cannot build quote input.`);return{sourceChainId:Number(n),sourceTokenAddress:e.address,sourceTokenDecimals:e.decimals,sourceTokenSymbol:e.symbol,sourceIsNative:e.isNative,amount:t,...e.priceUsd===void 0?{}:{sourcePriceUsd:e.priceUsd}}}function j(e,t){let n=e.eip155Id;if(!n)throw Error(`Asset ${e.symbol} is missing eip155Id; cannot build submit input.`);return{sourceChainId:Number(n),sourceTokenAddress:e.address,sourceTokenDecimals:e.decimals,sourceIsNative:e.isNative,amount:t}}export{T as GatewayController,x as useControllerContext,w as useDepositActions,C as useDepositEffectiveState,S as useDepositState};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={name:`closed`};function t(e,t){if(t.type===`RESUME_TO_PROCESSING`)return e.name===`closed`?e:{name:`processing`,ctx:{method:t.method,tx:t.tx,retryTargetForFailure:{kind:`fresh`}}};if(t.type===`RESUME_TO_SUCCESS`)return e.name===`closed`?e:{name:`success`,ctx:{method:t.method,tx:t.tx}};if(t.type===`RESUME_TO_ERROR`)return e.name===`closed`?e:{name:`error`,ctx:{retryTarget:{kind:`fresh`},...t.tx?{tx:t.tx}:{}}};switch(e.name){case`closed`:return n(t);case`deposit`:return r(e,t);case`assetPicker`:return i(e,t);case`amountEntry`:return a(e,t);case`confirmDeposit`:return o(e,t);case`transferCrypto`:return s(e,t);case`processing`:return c(e,t);case`success`:return l(e,t);case`error`:return u(e,t);default:return f(e)}}function n(e){if(e.type!==`OPEN`)return{name:`closed`};let t=e.input;return t?t.method===`transfer`?{name:`transferCrypto`,ctx:{method:`transfer`,backTarget:`closed`}}:t.asset?{name:`amountEntry`,ctx:{method:`wallet`,asset:t.asset,backTarget:`closed`}}:{name:`assetPicker`,ctx:{method:`wallet`,backTarget:`closed`}}:{name:`deposit`,ctx:{backTarget:`closed`}}}function r(e,t){switch(t.type){case`DEPOSIT_METHOD_SELECTED`:return t.method===`wallet`?{name:`assetPicker`,ctx:{method:`wallet`,backTarget:`deposit`}}:{name:`transferCrypto`,ctx:{method:`transfer`,backTarget:`deposit`}};case`BACK`:case`CLOSE`:return{name:`closed`};default:return e}}function i(e,t){switch(t.type){case`ASSET_CONFIRMED`:return{name:`amountEntry`,ctx:{method:`wallet`,asset:t.asset,backTarget:`assetPicker`}};case`BACK`:return e.ctx.backTarget===`deposit`?{name:`deposit`,ctx:{backTarget:`closed`}}:{name:`closed`};case`CLOSE`:return{name:`closed`};default:return e}}function a(e,t){switch(t.type){case`AMOUNT_CONFIRMED`:return{name:`confirmDeposit`,ctx:{method:`wallet`,asset:e.ctx.asset,amount:t.amount,phase:{kind:`loading`},backTarget:`amountEntry`}};case`BACK`:return e.ctx.backTarget===`assetPicker`?{name:`assetPicker`,ctx:{method:`wallet`,backTarget:`deposit`}}:{name:`closed`};case`CLOSE`:return{name:`closed`};default:return e}}function o(e,t){let n=e.ctx.phase;switch(t.type){case`QUOTE_RESOLVED`:return n.kind===`loading`||n.kind===`regenerating`?{...e,ctx:{...e.ctx,phase:{kind:`ready`,quoteExpiresAt:t.expiresAt}}}:e;case`QUOTE_FAILED`:return n.kind===`loading`||n.kind===`regenerating`?{...e,ctx:{...e.ctx,phase:{kind:`failed`,failure:t.failure,recoverFrom:`quote`}}}:e;case`QUOTE_RETRY`:return n.kind===`failed`?{...e,ctx:{...e.ctx,phase:{kind:`loading`}}}:e;case`QUOTE_EXPIRED`:return n.kind===`ready`?{...e,ctx:{...e.ctx,phase:{kind:`regenerating`}}}:e;case`DEPOSIT_CONFIRMED`:return n.kind===`ready`?{...e,ctx:{...e.ctx,phase:{kind:`submitting`}}}:e;case`DEPOSIT_SUBMITTED`:if(n.kind===`submitting`){let n={kind:`confirmDepositReady`,method:`wallet`,asset:e.ctx.asset,amount:e.ctx.amount};return{name:`processing`,ctx:{method:`wallet`,tx:t.tx,retryTargetForFailure:n}}}return e;case`DEPOSIT_SUBMISSION_FAILED`:return n.kind===`submitting`?{...e,ctx:{...e.ctx,phase:{kind:`failed`,failure:t.failure,recoverFrom:`submission`}}}:e;case`DEPOSIT_SIGNATURE_DECLINED`:return n.kind===`submitting`?{...e,ctx:{...e.ctx,phase:{kind:`regenerating`,...t.notice?{notice:t.notice}:{}}}}:e;case`BACK`:return{name:`amountEntry`,ctx:{method:`wallet`,asset:e.ctx.asset,backTarget:`assetPicker`}};case`CLOSE`:return{name:`closed`};default:return e}}function s(e,t){switch(t.type){case`BACK`:return e.ctx.backTarget===`deposit`?{name:`deposit`,ctx:{backTarget:`closed`}}:{name:`closed`};case`CLOSE`:return{name:`closed`};default:return e}}function c(e,t){switch(t.type){case`PROCESSING_SUCCEEDED`:return{name:`success`,ctx:{method:e.ctx.method,tx:e.ctx.tx}};case`PROCESSING_FAILED`:return{name:`error`,ctx:{retryTarget:e.ctx.retryTargetForFailure,tx:e.ctx.tx}};case`CLOSE`:return{name:`closed`};default:return e}}function l(e,t){return t.type===`SUCCESS_DONE`||t.type===`CLOSE`?{name:`closed`}:e}function u(e,t){return t.type===`ERROR_TRY_AGAIN`?d(e.ctx.retryTarget):t.type===`CLOSE`?{name:`closed`}:e}function d(e){return e.kind===`fresh`?{name:`deposit`,ctx:{backTarget:`closed`}}:e.kind===`transferCrypto`?{name:`transferCrypto`,ctx:{method:`transfer`,backTarget:e.backTarget}}:{name:`confirmDeposit`,ctx:{method:`wallet`,asset:e.asset,amount:e.amount,phase:{kind:`loading`},backTarget:`amountEntry`}}}function f(e){throw Error(`Unhandled state: ${JSON.stringify(e)}`)}export{e as initialState,t as reducer};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){if(e.balances.status!==`ready`&&e.balances.status!==`stale`)return;let n=e.balances.payload,r=t.toLowerCase();for(let e of n){let t=e.eip155Id;if(t&&`${t}:${e.address}`.toLowerCase()===r)return e}let i=[];for(let e of n)e.symbol.toLowerCase()===r&&i.push(e);return i.length===1?i[0]:void 0}export{e as resolveAssetById};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DepositStateName } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/flows/deposit/orchestrator/steps.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* FSM steps that already render a full-size view of the active settlement entity
|
|
6
|
+
* (`processing`, `success`, `error`). The settlement-status banner is suppressed on these
|
|
7
|
+
* steps because the underlying screen IS the settlement view — overlaying a banner on top
|
|
8
|
+
* would duplicate the same payload and clutter the dialog.
|
|
9
|
+
*
|
|
10
|
+
* Exported as the canonical "is the settlement self-rendered here?" predicate so widgets
|
|
11
|
+
* (orchestrated `<DepositStatusBanner />`) and headless banner consumers
|
|
12
|
+
* (`useBannerAckForSettlement` callsites in integrator code) compute visibility from one
|
|
13
|
+
* source instead of hand-rolling string-equality checks scattered across components.
|
|
14
|
+
*/
|
|
15
|
+
declare const STEPS_WITH_OWN_SETTLEMENT_VIEW: ReadonlySet<DepositStateName>;
|
|
16
|
+
/**
|
|
17
|
+
* `true` when `state` already paints the active settlement (`processing` / `success` /
|
|
18
|
+
* `error`). Convenience wrapper over {@link STEPS_WITH_OWN_SETTLEMENT_VIEW} for callsites
|
|
19
|
+
* that just need a boolean.
|
|
20
|
+
*/
|
|
21
|
+
declare function stepRendersSettlement(state: DepositStateName): boolean;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { STEPS_WITH_OWN_SETTLEMENT_VIEW, stepRendersSettlement };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=new Set([`processing`,`success`,`error`]);function t(t){return e.has(t)}export{e as STEPS_WITH_OWN_SETTLEMENT_VIEW,t as stepRendersSettlement};
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { TxRef } from "../../../shared/driver/types.js";
|
|
2
|
+
import { BalanceItemPayload } from "../driver/payloads.js";
|
|
3
|
+
import { FailureInfo } from "../../../shared/orchestrator/types.js";
|
|
4
|
+
|
|
5
|
+
//#region src/flows/deposit/orchestrator/types.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Deposit method picked on the `Deposit` widget. `wallet` enters Path A
|
|
8
|
+
* (asset → amount → confirm → process), `transfer` enters Path B
|
|
9
|
+
* (transfer-crypto → process).
|
|
10
|
+
*/
|
|
11
|
+
type DepositMethod = "wallet" | "transfer";
|
|
12
|
+
/**
|
|
13
|
+
* Confirm-deposit phase sub-union. Drives the confirm-deposit widget's hero / footer chrome.
|
|
14
|
+
* Phase data is pure navigation; the actual quote payload comes from the driver's `quote` entity.
|
|
15
|
+
*/
|
|
16
|
+
type ConfirmDepositPhase = {
|
|
17
|
+
kind: "loading";
|
|
18
|
+
} | {
|
|
19
|
+
kind: "ready";
|
|
20
|
+
quoteExpiresAt: number;
|
|
21
|
+
} | {
|
|
22
|
+
kind: "regenerating";
|
|
23
|
+
notice?: string;
|
|
24
|
+
} | {
|
|
25
|
+
kind: "submitting";
|
|
26
|
+
} | {
|
|
27
|
+
kind: "failed";
|
|
28
|
+
failure: FailureInfo;
|
|
29
|
+
recoverFrom: "quote" | "submission";
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Where `ERROR_TRY_AGAIN` lands. Encoded once at error-entry time so retry is deterministic.
|
|
33
|
+
*/
|
|
34
|
+
type RetryTargetSpec = {
|
|
35
|
+
kind: "confirmDepositReady";
|
|
36
|
+
method: "wallet";
|
|
37
|
+
asset: BalanceItemPayload;
|
|
38
|
+
amount: number;
|
|
39
|
+
} | {
|
|
40
|
+
kind: "transferCrypto";
|
|
41
|
+
backTarget: "closed" | "deposit";
|
|
42
|
+
} | {
|
|
43
|
+
/**
|
|
44
|
+
* No re-runnable target — used when `ERROR_TRY_AGAIN` should route the user back to the
|
|
45
|
+
* deposit picker (e.g. processing failures from a settlement we resumed via
|
|
46
|
+
* `fetchActiveSettlement`, where the original signature happened outside this session).
|
|
47
|
+
*/
|
|
48
|
+
kind: "fresh";
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* State machine state nodes. Per-state discriminated ctx narrows what is available — illegal
|
|
52
|
+
* states (e.g. `confirmDeposit` without an asset) are unrepresentable.
|
|
53
|
+
*
|
|
54
|
+
* Entity-derived data (quote, settlement, balances, target, brand, addresses, wallet) lives on
|
|
55
|
+
* the driver — widgets read it via `useDepositSnapshot()`. The reducer only carries navigation
|
|
56
|
+
* intent: which screen, which method, which asset/amount the user has confirmed so far.
|
|
57
|
+
*/
|
|
58
|
+
type DepositState = {
|
|
59
|
+
name: "closed";
|
|
60
|
+
} | {
|
|
61
|
+
name: "deposit";
|
|
62
|
+
ctx: {
|
|
63
|
+
backTarget: "closed";
|
|
64
|
+
};
|
|
65
|
+
} | {
|
|
66
|
+
name: "assetPicker";
|
|
67
|
+
ctx: {
|
|
68
|
+
method: "wallet";
|
|
69
|
+
backTarget: "closed" | "deposit";
|
|
70
|
+
};
|
|
71
|
+
} | {
|
|
72
|
+
name: "amountEntry";
|
|
73
|
+
ctx: {
|
|
74
|
+
method: "wallet";
|
|
75
|
+
asset: BalanceItemPayload;
|
|
76
|
+
backTarget: "closed" | "assetPicker";
|
|
77
|
+
};
|
|
78
|
+
} | {
|
|
79
|
+
name: "confirmDeposit";
|
|
80
|
+
ctx: {
|
|
81
|
+
method: "wallet";
|
|
82
|
+
asset: BalanceItemPayload;
|
|
83
|
+
amount: number;
|
|
84
|
+
phase: ConfirmDepositPhase;
|
|
85
|
+
backTarget: "amountEntry";
|
|
86
|
+
};
|
|
87
|
+
} | {
|
|
88
|
+
name: "transferCrypto";
|
|
89
|
+
ctx: {
|
|
90
|
+
method: "transfer";
|
|
91
|
+
backTarget: "closed" | "deposit";
|
|
92
|
+
};
|
|
93
|
+
} | {
|
|
94
|
+
name: "processing";
|
|
95
|
+
ctx: {
|
|
96
|
+
method: DepositMethod;
|
|
97
|
+
tx: TxRef;
|
|
98
|
+
retryTargetForFailure: RetryTargetSpec;
|
|
99
|
+
};
|
|
100
|
+
} | {
|
|
101
|
+
name: "success";
|
|
102
|
+
ctx: {
|
|
103
|
+
method: DepositMethod;
|
|
104
|
+
tx: TxRef;
|
|
105
|
+
};
|
|
106
|
+
} | {
|
|
107
|
+
name: "error";
|
|
108
|
+
ctx: {
|
|
109
|
+
retryTarget: RetryTargetSpec;
|
|
110
|
+
/**
|
|
111
|
+
* Set for non-settlement failures (quote / submission rejections that escalate via
|
|
112
|
+
* the orchestrated `error` arm). Settlement failures leave this `undefined` — the
|
|
113
|
+
* widget renders from the driver's `settlement` entity (`kind: "failed"`) instead.
|
|
114
|
+
*/
|
|
115
|
+
failure?: FailureInfo; /** Source-chain tx hash when the error followed a successful broadcast. */
|
|
116
|
+
tx?: TxRef;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
type DepositStateName = DepositState["name"];
|
|
120
|
+
/**
|
|
121
|
+
* Resolved variant of {@link OpenInput} — the controller turns the public `assetId` form into
|
|
122
|
+
* `asset: BalanceItemPayload` (resolved against the driver's `balances` entity) before
|
|
123
|
+
* dispatching, so the reducer never has to perform lookups.
|
|
124
|
+
*/
|
|
125
|
+
type ResolvedOpenInput = undefined | {
|
|
126
|
+
method: "wallet";
|
|
127
|
+
asset?: BalanceItemPayload;
|
|
128
|
+
} | {
|
|
129
|
+
method: "transfer";
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Reducer event union. Strict discriminated; no stringly-typed transitions, no payload
|
|
133
|
+
* polymorphism beyond the discriminator.
|
|
134
|
+
*/
|
|
135
|
+
type GatewayEvent = {
|
|
136
|
+
type: "OPEN";
|
|
137
|
+
input: ResolvedOpenInput;
|
|
138
|
+
} | {
|
|
139
|
+
type: "CLOSE";
|
|
140
|
+
} | {
|
|
141
|
+
type: "BACK";
|
|
142
|
+
} | {
|
|
143
|
+
type: "DEPOSIT_METHOD_SELECTED";
|
|
144
|
+
method: DepositMethod;
|
|
145
|
+
} | {
|
|
146
|
+
type: "ASSET_CONFIRMED";
|
|
147
|
+
asset: BalanceItemPayload;
|
|
148
|
+
} | {
|
|
149
|
+
type: "AMOUNT_CONFIRMED";
|
|
150
|
+
amount: number;
|
|
151
|
+
} | {
|
|
152
|
+
type: "QUOTE_RESOLVED";
|
|
153
|
+
expiresAt: number;
|
|
154
|
+
} | {
|
|
155
|
+
type: "QUOTE_FAILED";
|
|
156
|
+
failure: FailureInfo;
|
|
157
|
+
} | {
|
|
158
|
+
type: "QUOTE_RETRY";
|
|
159
|
+
} | {
|
|
160
|
+
type: "QUOTE_EXPIRED";
|
|
161
|
+
} | {
|
|
162
|
+
type: "DEPOSIT_CONFIRMED";
|
|
163
|
+
} | {
|
|
164
|
+
type: "DEPOSIT_SUBMITTED";
|
|
165
|
+
tx: TxRef;
|
|
166
|
+
} | {
|
|
167
|
+
type: "DEPOSIT_SUBMISSION_FAILED";
|
|
168
|
+
failure: FailureInfo;
|
|
169
|
+
} | {
|
|
170
|
+
/**
|
|
171
|
+
* User declined the wallet signature prompt while `confirmDeposit{submitting}`. Distinct
|
|
172
|
+
* from `DEPOSIT_SUBMISSION_FAILED` because rejection is a recoverable UX event — the
|
|
173
|
+
* orchestrator regenerates the quote and surfaces an inline notice instead of dropping
|
|
174
|
+
* into the global error state.
|
|
175
|
+
*/
|
|
176
|
+
type: "DEPOSIT_SIGNATURE_DECLINED";
|
|
177
|
+
notice?: string;
|
|
178
|
+
} | {
|
|
179
|
+
type: "PROCESSING_SUCCEEDED";
|
|
180
|
+
} | {
|
|
181
|
+
type: "PROCESSING_FAILED";
|
|
182
|
+
} | {
|
|
183
|
+
type: "SUCCESS_DONE";
|
|
184
|
+
} | {
|
|
185
|
+
type: "ERROR_TRY_AGAIN";
|
|
186
|
+
} | {
|
|
187
|
+
/**
|
|
188
|
+
* Banner-driven jump into the full processing widget. Bypasses the per-state switch so
|
|
189
|
+
* any non-closed state can route directly. The retry target is `fresh` because banner
|
|
190
|
+
* resumes surface deposits that originated outside this session.
|
|
191
|
+
*/
|
|
192
|
+
type: "RESUME_TO_PROCESSING";
|
|
193
|
+
method: DepositMethod;
|
|
194
|
+
tx: TxRef;
|
|
195
|
+
} | {
|
|
196
|
+
/**
|
|
197
|
+
* Banner-driven jump into the success widget once the banner observed terminal success.
|
|
198
|
+
*/
|
|
199
|
+
type: "RESUME_TO_SUCCESS";
|
|
200
|
+
method: DepositMethod;
|
|
201
|
+
tx: TxRef;
|
|
202
|
+
} | {
|
|
203
|
+
/**
|
|
204
|
+
* Banner-driven jump into the error widget once the banner observed terminal failure.
|
|
205
|
+
*/
|
|
206
|
+
type: "RESUME_TO_ERROR";
|
|
207
|
+
tx?: TxRef;
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Public open-input variant accepted by `useDeposit().open()`. Hosts pass the small ID-based
|
|
211
|
+
* shape; the controller resolves IDs against the driver's `balances` entity and rejects when the
|
|
212
|
+
* lookup fails.
|
|
213
|
+
*/
|
|
214
|
+
type OpenInput = undefined | {
|
|
215
|
+
method: "wallet";
|
|
216
|
+
assetId?: string;
|
|
217
|
+
} | {
|
|
218
|
+
method: "transfer";
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* Imperative controller returned by `useDeposit()`. Stable across re-renders.
|
|
222
|
+
*/
|
|
223
|
+
interface DepositController {
|
|
224
|
+
/**
|
|
225
|
+
* Open the deposit dialog.
|
|
226
|
+
*
|
|
227
|
+
* - `open()` → `deposit` (method picker)
|
|
228
|
+
* - `open({ method: "wallet" })` → `assetPicker`
|
|
229
|
+
* - `open({ method: "wallet", assetId })` → `amountEntry` (rejects if `assetId` doesn't resolve)
|
|
230
|
+
* - `open({ method: "transfer" })` → `transferCrypto`
|
|
231
|
+
*
|
|
232
|
+
* Returns `false` when `assetId` is provided but doesn't match any asset on the kit's
|
|
233
|
+
* `balances` entity.
|
|
234
|
+
*/
|
|
235
|
+
open(input?: OpenInput): boolean;
|
|
236
|
+
/** Close the deposit dialog. Idempotent. */
|
|
237
|
+
close(): void;
|
|
238
|
+
/**
|
|
239
|
+
* Action dispatchers — fire the same FSM transitions the kit's compound widgets fire. Use
|
|
240
|
+
* these when building fully-custom headless UI; the dialog and compound layers wire them up
|
|
241
|
+
* automatically.
|
|
242
|
+
*/
|
|
243
|
+
actions: DepositActions;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Imperative actions consumed by widgets. Read with `useDepositActions()` and dispatch into the
|
|
247
|
+
* deposit FSM directly — there's no host-supplied transitions handler in between.
|
|
248
|
+
*/
|
|
249
|
+
interface DepositActions {
|
|
250
|
+
selectMethod(method: DepositMethod): void;
|
|
251
|
+
confirmAsset(asset: BalanceItemPayload): void;
|
|
252
|
+
confirmAmount(amount: number): void;
|
|
253
|
+
confirmDeposit(): void;
|
|
254
|
+
back(): void;
|
|
255
|
+
close(): void;
|
|
256
|
+
successDone(): void;
|
|
257
|
+
tryAgain(): void;
|
|
258
|
+
/** Banner-driven jump into the full processing widget. */
|
|
259
|
+
resumeToProcessing(method: DepositMethod, tx: TxRef): void;
|
|
260
|
+
/** Banner-driven jump into the success widget. */
|
|
261
|
+
resumeToSuccess(method: DepositMethod, tx: TxRef): void;
|
|
262
|
+
/** Banner-driven jump into the error widget. */
|
|
263
|
+
resumeToError(tx?: TxRef): void;
|
|
264
|
+
}
|
|
265
|
+
//#endregion
|
|
266
|
+
export { ConfirmDepositPhase, DepositActions, DepositController, DepositMethod, DepositState, DepositStateName, GatewayEvent, OpenInput, ResolvedOpenInput, RetryTargetSpec };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DepositController } from "./types.js";
|
|
2
|
+
|
|
3
|
+
//#region src/flows/deposit/orchestrator/useDeposit.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Imperative handle to the orchestrated deposit flow. Use to open / close the deposit dialog from
|
|
6
|
+
* anywhere in the host app.
|
|
7
|
+
*
|
|
8
|
+
* Mount `<KitProvider deposit={…} />` once at the host's app root first — the hook throws when
|
|
9
|
+
* called outside.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { useDeposit } from "@stridge/kit";
|
|
14
|
+
*
|
|
15
|
+
* function DepositButton() {
|
|
16
|
+
* const { open } = useDeposit();
|
|
17
|
+
* return <button onClick={() => open()}>Deposit</button>;
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* // Open straight to the wallet flow with an asset pre-selected.
|
|
24
|
+
* open({ method: "wallet", assetId: "1:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" });
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* // Open straight to the transfer-crypto flow.
|
|
30
|
+
* open({ method: "transfer" });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare function useDeposit(): DepositController;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { useDeposit };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useControllerContext as e}from"./controller.js";function t(){return e().controller}export{t as useDeposit};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { DialogShellControls } from "../../../../shared/dialog/DialogShell.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/flows/deposit/widgets/amount-entry/AmountEntry.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Orchestrated `AmountEntry` widget. The user enters a USD amount; the widget displays the
|
|
8
|
+
* receive-token amount as the sub-line and converts the entered USD into source-token units
|
|
9
|
+
* before dispatching `confirmAmount` (the orchestrator's `ctx.amount` carries source-token
|
|
10
|
+
* units that flow into the gateway's quote request).
|
|
11
|
+
*
|
|
12
|
+
* Reads the source asset from the FSM's `amountEntry.ctx` (carries `priceUsd` for the USD↔token
|
|
13
|
+
* conversion and `amountUsd.value` for the wallet ceiling) and the receive token +
|
|
14
|
+
* minimum-deposit USD floor from the driver's `target` entity. Renders nothing on any other
|
|
15
|
+
* FSM state.
|
|
16
|
+
*
|
|
17
|
+
* Honors `target.payload.minDepositUsd.value`: when the entered amount is below it, the footer
|
|
18
|
+
* CTA flips to "Update order" and clicking auto-snaps the amount up to the floor. The widget
|
|
19
|
+
* also prefills the entry to the floor on first render so the user starts at a valid amount.
|
|
20
|
+
*/
|
|
21
|
+
declare function AmountEntry(props: ComponentProps<"div">): _$react_jsx_runtime0.JSX.Element | null;
|
|
22
|
+
declare function AmountEntryDialog({
|
|
23
|
+
open,
|
|
24
|
+
defaultOpen,
|
|
25
|
+
onOpenChange,
|
|
26
|
+
trigger,
|
|
27
|
+
...rootProps
|
|
28
|
+
}: AmountEntry.DialogProps): _$react_jsx_runtime0.JSX.Element;
|
|
29
|
+
declare namespace AmountEntry {
|
|
30
|
+
type Props = ComponentProps<"div">;
|
|
31
|
+
type DialogProps = ComponentProps<"div"> & DialogShellControls;
|
|
32
|
+
const Dialog: typeof AmountEntryDialog;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { AmountEntry };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useDepositSnapshot as e}from"../../driver/context.js";import{useKitI18n as t}from"../../../../shared/i18n/useKitI18n.js";import{Trans as n}from"../../../../shared/i18n/Trans.js";import{useLingui as r}from"../../../../shared/i18n/useLingui.js";import"../../../../i18n/index.js";import{useDepositActions as i,useDepositEffectiveState as a}from"../../orchestrator/controller.js";import{formatTokenAmount as o}from"../../../../shared/format/formatTokenAmount.js";import{DialogShell as s}from"../../../../shared/dialog/DialogShell.js";import{text as c}from"../../../../shared/ui/Text/Text.js";import"../../../../shared/ui/Text/index.js";import{AmountEntry as l}from"../../../../shared/widgets/amount-entry/compound/AmountEntry.js";import"../../../../shared/widgets/amount-entry/compound/index.js";import{toAssetDescriptor as u}from"../../../../shared/widgets/asset-descriptor.js";import{useEffect as d,useMemo as f,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";const _=[{value:`25`,label:`25%`},{value:`50`,label:`50%`},{value:`75`,label:`75%`},{value:`max`,label:`Max`}];function v(s){let v=e(),y=a(),{confirmAmount:b,back:x}=i(),{_:S}=r(),C=t(),w=v.target,T=w.status===`ready`||w.status===`stale`?w.payload:void 0,E=y.name===`amountEntry`?y.ctx.asset:void 0,D=E?.amountUsd?.value??0,O=T?.minDepositUsd?.value,k=T?.minDepositUsd?.formatted,A=E?.priceUsd,[j,M]=m(O??null),[N,P]=m(),F=p(void 0),I=E?`${E.eip155Id??``}:${E.address??``}`:void 0;d(()=>{I&&F.current!==I&&(F.current=I,typeof O==`number`&&(M(O),P(void 0)))},[I,O]);let L=e=>{P(e);let t=e===`max`?1:Number.parseInt(e,10)/100;Number.isFinite(t)&&M(D*t)},R=e=>{M(e),P(void 0)},z=f(()=>typeof O!=`number`||O<=0?!1:j===null||j<O,[j,O]),B=f(()=>typeof D!=`number`||D<=0?!1:j!==null&&j>D,[j,D]),V=()=>{if(B){M(D),P(`max`);return}if(z&&typeof O==`number`){M(O),P(void 0);return}j!==null&&b(A&&A>0?j/A:j)};if(y.name!==`amountEntry`||!E||!T)return null;let H=y.ctx.backTarget===`closed`?void 0:x,U=u(E)??{symbol:E.symbol},W=u(T)??{symbol:T.symbol},G=`${o((j??0)/1,C,{maxDecimals:5})} ${T.symbol}`,K=B?S({id:`9cCjMJ`,message:`Deposit max balance`}):z&&k?S({id:`bOZXx5`,message:`Update order`}):void 0;return g(l,{...s,amount:j,sendToken:U,receiveToken:W,max:D,...O===void 0?{}:{min:O},onAmountChange:R,...H?{onBack:H}:{},subLineAmount:G,presets:_,...N===void 0?{}:{activePreset:N},onPresetSelect:L,...K===void 0?{}:{footerLabel:K},onContinue:V,children:[h(l.Header,{}),g(l.Body,{children:[h(l.Hero,{}),h(l.Pills,{}),B?h(c.p,{size:`sm`,color:`subdued`,className:`AmountEntry__noticeStyles.root x2b8uid x1vvogim`,"data-style-src":`@stridge/kit:src/flows/deposit/widgets/amount-entry/AmountEntry.tsx:16`,children:h(n,{id:`znqB4T`,message:`Insufficient balance`})}):null,h(l.Flow,{}),!B&&z&&k?h(c.p,{size:`sm`,color:`subdued`,className:`AmountEntry__noticeStyles.root x2b8uid x1vvogim`,"data-style-src":`@stridge/kit:src/flows/deposit/widgets/amount-entry/AmountEntry.tsx:16`,children:h(n,{id:`3eKjkO`,message:`{formattedMin} minimum deposit`,values:{formattedMin:k}})}):null]}),h(l.Footer,{})]})}function y({open:e,defaultOpen:t,onOpenChange:n,trigger:r,...i}){return h(s,{open:e,defaultOpen:t,onOpenChange:n,trigger:r,children:h(v,{...i})})}(function(e){e.Dialog=y})(v||={});export{v as AmountEntry};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { AmountEntry } from "./AmountEntry.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./AmountEntry.js";
|