@stridge/kit 0.1.0-alpha.6 → 0.1.0-alpha.60
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 +61 -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 +2 -2
- 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 +2 -1
- 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 +22 -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 +16 -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/createStridgeMockActivityDriver.d.ts +44 -0
- package/dist/drivers/stridge-mock/createStridgeMockActivityDriver.js +1 -0
- package/dist/drivers/stridge-mock/createStridgeMockDriver.d.ts +2 -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 +14 -12
- package/dist/drivers/stridge-mock/fixtures.js +1 -1
- 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/bindings/DepositBindings.d.ts +87 -0
- package/dist/flows/deposit/bindings/DepositBindings.js +1 -0
- package/dist/flows/deposit/bindings/index.d.ts +1 -0
- package/dist/flows/deposit/bindings/index.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 +52 -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 +37 -4
- 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 +228 -7
- package/dist/flows/deposit/orchestrator/useDeposit.d.ts +45 -1
- package/dist/flows/deposit/orchestrator/useDeposit.js +1 -1
- package/dist/flows/deposit/shared/cash.d.ts +20 -0
- package/dist/flows/deposit/shared/cash.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/cash-amount-entry/CashAmountEntry.d.ts +71 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/CashAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.d.ts +69 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.d.ts +16 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.styles.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.d.ts +13 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/HeroLabel.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.d.ts +18 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/MethodChip.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.d.ts +14 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/components/ReceiveChip.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/compound/types.d.ts +42 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/cash-amount-entry/index.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/CashConfirm.d.ts +63 -0
- package/dist/flows/deposit/widgets/cash-confirm/CashConfirm.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.d.ts +54 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.d.ts +33 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/CashConfirm.styles.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/cashConfirmDimensions.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/ApplePayBody.d.ts +15 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/ApplePayBody.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Body.d.ts +22 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Body.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/BodyLabel.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardBody.d.ts +16 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardBody.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.icons.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.keys.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.state.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/CardInputRow.styles.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.d.ts +16 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/GooglePayBody.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Header.d.ts +21 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Header.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Summary.d.ts +17 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/Summary.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/components/cardFormat.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/context.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/index.d.ts +3 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/index.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/compound/types.d.ts +66 -0
- package/dist/flows/deposit/widgets/cash-confirm/index.d.ts +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/index.js +1 -0
- package/dist/flows/deposit/widgets/cash-confirm/mocks.js +1 -0
- 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 +16 -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/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 +12 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +36 -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/AmexIcon.d.ts +14 -0
- package/dist/shared/icons/AmexIcon.js +1 -0
- package/dist/shared/icons/ApplePayIcon.d.ts +15 -0
- package/dist/shared/icons/ApplePayIcon.js +1 -0
- package/dist/shared/icons/BitcoinIcon.d.ts +17 -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/CashIcon.d.ts +16 -0
- package/dist/shared/icons/CashIcon.js +1 -0
- package/dist/shared/icons/DiscoverIcon.d.ts +14 -0
- package/dist/shared/icons/DiscoverIcon.js +1 -0
- package/dist/shared/icons/GooglePayIcon.d.ts +15 -0
- package/dist/shared/icons/GooglePayIcon.js +1 -0
- package/dist/shared/icons/LogoIcon.d.ts +13 -0
- package/dist/shared/icons/LogoIcon.js +1 -0
- package/dist/shared/icons/MastercardIcon.d.ts +16 -0
- package/dist/shared/icons/MastercardIcon.js +1 -0
- package/dist/shared/icons/VisaIcon.d.ts +15 -0
- package/dist/shared/icons/VisaIcon.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/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 +63 -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 +187 -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 +607 -12
- package/dist/types.d.ts +7 -5
- 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
package/README.md
CHANGED
|
@@ -10,28 +10,44 @@ React widgets and headless hooks for the Stridge Gateway — drop-in deposit and
|
|
|
10
10
|
pnpm add @stridge/kit
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Peer dependencies: `react`, `react-dom`, `viem
|
|
13
|
+
Peer dependencies: `react`, `react-dom`, `viem`. `wagmi` is optional — required only when you enable the deposit/wallet method (the customer signs the source-chain transfer from their connected wallet). Withdraw and deposit/transfer-crypto work without wagmi.
|
|
14
14
|
|
|
15
15
|
## Quick start
|
|
16
16
|
|
|
17
17
|
```tsx
|
|
18
|
-
import { StridgeProvider
|
|
18
|
+
import { StridgeProvider } from "@stridge/kit";
|
|
19
19
|
import { DepositDialog } from "@stridge/kit/deposit/dialog";
|
|
20
20
|
import { WithdrawDialog } from "@stridge/kit/withdraw/dialog";
|
|
21
21
|
|
|
22
22
|
<StridgeProvider
|
|
23
23
|
gatewayKey={process.env.NEXT_PUBLIC_STRIDGE_GATEWAY_KEY!}
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
// `networkId` is the Stridge network id, listed at
|
|
25
|
+
// https://api.stridge.com/v1/uda/supported-assets — "9006" is BSC.
|
|
26
|
+
asset={{ networkId: "9006", symbol: "USDC" }}
|
|
27
|
+
flows={{
|
|
28
|
+
deposit: {
|
|
29
|
+
// Required — where bridged funds settle (your treasury, or the customer's wallet
|
|
30
|
+
// under a same-owner-only gateway-kit configuration).
|
|
31
|
+
destination: { address: customerAddress },
|
|
32
|
+
// Optional — `gateway/start.owner` for deposit UDAs. Falls back to the connected
|
|
33
|
+
// wagmi wallet when omitted.
|
|
34
|
+
owner: { address: customerAddress },
|
|
35
|
+
},
|
|
36
|
+
withdraw: {
|
|
37
|
+
// Required — `gateway/start.owner` for withdraw UDAs. The kit scopes settlement
|
|
38
|
+
// polls against this address.
|
|
39
|
+
owner: { address: customerAddress },
|
|
40
|
+
},
|
|
41
|
+
}}
|
|
26
42
|
appearance={{ theme: "dark", accent: "oklch(78% 0.15 240)", radius: "rounded" }}
|
|
27
43
|
>
|
|
28
44
|
<YourApp />
|
|
29
45
|
<DepositDialog />
|
|
30
|
-
<WithdrawDialog />
|
|
46
|
+
<WithdrawDialog balance={liveBalance} onSubmit={handleWithdrawSubmit} />
|
|
31
47
|
</StridgeProvider>;
|
|
32
48
|
```
|
|
33
49
|
|
|
34
|
-
Open or close the dialogs with `useDeposit().open()` / `useWithdraw().open()`. Headless integrators render their own UI via `useDeposit()`, `useDepositState()`, `useDepositSnapshot()` and the withdraw mirrors — the root entry ships no UI, so the headless bundle stays clean.
|
|
50
|
+
Open or close the dialogs with `useDeposit().open()` / `useWithdraw().open()`. Headless integrators render their own UI via `useDeposit()`, `useDepositState()`, `useDepositSnapshot()` and the withdraw mirrors — the root entry ships no UI, so the headless bundle stays clean. `useOptionalDeposit()` / `useOptionalWithdraw()` return `null` when called outside the provider, for hosts that mount `<StridgeProvider />` conditionally (e.g. only after a wallet is connected).
|
|
35
51
|
|
|
36
52
|
## Documentation
|
|
37
53
|
|
package/dist/KitProvider.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import { ActivityDriver } from "./flows/activity/driver/types.js";
|
|
1
2
|
import { DepositDriver } from "./flows/deposit/driver/types.js";
|
|
3
|
+
import { DepositMethodsConfig } from "./flows/deposit/orchestrator/types.js";
|
|
2
4
|
import { WithdrawDriver } from "./flows/withdraw/driver/types.js";
|
|
3
5
|
import { KitScope } from "./scope/KitScope.js";
|
|
4
6
|
import { KitI18nConfig } from "./shared/i18n/createKitI18n.js";
|
|
7
|
+
import { IntercomMerchantContext } from "./shared/support/useIntercomMerchantContext.js";
|
|
8
|
+
import { SupportConfig } from "./shared/support/types.js";
|
|
9
|
+
import { TermsConfig } from "./shared/terms/types.js";
|
|
5
10
|
import { KitStoragePersistence } from "./storage/types.js";
|
|
6
11
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
7
12
|
|
|
@@ -45,11 +50,33 @@ declare function KitProvider({
|
|
|
45
50
|
i18n,
|
|
46
51
|
direction,
|
|
47
52
|
deposit,
|
|
53
|
+
depositMethods,
|
|
48
54
|
withdraw,
|
|
55
|
+
activity,
|
|
49
56
|
storage,
|
|
50
57
|
storageNamespace,
|
|
58
|
+
support,
|
|
59
|
+
merchantContext,
|
|
60
|
+
terms,
|
|
61
|
+
dev,
|
|
62
|
+
attribution,
|
|
51
63
|
...scopeProps
|
|
52
64
|
}: KitProvider.Props): _$react_jsx_runtime0.JSX.Element;
|
|
65
|
+
/**
|
|
66
|
+
* Development / preview-only knobs for `<KitProvider />`. Grouped under a single `dev` prop so
|
|
67
|
+
* production integrations never reach for these accidentally. Intentionally not re-exported from
|
|
68
|
+
* any public entry barrel — `KitProvider` itself ships only from `@stridge/kit/_internal`.
|
|
69
|
+
*/
|
|
70
|
+
interface KitDevConfig {
|
|
71
|
+
/**
|
|
72
|
+
* Unlock the cash payment rail. The cash UI is currently UI-only (no backend), so the rail is
|
|
73
|
+
* fused off everywhere by default; this knob is the only switch that lights it up, and it
|
|
74
|
+
* lives here on the `_internal` provider so production `<StridgeProvider />` consumers cannot
|
|
75
|
+
* surface cash before it ships. The host's `depositMethods.cashRail.enabled` opt-in is still
|
|
76
|
+
* required *in addition* to this gate. Remove once the cash backend lands.
|
|
77
|
+
*/
|
|
78
|
+
cashRail?: boolean;
|
|
79
|
+
}
|
|
53
80
|
declare namespace KitProvider {
|
|
54
81
|
interface Props extends KitScope.Props {
|
|
55
82
|
/**
|
|
@@ -65,6 +92,14 @@ declare namespace KitProvider {
|
|
|
65
92
|
* `@stridge/kit/deposit/dialog` read from it.
|
|
66
93
|
*/
|
|
67
94
|
deposit?: DepositDriver;
|
|
95
|
+
/**
|
|
96
|
+
* Per-method host disable lever for the deposit-method picker. Lets the host mark Wallet
|
|
97
|
+
* or Transfer Crypto unavailable for the current user (embedded-wallet hosts, KYC gates,
|
|
98
|
+
* regional restrictions, …) without removing the option from the picker. Surfaced as a
|
|
99
|
+
* natively disabled tile with the optional `disabledHint` rendered inline as the meta
|
|
100
|
+
* line below the title.
|
|
101
|
+
*/
|
|
102
|
+
depositMethods?: DepositMethodsConfig;
|
|
68
103
|
/**
|
|
69
104
|
* Host-supplied {@link WithdrawDriver} — source of reactive data + imperative actions for
|
|
70
105
|
* the withdraw flow. When supplied, the provider mounts the withdraw driver context and
|
|
@@ -72,6 +107,15 @@ declare namespace KitProvider {
|
|
|
72
107
|
* `@stridge/kit/withdraw/dialog` read from it.
|
|
73
108
|
*/
|
|
74
109
|
withdraw?: WithdrawDriver;
|
|
110
|
+
/**
|
|
111
|
+
* Host-supplied {@link ActivityDriver} — source of reactive owner-scoped activity data and
|
|
112
|
+
* the imperative `useActivity()` controller's polling lifecycle. When supplied, the
|
|
113
|
+
* provider mounts the activity driver context and the standalone activity controller;
|
|
114
|
+
* `<ActivityDialog>` from `@stridge/kit/activity/dialog` reads from this slot, and the
|
|
115
|
+
* in-flow activity icons inside `<DepositDialog>` / `<WithdrawDialog>` source their
|
|
116
|
+
* entity from here too. When omitted, the in-flow activity icon hides gracefully.
|
|
117
|
+
*/
|
|
118
|
+
activity?: ActivityDriver;
|
|
75
119
|
/**
|
|
76
120
|
* Persistence backing the kit's per-tab state (banner acknowledgments, future kit-wide
|
|
77
121
|
* features). One of `"session"` (default — `sessionStorage`, forgotten on tab close),
|
|
@@ -85,6 +129,23 @@ declare namespace KitProvider {
|
|
|
85
129
|
* keep state isolated. Defaults to `stridge-kit:storage:v1`.
|
|
86
130
|
*/
|
|
87
131
|
storageNamespace?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Merchant-configurable in-dialog "Get help" override for direct `<KitProvider />` mounts.
|
|
134
|
+
*/
|
|
135
|
+
support?: SupportConfig;
|
|
136
|
+
/**
|
|
137
|
+
* Merchant and user triage metadata passed to merchant-owned support callbacks.
|
|
138
|
+
*/
|
|
139
|
+
merchantContext?: IntercomMerchantContext;
|
|
140
|
+
/**
|
|
141
|
+
* Merchant-configurable terms link for direct `<KitProvider />` mounts.
|
|
142
|
+
*/
|
|
143
|
+
terms?: TermsConfig;
|
|
144
|
+
/**
|
|
145
|
+
* Development / preview-only knobs. See {@link KitDevConfig}. Grouped under `dev` so
|
|
146
|
+
* production integrations never reach for them accidentally.
|
|
147
|
+
*/
|
|
148
|
+
dev?: KitDevConfig;
|
|
88
149
|
}
|
|
89
150
|
}
|
|
90
151
|
//#endregion
|
package/dist/KitProvider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{KitStorageProvider as e}from"./storage/context.js";import"./storage/index.js";import{
|
|
1
|
+
"use client";import{KitStorageProvider as e}from"./storage/context.js";import"./storage/index.js";import{ActivityDriverProvider as t}from"./flows/activity/driver/context.js";import{getLocaleDirection as n}from"./shared/i18n/getLocaleDirection.js";import{KitI18nProvider as r}from"./shared/i18n/KitI18nProvider.js";import"./i18n/index.js";import{ActivityControllerProvider as i}from"./flows/activity/orchestrator/controller.js";import{DepositBindingsProvider as a}from"./flows/deposit/bindings/DepositBindings.js";import"./flows/deposit/bindings/index.js";import{DepositDriverProvider as o}from"./flows/deposit/driver/context.js";import{GatewayController as s}from"./flows/deposit/orchestrator/controller.js";import{WithdrawBindingsProvider as c}from"./flows/withdraw/bindings/WithdrawBindings.js";import"./flows/withdraw/bindings/index.js";import{WithdrawDriverProvider as l}from"./flows/withdraw/driver/context.js";import{WithdrawControllerProvider as u}from"./flows/withdraw/orchestrator/controller.js";import{KitScope as d}from"./scope/KitScope.js";import"./scope/index.js";import{SupportConfigContext as f}from"./shared/support/SupportConfigContext.js";import{TermsConfigContext as p}from"./shared/terms/TermsConfigContext.js";import{useMemo as m}from"react";import{jsx as h}from"react/jsx-runtime";import{LazyMotion as g,domMax as _}from"motion/react";function v({children:v,i18n:y,direction:b,deposit:x,depositMethods:S,withdraw:C,activity:w,storage:T,storageNamespace:E,support:D,merchantContext:O,terms:k,dev:A,attribution:j=`visible`,...M}){let N=n(y?.locale),P=v;C&&(P=h(c,{children:h(l,{driver:C,children:h(u,{children:P})})})),x&&(P=h(a,{children:h(o,{driver:x,children:h(s,{methodsConfig:S,cashRailUnlocked:A?.cashRail===!0,children:P})})})),w&&(P=h(t,{driver:w,children:h(i,{children:P})}));let F=m(()=>({config:D,merchantContext:O??null}),[D,O]),I=D!==void 0||O!==void 0,L=m(()=>({config:k}),[k]),R=k!==void 0,z=h(r,{locale:y?.locale,messages:y?.messages,children:h(d,{...M,direction:b??N,locale:y?.locale,attribution:j,children:h(e,{storage:T,namespace:E,children:P})})});return I&&(z=h(f.Provider,{value:F,children:z})),R&&(z=h(p.Provider,{value:L,children:z})),h(g,{features:_,children:z})}export{v as KitProvider};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ActivityDriver, ActivitySnapshot } from "../../../flows/activity/driver/types.js";
|
|
2
|
+
import { ActivityDriverContext, ActivityDriverProvider, useActivityDriverInstance, useActivitySnapshot, useOptionalActivityDriverInstance } from "../../../flows/activity/driver/context.js";
|
|
3
|
+
export { type ActivityDriver, ActivityDriverContext, ActivityDriverProvider, type ActivitySnapshot, useActivityDriverInstance, useActivitySnapshot, useOptionalActivityDriverInstance };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ActivityDriverContext as e,ActivityDriverProvider as t,useActivityDriverInstance as n,useActivitySnapshot as r,useOptionalActivityDriverInstance as i}from"../../../flows/activity/driver/context.js";export{e as ActivityDriverContext,t as ActivityDriverProvider,n as useActivityDriverInstance,r as useActivitySnapshot,i as useOptionalActivityDriverInstance};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Entity, SettlementFailureKind, TxRef } from "../../../shared/driver/types.js";
|
|
2
|
-
import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload } from "../../../flows/deposit/driver/payloads.js";
|
|
2
|
+
import { AcceptedAssetPayload, AddressItemPayload, AssetPayload, BalanceItemPayload, BrandPayload, CashMethodCapability, CashMethodsPayload, ChainPayload, QuoteBreakdownPayload, QuotePayload, QuoteRoutePayload, SettlementFailurePayload, SettlementPayload, SettlementPendingPayload, SettlementSuccessPayload, SourceWalletPayload, TargetPayload, WalletInfo, WalletPayload } from "../../../flows/deposit/driver/payloads.js";
|
|
3
3
|
import { DepositDriver, DepositSnapshot, FetchActiveSettlementInput, RequestQuoteInput, SettlementSnapshot, SubmitDepositInput, WatchSettlementInput, WatchSourceTxInput } from "../../../flows/deposit/driver/types.js";
|
|
4
4
|
import { DepositDriverProvider, KitDriverContext, useDepositDriverInstance, useDepositSnapshot } from "../../../flows/deposit/driver/context.js";
|
|
5
|
-
export { type AcceptedAssetPayload, type AddressItemPayload, type AssetPayload, type BalanceItemPayload, type BrandPayload, type ChainPayload, type DepositDriver, DepositDriverProvider, type DepositSnapshot, type Entity, type FetchActiveSettlementInput, KitDriverContext, type QuoteBreakdownPayload, type QuotePayload, type QuoteRoutePayload, type RequestQuoteInput, type SettlementFailureKind, type SettlementFailurePayload, type SettlementPayload, type SettlementPendingPayload, type SettlementSnapshot, type SettlementSuccessPayload, type SourceWalletPayload, type SubmitDepositInput, type TargetPayload, type TxRef, type WalletInfo, type WalletPayload, type WatchSettlementInput, type WatchSourceTxInput, useDepositDriverInstance, useDepositSnapshot };
|
|
5
|
+
export { type AcceptedAssetPayload, type AddressItemPayload, type AssetPayload, type BalanceItemPayload, type BrandPayload, type CashMethodCapability, type CashMethodsPayload, type ChainPayload, type DepositDriver, DepositDriverProvider, type DepositSnapshot, type Entity, type FetchActiveSettlementInput, KitDriverContext, type QuoteBreakdownPayload, type QuotePayload, type QuoteRoutePayload, type RequestQuoteInput, type SettlementFailureKind, type SettlementFailurePayload, type SettlementPayload, type SettlementPendingPayload, type SettlementSnapshot, type SettlementSuccessPayload, type SourceWalletPayload, type SubmitDepositInput, type TargetPayload, type TxRef, type WalletInfo, type WalletPayload, type WatchSettlementInput, type WatchSourceTxInput, useDepositDriverInstance, useDepositSnapshot };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { StridgeChainSlug, StridgeRpc, StridgeRpcConfig, StridgeRpcWaitInput, createStridgeRpc } from "../../../drivers/stridge/rpc.js";
|
|
2
|
-
import { STRIDGE_DEFAULT_ENVIRONMENT,
|
|
2
|
+
import { STRIDGE_DEFAULT_ENVIRONMENT, StridgeDriverConfig, StridgeDriverDestination, StridgeEnvironment, StridgePollIntervals, StridgeTokenIconResolverEntry } from "../../../drivers/stridge/types.js";
|
|
3
|
+
import { CreateStridgeCatalogInput, StridgeCatalog, createStridgeCatalog } from "../../../drivers/stridge/catalog.js";
|
|
4
|
+
import { CreateStridgeActivityDriverInput, createStridgeActivityDriver } from "../../../drivers/stridge/createStridgeActivityDriver.js";
|
|
3
5
|
import { CreateStridgeDepositDriverInput, createStridgeDepositDriver } from "../../../drivers/stridge/createStridgeDepositDriver.js";
|
|
4
6
|
import { CreateStridgeWithdrawDriverInput, StridgeWithdrawCurrency, createStridgeWithdrawDriver } from "../../../drivers/stridge/createStridgeWithdrawDriver.js";
|
|
5
7
|
import { GatewayStartResponse, SupportedAssetsResponse } from "@stridge/sdk";
|
|
6
|
-
export { type CreateStridgeDepositDriverInput, type CreateStridgeWithdrawDriverInput, type GatewayStartResponse, STRIDGE_DEFAULT_ENVIRONMENT,
|
|
8
|
+
export { type CreateStridgeActivityDriverInput, type CreateStridgeCatalogInput, type CreateStridgeDepositDriverInput, type CreateStridgeWithdrawDriverInput, type GatewayStartResponse, STRIDGE_DEFAULT_ENVIRONMENT, type StridgeCatalog, type StridgeChainSlug, type StridgeDriverConfig, type StridgeDriverDestination, type StridgeEnvironment, type StridgePollIntervals, type StridgeRpc, type StridgeRpcConfig, type StridgeRpcWaitInput, type StridgeTokenIconResolverEntry, type StridgeWithdrawCurrency, type SupportedAssetsResponse, createStridgeActivityDriver, createStridgeCatalog, createStridgeDepositDriver, createStridgeRpc, createStridgeWithdrawDriver };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{STRIDGE_DEFAULT_ENVIRONMENT as e
|
|
1
|
+
import{STRIDGE_DEFAULT_ENVIRONMENT as e}from"../../../drivers/stridge/types.js";import{createStridgeCatalog as t}from"../../../drivers/stridge/catalog.js";import{createStridgeActivityDriver as n}from"../../../drivers/stridge/createStridgeActivityDriver.js";import{createStridgeRpc as r}from"../../../drivers/stridge/rpc.js";import{createStridgeDepositDriver as i}from"../../../drivers/stridge/createStridgeDepositDriver.js";import{createStridgeWithdrawDriver as a}from"../../../drivers/stridge/createStridgeWithdrawDriver.js";export{e as STRIDGE_DEFAULT_ENVIRONMENT,n as createStridgeActivityDriver,t as createStridgeCatalog,i as createStridgeDepositDriver,r as createStridgeRpc,a as createStridgeWithdrawDriver};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { CreateStridgeMockActivityDriverInput, MockActivityDriverHandle, MockActivityDriverLatency, createStridgeMockActivityDriver } from "../../../drivers/stridge-mock/createStridgeMockActivityDriver.js";
|
|
1
2
|
import { DEFAULT_ADDRESSES_PAYLOAD, DEFAULT_BRAND_PAYLOAD, DEFAULT_TARGET_RAW, DEFAULT_WALLET_INFO, buildDefaultAddressesPayload, buildDefaultBalances, buildDefaultFailurePayload, buildDefaultPendingPayload, buildDefaultQuotePayload, buildDefaultSuccessPayload, buildDefaultTargetPayload, buildDefaultWalletPayload, buildSettlementPayload } from "../../../drivers/stridge-mock/fixtures.js";
|
|
2
3
|
import { MockTriggers } from "../../../drivers/stridge-mock/triggers.js";
|
|
3
4
|
import { CreateStridgeMockDriverInput, MockDriverHandle, createStridgeMockDriver } from "../../../drivers/stridge-mock/createStridgeMockDriver.js";
|
|
4
5
|
import { CreateStridgeMockWithdrawDriverInput, MockWithdrawDriverHandle, MockWithdrawTriggers, buildDefaultWithdrawableBalances, buildDefaultWithdrawalFailurePayload, buildDefaultWithdrawalPendingPayload, buildDefaultWithdrawalQuotePayload, buildDefaultWithdrawalSuccessPayload, createStridgeMockWithdrawDriver } from "../../../drivers/stridge-mock/createStridgeMockWithdrawDriver.js";
|
|
5
|
-
export { type CreateStridgeMockDriverInput, type CreateStridgeMockWithdrawDriverInput, DEFAULT_ADDRESSES_PAYLOAD, DEFAULT_BRAND_PAYLOAD, DEFAULT_TARGET_RAW, DEFAULT_WALLET_INFO, type MockDriverHandle, type MockTriggers, type MockWithdrawDriverHandle, type MockWithdrawTriggers, buildDefaultAddressesPayload, buildDefaultBalances, buildDefaultFailurePayload, buildDefaultPendingPayload, buildDefaultQuotePayload, buildDefaultSuccessPayload, buildDefaultTargetPayload, buildDefaultWalletPayload, buildDefaultWithdrawableBalances, buildDefaultWithdrawalFailurePayload, buildDefaultWithdrawalPendingPayload, buildDefaultWithdrawalQuotePayload, buildDefaultWithdrawalSuccessPayload, buildSettlementPayload, createStridgeMockDriver as createStridgeMockDepositDriver, createStridgeMockDriver, createStridgeMockWithdrawDriver };
|
|
6
|
+
export { type CreateStridgeMockActivityDriverInput, type CreateStridgeMockDriverInput, type CreateStridgeMockWithdrawDriverInput, DEFAULT_ADDRESSES_PAYLOAD, DEFAULT_BRAND_PAYLOAD, DEFAULT_TARGET_RAW, DEFAULT_WALLET_INFO, type MockActivityDriverHandle, type MockActivityDriverLatency, type MockDriverHandle, type MockTriggers, type MockWithdrawDriverHandle, type MockWithdrawTriggers, buildDefaultAddressesPayload, buildDefaultBalances, buildDefaultFailurePayload, buildDefaultPendingPayload, buildDefaultQuotePayload, buildDefaultSuccessPayload, buildDefaultTargetPayload, buildDefaultWalletPayload, buildDefaultWithdrawableBalances, buildDefaultWithdrawalFailurePayload, buildDefaultWithdrawalPendingPayload, buildDefaultWithdrawalQuotePayload, buildDefaultWithdrawalSuccessPayload, buildSettlementPayload, createStridgeMockActivityDriver, createStridgeMockDriver as createStridgeMockDepositDriver, createStridgeMockDriver, createStridgeMockWithdrawDriver };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DEFAULT_ADDRESSES_PAYLOAD as e,DEFAULT_BRAND_PAYLOAD as t,DEFAULT_TARGET_RAW as n,DEFAULT_WALLET_INFO as r,buildDefaultAddressesPayload as i,buildDefaultBalances as a,buildDefaultFailurePayload as o,buildDefaultPendingPayload as s,buildDefaultQuotePayload as c,buildDefaultSuccessPayload as l,buildDefaultTargetPayload as u,buildDefaultWalletPayload as d,buildSettlementPayload as f}from"../../../drivers/stridge-mock/fixtures.js";import{
|
|
1
|
+
import{DEFAULT_ADDRESSES_PAYLOAD as e,DEFAULT_BRAND_PAYLOAD as t,DEFAULT_TARGET_RAW as n,DEFAULT_WALLET_INFO as r,buildDefaultAddressesPayload as i,buildDefaultBalances as a,buildDefaultFailurePayload as o,buildDefaultPendingPayload as s,buildDefaultQuotePayload as c,buildDefaultSuccessPayload as l,buildDefaultTargetPayload as u,buildDefaultWalletPayload as d,buildSettlementPayload as f}from"../../../drivers/stridge-mock/fixtures.js";import{createStridgeMockActivityDriver as p}from"../../../drivers/stridge-mock/createStridgeMockActivityDriver.js";import{createStridgeMockDriver as m}from"../../../drivers/stridge-mock/createStridgeMockDriver.js";import{buildDefaultWithdrawableBalances as h,buildDefaultWithdrawalFailurePayload as g,buildDefaultWithdrawalPendingPayload as _,buildDefaultWithdrawalQuotePayload as v,buildDefaultWithdrawalSuccessPayload as y,createStridgeMockWithdrawDriver as b}from"../../../drivers/stridge-mock/createStridgeMockWithdrawDriver.js";export{e as DEFAULT_ADDRESSES_PAYLOAD,t as DEFAULT_BRAND_PAYLOAD,n as DEFAULT_TARGET_RAW,r as DEFAULT_WALLET_INFO,i as buildDefaultAddressesPayload,a as buildDefaultBalances,o as buildDefaultFailurePayload,s as buildDefaultPendingPayload,c as buildDefaultQuotePayload,l as buildDefaultSuccessPayload,u as buildDefaultTargetPayload,d as buildDefaultWalletPayload,h as buildDefaultWithdrawableBalances,g as buildDefaultWithdrawalFailurePayload,_ as buildDefaultWithdrawalPendingPayload,v as buildDefaultWithdrawalQuotePayload,y as buildDefaultWithdrawalSuccessPayload,f as buildSettlementPayload,p as createStridgeMockActivityDriver,m as createStridgeMockDepositDriver,m as createStridgeMockDriver,b as createStridgeMockWithdrawDriver};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Entity, SettlementFailureKind, TxRef } from "../../../shared/driver/types.js";
|
|
2
2
|
import { ReceiveOptionDto, ReceiveOptionsResponse, WithdrawableBalanceDto, WithdrawableBalancesResponse, WithdrawalQuoteDto, WithdrawalQuoteResponse, WithdrawalSettlementDto, WithdrawalSettlementResponse } from "../../../flows/withdraw/driver/dto.js";
|
|
3
3
|
import { ReceiveChainPayload, ReceiveTokenOptionPayload, WithdrawableBalanceItemPayload, WithdrawalQuoteBreakdownPayload, WithdrawalQuotePayload, WithdrawalReceiveAssetPayload, WithdrawalSettlementFailurePayload, WithdrawalSettlementPayload, WithdrawalSettlementPendingPayload, WithdrawalSettlementSuccessPayload } from "../../../flows/withdraw/driver/payloads.js";
|
|
4
|
-
import {
|
|
4
|
+
import { PrepareWithdrawalInput, RequestWithdrawalQuoteInput, WatchWithdrawableBalancesInput, WatchWithdrawalSettlementInput, WithdrawDriver, WithdrawPreparation, WithdrawSnapshot } from "../../../flows/withdraw/driver/types.js";
|
|
5
5
|
import { WithdrawDriverProvider, useWithdrawDriverInstance, useWithdrawSnapshot } from "../../../flows/withdraw/driver/context.js";
|
|
6
|
-
export { type Entity, type ReceiveChainPayload, type ReceiveOptionDto, type ReceiveOptionsResponse, type ReceiveTokenOptionPayload, type RequestWithdrawalQuoteInput, type SettlementFailureKind, type
|
|
6
|
+
export { type Entity, type PrepareWithdrawalInput, type ReceiveChainPayload, type ReceiveOptionDto, type ReceiveOptionsResponse, type ReceiveTokenOptionPayload, type RequestWithdrawalQuoteInput, type SettlementFailureKind, type TxRef, type WatchWithdrawableBalancesInput, type WatchWithdrawalSettlementInput, type WithdrawDriver, WithdrawDriverProvider, type WithdrawPreparation, type WithdrawSnapshot, type WithdrawableBalanceDto, type WithdrawableBalanceItemPayload, type WithdrawableBalancesResponse, type WithdrawalQuoteBreakdownPayload, type WithdrawalQuoteDto, type WithdrawalQuotePayload, type WithdrawalQuoteResponse, type WithdrawalReceiveAssetPayload, type WithdrawalSettlementDto, type WithdrawalSettlementFailurePayload, type WithdrawalSettlementPayload, type WithdrawalSettlementPendingPayload, type WithdrawalSettlementResponse, type WithdrawalSettlementSuccessPayload, useWithdrawDriverInstance, useWithdrawSnapshot };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ActivityAmount, ActivityPayload, ActivityRowPayload } from "../../shared/widgets/activity/payloads.js";
|
|
2
|
+
import { ActivityHeader, ActivityListHeader } from "../../shared/widgets/activity/compound/components/ActivityHeader.js";
|
|
3
|
+
import { ActivityRowProps } from "../../shared/widgets/activity/compound/components/Row.js";
|
|
4
|
+
import { Activity } from "../../shared/widgets/activity/compound/Activity.js";
|
|
5
|
+
import { ACTIVITY_SLOTS, ActivitySlot } from "../../shared/widgets/activity/compound/Activity.slots.js";
|
|
6
|
+
import { ActivityDetail } from "../../shared/widgets/activity/compound/ActivityDetail.js";
|
|
7
|
+
import { ActivitySourceProvider, ActivitySourceValue, useActivitySource } from "../../shared/widgets/activity/compound/context.js";
|
|
8
|
+
import { ACTIVITY_ROW_SLOTS, ActivityRowSlot } from "../../shared/widgets/activity/compound/Row.slots.js";
|
|
9
|
+
import { ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef } from "../../shared/widgets/error-state/compound/types.js";
|
|
10
|
+
import { ErrorState } from "../../shared/widgets/error-state/compound/ErrorState.js";
|
|
11
|
+
import { ERROR_STATE_SLOTS, ErrorStateSlot } from "../../shared/widgets/error-state/compound/ErrorState.slots.js";
|
|
12
|
+
import { ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef } from "../../shared/widgets/processing-state/compound/types.js";
|
|
13
|
+
import { ProcessingState } from "../../shared/widgets/processing-state/compound/ProcessingState.js";
|
|
14
|
+
import { PROCESSING_STATE_SLOTS, ProcessingStateSlot } from "../../shared/widgets/processing-state/compound/ProcessingState.slots.js";
|
|
15
|
+
import { SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef } from "../../shared/widgets/success-state/compound/types.js";
|
|
16
|
+
import { SuccessState } from "../../shared/widgets/success-state/compound/SuccessState.js";
|
|
17
|
+
import { SUCCESS_STATE_SLOTS, SuccessStateSlot } from "../../shared/widgets/success-state/compound/SuccessState.slots.js";
|
|
18
|
+
import { ActivityFlow } from "../../flows/activity/compound/ActivityFlow.js";
|
|
19
|
+
export { ACTIVITY_ROW_SLOTS, ACTIVITY_SLOTS, Activity, ActivityAmount, ActivityDetail, ActivityFlow, ActivityHeader, ActivityListHeader, ActivityPayload, ActivityRowPayload, ActivityRowProps, ActivityRowSlot, ActivitySlot, ActivitySourceProvider, ActivitySourceValue, ERROR_STATE_SLOTS, ErrorState, ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSlot, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef, PROCESSING_STATE_SLOTS, ProcessingState, ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSlot, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef, SUCCESS_STATE_SLOTS, SuccessState, SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSlot, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef, useActivitySource };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ERROR_STATE_SLOTS as e}from"../../shared/widgets/error-state/compound/ErrorState.slots.js";import{ErrorState as t}from"../../shared/widgets/error-state/compound/ErrorState.js";import"../../shared/widgets/error-state/compound/index.js";import{PROCESSING_STATE_SLOTS as n}from"../../shared/widgets/processing-state/compound/ProcessingState.slots.js";import{ProcessingState as r}from"../../shared/widgets/processing-state/compound/ProcessingState.js";import"../../shared/widgets/processing-state/compound/index.js";import{SUCCESS_STATE_SLOTS as i}from"../../shared/widgets/success-state/compound/SuccessState.slots.js";import{SuccessState as a}from"../../shared/widgets/success-state/compound/SuccessState.js";import"../../shared/widgets/success-state/compound/index.js";import{ACTIVITY_SLOTS as o}from"../../shared/widgets/activity/compound/Activity.slots.js";import{ActivitySourceProvider as s,useActivitySource as c}from"../../shared/widgets/activity/compound/context.js";import{ActivityHeader as l,ActivityListHeader as u}from"../../shared/widgets/activity/compound/components/ActivityHeader.js";import{ACTIVITY_ROW_SLOTS as d}from"../../shared/widgets/activity/compound/Row.slots.js";import{Activity as f}from"../../shared/widgets/activity/compound/Activity.js";import{ActivityDetail as p}from"../../shared/widgets/activity/compound/ActivityDetail.js";import"../../shared/widgets/activity/compound/index.js";import{ActivityFlow as m}from"../../flows/activity/compound/ActivityFlow.js";export{d as ACTIVITY_ROW_SLOTS,o as ACTIVITY_SLOTS,f as Activity,p as ActivityDetail,m as ActivityFlow,l as ActivityHeader,u as ActivityListHeader,s as ActivitySourceProvider,e as ERROR_STATE_SLOTS,t as ErrorState,n as PROCESSING_STATE_SLOTS,r as ProcessingState,i as SUCCESS_STATE_SLOTS,a as SuccessState,c as useActivitySource};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Presentation, PresentationConfig, PresentationMode } from "../../shared/presentation/types.js";
|
|
2
|
+
import { ActivityBoundary, Props } from "../../flows/activity/compound/components/Boundary.js";
|
|
3
|
+
import { ActivityDialog } from "../../flows/activity/dialog/ActivityDialog.js";
|
|
4
|
+
export { ActivityDialog, ActivityBoundary as ActivityFlowBoundary, type Props as ActivityFlowBoundaryProps, type Presentation, type PresentationConfig, type PresentationMode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ActivityBoundary as e}from"../../flows/activity/compound/components/Boundary.js";import{ActivityDialog as t}from"../../flows/activity/dialog/ActivityDialog.js";import"../../flows/activity/dialog/ActivityFlowBoundary.js";export{t as ActivityDialog,e as ActivityFlowBoundary};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Presentation, PresentationConfig, PresentationMode } from "../../shared/presentation/types.js";
|
|
2
|
+
import { DialogShell, DialogShellControls, DialogShellProps } from "../../shared/dialog/DialogShell.js";
|
|
3
|
+
import { ActivityDetail } from "../../flows/activity/widgets/ActivityDetail.js";
|
|
4
|
+
import { ActivityList } from "../../flows/activity/widgets/ActivityList.js";
|
|
5
|
+
export { ActivityDetail, ActivityList, DialogShell, type DialogShellControls, type DialogShellProps, type Presentation, type PresentationConfig, type PresentationMode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DialogShell as e}from"../../shared/dialog/DialogShell.js";import{ActivityDetail as t}from"../../flows/activity/widgets/ActivityDetail.js";import{ActivityList as n}from"../../flows/activity/widgets/ActivityList.js";export{t as ActivityDetail,n as ActivityList,e as DialogShell};
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
import { ConfirmTransferAmountsProps, ConfirmTransferBodyProps, ConfirmTransferBreakdown, ConfirmTransferBreakdownPercentRow, ConfirmTransferBreakdownProps, ConfirmTransferBreakdownTextRow, ConfirmTransferBreakdownUsdRow, ConfirmTransferDialogProps, ConfirmTransferDisclaimerProps, ConfirmTransferFooterProps, ConfirmTransferHeaderProps, ConfirmTransferHeroProps, ConfirmTransferMetaProps, ConfirmTransferProps, ConfirmTransferToken, ConfirmTransferTransfer } from "../../shared/widgets/confirm-transfer/compound/types.js";
|
|
2
2
|
import { ConfirmTransfer } from "../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.js";
|
|
3
3
|
import { CONFIRM_TRANSFER_SLOTS, ConfirmTransferSlot } from "../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.js";
|
|
4
|
-
import {
|
|
4
|
+
import { TransferCryptoAsset, TransferCryptoBodyProps, TransferCryptoChain, TransferCryptoDialogProps, TransferCryptoDisclosureProps, TransferCryptoHeaderProps, TransferCryptoProps, TransferCryptoToken } from "../../flows/deposit/widgets/transfer-crypto/compound/types.js";
|
|
5
|
+
import { ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef } from "../../shared/widgets/error-state/compound/types.js";
|
|
6
|
+
import { ErrorState } from "../../shared/widgets/error-state/compound/ErrorState.js";
|
|
7
|
+
import { ERROR_STATE_SLOTS, ErrorStateSlot } from "../../shared/widgets/error-state/compound/ErrorState.slots.js";
|
|
8
|
+
import { ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef } from "../../shared/widgets/processing-state/compound/types.js";
|
|
9
|
+
import { ProcessingState } from "../../shared/widgets/processing-state/compound/ProcessingState.js";
|
|
10
|
+
import { PROCESSING_STATE_SLOTS, ProcessingStateSlot } from "../../shared/widgets/processing-state/compound/ProcessingState.slots.js";
|
|
11
|
+
import { SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef } from "../../shared/widgets/success-state/compound/types.js";
|
|
12
|
+
import { SuccessState } from "../../shared/widgets/success-state/compound/SuccessState.js";
|
|
13
|
+
import { SUCCESS_STATE_SLOTS, SuccessStateSlot } from "../../shared/widgets/success-state/compound/SuccessState.slots.js";
|
|
14
|
+
import { AmountEntryBodyProps, AmountEntryDetailsProps, AmountEntryDetailsRowProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryNoticeProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntryToken } from "../../shared/widgets/amount-entry/compound/types.js";
|
|
15
|
+
import { AmountEntry } from "../../shared/widgets/amount-entry/compound/AmountEntry.js";
|
|
16
|
+
import { AMOUNT_ENTRY_SLOTS, AmountEntrySlot } from "../../shared/widgets/amount-entry/compound/AmountEntry.slots.js";
|
|
17
|
+
import { CashAmountEntryDialogProps, CashAmountEntryHeroLabelProps, CashAmountEntryMethodChipProps, CashAmountEntryProps } from "../../flows/deposit/widgets/cash-amount-entry/compound/types.js";
|
|
18
|
+
import { CashAmountEntry } from "../../flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.js";
|
|
19
|
+
import { CASH_AMOUNT_ENTRY_SLOTS, CashAmountEntrySlot } from "../../flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.js";
|
|
20
|
+
import { CashConfirmBodyProps, CashConfirmDialogProps, CashConfirmHeaderProps, CashConfirmMethodBodyProps, CashConfirmProps, CashConfirmSummaryProps } from "../../flows/deposit/widgets/cash-confirm/compound/types.js";
|
|
21
|
+
import { CashConfirm } from "../../flows/deposit/widgets/cash-confirm/compound/CashConfirm.js";
|
|
22
|
+
import { CASH_CONFIRM_SLOTS, CashConfirmSlot } from "../../flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.js";
|
|
23
|
+
import { DepositBodyProps, DepositDialogProps, DepositHeaderProps, DepositMethodInput, DepositMethodOption, DepositMethodProps, DepositMethodSectionProps, DepositMethodsProps, DepositProps, DepositRail, DepositRailDescriptor, DepositRailPickerProps, DepositRailProps } from "../../flows/deposit/widgets/deposit/compound/types.js";
|
|
24
|
+
import { DepositStepsProps } from "../../flows/deposit/widgets/deposit/compound/components/Steps.js";
|
|
5
25
|
import { Deposit } from "../../flows/deposit/widgets/deposit/compound/Deposit.js";
|
|
6
26
|
import { DEPOSIT_SLOTS, DepositSlot } from "../../flows/deposit/widgets/deposit/compound/Deposit.slots.js";
|
|
7
27
|
import { DepositStatusBannerAsset, DepositStatusBannerBodyProps, DepositStatusBannerCloseProps, DepositStatusBannerDetailProps, DepositStatusBannerDetailsProps, DepositStatusBannerFooterProps, DepositStatusBannerHeroProps, DepositStatusBannerKind, DepositStatusBannerPrimaryActionProps, DepositStatusBannerProps, DepositStatusBannerRowProps, DepositStatusBannerToggleProps, DepositStatusBannerTxRef } from "../../flows/deposit/widgets/deposit-status-banner/compound/types.js";
|
|
8
28
|
import { DepositStatusBanner } from "../../flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js";
|
|
9
29
|
import { DEPOSIT_STATUS_BANNER_SLOTS, DepositStatusBannerSlot } from "../../flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.slots.js";
|
|
10
|
-
import { TransferCryptoAsset, TransferCryptoBodyProps, TransferCryptoChain, TransferCryptoDialogProps, TransferCryptoDisclosureProps, TransferCryptoHeaderProps, TransferCryptoProps, TransferCryptoToken } from "../../flows/deposit/widgets/transfer-crypto/compound/types.js";
|
|
11
30
|
import { TransferCrypto } from "../../flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.js";
|
|
12
31
|
import { TRANSFER_CRYPTO_SLOTS, TransferCryptoSlot } from "../../flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.slots.js";
|
|
13
|
-
import { AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntryToken } from "../../shared/widgets/amount-entry/compound/types.js";
|
|
14
|
-
import { AmountEntry } from "../../shared/widgets/amount-entry/compound/AmountEntry.js";
|
|
15
|
-
import { AMOUNT_ENTRY_SLOTS, AmountEntrySlot } from "../../shared/widgets/amount-entry/compound/AmountEntry.slots.js";
|
|
16
32
|
import { AssetOption, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerToken } from "../../shared/widgets/asset-picker/compound/types.js";
|
|
17
33
|
import { AssetPicker } from "../../shared/widgets/asset-picker/compound/AssetPicker.js";
|
|
18
34
|
import { ASSET_PICKER_SLOTS, AssetPickerSlot } from "../../shared/widgets/asset-picker/compound/AssetPicker.slots.js";
|
|
19
|
-
|
|
20
|
-
import { ErrorState } from "../../shared/widgets/error-state/compound/ErrorState.js";
|
|
21
|
-
import { ERROR_STATE_SLOTS, ErrorStateSlot } from "../../shared/widgets/error-state/compound/ErrorState.slots.js";
|
|
22
|
-
import { ProcessingStateActionsProps, ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef } from "../../shared/widgets/processing-state/compound/types.js";
|
|
23
|
-
import { ProcessingState } from "../../shared/widgets/processing-state/compound/ProcessingState.js";
|
|
24
|
-
import { PROCESSING_STATE_SLOTS, ProcessingStateSlot } from "../../shared/widgets/processing-state/compound/ProcessingState.slots.js";
|
|
25
|
-
import { SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef } from "../../shared/widgets/success-state/compound/types.js";
|
|
26
|
-
import { SuccessState } from "../../shared/widgets/success-state/compound/SuccessState.js";
|
|
27
|
-
import { SUCCESS_STATE_SLOTS, SuccessStateSlot } from "../../shared/widgets/success-state/compound/SuccessState.slots.js";
|
|
28
|
-
export { AMOUNT_ENTRY_SLOTS, ASSET_PICKER_SLOTS, AmountEntry, AmountEntryBodyProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntrySlot, AmountEntryToken, AssetOption, AssetPicker, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerSlot, AssetPickerToken, CONFIRM_TRANSFER_SLOTS, ConfirmTransfer, ConfirmTransferAmountsProps, ConfirmTransferBodyProps, ConfirmTransferBreakdown, ConfirmTransferBreakdownPercentRow, ConfirmTransferBreakdownProps, ConfirmTransferBreakdownTextRow, ConfirmTransferBreakdownUsdRow, ConfirmTransferDialogProps, ConfirmTransferDisclaimerProps, ConfirmTransferFooterProps, ConfirmTransferHeaderProps, ConfirmTransferHeroProps, ConfirmTransferMetaProps, ConfirmTransferProps, ConfirmTransferSlot, ConfirmTransferToken, ConfirmTransferTransfer, DEPOSIT_SLOTS, DEPOSIT_STATUS_BANNER_SLOTS, Deposit, DepositBodyProps, DepositDialogProps, DepositHeaderProps, DepositMethodInput, DepositMethodOption, DepositMethodProps, DepositMethodsProps, DepositProps, DepositSlot, DepositStatusBanner, DepositStatusBannerAsset, DepositStatusBannerBodyProps, DepositStatusBannerCloseProps, DepositStatusBannerDetailProps, DepositStatusBannerDetailsProps, DepositStatusBannerFooterProps, DepositStatusBannerHeroProps, DepositStatusBannerKind, DepositStatusBannerPrimaryActionProps, DepositStatusBannerProps, DepositStatusBannerRowProps, DepositStatusBannerSlot, DepositStatusBannerToggleProps, DepositStatusBannerTxRef, ERROR_STATE_SLOTS, ErrorState, ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSlot, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef, PROCESSING_STATE_SLOTS, ProcessingState, ProcessingStateActionsProps, ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSlot, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef, SUCCESS_STATE_SLOTS, SuccessState, SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSlot, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef, TRANSFER_CRYPTO_SLOTS, TransferCrypto, TransferCryptoAsset, TransferCryptoBodyProps, TransferCryptoChain, TransferCryptoDialogProps, TransferCryptoDisclosureProps, TransferCryptoHeaderProps, TransferCryptoProps, TransferCryptoSlot, TransferCryptoToken };
|
|
35
|
+
export { AMOUNT_ENTRY_SLOTS, ASSET_PICKER_SLOTS, AmountEntry, AmountEntryBodyProps, AmountEntryDetailsProps, AmountEntryDetailsRowProps, AmountEntryDialogProps, AmountEntryFlowProps, AmountEntryFooterProps, AmountEntryHeaderProps, AmountEntryHeroProps, AmountEntryNoticeProps, AmountEntryPercentPreset, AmountEntryPillsProps, AmountEntryProps, AmountEntrySlot, AmountEntryToken, AssetOption, AssetPicker, AssetPickerAssetProps, AssetPickerBodyProps, AssetPickerDialogProps, AssetPickerFooterProps, AssetPickerHeaderProps, AssetPickerListProps, AssetPickerProps, AssetPickerSlot, AssetPickerToken, CASH_AMOUNT_ENTRY_SLOTS, CASH_CONFIRM_SLOTS, CONFIRM_TRANSFER_SLOTS, CashAmountEntry, CashAmountEntryDialogProps, CashAmountEntryHeroLabelProps, CashAmountEntryMethodChipProps, CashAmountEntryProps, CashAmountEntrySlot, CashConfirm, CashConfirmBodyProps, CashConfirmDialogProps, CashConfirmHeaderProps, CashConfirmMethodBodyProps, CashConfirmProps, CashConfirmSlot, CashConfirmSummaryProps, ConfirmTransfer, ConfirmTransferAmountsProps, ConfirmTransferBodyProps, ConfirmTransferBreakdown, ConfirmTransferBreakdownPercentRow, ConfirmTransferBreakdownProps, ConfirmTransferBreakdownTextRow, ConfirmTransferBreakdownUsdRow, ConfirmTransferDialogProps, ConfirmTransferDisclaimerProps, ConfirmTransferFooterProps, ConfirmTransferHeaderProps, ConfirmTransferHeroProps, ConfirmTransferMetaProps, ConfirmTransferProps, ConfirmTransferSlot, ConfirmTransferToken, ConfirmTransferTransfer, DEPOSIT_SLOTS, DEPOSIT_STATUS_BANNER_SLOTS, Deposit, DepositBodyProps, DepositDialogProps, DepositHeaderProps, DepositMethodInput, DepositMethodOption, DepositMethodProps, DepositMethodSectionProps, DepositMethodsProps, DepositProps, DepositRail, DepositRailDescriptor, DepositRailPickerProps, DepositRailProps, DepositSlot, DepositStatusBanner, DepositStatusBannerAsset, DepositStatusBannerBodyProps, DepositStatusBannerCloseProps, DepositStatusBannerDetailProps, DepositStatusBannerDetailsProps, DepositStatusBannerFooterProps, DepositStatusBannerHeroProps, DepositStatusBannerKind, DepositStatusBannerPrimaryActionProps, DepositStatusBannerProps, DepositStatusBannerRowProps, DepositStatusBannerSlot, DepositStatusBannerToggleProps, DepositStatusBannerTxRef, DepositStepsProps, ERROR_STATE_SLOTS, ErrorState, ErrorStateActionsProps, ErrorStateAsset, ErrorStateAssetValueProps, ErrorStateBodyProps, ErrorStateDestination, ErrorStateDetailProps, ErrorStateDetailsProps, ErrorStateDialogProps, ErrorStateDisclosureChevronProps, ErrorStateHeaderProps, ErrorStateHelp, ErrorStateHelpInfoProps, ErrorStateHeroProps, ErrorStateMoreDetailsProps, ErrorStateProps, ErrorStateRowProps, ErrorStateSlot, ErrorStateSourceWallet, ErrorStateStatusValueProps, ErrorStateTxRef, PROCESSING_STATE_SLOTS, ProcessingState, ProcessingStateAsset, ProcessingStateBodyProps, ProcessingStateDetailProps, ProcessingStateDetailsProps, ProcessingStateDialogProps, ProcessingStateHeaderProps, ProcessingStateHeroProps, ProcessingStateProps, ProcessingStateRowProps, ProcessingStateSlot, ProcessingStateSourceWallet, ProcessingStateStatusPillProps, ProcessingStateTxRef, SUCCESS_STATE_SLOTS, SuccessState, SuccessStateActionsProps, SuccessStateAsset, SuccessStateAssetValueProps, SuccessStateBodyProps, SuccessStateDetailProps, SuccessStateDetailsProps, SuccessStateDialogProps, SuccessStateExplorer, SuccessStateHeaderProps, SuccessStateHeadlineProps, SuccessStateMoreDetailsProps, SuccessStateProps, SuccessStateRouteValueProps, SuccessStateRowProps, SuccessStateSlot, SuccessStateSourceWallet, SuccessStateStatusPillProps, SuccessStateTxRef, TRANSFER_CRYPTO_SLOTS, TransferCrypto, TransferCryptoAsset, TransferCryptoBodyProps, TransferCryptoChain, TransferCryptoDialogProps, TransferCryptoDisclosureProps, TransferCryptoHeaderProps, TransferCryptoProps, TransferCryptoSlot, TransferCryptoToken };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{AMOUNT_ENTRY_SLOTS as e}from"../../shared/widgets/amount-entry/compound/AmountEntry.slots.js";import{AmountEntry as t}from"../../shared/widgets/amount-entry/compound/AmountEntry.js";import"../../shared/widgets/amount-entry/compound/index.js";import{CASH_AMOUNT_ENTRY_SLOTS as n}from"../../flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.slots.js";import{CashAmountEntry as r}from"../../flows/deposit/widgets/cash-amount-entry/compound/CashAmountEntry.js";import"../../flows/deposit/widgets/cash-amount-entry/compound/index.js";import{CASH_CONFIRM_SLOTS as i}from"../../flows/deposit/widgets/cash-confirm/compound/CashConfirm.slots.js";import{CashConfirm as a}from"../../flows/deposit/widgets/cash-confirm/compound/CashConfirm.js";import"../../flows/deposit/widgets/cash-confirm/compound/index.js";import{DEPOSIT_SLOTS as o}from"../../flows/deposit/widgets/deposit/compound/Deposit.slots.js";import{Deposit as s}from"../../flows/deposit/widgets/deposit/compound/Deposit.js";import"../../flows/deposit/widgets/deposit/compound/index.js";import{DEPOSIT_STATUS_BANNER_SLOTS as c}from"../../flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.slots.js";import{DepositStatusBanner as l}from"../../flows/deposit/widgets/deposit-status-banner/compound/DepositStatusBanner.js";import"../../flows/deposit/widgets/deposit-status-banner/compound/index.js";import{TRANSFER_CRYPTO_SLOTS as u}from"../../flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.slots.js";import{TransferCrypto as d}from"../../flows/deposit/widgets/transfer-crypto/compound/TransferCrypto.js";import"../../flows/deposit/widgets/transfer-crypto/compound/index.js";import{ASSET_PICKER_SLOTS as f}from"../../shared/widgets/asset-picker/compound/AssetPicker.slots.js";import{AssetPicker as p}from"../../shared/widgets/asset-picker/compound/AssetPicker.js";import"../../shared/widgets/asset-picker/compound/index.js";import{CONFIRM_TRANSFER_SLOTS as m}from"../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.slots.js";import{ConfirmTransfer as h}from"../../shared/widgets/confirm-transfer/compound/ConfirmTransfer.js";import"../../shared/widgets/confirm-transfer/compound/index.js";import{ERROR_STATE_SLOTS as g}from"../../shared/widgets/error-state/compound/ErrorState.slots.js";import{ErrorState as _}from"../../shared/widgets/error-state/compound/ErrorState.js";import"../../shared/widgets/error-state/compound/index.js";import{PROCESSING_STATE_SLOTS as v}from"../../shared/widgets/processing-state/compound/ProcessingState.slots.js";import{ProcessingState as y}from"../../shared/widgets/processing-state/compound/ProcessingState.js";import"../../shared/widgets/processing-state/compound/index.js";import{SUCCESS_STATE_SLOTS as b}from"../../shared/widgets/success-state/compound/SuccessState.slots.js";import{SuccessState as x}from"../../shared/widgets/success-state/compound/SuccessState.js";import"../../shared/widgets/success-state/compound/index.js";export{e as AMOUNT_ENTRY_SLOTS,f as ASSET_PICKER_SLOTS,t as AmountEntry,p as AssetPicker,n as CASH_AMOUNT_ENTRY_SLOTS,i as CASH_CONFIRM_SLOTS,m as CONFIRM_TRANSFER_SLOTS,r as CashAmountEntry,a as CashConfirm,h as ConfirmTransfer,o as DEPOSIT_SLOTS,c as DEPOSIT_STATUS_BANNER_SLOTS,s as Deposit,l as DepositStatusBanner,g as ERROR_STATE_SLOTS,_ as ErrorState,v as PROCESSING_STATE_SLOTS,y as ProcessingState,b as SUCCESS_STATE_SLOTS,x as SuccessState,u as TRANSFER_CRYPTO_SLOTS,d as TransferCrypto};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { Presentation, PresentationConfig, PresentationMode } from "../../shared/presentation/types.js";
|
|
1
2
|
import { DepositDialog } from "../../flows/deposit/dialog/DepositDialog.js";
|
|
2
|
-
export { DepositDialog };
|
|
3
|
+
export { DepositDialog, type Presentation, type PresentationConfig, type PresentationMode };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Presentation, PresentationConfig, PresentationMode } from "../../shared/presentation/types.js";
|
|
2
|
+
import { DialogShell, DialogShellControls, DialogShellProps } from "../../shared/dialog/DialogShell.js";
|
|
3
|
+
import { DepositActivityDetail } from "../../flows/deposit/widgets/activity/DepositActivityDetail.js";
|
|
4
|
+
import { DepositActivityList } from "../../flows/deposit/widgets/activity/DepositActivityList.js";
|
|
5
|
+
import { AmountEntry } from "../../flows/deposit/widgets/amount-entry/AmountEntry.js";
|
|
6
|
+
import { AssetPicker } from "../../flows/deposit/widgets/asset-picker/AssetPicker.js";
|
|
7
|
+
import { CashAmountEntry } from "../../flows/deposit/widgets/cash-amount-entry/CashAmountEntry.js";
|
|
8
|
+
import { CashConfirm } from "../../flows/deposit/widgets/cash-confirm/CashConfirm.js";
|
|
9
|
+
import { ConfirmDeposit } from "../../flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js";
|
|
10
|
+
import { Deposit } from "../../flows/deposit/widgets/deposit/Deposit.js";
|
|
11
|
+
import { DepositStatusBanner } from "../../flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js";
|
|
12
|
+
import { ErrorState } from "../../flows/deposit/widgets/error-state/ErrorState.js";
|
|
13
|
+
import { ProcessingState } from "../../flows/deposit/widgets/processing-state/ProcessingState.js";
|
|
14
|
+
import { SuccessState } from "../../flows/deposit/widgets/success-state/SuccessState.js";
|
|
15
|
+
import { TransferCrypto } from "../../flows/deposit/widgets/transfer-crypto/TransferCrypto.js";
|
|
16
|
+
export { AmountEntry, AssetPicker, CashAmountEntry, CashConfirm, ConfirmDeposit, Deposit, DepositActivityDetail, DepositActivityList, DepositStatusBanner, DialogShell, type DialogShellControls, type DialogShellProps, ErrorState, type Presentation, type PresentationConfig, type PresentationMode, ProcessingState, SuccessState, TransferCrypto };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DialogShell as e}from"../../shared/dialog/DialogShell.js";import{DepositActivityDetail as t}from"../../flows/deposit/widgets/activity/DepositActivityDetail.js";import{DepositActivityList as n}from"../../flows/deposit/widgets/activity/DepositActivityList.js";import"../../flows/deposit/widgets/activity/index.js";import{AmountEntry as r}from"../../flows/deposit/widgets/amount-entry/AmountEntry.js";import"../../flows/deposit/widgets/amount-entry/index.js";import{AssetPicker as i}from"../../flows/deposit/widgets/asset-picker/AssetPicker.js";import"../../flows/deposit/widgets/asset-picker/index.js";import{CashAmountEntry as a}from"../../flows/deposit/widgets/cash-amount-entry/CashAmountEntry.js";import"../../flows/deposit/widgets/cash-amount-entry/index.js";import{CashConfirm as o}from"../../flows/deposit/widgets/cash-confirm/CashConfirm.js";import"../../flows/deposit/widgets/cash-confirm/index.js";import{ConfirmDeposit as s}from"../../flows/deposit/widgets/confirm-deposit/ConfirmDeposit.js";import"../../flows/deposit/widgets/confirm-deposit/index.js";import{Deposit as c}from"../../flows/deposit/widgets/deposit/Deposit.js";import"../../flows/deposit/widgets/deposit/index.js";import{DepositStatusBanner as l}from"../../flows/deposit/widgets/deposit-status-banner/DepositStatusBanner.js";import"../../flows/deposit/widgets/deposit-status-banner/index.js";import{ErrorState as u}from"../../flows/deposit/widgets/error-state/ErrorState.js";import"../../flows/deposit/widgets/error-state/index.js";import{ProcessingState as d}from"../../flows/deposit/widgets/processing-state/ProcessingState.js";import"../../flows/deposit/widgets/processing-state/index.js";import{SuccessState as f}from"../../flows/deposit/widgets/success-state/SuccessState.js";import"../../flows/deposit/widgets/success-state/index.js";import{TransferCrypto as p}from"../../flows/deposit/widgets/transfer-crypto/TransferCrypto.js";import"../../flows/deposit/widgets/transfer-crypto/index.js";export{r as AmountEntry,i as AssetPicker,a as CashAmountEntry,o as CashConfirm,s as ConfirmDeposit,c as Deposit,t as DepositActivityDetail,n as DepositActivityList,l as DepositStatusBanner,e as DialogShell,u as ErrorState,d as ProcessingState,f as SuccessState,p as TransferCrypto};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { StridgeEnvironment } from "./types.js";
|
|
2
|
+
import { ApiClient, SupportedAssetsResponse } from "@stridge/sdk";
|
|
3
|
+
|
|
4
|
+
//#region src/drivers/stridge/catalog.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Provider-scoped shared `Gateway.assets()` cache. Deduplicates the catalog fetch across the
|
|
7
|
+
* deposit and withdraw drivers when both flows are mounted in a single `<StridgeProvider>` — they
|
|
8
|
+
* `await` the same in-flight promise and one network round-trip serves both flows.
|
|
9
|
+
*
|
|
10
|
+
* The catalog never invalidates within a single provider lifecycle — `gateway/assets` is the
|
|
11
|
+
* merchant's catalog of routable chains / assets, which changes on the order of days, not user
|
|
12
|
+
* sessions. Hosts that need to invalidate unmount and remount the provider.
|
|
13
|
+
*
|
|
14
|
+
* BYO-driver hosts using `<KitProvider>` directly are unaffected — both `createStridge*Driver`
|
|
15
|
+
* factories accept `catalog` as an opt-in input and fall back to their own per-driver fetch when
|
|
16
|
+
* none is supplied.
|
|
17
|
+
*/
|
|
18
|
+
interface StridgeCatalog {
|
|
19
|
+
/**
|
|
20
|
+
* Resolve the shared `gateway/assets` cache. First call kicks off the network fetch;
|
|
21
|
+
* subsequent calls return the same in-flight promise (or its resolved value).
|
|
22
|
+
*
|
|
23
|
+
* Resolves with `null` when the fetch fails — every consumer treats a missing catalog as a
|
|
24
|
+
* soft degradation (the deposit driver flips its `target` entity to `error`; the withdraw
|
|
25
|
+
* driver flips `receiveOptions` to `error`; both still issue the initial `balance/onchain`
|
|
26
|
+
* call against the backend's catalog-wide default chain set).
|
|
27
|
+
*/
|
|
28
|
+
getSupportedAssets(): Promise<SupportedAssetsResponse | null>;
|
|
29
|
+
}
|
|
30
|
+
interface CreateStridgeCatalogInput {
|
|
31
|
+
/**
|
|
32
|
+
* Pre-built SDK client. Pass this when the caller already has a client they want the
|
|
33
|
+
* catalog to share (so request headers / dedup behavior stay consistent across calls).
|
|
34
|
+
* Mutually exclusive with `projectKey` / `environment`.
|
|
35
|
+
*/
|
|
36
|
+
sdk?: ApiClient;
|
|
37
|
+
/**
|
|
38
|
+
* Stridge project key. Used to build a dedicated SDK client when `sdk` is not supplied. The
|
|
39
|
+
* key authenticates `gateway/assets`, the merchant-filtered catalog endpoint.
|
|
40
|
+
*/
|
|
41
|
+
projectKey?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Stridge environment. Used only when `sdk` is not supplied. Defaults to `"production"`.
|
|
44
|
+
*/
|
|
45
|
+
environment?: StridgeEnvironment;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Build a {@link StridgeCatalog}. Wraps the `gateway/assets` call in the same one-shot retry
|
|
49
|
+
* helper the driver bootstrap uses so transient 5xx / 429 / network errors don't surface a hard
|
|
50
|
+
* "no catalog" state for the user.
|
|
51
|
+
*/
|
|
52
|
+
declare function createStridgeCatalog(input: CreateStridgeCatalogInput): StridgeCatalog;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { CreateStridgeCatalogInput, StridgeCatalog, createStridgeCatalog };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveSdkEnv as e}from"./internal/env.js";import{withOneShotRetry as t}from"./internal/retry.js";import{createApiClient as n}from"@stridge/sdk";function r(r){let i=r.sdk??n({projectKey:r.projectKey??``,env:e(r.environment)}),a=null;return{getSupportedAssets(){return a??=t(()=>i.gateway.assets()).catch(()=>null),a}}}export{r as createStridgeCatalog};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ActivityDriver } from "../../flows/activity/driver/types.js";
|
|
2
|
+
import { StridgeEnvironment } from "./types.js";
|
|
3
|
+
import { StridgeCatalog } from "./catalog.js";
|
|
4
|
+
import { ApiClient } from "@stridge/sdk";
|
|
5
|
+
|
|
6
|
+
//#region src/drivers/stridge/createStridgeActivityDriver.d.ts
|
|
7
|
+
/**
|
|
8
|
+
* Configuration accepted by {@link createStridgeActivityDriver}.
|
|
9
|
+
*/
|
|
10
|
+
interface CreateStridgeActivityDriverInput {
|
|
11
|
+
/** Connected wallet EOA — threaded as the `gateway/{owner}` owner parameter. */
|
|
12
|
+
userAddress: string;
|
|
13
|
+
/** Stridge project key — sent as `X-Gateway-Key` by the SDK's HttpClient. */
|
|
14
|
+
projectKey: string;
|
|
15
|
+
/** Which Stridge API host to target. Defaults to `production`. */
|
|
16
|
+
environment?: StridgeEnvironment;
|
|
17
|
+
/**
|
|
18
|
+
* Pre-built SDK client. Pass this when the caller already has a client they want the driver
|
|
19
|
+
* to share (so request headers / dedup behaviour stay consistent across calls). Mutually
|
|
20
|
+
* exclusive with `projectKey` / `environment`.
|
|
21
|
+
*/
|
|
22
|
+
sdk?: ApiClient;
|
|
23
|
+
/**
|
|
24
|
+
* Provider-scoped shared catalog cache. When supplied, the driver awaits this single
|
|
25
|
+
* in-flight promise instead of issuing its own `Gateway.assets()` call — deduplicates the
|
|
26
|
+
* catalog fetch across the deposit / withdraw / activity drivers mounted under one
|
|
27
|
+
* `<StridgeProvider>`. When omitted, the driver falls back to its own per-instance fetch.
|
|
28
|
+
*/
|
|
29
|
+
catalog?: StridgeCatalog;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Build a Stridge-backed {@link ActivityDriver}. The driver owns owner-scoped recent-settlements
|
|
33
|
+
* polling — `GET /gateway/{owner}` on adaptive cadence, transformed into the kit's
|
|
34
|
+
* {@link ActivityPayload} for the shared `<Activity>` compound.
|
|
35
|
+
*
|
|
36
|
+
* Lazy-arm contract mirrors the per-flow drivers: the factory returns without making any network
|
|
37
|
+
* calls; the first {@link ActivityDriver.arm} call (typically dispatched by the controller's
|
|
38
|
+
* `open()` path or by `usePrefetchActivity()`) fires the shared `Gateway.assets()` catalog fetch
|
|
39
|
+
* alongside the initial `gateway/{owner}` envelope GET in parallel, so a subsequent
|
|
40
|
+
* `useActivity().open()` lands on a populated payload without a perceptible loading window.
|
|
41
|
+
*/
|
|
42
|
+
declare function createStridgeActivityDriver(config: CreateStridgeActivityDriverInput): ActivityDriver;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { CreateStridgeActivityDriverInput, createStridgeActivityDriver };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{resolveSdkEnv as e}from"./internal/env.js";import{withOneShotRetry as t}from"./internal/retry.js";import{activityResponseToPayload as n}from"../../shared/widgets/activity/transformers/activityResponseToPayload.js";import{createEntityStore as r}from"../stridge-mock/store.js";import{startPoll as i}from"./poll.js";import{createApiClient as a}from"@stridge/sdk";const o=3e4;function s(s){let l=s.sdk??a({projectKey:s.projectKey,env:e(s.environment)}),u=r({activity:{status:`idle`}}),d,f=!1,p=Promise.resolve(),m=!1,h;function g(){f||(f=!0,p=_())}async function _(){let e=(async()=>{try{let e=await(s.catalog?s.catalog.getSupportedAssets():t(()=>l.gateway.assets()).catch(()=>null));e&&(d=e)}catch{}})(),n=b(new AbortController().signal);await Promise.all([e,n])}function v(){let e=d?c(d):void 0;return{ownerAddress:s.userAddress,...e?{chainLogoFor:t=>e[String(t)]}:{}}}function y(e){let t=n(e,v());u.update({activity:{status:`ready`,payload:t,raw:e.udas,response:e}})}async function b(e){let t=u.getSnapshot().activity;(t.status===`idle`||t.status===`error`)&&u.update({activity:{status:`loading`}});try{let t=await l.gateway.poll(s.userAddress,{limit:20,signal:e});return e.aborted?null:(y(t),t)}catch(t){if(e.aborted)return null;if(t.statusCode===404)return y({owner:s.userAddress,filter:{},udas:[]}),null;let n=t instanceof Error?t:Error(String(t)),r=u.getSnapshot().activity;return r.status===`ready`?(u.update({activity:{status:`stale`,payload:r.payload,raw:r.raw,response:r.response}}),null):(r.status===`stale`||u.update({activity:{status:`error`,error:n}}),null)}}return{arm:g,getSnapshot(){return u.getSnapshot()},subscribe(e){return u.subscribe(e)},refreshActivity(e){let t=f;if(g(),!t&&!m){m=!0;return}b(e)},watchActivity(e){g(),i({signal:e,fetch:async e=>{if(!m){m=!0,await p;let e=u.getSnapshot().activity;return e.status===`ready`||e.status===`stale`?e.response:null}return b(e)},listener:()=>{},nextIntervalMs:()=>{let e=u.getSnapshot().activity;return e.status!==`ready`&&e.status!==`stale`?o:e.payload.rows.some(e=>e.status.kind===`pending`)?5e3:o}})},invalidateActivity(){if(!f)return;h?.abort();let e=new AbortController;h=e;let t=u.getSnapshot().activity;t.status===`ready`?u.update({activity:{status:`stale`,payload:t.payload,raw:t.raw,response:t.response}}):(t.status===`idle`||t.status===`error`)&&u.update({activity:{status:`loading`}}),b(e.signal)}}}function c(e){let t={};for(let n of e.assets){let e=String(n.eip155_id),r=n.native_currency?.logo;r&&(t[e]=r)}return t}export{s as createStridgeActivityDriver};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DepositDriver } from "../../flows/deposit/driver/types.js";
|
|
2
2
|
import { StridgeDriverConfig } from "./types.js";
|
|
3
|
+
import { StridgeCatalog } from "./catalog.js";
|
|
3
4
|
import { I18n } from "@lingui/core";
|
|
4
5
|
|
|
5
6
|
//#region src/drivers/stridge/createStridgeDepositDriver.d.ts
|
|
@@ -13,13 +14,21 @@ interface CreateStridgeDepositDriverInput extends StridgeDriverConfig {
|
|
|
13
14
|
* re-bootstrap. When omitted, falls back to the kit's English-only {@link defaultI18n}.
|
|
14
15
|
*/
|
|
15
16
|
getI18n?: () => I18n;
|
|
17
|
+
/**
|
|
18
|
+
* Provider-scoped shared catalog cache. When supplied, the driver awaits this single
|
|
19
|
+
* in-flight promise instead of issuing its own `Gateway.assets()` call — deduplicates the
|
|
20
|
+
* catalog fetch across deposit + withdraw drivers mounted under one `<StridgeProvider>`.
|
|
21
|
+
* When omitted, the driver falls back to its own per-instance fetch (the path BYO-driver
|
|
22
|
+
* hosts using `<KitProvider>` directly take).
|
|
23
|
+
*/
|
|
24
|
+
catalog?: StridgeCatalog;
|
|
16
25
|
}
|
|
17
26
|
/**
|
|
18
27
|
* Builds a Stridge-backed {@link DepositDriver}. Returns the unified driver contract — the kit's
|
|
19
28
|
* `<KitProvider deposit={…}>` consumes this directly, no separate `dataSource` / `operations`
|
|
20
29
|
* adapter layer.
|
|
21
30
|
*
|
|
22
|
-
* Bootstrap kicks off `gateway/start` + `
|
|
31
|
+
* Bootstrap kicks off `gateway/start` + `Gateway.assets()` in parallel on creation; the
|
|
23
32
|
* driver's `brand`, `target`, and `addresses` entities transition `loading` → `ready` once both
|
|
24
33
|
* responses land. The first `balance/onchain` fetch fires alongside, populating `balances`.
|
|
25
34
|
* Wallet identity is published synchronously from `userAddress`.
|