@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{formatDurationCompact as e}from"../../shared/format/formatDurationCompact.js";import{formatPercent as t}from"../../shared/format/formatPercent.js";import{formatTimestamp as n}from"../../shared/format/formatTimestamp.js";import{formatTokenAmount as r}from"../../shared/format/formatTokenAmount.js";import{formatUsd as i}from"../../shared/format/formatUsd.js";import{shortenAddress as a}from"../../shared/format/shortenAddress.js";const o=`Stridge ACME`,s=`0xCA8779a5FD7cEAf54211177A2b22dB5E0480685c`,c=`0x1d72b900dd9b4f9fb0e11c14978d9cbbff7b47db0b820911839aad7081f6b72a`,l=`0x268a11a1002eb7026e3a77999872695ee3a920e5c46172a43aa396da10ac5296`,u=`0xcae135e02df387bba14e231988126295a663c8d9f8e90c1ead5876cc2fee036d`,d=1778167499e3,f=1778169184e3,p=1778086787e3,m=1778087105e3,h=`0x8AC76a51cc950d9822D68b83fE1Ad97B32Cd580d`,g=`https://cdn.stridge.com/assets/usdc.svg`,_=`https://cdn.stridge.com/assets/usdt.svg`,v={1:`https://cdn.stridge.com/networks/60.svg`,8453:`https://cdn.stridge.com/networks/8453.svg`,42161:`https://cdn.stridge.com/networks/9001.svg`},y=`https://cdn.stridge.com/networks/9006.svg`,b=`https://cdn.stridge.com/networks/966.svg`,x=`0x166872371d1EB43B62c25861Bb7B1be4d5f09F56`,S={address:s,chainId:56},C={name:o},w={networkId:`9006`,networkName:`BSC`,eip155IdString:`56`,eip155IdNumber:56,chainLogoUrl:y,explorerBase:`https://bscscan.com`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,isNative:!1,nativeSymbol:`BNB`};function T(e){if(!e)return w;let t=e.chain.toLowerCase(),n=k.find(e=>e.networkName.toLowerCase()===t);if(!n)return w;let r=n.acceptedAssets.find(t=>t.symbol.toUpperCase()===e.symbol.toUpperCase());if(!r)return w;let i=n.acceptedAssets.find(e=>e.isNative);return{networkId:M[n.eip155Id]??n.eip155Id,networkName:n.networkName,eip155IdString:n.eip155Id,eip155IdNumber:Number(n.eip155Id),chainLogoUrl:n.chainLogoUrl,explorerBase:n.explorerBase,symbol:r.symbol,decimals:r.decimals,address:r.address,assetLogoUrl:r.assetLogoUrl??n.chainLogoUrl,isNative:r.isNative,nativeSymbol:i?.symbol??r.symbol}}function E(e=w){return{network_id:e.networkId,network_name:e.networkName,network_symbol:e.networkName.toLowerCase(),eip155_id:e.eip155IdNumber,native_currency:{symbol:e.nativeSymbol,name:e.nativeSymbol,decimals:18,logo:e.chainLogoUrl},assets:[{symbol:e.symbol,decimals:e.decimals,address:e.address,logo:e.assetLogoUrl}]}}const D=E();function O(e,t,n=w){return{networkId:n.networkId,networkName:n.networkName,eip155Id:n.eip155IdString,chainLogoUrl:n.chainLogoUrl,symbol:n.symbol,decimals:n.decimals,address:n.address,assetLogoUrl:n.assetLogoUrl,isNative:n.isNative,...t===void 0?{}:{minDepositUsd:{value:t,formatted:i(t,e)}}}}const k=[{eip155Id:`1`,networkName:`Ethereum`,chainLogoUrl:v[1],explorerBase:`https://etherscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[1]},{symbol:`TUSD`,address:`0x0000000000085d4780B73119b644AE5ecd22b376`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`PAXG`,address:`0x45804880De22913dAFE09f4980848ECE6EcbAf78`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/paxg.svg`},{symbol:`DAI`,address:`0x6B175474E89094C44Da98b954EedeAC495271d0F`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`PYUSD`,address:`0x6c3ea9036406852006290770BEdFcAbA0e23A0e8`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/pyusd.svg`},{symbol:`USDC`,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`WETH`,address:`0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`USDT`,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`56`,networkName:`BSC`,chainLogoUrl:y,explorerBase:`https://bscscan.com`,acceptedAssets:[{symbol:`BNB`,address:``,decimals:18,isNative:!0,assetLogoUrl:y},{symbol:`WETH`,address:`0x2170Ed0880ac9A755fd29B2688956BD959F933F8`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`TUSD`,address:`0x40af3827F39D0EAcBF4A168f8D4ee67c121D11c9`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`USDT`,address:`0x55d398326f99059fF775485246999027B3197955`,decimals:18,isNative:!1,assetLogoUrl:_},{symbol:`USDC`,address:h,decimals:18,isNative:!1,assetLogoUrl:g}]},{eip155Id:`8453`,networkName:`Base`,chainLogoUrl:v[8453],explorerBase:`https://basescan.org`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[8453]},{symbol:`WETH`,address:`0x4200000000000000000000000000000000000006`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`DAI`,address:`0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDC`,address:`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`USDT`,address:`0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`42161`,networkName:`Arbitrum`,chainLogoUrl:v[42161],explorerBase:`https://arbiscan.io`,acceptedAssets:[{symbol:`ETH`,address:``,decimals:18,isNative:!0,assetLogoUrl:v[42161]},{symbol:`TUSD`,address:`0x4D15a3A2286D883AF0AA1B3f21367843FAc63E07`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`WETH`,address:`0x82aF49447D8a07e3bd95BD0d56f35241523fBab1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`USDC`,address:`0xaf88d065e77c8cC2239327C5EDb3A432268e5831`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`DAI`,address:`0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDT`,address:`0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9`,decimals:6,isNative:!1,assetLogoUrl:_}]},{eip155Id:`137`,networkName:`Polygon`,chainLogoUrl:b,explorerBase:`https://polygonscan.com`,acceptedAssets:[{symbol:`POL`,address:``,decimals:18,isNative:!0,assetLogoUrl:b},{symbol:`TUSD`,address:`0x2e1AD108fF1D8C782fcBbB89AAd783aC49586756`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/tusd.svg`},{symbol:`USDC`,address:`0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359`,decimals:6,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`},{symbol:`WETH`,address:`0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/weth.svg`},{symbol:`DAI`,address:`0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063`,decimals:18,isNative:!1,assetLogoUrl:`https://cdn.stridge.com/assets/dai.svg`},{symbol:`USDT`,address:`0xc2132D05D31c914a87C6611C10748AEb04B58e8F`,decimals:6,isNative:!1,assetLogoUrl:_}]}];function A(e,t){let n=t===void 0?{}:{minDepositUsd:{value:t,formatted:i(t,e)}};return k.map(({eip155Id:e,networkName:t,chainLogoUrl:r,explorerBase:i,acceptedAssets:o})=>({eip155Id:e,networkName:t,chainLogoUrl:r,address:{value:x,formatted:a(x)},explorerUrl:`${i}/address/${x}`,acceptedAssets:o,...n}))}const j=k.map(({eip155Id:e,networkName:t,chainLogoUrl:n,explorerBase:r,acceptedAssets:i})=>({eip155Id:e,networkName:t,chainLogoUrl:n,address:{value:x,formatted:a(x)},explorerUrl:`${r}/address/${x}`,acceptedAssets:i})),M={1:`60`,56:`9006`,137:`9001`,8453:`8453`,42161:`42161`};function N(){return{assets:k.map(e=>{let t=e.acceptedAssets.find(e=>e.isNative),n=e.acceptedAssets.filter(e=>!e.isNative);return{eip155_id:Number(e.eip155Id),network_id:M[e.eip155Id]??e.eip155Id,network_name:e.networkName.toLowerCase(),network_symbol:e.networkName.toLowerCase(),assets:n.map(e=>({address:e.address,decimals:e.decimals,logo:e.assetLogoUrl??``,name:e.symbol,symbol:e.symbol})),native_currency:{symbol:t?.symbol??``,name:t?.symbol??``,decimals:t?.decimals??18,logo:t?.assetLogoUrl??e.chainLogoUrl}}})}}function P(e){return[{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDC`,decimals:18,address:h,assetLogoUrl:g,chainLogoUrl:y,isNative:!1,amount:{value:42.805864,formatted:r(42.805864,e,{compact:!0})},amountUsd:{value:42.81,formatted:i(42.81,e)},priceUsd:1},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`BNB`,decimals:18,address:``,assetLogoUrl:y,chainLogoUrl:y,isNative:!0,amount:{value:.016699,formatted:r(.016699,e,{compact:!0})},amountUsd:{value:10.86,formatted:i(10.86,e)},priceUsd:650.41},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDT`,decimals:6,address:`0xdAC17F958D2ee523a2206206994597C13D831ec7`,assetLogoUrl:_,chainLogoUrl:v[1],isNative:!1,amount:{value:.757479,formatted:r(.757479,e,{compact:!0})},amountUsd:{value:.76,formatted:i(.76,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`9006`,networkName:`BSC`,eip155Id:`56`,symbol:`USDT`,decimals:18,address:`0x55d398326f99059fF775485246999027B3197955`,assetLogoUrl:_,chainLogoUrl:y,isNative:!1,amount:{value:.595218,formatted:r(.595218,e,{compact:!0})},amountUsd:{value:.6,formatted:i(.6,e)},priceUsd:1,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`ETH`,decimals:18,address:``,assetLogoUrl:v[1],chainLogoUrl:v[1],isNative:!0,amount:{value:167e-6,formatted:r(167e-6,e,{compact:!0})},amountUsd:{value:.39,formatted:i(.39,e)},priceUsd:2316.86,lowBalance:!0,disabled:!0},{networkId:`60`,networkName:`Ethereum`,eip155Id:`1`,symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,chainLogoUrl:v[1],isNative:!1,amount:{value:.10408,formatted:r(.10408,e,{compact:!0})},amountUsd:{value:.1,formatted:i(.1,e)},priceUsd:1,lowBalance:!0,disabled:!0}]}function F(e,n,a=w){return{heroAmountUsd:{value:1.999758,formatted:i(1.999758,e)},sendAsset:{symbol:`USDC`,decimals:6,address:`0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48`,assetLogoUrl:`https://cdn.stridge.com/assets/usdc.svg`,isNative:!1,chainId:1,networkName:`Ethereum`,eip155Id:`1`,chainLogoUrl:v[1]},sendAmount:{value:2,formatted:r(2,e)},receiveAsset:{symbol:a.symbol,decimals:a.decimals,address:a.address,assetLogoUrl:a.assetLogoUrl,isNative:a.isNative,chainId:a.eip155IdNumber,networkName:a.networkName,eip155Id:a.eip155IdString,chainLogoUrl:a.chainLogoUrl},receiveAmount:{value:1.9958,formatted:r(1.9958,e)},quoteTotalSeconds:30,expiresAt:n,etaSeconds:30,breakdown:{selectedRoute:{provider:`lifi`,scenario:`cross_chain_diff_token`,label:`LIFI · cross chain diff token`},networkCost:{value:.0042,formatted:i(.0042,e)},priceImpact:{value:.21,formatted:t(.21,e)}}}}function I(e,t=w){return{kind:`pending`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},creditedAsset:{symbol:t.symbol,decimals:t.decimals,address:t.address,assetLogoUrl:t.assetLogoUrl,isNative:t.isNative},creditedTo:o,txHash:{value:c,formatted:a(c)},txExplorerUrl:`https://etherscan.io/tx/${c}`,detectedAt:{value:d,formatted:n(d,e)},submittedAt:{value:d,formatted:n(d,e)},receiveAmount:{value:4.983615,formatted:r(4.983615,e)}}}function L(t,i=w){let u=f-d;return{kind:`succeeded`,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:4.983615,formatted:r(4.983615,t)},routeHops:[{provider:`LIFI`,chainId:1},{provider:`LIFI`,chainId:i.eip155IdNumber}],totalTime:{value:u,formatted:e(u,t)},depositTx:{hash:{value:c,formatted:a(c)},explorerUrl:`https://etherscan.io/tx/${c}`},completionTx:{hash:{value:l,formatted:a(l)},explorerUrl:`${i.explorerBase}/tx/${l}`},submittedAt:{value:d,formatted:n(d,t)},filledAt:{value:f,formatted:n(f,t)}}}function R(e,t=`execution-reverted`,i=w){return{kind:`failed`,failureKind:t,sourceWallet:{name:`Wallet`,address:{value:s,formatted:a(s)},explorerUrl:`https://etherscan.io/address/${s}`},destination:{name:o,address:{value:s,formatted:a(s)}},creditedAsset:{symbol:i.symbol,decimals:i.decimals,address:i.address,assetLogoUrl:i.assetLogoUrl,isNative:i.isNative},receiveAmount:{value:0,formatted:r(0,e)},txHash:{value:u,formatted:a(u)},txExplorerUrl:`https://etherscan.io/tx/${u}`,submittedAt:{value:p,formatted:n(p,e)},failedAt:{value:m,formatted:n(m,e)}}}function z(e,t=S){let n=P(e).reduce((e,t)=>e+(t.amountUsd?.value??0),0);return{address:{value:t.address,formatted:a(t.address)},...t.chainId===void 0?{}:{chainId:t.chainId},balanceTotalUsd:{value:n,formatted:i(n,e)}}}const B={deposit_addresses:[],metadata:{brand_name:o}},V=[],H={assets:[]},U={chains:[]},W={},G={id:`mock-settlement`,status:`completed`,created_at:new Date(d).toISOString(),updated_at:new Date(f).toISOString()},K={settlements:[],is_terminal:!1};function q(e,t,n,r){return t===`pending`?I(e,n&&typeof n!=`string`?n:void 0):t===`succeeded`?L(e,n&&typeof n!=`string`?n:void 0):R(e,typeof n==`string`?n:void 0,r)}export{j as DEFAULT_ADDRESSES_PAYLOAD,C as DEFAULT_BRAND_PAYLOAD,w as DEFAULT_MOCK_ASSET,D as DEFAULT_TARGET_RAW,S as DEFAULT_WALLET_INFO,V as STUB_DEPOSIT_ADDRESSES_RAW,K as STUB_GATEWAY_POLL_RESPONSE,G as STUB_GATEWAY_SETTLEMENT_DTO,B as STUB_GATEWAY_START_RESPONSE,U as STUB_ONCHAIN_BALANCE_RESPONSE,W as STUB_QUOTE_RESPONSE,H as STUB_SUPPORTED_ASSETS_RESPONSE,A as buildDefaultAddressesPayload,P as buildDefaultBalances,R as buildDefaultFailurePayload,I as buildDefaultPendingPayload,F as buildDefaultQuotePayload,L as buildDefaultSuccessPayload,N as buildDefaultSupportedAssetsResponse,O as buildDefaultTargetPayload,E as buildDefaultTargetRaw,z as buildDefaultWalletPayload,q as buildSettlementPayload,T as resolveMockAsset};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let t=e,n=new Set;function r(){for(let e of n)e()}return{getSnapshot(){return t},subscribe(e){return n.add(e),()=>{n.delete(e)}},update(e){t={...t,...e},r()},replace(e){t=e,r()}}}export{e as createEntityStore};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SettlementFailureKind } from "../../shared/driver/types.js";
|
|
2
|
+
import { SettlementFailurePayload, SettlementPendingPayload, SettlementSuccessPayload } from "../../flows/deposit/driver/payloads.js";
|
|
3
|
+
//#region src/drivers/stridge-mock/triggers.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Mock-specific imperative trigger surface returned alongside the {@link DepositDriver} from
|
|
6
|
+
* {@link createStridgeMockDriver}. Drivers separate this surface from the contract types so the
|
|
7
|
+
* kit's `DepositDriver` interface stays untouched by mock-specific affordances — production code
|
|
8
|
+
* never sees these triggers.
|
|
9
|
+
*
|
|
10
|
+
* Triggers mutate the driver's internal entity store, then notify subscribers. Calling a trigger
|
|
11
|
+
* is the mock equivalent of a backend response landing on the live driver: the entity flips to
|
|
12
|
+
* `ready` with the new payload and any orchestrator effect that was awaiting the transition
|
|
13
|
+
* dispatches its FSM event on the next render.
|
|
14
|
+
*/
|
|
15
|
+
interface MockTriggers {
|
|
16
|
+
/**
|
|
17
|
+
* Flips `settlement` to `ready` with a `pending` payload. Optional `partial` overrides any
|
|
18
|
+
* field on the bundled fixture (use it to vary the tx hash, detected timestamp, etc.).
|
|
19
|
+
*/
|
|
20
|
+
triggerSettlementPending(partial?: Partial<SettlementPendingPayload>): void;
|
|
21
|
+
/**
|
|
22
|
+
* Flips `settlement` to `ready` with a `succeeded` payload. Useful for canvas cards
|
|
23
|
+
* pre-seeding the success card and for tests asserting `<SuccessState>` rendering.
|
|
24
|
+
*/
|
|
25
|
+
triggerSettlementSuccess(partial?: Partial<SettlementSuccessPayload>): void;
|
|
26
|
+
/**
|
|
27
|
+
* Flips `settlement` to `ready` with a `failed` payload of the given `failureKind`. The
|
|
28
|
+
* widget translates `failureKind` to localized headline + reason copy via `useT()`.
|
|
29
|
+
*/
|
|
30
|
+
triggerSettlementFailure(failureKind: SettlementFailureKind, partial?: Partial<SettlementFailurePayload>): void;
|
|
31
|
+
/**
|
|
32
|
+
* Flips `quote` to `error` with the supplied `Error`. Drives the confirm-deposit "Try again"
|
|
33
|
+
* fallback path so canvas / Storybook surfaces can render the error chrome without a live
|
|
34
|
+
* gateway failure.
|
|
35
|
+
*/
|
|
36
|
+
triggerQuoteFailure(error: Error): void;
|
|
37
|
+
/** Restores every entity to the snapshot the factory was constructed with. */
|
|
38
|
+
reset(): void;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { MockTriggers };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useDepositSnapshot as e}from"../driver/context.js";import{Trans as t}from"../../../shared/i18n/Trans.js";import{useLingui as n}from"../../../shared/i18n/useLingui.js";import"../../../i18n/index.js";import{useDepositActions as r}from"../orchestrator/controller.js";import{ChevronDownIcon as i}from"../../../shared/icons/ChevronDownIcon.js";import"../../../icons/index.js";import{Button as a}from"../../../shared/ui/Button/Button.js";import{Dialog as o}from"../../../shared/ui/Dialog/Dialog.js";import"../../../shared/ui/Dialog/index.js";import{Card as s}from"../../../shared/ui/Card/Card.js";import{Collapsible as c}from"../../../shared/ui/Collapsible/Collapsible.js";import"../../../shared/ui/Collapsible/index.js";import{text as l}from"../../../shared/ui/Text/Text.js";import"../../../ui/index.js";import{Frame as u}from"../../../shared/dialog/Frame.js";import{styles as d}from"./DepositBootstrapErrorState.styles.js";import{jsx as f,jsxs as p}from"react/jsx-runtime";import*as m from"@stylexjs/stylex";const h=process.env.NODE_ENV!==`production`;function g(){return p(`svg`,{"aria-hidden":!0,viewBox:`0 0 64 64`,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,...m.props(d.heroRing),children:[f(`circle`,{cx:`32`,cy:`32`,r:`28`,strokeWidth:`2`,style:{stroke:`color-mix(in oklab, var(--stridge-kit-warning) 55%, transparent)`}}),f(`circle`,{cx:`32`,cy:`32`,r:`20`,style:{fill:`var(--stridge-kit-warning)`}}),f(`path`,{d:`M32 22V34`,strokeWidth:`2.8`,strokeLinecap:`round`,style:{stroke:`var(--stridge-kit-warning-foreground)`}}),f(`circle`,{cx:`32`,cy:`40.5`,r:`1.8`,style:{fill:`var(--stridge-kit-warning-foreground)`}})]})}function _(){let _=e(),{close:y}=r(),{_:b}=n(),x=(_.target.status===`error`?_.target.error:void 0)??(_.brand.status===`error`?_.brand.error:void 0)??(_.addresses.status===`error`?_.addresses.error:void 0),S=x?.name??`DepositBootstrapError`,C=x?.message??b({id:`3yd3IL`,message:`The deposit driver failed to load gateway configuration.`}),w=x?.stack;return p(u,{"data-stridge-slot":`deposit-bootstrap-error`,"data-testid":`deposit-bootstrap-error`,...m.props(d.root),children:[p(s.Header,{...m.props(d.header),children:[f(l.span,{size:`base`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,children:f(t,{id:`OLF0i7`,message:`Couldn't load deposit options`})}),f(o.CloseButton,{})]}),p(s.Body,{children:[p(`div`,{"data-stridge-slot":`deposit-bootstrap-error-hero`,...m.props(d.hero),children:[f(g,{}),f(l.span,{size:`lg`,fontWeight:`semibold`,leading:`tight`,tracking:`tight`,align:`center`,...m.props(d.heroHeadline),children:f(t,{id:`qQ5VJt`,message:`We can't reach the gateway right now`})}),f(l.span,{size:`sm`,leading:`normal`,align:`center`,color:`subdued`,...m.props(d.heroReason),children:f(t,{id:`02NghK`,message:`Close this dialog and try again in a moment. If the problem persists, double-check the gateway key on your integration.`})})]}),p(c,{"data-stridge-slot":`deposit-bootstrap-error-details`,...m.props(d.details),children:[p(c.Trigger,{render:f(`button`,{type:`button`}),"aria-label":b({id:`c6Bl9M`,message:`Toggle technical details`}),...m.props(d.detailsTrigger),children:[f(l.span,{size:`xs`,fontWeight:`medium`,leading:`tight`,color:`subdued`,children:f(t,{id:`69Gavs`,message:`Technical details`})}),f(i,{"aria-hidden":!0,...m.props(d.detailsChevron)})]}),f(c.Panel,{children:p(`div`,{...m.props(d.detailsPanel),children:[f(v,{label:b({id:`SlfejT`,message:`Error`}),value:S}),f(v,{label:b({id:`xDAtGP`,message:`Message`}),value:C}),h&&w?p(`div`,{...m.props(d.detailsRow),children:[f(l.span,{size:`2xs`,fontWeight:`medium`,leading:`tight`,tracking:`widest`,transform:`uppercase`,color:`subdued`,children:f(t,{id:`P9fBwv`,message:`Stack`})}),f(`pre`,{...m.props(d.stack),children:w})]}):null]})})]})]}),f(s.Footer,{...m.props(d.footer),children:f(a,{variant:`default`,size:`cta`,onClick:y,"data-stridge-slot":`deposit-bootstrap-error-close`,...m.props(d.cta),children:f(t,{id:`yz7wBu`,message:`Close`})})})]})}function v({label:e,value:t}){return p(`div`,{...m.props(d.detailsRow),children:[f(l.span,{size:`2xs`,fontWeight:`medium`,leading:`tight`,tracking:`widest`,transform:`uppercase`,color:`subdued`,children:e}),f(l.span,{size:`xs`,fontWeight:`normal`,leading:`normal`,...m.props(d.detailsValue),children:t})]})}export{_ as DepositBootstrapErrorState};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={root:{"DepositBootstrapErrorState__styles.root":`DepositBootstrapErrorState__styles.root`,"position-kVAEAm":`x1n2onr6`,"width-kzqmXN":`xh8yej3`,"maxWidth-ks0D6T":`x17fpy1y`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:24`},header:{"DepositBootstrapErrorState__styles.header":`DepositBootstrapErrorState__styles.header`,"justifyContent-kjj79g":`x1qughib`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:33`},hero:{"DepositBootstrapErrorState__styles.hero":`DepositBootstrapErrorState__styles.hero`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"alignItems-kGNEyG":`x6s0dn4`,"gap-kOIVth":`x883omv`,"paddingTop-kLKAdn":`x9desvi`,"paddingInline-kg3NbH":`x65v0h`,"paddingBottom-kGO01o":`x1hhzuzn`,"animationName-kKVMdj":`xv305lp`,"animationDuration-k44tkh":`xmprevt x1s1fvk8`,"animationTimingFunction-kyAemX":`xrkt6z0`,"animationFillMode-kWV6AL":`x1u6ievf`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:42`},heroRing:{"DepositBootstrapErrorState__styles.heroRing":`DepositBootstrapErrorState__styles.heroRing`,"display-k1xSpc":`x1lliihq`,"width-kzqmXN":`x1fu8urw`,"height-kZKoxP":`x1peatla`,"flexShrink-kmuXW":`x2lah0s`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:58`},heroHeadline:{"DepositBootstrapErrorState__styles.heroHeadline":`DepositBootstrapErrorState__styles.heroHeadline`,"marginTop-keoZOQ":`x1k70j0n`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:64`},heroReason:{"DepositBootstrapErrorState__styles.heroReason":`DepositBootstrapErrorState__styles.heroReason`,"maxWidth-ks0D6T":`x1va8c73`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:67`},details:{"DepositBootstrapErrorState__styles.details":`DepositBootstrapErrorState__styles.details`,"marginTop-keoZOQ":`x1hmvnq2`,"marginInline-kUOVxO":`x10bka1u`,"marginBottom-k1K539":`x91k8ka`,"borderRadius-kaIpWk":`x12ur2as`,"borderWidth-kMzoRj":`xmkeg23`,"borderStyle-ksu8eU":`x1y0btm7`,"borderColor-kVAM5u":`x1bue7yx`,"backgroundColor-kWkggS":`x407w7c`,"overflow-kVQacm":`xb3r6kr`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:76`},detailsTrigger:{"DepositBootstrapErrorState__styles.detailsTrigger":`DepositBootstrapErrorState__styles.detailsTrigger`,"display-k1xSpc":`x78zum5`,"alignItems-kGNEyG":`x6s0dn4`,"justifyContent-kjj79g":`x1qughib`,"gap-kOIVth":`x167g77z`,"width-kzqmXN":`xh8yej3`,"paddingBlock-k8WAf4":`xp59q4u`,"paddingInline-kg3NbH":`xqin4a2`,"borderWidth-kMzoRj":`xc342km`,"backgroundColor-kWkggS":`xjbqb8w`,"color-kMwMTN":`xzn0pkc`,"cursor-kkrTdU":`x1ypdohk`,"outline-kI3sdo":`x1a2a7pz`,"WebkitTapHighlightColor-kQizK7":`x1i10hfl`,"textAlign-k9WMMc":`x1yc453h`,"fontFamily-kMv6JI":`xjb2p0i`,":focus-visible_boxShadow-kEtg5x":`xf4a2cz`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:87`},detailsChevron:{"DepositBootstrapErrorState__styles.detailsChevron":`DepositBootstrapErrorState__styles.detailsChevron`,"width-kzqmXN":`x6jxa94`,"height-kZKoxP":`x1v9usgg`,"flexShrink-kmuXW":`x2lah0s`,"color-kMwMTN":`x137ha3m`,"strokeWidth-kfJifR":`xhr4kjn`,"transformOrigin-k3nNDw":`x1g0ag68`,"transitionProperty-k1ekBW":`x11xpdln`,"transitionDuration-kIyJzY":`x1vhb3u9 x12w9bfk`,"transitionTimingFunction-kAMwcw":`x1xv5090`,"[data-panel-open] &_transform-kSnp38":`xtqhfa`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:107`},detailsPanel:{"DepositBootstrapErrorState__styles.detailsPanel":`DepositBootstrapErrorState__styles.detailsPanel`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x883omv`,"paddingInline-kg3NbH":`xqin4a2`,"paddingTop-kLKAdn":`x1nn3v0j`,"paddingBottom-kGO01o":`xsag5q8`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:124`},detailsRow:{"DepositBootstrapErrorState__styles.detailsRow":`DepositBootstrapErrorState__styles.detailsRow`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"gap-kOIVth":`x1jnr06f`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:132`},detailsValue:{"DepositBootstrapErrorState__styles.detailsValue":`DepositBootstrapErrorState__styles.detailsValue`,"wordBreak-kTgw9":`x13faqbe`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:137`},stack:{"DepositBootstrapErrorState__styles.stack":`DepositBootstrapErrorState__styles.stack`,"margin-kogj98":`x1ghz6dp`,"maxHeight-kskxy":`x19aweqf`,"overflow-kVQacm":`xysyzu8`,"padding-kmVPX3":`xvaa05t`,"borderRadius-kaIpWk":`x143j3yi`,"backgroundColor-kWkggS":`x19u6ldj`,"fontFamily-kMv6JI":`x47j52l`,"fontSize-kGuDYH":`x1r4ghiz`,"lineHeight-kLWn49":`x1ppnlvb`,"color-kMwMTN":`xi96bwj`,"whiteSpace-khDVqt":`x126k92a`,"wordBreak-kTgw9":`x13faqbe`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:140`},footer:{"DepositBootstrapErrorState__styles.footer":`DepositBootstrapErrorState__styles.footer`,"display-k1xSpc":`x78zum5`,"flexDirection-kXwgrk":`xdt5ytf`,"alignItems-kGNEyG":`x1qjc9v5`,"paddingTop-kLKAdn":`x109j2v6`,"paddingInline-kg3NbH":`x65v0h`,"paddingBottom-kGO01o":`x1t4gjm`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:158`},cta:{"DepositBootstrapErrorState__styles.cta":`DepositBootstrapErrorState__styles.cta`,"width-kzqmXN":`xh8yej3`,"alignSelf-kSGwAc":`xkh2ocl`,$$css:`@stridge/kit:src/flows/deposit/dialog/DepositBootstrapErrorState.styles.ts:166`}};export{e as styles};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { TxRef } from "../../../shared/driver/types.js";
|
|
2
|
+
import { BalanceItemPayload, QuotePayload, SettlementFailurePayload, SettlementPendingPayload, SettlementSuccessPayload } from "../driver/payloads.js";
|
|
3
|
+
import { FailureInfo } from "../../../shared/orchestrator/types.js";
|
|
4
|
+
import { DepositMethod, DepositState, DepositStateName, ResolvedOpenInput } from "../orchestrator/types.js";
|
|
5
|
+
import { ErrorInfo } from "react";
|
|
6
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/flows/deposit/dialog/DepositDialog.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* Orchestrated deposit dialog. Mount inside `<StridgeProvider>` wherever the integrator wants
|
|
11
|
+
* the dialog to live in the React tree (typically once at the layout root). Open state is
|
|
12
|
+
* bound to the controller's `state.name !== "closed"`, so the dialog appears / disappears
|
|
13
|
+
* automatically as descendants call `useDeposit().open()` / `.close()`.
|
|
14
|
+
*
|
|
15
|
+
* Each widget gates rendering on its own FSM state, so the dialog stacks them and only one
|
|
16
|
+
* renders content per state. Skip the dialog entirely for fully custom UI — render against
|
|
17
|
+
* `useDeposit()` / `useDepositState()` / `useDepositSnapshot()` directly.
|
|
18
|
+
*
|
|
19
|
+
* Three top-level callbacks (`onOpened`, `onClosed`, `onStepChanged`) describe the dialog as a
|
|
20
|
+
* stateful component. The grouped `events={{ … }}` prop carries the operational lifecycle —
|
|
21
|
+
* user actions, async outcomes from the orchestrator, and settlement-entity transitions for
|
|
22
|
+
* pending / succeeded / failed deposits.
|
|
23
|
+
*/
|
|
24
|
+
declare function DepositDialog({
|
|
25
|
+
container,
|
|
26
|
+
onOpened,
|
|
27
|
+
onClosed,
|
|
28
|
+
onStepChanged,
|
|
29
|
+
onError,
|
|
30
|
+
events
|
|
31
|
+
}: DepositDialog.Props): _$react_jsx_runtime0.JSX.Element;
|
|
32
|
+
declare namespace DepositDialog {
|
|
33
|
+
interface Props {
|
|
34
|
+
/**
|
|
35
|
+
* Element the dialog portals into. Defaults to `document.body` (full-page overlay). Pass a
|
|
36
|
+
* transformed ancestor with `overflow: clip` — e.g. a mobile mockup frame — to scope the
|
|
37
|
+
* dialog's width, height, and backdrop to that rect.
|
|
38
|
+
*/
|
|
39
|
+
container?: HTMLElement | null;
|
|
40
|
+
/** Forwarded to the dialog's internal {@link GatewayKitBoundary} for crash reporting. */
|
|
41
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Fires once when the dialog transitions from `closed` to any open step. Receives the
|
|
44
|
+
* resolved open input derived from the entry state.
|
|
45
|
+
*/
|
|
46
|
+
onOpened?: (input: ResolvedOpenInput) => void;
|
|
47
|
+
/** Fires once when the dialog transitions back to `closed`. `atStep` is the last open step. */
|
|
48
|
+
onClosed?: (atStep: DepositStateName) => void;
|
|
49
|
+
/** Fires on every logical step transition. */
|
|
50
|
+
onStepChanged?: (event: {
|
|
51
|
+
from: DepositStateName;
|
|
52
|
+
to: DepositStateName;
|
|
53
|
+
ctx: GatewayContext | null;
|
|
54
|
+
}) => void;
|
|
55
|
+
/** Operational events — user actions, async outcomes, settlement-entity transitions. */
|
|
56
|
+
events?: Events;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Operational lifecycle hooks. Fire after the controller has acted (state machine has
|
|
60
|
+
* transitioned, driver entity has settled), so payloads are guaranteed valid for the named
|
|
61
|
+
* event.
|
|
62
|
+
*/
|
|
63
|
+
interface Events {
|
|
64
|
+
/** User picked a deposit method on the `Deposit` step. */
|
|
65
|
+
onMethodSelected?: (method: DepositMethod) => void;
|
|
66
|
+
/** User confirmed an asset on the `AssetPicker` step. The asset is the driver-shaped balance row. */
|
|
67
|
+
onAssetSelected?: (asset: BalanceItemPayload) => void;
|
|
68
|
+
/** User submitted an amount on the `AmountEntry` step. */
|
|
69
|
+
onAmountSubmitted?: (amount: number) => void;
|
|
70
|
+
/** User confirmed the deposit on the `ConfirmDeposit` step (wallet prompt is about to fire). */
|
|
71
|
+
onDepositConfirmed?: () => void;
|
|
72
|
+
/** User pressed Back on a non-root step. */
|
|
73
|
+
onBackPressed?: (fromStep: DepositStateName) => void;
|
|
74
|
+
/** Orchestrator requested a quote (`confirmDeposit` entered `loading` or `regenerating`). */
|
|
75
|
+
onQuoteRequested?: (input: {
|
|
76
|
+
asset: BalanceItemPayload;
|
|
77
|
+
amount: number;
|
|
78
|
+
}) => void;
|
|
79
|
+
/** Orchestrator received a successful quote — fires when the driver's `quote` entity transitions to `ready`. */
|
|
80
|
+
onQuoteResolved?: (quote: QuotePayload) => void;
|
|
81
|
+
/** Quote fetch failed (FSM `confirmDeposit{phase: failed, recoverFrom: "quote"}`). */
|
|
82
|
+
onQuoteFailed?: (failure: FailureInfo) => void;
|
|
83
|
+
/** A quote silently expired and a regeneration started (no user interaction). */
|
|
84
|
+
onQuoteExpired?: () => void;
|
|
85
|
+
/** Wallet broadcast a deposit tx; the orchestrator transitioned into `processing`. */
|
|
86
|
+
onDepositSubmitted?: (tx: TxRef) => void;
|
|
87
|
+
/** User declined the wallet signature prompt; orchestrator regenerated the quote. */
|
|
88
|
+
onSignatureDeclined?: () => void;
|
|
89
|
+
/** Deposit submission failed for a non-rejection reason. */
|
|
90
|
+
onSubmissionFailed?: (failure: FailureInfo) => void;
|
|
91
|
+
/** The driver's `settlement` entity emitted a progressive pending update. */
|
|
92
|
+
onProcessingProgress?: (update: SettlementPendingPayload) => void;
|
|
93
|
+
/** Terminal success — settlement entity reached `ready{kind: "succeeded"}`. */
|
|
94
|
+
onSucceeded?: (result: SettlementSuccessPayload) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Terminal failure — either a settlement failure (driver-emitted classification) or an
|
|
97
|
+
* FSM-derived failure (quote / submission rejection escalated to the global error arm).
|
|
98
|
+
*/
|
|
99
|
+
onFailed?: (failure: SettlementFailurePayload | FailureInfo) => void;
|
|
100
|
+
/**
|
|
101
|
+
* Background `fetchActiveSettlement` probe surfaced a pending deposit — the driver's
|
|
102
|
+
* `settlement` entity transitioned from `idle` / `loading` straight to a pending payload.
|
|
103
|
+
*/
|
|
104
|
+
onPendingSnapshotDetected?: (snapshot: SettlementPendingPayload) => void;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/** Convenience union — the `ctx` payload on `onStepChanged`. */
|
|
108
|
+
type GatewayContext = Exclude<DepositState, {
|
|
109
|
+
name: "closed";
|
|
110
|
+
}>["ctx"];
|
|
111
|
+
//#endregion
|
|
112
|
+
export { DepositDialog };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useDepositSnapshot as e}from"../driver/context.js";import{useDialogLifecycle as t}from"../../../shared/orchestrator/useDialogLifecycle.js";import"../../../shared/orchestrator/index.js";import{useControllerContext as n}from"../orchestrator/controller.js";import{Dialog as r}from"../../../shared/ui/Dialog/Dialog.js";import"../../../shared/ui/Dialog/index.js";import{AmountEntry as i}from"../widgets/amount-entry/AmountEntry.js";import"../widgets/amount-entry/index.js";import{AssetPicker as a}from"../widgets/asset-picker/AssetPicker.js";import"../widgets/asset-picker/index.js";import{ConfirmDeposit as o}from"../widgets/confirm-deposit/ConfirmDeposit.js";import"../widgets/confirm-deposit/index.js";import{Deposit as s}from"../widgets/deposit/Deposit.js";import"../widgets/deposit/index.js";import{DepositStatusBanner as c}from"../widgets/deposit-status-banner/DepositStatusBanner.js";import"../widgets/deposit-status-banner/index.js";import{ErrorState as l}from"../widgets/error-state/ErrorState.js";import"../widgets/error-state/index.js";import{ProcessingState as u}from"../widgets/processing-state/ProcessingState.js";import"../widgets/processing-state/index.js";import{SuccessState as d}from"../widgets/success-state/SuccessState.js";import"../widgets/success-state/index.js";import{TransferCrypto as f}from"../widgets/transfer-crypto/TransferCrypto.js";import"../widgets/transfer-crypto/index.js";import{StepTransition as p}from"../../../shared/dialog/StepTransition.js";import{GatewayKitBoundary as m}from"../../../shared/error-handling/components/GatewayKitBoundary.js";import"../../../shared/error-handling/index.js";import{DepositBootstrapErrorState as h}from"./DepositBootstrapErrorState.js";import{useRef as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";const y=new Set([`deposit`,`assetPicker`,`amountEntry`,`confirmDeposit`,`transferCrypto`]);function b({container:t,onOpened:g,onClosed:b,onStepChanged:S,onError:C,events:w}){let{state:T,effectiveState:E,controller:D}=n(),O=e(),k=T.name!==`closed`;x(T,O.settlement,O.quote,{onOpened:g,onClosed:b,onStepChanged:S,events:w});let A=E,j=O.target.status===`error`&&y.has(A.name);return _(r,{open:k,onOpenChange:e=>{e||D.close()},children:_(r.Content,{container:t,children:v(m,{onError:C,onReset:D.close,children:[j?_(h,{}):v(p,{stateKey:A.name,children:[A.name===`deposit`?_(s,{}):null,A.name===`assetPicker`?_(a,{}):null,A.name===`amountEntry`?_(i,{}):null,A.name===`confirmDeposit`?_(o,{}):null,A.name===`transferCrypto`?_(f,{}):null,A.name===`processing`?_(u,{}):null,A.name===`success`?_(d,{}):null,A.name===`error`?_(l,{}):null]}),_(c,{})]})})})}function x(e,n,r,i){let a=g(i);a.current=i,t({state:e,settlement:n,quote:r,fireFsm:(e,t)=>S(e,t,a.current),fireSettlement:(e,t)=>T(e,t,a.current),fireQuote:(e,t)=>{t.status===`ready`&&e!==`ready`&&a.current.events?.onQuoteResolved?.(t.payload)}})}function S(e,t,n){let{onOpened:r,onClosed:i,onStepChanged:a,events:o}=n;if(e.name===t.name){t.name===`confirmDeposit`&&e.name===`confirmDeposit`&&w(e.ctx.phase,t.ctx.phase,t,o);return}e.name===`closed`&&t.name!==`closed`&&r?.(C(t)),e.name!==`closed`&&t.name===`closed`&&i?.(e.name),a?.({from:e.name,to:t.name,ctx:t.name===`closed`?null:t.ctx}),e.name===`deposit`&&t.name===`assetPicker`&&o?.onMethodSelected?.(`wallet`),e.name===`deposit`&&t.name===`transferCrypto`&&o?.onMethodSelected?.(`transfer`),e.name===`assetPicker`&&t.name===`amountEntry`&&o?.onAssetSelected?.(t.ctx.asset),e.name===`amountEntry`&&t.name===`confirmDeposit`&&o?.onAmountSubmitted?.(t.ctx.amount),t.name===`confirmDeposit`&&(e.name!==`confirmDeposit`||e.ctx.phase.kind!==t.ctx.phase.kind)&&w(e.name===`confirmDeposit`?e.ctx.phase:void 0,t.ctx.phase,t,o),e.name===`confirmDeposit`&&t.name===`processing`&&o?.onDepositSubmitted?.(t.ctx.tx),e.name!==`error`&&t.name===`error`&&t.ctx.failure&&(o?.onFailed?.(t.ctx.failure),(e.name===`confirmDeposit`?e.ctx.phase:void 0)?.kind===`submitting`&&o?.onSubmissionFailed?.(t.ctx.failure)),t.name!==`closed`&&e.name!==`closed`&&`backTarget`in e.ctx&&t.name===e.ctx.backTarget&&o?.onBackPressed?.(e.name)}function C(e){if(e.name!==`deposit`){if(e.name===`transferCrypto`)return{method:`transfer`};if(e.name===`assetPicker`)return{method:`wallet`};if(e.name===`amountEntry`||e.name===`confirmDeposit`)return{method:`wallet`,asset:e.ctx.asset};if(e.name===`processing`||e.name===`success`)return e.ctx.method===`transfer`?{method:`transfer`}:{method:`wallet`}}}function w(e,t,n,r){r&&e?.kind!==t.kind&&((t.kind===`loading`||t.kind===`regenerating`)&&(r.onQuoteRequested?.({asset:n.ctx.asset,amount:n.ctx.amount}),t.kind===`regenerating`&&(e?.kind===`submitting`?r.onSignatureDeclined?.():e?.kind===`ready`&&r.onQuoteExpired?.())),t.kind===`failed`&&r.onQuoteFailed?.(t.failure),t.kind===`submitting`&&r.onDepositConfirmed?.())}function T(e,t,n){if(t.status!==`ready`&&t.status!==`stale`)return;let r=t.payload,i=n.events;if(i){if(r.kind===`pending`){e===null?i.onPendingSnapshotDetected?.(r):i.onProcessingProgress?.(r);return}if(r.kind===`succeeded`){i.onSucceeded?.(r);return}r.kind===`failed`&&i.onFailed?.(r)}}export{b as DepositDialog};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DepositDriver, DepositSnapshot } from "./types.js";
|
|
2
|
+
import * as _$react from "react";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/flows/deposit/driver/context.d.ts
|
|
7
|
+
declare const KitDriverContext: _$react.Context<DepositDriver | null>;
|
|
8
|
+
interface DepositDriverProviderProps {
|
|
9
|
+
driver: DepositDriver;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Publishes a {@link DepositDriver} into kit context. Mounted internally by `<KitProvider />` in
|
|
14
|
+
* `driver`-mode; tests can mount it directly to drive widgets against a mock driver without
|
|
15
|
+
* spinning up the full kit provider chain.
|
|
16
|
+
*/
|
|
17
|
+
declare function DepositDriverProvider({
|
|
18
|
+
driver,
|
|
19
|
+
children
|
|
20
|
+
}: DepositDriverProviderProps): _$react_jsx_runtime0.JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Reads the active {@link DepositDriver}. Throws when called outside `<DepositDriverProvider>` /
|
|
23
|
+
* `<KitProvider deposit={…}>`.
|
|
24
|
+
*/
|
|
25
|
+
declare function useDepositDriverInstance(): DepositDriver;
|
|
26
|
+
/**
|
|
27
|
+
* Subscribes the calling component to driver entity transitions and returns the live
|
|
28
|
+
* {@link DepositSnapshot}. Backed by `useSyncExternalStore` — re-renders are scheduled by the
|
|
29
|
+
* driver's `subscribe` listener.
|
|
30
|
+
*
|
|
31
|
+
* Wraps `subscribe` / `getSnapshot` in lambdas so the call resolves through the driver instance.
|
|
32
|
+
* Class-based BYO drivers would otherwise lose their `this` binding when React invokes the
|
|
33
|
+
* methods detached from the instance.
|
|
34
|
+
*/
|
|
35
|
+
declare function useDepositSnapshot(): DepositSnapshot;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { DepositDriverProvider, KitDriverContext, useDepositDriverInstance, useDepositSnapshot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e,use as t,useSyncExternalStore as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=e(null);i.displayName=`KitDriverContext`;function a({driver:e,children:t}){return r(i,{value:e,children:t})}function o(){let e=t(i);if(!e)throw Error("useDepositSnapshot must be used inside a `<StridgeProvider>` with `flows.deposit` enabled.");return e}function s(){let e=o();return n(t=>e.subscribe(t),()=>e.getSnapshot(),()=>e.getSnapshot())}export{a as DepositDriverProvider,i as KitDriverContext,o as useDepositDriverInstance,s as useDepositSnapshot};
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { SettlementFailureKind } from "../../../shared/driver/types.js";
|
|
2
|
+
import { FormattedField } from "../../../shared/format/types.js";
|
|
3
|
+
//#region src/flows/deposit/driver/payloads.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Host-supplied identity record for the connected wallet. Drivers receive this from the host
|
|
6
|
+
* (live driver: from wagmi or `<StridgeProvider userAddress>`; mock driver: from factory args)
|
|
7
|
+
* and pass it through {@link import("./transformers").walletAddressToWalletPayload} to produce
|
|
8
|
+
* the {@link WalletPayload}. The same shape sits in the entity envelope's `raw` and `response`
|
|
9
|
+
* slots so headless integrators reading the connected wallet see the unscaled inputs.
|
|
10
|
+
*/
|
|
11
|
+
interface WalletInfo {
|
|
12
|
+
/** Connected wallet hex address (full, unshortened). */
|
|
13
|
+
address: string;
|
|
14
|
+
/** EIP-155 chain id of the active network. */
|
|
15
|
+
chainId?: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Connected-wallet identity surfaced across kit chrome that needs `…<last 4>` truncation before
|
|
19
|
+
* any settlement exists — the deposit-method tile's title adornment, the amount-entry source
|
|
20
|
+
* pill, the confirm-deposit "Wallet (…<last 4>)" label, and the deposit-status banner's
|
|
21
|
+
* disconnected-state copy. Settlement-scoped wallet rows continue to read
|
|
22
|
+
* {@link SourceWalletPayload} (which carries the historical `sourceWallet` captured at submit
|
|
23
|
+
* time, distinct from the currently-connected EOA).
|
|
24
|
+
*
|
|
25
|
+
* Lifecycle is encoded by the entity envelope: `idle` when no wallet is connected, `ready` once
|
|
26
|
+
* the host has supplied an address. Components flip on `entity.status`; they never inspect a
|
|
27
|
+
* `connected` flag on the payload.
|
|
28
|
+
*/
|
|
29
|
+
interface WalletPayload {
|
|
30
|
+
/** Connected wallet hex address. `value` is the full hex, `formatted` is `0x…<last 4>`. */
|
|
31
|
+
address: FormattedField<string>;
|
|
32
|
+
/** EIP-155 chain id of the active network. */
|
|
33
|
+
chainId?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Aggregated USD balance across every routable source-side asset the wallet holds. Drivers
|
|
36
|
+
* compute the total as `sum(balances[i].amountUsd.value)` and pass it through `formatUsd`.
|
|
37
|
+
* Surfaced on the deposit-method picker's wallet tile (`$24.50 · Instant`) so the user sees
|
|
38
|
+
* what they have to deposit before entering the flow. Optional — the picker hides the meta
|
|
39
|
+
* line when this isn't available (e.g. before the first `balance/onchain` poll lands).
|
|
40
|
+
*/
|
|
41
|
+
balanceTotalUsd?: FormattedField<number>;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Brand context surfaced across the kit's chrome — `<DialogShell>` title, `<ConfirmDeposit>`
|
|
45
|
+
* destination row, `<ProcessingState>` header pill, `<SuccessState>` "credited to" line. The host
|
|
46
|
+
* may carry its own brand on `gateway/start`'s metadata; this entity exposes the canonical name +
|
|
47
|
+
* optional checkout-item title.
|
|
48
|
+
*/
|
|
49
|
+
interface BrandPayload {
|
|
50
|
+
/** Display name of the merchant / project receiving the deposit (e.g. `"Stridge ACME"`). */
|
|
51
|
+
name?: string;
|
|
52
|
+
/** Optional secondary line shown alongside the brand name on richer chrome (e.g. order title). */
|
|
53
|
+
checkoutItemTitle?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Shared chain-chrome subset reused across payloads that reference a network — picker rows,
|
|
57
|
+
* settled-on indicator, processing destination tile. Distinct field names from {@link AssetPayload}
|
|
58
|
+
* so payloads composing both (e.g. {@link TargetPayload}, {@link BalanceItemPayload}) keep chain
|
|
59
|
+
* and asset metadata cleanly separated.
|
|
60
|
+
*/
|
|
61
|
+
interface ChainPayload {
|
|
62
|
+
/**
|
|
63
|
+
* Stridge network id (string-encoded — e.g. `"60"` for Ethereum mainnet, `"9006"` for BSC).
|
|
64
|
+
* Optional because some upstream DTOs (deposit addresses) only carry the EIP-155 id.
|
|
65
|
+
*/
|
|
66
|
+
networkId?: string;
|
|
67
|
+
/** Human-readable network name (e.g. `"Ethereum"`, `"BSC"`). */
|
|
68
|
+
networkName: string;
|
|
69
|
+
/** EIP-155 chain id when applicable (numeric chain id as a string, e.g. `"1"`, `"56"`). */
|
|
70
|
+
eip155Id?: string;
|
|
71
|
+
/** Resolved chain icon URL (CDN-served by the kit's logo registry). */
|
|
72
|
+
chainLogoUrl?: string;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Shared asset-chrome subset — symbol + decimals + optional logo. Used inside settlement /
|
|
76
|
+
* balance / target payloads anywhere a token is referenced. Field names are distinct from
|
|
77
|
+
* {@link ChainPayload} so the two interfaces compose without name collision.
|
|
78
|
+
*/
|
|
79
|
+
interface AssetPayload {
|
|
80
|
+
/** Token symbol as displayed (e.g. `"USDC"`, `"BNB"`). */
|
|
81
|
+
symbol: string;
|
|
82
|
+
/** On-chain decimal precision (e.g. `6` for USDC on Ethereum, `18` for ETH). */
|
|
83
|
+
decimals: number;
|
|
84
|
+
/** ERC-20 contract address. Empty string for native assets. */
|
|
85
|
+
address: string;
|
|
86
|
+
/** Resolved token icon URL. */
|
|
87
|
+
assetLogoUrl?: string;
|
|
88
|
+
/** True for the chain's native gas token (e.g. ETH on Ethereum, BNB on BSC). */
|
|
89
|
+
isNative: boolean;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Settlement destination receive asset — the (network × asset) tuple the host configured at
|
|
93
|
+
* `<StridgeProvider />` mount. Drives the amount-entry "You receive" pill and the destination
|
|
94
|
+
* tile across the flow.
|
|
95
|
+
*/
|
|
96
|
+
interface TargetPayload extends ChainPayload, AssetPayload {
|
|
97
|
+
/** Optional minimum-deposit USD floor surfaced on amount-entry / asset-picker chrome. */
|
|
98
|
+
minDepositUsd?: FormattedField<number>;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Per-chain deposit address provisioned by `gateway/start`. The kit ships one envelope item per
|
|
102
|
+
* supported source chain; the user copies the address that matches the chain they intend to fund
|
|
103
|
+
* the deposit from.
|
|
104
|
+
*/
|
|
105
|
+
interface AddressItemPayload extends ChainPayload {
|
|
106
|
+
/** The deposit address for this chain. `value` is the full hex; `formatted` is `0x…tail`. */
|
|
107
|
+
address: FormattedField<string>;
|
|
108
|
+
/** Block-explorer URL for `address.value` (when the kit knows an explorer for this chain). */
|
|
109
|
+
explorerUrl?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Per-chain minimum-deposit USD floor surfaced next to the chain row in the transfer-crypto
|
|
112
|
+
* picker (`"Min $5"`). Drivers populate this from `supportedAssets`'s per-(chain × asset)
|
|
113
|
+
* floors so the user sees the right number for the chain they're funding from. Optional —
|
|
114
|
+
* the picker falls back to {@link TargetPayload.minDepositUsd} when this isn't available.
|
|
115
|
+
*/
|
|
116
|
+
minDepositUsd?: FormattedField<number>;
|
|
117
|
+
/**
|
|
118
|
+
* Tokens the gateway accepts on this chain (`gateway/start.deposit_addresses[i].accepted_assets`).
|
|
119
|
+
* Drives the transfer-crypto Tokens dropdown — when the user picks a chain, the dropdown
|
|
120
|
+
* narrows to that chain's accepted set (e.g. on Ethereum: ETH, TUSD, PAXG, DAI, PYUSD,
|
|
121
|
+
* USDC, WETH, USDT). Optional — drivers that haven't surfaced the accepted-asset list (or
|
|
122
|
+
* mock fixtures from before the feature shipped) leave it undefined and the widget falls
|
|
123
|
+
* back to the destination asset only.
|
|
124
|
+
*/
|
|
125
|
+
acceptedAssets?: ReadonlyArray<AcceptedAssetPayload>;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* One token the gateway accepts on a given source chain. Mirrors the shape of
|
|
129
|
+
* `gateway/start.deposit_addresses[i].accepted_assets[j]` after the driver transformer maps it
|
|
130
|
+
* through to the kit's display fields.
|
|
131
|
+
*/
|
|
132
|
+
interface AcceptedAssetPayload {
|
|
133
|
+
/** Token symbol as displayed (`"USDC"`, `"WETH"`, `"BNB"`). */
|
|
134
|
+
symbol: string;
|
|
135
|
+
/** ERC-20 contract address. Empty string for the chain's native token. */
|
|
136
|
+
address: string;
|
|
137
|
+
/** On-chain decimal precision. */
|
|
138
|
+
decimals: number;
|
|
139
|
+
/** Resolved token icon URL (passed through from the wire when present). */
|
|
140
|
+
assetLogoUrl?: string;
|
|
141
|
+
/** True for the chain's native gas token (synthesized from an empty `address`). */
|
|
142
|
+
isNative: boolean;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Source-side per-asset balance — what the connected wallet holds across supported chains. Drives
|
|
146
|
+
* the asset-picker rows in Path A (wallet flow).
|
|
147
|
+
*/
|
|
148
|
+
interface BalanceItemPayload extends ChainPayload, AssetPayload {
|
|
149
|
+
/** Wallet balance in display units (post-decimals). */
|
|
150
|
+
amount: FormattedField<number>;
|
|
151
|
+
/** USD value of `amount` at the most recent price snapshot. Omitted when no price is known. */
|
|
152
|
+
amountUsd?: FormattedField<number>;
|
|
153
|
+
/** Per-token unit price in USD at the most recent snapshot, kept raw for sorting / range checks. */
|
|
154
|
+
priceUsd?: number;
|
|
155
|
+
/**
|
|
156
|
+
* `true` when this row's USD value is below the kit's deposit floor
|
|
157
|
+
* ({@link TargetPayload.minDepositUsd}). Drives the muted "Low Balance" badge in the asset
|
|
158
|
+
* picker; the row remains visible so the user knows the asset exists in the wallet.
|
|
159
|
+
*/
|
|
160
|
+
lowBalance?: boolean;
|
|
161
|
+
/**
|
|
162
|
+
* `true` when the row should not be selectable. Independent of {@link lowBalance} — drivers
|
|
163
|
+
* may set both for sub-floor balances, or set just `disabled` for assets that are catalog-
|
|
164
|
+
* present but not currently routable.
|
|
165
|
+
*/
|
|
166
|
+
disabled?: boolean;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Discriminator for breakdown row "Selected route". The string identifies the routing protocol
|
|
170
|
+
* the gateway chose (e.g. LIFI + an underlying DEX); component code maps this to a logo + label.
|
|
171
|
+
*/
|
|
172
|
+
interface QuoteRoutePayload {
|
|
173
|
+
/** The bridge / aggregator the gateway selected (e.g. `"lifi"`). */
|
|
174
|
+
provider: string;
|
|
175
|
+
/** Routing scenario classification (e.g. `"same_chain_diff_token"`, `"cross_chain_diff_token"`). */
|
|
176
|
+
scenario: string;
|
|
177
|
+
/** Human-readable label the route row renders (e.g. `"LIFI · SushiSwap"`). */
|
|
178
|
+
label: string;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Quote breakdown rows — the four optional rows displayed on the confirm-deposit panel. Each
|
|
182
|
+
* field is independently optional so the row hides when the gateway didn't surface that detail.
|
|
183
|
+
*/
|
|
184
|
+
interface QuoteBreakdownPayload {
|
|
185
|
+
/** Selected routing provider + label, when known. */
|
|
186
|
+
selectedRoute?: QuoteRoutePayload;
|
|
187
|
+
/** Estimated network cost in USD. */
|
|
188
|
+
networkCost?: FormattedField<number>;
|
|
189
|
+
/** Price impact in percent units (`0.21` means `0.21%`). */
|
|
190
|
+
priceImpact?: FormattedField<number>;
|
|
191
|
+
/**
|
|
192
|
+
* Maximum acceptable slippage. `auto` is `true` when the gateway picked it automatically; the
|
|
193
|
+
* widget renders `"Auto · 0.50%"` instead of just `"0.50%"` in that case.
|
|
194
|
+
*/
|
|
195
|
+
maxSlippage?: {
|
|
196
|
+
auto: boolean;
|
|
197
|
+
value: FormattedField<number>;
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Quote payload — the formatted result of a `requestQuote` round-trip. Drives the confirm-deposit
|
|
202
|
+
* widget's hero amount, transfer summary, and breakdown rows.
|
|
203
|
+
*/
|
|
204
|
+
interface QuotePayload {
|
|
205
|
+
/** Hero USD amount displayed at the top of the confirm-deposit panel. */
|
|
206
|
+
heroAmountUsd: FormattedField<number>;
|
|
207
|
+
/** Source-side asset the user is sending — carries chain chrome too so the widget renders the network pill without reaching back into `target`. */
|
|
208
|
+
sendAsset: AssetPayload & ChainPayload & {
|
|
209
|
+
chainId: number;
|
|
210
|
+
};
|
|
211
|
+
/** Send amount in display units. */
|
|
212
|
+
sendAmount: FormattedField<number>;
|
|
213
|
+
/** Destination-side asset the user is receiving — see {@link sendAsset} for the chain-chrome rationale. */
|
|
214
|
+
receiveAsset: AssetPayload & ChainPayload & {
|
|
215
|
+
chainId: number;
|
|
216
|
+
};
|
|
217
|
+
/** Receive amount in display units (after fees / route conversion). */
|
|
218
|
+
receiveAmount: FormattedField<number>;
|
|
219
|
+
/**
|
|
220
|
+
* Total seconds the quote window starts at — used to draw the confirm-deposit timer ring.
|
|
221
|
+
* Defaults to `30` when the gateway does not surface a per-quote freshness window.
|
|
222
|
+
*/
|
|
223
|
+
quoteTotalSeconds: number;
|
|
224
|
+
/** Unix-ms timestamp at which the quote expires and the entity transitions to `stale`. */
|
|
225
|
+
expiresAt: number;
|
|
226
|
+
/**
|
|
227
|
+
* Estimated total settlement time in seconds (`route.estimated_time_seconds` from the wire).
|
|
228
|
+
* Drives the confirm-deposit "Estimated time" row — `< 1 min`, `2 min`, `~ 5 min`, etc. The
|
|
229
|
+
* raw seconds are kept so widgets can format them locally with the kit's
|
|
230
|
+
* {@link import("#/shared/format").formatDurationCoarse} helper.
|
|
231
|
+
*/
|
|
232
|
+
etaSeconds: number;
|
|
233
|
+
/** Optional breakdown rows (route, network cost, price impact, slippage). */
|
|
234
|
+
breakdown?: QuoteBreakdownPayload;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Source-wallet pill rendered on every receipt row that references the EOA the deposit came
|
|
238
|
+
* from. `name` is the localized affordance label the widget chooses (e.g. `"Wallet"`); `address`
|
|
239
|
+
* carries both the hex value (for explorer hrefs) and the truncated display form.
|
|
240
|
+
*/
|
|
241
|
+
interface SourceWalletPayload {
|
|
242
|
+
/** Optional display label (e.g. `"Wallet"`). When omitted the widget renders the address only. */
|
|
243
|
+
name?: string;
|
|
244
|
+
/** Wallet hex address. */
|
|
245
|
+
address: FormattedField<string>;
|
|
246
|
+
/** Block-explorer URL for `address.value`, when known. */
|
|
247
|
+
explorerUrl?: string;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Pending variant — a settlement has been observed but has not yet reached a terminal verdict.
|
|
251
|
+
* Drives `<ProcessingState>` and `<DepositStatusBanner>` "in-flight" rendering.
|
|
252
|
+
*/
|
|
253
|
+
interface SettlementPendingPayload {
|
|
254
|
+
kind: "pending";
|
|
255
|
+
sourceWallet: SourceWalletPayload;
|
|
256
|
+
creditedAsset: AssetPayload;
|
|
257
|
+
/** Brand label or destination address the deposit credits to. */
|
|
258
|
+
creditedTo: string;
|
|
259
|
+
/** Source-chain deposit tx hash, populated as soon as the indexer records `from.confirmed_at`. */
|
|
260
|
+
txHash?: FormattedField<string>;
|
|
261
|
+
/** Block-explorer URL for `txHash.value`. */
|
|
262
|
+
txExplorerUrl?: string;
|
|
263
|
+
/** Unix-ms timestamp the tx was detected on the source chain. */
|
|
264
|
+
detectedAt?: FormattedField<number>;
|
|
265
|
+
/**
|
|
266
|
+
* Unix-ms when the order was submitted to the gateway. Populates the "Order submitted" row on
|
|
267
|
+
* `<ProcessingState>` and the expanded `<DepositStatusBanner>`. Falls back to the settlement
|
|
268
|
+
* record's `created_at` when the indexer has not yet surfaced the source-chain confirmation.
|
|
269
|
+
*/
|
|
270
|
+
submittedAt: FormattedField<number>;
|
|
271
|
+
/** Quoted receive amount captured at submit time, displayed during the pending window. */
|
|
272
|
+
receiveAmount: FormattedField<number>;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Succeeded variant — a settlement has reached the `completed` terminal verdict. Drives
|
|
276
|
+
* `<SuccessState>` and the success copy on `<DepositStatusBanner>`.
|
|
277
|
+
*/
|
|
278
|
+
interface SettlementSuccessPayload {
|
|
279
|
+
kind: "succeeded";
|
|
280
|
+
sourceWallet: SourceWalletPayload;
|
|
281
|
+
/** Destination receive descriptor — brand label + destination address. */
|
|
282
|
+
destination: {
|
|
283
|
+
name?: string;
|
|
284
|
+
address: FormattedField<string>;
|
|
285
|
+
};
|
|
286
|
+
creditedAsset: AssetPayload;
|
|
287
|
+
/** Final receive amount in display units. */
|
|
288
|
+
receiveAmount: FormattedField<number>;
|
|
289
|
+
/** Per-hop route metadata as a list of `(provider, chainId)` pairs the success widget renders. */
|
|
290
|
+
routeHops: ReadonlyArray<{
|
|
291
|
+
provider: string;
|
|
292
|
+
chainId: number;
|
|
293
|
+
}>;
|
|
294
|
+
/** Total time from submit to terminal verdict (formatted via {@link formatDurationCompact}). */
|
|
295
|
+
totalTime: FormattedField<number>;
|
|
296
|
+
/** Optional aggregator-provided explorer URL for the settlement (e.g. LIFI / Sushiswap link). */
|
|
297
|
+
aggregatorExplorerUrl?: string;
|
|
298
|
+
/** Source-chain deposit tx — what the user broadcast. */
|
|
299
|
+
depositTx: {
|
|
300
|
+
hash: FormattedField<string>;
|
|
301
|
+
explorerUrl?: string;
|
|
302
|
+
};
|
|
303
|
+
/** Destination-chain completion tx — populated once the bridge submits the receive leg. */
|
|
304
|
+
completionTx?: {
|
|
305
|
+
hash: FormattedField<string>;
|
|
306
|
+
explorerUrl?: string;
|
|
307
|
+
};
|
|
308
|
+
/** Unix-ms when the deposit was submitted. */
|
|
309
|
+
submittedAt: FormattedField<number>;
|
|
310
|
+
/** Unix-ms when the settlement reached `completed`. */
|
|
311
|
+
filledAt: FormattedField<number>;
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Failed variant — a settlement reached the `failed` terminal verdict (often after retries).
|
|
315
|
+
* Drives `<ErrorState>` and the failure copy on `<DepositStatusBanner>`.
|
|
316
|
+
*/
|
|
317
|
+
interface SettlementFailurePayload {
|
|
318
|
+
kind: "failed";
|
|
319
|
+
/**
|
|
320
|
+
* Stable failure classification. The widget translates this into localized headline + reason
|
|
321
|
+
* copy via `useT()` — the driver does not emit free-text strings here.
|
|
322
|
+
*/
|
|
323
|
+
failureKind: SettlementFailureKind;
|
|
324
|
+
sourceWallet: SourceWalletPayload;
|
|
325
|
+
destination: {
|
|
326
|
+
name?: string;
|
|
327
|
+
address: FormattedField<string>;
|
|
328
|
+
};
|
|
329
|
+
creditedAsset: AssetPayload;
|
|
330
|
+
receiveAmount: FormattedField<number>;
|
|
331
|
+
txHash: FormattedField<string>;
|
|
332
|
+
txExplorerUrl?: string;
|
|
333
|
+
submittedAt: FormattedField<number>;
|
|
334
|
+
failedAt: FormattedField<number>;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Discriminated union for the settlement entity. The same envelope drives `<ProcessingState>`
|
|
338
|
+
* (when `kind === "pending"`), `<SuccessState>` (`"succeeded"`), and `<ErrorState>` (`"failed"`).
|
|
339
|
+
*/
|
|
340
|
+
type SettlementPayload = SettlementPendingPayload | SettlementSuccessPayload | SettlementFailurePayload;
|
|
341
|
+
//#endregion
|
|
342
|
+
export { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parseDecimalSafe as e}from"../../../shared/transformers/parseSmallestUnit.js";import{formatTokenAmount as t}from"../../../../shared/format/formatTokenAmount.js";import{formatUsd as n}from"../../../../shared/format/formatUsd.js";function r(e){let t=new Set,n=new Set;for(let r of e.assets){let e=String(r.eip155_id);t.add(e);for(let t of r.assets)t.address&&n.add(`${e}:${t.address.toLowerCase()}`)}return{nativeChains:t,tokens:n}}function i(e,t){let n=t.routable!==void 0&&(t.routable.nativeChains.size>0||t.routable.tokens.size>0),r=[];for(let i of e.chains)for(let e of i.tokens)e.is_spam||n&&t.routable&&!o(i.eip155_id,e,t.routable)||r.push(a(i.label,i.eip155_id,i.stridge_network_id,e,t));return r.sort(s),r}function a(r,i,a,o,s){let c=e(o.amount),l=e(o.amount_usd),u=e(o.usd_price),d=s.resolveTokenIcon?.({chainId:i,tokenAddress:o.token_address,symbol:o.symbol,isNative:o.is_native})??s.logos?.(i,o.token_address,o.is_native)??o.logo??void 0,f=s.minDepositUsd!==void 0&&s.minDepositUsd>0&&l<s.minDepositUsd;return{networkId:a,networkName:r,eip155Id:String(i),symbol:o.symbol,decimals:o.decimals,address:o.token_address||`0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee`,isNative:o.is_native,...d?{assetLogoUrl:d}:{},amount:{value:c,formatted:t(c,s.i18n,{compact:!0})},...l>0?{amountUsd:{value:l,formatted:n(l,s.i18n)}}:{},...u>0?{priceUsd:u}:{},...f?{lowBalance:!0,disabled:!0}:{}}}function o(e,t,n){let r=String(e);return t.is_native?n.nativeChains.has(r):t.token_address?n.tokens.has(`${r}:${t.token_address.toLowerCase()}`):!1}function s(e,t){return(t.amountUsd?.value??0)-(e.amountUsd?.value??0)}export{i as balanceToBalancesPayload,r as buildRoutableAllowlist};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{computeQuoteAttrs as e,formatRouteLabel as t}from"../../../shared/transformers/computeQuoteAttrs.js";import{formatNetworkName as n}from"../../../../shared/format/formatNetworkName.js";import{formatPercent as r}from"../../../../shared/format/formatPercent.js";import{formatTokenAmount as i}from"../../../../shared/format/formatTokenAmount.js";import{formatUsd as a}from"../../../../shared/format/formatUsd.js";function o(o,s){let c=e(o,{sourceAmount:s.sourceAmount,sendDecimals:s.sendSide.decimals,sendSymbol:s.sendSide.symbol,receiveDecimals:s.receiveSide.decimals,receiveSymbol:s.receiveSide.symbol,...s.sendPriceUsd===void 0?{}:{sendPriceUsd:s.sendPriceUsd},...s.receivePriceUsd===void 0?{}:{receivePriceUsd:s.receivePriceUsd},now:s.now}),l=c.sendAmountUsd??s.sourceAmount,u={};o.route.provider&&(u.selectedRoute={provider:o.route.provider,scenario:o.route.scenario??``,label:t(o.route.provider,o.route.scenario)}),c.networkCostUsd!==void 0&&(u.networkCost={value:c.networkCostUsd,formatted:a(c.networkCostUsd,s.i18n)}),c.priceImpactPercent!==void 0&&(u.priceImpact={value:c.priceImpactPercent,formatted:r(c.priceImpactPercent,s.i18n)});let d={...s.sendSide,networkName:n(s.sendSide.networkName)},f={...s.receiveSide,networkName:n(s.receiveSide.networkName)};return{heroAmountUsd:{value:l,formatted:a(l,s.i18n)},sendAsset:d,sendAmount:{value:s.sourceAmount,formatted:i(s.sourceAmount,s.i18n,{maxDecimals:s.sendSide.decimals})},receiveAsset:f,receiveAmount:{value:c.receiveAmount,formatted:i(c.receiveAmount,s.i18n,{maxDecimals:s.receiveSide.decimals})},quoteTotalSeconds:30,expiresAt:Math.min(c.expiresAt,s.now+30*1e3),etaSeconds:c.etaSeconds,...Object.keys(u).length>0?{breakdown:u}:{}}}export{o as quoteToPayload};
|