@stridge/kit 0.1.0-alpha.6 → 0.1.0-alpha.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -6
- package/dist/KitProvider.d.ts +40 -0
- package/dist/KitProvider.js +1 -1
- package/dist/_internal/activity/driver/index.d.ts +3 -0
- package/dist/_internal/activity/driver/index.js +1 -0
- package/dist/_internal/deposit/driver/index.d.ts +3 -3
- package/dist/_internal/drivers/stridge/index.d.ts +4 -2
- package/dist/_internal/drivers/stridge/index.js +1 -1
- package/dist/_internal/drivers/stridge-mock/index.d.ts +4 -2
- package/dist/_internal/drivers/stridge-mock/index.js +1 -1
- package/dist/_internal/withdraw/driver/index.d.ts +2 -2
- package/dist/activity/compound/index.d.ts +19 -0
- package/dist/activity/compound/index.js +1 -0
- package/dist/activity/dialog/index.d.ts +4 -0
- package/dist/activity/dialog/index.js +1 -0
- package/dist/activity/widgets/index.d.ts +5 -0
- package/dist/activity/widgets/index.js +1 -0
- package/dist/deposit/compound/index.d.ts +25 -15
- package/dist/deposit/compound/index.js +1 -1
- package/dist/deposit/dialog/index.d.ts +2 -1
- package/dist/deposit/widgets/index.d.ts +17 -0
- package/dist/deposit/widgets/index.js +1 -0
- package/dist/drivers/stridge/catalog.d.ts +54 -0
- package/dist/drivers/stridge/catalog.js +1 -0
- package/dist/drivers/stridge/createStridgeActivityDriver.d.ts +44 -0
- package/dist/drivers/stridge/createStridgeActivityDriver.js +1 -0
- package/dist/drivers/stridge/createStridgeDepositDriver.d.ts +10 -1
- package/dist/drivers/stridge/createStridgeDepositDriver.js +1 -1
- package/dist/drivers/stridge/createStridgeWithdrawDriver.d.ts +37 -14
- package/dist/drivers/stridge/createStridgeWithdrawDriver.js +1 -1
- package/dist/drivers/stridge/internal/ensureWalletChain.js +1 -0
- package/dist/drivers/stridge/internal/pollOnce.js +1 -1
- package/dist/drivers/stridge/internal/resolveAddEthereumChain.js +1 -0
- package/dist/drivers/stridge/internal/retry.js +1 -0
- package/dist/drivers/stridge/internal/supportedChains.js +1 -0
- package/dist/drivers/stridge/types.d.ts +20 -14
- package/dist/drivers/stridge/types.js +1 -1
- package/dist/drivers/stridge/wagmiSigner.js +1 -1
- package/dist/drivers/stridge-mock/checkoutChannel.d.ts +31 -0
- package/dist/drivers/stridge-mock/checkoutChannel.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.d.ts +44 -0
- package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +30 -2
- package/dist/drivers/stridge-mock/createStridgeMockDriver.js +1 -1
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.d.ts +15 -3
- package/dist/drivers/stridge-mock/createStridgeMockWithdrawDriver.js +1 -1
- package/dist/drivers/stridge-mock/fixtures.d.ts +19 -13
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- package/dist/drivers/stridge-mock/triggers.d.ts +12 -0
- package/dist/events/bus/createBus.d.ts +26 -0
- package/dist/events/bus/createBus.js +1 -0
- package/dist/events/bus/flowIdRegistry.d.ts +17 -0
- package/dist/events/bus/flowIdRegistry.js +1 -0
- package/dist/events/bus/index.js +1 -0
- package/dist/events/bus/metadata.js +1 -0
- package/dist/events/context.js +1 -0
- package/dist/events/emit/index.js +1 -0
- package/dist/events/emit/mapFailure.js +1 -0
- package/dist/events/emit/useActivityEmissions.js +1 -0
- package/dist/events/emit/useDepositEmissions.js +1 -0
- package/dist/events/emit/useKitEmitter.js +1 -0
- package/dist/events/emit/useWithdrawEmissions.js +1 -0
- package/dist/events/hooks/index.d.ts +6 -0
- package/dist/events/hooks/index.js +1 -0
- package/dist/events/hooks/useCurrentFlowId.d.ts +6 -0
- package/dist/events/hooks/useCurrentFlowId.js +1 -0
- package/dist/events/hooks/useStableHandler.js +1 -0
- package/dist/events/hooks/useStridgeEvent.d.ts +9 -0
- package/dist/events/hooks/useStridgeEvent.js +1 -0
- package/dist/events/hooks/useStridgeEventBus.d.ts +34 -0
- package/dist/events/hooks/useStridgeEventBus.js +1 -0
- package/dist/events/hooks/useStridgeEvents.d.ts +7 -0
- package/dist/events/hooks/useStridgeEvents.js +1 -0
- package/dist/events/hooks/useStridgeFlowEvent.d.ts +8 -0
- package/dist/events/hooks/useStridgeFlowEvent.js +1 -0
- package/dist/events/hooks/useStridgeFlowEvents.d.ts +6 -0
- package/dist/events/hooks/useStridgeFlowEvents.js +1 -0
- package/dist/events/index.d.ts +17 -0
- package/dist/events/index.js +1 -0
- package/dist/events/publish.js +1 -0
- package/dist/events/redact.d.ts +34 -0
- package/dist/events/redact.js +1 -0
- package/dist/events/types/activity.d.ts +53 -0
- package/dist/events/types/deposit.d.ts +235 -0
- package/dist/events/types/envelope.d.ts +145 -0
- package/dist/events/types/index.d.ts +32 -0
- package/dist/events/types/kit.d.ts +23 -0
- package/dist/events/types/withdraw.d.ts +150 -0
- package/dist/flows/activity/compound/ActivityFlow.d.ts +46 -0
- package/dist/flows/activity/compound/ActivityFlow.js +1 -0
- package/dist/flows/activity/compound/components/Boundary.d.ts +29 -0
- package/dist/flows/activity/compound/components/Boundary.js +1 -0
- package/dist/flows/activity/compound/components/Steps.d.ts +24 -0
- package/dist/flows/activity/compound/components/Steps.js +1 -0
- package/dist/flows/activity/dialog/ActivityDialog.d.ts +55 -0
- package/dist/flows/activity/dialog/ActivityDialog.js +1 -0
- package/dist/flows/activity/dialog/ActivityFlowBoundary.d.ts +1 -0
- package/dist/flows/activity/dialog/ActivityFlowBoundary.js +1 -0
- package/dist/flows/activity/driver/context.d.ts +38 -0
- package/dist/flows/activity/driver/context.js +1 -0
- package/dist/flows/activity/driver/types.d.ts +58 -0
- package/dist/flows/activity/orchestrator/controller.d.ts +11 -0
- package/dist/flows/activity/orchestrator/controller.js +1 -0
- package/dist/flows/activity/orchestrator/index.d.ts +4 -0
- package/dist/flows/activity/orchestrator/index.js +1 -0
- package/dist/flows/activity/orchestrator/reducer.d.ts +1 -0
- package/dist/flows/activity/orchestrator/reducer.js +1 -0
- package/dist/flows/activity/orchestrator/types.d.ts +71 -0
- package/dist/flows/activity/orchestrator/useActivity.d.ts +94 -0
- package/dist/flows/activity/orchestrator/useActivity.js +1 -0
- package/dist/flows/activity/widgets/ActivityDetail.d.ts +41 -0
- package/dist/flows/activity/widgets/ActivityDetail.js +1 -0
- package/dist/flows/activity/widgets/ActivityList.d.ts +38 -0
- package/dist/flows/activity/widgets/ActivityList.js +1 -0
- package/dist/flows/activity/widgets/useStandaloneActivitySource.js +1 -0
- package/dist/flows/deposit/dialog/DepositBootstrapErrorState.js +1 -1
- package/dist/flows/deposit/dialog/DepositDialog.d.ts +26 -79
- package/dist/flows/deposit/dialog/DepositDialog.js +1 -1
- package/dist/flows/deposit/dialog/WalletRequiredState.js +1 -0
- package/dist/flows/deposit/dialog/WalletRequiredState.styles.js +1 -0
- package/dist/flows/deposit/driver/payloads.d.ts +109 -5
- package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/balanceToBalancesPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/index.d.ts +1 -0
- package/dist/flows/deposit/driver/transformers/quoteToPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/settlementToPayload.d.ts +25 -0
- package/dist/flows/deposit/driver/transformers/settlementToPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/startToAddressesPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/startToAddressesPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/startToBrandPayload.d.ts +1 -0
- package/dist/flows/deposit/driver/transformers/startToTargetPayload.d.ts +2 -0
- package/dist/flows/deposit/driver/transformers/startToTargetPayload.js +1 -1
- package/dist/flows/deposit/driver/transformers/walletAddressToWalletPayload.d.ts +1 -0
- package/dist/flows/deposit/driver/types.d.ts +92 -5
- package/dist/flows/deposit/orchestrator/controller.js +1 -1
- package/dist/flows/deposit/orchestrator/index.d.ts +5 -0
- package/dist/flows/deposit/orchestrator/reducer.d.ts +1 -0
- package/dist/flows/deposit/orchestrator/reducer.js +1 -1
- package/dist/flows/deposit/orchestrator/types.d.ts +276 -12
- package/dist/flows/deposit/orchestrator/useDeposit.d.ts +45 -1
- package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
- package/dist/flows/deposit/shared/checkoutPopup.js +1 -0
- package/dist/flows/deposit/shared/onramp.js +1 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityDetail.d.ts +40 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityDetail.js +1 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityList.d.ts +38 -0
- package/dist/flows/deposit/widgets/activity/DepositActivityList.js +1 -0
- package/dist/flows/deposit/widgets/activity/index.d.ts +2 -0
- package/dist/flows/deposit/widgets/activity/index.js +1 -0
- package/dist/flows/deposit/widgets/activity/useDepositActivitySource.js +1 -0
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.d.ts +32 -5
- package/dist/flows/deposit/widgets/amount-entry/AmountEntry.js +1 -1
- package/dist/flows/deposit/widgets/amount-entry/footerIntent.js +1 -0
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.d.ts +24 -4
- package/dist/flows/deposit/widgets/asset-picker/AssetPicker.js +1 -1
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.d.ts +37 -4
- package/dist/flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/Deposit.d.ts +39 -4
- package/dist/flows/deposit/widgets/deposit/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.d.ts +58 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.d.ts +6 -0
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.slots.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/Deposit.styles.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.d.ts +29 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Boundary.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Guards.d.ts +28 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Guards.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.d.ts +11 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Header.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.d.ts +7 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Method.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/MethodSection.d.ts +40 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/MethodSection.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.d.ts +15 -9
- package/dist/flows/deposit/widgets/deposit/compound/components/Methods.js +1 -1
- package/dist/flows/deposit/widgets/deposit/compound/components/Rail.d.ts +18 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Rail.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.d.ts +43 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/RailPicker.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Steps.d.ts +24 -0
- package/dist/flows/deposit/widgets/deposit/compound/components/Steps.js +1 -0
- package/dist/flows/deposit/widgets/deposit/compound/index.d.ts +2 -1
- package/dist/flows/deposit/widgets/deposit/compound/types.d.ts +106 -4
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.d.ts +41 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/Hero.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/components/PrimaryAction.js +1 -1
- package/dist/flows/deposit/widgets/deposit-status-banner/compound/types.d.ts +5 -5
- package/dist/flows/deposit/widgets/error-state/ErrorState.d.ts +39 -4
- package/dist/flows/deposit/widgets/error-state/ErrorState.js +1 -1
- package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.d.ts +64 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/OnrampAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.d.ts +62 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/OnrampAmountEntry.styles.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.d.ts +13 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/HeroLabel.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/components/ReceiveChip.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/compound/types.d.ts +29 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-amount-entry/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.d.ts +50 -0
- package/dist/flows/deposit/widgets/onramp-confirm/OnrampConfirm.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.d.ts +42 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.d.ts +24 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/OnrampConfirm.styles.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.d.ts +16 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Body.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.d.ts +15 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.d.ts +15 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/components/Summary.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/context.d.ts +25 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/index.d.ts +4 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/compound/types.d.ts +62 -0
- package/dist/flows/deposit/widgets/onramp-confirm/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-confirm/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.d.ts +48 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/OnrampPaymentPending.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.d.ts +63 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.d.ts +14 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/OnrampPaymentPending.slots.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.d.ts +11 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/components/ReopenButton.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.d.ts +2 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/onramp-payment-pending/index.js +1 -0
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.d.ts +30 -4
- package/dist/flows/deposit/widgets/processing-state/ProcessingState.js +1 -1
- package/dist/flows/deposit/widgets/success-state/SuccessState.d.ts +38 -4
- package/dist/flows/deposit/widgets/success-state/SuccessState.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.d.ts +34 -3
- package/dist/flows/deposit/widgets/transfer-crypto/TransferCrypto.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.d.ts +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.styles.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Address.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.d.ts +5 -2
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Disclosure.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.d.ts +6 -0
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/Header.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.d.ts +4 -10
- package/dist/flows/deposit/widgets/transfer-crypto/compound/components/QrCode.js +1 -1
- package/dist/flows/deposit/widgets/transfer-crypto/compound/types.d.ts +16 -2
- package/dist/flows/shared/transformers/computeQuoteAttrs.d.ts +1 -0
- package/dist/flows/shared/transformers/index.d.ts +1 -0
- package/dist/flows/shared/transformers/pickRelevantSettlement.d.ts +1 -0
- package/dist/flows/shared/transformers/pickRelevantSettlement.js +1 -1
- package/dist/flows/shared/transformers/testnets.js +1 -0
- package/dist/flows/withdraw/bindings/WithdrawBindings.d.ts +92 -0
- package/dist/flows/withdraw/bindings/WithdrawBindings.js +1 -0
- package/dist/flows/withdraw/bindings/index.d.ts +1 -0
- package/dist/flows/withdraw/bindings/index.js +1 -0
- package/dist/flows/withdraw/dialog/WithdrawDialog.d.ts +44 -71
- package/dist/flows/withdraw/dialog/WithdrawDialog.js +1 -1
- package/dist/flows/withdraw/driver/dto.d.ts +8 -7
- package/dist/flows/withdraw/driver/payloads.d.ts +16 -1
- package/dist/flows/withdraw/driver/transformers/settlementToWithdrawalPayload.js +1 -1
- package/dist/flows/withdraw/driver/transformers/supportedAssetsToReceiveOptionsPayload.js +1 -1
- package/dist/flows/withdraw/driver/types.d.ts +77 -14
- package/dist/flows/withdraw/orchestrator/controller.js +1 -1
- package/dist/flows/withdraw/orchestrator/index.d.ts +1 -1
- package/dist/flows/withdraw/orchestrator/reducer.js +1 -1
- package/dist/flows/withdraw/orchestrator/types.d.ts +218 -35
- package/dist/flows/withdraw/orchestrator/useWithdraw.d.ts +36 -1
- package/dist/flows/withdraw/orchestrator/useWithdraw.js +1 -1
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.d.ts +39 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityDetail.js +1 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.d.ts +36 -0
- package/dist/flows/withdraw/widgets/activity/WithdrawActivityList.js +1 -0
- package/dist/flows/withdraw/widgets/activity/index.d.ts +2 -0
- package/dist/flows/withdraw/widgets/activity/index.js +1 -0
- package/dist/flows/withdraw/widgets/activity/useWithdrawActivitySource.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.d.ts +60 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.d.ts +13 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/Withdraw.slots.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.d.ts +29 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Boundary.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.d.ts +25 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Guards.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.d.ts +27 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/components/Steps.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/index.d.ts +3 -0
- package/dist/flows/withdraw/widgets/withdraw/compound/index.js +1 -0
- package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.d.ts +45 -2
- package/dist/flows/withdraw/widgets/withdraw-error/WithdrawError.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.d.ts +32 -12
- package/dist/flows/withdraw/widgets/withdraw-form/WithdrawForm.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/WithdrawForm.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Body.d.ts +7 -6
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.d.ts +6 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/Header.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.d.ts +7 -5
- package/dist/flows/withdraw/widgets/withdraw-form/compound/components/RecipientField.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-form/compound/types.d.ts +15 -5
- package/dist/flows/withdraw/widgets/withdraw-form/validation.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.d.ts +39 -3
- package/dist/flows/withdraw/widgets/withdraw-in-progress/WithdrawInProgress.js +1 -1
- package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.d.ts +46 -2
- package/dist/flows/withdraw/widgets/withdraw-success/WithdrawSuccess.js +1 -1
- package/dist/format/index.d.ts +2 -1
- package/dist/format/index.js +1 -1
- package/dist/i18n/index.d.ts +5 -4
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/locales/ar.js +1 -1
- package/dist/i18n/locales/es.js +1 -1
- package/dist/i18n/locales/source-keys.d.ts +12 -0
- package/dist/i18n/locales/source-keys.js +0 -0
- package/dist/icons/index.d.ts +5 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +35 -11
- package/dist/index.js +1 -1
- package/dist/package.js +1 -1
- package/dist/scope/KitPortalScope.js +1 -1
- package/dist/scope/KitScope.d.ts +27 -1
- package/dist/scope/KitScope.js +1 -1
- package/dist/scope/context.d.ts +24 -1
- package/dist/scope/index.d.ts +1 -1
- package/dist/shared/attribution/Attribution.js +1 -0
- package/dist/shared/attribution/Attribution.slots.js +1 -0
- package/dist/shared/attribution/Attribution.styles.js +1 -0
- package/dist/shared/attribution/index.js +1 -0
- package/dist/shared/chains/index.d.ts +48 -29
- package/dist/shared/chains/index.js +1 -1
- package/dist/shared/constants/brand-intercom.js +1 -0
- package/dist/shared/cuer/Cuer.js +1 -1
- package/dist/shared/dialog/DialogShell.d.ts +21 -6
- package/dist/shared/dialog/DialogShell.js +1 -1
- package/dist/shared/dialog/Frame.js +1 -1
- package/dist/shared/dialog/LoadingState.js +1 -0
- package/dist/shared/dialog/LoadingState.styles.js +1 -0
- package/dist/shared/dialog/StepTransition.js +1 -1
- package/dist/shared/dialog/useDirectionalChevronTransform.js +1 -1
- package/dist/shared/driver/types.d.ts +4 -3
- package/dist/shared/format/formatSmartRelative.d.ts +25 -0
- package/dist/shared/format/formatSmartRelative.js +1 -0
- package/dist/shared/format/formatUsd.js +1 -1
- package/dist/shared/i18n/KitI18nProvider.d.ts +11 -8
- package/dist/shared/i18n/KitI18nProvider.js +1 -1
- package/dist/shared/i18n/createKitI18n.d.ts +79 -16
- package/dist/shared/i18n/createKitI18n.js +1 -1
- package/dist/shared/i18n/useLingui.d.ts +11 -3
- package/dist/shared/icons/ActivityIcon.d.ts +12 -0
- package/dist/shared/icons/ActivityIcon.js +1 -0
- package/dist/shared/icons/BitcoinIcon.d.ts +14 -0
- package/dist/shared/icons/BitcoinIcon.js +1 -0
- package/dist/shared/icons/CardIcon.d.ts +16 -0
- package/dist/shared/icons/CardIcon.js +1 -0
- package/dist/shared/icons/LogoIcon.d.ts +13 -0
- package/dist/shared/icons/LogoIcon.js +1 -0
- package/dist/shared/merchant-link/MerchantLink.d.ts +1 -0
- package/dist/shared/merchant-link/MerchantLink.js +1 -0
- package/dist/shared/merchant-link/MerchantLinkButton.d.ts +1 -0
- package/dist/shared/merchant-link/MerchantLinkButton.js +1 -0
- package/dist/shared/merchant-link/index.d.ts +1 -0
- package/dist/shared/merchant-link/index.js +1 -0
- package/dist/shared/merchant-link/resolveMerchantLink.js +1 -0
- package/dist/shared/orchestrator/activityOpenInput.d.ts +21 -0
- package/dist/shared/orchestrator/createActivityReducers.js +1 -0
- package/dist/shared/orchestrator/index.d.ts +2 -0
- package/dist/shared/orchestrator/index.js +1 -1
- package/dist/shared/orchestrator/resolveActivityEntry.d.ts +1 -0
- package/dist/shared/orchestrator/resolveActivityEntry.js +1 -0
- package/dist/shared/orchestrator/toFailure.js +1 -1
- package/dist/shared/orchestrator/types.d.ts +8 -0
- package/dist/shared/orchestrator/useOnrampSessionWatcher.js +1 -0
- package/dist/shared/orchestrator/useSettlementWatcher.js +1 -1
- package/dist/shared/presentation/index.js +1 -0
- package/dist/shared/presentation/types.d.ts +30 -0
- package/dist/shared/presentation/types.js +1 -0
- package/dist/shared/presentation/useResolvedSurfaceKind.js +1 -0
- package/dist/shared/primitives/TxHashValue/TxHashValue.js +1 -1
- package/dist/shared/support/SupportConfigContext.d.ts +1 -0
- package/dist/shared/support/SupportConfigContext.js +1 -0
- package/dist/shared/support/SupportLink.d.ts +1 -0
- package/dist/shared/support/SupportLink.js +1 -0
- package/dist/shared/support/SupportSpinner.d.ts +1 -0
- package/dist/shared/support/SupportSpinner.js +1 -0
- package/dist/shared/support/index.d.ts +2 -0
- package/dist/shared/support/index.js +1 -0
- package/dist/shared/support/intercom-loader.d.ts +17 -0
- package/dist/shared/support/intercom-loader.js +1 -0
- package/dist/shared/support/types.d.ts +43 -0
- package/dist/shared/support/useIntercomMerchantContext.d.ts +27 -0
- package/dist/shared/support/useIntercomMerchantContext.js +1 -0
- package/dist/shared/support/useIntercomShutdownOnUnmount.js +1 -0
- package/dist/shared/support/useMerchantContext.d.ts +1 -0
- package/dist/shared/support/useMerchantContext.js +1 -0
- package/dist/shared/support/useSupportTrigger.js +1 -0
- package/dist/shared/terms/TermsConfigContext.d.ts +1 -0
- package/dist/shared/terms/TermsConfigContext.js +1 -0
- package/dist/shared/terms/TermsLink.d.ts +1 -0
- package/dist/shared/terms/TermsLink.js +1 -0
- package/dist/shared/terms/index.d.ts +1 -0
- package/dist/shared/terms/index.js +1 -0
- package/dist/shared/terms/types.d.ts +43 -0
- package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.d.ts +52 -0
- package/dist/shared/ui/AdaptiveSurface/AdaptiveSurface.js +1 -0
- package/dist/shared/ui/AdaptiveSurface/index.d.ts +2 -0
- package/dist/shared/ui/AdaptiveSurface/index.js +1 -0
- package/dist/shared/ui/Card/Card.d.ts +12 -9
- package/dist/shared/ui/Card/Card.js +1 -1
- package/dist/shared/ui/Card/Card.styles.js +1 -1
- package/dist/shared/ui/Details/Details.d.ts +9 -1
- package/dist/shared/ui/Details/Details.styles.js +1 -1
- package/dist/shared/ui/Dialog/Dialog.d.ts +10 -8
- package/dist/shared/ui/Dialog/Dialog.js +1 -1
- package/dist/shared/ui/Dialog/Dialog.styles.js +1 -1
- package/dist/shared/ui/Drawer/Drawer.d.ts +135 -0
- package/dist/shared/ui/Drawer/Drawer.js +1 -0
- package/dist/shared/ui/Drawer/Drawer.slots.d.ts +19 -0
- package/dist/shared/ui/Drawer/Drawer.slots.js +1 -0
- package/dist/shared/ui/Drawer/Drawer.styles.js +1 -0
- package/dist/shared/ui/Drawer/index.d.ts +2 -0
- package/dist/shared/ui/Drawer/index.js +1 -0
- package/dist/shared/ui/Select/Select.js +1 -1
- package/dist/shared/ui/SelectableTile/SelectableTile.d.ts +21 -8
- package/dist/shared/ui/SelectableTile/SelectableTile.js +1 -1
- package/dist/shared/ui/Steps/Steps.d.ts +52 -0
- package/dist/shared/ui/Steps/Steps.js +1 -0
- package/dist/shared/ui/Steps/Steps.slots.d.ts +7 -0
- package/dist/shared/ui/Steps/Steps.slots.js +1 -0
- package/dist/shared/ui/Steps/Steps.styles.js +1 -0
- package/dist/shared/ui/Steps/index.d.ts +2 -0
- package/dist/shared/ui/Steps/index.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.d.ts +79 -0
- package/dist/shared/ui/Tabs/Tabs.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.slots.d.ts +11 -0
- package/dist/shared/ui/Tabs/Tabs.slots.js +1 -0
- package/dist/shared/ui/Tabs/Tabs.styles.js +1 -0
- package/dist/shared/ui/Tabs/index.d.ts +2 -0
- package/dist/shared/ui/Tabs/index.js +1 -0
- package/dist/shared/ui/WalletRow/WalletRow.d.ts +1 -1
- package/dist/shared/ui/WalletRow/WalletRow.js +1 -1
- package/dist/shared/ui/surfaceContext.d.ts +9 -0
- package/dist/shared/ui/surfaceContext.js +1 -0
- package/dist/shared/utils/assertNever.js +1 -0
- package/dist/shared/utils/logos/types.d.ts +1 -1
- package/dist/shared/utils/useDeepMemo.js +1 -0
- package/dist/shared/wallet/ConnectWalletContext.d.ts +17 -0
- package/dist/shared/wallet/ConnectWalletContext.js +1 -0
- package/dist/shared/widgets/activity/ActivityTrigger.js +1 -0
- package/dist/shared/widgets/activity/ActivityTrigger.styles.js +1 -0
- package/dist/shared/widgets/activity/adapters/settlementToWidgetProps.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.d.ts +95 -0
- package/dist/shared/widgets/activity/compound/Activity.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.slots.d.ts +22 -0
- package/dist/shared/widgets/activity/compound/Activity.slots.js +1 -0
- package/dist/shared/widgets/activity/compound/Activity.styles.js +1 -0
- package/dist/shared/widgets/activity/compound/ActivityDetail.d.ts +82 -0
- package/dist/shared/widgets/activity/compound/ActivityDetail.js +1 -0
- package/dist/shared/widgets/activity/compound/Row.slots.d.ts +21 -0
- package/dist/shared/widgets/activity/compound/Row.slots.js +1 -0
- package/dist/shared/widgets/activity/compound/Row.styles.js +1 -0
- package/dist/shared/widgets/activity/compound/components/ActivityHeader.d.ts +39 -0
- package/dist/shared/widgets/activity/compound/components/ActivityHeader.js +1 -0
- package/dist/shared/widgets/activity/compound/components/Empty.d.ts +15 -0
- package/dist/shared/widgets/activity/compound/components/Empty.js +1 -0
- package/dist/shared/widgets/activity/compound/components/ErrorView.d.ts +26 -0
- package/dist/shared/widgets/activity/compound/components/ErrorView.js +1 -0
- package/dist/shared/widgets/activity/compound/components/List.d.ts +23 -0
- package/dist/shared/widgets/activity/compound/components/List.js +1 -0
- package/dist/shared/widgets/activity/compound/components/Row.d.ts +51 -0
- package/dist/shared/widgets/activity/compound/components/Row.js +1 -0
- package/dist/shared/widgets/activity/compound/components/StatusPip.js +1 -0
- package/dist/shared/widgets/activity/compound/context.d.ts +95 -0
- package/dist/shared/widgets/activity/compound/context.js +1 -0
- package/dist/shared/widgets/activity/compound/index.d.ts +8 -0
- package/dist/shared/widgets/activity/compound/index.js +1 -0
- package/dist/shared/widgets/activity/index.js +1 -0
- package/dist/shared/widgets/activity/payloads.d.ts +108 -0
- package/dist/shared/widgets/activity/transformers/activityResponseToPayload.js +1 -0
- package/dist/shared/widgets/activity/transformers/resolveDirection.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.d.ts +10 -2
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.d.ts +6 -0
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.slots.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/AmountEntry.styles.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Details.d.ts +34 -0
- package/dist/shared/widgets/amount-entry/compound/components/Details.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/components/Footer.d.ts +2 -1
- package/dist/shared/widgets/amount-entry/compound/components/Footer.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Header.d.ts +6 -1
- package/dist/shared/widgets/amount-entry/compound/components/Header.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Hero/Hero.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Hero/SwapBackdrop.js +1 -1
- package/dist/shared/widgets/amount-entry/compound/components/Notice.d.ts +7 -0
- package/dist/shared/widgets/amount-entry/compound/components/Notice.js +1 -0
- package/dist/shared/widgets/amount-entry/compound/index.d.ts +1 -1
- package/dist/shared/widgets/amount-entry/compound/types.d.ts +69 -3
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.d.ts +3 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.d.ts +2 -0
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.slots.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/AssetPicker.styles.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/components/Asset.d.ts +7 -1
- package/dist/shared/widgets/asset-picker/compound/components/Asset.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/components/Empty.d.ts +15 -0
- package/dist/shared/widgets/asset-picker/compound/components/Empty.js +1 -0
- package/dist/shared/widgets/asset-picker/compound/components/Header.d.ts +6 -1
- package/dist/shared/widgets/asset-picker/compound/components/Header.js +1 -1
- package/dist/shared/widgets/asset-picker/compound/types.d.ts +15 -1
- package/dist/shared/widgets/confirm-transfer/compound/ConfirmTransfer.styles.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/Breakdown.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.d.ts +4 -3
- package/dist/shared/widgets/confirm-transfer/compound/components/Disclaimer.js +1 -1
- package/dist/shared/widgets/confirm-transfer/compound/components/QuoteTimer.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/AssetValue.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/HelpInfo.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.d.ts +1 -1
- package/dist/shared/widgets/error-state/compound/components/MoreDetails.js +1 -1
- package/dist/shared/widgets/error-state/compound/components/StatusValue.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.d.ts +1 -5
- package/dist/shared/widgets/processing-state/compound/ProcessingState.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.d.ts +0 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.slots.js +1 -1
- package/dist/shared/widgets/processing-state/compound/ProcessingState.styles.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Details.d.ts +6 -1
- package/dist/shared/widgets/processing-state/compound/components/Details.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Header.d.ts +4 -3
- package/dist/shared/widgets/processing-state/compound/components/Header.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Hero.d.ts +14 -7
- package/dist/shared/widgets/processing-state/compound/components/Hero.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/Rows.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/StatusPill.js +1 -1
- package/dist/shared/widgets/processing-state/compound/components/splitAmount.js +1 -0
- package/dist/shared/widgets/processing-state/compound/index.d.ts +1 -1
- package/dist/shared/widgets/processing-state/compound/types.d.ts +11 -29
- package/dist/shared/widgets/success-state/compound/components/Actions.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/AssetValue.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.d.ts +1 -1
- package/dist/shared/widgets/success-state/compound/components/MoreDetails.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/RouteValue.js +1 -1
- package/dist/shared/widgets/success-state/compound/components/StatusPill.js +1 -1
- package/dist/shared/widgets/success-state/compound/types.d.ts +5 -5
- package/dist/storage/context.d.ts +9 -1
- package/dist/storage/context.js +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/stridge/StridgeProvider.d.ts +177 -35
- package/dist/stridge/StridgeProvider.js +1 -1
- package/dist/stridge/depositOwner.js +1 -0
- package/dist/stridge/optionalWagmi.js +1 -0
- package/dist/stridge/stubs.js +1 -1
- package/dist/styles/index.css +567 -12
- package/dist/types.d.ts +8 -6
- package/dist/ui/index.d.ts +9 -1
- package/dist/ui/index.js +1 -1
- package/dist/version.d.ts +10 -0
- package/dist/version.js +1 -0
- package/dist/withdraw/compound/index.d.ts +11 -8
- package/dist/withdraw/compound/index.js +1 -1
- package/dist/withdraw/dialog/index.d.ts +4 -1
- package/dist/withdraw/widgets/index.d.ts +7 -0
- package/dist/withdraw/widgets/index.js +1 -0
- package/package.json +31 -7
- package/dist/_internal/deposit/widgets/index.d.ts +0 -11
- package/dist/_internal/deposit/widgets/index.js +0 -1
- package/dist/_internal/withdraw/widgets/index.d.ts +0 -5
- package/dist/_internal/withdraw/widgets/index.js +0 -1
- package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.d.ts +0 -36
- package/dist/flows/withdraw/dialog/WithdrawDialogEventsContext.js +0 -1
- package/dist/shared/widgets/processing-state/compound/components/Actions.d.ts +0 -17
- package/dist/shared/widgets/processing-state/compound/components/Actions.js +0 -1
- package/dist/stridge/StridgeContext.d.ts +0 -29
- package/dist/stridge/StridgeContext.js +0 -1
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
import { SettlementFailureKind, TxRef } from "../../shared/driver/types.js";
|
|
2
|
+
import { BalanceItemPayload, QuotePayload, SettlementPendingPayload, SettlementSuccessPayload } from "../../flows/deposit/driver/payloads.js";
|
|
3
|
+
import { DepositMethod, DepositStateName, ResolvedOpenInput } from "../../flows/deposit/orchestrator/types.js";
|
|
4
|
+
import { FailurePayloadBase, StridgeEventBase } from "./envelope.js";
|
|
5
|
+
import { TransferCryptoChain, TransferCryptoToken } from "../../flows/deposit/widgets/transfer-crypto/compound/types.js";
|
|
6
|
+
|
|
7
|
+
//#region src/events/types/deposit.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Orchestrator-level input the kit assembled to ask the driver for a deposit quote. Mirrors
|
|
10
|
+
* the shape of {@link import("#/flows/withdraw/driver").RequestWithdrawalQuoteInput} for the
|
|
11
|
+
* deposit side — wrapping the request fields in a single `input` field keeps the `payload`
|
|
12
|
+
* shape symmetric across flows so generic analytics handlers can write
|
|
13
|
+
* `track("quote_requested", e.payload.input)` for both flows.
|
|
14
|
+
*/
|
|
15
|
+
interface DepositQuoteRequestInput {
|
|
16
|
+
/** Source-side asset the user picked on the AssetPicker step. */
|
|
17
|
+
asset: BalanceItemPayload;
|
|
18
|
+
/** Send amount in display units. */
|
|
19
|
+
amount: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Phase the deposit flow was in when it was cancelled. Lets consumers distinguish "user
|
|
23
|
+
* abandoned at amount entry" from "user abandoned during processing wait" without parsing
|
|
24
|
+
* step names.
|
|
25
|
+
*/
|
|
26
|
+
type DepositCancelPhase = "quoting" | "confirming" | "submitting" | "processing" | "unknown";
|
|
27
|
+
/**
|
|
28
|
+
* Settlement failure variant — extends the base with settlement-specific structure
|
|
29
|
+
* (typed `kind`, optional `txHash`) when the failure originates from the gateway's
|
|
30
|
+
* settlement entity rather than from a generic orchestrator path.
|
|
31
|
+
*/
|
|
32
|
+
interface DepositSettlementFailurePayload extends FailurePayloadBase {
|
|
33
|
+
/**
|
|
34
|
+
* Driver-classified failure kind for downstream branching. Bounded enum so consumers can
|
|
35
|
+
* `switch (e.payload.kind)` exhaustively. The kit also escalates FSM-level failures with
|
|
36
|
+
* `kind: "unknown"` when no settlement-specific classification applies.
|
|
37
|
+
*/
|
|
38
|
+
kind: SettlementFailureKind;
|
|
39
|
+
/** On-chain transaction hash, when one was successfully broadcast before settlement failed. */
|
|
40
|
+
txHash?: TxRef;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Orchestrator asked the driver for a quote — either the first request for this asset/amount
|
|
44
|
+
* pair or a regeneration after expiry or signature decline. The payload carries the inputs
|
|
45
|
+
* the orchestrator used so consumers can correlate request → response.
|
|
46
|
+
*/
|
|
47
|
+
type DepositQuoteRequestedEvent = StridgeEventBase<"deposit.quote.requested", "deposit", "flow", {
|
|
48
|
+
input: DepositQuoteRequestInput;
|
|
49
|
+
}>;
|
|
50
|
+
/**
|
|
51
|
+
* Driver returned a successful quote and the orchestrator transitioned to `ready`. Payload is
|
|
52
|
+
* the full quote entity; reflect-then-render is safe (the orchestrator will not regenerate
|
|
53
|
+
* silently between this event and the next user action unless the quote expires).
|
|
54
|
+
*/
|
|
55
|
+
type DepositQuoteResolvedEvent = StridgeEventBase<"deposit.quote.resolved", "deposit", "flow", {
|
|
56
|
+
quote: QuotePayload;
|
|
57
|
+
}>;
|
|
58
|
+
/**
|
|
59
|
+
* Quote fetch failed. Payload is the standard {@link FailurePayloadBase} — same shape as every
|
|
60
|
+
* other `*.failed` event so generic error handlers work without per-event branching.
|
|
61
|
+
*/
|
|
62
|
+
type DepositQuoteFailedEvent = StridgeEventBase<"deposit.quote.failed", "deposit", "flow", FailurePayloadBase>;
|
|
63
|
+
/**
|
|
64
|
+
* Active quote went stale (TTL elapsed) before the user could submit, and the orchestrator
|
|
65
|
+
* silently started regenerating it. Payload is empty — the next `deposit.quote.resolved`
|
|
66
|
+
* carries the replacement quote.
|
|
67
|
+
*/
|
|
68
|
+
type DepositQuoteExpiredEvent = StridgeEventBase<"deposit.quote.expired", "deposit", "flow", Record<string, never>>;
|
|
69
|
+
/**
|
|
70
|
+
* Wallet broadcast the deposit transaction and the orchestrator transitioned into
|
|
71
|
+
* `processing`. The on-chain tx hash is now stable; settlement polling has started.
|
|
72
|
+
*/
|
|
73
|
+
type DepositSubmissionBroadcastEvent = StridgeEventBase<"deposit.submission.broadcast", "deposit", "flow", {
|
|
74
|
+
tx: TxRef;
|
|
75
|
+
}>;
|
|
76
|
+
/**
|
|
77
|
+
* User refused the wallet signature prompt. Distinct from {@link DepositSubmissionFailedEvent} —
|
|
78
|
+
* declining is a user choice, not an error. The orchestrator regenerates the quote and lands
|
|
79
|
+
* the user back on the confirm step.
|
|
80
|
+
*/
|
|
81
|
+
type DepositSubmissionDeclinedEvent = StridgeEventBase<"deposit.submission.declined", "deposit", "flow", Record<string, never>>;
|
|
82
|
+
/**
|
|
83
|
+
* Submission attempted but couldn't complete — network failure, backend rejection, broken
|
|
84
|
+
* wallet provider, anything that isn't user-rejection. Carries the standard
|
|
85
|
+
* {@link FailurePayloadBase}.
|
|
86
|
+
*/
|
|
87
|
+
type DepositSubmissionFailedEvent = StridgeEventBase<"deposit.submission.failed", "deposit", "flow", FailurePayloadBase>;
|
|
88
|
+
/**
|
|
89
|
+
* Background `fetchActiveSettlement` probe surfaced a pre-existing pending deposit on flow
|
|
90
|
+
* start — the user hadn't started this flow in this session but a prior unfinished deposit
|
|
91
|
+
* was detected and resumed. Payload is the settlement entity's pending snapshot.
|
|
92
|
+
*
|
|
93
|
+
* Withdraw has no symmetric event: the withdraw driver does not currently probe for
|
|
94
|
+
* pre-existing pending withdrawals (host-driven submission means the host already knows
|
|
95
|
+
* when a withdrawal was started). If withdraw later grows an equivalent probe, the
|
|
96
|
+
* symmetric `withdraw.settlement.resumed` will land at that time.
|
|
97
|
+
*/
|
|
98
|
+
type DepositSettlementResumedEvent = StridgeEventBase<"deposit.settlement.resumed", "deposit", "flow", {
|
|
99
|
+
settlement: SettlementPendingPayload;
|
|
100
|
+
}>;
|
|
101
|
+
/**
|
|
102
|
+
* Settlement entity emitted a progressive pending update — confirmations advancing, partial
|
|
103
|
+
* fill credited, etc. Fires once per update; payload always reflects the current snapshot.
|
|
104
|
+
*/
|
|
105
|
+
type DepositSettlementProgressedEvent = StridgeEventBase<"deposit.settlement.progressed", "deposit", "flow", {
|
|
106
|
+
settlement: SettlementPendingPayload;
|
|
107
|
+
}>;
|
|
108
|
+
/**
|
|
109
|
+
* Terminal success — settlement entity reached `ready{kind: "succeeded"}`. The flow is over;
|
|
110
|
+
* this event closes the session and the `flowId` is retired after it fires.
|
|
111
|
+
*/
|
|
112
|
+
type DepositSettlementSucceededEvent = StridgeEventBase<"deposit.settlement.succeeded", "deposit", "flow", {
|
|
113
|
+
settlement: SettlementSuccessPayload;
|
|
114
|
+
}>;
|
|
115
|
+
/**
|
|
116
|
+
* Terminal failure — settlement entity reached `ready{kind: "failed"}` (driver-emitted
|
|
117
|
+
* classification) or the orchestrator escalated an FSM-level failure to the global error arm.
|
|
118
|
+
* Payload extends the standard {@link FailurePayloadBase} with settlement-specific fields.
|
|
119
|
+
*/
|
|
120
|
+
type DepositSettlementFailedEvent = StridgeEventBase<"deposit.settlement.failed", "deposit", "flow", DepositSettlementFailurePayload>;
|
|
121
|
+
/**
|
|
122
|
+
* Flow ended before reaching a terminal state — typically the user closed the dialog
|
|
123
|
+
* mid-flow, or an AbortSignal fired. `payload.phase` indicates where in the lifecycle the
|
|
124
|
+
* cancellation happened so consumers can build drop-off funnels without parsing step names.
|
|
125
|
+
*/
|
|
126
|
+
type DepositCancelledEvent = StridgeEventBase<"deposit.cancelled", "deposit", "flow", {
|
|
127
|
+
phase: DepositCancelPhase;
|
|
128
|
+
}>;
|
|
129
|
+
/** Union of every `deposit.*` `flow:*` event. */
|
|
130
|
+
type DepositFlowEvent = DepositQuoteRequestedEvent | DepositQuoteResolvedEvent | DepositQuoteFailedEvent | DepositQuoteExpiredEvent | DepositSubmissionBroadcastEvent | DepositSubmissionDeclinedEvent | DepositSubmissionFailedEvent | DepositSettlementResumedEvent | DepositSettlementProgressedEvent | DepositSettlementSucceededEvent | DepositSettlementFailedEvent | DepositCancelledEvent;
|
|
131
|
+
/**
|
|
132
|
+
* Dialog transitioned from `closed` to any open step. Mints the `flowId` (every subsequent
|
|
133
|
+
* event in this session carries the same `flowId`) and snapshots the `metadata` prop.
|
|
134
|
+
*/
|
|
135
|
+
type DepositOpenedEvent = StridgeEventBase<"deposit.opened", "deposit", "ui", {
|
|
136
|
+
input: ResolvedOpenInput;
|
|
137
|
+
}>;
|
|
138
|
+
/**
|
|
139
|
+
* Dialog returned to `closed`. `payload.atStep` is the step name the dialog was on at close
|
|
140
|
+
* time. Fires after any terminal event (`*.succeeded` / `*.failed`) or `deposit.cancelled`
|
|
141
|
+
* in the same session.
|
|
142
|
+
*/
|
|
143
|
+
type DepositClosedEvent = StridgeEventBase<"deposit.closed", "deposit", "ui", {
|
|
144
|
+
atStep: DepositStateName;
|
|
145
|
+
}>;
|
|
146
|
+
/**
|
|
147
|
+
* Dialog step transitioned. Fires on every logical step change including back-presses.
|
|
148
|
+
* `from === to` is not emitted; same-step `ctx` changes (e.g. `confirmDeposit` phase shifts)
|
|
149
|
+
* surface through their respective `flow:*` events instead.
|
|
150
|
+
*/
|
|
151
|
+
type DepositStepChangedEvent = StridgeEventBase<"deposit.step.changed", "deposit", "ui", {
|
|
152
|
+
from: DepositStateName;
|
|
153
|
+
to: DepositStateName;
|
|
154
|
+
}>;
|
|
155
|
+
/**
|
|
156
|
+
* User clicked a deposit method tile (`wallet` / `transfer`) on the entry step. Fires on
|
|
157
|
+
* commit — picking is the action that advances the FSM.
|
|
158
|
+
*/
|
|
159
|
+
type DepositMethodClickedEvent = StridgeEventBase<"deposit.method.clicked", "deposit", "ui", {
|
|
160
|
+
method: DepositMethod;
|
|
161
|
+
}>;
|
|
162
|
+
/**
|
|
163
|
+
* User clicked an asset row on the AssetPicker step. The asset is the driver-shaped balance row;
|
|
164
|
+
* use {@link BalanceItemPayload}'s `symbol` and `chainId` to identify it.
|
|
165
|
+
*/
|
|
166
|
+
type DepositAssetClickedEvent = StridgeEventBase<"deposit.asset.clicked", "deposit", "ui", {
|
|
167
|
+
asset: BalanceItemPayload;
|
|
168
|
+
}>;
|
|
169
|
+
/**
|
|
170
|
+
* User typed in the amount field on the AmountEntry step. Fires per keystroke (no debounce);
|
|
171
|
+
* `payload.raw` is the literal input string, `payload.numeric` is the parsed value (or `null`
|
|
172
|
+
* when empty / unparseable). Use this for live UI; use {@link DepositAmountSubmittedEvent} for
|
|
173
|
+
* commitment.
|
|
174
|
+
*/
|
|
175
|
+
type DepositAmountChangedEvent = StridgeEventBase<"deposit.amount.changed", "deposit", "ui", {
|
|
176
|
+
raw: string;
|
|
177
|
+
numeric: number | null;
|
|
178
|
+
}>;
|
|
179
|
+
/**
|
|
180
|
+
* User clicked the Max preset in the AmountEntry step (fills the amount with the full
|
|
181
|
+
* available balance). Mirrors {@link import("./withdraw").WithdrawMaxClickedEvent}.
|
|
182
|
+
*/
|
|
183
|
+
type DepositMaxClickedEvent = StridgeEventBase<"deposit.max.clicked", "deposit", "ui", Record<string, never>>;
|
|
184
|
+
/**
|
|
185
|
+
* User submitted the AmountEntry step. `payload.amount` is the parsed numeric value (the FSM
|
|
186
|
+
* would not have advanced otherwise). The next event is typically `deposit.quote.requested`.
|
|
187
|
+
*/
|
|
188
|
+
type DepositAmountSubmittedEvent = StridgeEventBase<"deposit.amount.submitted", "deposit", "ui", {
|
|
189
|
+
amount: number;
|
|
190
|
+
}>;
|
|
191
|
+
/**
|
|
192
|
+
* User clicked the Confirm button on the ConfirmDeposit step. Fires unconditionally on click —
|
|
193
|
+
* even when the button is disabled / mid-submit — so analytics can observe intent regardless
|
|
194
|
+
* of whether the click triggers FSM advance. Mirrors
|
|
195
|
+
* {@link import("./withdraw").WithdrawSubmitClickedEvent}. Use
|
|
196
|
+
* {@link DepositSubmissionConfirmedEvent} for the FSM-level "submission accepted" signal.
|
|
197
|
+
*/
|
|
198
|
+
type DepositConfirmClickedEvent = StridgeEventBase<"deposit.confirm.clicked", "deposit", "ui", Record<string, never>>;
|
|
199
|
+
/**
|
|
200
|
+
* Confirm-step FSM transition to the submitting phase — the wallet prompt is about to fire.
|
|
201
|
+
* Fires only when the FSM accepts the submission (the click was valid); for the raw click
|
|
202
|
+
* signal (regardless of validity), subscribe to {@link DepositConfirmClickedEvent}. The
|
|
203
|
+
* next event is typically `deposit.submission.broadcast`, `deposit.submission.declined`, or
|
|
204
|
+
* `deposit.submission.failed`.
|
|
205
|
+
*/
|
|
206
|
+
type DepositSubmissionConfirmedEvent = StridgeEventBase<"deposit.submission.confirmed", "deposit", "ui", Record<string, never>>;
|
|
207
|
+
/**
|
|
208
|
+
* User clicked the Back chevron in the dialog header on a non-root step. `payload.fromStep` is
|
|
209
|
+
* the step they were leaving. Withdraw has no symmetric event — the withdraw dialog is
|
|
210
|
+
* single-form with no Back affordance (the dialog X closes the flow instead).
|
|
211
|
+
*/
|
|
212
|
+
type DepositBackClickedEvent = StridgeEventBase<"deposit.back.clicked", "deposit", "ui", {
|
|
213
|
+
fromStep: DepositStateName;
|
|
214
|
+
}>;
|
|
215
|
+
/**
|
|
216
|
+
* Inside the TransferCrypto compound, user picked a different source token. The selection
|
|
217
|
+
* affects which deposit address is shown but does not advance the FSM.
|
|
218
|
+
*/
|
|
219
|
+
type DepositTransferTokenChangedEvent = StridgeEventBase<"deposit.transfer.token.changed", "deposit", "ui", {
|
|
220
|
+
token: TransferCryptoToken;
|
|
221
|
+
}>;
|
|
222
|
+
/** Inside the TransferCrypto compound, user picked a different source chain. */
|
|
223
|
+
type DepositTransferChainChangedEvent = StridgeEventBase<"deposit.transfer.chain.changed", "deposit", "ui", {
|
|
224
|
+
chain: TransferCryptoChain;
|
|
225
|
+
}>;
|
|
226
|
+
/** User clicked the copy-address button in the TransferCrypto compound. */
|
|
227
|
+
type DepositTransferAddressCopiedEvent = StridgeEventBase<"deposit.transfer.address.copied", "deposit", "ui", {
|
|
228
|
+
address: string;
|
|
229
|
+
}>;
|
|
230
|
+
/** Union of every `deposit.*` `ui:*` event. */
|
|
231
|
+
type DepositUiEvent = DepositOpenedEvent | DepositClosedEvent | DepositStepChangedEvent | DepositMethodClickedEvent | DepositAssetClickedEvent | DepositAmountChangedEvent | DepositMaxClickedEvent | DepositAmountSubmittedEvent | DepositConfirmClickedEvent | DepositSubmissionConfirmedEvent | DepositBackClickedEvent | DepositTransferTokenChangedEvent | DepositTransferChainChangedEvent | DepositTransferAddressCopiedEvent;
|
|
232
|
+
/** Union of every `deposit.*` event regardless of tier. */
|
|
233
|
+
type DepositEvent = DepositFlowEvent | DepositUiEvent;
|
|
234
|
+
//#endregion
|
|
235
|
+
export { DepositAmountChangedEvent, DepositAmountSubmittedEvent, DepositAssetClickedEvent, DepositBackClickedEvent, DepositCancelPhase, DepositCancelledEvent, DepositClosedEvent, DepositConfirmClickedEvent, DepositEvent, DepositFlowEvent, DepositMaxClickedEvent, DepositMethodClickedEvent, DepositOpenedEvent, DepositQuoteExpiredEvent, DepositQuoteFailedEvent, DepositQuoteRequestInput, DepositQuoteRequestedEvent, DepositQuoteResolvedEvent, DepositSettlementFailedEvent, DepositSettlementFailurePayload, DepositSettlementProgressedEvent, DepositSettlementResumedEvent, DepositSettlementSucceededEvent, DepositStepChangedEvent, DepositSubmissionBroadcastEvent, DepositSubmissionConfirmedEvent, DepositSubmissionDeclinedEvent, DepositSubmissionFailedEvent, DepositTransferAddressCopiedEvent, DepositTransferChainChangedEvent, DepositTransferTokenChangedEvent, DepositUiEvent };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
//#region src/events/types/envelope.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Envelope, tier, flow, and failure types shared by every event variant in the unified bus.
|
|
4
|
+
*
|
|
5
|
+
* # Naming pattern (READ THIS BEFORE ADDING A NEW EVENT)
|
|
6
|
+
*
|
|
7
|
+
* Every event type is a string of the form `<flow>.<noun>.<verb-past>` (or
|
|
8
|
+
* `<flow>.<noun>.<sub-noun>.<verb-past>` for nested concepts):
|
|
9
|
+
*
|
|
10
|
+
* - `deposit.quote.resolved`
|
|
11
|
+
* - `withdraw.settlement.succeeded`
|
|
12
|
+
* - `deposit.transfer.address.copied`
|
|
13
|
+
* - `kit.support.opened`
|
|
14
|
+
*
|
|
15
|
+
* Rules:
|
|
16
|
+
*
|
|
17
|
+
* 1. **Lowercase, dot-segmented.** No camelCase, no colons, no slashes.
|
|
18
|
+
* 2. **Past-tense final verb.** Events describe things that already happened. `quote.resolved`,
|
|
19
|
+
* not `quote.resolve`. Even in-flight signals use past tense (`quote.requested` — the
|
|
20
|
+
* request *was made*).
|
|
21
|
+
* 3. **Same `noun.verb` across flows = same semantic concept.** A consumer who learns deposit
|
|
22
|
+
* events should immediately recognise the withdraw equivalents. If a concept exists in both
|
|
23
|
+
* flows, the trailing segments must match: `deposit.quote.resolved` ↔ `withdraw.quote.resolved`.
|
|
24
|
+
* 4. **Flow prefix is required.** Even for events that conceptually exist in both flows, each
|
|
25
|
+
* flow gets its own typed variant. The prefix lets TypeScript narrow payloads precisely on
|
|
26
|
+
* `e.type ===` checks without needing additional `e.flow ===` guards.
|
|
27
|
+
*
|
|
28
|
+
* # Tier rule
|
|
29
|
+
*
|
|
30
|
+
* - `tier: "flow"` — orchestrator/driver-emitted domain milestones (quote, submission,
|
|
31
|
+
* settlement). Fire whether or not the user sees any UI, as long as the orchestrator is
|
|
32
|
+
* running (which today means a dialog is mounted).
|
|
33
|
+
* - `tier: "ui"` — user-driven affordances and view-state changes from any kit-rendered
|
|
34
|
+
* element. Includes dialog lifecycle (open / close / step.changed) and widget interactions
|
|
35
|
+
* (keystrokes, selections, copy clicks). Fires only when the relevant kit-rendered component
|
|
36
|
+
* is mounted.
|
|
37
|
+
*
|
|
38
|
+
* # Envelope shape
|
|
39
|
+
*
|
|
40
|
+
* Every event variant ships as a `StridgeEventBase<...>`. Field discipline:
|
|
41
|
+
*
|
|
42
|
+
* - `type` — unique string discriminator. Stable across versions; never reshape an existing
|
|
43
|
+
* `type`. Adding a new event = adding a new variant to the appropriate union.
|
|
44
|
+
* - `flow` — duplicated from the `type` prefix for cheap field-based filtering by analytics
|
|
45
|
+
* integrations that don't want to string-parse.
|
|
46
|
+
* - `tier` — duplicated from per-variant convention for filterable inspection.
|
|
47
|
+
* - `timestamp` — `Date.now()` at emit; wall-clock, not `performance.now()`, because
|
|
48
|
+
* consumers want it for logging/funnels.
|
|
49
|
+
* - `flowId` — session correlation id. Minted at `<flow>.opened`, retired after the terminal
|
|
50
|
+
* event (`*.settlement.succeeded` / `*.settlement.failed` / `*.cancelled`, or `activity.closed`
|
|
51
|
+
* for the read-only activity surface which has no settlement). Always `string` for `flow:*`
|
|
52
|
+
* and `ui:*` events; `null` for `kit:*` events (which have no flow context to belong to).
|
|
53
|
+
* - `payload` — event-specific data, always an object even when single-field, so future
|
|
54
|
+
* fields can be added non-breakingly.
|
|
55
|
+
* - `metadata` — consumer-attached, snapshotted at `<flow>.opened` and frozen for the
|
|
56
|
+
* session. Always present (empty object if the consumer didn't supply any). `Record<string,
|
|
57
|
+
* unknown>` — the kit does not validate, normalise, or enforce a schema.
|
|
58
|
+
*
|
|
59
|
+
* # What's intentionally NOT in the envelope
|
|
60
|
+
*
|
|
61
|
+
* - No `id` per-event uuid — `flowId + type + timestamp` is sufficient correlation.
|
|
62
|
+
* - No `preventDefault` / `stopPropagation` — events are read-only notifications.
|
|
63
|
+
* - No `version` field — versioning happens through the union, not at runtime.
|
|
64
|
+
* - No `source: "user" | "system"` distinction beyond `tier` — adding finer grain invites
|
|
65
|
+
* bikeshed without paying for itself.
|
|
66
|
+
*/
|
|
67
|
+
/** Flow identifier — one per orchestrator family, plus `"kit"` for flow-less provider events. */
|
|
68
|
+
type StridgeEventFlow = "deposit" | "withdraw" | "activity" | "kit";
|
|
69
|
+
/** Delivery tier — see envelope JSDoc for the rule. */
|
|
70
|
+
type StridgeEventTier = "flow" | "ui";
|
|
71
|
+
/**
|
|
72
|
+
* Generic envelope every event variant extends. Concrete variants narrow the four type
|
|
73
|
+
* parameters so `e.type === "..."` discrimination narrows `flow`, `tier`, and `payload`
|
|
74
|
+
* in lockstep.
|
|
75
|
+
*/
|
|
76
|
+
interface StridgeEventBase<TType extends string, TFlow extends StridgeEventFlow, TTier extends StridgeEventTier, TPayload> {
|
|
77
|
+
/** Stable string discriminator. See the naming pattern in this file's top-of-file JSDoc. */
|
|
78
|
+
type: TType;
|
|
79
|
+
/** Originating flow. Always derivable from the `type` prefix; duplicated for cheap field-based filtering. */
|
|
80
|
+
flow: TFlow;
|
|
81
|
+
/** Delivery tier. */
|
|
82
|
+
tier: TTier;
|
|
83
|
+
/** Wall-clock millisecond timestamp at emit. */
|
|
84
|
+
timestamp: number;
|
|
85
|
+
/**
|
|
86
|
+
* Session correlation id. `string` for flow-scoped events, `null` for `kit:*` events
|
|
87
|
+
* (which have no flow context to belong to).
|
|
88
|
+
*/
|
|
89
|
+
flowId: TFlow extends "kit" ? null : string;
|
|
90
|
+
/** Event-specific payload. Always an object even when single-field. */
|
|
91
|
+
payload: TPayload;
|
|
92
|
+
/**
|
|
93
|
+
* Consumer-attached metadata, snapshotted at `<flow>.opened`, frozen for the session.
|
|
94
|
+
* Empty object when the consumer didn't supply any. Consumer-typed at the consumption
|
|
95
|
+
* site — the kit does not validate or normalise.
|
|
96
|
+
*/
|
|
97
|
+
metadata: Record<string, unknown>;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Stable taxonomy of failure codes carried by every `*.failed` event. Constrained enum (not
|
|
101
|
+
* free string) because consumers writing `switch(code)` need exhaustiveness and analytics
|
|
102
|
+
* platforms need bounded cardinality.
|
|
103
|
+
*
|
|
104
|
+
* Every internal failure path must map to one of these. Add new codes here when a new
|
|
105
|
+
* failure category genuinely appears — don't widen the union with overlapping codes.
|
|
106
|
+
*/
|
|
107
|
+
type FailureCode = /** Transport-level fetch failure, DNS error, browser offline. */"network" /** Operation exceeded its deadline before producing a result. */ | "timeout" /** Backend returned 429 / equivalent rate-limit signal. */ | "rate_limited" /** Gateway key invalid, scope mismatch, or session expired. */ | "unauthorized" /** Requested amount exceeds available balance. */ | "insufficient_funds" /** Backend rejected the payload as malformed (validation failure). */ | "invalid_input" /** Quote went stale between request and submit. */ | "quote_expired" /** On-chain transaction reverted. */ | "tx_reverted" /** Transaction replaced or dropped from the mempool before inclusion. */ | "tx_dropped" /** Backend couldn't correlate a settlement to the submitted transaction. */ | "settlement_lost" /** Catch-all for anything else; consumers should treat as opaque. */ | "internal";
|
|
108
|
+
/**
|
|
109
|
+
* Shape carried by every `*.failed` event in the bus. Common base lets generic error handlers
|
|
110
|
+
* write `analytics.track("error", e.payload.code, e.payload.reason)` once and have it work
|
|
111
|
+
* across every flow and every failure point.
|
|
112
|
+
*
|
|
113
|
+
* Per-event extensions (e.g. `SettlementFailurePayload`) extend this with richer fields when
|
|
114
|
+
* the failure has additional structure worth surfacing.
|
|
115
|
+
*
|
|
116
|
+
* **`.declined` (user refused a wallet prompt) and `.cancelled` (flow interrupted by close /
|
|
117
|
+
* AbortSignal) are NOT `.failed`** — they have their own event names with their own (often
|
|
118
|
+
* empty) payloads. Conflating them would let analytics count user choices as errors.
|
|
119
|
+
*/
|
|
120
|
+
interface FailurePayloadBase {
|
|
121
|
+
/**
|
|
122
|
+
* Stable taxonomy code. Drives consumer logic: retry decisions, custom messaging,
|
|
123
|
+
* error-grouping in analytics dashboards.
|
|
124
|
+
*/
|
|
125
|
+
code: FailureCode;
|
|
126
|
+
/**
|
|
127
|
+
* Human-readable reason, already localised by the kit. Safe to render directly to users.
|
|
128
|
+
* Consumers who want raw keys for their own messaging branch on {@link code} instead.
|
|
129
|
+
*/
|
|
130
|
+
reason: string;
|
|
131
|
+
/**
|
|
132
|
+
* Whether retrying the same operation could plausibly succeed. `true` for transient
|
|
133
|
+
* failures (`network`, `timeout`, `rate_limited`); `false` for permanent ones
|
|
134
|
+
* (`unauthorized`, `invalid_input`, `tx_reverted`).
|
|
135
|
+
*/
|
|
136
|
+
retryable: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Raw cause for debugging only — typically the underlying `Error`, fetch `Response`, or
|
|
139
|
+
* wallet-provider error object. Never displayed; safe to log. Consumers must not depend
|
|
140
|
+
* on its shape.
|
|
141
|
+
*/
|
|
142
|
+
cause?: unknown;
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
export { FailureCode, FailurePayloadBase, StridgeEventBase, StridgeEventFlow, StridgeEventTier };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { FailureCode, FailurePayloadBase, StridgeEventBase, StridgeEventFlow, StridgeEventTier } from "./envelope.js";
|
|
2
|
+
import { ActivityClosedEvent, ActivityEvent, ActivityOpenedEvent, ActivitySelectionVia, ActivitySettlementSelectedEvent, ActivityStepChangedEvent, ActivityUiEvent } from "./activity.js";
|
|
3
|
+
import { DepositAmountChangedEvent, DepositAmountSubmittedEvent, DepositAssetClickedEvent, DepositBackClickedEvent, DepositCancelPhase, DepositCancelledEvent, DepositClosedEvent, DepositConfirmClickedEvent, DepositEvent, DepositFlowEvent, DepositMaxClickedEvent, DepositMethodClickedEvent, DepositOpenedEvent, DepositQuoteExpiredEvent, DepositQuoteFailedEvent, DepositQuoteRequestInput, DepositQuoteRequestedEvent, DepositQuoteResolvedEvent, DepositSettlementFailedEvent, DepositSettlementFailurePayload, DepositSettlementProgressedEvent, DepositSettlementResumedEvent, DepositSettlementSucceededEvent, DepositStepChangedEvent, DepositSubmissionBroadcastEvent, DepositSubmissionConfirmedEvent, DepositSubmissionDeclinedEvent, DepositSubmissionFailedEvent, DepositTransferAddressCopiedEvent, DepositTransferChainChangedEvent, DepositTransferTokenChangedEvent, DepositUiEvent } from "./deposit.js";
|
|
4
|
+
import { KitEvent, KitSupportClickedEvent, KitTermsClickedEvent } from "./kit.js";
|
|
5
|
+
import { WithdrawAmountChangedEvent, WithdrawBreakdownClickedEvent, WithdrawCancelPhase, WithdrawCancelledEvent, WithdrawClosedEvent, WithdrawEvent, WithdrawFlowEvent, WithdrawMaxClickedEvent, WithdrawOpenedEvent, WithdrawQuoteExpiredEvent, WithdrawQuoteFailedEvent, WithdrawQuoteRequestedEvent, WithdrawQuoteResolvedEvent, WithdrawReceiveChainChangedEvent, WithdrawReceiveTokenChangedEvent, WithdrawRecipientChangedEvent, WithdrawSettlementFailedEvent, WithdrawSettlementFailurePayload, WithdrawSettlementProgressedEvent, WithdrawSettlementSucceededEvent, WithdrawStepChangedEvent, WithdrawSubmissionBroadcastEvent, WithdrawSubmissionConfirmedEvent, WithdrawSubmissionDeclinedEvent, WithdrawSubmissionFailedEvent, WithdrawSubmitClickedEvent, WithdrawUiEvent } from "./withdraw.js";
|
|
6
|
+
|
|
7
|
+
//#region src/events/types/index.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Every `flow:*` event across all flows. Headless-safe — this is what
|
|
10
|
+
* `useStridgeFlowEvents` narrows its handler to. Does not include any `ui:*` or `kit:*`
|
|
11
|
+
* events; consumers who only render the dialog (no widgets, no provider affordances) can
|
|
12
|
+
* subscribe to this union and never see a UI-noise event in their autocomplete.
|
|
13
|
+
*/
|
|
14
|
+
type FlowEvent = DepositFlowEvent | WithdrawFlowEvent;
|
|
15
|
+
/**
|
|
16
|
+
* Every `ui:*` event across all flows, plus every `kit:*` provider-scoped event (kit
|
|
17
|
+
* affordances are user-driven, so they share the `ui` tier today even though they don't
|
|
18
|
+
* belong to a deposit/withdraw flow). Does NOT include `flow:*` events — for the firehose
|
|
19
|
+
* union, use {@link StridgeEvent}.
|
|
20
|
+
*/
|
|
21
|
+
type UiEvent = DepositUiEvent | WithdrawUiEvent | ActivityUiEvent | KitEvent;
|
|
22
|
+
/**
|
|
23
|
+
* Firehose union — every event the kit ever emits. Equivalent to `FlowEvent | UiEvent`.
|
|
24
|
+
* What `useStridgeEvents` hands to its handler.
|
|
25
|
+
*/
|
|
26
|
+
type StridgeEvent = FlowEvent | UiEvent;
|
|
27
|
+
/** Convenience: every distinct `type` literal across the full union. */
|
|
28
|
+
type StridgeEventType = StridgeEvent["type"];
|
|
29
|
+
type FlowEventType = FlowEvent["type"];
|
|
30
|
+
type UiEventType = UiEvent["type"];
|
|
31
|
+
//#endregion
|
|
32
|
+
export { FlowEvent, FlowEventType, StridgeEvent, StridgeEventType, UiEvent, UiEventType };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SupportOpenContext } from "../../shared/support/types.js";
|
|
2
|
+
import { TermsSelectContext } from "../../shared/terms/types.js";
|
|
3
|
+
import { StridgeEventBase } from "./envelope.js";
|
|
4
|
+
//#region src/events/types/kit.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* User clicked the support entry point (the "Get help" link / button). Fires regardless of
|
|
7
|
+
* whether the consumer provided a custom `support.onOpen` handler — the bus event is an
|
|
8
|
+
* observation channel for analytics, the prop is a behaviour-override contract. Both coexist.
|
|
9
|
+
*/
|
|
10
|
+
type KitSupportClickedEvent = StridgeEventBase<"kit.support.clicked", "kit", "ui", {
|
|
11
|
+
context: SupportOpenContext;
|
|
12
|
+
}>;
|
|
13
|
+
/**
|
|
14
|
+
* User clicked a terms link. Fires regardless of whether the consumer provided a custom
|
|
15
|
+
* `terms.onSelect` handler.
|
|
16
|
+
*/
|
|
17
|
+
type KitTermsClickedEvent = StridgeEventBase<"kit.terms.clicked", "kit", "ui", {
|
|
18
|
+
context: TermsSelectContext;
|
|
19
|
+
}>;
|
|
20
|
+
/** Union of every `kit.*` event. */
|
|
21
|
+
type KitEvent = KitSupportClickedEvent | KitTermsClickedEvent;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { KitEvent, KitSupportClickedEvent, KitTermsClickedEvent };
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { SettlementFailureKind, TxRef } from "../../shared/driver/types.js";
|
|
2
|
+
import { ReceiveChainPayload, ReceiveTokenOptionPayload, WithdrawalQuotePayload, WithdrawalSettlementPendingPayload, WithdrawalSettlementSuccessPayload } from "../../flows/withdraw/driver/payloads.js";
|
|
3
|
+
import { PrepareWithdrawalInput, RequestWithdrawalQuoteInput } from "../../flows/withdraw/driver/types.js";
|
|
4
|
+
import { FailurePayloadBase, StridgeEventBase } from "./envelope.js";
|
|
5
|
+
import { WithdrawStateName } from "../../flows/withdraw/orchestrator/types.js";
|
|
6
|
+
|
|
7
|
+
//#region src/events/types/withdraw.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Phase the withdraw flow was in when it was cancelled. Mirrors {@link DepositCancelPhase}
|
|
10
|
+
* for symmetry; same set of values.
|
|
11
|
+
*/
|
|
12
|
+
type WithdrawCancelPhase = "quoting" | "confirming" | "submitting" | "processing" | "unknown";
|
|
13
|
+
/**
|
|
14
|
+
* Settlement failure variant — extends the base with settlement-specific structure.
|
|
15
|
+
* Mirrors {@link DepositSettlementFailurePayload}.
|
|
16
|
+
*/
|
|
17
|
+
interface WithdrawSettlementFailurePayload extends FailurePayloadBase {
|
|
18
|
+
/**
|
|
19
|
+
* Driver-classified failure kind for downstream branching. Bounded enum so consumers can
|
|
20
|
+
* `switch (e.payload.kind)` exhaustively. The kit also escalates FSM-level failures with
|
|
21
|
+
* `kind: "unknown"` when no settlement-specific classification applies.
|
|
22
|
+
*/
|
|
23
|
+
kind: SettlementFailureKind;
|
|
24
|
+
/** On-chain transaction hash, when one was surfaced before settlement failed. */
|
|
25
|
+
txHash?: TxRef;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Orchestrator asked the driver for a quote — fires after the 400 ms form-input debounce when
|
|
29
|
+
* the form has a complete, parseable target. Payload is the input envelope sent to the driver.
|
|
30
|
+
*/
|
|
31
|
+
type WithdrawQuoteRequestedEvent = StridgeEventBase<"withdraw.quote.requested", "withdraw", "flow", {
|
|
32
|
+
input: RequestWithdrawalQuoteInput;
|
|
33
|
+
}>;
|
|
34
|
+
/**
|
|
35
|
+
* Driver returned a successful quote. Payload is the formatted quote entity ready for
|
|
36
|
+
* display. Subsequent form changes will trigger a new `withdraw.quote.requested`.
|
|
37
|
+
*/
|
|
38
|
+
type WithdrawQuoteResolvedEvent = StridgeEventBase<"withdraw.quote.resolved", "withdraw", "flow", {
|
|
39
|
+
quote: WithdrawalQuotePayload;
|
|
40
|
+
}>;
|
|
41
|
+
/** Quote fetch failed. Standard {@link FailurePayloadBase} payload — same shape as deposit. */
|
|
42
|
+
type WithdrawQuoteFailedEvent = StridgeEventBase<"withdraw.quote.failed", "withdraw", "flow", FailurePayloadBase>;
|
|
43
|
+
/**
|
|
44
|
+
* Active quote went stale before submit and the orchestrator regenerated it. Empty payload;
|
|
45
|
+
* the next `withdraw.quote.resolved` carries the replacement.
|
|
46
|
+
*/
|
|
47
|
+
type WithdrawQuoteExpiredEvent = StridgeEventBase<"withdraw.quote.expired", "withdraw", "flow", Record<string, never>>;
|
|
48
|
+
/**
|
|
49
|
+
* Host signaled (via `actions.beginProcessing(tx)` or `actions.setTxHash(tx)` inside
|
|
50
|
+
* `WithdrawSubmitCallback`) that the withdraw transaction has been broadcast. Orchestrator
|
|
51
|
+
* has transitioned into `inProgress`; settlement polling has started.
|
|
52
|
+
*/
|
|
53
|
+
type WithdrawSubmissionBroadcastEvent = StridgeEventBase<"withdraw.submission.broadcast", "withdraw", "flow", {
|
|
54
|
+
input: PrepareWithdrawalInput;
|
|
55
|
+
tx: TxRef;
|
|
56
|
+
}>;
|
|
57
|
+
/**
|
|
58
|
+
* Host signaled user-rejection — either explicitly via `actions.decline()` or implicitly by
|
|
59
|
+
* throwing a wallet-rejection-shaped error from `onSubmit`. Distinct from
|
|
60
|
+
* {@link WithdrawSubmissionFailedEvent}: declining is a user choice, not an error.
|
|
61
|
+
*/
|
|
62
|
+
type WithdrawSubmissionDeclinedEvent = StridgeEventBase<"withdraw.submission.declined", "withdraw", "flow", Record<string, never>>;
|
|
63
|
+
/**
|
|
64
|
+
* Host signaled a non-rejection submission failure (via `actions.fail(failure)` or by
|
|
65
|
+
* throwing a non-rejection error from `onSubmit`). Standard {@link FailurePayloadBase}.
|
|
66
|
+
*/
|
|
67
|
+
type WithdrawSubmissionFailedEvent = StridgeEventBase<"withdraw.submission.failed", "withdraw", "flow", FailurePayloadBase>;
|
|
68
|
+
/** Settlement entity emitted a progressive pending update. Fires once per update. */
|
|
69
|
+
type WithdrawSettlementProgressedEvent = StridgeEventBase<"withdraw.settlement.progressed", "withdraw", "flow", {
|
|
70
|
+
settlement: WithdrawalSettlementPendingPayload;
|
|
71
|
+
}>;
|
|
72
|
+
/** Terminal success — settlement entity reached `ready{kind: "succeeded"}`. Retires the `flowId`. */
|
|
73
|
+
type WithdrawSettlementSucceededEvent = StridgeEventBase<"withdraw.settlement.succeeded", "withdraw", "flow", {
|
|
74
|
+
settlement: WithdrawalSettlementSuccessPayload;
|
|
75
|
+
}>;
|
|
76
|
+
/**
|
|
77
|
+
* Terminal failure — settlement entity reached `ready{kind: "failed"}` or an FSM-level
|
|
78
|
+
* failure escalated to the global error arm. Extends {@link FailurePayloadBase} with
|
|
79
|
+
* settlement-specific fields.
|
|
80
|
+
*/
|
|
81
|
+
type WithdrawSettlementFailedEvent = StridgeEventBase<"withdraw.settlement.failed", "withdraw", "flow", WithdrawSettlementFailurePayload>;
|
|
82
|
+
/**
|
|
83
|
+
* Flow ended before reaching a terminal state. `payload.phase` indicates where in the
|
|
84
|
+
* lifecycle cancellation happened. Mirrors `deposit.cancelled`.
|
|
85
|
+
*/
|
|
86
|
+
type WithdrawCancelledEvent = StridgeEventBase<"withdraw.cancelled", "withdraw", "flow", {
|
|
87
|
+
phase: WithdrawCancelPhase;
|
|
88
|
+
}>;
|
|
89
|
+
/** Union of every `withdraw.*` `flow:*` event. */
|
|
90
|
+
type WithdrawFlowEvent = WithdrawQuoteRequestedEvent | WithdrawQuoteResolvedEvent | WithdrawQuoteFailedEvent | WithdrawQuoteExpiredEvent | WithdrawSubmissionBroadcastEvent | WithdrawSubmissionDeclinedEvent | WithdrawSubmissionFailedEvent | WithdrawSettlementProgressedEvent | WithdrawSettlementSucceededEvent | WithdrawSettlementFailedEvent | WithdrawCancelledEvent;
|
|
91
|
+
/** Dialog transitioned from `closed` to any open step. Mints the `flowId` and snapshots `metadata`. */
|
|
92
|
+
type WithdrawOpenedEvent = StridgeEventBase<"withdraw.opened", "withdraw", "ui", Record<string, never>>;
|
|
93
|
+
/** Dialog returned to `closed`. `payload.atStep` is the step the dialog was on at close time. */
|
|
94
|
+
type WithdrawClosedEvent = StridgeEventBase<"withdraw.closed", "withdraw", "ui", {
|
|
95
|
+
atStep: WithdrawStateName;
|
|
96
|
+
}>;
|
|
97
|
+
/** Dialog step transitioned. Same-step `ctx` changes don't fire this — they surface via `flow:*`. */
|
|
98
|
+
type WithdrawStepChangedEvent = StridgeEventBase<"withdraw.step.changed", "withdraw", "ui", {
|
|
99
|
+
from: WithdrawStateName;
|
|
100
|
+
to: WithdrawStateName;
|
|
101
|
+
}>;
|
|
102
|
+
/**
|
|
103
|
+
* User typed in the recipient field. Fires per keystroke (no debounce); `payload.value` is the
|
|
104
|
+
* literal input string.
|
|
105
|
+
*/
|
|
106
|
+
type WithdrawRecipientChangedEvent = StridgeEventBase<"withdraw.recipient.changed", "withdraw", "ui", {
|
|
107
|
+
value: string;
|
|
108
|
+
}>;
|
|
109
|
+
/**
|
|
110
|
+
* User typed in the amount field. Fires per keystroke; `payload.raw` is the literal input
|
|
111
|
+
* string, `payload.numeric` is the parsed value (or `null` when empty / unparseable). Mirrors
|
|
112
|
+
* {@link DepositAmountChangedEvent}.
|
|
113
|
+
*/
|
|
114
|
+
type WithdrawAmountChangedEvent = StridgeEventBase<"withdraw.amount.changed", "withdraw", "ui", {
|
|
115
|
+
raw: string;
|
|
116
|
+
numeric: number | null;
|
|
117
|
+
}>;
|
|
118
|
+
/** User clicked the Max pill in the amount field. Empty payload — the amount is reactive form state. */
|
|
119
|
+
type WithdrawMaxClickedEvent = StridgeEventBase<"withdraw.max.clicked", "withdraw", "ui", Record<string, never>>;
|
|
120
|
+
/** User picked a different receive token in the form. */
|
|
121
|
+
type WithdrawReceiveTokenChangedEvent = StridgeEventBase<"withdraw.receive.token.changed", "withdraw", "ui", {
|
|
122
|
+
token: ReceiveTokenOptionPayload;
|
|
123
|
+
}>;
|
|
124
|
+
/** User picked a different receive chain in the form. */
|
|
125
|
+
type WithdrawReceiveChainChangedEvent = StridgeEventBase<"withdraw.receive.chain.changed", "withdraw", "ui", {
|
|
126
|
+
chain: ReceiveChainPayload;
|
|
127
|
+
}>;
|
|
128
|
+
/**
|
|
129
|
+
* User clicked the submit button on the form. This is the UI signal; the FSM commitment is
|
|
130
|
+
* carried by {@link WithdrawSubmissionConfirmedEvent} immediately after.
|
|
131
|
+
*/
|
|
132
|
+
type WithdrawSubmitClickedEvent = StridgeEventBase<"withdraw.submit.clicked", "withdraw", "ui", Record<string, never>>;
|
|
133
|
+
/**
|
|
134
|
+
* Form submission triggered the orchestrator transition to `submitting`. Fires just before
|
|
135
|
+
* the host's `WithdrawSubmitCallback` runs.
|
|
136
|
+
*/
|
|
137
|
+
type WithdrawSubmissionConfirmedEvent = StridgeEventBase<"withdraw.submission.confirmed", "withdraw", "ui", Record<string, never>>;
|
|
138
|
+
/**
|
|
139
|
+
* User clicked the breakdown card header to toggle it. `payload.open` reflects the new state.
|
|
140
|
+
* Deposit has no symmetric event — the deposit flow doesn't surface a breakdown card today.
|
|
141
|
+
*/
|
|
142
|
+
type WithdrawBreakdownClickedEvent = StridgeEventBase<"withdraw.breakdown.clicked", "withdraw", "ui", {
|
|
143
|
+
open: boolean;
|
|
144
|
+
}>;
|
|
145
|
+
/** Union of every `withdraw.*` `ui:*` event. */
|
|
146
|
+
type WithdrawUiEvent = WithdrawOpenedEvent | WithdrawClosedEvent | WithdrawStepChangedEvent | WithdrawRecipientChangedEvent | WithdrawAmountChangedEvent | WithdrawMaxClickedEvent | WithdrawReceiveTokenChangedEvent | WithdrawReceiveChainChangedEvent | WithdrawSubmitClickedEvent | WithdrawSubmissionConfirmedEvent | WithdrawBreakdownClickedEvent;
|
|
147
|
+
/** Union of every `withdraw.*` event regardless of tier. */
|
|
148
|
+
type WithdrawEvent = WithdrawFlowEvent | WithdrawUiEvent;
|
|
149
|
+
//#endregion
|
|
150
|
+
export { WithdrawAmountChangedEvent, WithdrawBreakdownClickedEvent, WithdrawCancelPhase, WithdrawCancelledEvent, WithdrawClosedEvent, WithdrawEvent, WithdrawFlowEvent, WithdrawMaxClickedEvent, WithdrawOpenedEvent, WithdrawQuoteExpiredEvent, WithdrawQuoteFailedEvent, WithdrawQuoteRequestedEvent, WithdrawQuoteResolvedEvent, WithdrawReceiveChainChangedEvent, WithdrawReceiveTokenChangedEvent, WithdrawRecipientChangedEvent, WithdrawSettlementFailedEvent, WithdrawSettlementFailurePayload, WithdrawSettlementProgressedEvent, WithdrawSettlementSucceededEvent, WithdrawStepChangedEvent, WithdrawSubmissionBroadcastEvent, WithdrawSubmissionConfirmedEvent, WithdrawSubmissionDeclinedEvent, WithdrawSubmissionFailedEvent, WithdrawSubmitClickedEvent, WithdrawUiEvent };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ActivityStateName } from "../orchestrator/types.js";
|
|
2
|
+
import { ActivityBoundary, Props } from "./components/Boundary.js";
|
|
3
|
+
import { ActivitySteps, ActivityStepsProps } from "./components/Steps.js";
|
|
4
|
+
import { ReactNode } from "react";
|
|
5
|
+
|
|
6
|
+
//#region src/flows/activity/compound/ActivityFlow.d.ts
|
|
7
|
+
interface ActivityFlowStepProps {
|
|
8
|
+
/** Matches against the standalone activity FSM's effective state name. */
|
|
9
|
+
name: ActivityStateName;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Flow-coupled compound namespace for the standalone activity surface. Mirrors the
|
|
14
|
+
* `Deposit.*` / `Withdraw.*` shapes — parts that consume the standalone activity controller
|
|
15
|
+
* live here. The flow-agnostic presentation primitives (`Activity.Header`, `Activity.List`,
|
|
16
|
+
* `Activity.Row`, etc.) stay on the shared `Activity` namespace.
|
|
17
|
+
*
|
|
18
|
+
* Parts:
|
|
19
|
+
* - {@link ActivityFlow.Boundary} — error-boundary wired to `useActivity().close()`.
|
|
20
|
+
* - {@link ActivityFlow.Steps} — slot router reading `useActivityEffectiveState()`.
|
|
21
|
+
* - {@link ActivityFlow.Step} — declarative slot consumed by `ActivityFlow.Steps`.
|
|
22
|
+
*
|
|
23
|
+
* No `Guards` part — activity has no wallet-required / bootstrap-fatal cascade.
|
|
24
|
+
*/
|
|
25
|
+
declare namespace ActivityFlow {
|
|
26
|
+
type BoundaryProps = Props;
|
|
27
|
+
type StepsProps = ActivityStepsProps;
|
|
28
|
+
type StepProps = ActivityFlowStepProps;
|
|
29
|
+
/**
|
|
30
|
+
* Error-boundary part. Wires the kit's `GatewayKitBoundary` with activity-flow recovery —
|
|
31
|
+
* `onReset` calls `useActivity().close()` internally; `onError` is host-supplied.
|
|
32
|
+
*/
|
|
33
|
+
const Boundary: typeof ActivityBoundary;
|
|
34
|
+
/**
|
|
35
|
+
* Slot-routing parent. Reads the activity FSM's effective state and renders only the
|
|
36
|
+
* matching `<ActivityFlow.Step>` child.
|
|
37
|
+
*/
|
|
38
|
+
const Steps: typeof ActivitySteps;
|
|
39
|
+
/**
|
|
40
|
+
* Slot consumed by {@link ActivityFlow.Steps}. `name` is the FSM state to match; the
|
|
41
|
+
* matched step's `children` are rendered, every other branch is dropped.
|
|
42
|
+
*/
|
|
43
|
+
const Step: (props: ActivityFlowStepProps) => null;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { ActivityFlow };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{Step as e}from"../../../shared/ui/Steps/Steps.js";import"../../../shared/ui/Steps/index.js";import{ActivityBoundary as t}from"./components/Boundary.js";import{ActivitySteps as n}from"./components/Steps.js";let r;(function(r){r.Boundary=t,r.Steps=n,r.Step=e})(r||={});export{r as ActivityFlow};
|