@n1xyz/wallet-widget 0.0.32 → 0.0.33-alpha.1
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/dist/features/onboarding-flow/N1WalletModal.d.ts +0 -1
- package/dist/features/onboarding-flow/N1WalletModal.js +0 -1
- package/dist/features/onboarding-flow/N1WalletModal.js.map +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/Logic/getPseudoName.d.ts +0 -1
- package/dist/Logic/getPseudoName.js +0 -5826
- package/dist/Logic/getPseudoName.js.map +0 -1
- package/dist/Logic/sessionManager.d.ts +0 -17
- package/dist/Logic/sessionManager.js +0 -38
- package/dist/Logic/sessionManager.js.map +0 -1
- package/dist/Logic/transactionManager.d.ts +0 -19
- package/dist/Logic/transactionManager.js +0 -8
- package/dist/Logic/transactionManager.js.map +0 -1
- package/dist/Logic/utils.d.ts +0 -19
- package/dist/Logic/utils.js +0 -66
- package/dist/Logic/utils.js.map +0 -1
- package/dist/Logic/words.d.ts +0 -9
- package/dist/Logic/words.js +0 -93572
- package/dist/Logic/words.js.map +0 -1
- package/dist/Modal/LoadingFallback.d.ts +0 -2
- package/dist/Modal/LoadingFallback.js +0 -3
- package/dist/Modal/LoadingFallback.js.map +0 -1
- package/dist/Modal/N1WalletModal.d.ts +0 -2
- package/dist/Modal/N1WalletModal.js +0 -93
- package/dist/Modal/N1WalletModal.js.map +0 -1
- package/dist/Modal/NTSFlow/LoadingFallback.d.ts +0 -2
- package/dist/Modal/NTSFlow/LoadingFallback.js +0 -3
- package/dist/Modal/NTSFlow/LoadingFallback.js.map +0 -1
- package/dist/Modal/NTSFlow/NTSFlow.d.ts +0 -4
- package/dist/Modal/NTSFlow/NTSFlow.js +0 -35
- package/dist/Modal/NTSFlow/NTSFlow.js.map +0 -1
- package/dist/Modal/NTSFlow/components/BackButton.d.ts +0 -3
- package/dist/Modal/NTSFlow/components/BackButton.js +0 -26
- package/dist/Modal/NTSFlow/components/BackButton.js.map +0 -1
- package/dist/Modal/NTSFlow/components/ModalHeader.d.ts +0 -1
- package/dist/Modal/NTSFlow/components/ModalHeader.js +0 -21
- package/dist/Modal/NTSFlow/components/ModalHeader.js.map +0 -1
- package/dist/Modal/NTSFlow/index.d.ts +0 -1
- package/dist/Modal/NTSFlow/index.js +0 -2
- package/dist/Modal/NTSFlow/index.js.map +0 -1
- package/dist/Modal/NTSFlow/views/ConnectView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/ConnectView.js +0 -68
- package/dist/Modal/NTSFlow/views/ConnectView.js.map +0 -1
- package/dist/Modal/NTSFlow/views/CreateSessionView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/CreateSessionView.js +0 -246
- package/dist/Modal/NTSFlow/views/CreateSessionView.js.map +0 -1
- package/dist/Modal/NTSFlow/views/CreateUserView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/CreateUserView.js +0 -106
- package/dist/Modal/NTSFlow/views/CreateUserView.js.map +0 -1
- package/dist/Modal/NTSFlow/views/NoWhitelistView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/NoWhitelistView.js +0 -43
- package/dist/Modal/NTSFlow/views/NoWhitelistView.js.map +0 -1
- package/dist/Modal/NTSFlow/views/SigningView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/SigningView.js +0 -6
- package/dist/Modal/NTSFlow/views/SigningView.js.map +0 -1
- package/dist/Modal/NTSFlow/views/SuccessView.d.ts +0 -1
- package/dist/Modal/NTSFlow/views/SuccessView.js +0 -11
- package/dist/Modal/NTSFlow/views/SuccessView.js.map +0 -1
- package/dist/Modal/NordFlow/NordFlow.d.ts +0 -9
- package/dist/Modal/NordFlow/NordFlow.js +0 -98
- package/dist/Modal/NordFlow/NordFlow.js.map +0 -1
- package/dist/Modal/NordFlow/components/ChainButton.d.ts +0 -10
- package/dist/Modal/NordFlow/components/ChainButton.js +0 -21
- package/dist/Modal/NordFlow/components/ChainButton.js.map +0 -1
- package/dist/Modal/NordFlow/components/EVMChainsButton.d.ts +0 -9
- package/dist/Modal/NordFlow/components/EVMChainsButton.js +0 -21
- package/dist/Modal/NordFlow/components/EVMChainsButton.js.map +0 -1
- package/dist/Modal/NordFlow/components/Header.d.ts +0 -12
- package/dist/Modal/NordFlow/components/Header.js +0 -45
- package/dist/Modal/NordFlow/components/Header.js.map +0 -1
- package/dist/Modal/NordFlow/components/ImageWithFallback.d.ts +0 -17
- package/dist/Modal/NordFlow/components/ImageWithFallback.js +0 -33
- package/dist/Modal/NordFlow/components/ImageWithFallback.js.map +0 -1
- package/dist/Modal/NordFlow/components/LoadingSquares.d.ts +0 -1
- package/dist/Modal/NordFlow/components/LoadingSquares.js +0 -6
- package/dist/Modal/NordFlow/components/LoadingSquares.js.map +0 -1
- package/dist/Modal/NordFlow/components/MoreButton.d.ts +0 -8
- package/dist/Modal/NordFlow/components/MoreButton.js +0 -19
- package/dist/Modal/NordFlow/components/MoreButton.js.map +0 -1
- package/dist/Modal/NordFlow/components/TransactionTable.d.ts +0 -13
- package/dist/Modal/NordFlow/components/TransactionTable.js +0 -83
- package/dist/Modal/NordFlow/components/TransactionTable.js.map +0 -1
- package/dist/Modal/NordFlow/components/WaitingMessage.d.ts +0 -8
- package/dist/Modal/NordFlow/components/WaitingMessage.js +0 -17
- package/dist/Modal/NordFlow/components/WaitingMessage.js.map +0 -1
- package/dist/Modal/NordFlow/components/index.d.ts +0 -5
- package/dist/Modal/NordFlow/components/index.js +0 -6
- package/dist/Modal/NordFlow/components/index.js.map +0 -1
- package/dist/Modal/NordFlow/constants.d.ts +0 -31
- package/dist/Modal/NordFlow/constants.js +0 -56
- package/dist/Modal/NordFlow/constants.js.map +0 -1
- package/dist/Modal/NordFlow/context/DepositContext.d.ts +0 -29
- package/dist/Modal/NordFlow/context/DepositContext.js +0 -526
- package/dist/Modal/NordFlow/context/DepositContext.js.map +0 -1
- package/dist/Modal/NordFlow/context/FlowContext.d.ts +0 -50
- package/dist/Modal/NordFlow/context/FlowContext.js +0 -192
- package/dist/Modal/NordFlow/context/FlowContext.js.map +0 -1
- package/dist/Modal/NordFlow/context/NordProvider.d.ts +0 -10
- package/dist/Modal/NordFlow/context/NordProvider.js +0 -14
- package/dist/Modal/NordFlow/context/NordProvider.js.map +0 -1
- package/dist/Modal/NordFlow/context/WalletConnectContext.d.ts +0 -20
- package/dist/Modal/NordFlow/context/WalletConnectContext.js +0 -394
- package/dist/Modal/NordFlow/context/WalletConnectContext.js.map +0 -1
- package/dist/Modal/NordFlow/context/flowMachine.d.ts +0 -48
- package/dist/Modal/NordFlow/context/flowMachine.js +0 -83
- package/dist/Modal/NordFlow/context/flowMachine.js.map +0 -1
- package/dist/Modal/NordFlow/context/index.d.ts +0 -5
- package/dist/Modal/NordFlow/context/index.js +0 -8
- package/dist/Modal/NordFlow/context/index.js.map +0 -1
- package/dist/Modal/NordFlow/hoc/index.d.ts +0 -1
- package/dist/Modal/NordFlow/hoc/index.js +0 -2
- package/dist/Modal/NordFlow/hoc/index.js.map +0 -1
- package/dist/Modal/NordFlow/hoc/withImageFallback.d.ts +0 -7
- package/dist/Modal/NordFlow/hoc/withImageFallback.js +0 -61
- package/dist/Modal/NordFlow/hoc/withImageFallback.js.map +0 -1
- package/dist/Modal/NordFlow/hooks/useTestnetFaucet.d.ts +0 -18
- package/dist/Modal/NordFlow/hooks/useTestnetFaucet.js +0 -181
- package/dist/Modal/NordFlow/hooks/useTestnetFaucet.js.map +0 -1
- package/dist/Modal/NordFlow/index.d.ts +0 -1
- package/dist/Modal/NordFlow/index.js +0 -2
- package/dist/Modal/NordFlow/index.js.map +0 -1
- package/dist/Modal/NordFlow/screens/00-IdleScreen.d.ts +0 -6
- package/dist/Modal/NordFlow/screens/00-IdleScreen.js +0 -9
- package/dist/Modal/NordFlow/screens/00-IdleScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/Modal/NordFlow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/Modal/NordFlow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/02-EvmWalletAuthScreen.d.ts +0 -2
- package/dist/Modal/NordFlow/screens/02-EvmWalletAuthScreen.js +0 -45
- package/dist/Modal/NordFlow/screens/02-EvmWalletAuthScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/Modal/NordFlow/screens/03-AmountInputScreen.js +0 -358
- package/dist/Modal/NordFlow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/03-ChainSelectionScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/03-ChainSelectionScreen.js +0 -66
- package/dist/Modal/NordFlow/screens/03-ChainSelectionScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/04-AmountInputScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/04-AmountInputScreen.js +0 -204
- package/dist/Modal/NordFlow/screens/04-AmountInputScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/04-DepositProgressScreen.js +0 -26
- package/dist/Modal/NordFlow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/05-DepositProgressScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/05-DepositProgressScreen.js +0 -51
- package/dist/Modal/NordFlow/screens/05-DepositProgressScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/Modal/NordFlow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/Modal/NordFlow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/06-DepositSuccessScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/06-DepositSuccessScreen.js +0 -132
- package/dist/Modal/NordFlow/screens/06-DepositSuccessScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/07-AuthLoadingScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/07-AuthLoadingScreen.js +0 -30
- package/dist/Modal/NordFlow/screens/07-AuthLoadingScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/07-ErrorScreen.js +0 -14
- package/dist/Modal/NordFlow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/07-FinalSuccessScreen.d.ts +0 -5
- package/dist/Modal/NordFlow/screens/07-FinalSuccessScreen.js +0 -39
- package/dist/Modal/NordFlow/screens/07-FinalSuccessScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/08-ErrorScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/08-ErrorScreen.js +0 -68
- package/dist/Modal/NordFlow/screens/08-ErrorScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.d.ts +0 -5
- package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.js +0 -52
- package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/09-ErrorScreen.d.ts +0 -1
- package/dist/Modal/NordFlow/screens/09-ErrorScreen.js +0 -68
- package/dist/Modal/NordFlow/screens/09-ErrorScreen.js.map +0 -1
- package/dist/Modal/NordFlow/screens/index.d.ts +0 -7
- package/dist/Modal/NordFlow/screens/index.js +0 -8
- package/dist/Modal/NordFlow/screens/index.js.map +0 -1
- package/dist/Modal/NordFlow/types.d.ts +0 -113
- package/dist/Modal/NordFlow/types.js +0 -34
- package/dist/Modal/NordFlow/types.js.map +0 -1
- package/dist/Modal/NordFlow/utils/depositStorage.d.ts +0 -4
- package/dist/Modal/NordFlow/utils/depositStorage.js +0 -48
- package/dist/Modal/NordFlow/utils/depositStorage.js.map +0 -1
- package/dist/Modal/NordFlow/utils/imageUtils.d.ts +0 -21
- package/dist/Modal/NordFlow/utils/imageUtils.js +0 -110
- package/dist/Modal/NordFlow/utils/imageUtils.js.map +0 -1
- package/dist/Modal/NordFlow/utils/index.d.ts +0 -2
- package/dist/Modal/NordFlow/utils/index.js +0 -3
- package/dist/Modal/NordFlow/utils/index.js.map +0 -1
- package/dist/Modal/NordFlow/utils/nordUtils.d.ts +0 -40
- package/dist/Modal/NordFlow/utils/nordUtils.js +0 -64
- package/dist/Modal/NordFlow/utils/nordUtils.js.map +0 -1
- package/dist/Modal/Sidebar/N1Sidebar.d.ts +0 -1
- package/dist/Modal/Sidebar/N1Sidebar.js +0 -203
- package/dist/Modal/Sidebar/N1Sidebar.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketOverview.d.ts +0 -12
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketOverview.js +0 -90
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketOverview.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketSelector.d.ts +0 -6
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketSelector.js +0 -43
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketSelector.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketStats.d.ts +0 -11
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketStats.js +0 -20
- package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketStats.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/NordTradingView.d.ts +0 -1
- package/dist/Modal/Sidebar/NordTradingView/NordTradingView.js +0 -143
- package/dist/Modal/Sidebar/NordTradingView/NordTradingView.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBook.d.ts +0 -0
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBook.js +0 -248
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBook.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookDepthVisualizer.d.ts +0 -10
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookDepthVisualizer.js +0 -62
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookDepthVisualizer.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.js +0 -30
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.d.ts +0 -11
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.js +0 -22
- package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/AmountInput.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/AmountInput.js +0 -20
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/AmountInput.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/BuySellTabs.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/BuySellTabs.js +0 -24
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/BuySellTabs.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/FillModeSelector.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/FillModeSelector.js +0 -80
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/FillModeSelector.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/OrderTypeSelector.d.ts +0 -9
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/OrderTypeSelector.js +0 -110
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/OrderTypeSelector.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/PriceInput.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/PriceInput.js +0 -30
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/PriceInput.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/SubmitButton.d.ts +0 -9
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/SubmitButton.js +0 -40
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/SubmitButton.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TotalCalculator.d.ts +0 -7
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TotalCalculator.js +0 -10
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TotalCalculator.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TradeForm.d.ts +0 -13
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TradeForm.js +0 -264
- package/dist/Modal/Sidebar/NordTradingView/TradeForm/TradeForm.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/UserBalances/UserBalances.d.ts +0 -5
- package/dist/Modal/Sidebar/NordTradingView/UserBalances/UserBalances.js +0 -113
- package/dist/Modal/Sidebar/NordTradingView/UserBalances/UserBalances.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/UserOrders/UserOrders.d.ts +0 -1
- package/dist/Modal/Sidebar/NordTradingView/UserOrders/UserOrders.js +0 -183
- package/dist/Modal/Sidebar/NordTradingView/UserOrders/UserOrders.js.map +0 -1
- package/dist/Modal/Sidebar/NordTradingView/UserPositions/UserPositions.d.ts +0 -0
- package/dist/Modal/Sidebar/NordTradingView/UserPositions/UserPositions.js +0 -278
- package/dist/Modal/Sidebar/NordTradingView/UserPositions/UserPositions.js.map +0 -1
- package/dist/Provider/LazyWalletProvider.d.ts +0 -1
- package/dist/Provider/LazyWalletProvider.js +0 -230
- package/dist/Provider/LazyWalletProvider.js.map +0 -1
- package/dist/Provider/N1WalletProvider.d.ts +0 -3
- package/dist/Provider/N1WalletProvider.js +0 -266
- package/dist/Provider/N1WalletProvider.js.map +0 -1
- package/dist/Provider/ShadowRootWrapper.d.ts +0 -7
- package/dist/Provider/ShadowRootWrapper.js +0 -7
- package/dist/Provider/ShadowRootWrapper.js.map +0 -1
- package/dist/Provider/WalletErrorBoundary.d.ts +0 -17
- package/dist/Provider/WalletErrorBoundary.js +0 -57
- package/dist/Provider/WalletErrorBoundary.js.map +0 -1
- package/dist/Provider/context.d.ts +0 -5
- package/dist/Provider/context.js +0 -5
- package/dist/Provider/context.js.map +0 -1
- package/dist/Provider/hooks/useNordUserInitialization.d.ts +0 -1
- package/dist/Provider/hooks/useNordUserInitialization.js +0 -306
- package/dist/Provider/hooks/useNordUserInitialization.js.map +0 -1
- package/dist/Provider/hooks.d.ts +0 -2
- package/dist/Provider/hooks.js +0 -17
- package/dist/Provider/hooks.js.map +0 -1
- package/dist/Provider/icons/CoinbaseWalletIcon.d.ts +0 -1
- package/dist/Provider/icons/CoinbaseWalletIcon.js +0 -5
- package/dist/Provider/icons/CoinbaseWalletIcon.js.map +0 -1
- package/dist/Provider/icons/ConnectionDotsSVG.d.ts +0 -1
- package/dist/Provider/icons/ConnectionDotsSVG.js +0 -5
- package/dist/Provider/icons/ConnectionDotsSVG.js.map +0 -1
- package/dist/Provider/icons/MetamaskIcon.d.ts +0 -1
- package/dist/Provider/icons/MetamaskIcon.js +0 -5
- package/dist/Provider/icons/MetamaskIcon.js.map +0 -1
- package/dist/Provider/icons/PhantomIcon.d.ts +0 -1
- package/dist/Provider/icons/PhantomIcon.js +0 -5
- package/dist/Provider/icons/PhantomIcon.js.map +0 -1
- package/dist/Provider/icons/UserIcon.d.ts +0 -1
- package/dist/Provider/icons/UserIcon.js +0 -5
- package/dist/Provider/icons/UserIcon.js.map +0 -1
- package/dist/Provider/icons/WalletConnectIcon.d.ts +0 -1
- package/dist/Provider/icons/WalletConnectIcon.js +0 -5
- package/dist/Provider/icons/WalletConnectIcon.js.map +0 -1
- package/dist/Provider/index.d.ts +0 -3
- package/dist/Provider/index.js +0 -4
- package/dist/Provider/index.js.map +0 -1
- package/dist/Provider/types.d.ts +0 -152
- package/dist/Provider/types.js +0 -21
- package/dist/Provider/types.js.map +0 -1
- package/dist/WidgetButton/N1ConnectButton.d.ts +0 -5
- package/dist/WidgetButton/N1ConnectButton.js +0 -49
- package/dist/WidgetButton/N1ConnectButton.js.map +0 -1
- package/dist/components/QRCodeLoader.d.ts +0 -4
- package/dist/components/QRCodeLoader.js +0 -9
- package/dist/components/QRCodeLoader.js.map +0 -1
- package/dist/components/logos/EVMChainsGroup.d.ts +0 -7
- package/dist/components/logos/EVMChainsGroup.js +0 -19
- package/dist/components/logos/EVMChainsGroup.js.map +0 -1
- package/dist/components/logos/MoreChainsGroup.d.ts +0 -7
- package/dist/components/logos/MoreChainsGroup.js +0 -19
- package/dist/components/logos/MoreChainsGroup.js.map +0 -1
- package/dist/config/nordFlow.d.ts +0 -6
- package/dist/config/nordFlow.js +0 -63
- package/dist/config/nordFlow.js.map +0 -1
- package/dist/embedded-main-css.d.ts +0 -2
- package/dist/embedded-main-css.js +0 -3
- package/dist/embedded-main-css.js.map +0 -1
- package/dist/features/nord-flow/N1WalletModal.d.ts +0 -2
- package/dist/features/nord-flow/N1WalletModal.js +0 -92
- package/dist/features/nord-flow/N1WalletModal.js.map +0 -1
- package/dist/features/nord-flow/NordFlow.d.ts +0 -9
- package/dist/features/nord-flow/NordFlow.js +0 -98
- package/dist/features/nord-flow/NordFlow.js.map +0 -1
- package/dist/features/nord-flow/components/ChainButton.d.ts +0 -10
- package/dist/features/nord-flow/components/ChainButton.js +0 -21
- package/dist/features/nord-flow/components/ChainButton.js.map +0 -1
- package/dist/features/nord-flow/components/Header.d.ts +0 -12
- package/dist/features/nord-flow/components/Header.js +0 -45
- package/dist/features/nord-flow/components/Header.js.map +0 -1
- package/dist/features/nord-flow/components/ImageWithFallback.d.ts +0 -17
- package/dist/features/nord-flow/components/ImageWithFallback.js +0 -33
- package/dist/features/nord-flow/components/ImageWithFallback.js.map +0 -1
- package/dist/features/nord-flow/components/TransactionTable.d.ts +0 -13
- package/dist/features/nord-flow/components/TransactionTable.js +0 -83
- package/dist/features/nord-flow/components/TransactionTable.js.map +0 -1
- package/dist/features/nord-flow/components/WaitingMessage.d.ts +0 -8
- package/dist/features/nord-flow/components/WaitingMessage.js +0 -17
- package/dist/features/nord-flow/components/WaitingMessage.js.map +0 -1
- package/dist/features/nord-flow/components/index.d.ts +0 -5
- package/dist/features/nord-flow/components/index.js +0 -6
- package/dist/features/nord-flow/components/index.js.map +0 -1
- package/dist/features/nord-flow/context/DepositContext.d.ts +0 -29
- package/dist/features/nord-flow/context/DepositContext.js +0 -525
- package/dist/features/nord-flow/context/DepositContext.js.map +0 -1
- package/dist/features/nord-flow/context/FlowContext.d.ts +0 -50
- package/dist/features/nord-flow/context/FlowContext.js +0 -192
- package/dist/features/nord-flow/context/FlowContext.js.map +0 -1
- package/dist/features/nord-flow/context/NordProvider.d.ts +0 -10
- package/dist/features/nord-flow/context/NordProvider.js +0 -14
- package/dist/features/nord-flow/context/NordProvider.js.map +0 -1
- package/dist/features/nord-flow/context/WalletConnectContext.d.ts +0 -21
- package/dist/features/nord-flow/context/WalletConnectContext.js +0 -394
- package/dist/features/nord-flow/context/WalletConnectContext.js.map +0 -1
- package/dist/features/nord-flow/context/debug.d.ts +0 -6
- package/dist/features/nord-flow/context/debug.js +0 -63
- package/dist/features/nord-flow/context/debug.js.map +0 -1
- package/dist/features/nord-flow/context/flowMachine.d.ts +0 -48
- package/dist/features/nord-flow/context/flowMachine.js +0 -83
- package/dist/features/nord-flow/context/flowMachine.js.map +0 -1
- package/dist/features/nord-flow/context/index.d.ts +0 -5
- package/dist/features/nord-flow/context/index.js +0 -8
- package/dist/features/nord-flow/context/index.js.map +0 -1
- package/dist/features/nord-flow/hoc/index.d.ts +0 -1
- package/dist/features/nord-flow/hoc/index.js +0 -2
- package/dist/features/nord-flow/hoc/index.js.map +0 -1
- package/dist/features/nord-flow/hoc/withImageFallback.d.ts +0 -7
- package/dist/features/nord-flow/hoc/withImageFallback.js +0 -61
- package/dist/features/nord-flow/hoc/withImageFallback.js.map +0 -1
- package/dist/features/nord-flow/index.d.ts +0 -1
- package/dist/features/nord-flow/index.js +0 -2
- package/dist/features/nord-flow/index.js.map +0 -1
- package/dist/features/nord-flow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/features/nord-flow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/features/nord-flow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/02-ChainSelectionScreen.d.ts +0 -31
- package/dist/features/nord-flow/screens/02-ChainSelectionScreen.js +0 -101
- package/dist/features/nord-flow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/03-AmountInputScreen.d.ts +0 -6
- package/dist/features/nord-flow/screens/03-AmountInputScreen.js +0 -361
- package/dist/features/nord-flow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/04-DepositProgressScreen.d.ts +0 -3
- package/dist/features/nord-flow/screens/04-DepositProgressScreen.js +0 -31
- package/dist/features/nord-flow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/features/nord-flow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/features/nord-flow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/features/nord-flow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/features/nord-flow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/features/nord-flow/screens/07-ErrorScreen.js +0 -14
- package/dist/features/nord-flow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/features/nord-flow/screens/index.d.ts +0 -7
- package/dist/features/nord-flow/screens/index.js +0 -8
- package/dist/features/nord-flow/screens/index.js.map +0 -1
- package/dist/features/nord-flow/types.d.ts +0 -113
- package/dist/features/nord-flow/types.js +0 -34
- package/dist/features/nord-flow/types.js.map +0 -1
- package/dist/features/nord-flow/utils/depositStorage.d.ts +0 -4
- package/dist/features/nord-flow/utils/depositStorage.js +0 -48
- package/dist/features/nord-flow/utils/depositStorage.js.map +0 -1
- package/dist/features/nord-flow/utils/imageUtils.d.ts +0 -21
- package/dist/features/nord-flow/utils/imageUtils.js +0 -110
- package/dist/features/nord-flow/utils/imageUtils.js.map +0 -1
- package/dist/features/nord-flow/utils/index.d.ts +0 -2
- package/dist/features/nord-flow/utils/index.js +0 -3
- package/dist/features/nord-flow/utils/index.js.map +0 -1
- package/dist/features/nord-flow/utils/nordUser.d.ts +0 -1
- package/dist/features/nord-flow/utils/nordUser.js +0 -48
- package/dist/features/nord-flow/utils/nordUser.js.map +0 -1
- package/dist/features/nord-flow/utils/nordUtils.d.ts +0 -40
- package/dist/features/nord-flow/utils/nordUtils.js +0 -64
- package/dist/features/nord-flow/utils/nordUtils.js.map +0 -1
- package/dist/features/nord-flow/utils/session.d.ts +0 -17
- package/dist/features/nord-flow/utils/session.js +0 -69
- package/dist/features/nord-flow/utils/session.js.map +0 -1
- package/dist/features/nord-flow/utils/transaction.d.ts +0 -19
- package/dist/features/nord-flow/utils/transaction.js +0 -8
- package/dist/features/nord-flow/utils/transaction.js.map +0 -1
- package/dist/features/nord-flow/utils/utils.d.ts +0 -19
- package/dist/features/nord-flow/utils/utils.js +0 -66
- package/dist/features/nord-flow/utils/utils.js.map +0 -1
- package/dist/features/nord-flow/utils/withImageFallback.d.ts +0 -7
- package/dist/features/nord-flow/utils/withImageFallback.js +0 -61
- package/dist/features/nord-flow/utils/withImageFallback.js.map +0 -1
- package/dist/features/onboarding-flow/providers/FlowStateProvider.d.ts +0 -50
- package/dist/features/onboarding-flow/providers/FlowStateProvider.js +0 -192
- package/dist/features/onboarding-flow/providers/FlowStateProvider.js.map +0 -1
- package/dist/features/onboarding-flow/providers/OnboardingProvider.d.ts +0 -10
- package/dist/features/onboarding-flow/providers/OnboardingProvider.js +0 -14
- package/dist/features/onboarding-flow/providers/OnboardingProvider.js.map +0 -1
- package/dist/features/onboarding-flow/providers/flowMachine.d.ts +0 -48
- package/dist/features/onboarding-flow/providers/flowMachine.js +0 -83
- package/dist/features/onboarding-flow/providers/flowMachine.js.map +0 -1
- package/dist/features/wallet/components/N1ConnectButton.d.ts +0 -5
- package/dist/features/wallet/components/N1ConnectButton.js +0 -49
- package/dist/features/wallet/components/N1ConnectButton.js.map +0 -1
- package/dist/features/wallet/logic/getPseudoName.d.ts +0 -1
- package/dist/features/wallet/logic/getPseudoName.js +0 -5826
- package/dist/features/wallet/logic/getPseudoName.js.map +0 -1
- package/dist/features/wallet/logic/sessionManager.d.ts +0 -17
- package/dist/features/wallet/logic/sessionManager.js +0 -38
- package/dist/features/wallet/logic/sessionManager.js.map +0 -1
- package/dist/features/wallet/logic/transactionManager.d.ts +0 -19
- package/dist/features/wallet/logic/transactionManager.js +0 -8
- package/dist/features/wallet/logic/transactionManager.js.map +0 -1
- package/dist/features/wallet/logic/utils.d.ts +0 -19
- package/dist/features/wallet/logic/utils.js +0 -66
- package/dist/features/wallet/logic/utils.js.map +0 -1
- package/dist/features/wallet/logic/words.d.ts +0 -9
- package/dist/features/wallet/logic/words.js +0 -93572
- package/dist/features/wallet/logic/words.js.map +0 -1
- package/dist/features/wallet/modal/LoadingFallback.d.ts +0 -2
- package/dist/features/wallet/modal/LoadingFallback.js +0 -3
- package/dist/features/wallet/modal/LoadingFallback.js.map +0 -1
- package/dist/features/wallet/modal/N1WalletModal.d.ts +0 -2
- package/dist/features/wallet/modal/N1WalletModal.js +0 -93
- package/dist/features/wallet/modal/N1WalletModal.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/NordFlow.d.ts +0 -9
- package/dist/features/wallet/modal/NordFlow/NordFlow.js +0 -98
- package/dist/features/wallet/modal/NordFlow/NordFlow.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/ChainButton.d.ts +0 -10
- package/dist/features/wallet/modal/NordFlow/components/ChainButton.js +0 -21
- package/dist/features/wallet/modal/NordFlow/components/ChainButton.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/Header.d.ts +0 -12
- package/dist/features/wallet/modal/NordFlow/components/Header.js +0 -45
- package/dist/features/wallet/modal/NordFlow/components/Header.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/ImageWithFallback.d.ts +0 -17
- package/dist/features/wallet/modal/NordFlow/components/ImageWithFallback.js +0 -33
- package/dist/features/wallet/modal/NordFlow/components/ImageWithFallback.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/TransactionTable.d.ts +0 -13
- package/dist/features/wallet/modal/NordFlow/components/TransactionTable.js +0 -83
- package/dist/features/wallet/modal/NordFlow/components/TransactionTable.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/WaitingMessage.d.ts +0 -8
- package/dist/features/wallet/modal/NordFlow/components/WaitingMessage.js +0 -17
- package/dist/features/wallet/modal/NordFlow/components/WaitingMessage.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/components/index.d.ts +0 -5
- package/dist/features/wallet/modal/NordFlow/components/index.js +0 -6
- package/dist/features/wallet/modal/NordFlow/components/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/constants.d.ts +0 -31
- package/dist/features/wallet/modal/NordFlow/constants.js +0 -56
- package/dist/features/wallet/modal/NordFlow/constants.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/DepositContext.d.ts +0 -29
- package/dist/features/wallet/modal/NordFlow/context/DepositContext.js +0 -526
- package/dist/features/wallet/modal/NordFlow/context/DepositContext.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/FlowContext.d.ts +0 -50
- package/dist/features/wallet/modal/NordFlow/context/FlowContext.js +0 -192
- package/dist/features/wallet/modal/NordFlow/context/FlowContext.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/NordProvider.d.ts +0 -10
- package/dist/features/wallet/modal/NordFlow/context/NordProvider.js +0 -14
- package/dist/features/wallet/modal/NordFlow/context/NordProvider.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/WalletConnectContext.d.ts +0 -20
- package/dist/features/wallet/modal/NordFlow/context/WalletConnectContext.js +0 -394
- package/dist/features/wallet/modal/NordFlow/context/WalletConnectContext.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/flowMachine.d.ts +0 -48
- package/dist/features/wallet/modal/NordFlow/context/flowMachine.js +0 -83
- package/dist/features/wallet/modal/NordFlow/context/flowMachine.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/context/index.d.ts +0 -5
- package/dist/features/wallet/modal/NordFlow/context/index.js +0 -8
- package/dist/features/wallet/modal/NordFlow/context/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/hoc/index.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/hoc/index.js +0 -2
- package/dist/features/wallet/modal/NordFlow/hoc/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/hoc/withImageFallback.d.ts +0 -7
- package/dist/features/wallet/modal/NordFlow/hoc/withImageFallback.js +0 -61
- package/dist/features/wallet/modal/NordFlow/hoc/withImageFallback.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/index.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/index.js +0 -2
- package/dist/features/wallet/modal/NordFlow/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/features/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/features/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/features/wallet/modal/NordFlow/screens/03-AmountInputScreen.js +0 -358
- package/dist/features/wallet/modal/NordFlow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/04-DepositProgressScreen.js +0 -26
- package/dist/features/wallet/modal/NordFlow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/features/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/features/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/07-ErrorScreen.js +0 -14
- package/dist/features/wallet/modal/NordFlow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/screens/index.d.ts +0 -7
- package/dist/features/wallet/modal/NordFlow/screens/index.js +0 -8
- package/dist/features/wallet/modal/NordFlow/screens/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/types.d.ts +0 -113
- package/dist/features/wallet/modal/NordFlow/types.js +0 -34
- package/dist/features/wallet/modal/NordFlow/types.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/utils/depositStorage.d.ts +0 -4
- package/dist/features/wallet/modal/NordFlow/utils/depositStorage.js +0 -48
- package/dist/features/wallet/modal/NordFlow/utils/depositStorage.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/utils/imageUtils.d.ts +0 -21
- package/dist/features/wallet/modal/NordFlow/utils/imageUtils.js +0 -110
- package/dist/features/wallet/modal/NordFlow/utils/imageUtils.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/utils/index.d.ts +0 -2
- package/dist/features/wallet/modal/NordFlow/utils/index.js +0 -3
- package/dist/features/wallet/modal/NordFlow/utils/index.js.map +0 -1
- package/dist/features/wallet/modal/NordFlow/utils/nordUtils.d.ts +0 -40
- package/dist/features/wallet/modal/NordFlow/utils/nordUtils.js +0 -64
- package/dist/features/wallet/modal/NordFlow/utils/nordUtils.js.map +0 -1
- package/dist/features/wallet/provider/LazyWalletProvider.d.ts +0 -1
- package/dist/features/wallet/provider/LazyWalletProvider.js +0 -230
- package/dist/features/wallet/provider/LazyWalletProvider.js.map +0 -1
- package/dist/features/wallet/provider/N1WalletProvider.d.ts +0 -3
- package/dist/features/wallet/provider/N1WalletProvider.js +0 -266
- package/dist/features/wallet/provider/N1WalletProvider.js.map +0 -1
- package/dist/features/wallet/provider/ShadowRootWrapper.d.ts +0 -7
- package/dist/features/wallet/provider/ShadowRootWrapper.js +0 -7
- package/dist/features/wallet/provider/ShadowRootWrapper.js.map +0 -1
- package/dist/features/wallet/provider/WalletErrorBoundary.d.ts +0 -17
- package/dist/features/wallet/provider/WalletErrorBoundary.js +0 -57
- package/dist/features/wallet/provider/WalletErrorBoundary.js.map +0 -1
- package/dist/features/wallet/provider/context.d.ts +0 -5
- package/dist/features/wallet/provider/context.js +0 -5
- package/dist/features/wallet/provider/context.js.map +0 -1
- package/dist/features/wallet/provider/hooks/useNordUserInitialization.d.ts +0 -1
- package/dist/features/wallet/provider/hooks/useNordUserInitialization.js +0 -306
- package/dist/features/wallet/provider/hooks/useNordUserInitialization.js.map +0 -1
- package/dist/features/wallet/provider/hooks.d.ts +0 -2
- package/dist/features/wallet/provider/hooks.js +0 -17
- package/dist/features/wallet/provider/hooks.js.map +0 -1
- package/dist/features/wallet/provider/index.d.ts +0 -3
- package/dist/features/wallet/provider/index.js +0 -4
- package/dist/features/wallet/provider/index.js.map +0 -1
- package/dist/features/wallet/provider/types.d.ts +0 -152
- package/dist/features/wallet/provider/types.js +0 -21
- package/dist/features/wallet/provider/types.js.map +0 -1
- package/dist/features/wallet/styles/embeddedStyles.d.ts +0 -2
- package/dist/features/wallet/styles/embeddedStyles.js +0 -3
- package/dist/features/wallet/styles/embeddedStyles.js.map +0 -1
- package/dist/lib/nord/index.d.ts +0 -2
- package/dist/lib/nord/index.js +0 -59
- package/dist/lib/nord/index.js.map +0 -1
- package/dist/lib/session/index.d.ts +0 -18
- package/dist/lib/session/index.js +0 -70
- package/dist/lib/session/index.js.map +0 -1
- package/dist/lib/session/utils.d.ts +0 -19
- package/dist/lib/session/utils.js +0 -66
- package/dist/lib/session/utils.js.map +0 -1
- package/dist/lib/transaction/index.d.ts +0 -19
- package/dist/lib/transaction/index.js +0 -8
- package/dist/lib/transaction/index.js.map +0 -1
- package/dist/shared/animations/N1Loader.d.ts +0 -11
- package/dist/shared/animations/N1Loader.js +0 -42
- package/dist/shared/animations/N1Loader.js.map +0 -1
- package/dist/shared/animations/N1Loader.json +0 -1
- package/dist/shared/animations/Processing.d.ts +0 -11
- package/dist/shared/animations/Processing.js +0 -42
- package/dist/shared/animations/Processing.js.map +0 -1
- package/dist/shared/animations/Processing.json +0 -1
- package/dist/shared/config/chains.d.ts +0 -29
- package/dist/shared/config/chains.js +0 -39
- package/dist/shared/config/chains.js.map +0 -1
- package/dist/shared/config/nordFlow.d.ts +0 -9
- package/dist/shared/config/nordFlow.js +0 -71
- package/dist/shared/config/nordFlow.js.map +0 -1
- package/dist/shared/config/public.d.ts +0 -2
- package/dist/shared/config/public.js +0 -3
- package/dist/shared/config/public.js.map +0 -1
- package/dist/shared/config/solana.d.ts +0 -13
- package/dist/shared/config/solana.js +0 -19
- package/dist/shared/config/solana.js.map +0 -1
- package/dist/shared/errors/types.d.ts +0 -25
- package/dist/shared/errors/types.js +0 -77
- package/dist/shared/errors/types.js.map +0 -1
- package/dist/shared/polyfills/windowEthereumGuard.d.ts +0 -6
- package/dist/shared/polyfills/windowEthereumGuard.js +0 -28
- package/dist/shared/polyfills/windowEthereumGuard.js.map +0 -1
- package/dist/shared/ui/Logo.d.ts +0 -8
- package/dist/shared/ui/Logo.js +0 -122
- package/dist/shared/ui/Logo.js.map +0 -1
- package/dist/shared/ui/logos/ArbitrumLogo.d.ts +0 -8
- package/dist/shared/ui/logos/ArbitrumLogo.js +0 -6
- package/dist/shared/ui/logos/ArbitrumLogo.js.map +0 -1
- package/dist/shared/ui/logos/BaseLogo.d.ts +0 -8
- package/dist/shared/ui/logos/BaseLogo.js +0 -6
- package/dist/shared/ui/logos/BaseLogo.js.map +0 -1
- package/dist/shared/ui/logos/BeraLogo.d.ts +0 -8
- package/dist/shared/ui/logos/BeraLogo.js +0 -6
- package/dist/shared/ui/logos/BeraLogo.js.map +0 -1
- package/dist/shared/ui/logos/BitcoinLogo.d.ts +0 -8
- package/dist/shared/ui/logos/BitcoinLogo.js +0 -6
- package/dist/shared/ui/logos/BitcoinLogo.js.map +0 -1
- package/dist/shared/ui/logos/EthereumLogo.d.ts +0 -8
- package/dist/shared/ui/logos/EthereumLogo.js +0 -6
- package/dist/shared/ui/logos/EthereumLogo.js.map +0 -1
- package/dist/shared/ui/logos/HyperliquidLogo.d.ts +0 -8
- package/dist/shared/ui/logos/HyperliquidLogo.js +0 -6
- package/dist/shared/ui/logos/HyperliquidLogo.js.map +0 -1
- package/dist/shared/ui/logos/OptimismLogo.d.ts +0 -8
- package/dist/shared/ui/logos/OptimismLogo.js +0 -6
- package/dist/shared/ui/logos/OptimismLogo.js.map +0 -1
- package/dist/shared/ui/logos/SolanaLogo.d.ts +0 -8
- package/dist/shared/ui/logos/SolanaLogo.js +0 -6
- package/dist/shared/ui/logos/SolanaLogo.js.map +0 -1
- package/dist/shared/ui/logos/ZeroOneLogo.d.ts +0 -8
- package/dist/shared/ui/logos/ZeroOneLogo.js +0 -6
- package/dist/shared/ui/logos/ZeroOneLogo.js.map +0 -1
- package/dist/shared/ui/logos/index.d.ts +0 -9
- package/dist/shared/ui/logos/index.js +0 -10
- package/dist/shared/ui/logos/index.js.map +0 -1
- package/dist/shared/utils/dynamicNord.d.ts +0 -2
- package/dist/shared/utils/dynamicNord.js +0 -59
- package/dist/shared/utils/dynamicNord.js.map +0 -1
- package/dist/shared/utils/ed25519.d.ts +0 -8
- package/dist/shared/utils/ed25519.js +0 -87
- package/dist/shared/utils/ed25519.js.map +0 -1
- package/dist/shared/utils/logger.d.ts +0 -21
- package/dist/shared/utils/logger.js +0 -130
- package/dist/shared/utils/logger.js.map +0 -1
- package/dist/shared/utils/shortenString.d.ts +0 -2
- package/dist/shared/utils/shortenString.js +0 -9
- package/dist/shared/utils/shortenString.js.map +0 -1
- package/dist/utils/dynamicImports.js +0 -42
- package/dist/utils/dynamicImports.js.map +0 -1
- package/dist/utils/dynamicNord.d.ts +0 -2
- package/dist/utils/dynamicNord.js +0 -59
- package/dist/utils/dynamicNord.js.map +0 -1
- package/dist/wallet/components/N1ConnectButton.d.ts +0 -5
- package/dist/wallet/components/N1ConnectButton.js +0 -49
- package/dist/wallet/components/N1ConnectButton.js.map +0 -1
- package/dist/wallet/logic/getPseudoName.d.ts +0 -1
- package/dist/wallet/logic/getPseudoName.js +0 -5826
- package/dist/wallet/logic/getPseudoName.js.map +0 -1
- package/dist/wallet/logic/sessionManager.d.ts +0 -17
- package/dist/wallet/logic/sessionManager.js +0 -38
- package/dist/wallet/logic/sessionManager.js.map +0 -1
- package/dist/wallet/logic/transactionManager.d.ts +0 -19
- package/dist/wallet/logic/transactionManager.js +0 -8
- package/dist/wallet/logic/transactionManager.js.map +0 -1
- package/dist/wallet/logic/utils.d.ts +0 -19
- package/dist/wallet/logic/utils.js +0 -66
- package/dist/wallet/logic/utils.js.map +0 -1
- package/dist/wallet/logic/words.d.ts +0 -9
- package/dist/wallet/logic/words.js +0 -93572
- package/dist/wallet/logic/words.js.map +0 -1
- package/dist/wallet/modal/LoadingFallback.d.ts +0 -2
- package/dist/wallet/modal/LoadingFallback.js +0 -3
- package/dist/wallet/modal/LoadingFallback.js.map +0 -1
- package/dist/wallet/modal/N1WalletModal.d.ts +0 -2
- package/dist/wallet/modal/N1WalletModal.js +0 -93
- package/dist/wallet/modal/N1WalletModal.js.map +0 -1
- package/dist/wallet/modal/NordFlow/NordFlow.d.ts +0 -9
- package/dist/wallet/modal/NordFlow/NordFlow.js +0 -98
- package/dist/wallet/modal/NordFlow/NordFlow.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/ChainButton.d.ts +0 -10
- package/dist/wallet/modal/NordFlow/components/ChainButton.js +0 -21
- package/dist/wallet/modal/NordFlow/components/ChainButton.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/Header.d.ts +0 -12
- package/dist/wallet/modal/NordFlow/components/Header.js +0 -45
- package/dist/wallet/modal/NordFlow/components/Header.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/ImageWithFallback.d.ts +0 -17
- package/dist/wallet/modal/NordFlow/components/ImageWithFallback.js +0 -33
- package/dist/wallet/modal/NordFlow/components/ImageWithFallback.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/TransactionTable.d.ts +0 -13
- package/dist/wallet/modal/NordFlow/components/TransactionTable.js +0 -83
- package/dist/wallet/modal/NordFlow/components/TransactionTable.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/WaitingMessage.d.ts +0 -8
- package/dist/wallet/modal/NordFlow/components/WaitingMessage.js +0 -17
- package/dist/wallet/modal/NordFlow/components/WaitingMessage.js.map +0 -1
- package/dist/wallet/modal/NordFlow/components/index.d.ts +0 -5
- package/dist/wallet/modal/NordFlow/components/index.js +0 -6
- package/dist/wallet/modal/NordFlow/components/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/constants.d.ts +0 -31
- package/dist/wallet/modal/NordFlow/constants.js +0 -56
- package/dist/wallet/modal/NordFlow/constants.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/DepositContext.d.ts +0 -29
- package/dist/wallet/modal/NordFlow/context/DepositContext.js +0 -526
- package/dist/wallet/modal/NordFlow/context/DepositContext.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/FlowContext.d.ts +0 -50
- package/dist/wallet/modal/NordFlow/context/FlowContext.js +0 -192
- package/dist/wallet/modal/NordFlow/context/FlowContext.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/NordProvider.d.ts +0 -10
- package/dist/wallet/modal/NordFlow/context/NordProvider.js +0 -14
- package/dist/wallet/modal/NordFlow/context/NordProvider.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/WalletConnectContext.d.ts +0 -20
- package/dist/wallet/modal/NordFlow/context/WalletConnectContext.js +0 -394
- package/dist/wallet/modal/NordFlow/context/WalletConnectContext.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/flowMachine.d.ts +0 -48
- package/dist/wallet/modal/NordFlow/context/flowMachine.js +0 -83
- package/dist/wallet/modal/NordFlow/context/flowMachine.js.map +0 -1
- package/dist/wallet/modal/NordFlow/context/index.d.ts +0 -5
- package/dist/wallet/modal/NordFlow/context/index.js +0 -8
- package/dist/wallet/modal/NordFlow/context/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/hoc/index.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/hoc/index.js +0 -2
- package/dist/wallet/modal/NordFlow/hoc/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/hoc/withImageFallback.d.ts +0 -7
- package/dist/wallet/modal/NordFlow/hoc/withImageFallback.js +0 -61
- package/dist/wallet/modal/NordFlow/hoc/withImageFallback.js.map +0 -1
- package/dist/wallet/modal/NordFlow/index.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/index.js +0 -2
- package/dist/wallet/modal/NordFlow/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/wallet/modal/NordFlow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/wallet/modal/NordFlow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/wallet/modal/NordFlow/screens/03-AmountInputScreen.js +0 -358
- package/dist/wallet/modal/NordFlow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/04-DepositProgressScreen.js +0 -26
- package/dist/wallet/modal/NordFlow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/wallet/modal/NordFlow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/wallet/modal/NordFlow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/wallet/modal/NordFlow/screens/07-ErrorScreen.js +0 -14
- package/dist/wallet/modal/NordFlow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/wallet/modal/NordFlow/screens/index.d.ts +0 -7
- package/dist/wallet/modal/NordFlow/screens/index.js +0 -8
- package/dist/wallet/modal/NordFlow/screens/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/types.d.ts +0 -113
- package/dist/wallet/modal/NordFlow/types.js +0 -34
- package/dist/wallet/modal/NordFlow/types.js.map +0 -1
- package/dist/wallet/modal/NordFlow/utils/depositStorage.d.ts +0 -4
- package/dist/wallet/modal/NordFlow/utils/depositStorage.js +0 -48
- package/dist/wallet/modal/NordFlow/utils/depositStorage.js.map +0 -1
- package/dist/wallet/modal/NordFlow/utils/imageUtils.d.ts +0 -21
- package/dist/wallet/modal/NordFlow/utils/imageUtils.js +0 -110
- package/dist/wallet/modal/NordFlow/utils/imageUtils.js.map +0 -1
- package/dist/wallet/modal/NordFlow/utils/index.d.ts +0 -2
- package/dist/wallet/modal/NordFlow/utils/index.js +0 -3
- package/dist/wallet/modal/NordFlow/utils/index.js.map +0 -1
- package/dist/wallet/modal/NordFlow/utils/nordUtils.d.ts +0 -40
- package/dist/wallet/modal/NordFlow/utils/nordUtils.js +0 -64
- package/dist/wallet/modal/NordFlow/utils/nordUtils.js.map +0 -1
- package/dist/wallet/modal/flow/NordFlow.d.ts +0 -9
- package/dist/wallet/modal/flow/NordFlow.js +0 -98
- package/dist/wallet/modal/flow/NordFlow.js.map +0 -1
- package/dist/wallet/modal/flow/components/ChainButton.d.ts +0 -10
- package/dist/wallet/modal/flow/components/ChainButton.js +0 -21
- package/dist/wallet/modal/flow/components/ChainButton.js.map +0 -1
- package/dist/wallet/modal/flow/components/Header.d.ts +0 -12
- package/dist/wallet/modal/flow/components/Header.js +0 -45
- package/dist/wallet/modal/flow/components/Header.js.map +0 -1
- package/dist/wallet/modal/flow/components/ImageWithFallback.d.ts +0 -17
- package/dist/wallet/modal/flow/components/ImageWithFallback.js +0 -33
- package/dist/wallet/modal/flow/components/ImageWithFallback.js.map +0 -1
- package/dist/wallet/modal/flow/components/TransactionTable.d.ts +0 -13
- package/dist/wallet/modal/flow/components/TransactionTable.js +0 -83
- package/dist/wallet/modal/flow/components/TransactionTable.js.map +0 -1
- package/dist/wallet/modal/flow/components/WaitingMessage.d.ts +0 -8
- package/dist/wallet/modal/flow/components/WaitingMessage.js +0 -17
- package/dist/wallet/modal/flow/components/WaitingMessage.js.map +0 -1
- package/dist/wallet/modal/flow/components/index.d.ts +0 -5
- package/dist/wallet/modal/flow/components/index.js +0 -6
- package/dist/wallet/modal/flow/components/index.js.map +0 -1
- package/dist/wallet/modal/flow/constants.d.ts +0 -31
- package/dist/wallet/modal/flow/constants.js +0 -56
- package/dist/wallet/modal/flow/constants.js.map +0 -1
- package/dist/wallet/modal/flow/context/DepositContext.d.ts +0 -29
- package/dist/wallet/modal/flow/context/DepositContext.js +0 -526
- package/dist/wallet/modal/flow/context/DepositContext.js.map +0 -1
- package/dist/wallet/modal/flow/context/FlowContext.d.ts +0 -50
- package/dist/wallet/modal/flow/context/FlowContext.js +0 -192
- package/dist/wallet/modal/flow/context/FlowContext.js.map +0 -1
- package/dist/wallet/modal/flow/context/NordProvider.d.ts +0 -10
- package/dist/wallet/modal/flow/context/NordProvider.js +0 -14
- package/dist/wallet/modal/flow/context/NordProvider.js.map +0 -1
- package/dist/wallet/modal/flow/context/WalletConnectContext.d.ts +0 -20
- package/dist/wallet/modal/flow/context/WalletConnectContext.js +0 -394
- package/dist/wallet/modal/flow/context/WalletConnectContext.js.map +0 -1
- package/dist/wallet/modal/flow/context/flowMachine.d.ts +0 -48
- package/dist/wallet/modal/flow/context/flowMachine.js +0 -83
- package/dist/wallet/modal/flow/context/flowMachine.js.map +0 -1
- package/dist/wallet/modal/flow/context/index.d.ts +0 -5
- package/dist/wallet/modal/flow/context/index.js +0 -8
- package/dist/wallet/modal/flow/context/index.js.map +0 -1
- package/dist/wallet/modal/flow/hoc/index.d.ts +0 -1
- package/dist/wallet/modal/flow/hoc/index.js +0 -2
- package/dist/wallet/modal/flow/hoc/index.js.map +0 -1
- package/dist/wallet/modal/flow/hoc/withImageFallback.d.ts +0 -7
- package/dist/wallet/modal/flow/hoc/withImageFallback.js +0 -61
- package/dist/wallet/modal/flow/hoc/withImageFallback.js.map +0 -1
- package/dist/wallet/modal/flow/index.d.ts +0 -1
- package/dist/wallet/modal/flow/index.js +0 -2
- package/dist/wallet/modal/flow/index.js.map +0 -1
- package/dist/wallet/modal/flow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/wallet/modal/flow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/wallet/modal/flow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/wallet/modal/flow/screens/03-AmountInputScreen.js +0 -358
- package/dist/wallet/modal/flow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/04-DepositProgressScreen.js +0 -26
- package/dist/wallet/modal/flow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/wallet/modal/flow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/wallet/modal/flow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/screens/07-ErrorScreen.js +0 -14
- package/dist/wallet/modal/flow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/wallet/modal/flow/screens/index.d.ts +0 -7
- package/dist/wallet/modal/flow/screens/index.js +0 -8
- package/dist/wallet/modal/flow/screens/index.js.map +0 -1
- package/dist/wallet/modal/flow/state/constants.d.ts +0 -31
- package/dist/wallet/modal/flow/state/constants.js +0 -56
- package/dist/wallet/modal/flow/state/constants.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/DepositContext.d.ts +0 -29
- package/dist/wallet/modal/flow/state/context/DepositContext.js +0 -526
- package/dist/wallet/modal/flow/state/context/DepositContext.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/FlowContext.d.ts +0 -50
- package/dist/wallet/modal/flow/state/context/FlowContext.js +0 -192
- package/dist/wallet/modal/flow/state/context/FlowContext.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/NordProvider.d.ts +0 -10
- package/dist/wallet/modal/flow/state/context/NordProvider.js +0 -14
- package/dist/wallet/modal/flow/state/context/NordProvider.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/WalletConnectContext.d.ts +0 -20
- package/dist/wallet/modal/flow/state/context/WalletConnectContext.js +0 -394
- package/dist/wallet/modal/flow/state/context/WalletConnectContext.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/flowMachine.d.ts +0 -48
- package/dist/wallet/modal/flow/state/context/flowMachine.js +0 -83
- package/dist/wallet/modal/flow/state/context/flowMachine.js.map +0 -1
- package/dist/wallet/modal/flow/state/context/index.d.ts +0 -5
- package/dist/wallet/modal/flow/state/context/index.js +0 -8
- package/dist/wallet/modal/flow/state/context/index.js.map +0 -1
- package/dist/wallet/modal/flow/state/types.d.ts +0 -113
- package/dist/wallet/modal/flow/state/types.js +0 -34
- package/dist/wallet/modal/flow/state/types.js.map +0 -1
- package/dist/wallet/modal/flow/state/utils/depositStorage.d.ts +0 -4
- package/dist/wallet/modal/flow/state/utils/depositStorage.js +0 -48
- package/dist/wallet/modal/flow/state/utils/depositStorage.js.map +0 -1
- package/dist/wallet/modal/flow/state/utils/nordUtils.d.ts +0 -40
- package/dist/wallet/modal/flow/state/utils/nordUtils.js +0 -64
- package/dist/wallet/modal/flow/state/utils/nordUtils.js.map +0 -1
- package/dist/wallet/modal/flow/types.d.ts +0 -113
- package/dist/wallet/modal/flow/types.js +0 -34
- package/dist/wallet/modal/flow/types.js.map +0 -1
- package/dist/wallet/modal/flow/ui/NordFlow.d.ts +0 -9
- package/dist/wallet/modal/flow/ui/NordFlow.js +0 -98
- package/dist/wallet/modal/flow/ui/NordFlow.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/ChainButton.d.ts +0 -10
- package/dist/wallet/modal/flow/ui/components/ChainButton.js +0 -21
- package/dist/wallet/modal/flow/ui/components/ChainButton.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/Header.d.ts +0 -12
- package/dist/wallet/modal/flow/ui/components/Header.js +0 -45
- package/dist/wallet/modal/flow/ui/components/Header.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/ImageWithFallback.d.ts +0 -17
- package/dist/wallet/modal/flow/ui/components/ImageWithFallback.js +0 -33
- package/dist/wallet/modal/flow/ui/components/ImageWithFallback.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/TransactionTable.d.ts +0 -13
- package/dist/wallet/modal/flow/ui/components/TransactionTable.js +0 -83
- package/dist/wallet/modal/flow/ui/components/TransactionTable.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/WaitingMessage.d.ts +0 -8
- package/dist/wallet/modal/flow/ui/components/WaitingMessage.js +0 -17
- package/dist/wallet/modal/flow/ui/components/WaitingMessage.js.map +0 -1
- package/dist/wallet/modal/flow/ui/components/index.d.ts +0 -5
- package/dist/wallet/modal/flow/ui/components/index.js +0 -6
- package/dist/wallet/modal/flow/ui/components/index.js.map +0 -1
- package/dist/wallet/modal/flow/ui/hoc/index.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/hoc/index.js +0 -2
- package/dist/wallet/modal/flow/ui/hoc/index.js.map +0 -1
- package/dist/wallet/modal/flow/ui/hoc/withImageFallback.d.ts +0 -7
- package/dist/wallet/modal/flow/ui/hoc/withImageFallback.js +0 -61
- package/dist/wallet/modal/flow/ui/hoc/withImageFallback.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/wallet/modal/flow/ui/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/wallet/modal/flow/ui/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/wallet/modal/flow/ui/screens/03-AmountInputScreen.js +0 -358
- package/dist/wallet/modal/flow/ui/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/04-DepositProgressScreen.js +0 -26
- package/dist/wallet/modal/flow/ui/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/wallet/modal/flow/ui/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/wallet/modal/flow/ui/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/wallet/modal/flow/ui/screens/07-ErrorScreen.js +0 -14
- package/dist/wallet/modal/flow/ui/screens/07-ErrorScreen.js.map +0 -1
- package/dist/wallet/modal/flow/ui/screens/index.d.ts +0 -7
- package/dist/wallet/modal/flow/ui/screens/index.js +0 -8
- package/dist/wallet/modal/flow/ui/screens/index.js.map +0 -1
- package/dist/wallet/modal/flow/ui/utils/imageUtils.d.ts +0 -21
- package/dist/wallet/modal/flow/ui/utils/imageUtils.js +0 -110
- package/dist/wallet/modal/flow/ui/utils/imageUtils.js.map +0 -1
- package/dist/wallet/modal/flow/utils/depositStorage.d.ts +0 -4
- package/dist/wallet/modal/flow/utils/depositStorage.js +0 -48
- package/dist/wallet/modal/flow/utils/depositStorage.js.map +0 -1
- package/dist/wallet/modal/flow/utils/imageUtils.d.ts +0 -21
- package/dist/wallet/modal/flow/utils/imageUtils.js +0 -110
- package/dist/wallet/modal/flow/utils/imageUtils.js.map +0 -1
- package/dist/wallet/modal/flow/utils/index.d.ts +0 -2
- package/dist/wallet/modal/flow/utils/index.js +0 -3
- package/dist/wallet/modal/flow/utils/index.js.map +0 -1
- package/dist/wallet/modal/flow/utils/nordUtils.d.ts +0 -40
- package/dist/wallet/modal/flow/utils/nordUtils.js +0 -64
- package/dist/wallet/modal/flow/utils/nordUtils.js.map +0 -1
- package/dist/wallet/provider/LazyWalletProvider.d.ts +0 -1
- package/dist/wallet/provider/LazyWalletProvider.js +0 -230
- package/dist/wallet/provider/LazyWalletProvider.js.map +0 -1
- package/dist/wallet/provider/N1WalletProvider.d.ts +0 -3
- package/dist/wallet/provider/N1WalletProvider.js +0 -266
- package/dist/wallet/provider/N1WalletProvider.js.map +0 -1
- package/dist/wallet/provider/ShadowRootWrapper.d.ts +0 -7
- package/dist/wallet/provider/ShadowRootWrapper.js +0 -7
- package/dist/wallet/provider/ShadowRootWrapper.js.map +0 -1
- package/dist/wallet/provider/WalletErrorBoundary.d.ts +0 -17
- package/dist/wallet/provider/WalletErrorBoundary.js +0 -57
- package/dist/wallet/provider/WalletErrorBoundary.js.map +0 -1
- package/dist/wallet/provider/context.d.ts +0 -3
- package/dist/wallet/provider/context.js +0 -5
- package/dist/wallet/provider/context.js.map +0 -1
- package/dist/wallet/provider/hooks/useNordUserInitialization.d.ts +0 -1
- package/dist/wallet/provider/hooks/useNordUserInitialization.js +0 -306
- package/dist/wallet/provider/hooks/useNordUserInitialization.js.map +0 -1
- package/dist/wallet/provider/hooks.d.ts +0 -2
- package/dist/wallet/provider/hooks.js +0 -17
- package/dist/wallet/provider/hooks.js.map +0 -1
- package/dist/wallet/provider/index.d.ts +0 -3
- package/dist/wallet/provider/index.js +0 -4
- package/dist/wallet/provider/index.js.map +0 -1
- package/dist/wallet/provider/types.d.ts +0 -152
- package/dist/wallet/provider/types.js +0 -21
- package/dist/wallet/provider/types.js.map +0 -1
- package/dist/wallet/state/flow/constants.d.ts +0 -31
- package/dist/wallet/state/flow/constants.js +0 -56
- package/dist/wallet/state/flow/constants.js.map +0 -1
- package/dist/wallet/state/flow/context/DepositContext.d.ts +0 -29
- package/dist/wallet/state/flow/context/DepositContext.js +0 -525
- package/dist/wallet/state/flow/context/DepositContext.js.map +0 -1
- package/dist/wallet/state/flow/context/FlowContext.d.ts +0 -50
- package/dist/wallet/state/flow/context/FlowContext.js +0 -191
- package/dist/wallet/state/flow/context/FlowContext.js.map +0 -1
- package/dist/wallet/state/flow/context/NordProvider.d.ts +0 -10
- package/dist/wallet/state/flow/context/NordProvider.js +0 -14
- package/dist/wallet/state/flow/context/NordProvider.js.map +0 -1
- package/dist/wallet/state/flow/context/WalletConnectContext.d.ts +0 -20
- package/dist/wallet/state/flow/context/WalletConnectContext.js +0 -393
- package/dist/wallet/state/flow/context/WalletConnectContext.js.map +0 -1
- package/dist/wallet/state/flow/context/flowMachine.d.ts +0 -48
- package/dist/wallet/state/flow/context/flowMachine.js +0 -83
- package/dist/wallet/state/flow/context/flowMachine.js.map +0 -1
- package/dist/wallet/state/flow/context/index.d.ts +0 -5
- package/dist/wallet/state/flow/context/index.js +0 -8
- package/dist/wallet/state/flow/context/index.js.map +0 -1
- package/dist/wallet/state/flow/types.d.ts +0 -113
- package/dist/wallet/state/flow/types.js +0 -34
- package/dist/wallet/state/flow/types.js.map +0 -1
- package/dist/wallet/state/flow/utils/depositStorage.d.ts +0 -4
- package/dist/wallet/state/flow/utils/depositStorage.js +0 -48
- package/dist/wallet/state/flow/utils/depositStorage.js.map +0 -1
- package/dist/wallet/state/flow/utils/nordUtils.d.ts +0 -40
- package/dist/wallet/state/flow/utils/nordUtils.js +0 -64
- package/dist/wallet/state/flow/utils/nordUtils.js.map +0 -1
- package/dist/wallet/state/logic/getPseudoName.d.ts +0 -1
- package/dist/wallet/state/logic/getPseudoName.js +0 -5826
- package/dist/wallet/state/logic/getPseudoName.js.map +0 -1
- package/dist/wallet/state/logic/sessionManager.d.ts +0 -17
- package/dist/wallet/state/logic/sessionManager.js +0 -38
- package/dist/wallet/state/logic/sessionManager.js.map +0 -1
- package/dist/wallet/state/logic/transactionManager.d.ts +0 -19
- package/dist/wallet/state/logic/transactionManager.js +0 -8
- package/dist/wallet/state/logic/transactionManager.js.map +0 -1
- package/dist/wallet/state/logic/utils.d.ts +0 -19
- package/dist/wallet/state/logic/utils.js +0 -66
- package/dist/wallet/state/logic/utils.js.map +0 -1
- package/dist/wallet/state/logic/words.d.ts +0 -9
- package/dist/wallet/state/logic/words.js +0 -93572
- package/dist/wallet/state/logic/words.js.map +0 -1
- package/dist/wallet/state/provider/LazyWalletProvider.d.ts +0 -1
- package/dist/wallet/state/provider/LazyWalletProvider.js +0 -230
- package/dist/wallet/state/provider/LazyWalletProvider.js.map +0 -1
- package/dist/wallet/state/provider/N1WalletProvider.d.ts +0 -3
- package/dist/wallet/state/provider/N1WalletProvider.js +0 -266
- package/dist/wallet/state/provider/N1WalletProvider.js.map +0 -1
- package/dist/wallet/state/provider/WalletErrorBoundary.d.ts +0 -17
- package/dist/wallet/state/provider/WalletErrorBoundary.js +0 -57
- package/dist/wallet/state/provider/WalletErrorBoundary.js.map +0 -1
- package/dist/wallet/state/provider/context.d.ts +0 -5
- package/dist/wallet/state/provider/context.js +0 -5
- package/dist/wallet/state/provider/context.js.map +0 -1
- package/dist/wallet/state/provider/hooks/useNordUserInitialization.d.ts +0 -1
- package/dist/wallet/state/provider/hooks/useNordUserInitialization.js +0 -306
- package/dist/wallet/state/provider/hooks/useNordUserInitialization.js.map +0 -1
- package/dist/wallet/state/provider/hooks.d.ts +0 -2
- package/dist/wallet/state/provider/hooks.js +0 -17
- package/dist/wallet/state/provider/hooks.js.map +0 -1
- package/dist/wallet/state/provider/index.d.ts +0 -3
- package/dist/wallet/state/provider/index.js +0 -4
- package/dist/wallet/state/provider/index.js.map +0 -1
- package/dist/wallet/state/provider/types.d.ts +0 -152
- package/dist/wallet/state/provider/types.js +0 -21
- package/dist/wallet/state/provider/types.js.map +0 -1
- package/dist/wallet/state/utils/getPseudoName.d.ts +0 -1
- package/dist/wallet/state/utils/getPseudoName.js +0 -5826
- package/dist/wallet/state/utils/getPseudoName.js.map +0 -1
- package/dist/wallet/state/utils/sessionManager.d.ts +0 -17
- package/dist/wallet/state/utils/sessionManager.js +0 -38
- package/dist/wallet/state/utils/sessionManager.js.map +0 -1
- package/dist/wallet/state/utils/transactionManager.d.ts +0 -19
- package/dist/wallet/state/utils/transactionManager.js +0 -8
- package/dist/wallet/state/utils/transactionManager.js.map +0 -1
- package/dist/wallet/state/utils/utils.d.ts +0 -18
- package/dist/wallet/state/utils/utils.js +0 -66
- package/dist/wallet/state/utils/utils.js.map +0 -1
- package/dist/wallet/state/utils/words.d.ts +0 -9
- package/dist/wallet/state/utils/words.js +0 -93572
- package/dist/wallet/state/utils/words.js.map +0 -1
- package/dist/wallet/styles/embeddedStyles.d.ts +0 -2
- package/dist/wallet/styles/embeddedStyles.js +0 -3
- package/dist/wallet/styles/embeddedStyles.js.map +0 -1
- package/dist/wallet/ui/N1ConnectButton.d.ts +0 -5
- package/dist/wallet/ui/N1ConnectButton.js +0 -49
- package/dist/wallet/ui/N1ConnectButton.js.map +0 -1
- package/dist/wallet/ui/ShadowRootWrapper.d.ts +0 -7
- package/dist/wallet/ui/ShadowRootWrapper.js +0 -7
- package/dist/wallet/ui/ShadowRootWrapper.js.map +0 -1
- package/dist/wallet/ui/modal/LoadingFallback.d.ts +0 -2
- package/dist/wallet/ui/modal/LoadingFallback.js +0 -3
- package/dist/wallet/ui/modal/LoadingFallback.js.map +0 -1
- package/dist/wallet/ui/modal/N1WalletModal.d.ts +0 -2
- package/dist/wallet/ui/modal/N1WalletModal.js +0 -93
- package/dist/wallet/ui/modal/N1WalletModal.js.map +0 -1
- package/dist/wallet/ui/modal/flow/NordFlow.d.ts +0 -9
- package/dist/wallet/ui/modal/flow/NordFlow.js +0 -98
- package/dist/wallet/ui/modal/flow/NordFlow.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/ChainButton.d.ts +0 -10
- package/dist/wallet/ui/modal/flow/components/ChainButton.js +0 -21
- package/dist/wallet/ui/modal/flow/components/ChainButton.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/Header.d.ts +0 -12
- package/dist/wallet/ui/modal/flow/components/Header.js +0 -45
- package/dist/wallet/ui/modal/flow/components/Header.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/ImageWithFallback.d.ts +0 -17
- package/dist/wallet/ui/modal/flow/components/ImageWithFallback.js +0 -33
- package/dist/wallet/ui/modal/flow/components/ImageWithFallback.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/TransactionTable.d.ts +0 -13
- package/dist/wallet/ui/modal/flow/components/TransactionTable.js +0 -83
- package/dist/wallet/ui/modal/flow/components/TransactionTable.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/WaitingMessage.d.ts +0 -8
- package/dist/wallet/ui/modal/flow/components/WaitingMessage.js +0 -17
- package/dist/wallet/ui/modal/flow/components/WaitingMessage.js.map +0 -1
- package/dist/wallet/ui/modal/flow/components/index.d.ts +0 -5
- package/dist/wallet/ui/modal/flow/components/index.js +0 -6
- package/dist/wallet/ui/modal/flow/components/index.js.map +0 -1
- package/dist/wallet/ui/modal/flow/hoc/index.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/hoc/index.js +0 -2
- package/dist/wallet/ui/modal/flow/hoc/index.js.map +0 -1
- package/dist/wallet/ui/modal/flow/hoc/withImageFallback.d.ts +0 -7
- package/dist/wallet/ui/modal/flow/hoc/withImageFallback.js +0 -61
- package/dist/wallet/ui/modal/flow/hoc/withImageFallback.js.map +0 -1
- package/dist/wallet/ui/modal/flow/index.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/index.js +0 -2
- package/dist/wallet/ui/modal/flow/index.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/01-ConnectWalletScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/01-ConnectWalletScreen.js +0 -19
- package/dist/wallet/ui/modal/flow/screens/01-ConnectWalletScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/02-ChainSelectionScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/02-ChainSelectionScreen.js +0 -65
- package/dist/wallet/ui/modal/flow/screens/02-ChainSelectionScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/03-AmountInputScreen.d.ts +0 -4
- package/dist/wallet/ui/modal/flow/screens/03-AmountInputScreen.js +0 -358
- package/dist/wallet/ui/modal/flow/screens/03-AmountInputScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/04-DepositProgressScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/04-DepositProgressScreen.js +0 -26
- package/dist/wallet/ui/modal/flow/screens/04-DepositProgressScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/05-DepositSuccessScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/05-DepositSuccessScreen.js +0 -137
- package/dist/wallet/ui/modal/flow/screens/05-DepositSuccessScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/06-AuthLoadingScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/06-AuthLoadingScreen.js +0 -31
- package/dist/wallet/ui/modal/flow/screens/06-AuthLoadingScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/07-ErrorScreen.d.ts +0 -1
- package/dist/wallet/ui/modal/flow/screens/07-ErrorScreen.js +0 -14
- package/dist/wallet/ui/modal/flow/screens/07-ErrorScreen.js.map +0 -1
- package/dist/wallet/ui/modal/flow/screens/index.d.ts +0 -7
- package/dist/wallet/ui/modal/flow/screens/index.js +0 -8
- package/dist/wallet/ui/modal/flow/screens/index.js.map +0 -1
- package/dist/wallet/ui/modal/flow/utils/imageUtils.d.ts +0 -21
- package/dist/wallet/ui/modal/flow/utils/imageUtils.js +0 -110
- package/dist/wallet/ui/modal/flow/utils/imageUtils.js.map +0 -1
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Bold-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Bold-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Extra-Bold-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Extra-Bold-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Light-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Light-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Medium-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Medium-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Regular-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Regular-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Semi-Bold-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Semi-Bold-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Thin-Italic-Trial.otf +0 -0
- /package/dist/{fonts → assets/fonts}/apk-galeria/APK-Galeria-Thin-Trial.otf +0 -0
- /package/dist/{main.css → styles/main.css} +0 -0
|
@@ -1,526 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
38
|
-
import { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
39
|
-
import { PublicKey } from '@solana/web3.js';
|
|
40
|
-
import { getExplorerUrl, } from '../../../logic/transactionManager';
|
|
41
|
-
import { useN1WalletContext } from '../../../provider/hooks';
|
|
42
|
-
import { logger } from '../../../../shared/utils/logger';
|
|
43
|
-
import { AVAILABLE_CHAINS } from '../../../modal/flow/constants';
|
|
44
|
-
import { FlowState } from '../../../modal/flow/types';
|
|
45
|
-
import { useFlowStateContext } from '../../../modal/flow/context/FlowContext';
|
|
46
|
-
import { clearLastDepositRecord, saveLastDepositRecord } from '../../../modal/flow/utils/depositStorage';
|
|
47
|
-
var DEPOSIT_POLL_INTERVAL_MS = 5000;
|
|
48
|
-
var SLOT_LOOKUP_TIMEOUT_MS = 2 * 60 * 1000;
|
|
49
|
-
var DEPOSIT_EVENT_TIMEOUT_MS = 5 * 60 * 1000;
|
|
50
|
-
var NORD_ACK_TIMEOUT_MS = 5 * 60 * 1000;
|
|
51
|
-
// Create the context with a default value
|
|
52
|
-
var DepositContext = createContext(undefined);
|
|
53
|
-
/**
|
|
54
|
-
* Provider component for the deposit context
|
|
55
|
-
*/
|
|
56
|
-
export var DepositProvider = function (_a) {
|
|
57
|
-
var children = _a.children;
|
|
58
|
-
// Get flow state context
|
|
59
|
-
var _b = useFlowStateContext(), state = _b.state, context = _b.context, flowActions = _b.actions, updateContext = _b.updateContext, isDebugOverride = _b.isDebugOverride;
|
|
60
|
-
// Get wallet context
|
|
61
|
-
var _c = useN1WalletContext(), address = _c.address, nord = _c.nord, nordUser = _c.nordUser;
|
|
62
|
-
// chain
|
|
63
|
-
var _d = useState(context.selectedChain), selectedChain = _d[0], setSelectedChain = _d[1];
|
|
64
|
-
// transaction & deposit
|
|
65
|
-
var _e = useState(context.amount), amount = _e[0], setAmount = _e[1];
|
|
66
|
-
var _f = useState(false), isDepositing = _f[0], setIsDepositing = _f[1];
|
|
67
|
-
var _g = useState('solana'), depositProgressPhase = _g[0], setDepositProgressPhase = _g[1];
|
|
68
|
-
var _h = useState(context.transactionId), transactionId = _h[0], setTransactionId = _h[1];
|
|
69
|
-
var _j = useState(null), transactionResult = _j[0], setTransactionResult = _j[1];
|
|
70
|
-
// auth
|
|
71
|
-
var _k = useState('loading'), authStatus = _k[0], setAuthStatus = _k[1];
|
|
72
|
-
var _l = useState(null), authErrorMessage = _l[0], setAuthErrorMessage = _l[1];
|
|
73
|
-
var _m = useState(null), authStatusMessage = _m[0], setAuthStatusMessage = _m[1];
|
|
74
|
-
// Use refs to track previous values
|
|
75
|
-
var prevContextRef = useRef(context);
|
|
76
|
-
/**
|
|
77
|
-
* Handle an error by transitioning to error state
|
|
78
|
-
*/
|
|
79
|
-
var handleError = useCallback(function (error) {
|
|
80
|
-
logger.error('Flow error:', error);
|
|
81
|
-
flowActions.setErrorState(error);
|
|
82
|
-
}, [flowActions]);
|
|
83
|
-
var authInFlightRef = useRef(false);
|
|
84
|
-
var waitingForNordUserRef = useRef(false);
|
|
85
|
-
/**
|
|
86
|
-
* Authenticate session
|
|
87
|
-
*/
|
|
88
|
-
var performAuth = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
89
|
-
var sessionPubKey, sessionId, sessionIdKey, error_1;
|
|
90
|
-
return __generator(this, function (_a) {
|
|
91
|
-
switch (_a.label) {
|
|
92
|
-
case 0:
|
|
93
|
-
if (authInFlightRef.current) {
|
|
94
|
-
return [2 /*return*/];
|
|
95
|
-
}
|
|
96
|
-
authInFlightRef.current = true;
|
|
97
|
-
_a.label = 1;
|
|
98
|
-
case 1:
|
|
99
|
-
_a.trys.push([1, 4, 5, 6]);
|
|
100
|
-
// Step 1: Tell user to sign transaction
|
|
101
|
-
setAuthStatusMessage('Please sign the transaction to authenticate your session');
|
|
102
|
-
if (!nordUser) {
|
|
103
|
-
waitingForNordUserRef.current = true;
|
|
104
|
-
setAuthStatus('loading');
|
|
105
|
-
setAuthStatusMessage('Preparing your Nord session…');
|
|
106
|
-
return [2 /*return*/];
|
|
107
|
-
}
|
|
108
|
-
waitingForNordUserRef.current = false;
|
|
109
|
-
// Step 2: Call nordUser.refreshSession and get sessionId
|
|
110
|
-
setAuthStatusMessage('Session is being authenticated...');
|
|
111
|
-
sessionPubKey = nordUser.sessionPubKey;
|
|
112
|
-
if (!sessionPubKey) {
|
|
113
|
-
throw new Error('Session public key is not available');
|
|
114
|
-
}
|
|
115
|
-
// Refresh the session
|
|
116
|
-
return [4 /*yield*/, nordUser.refreshSession()];
|
|
117
|
-
case 2:
|
|
118
|
-
// Refresh the session
|
|
119
|
-
_a.sent();
|
|
120
|
-
return [4 /*yield*/, nordUser.updateAccountId()];
|
|
121
|
-
case 3:
|
|
122
|
-
_a.sent();
|
|
123
|
-
console.log('nordUser', nordUser);
|
|
124
|
-
sessionId = nordUser.sessionId;
|
|
125
|
-
if (!sessionId) {
|
|
126
|
-
throw new Error('Failed to get session ID after refresh');
|
|
127
|
-
}
|
|
128
|
-
logger.debug('Session refreshed successfully', {
|
|
129
|
-
sessionId: sessionId.toString(),
|
|
130
|
-
});
|
|
131
|
-
// Step 3: Store sessionId in localStorage
|
|
132
|
-
if (address) {
|
|
133
|
-
sessionIdKey = "n1_sessionId_".concat(address);
|
|
134
|
-
localStorage.setItem(sessionIdKey, sessionId.toString());
|
|
135
|
-
logger.debug('Stored sessionId in localStorage', { key: sessionIdKey });
|
|
136
|
-
}
|
|
137
|
-
// Step 4: Update status to success
|
|
138
|
-
setAuthStatus('success');
|
|
139
|
-
// updateContext({ hasActiveSession: true });
|
|
140
|
-
flowActions.completeFlow({
|
|
141
|
-
hasActiveSession: true,
|
|
142
|
-
hasNordAccount: true,
|
|
143
|
-
});
|
|
144
|
-
return [3 /*break*/, 6];
|
|
145
|
-
case 4:
|
|
146
|
-
error_1 = _a.sent();
|
|
147
|
-
console.error('Authentication error:', error_1);
|
|
148
|
-
setAuthStatus('error');
|
|
149
|
-
setAuthErrorMessage(error_1 instanceof Error ? error_1.message : 'Unknown error occurred');
|
|
150
|
-
return [3 /*break*/, 6];
|
|
151
|
-
case 5:
|
|
152
|
-
authInFlightRef.current = false;
|
|
153
|
-
return [7 /*endfinally*/];
|
|
154
|
-
case 6: return [2 /*return*/];
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
}); }, [
|
|
158
|
-
updateContext,
|
|
159
|
-
flowActions,
|
|
160
|
-
address,
|
|
161
|
-
nordUser,
|
|
162
|
-
setAuthStatus,
|
|
163
|
-
setAuthStatusMessage,
|
|
164
|
-
setAuthErrorMessage,
|
|
165
|
-
]);
|
|
166
|
-
useEffect(function () {
|
|
167
|
-
if (waitingForNordUserRef.current && nordUser) {
|
|
168
|
-
performAuth();
|
|
169
|
-
}
|
|
170
|
-
}, [nordUser, performAuth]);
|
|
171
|
-
/**
|
|
172
|
-
* Update amount for deposit
|
|
173
|
-
*/
|
|
174
|
-
var updateAmount = useCallback(function (newAmount) {
|
|
175
|
-
setAmount(newAmount);
|
|
176
|
-
updateContext({ amount: newAmount });
|
|
177
|
-
}, [updateContext]);
|
|
178
|
-
/**
|
|
179
|
-
* Start deposit process
|
|
180
|
-
*/
|
|
181
|
-
var startDeposit = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
182
|
-
var protonClient, solanaConnection, recipientKey, usdcToken, normalizedAmount, txId, depositResponse, slot, eventIndex, result, depositRecord, depositError_1, errorMessage;
|
|
183
|
-
var _a, _b, _c;
|
|
184
|
-
return __generator(this, function (_d) {
|
|
185
|
-
switch (_d.label) {
|
|
186
|
-
case 0:
|
|
187
|
-
if (isDepositing)
|
|
188
|
-
return [2 /*return*/];
|
|
189
|
-
logger.debug('Starting deposit process');
|
|
190
|
-
if (!amount || parseFloat(amount) <= 0) {
|
|
191
|
-
handleError(new Error('Invalid amount'));
|
|
192
|
-
return [2 /*return*/];
|
|
193
|
-
}
|
|
194
|
-
if (!nord) {
|
|
195
|
-
handleError(new Error('Nord client is unavailable. Please check your configuration and try again.'));
|
|
196
|
-
return [2 /*return*/];
|
|
197
|
-
}
|
|
198
|
-
if (!nordUser) {
|
|
199
|
-
handleError(new Error('Your Nord session is not ready yet. Reconnect your wallet to retry.'));
|
|
200
|
-
return [2 /*return*/];
|
|
201
|
-
}
|
|
202
|
-
if (!address) {
|
|
203
|
-
handleError(new Error('We were unable to determine your wallet address. Please reconnect your wallet and try again.'));
|
|
204
|
-
return [2 /*return*/];
|
|
205
|
-
}
|
|
206
|
-
protonClient = nord.protonClient;
|
|
207
|
-
solanaConnection = nord.solanaConnection;
|
|
208
|
-
if (!protonClient || !solanaConnection) {
|
|
209
|
-
handleError(new Error('Nord client is missing Solana or Proton configuration. Verify your Nord deployment.'));
|
|
210
|
-
return [2 /*return*/];
|
|
211
|
-
}
|
|
212
|
-
recipientKey = new PublicKey(address);
|
|
213
|
-
usdcToken = Array.isArray(nord.tokens)
|
|
214
|
-
? nord.tokens.find(function (t) { return t.symbol === 'USDC'; })
|
|
215
|
-
: null;
|
|
216
|
-
if (!usdcToken) {
|
|
217
|
-
handleError(new Error('Nord token configuration is missing USDC. Verify your Nord deployment.'));
|
|
218
|
-
return [2 /*return*/];
|
|
219
|
-
}
|
|
220
|
-
setIsDepositing(true);
|
|
221
|
-
setDepositProgressPhase('solana');
|
|
222
|
-
flowActions.startDeposit();
|
|
223
|
-
_d.label = 1;
|
|
224
|
-
case 1:
|
|
225
|
-
_d.trys.push([1, 9, 10, 11]);
|
|
226
|
-
normalizedAmount = parseFloat(amount);
|
|
227
|
-
txId = null;
|
|
228
|
-
if (!(typeof nordUser.deposit === 'function')) return [3 /*break*/, 3];
|
|
229
|
-
return [4 /*yield*/, nordUser.deposit({
|
|
230
|
-
amount: normalizedAmount,
|
|
231
|
-
tokenId: usdcToken.tokenId,
|
|
232
|
-
})];
|
|
233
|
-
case 2:
|
|
234
|
-
depositResponse = _d.sent();
|
|
235
|
-
if (depositResponse) {
|
|
236
|
-
if (typeof depositResponse === 'string') {
|
|
237
|
-
txId = depositResponse;
|
|
238
|
-
}
|
|
239
|
-
else if (typeof depositResponse === 'object' &&
|
|
240
|
-
'signature' in depositResponse &&
|
|
241
|
-
typeof depositResponse.signature === 'string') {
|
|
242
|
-
txId = depositResponse.signature;
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
_d.label = 3;
|
|
246
|
-
case 3:
|
|
247
|
-
if (!!txId) return [3 /*break*/, 5];
|
|
248
|
-
return [4 /*yield*/, nordUser.depositSpl(normalizedAmount, usdcToken.tokenId)];
|
|
249
|
-
case 4:
|
|
250
|
-
txId = _d.sent();
|
|
251
|
-
_d.label = 5;
|
|
252
|
-
case 5:
|
|
253
|
-
if (!txId) {
|
|
254
|
-
throw new Error('Failed to submit deposit transaction.');
|
|
255
|
-
}
|
|
256
|
-
logger.debug('Deposit transaction submitted', { txId: txId });
|
|
257
|
-
return [4 /*yield*/, waitForTransactionSlot(solanaConnection, txId)];
|
|
258
|
-
case 6:
|
|
259
|
-
slot = _d.sent();
|
|
260
|
-
logger.debug('Solana slot detected for deposit', { slot: slot });
|
|
261
|
-
return [4 /*yield*/, waitForDepositEventIndex(protonClient, recipientKey, slot)];
|
|
262
|
-
case 7:
|
|
263
|
-
eventIndex = _d.sent();
|
|
264
|
-
logger.debug('Deposit event indexed', { eventIndex: eventIndex });
|
|
265
|
-
setDepositProgressPhase('nord');
|
|
266
|
-
return [4 /*yield*/, waitForNordAcknowledgement(nord, eventIndex)];
|
|
267
|
-
case 8:
|
|
268
|
-
_d.sent();
|
|
269
|
-
logger.debug('Nord acknowledged deposit event', { eventIndex: eventIndex });
|
|
270
|
-
result = {
|
|
271
|
-
success: true,
|
|
272
|
-
transactionId: txId,
|
|
273
|
-
amount: amount,
|
|
274
|
-
tokenSymbol: 'USDC',
|
|
275
|
-
fromAddress: address || 'Your Wallet',
|
|
276
|
-
toAddress: 'Exchange Account',
|
|
277
|
-
networkName: selectedChain,
|
|
278
|
-
status: 'Completed',
|
|
279
|
-
explorerUrl: getExplorerUrl(txId),
|
|
280
|
-
};
|
|
281
|
-
depositRecord = {
|
|
282
|
-
transactionId: txId,
|
|
283
|
-
amount: amount,
|
|
284
|
-
tokenSymbol: 'USDC',
|
|
285
|
-
chainId: (_a = context.selectedChainId) !== null && _a !== void 0 ? _a : (selectedChain !== null && selectedChain !== void 0 ? selectedChain : 'solana'),
|
|
286
|
-
chainName: (_b = context.selectedChain) !== null && _b !== void 0 ? _b : (selectedChain !== null && selectedChain !== void 0 ? selectedChain : 'Solana'),
|
|
287
|
-
chainNetwork: (_c = context.selectedChainNetwork) !== null && _c !== void 0 ? _c : null,
|
|
288
|
-
timestamp: Date.now(),
|
|
289
|
-
};
|
|
290
|
-
saveLastDepositRecord(address, depositRecord);
|
|
291
|
-
// Update state with transaction result
|
|
292
|
-
setTransactionId(txId);
|
|
293
|
-
setTransactionResult(result);
|
|
294
|
-
logger.debug('Transaction completed successfully');
|
|
295
|
-
flowActions.markDepositSuccess({
|
|
296
|
-
transactionId: txId,
|
|
297
|
-
record: depositRecord,
|
|
298
|
-
});
|
|
299
|
-
return [3 /*break*/, 11];
|
|
300
|
-
case 9:
|
|
301
|
-
depositError_1 = _d.sent();
|
|
302
|
-
logger.error('Deposit process failed', depositError_1);
|
|
303
|
-
errorMessage = depositError_1 instanceof Error
|
|
304
|
-
? depositError_1.message
|
|
305
|
-
: 'Failed to process deposit';
|
|
306
|
-
flowActions.markDepositFailed(errorMessage);
|
|
307
|
-
return [2 /*return*/]; // Exit early
|
|
308
|
-
case 10:
|
|
309
|
-
setIsDepositing(false);
|
|
310
|
-
return [7 /*endfinally*/];
|
|
311
|
-
case 11: return [2 /*return*/];
|
|
312
|
-
}
|
|
313
|
-
});
|
|
314
|
-
}); }, [
|
|
315
|
-
isDepositing,
|
|
316
|
-
selectedChain,
|
|
317
|
-
amount,
|
|
318
|
-
address,
|
|
319
|
-
flowActions,
|
|
320
|
-
handleError,
|
|
321
|
-
nord,
|
|
322
|
-
nordUser,
|
|
323
|
-
context.selectedChain,
|
|
324
|
-
context.selectedChainId,
|
|
325
|
-
context.selectedChainNetwork,
|
|
326
|
-
]);
|
|
327
|
-
/**
|
|
328
|
-
* Complete the deposit process and move to the next screen
|
|
329
|
-
*/
|
|
330
|
-
var completeDeposit = useCallback(function () {
|
|
331
|
-
clearLastDepositRecord(address);
|
|
332
|
-
updateContext({ lastDeposit: null });
|
|
333
|
-
if (context.isDepositOnlyFlow) {
|
|
334
|
-
flowActions.completeFlow({
|
|
335
|
-
hasNordAccount: true,
|
|
336
|
-
hasActiveSession: true,
|
|
337
|
-
});
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
// Check if user has an active session to determine the next state
|
|
341
|
-
if (context.hasActiveSession) {
|
|
342
|
-
// If user has an active session, go directly to FINAL_SUCCESS
|
|
343
|
-
flowActions.completeFlow({
|
|
344
|
-
hasNordAccount: true,
|
|
345
|
-
hasActiveSession: true,
|
|
346
|
-
});
|
|
347
|
-
}
|
|
348
|
-
else {
|
|
349
|
-
// If user doesn't have an active session, go to authentication flow
|
|
350
|
-
flowActions.requireAuth({ hasNordAccount: true });
|
|
351
|
-
}
|
|
352
|
-
}, [context.hasActiveSession, context.isDepositOnlyFlow, flowActions, address, updateContext]);
|
|
353
|
-
// Create the context value
|
|
354
|
-
var contextValue = {
|
|
355
|
-
amount: amount,
|
|
356
|
-
isDepositing: isDepositing,
|
|
357
|
-
depositProgressPhase: depositProgressPhase,
|
|
358
|
-
transactionId: transactionId,
|
|
359
|
-
transactionResult: transactionResult,
|
|
360
|
-
authStatus: authStatus,
|
|
361
|
-
authErrorMessage: authErrorMessage,
|
|
362
|
-
authStatusMessage: authStatusMessage,
|
|
363
|
-
updateAmount: updateAmount,
|
|
364
|
-
startDeposit: startDeposit,
|
|
365
|
-
completeDeposit: completeDeposit,
|
|
366
|
-
performAuth: performAuth,
|
|
367
|
-
};
|
|
368
|
-
/**
|
|
369
|
-
* Update state based on context changes
|
|
370
|
-
*/
|
|
371
|
-
useEffect(function () {
|
|
372
|
-
var prevContext = prevContextRef.current;
|
|
373
|
-
// Only update state if the relevant context values have actually changed
|
|
374
|
-
if (context.selectedChain !== prevContext.selectedChain) {
|
|
375
|
-
setSelectedChain(context.selectedChain);
|
|
376
|
-
}
|
|
377
|
-
if (context.amount !== prevContext.amount) {
|
|
378
|
-
setAmount(context.amount);
|
|
379
|
-
}
|
|
380
|
-
if (context.transactionId !== prevContext.transactionId) {
|
|
381
|
-
setTransactionId(context.transactionId);
|
|
382
|
-
}
|
|
383
|
-
// Update the ref to the current context
|
|
384
|
-
prevContextRef.current = context;
|
|
385
|
-
}, [context]);
|
|
386
|
-
useEffect(function () {
|
|
387
|
-
var _a, _b, _c, _d;
|
|
388
|
-
if (!isDebugOverride || state !== FlowState.DEPOSIT_SUCCESS || transactionResult) {
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
391
|
-
var mockTransactionId = (_a = context.transactionId) !== null && _a !== void 0 ? _a : 'debug-tx-12345';
|
|
392
|
-
var fallbackChain = (_d = (_b = context.selectedChain) !== null && _b !== void 0 ? _b : (_c = AVAILABLE_CHAINS[0]) === null || _c === void 0 ? void 0 : _c.name) !== null && _d !== void 0 ? _d : 'Solana';
|
|
393
|
-
setTransactionId(mockTransactionId);
|
|
394
|
-
setTransactionResult({
|
|
395
|
-
success: true,
|
|
396
|
-
transactionId: mockTransactionId,
|
|
397
|
-
amount: context.amount || '1,250',
|
|
398
|
-
tokenSymbol: 'USDC',
|
|
399
|
-
fromAddress: address || 'Debug Wallet',
|
|
400
|
-
toAddress: 'Nord Account',
|
|
401
|
-
networkName: fallbackChain,
|
|
402
|
-
status: 'Completed',
|
|
403
|
-
explorerUrl: getExplorerUrl(mockTransactionId),
|
|
404
|
-
});
|
|
405
|
-
}, [isDebugOverride, state, transactionResult, context, address]);
|
|
406
|
-
return (_jsx(DepositContext.Provider, { value: contextValue, children: children }));
|
|
407
|
-
};
|
|
408
|
-
var delay = function (ms) {
|
|
409
|
-
return new Promise(function (resolve) {
|
|
410
|
-
setTimeout(resolve, ms);
|
|
411
|
-
});
|
|
412
|
-
};
|
|
413
|
-
var waitForTransactionSlot = function (connection, signature) { return __awaiter(void 0, void 0, void 0, function () {
|
|
414
|
-
var deadline, status_1, info;
|
|
415
|
-
var _a;
|
|
416
|
-
return __generator(this, function (_b) {
|
|
417
|
-
switch (_b.label) {
|
|
418
|
-
case 0:
|
|
419
|
-
logger.debug('Waiting for Solana confirmation for deposit', { signature: signature });
|
|
420
|
-
deadline = Date.now() + SLOT_LOOKUP_TIMEOUT_MS;
|
|
421
|
-
_b.label = 1;
|
|
422
|
-
case 1:
|
|
423
|
-
if (!(Date.now() < deadline)) return [3 /*break*/, 4];
|
|
424
|
-
return [4 /*yield*/, connection.getSignatureStatuses([signature], {
|
|
425
|
-
searchTransactionHistory: true,
|
|
426
|
-
})];
|
|
427
|
-
case 2:
|
|
428
|
-
status_1 = _b.sent();
|
|
429
|
-
info = (_a = status_1.value) === null || _a === void 0 ? void 0 : _a[0];
|
|
430
|
-
if (info === null || info === void 0 ? void 0 : info.err) {
|
|
431
|
-
throw new Error('Deposit transaction failed to confirm on Solana.');
|
|
432
|
-
}
|
|
433
|
-
if (info && typeof info.slot === 'number') {
|
|
434
|
-
return [2 /*return*/, info.slot];
|
|
435
|
-
}
|
|
436
|
-
return [4 /*yield*/, delay(2000)];
|
|
437
|
-
case 3:
|
|
438
|
-
_b.sent();
|
|
439
|
-
return [3 /*break*/, 1];
|
|
440
|
-
case 4: throw new Error('Timed out waiting for Solana confirmation of the deposit.');
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
}); };
|
|
444
|
-
var waitForDepositEventIndex = function (protonClient, recipient, slot) { return __awaiter(void 0, void 0, void 0, function () {
|
|
445
|
-
var deadline, deposits, matchingDeposit, rawEventIndex;
|
|
446
|
-
return __generator(this, function (_a) {
|
|
447
|
-
switch (_a.label) {
|
|
448
|
-
case 0:
|
|
449
|
-
logger.debug('Polling Proton for deposit entry', { slot: slot });
|
|
450
|
-
deadline = Date.now() + DEPOSIT_EVENT_TIMEOUT_MS;
|
|
451
|
-
_a.label = 1;
|
|
452
|
-
case 1:
|
|
453
|
-
if (!(Date.now() < deadline)) return [3 /*break*/, 4];
|
|
454
|
-
return [4 /*yield*/, protonClient.depositsForRecipient(recipient, {
|
|
455
|
-
startSlot: slot,
|
|
456
|
-
order: 'desc',
|
|
457
|
-
})];
|
|
458
|
-
case 2:
|
|
459
|
-
deposits = _a.sent();
|
|
460
|
-
if (Array.isArray(deposits)) {
|
|
461
|
-
matchingDeposit = deposits.find(function (deposit) {
|
|
462
|
-
var depositSlot = typeof deposit.createdAtSlot === 'string'
|
|
463
|
-
? Number(deposit.createdAtSlot)
|
|
464
|
-
: deposit.createdAtSlot;
|
|
465
|
-
return Number.isFinite(depositSlot) && depositSlot === slot;
|
|
466
|
-
});
|
|
467
|
-
if (matchingDeposit) {
|
|
468
|
-
rawEventIndex = matchingDeposit.eventIndex === undefined ||
|
|
469
|
-
matchingDeposit.eventIndex === null
|
|
470
|
-
? null
|
|
471
|
-
: Number(matchingDeposit.eventIndex);
|
|
472
|
-
if (Number.isFinite(rawEventIndex)) {
|
|
473
|
-
return [2 /*return*/, rawEventIndex];
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
return [4 /*yield*/, delay(DEPOSIT_POLL_INTERVAL_MS)];
|
|
478
|
-
case 3:
|
|
479
|
-
_a.sent();
|
|
480
|
-
return [3 /*break*/, 1];
|
|
481
|
-
case 4: throw new Error('Timed out waiting for Nord to index the deposit event.');
|
|
482
|
-
}
|
|
483
|
-
});
|
|
484
|
-
}); };
|
|
485
|
-
var waitForNordAcknowledgement = function (nord, targetEventIndex) { return __awaiter(void 0, void 0, void 0, function () {
|
|
486
|
-
var deadline, nonce, normalized;
|
|
487
|
-
return __generator(this, function (_a) {
|
|
488
|
-
switch (_a.label) {
|
|
489
|
-
case 0:
|
|
490
|
-
logger.debug('Polling Nord for deposit acknowledgement', {
|
|
491
|
-
targetEventIndex: targetEventIndex,
|
|
492
|
-
});
|
|
493
|
-
deadline = Date.now() + NORD_ACK_TIMEOUT_MS;
|
|
494
|
-
_a.label = 1;
|
|
495
|
-
case 1:
|
|
496
|
-
if (!(Date.now() < deadline)) return [3 /*break*/, 4];
|
|
497
|
-
return [4 /*yield*/, nord.getActionNonce()];
|
|
498
|
-
case 2:
|
|
499
|
-
nonce = _a.sent();
|
|
500
|
-
normalized = typeof nonce === 'bigint'
|
|
501
|
-
? Number(nonce)
|
|
502
|
-
: typeof nonce === 'string'
|
|
503
|
-
? Number(nonce)
|
|
504
|
-
: nonce;
|
|
505
|
-
if (Number.isFinite(normalized) && normalized >= targetEventIndex) {
|
|
506
|
-
return [2 /*return*/];
|
|
507
|
-
}
|
|
508
|
-
return [4 /*yield*/, delay(DEPOSIT_POLL_INTERVAL_MS)];
|
|
509
|
-
case 3:
|
|
510
|
-
_a.sent();
|
|
511
|
-
return [3 /*break*/, 1];
|
|
512
|
-
case 4: throw new Error('Timed out waiting for N1 to process the deposit.');
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
|
-
}); };
|
|
516
|
-
/**
|
|
517
|
-
* Hook to use the deposit context
|
|
518
|
-
*/
|
|
519
|
-
export var useDepositContext = function () {
|
|
520
|
-
var context = useContext(DepositContext);
|
|
521
|
-
if (context === undefined) {
|
|
522
|
-
throw new Error('useDepositContext must be used within a DepositProvider');
|
|
523
|
-
}
|
|
524
|
-
return context;
|
|
525
|
-
};
|
|
526
|
-
//# sourceMappingURL=DepositContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DepositContext.js","sourceRoot":"","sources":["../../../../../src/wallet/modal/flow/context/DepositContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnG,OAAO,EAAc,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EACL,cAAc,GAEf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAExG,IAAM,wBAAwB,GAAG,IAAK,CAAC;AACvC,IAAM,sBAAsB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAK,CAAC;AAC9C,IAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAK,CAAC;AAChD,IAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAK,CAAC;AAwC3C,0CAA0C;AAC1C,IA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C,CAAA,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAA;gBACZ,qBAAM,IAAI,CAAC,cAAc,EAAE,EAAA;;gBAAnC,KAAK,GAAG,SAA2B;gBACnC,UAAU,GACd,OAAO,KAAK,KAAK,QAAQ;oBACvB,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;oBACf,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ;wBACzB,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;wBACf,CAAC,CAAC,KAAK,CAAC;gBAEd,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,UAAU,IAAI,gBAAgB,EAAE,CAAC;oBAClE,sBAAO;gBACT,CAAC;gBAED,qBAAM,KAAK,CAAC,wBAAwB,CAAC,EAAA;;gBAArC,SAAqC,CAAC;;oBAGxC,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;;;KACrE,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,IAAM,iBAAiB,GAAG;IAC/B,IAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC","sourcesContent":["import React, { createContext, useCallback, useContext, useEffect, useRef, useState } from 'react';\nimport { Connection, PublicKey } from '@solana/web3.js';\nimport {\n getExplorerUrl,\n TransactionResult,\n} from '@wallet/logic/transactionManager';\nimport { useN1WalletContext } from '@wallet/provider/hooks';\nimport { logger } from '@shared/utils/logger';\nimport { AVAILABLE_CHAINS } from '@wallet/modal/flow/constants';\nimport { FlowState } from '@wallet/modal/flow/types';\nimport { useFlowStateContext } from '@wallet/modal/flow/context/FlowContext';\nimport { clearLastDepositRecord, saveLastDepositRecord } from '@wallet/modal/flow/utils/depositStorage';\n\nconst DEPOSIT_POLL_INTERVAL_MS = 5_000;\nconst SLOT_LOOKUP_TIMEOUT_MS = 2 * 60 * 1_000;\nconst DEPOSIT_EVENT_TIMEOUT_MS = 5 * 60 * 1_000;\nconst NORD_ACK_TIMEOUT_MS = 5 * 60 * 1_000;\n\ntype DepositProgressPhase = 'solana' | 'nord';\n\ninterface ProtonDepositRecord {\n eventIndex?: number | string | null;\n createdAtSlot: number;\n amount: number;\n depositorTokenAccount: string;\n bufferAccount: string;\n recipient: string;\n mint: string;\n}\n\ninterface ProtonClientLike {\n depositsForRecipient: (\n recipient: PublicKey,\n options: {\n startSlot?: number;\n order: 'desc' | 'asc';\n }\n ) => Promise<ProtonDepositRecord[]>;\n}\n\n// Define the shape of the deposit context value\nexport interface DepositContextValue {\n amount: string;\n isDepositing: boolean;\n depositProgressPhase: DepositProgressPhase;\n transactionId: string | null;\n transactionResult: TransactionResult | null;\n authStatus: 'loading' | 'success' | 'error';\n authErrorMessage: string | null;\n authStatusMessage: string | null;\n updateAmount: (newAmount: string) => void;\n startDeposit: () => Promise<void>;\n completeDeposit: () => void;\n performAuth: () => Promise<void>;\n}\n\n// Create the context with a default value\nconst DepositContext = createContext<DepositContextValue | undefined>(undefined);\n\n// Props for the provider component\ninterface DepositProviderProps {\n children: React.ReactNode;\n}\n\n/**\n * Provider component for the deposit context\n */\nexport const DepositProvider: React.FC<DepositProviderProps> = ({\n children,\n}) => {\n // Get flow state context\n const {\n state,\n context,\n actions: flowActions,\n updateContext,\n isDebugOverride,\n } = useFlowStateContext();\n\n // Get wallet context\n const {\n address,\n nord,\n nordUser,\n } = useN1WalletContext();\n\n // chain\n const [selectedChain, setSelectedChain] = useState<string | null>(\n context.selectedChain\n );\n\n // transaction & deposit\n const [amount, setAmount] = useState(context.amount);\n const [isDepositing, setIsDepositing] = useState(false);\n const [depositProgressPhase, setDepositProgressPhase] =\n useState<DepositProgressPhase>('solana');\n const [transactionId, setTransactionId] = useState<string | null>(context.transactionId);\n const [transactionResult, setTransactionResult] = useState<TransactionResult | null>(null);\n\n\n // auth\n const [authStatus, setAuthStatus] = useState<'loading' | 'success' | 'error'>('loading');\n const [authErrorMessage, setAuthErrorMessage] = useState<string | null>(null);\n const [authStatusMessage, setAuthStatusMessage] = useState<string | null>(null);\n\n // Use refs to track previous values\n const prevContextRef = useRef(context);\n\n\n /**\n * Handle an error by transitioning to error state\n */\n const handleError = useCallback(\n (error: Error) => {\n logger.error('Flow error:', error);\n flowActions.setErrorState(error);\n },\n [flowActions]\n );\n\n const authInFlightRef = useRef(false);\n const waitingForNordUserRef = useRef(false);\n\n /**\n * Authenticate session\n */\n const performAuth = useCallback(async () => {\n if (authInFlightRef.current) {\n return;\n }\n\n authInFlightRef.current = true;\n try {\n // Step 1: Tell user to sign transaction\n setAuthStatusMessage(\n 'Please sign the transaction to authenticate your session'\n );\n\n if (!nordUser) {\n waitingForNordUserRef.current = true;\n setAuthStatus('loading');\n setAuthStatusMessage('Preparing your Nord session…');\n return;\n }\n\n waitingForNordUserRef.current = false;\n\n // Step 2: Call nordUser.refreshSession and get sessionId\n setAuthStatusMessage('Session is being authenticated...');\n\n // Get the session public key from the nordUser\n const sessionPubKey = nordUser.sessionPubKey;\n if (!sessionPubKey) {\n throw new Error('Session public key is not available');\n }\n\n // Refresh the session\n await nordUser.refreshSession();\n await nordUser.updateAccountId();\n\n console.log('nordUser', nordUser);\n\n // Get the sessionId after refresh\n const sessionId = nordUser.sessionId;\n if (!sessionId) {\n throw new Error('Failed to get session ID after refresh');\n }\n\n logger.debug('Session refreshed successfully', {\n sessionId: sessionId.toString(),\n });\n\n // Step 3: Store sessionId in localStorage\n if (address) {\n const sessionIdKey = `n1_sessionId_${address}`;\n localStorage.setItem(sessionIdKey, sessionId.toString());\n logger.debug('Stored sessionId in localStorage', { key: sessionIdKey });\n }\n\n // Step 4: Update status to success\n setAuthStatus('success');\n\n // updateContext({ hasActiveSession: true });\n flowActions.completeFlow({\n hasActiveSession: true,\n hasNordAccount: true,\n });\n\n } catch (error) {\n console.error('Authentication error:', error);\n setAuthStatus('error');\n setAuthErrorMessage(\n error instanceof Error ? error.message : 'Unknown error occurred'\n );\n } finally {\n authInFlightRef.current = false;\n }\n }, [\n updateContext,\n flowActions,\n address,\n nordUser,\n setAuthStatus,\n setAuthStatusMessage,\n setAuthErrorMessage,\n ]);\n\n useEffect(() => {\n if (waitingForNordUserRef.current && nordUser) {\n performAuth();\n }\n }, [nordUser, performAuth]);\n\n /**\n * Update amount for deposit\n */\n const updateAmount = useCallback(\n (newAmount: string) => {\n setAmount(newAmount);\n updateContext({ amount: newAmount });\n },\n [updateContext]\n );\n\n /**\n * Start deposit process\n */\n const startDeposit = useCallback(async () => {\n if (isDepositing) return;\n\n logger.debug('Starting deposit process');\n\n if (!amount || parseFloat(amount) <= 0) {\n handleError(new Error('Invalid amount'));\n return;\n }\n\n if (!nord) {\n handleError(\n new Error(\n 'Nord client is unavailable. Please check your configuration and try again.'\n )\n );\n return;\n }\n\n if (!nordUser) {\n handleError(\n new Error(\n 'Your Nord session is not ready yet. Reconnect your wallet to retry.'\n )\n );\n return;\n }\n\n if (!address) {\n handleError(\n new Error(\n 'We were unable to determine your wallet address. Please reconnect your wallet and try again.'\n )\n );\n return;\n }\n\n const protonClient = nord.protonClient as ProtonClientLike | undefined;\n const solanaConnection = nord.solanaConnection as Connection | undefined;\n\n if (!protonClient || !solanaConnection) {\n handleError(\n new Error(\n 'Nord client is missing Solana or Proton configuration. Verify your Nord deployment.'\n )\n );\n return;\n }\n\n const recipientKey = new PublicKey(address);\n\n const usdcToken = Array.isArray(nord.tokens)\n ? nord.tokens.find((t: any) => t.symbol === 'USDC')\n : null;\n\n if (!usdcToken) {\n handleError(\n new Error(\n 'Nord token configuration is missing USDC. Verify your Nord deployment.'\n )\n );\n return;\n }\n\n setIsDepositing(true);\n setDepositProgressPhase('solana');\n flowActions.startDeposit();\n\n try {\n const normalizedAmount = parseFloat(amount);\n let txId: string | null = null;\n\n if (typeof nordUser.deposit === 'function') {\n const depositResponse = await nordUser.deposit({\n amount: normalizedAmount,\n tokenId: usdcToken.tokenId,\n });\n\n if (depositResponse) {\n if (typeof depositResponse === 'string') {\n txId = depositResponse;\n } else if (\n typeof depositResponse === 'object' &&\n 'signature' in depositResponse &&\n typeof depositResponse.signature === 'string'\n ) {\n txId = depositResponse.signature;\n }\n }\n }\n\n if (!txId) {\n txId = await nordUser.depositSpl(normalizedAmount, usdcToken.tokenId);\n }\n\n if (!txId) {\n throw new Error('Failed to submit deposit transaction.');\n }\n\n logger.debug('Deposit transaction submitted', { txId });\n\n const slot = await waitForTransactionSlot(solanaConnection, txId);\n logger.debug('Solana slot detected for deposit', { slot });\n\n const eventIndex = await waitForDepositEventIndex(\n protonClient,\n recipientKey,\n slot\n );\n\n logger.debug('Deposit event indexed', { eventIndex });\n setDepositProgressPhase('nord');\n\n await waitForNordAcknowledgement(nord, eventIndex);\n logger.debug('Nord acknowledged deposit event', { eventIndex });\n\n // Create transaction result object immediately after successful deposit\n const result: TransactionResult = {\n success: true,\n transactionId: txId,\n amount,\n tokenSymbol: 'USDC',\n fromAddress: address || 'Your Wallet',\n toAddress: 'Exchange Account',\n networkName: selectedChain!,\n status: 'Completed',\n explorerUrl: getExplorerUrl(txId),\n };\n\n const depositRecord = {\n transactionId: txId,\n amount,\n tokenSymbol: 'USDC',\n chainId: context.selectedChainId ?? (selectedChain ?? 'solana'),\n chainName: context.selectedChain ?? (selectedChain ?? 'Solana'),\n chainNetwork: context.selectedChainNetwork ?? null,\n timestamp: Date.now(),\n };\n\n saveLastDepositRecord(address, depositRecord);\n\n // Update state with transaction result\n setTransactionId(txId);\n setTransactionResult(result);\n logger.debug('Transaction completed successfully');\n flowActions.markDepositSuccess({\n transactionId: txId,\n record: depositRecord,\n });\n } catch (depositError) {\n logger.error('Deposit process failed', depositError);\n const errorMessage = depositError instanceof Error\n ? depositError.message\n : 'Failed to process deposit';\n\n flowActions.markDepositFailed(errorMessage);\n return; // Exit early\n } finally {\n setIsDepositing(false);\n }\n }, [\n isDepositing,\n selectedChain,\n amount,\n address,\n flowActions,\n handleError,\n nord,\n nordUser,\n context.selectedChain,\n context.selectedChainId,\n context.selectedChainNetwork,\n ]);\n\n /**\n * Complete the deposit process and move to the next screen\n */\n const completeDeposit = useCallback(() => {\n clearLastDepositRecord(address);\n updateContext({ lastDeposit: null });\n\n if (context.isDepositOnlyFlow) {\n flowActions.completeFlow({\n hasNordAccount: true,\n hasActiveSession: true,\n });\n return;\n }\n\n // Check if user has an active session to determine the next state\n if (context.hasActiveSession) {\n // If user has an active session, go directly to FINAL_SUCCESS\n flowActions.completeFlow({\n hasNordAccount: true,\n hasActiveSession: true,\n });\n } else {\n // If user doesn't have an active session, go to authentication flow\n flowActions.requireAuth({ hasNordAccount: true });\n }\n }, [context.hasActiveSession, context.isDepositOnlyFlow, flowActions, address, updateContext]);\n\n\n\n\n\n // Create the context value\n const contextValue: DepositContextValue = {\n amount,\n isDepositing,\n depositProgressPhase,\n transactionId,\n transactionResult,\n authStatus,\n authErrorMessage,\n authStatusMessage,\n updateAmount,\n startDeposit,\n completeDeposit,\n performAuth,\n };\n\n\n /**\n * Update state based on context changes\n */\n useEffect(() => {\n const prevContext = prevContextRef.current;\n\n // Only update state if the relevant context values have actually changed\n if (context.selectedChain !== prevContext.selectedChain) {\n setSelectedChain(context.selectedChain);\n }\n\n if (context.amount !== prevContext.amount) {\n setAmount(context.amount);\n }\n\n if (context.transactionId !== prevContext.transactionId) {\n setTransactionId(context.transactionId);\n }\n\n // Update the ref to the current context\n prevContextRef.current = context;\n }, [context]);\n\n useEffect(() => {\n if (!isDebugOverride || state !== FlowState.DEPOSIT_SUCCESS || transactionResult) {\n return;\n }\n\n const mockTransactionId = context.transactionId ?? 'debug-tx-12345';\n const fallbackChain = context.selectedChain ?? AVAILABLE_CHAINS[0]?.name ?? 'Solana';\n setTransactionId(mockTransactionId);\n setTransactionResult({\n success: true,\n transactionId: mockTransactionId,\n amount: context.amount || '1,250',\n tokenSymbol: 'USDC',\n fromAddress: address || 'Debug Wallet',\n toAddress: 'Nord Account',\n networkName: fallbackChain,\n status: 'Completed',\n explorerUrl: getExplorerUrl(mockTransactionId),\n });\n }, [isDebugOverride, state, transactionResult, context, address]);\n\n\n\n return (\n <DepositContext.Provider value={contextValue}>\n {children}\n </DepositContext.Provider>\n );\n};\n\nconst delay = (ms: number) =>\n new Promise<void>((resolve) => {\n setTimeout(resolve, ms);\n });\n\nconst waitForTransactionSlot = async (\n connection: Connection,\n signature: string\n): Promise<number> => {\n logger.debug('Waiting for Solana confirmation for deposit', { signature });\n const deadline = Date.now() + SLOT_LOOKUP_TIMEOUT_MS;\n\n while (Date.now() < deadline) {\n const status = await connection.getSignatureStatuses([signature], {\n searchTransactionHistory: true,\n });\n const info = status.value?.[0];\n\n if (info?.err) {\n throw new Error('Deposit transaction failed to confirm on Solana.');\n }\n\n if (info && typeof info.slot === 'number') {\n return info.slot;\n }\n\n await delay(2_000);\n }\n\n throw new Error('Timed out waiting for Solana confirmation of the deposit.');\n};\n\nconst waitForDepositEventIndex = async (\n protonClient: ProtonClientLike,\n recipient: PublicKey,\n slot: number\n): Promise<number> => {\n logger.debug('Polling Proton for deposit entry', { slot });\n const deadline = Date.now() + DEPOSIT_EVENT_TIMEOUT_MS;\n\n while (Date.now() < deadline) {\n const deposits = await protonClient.depositsForRecipient(recipient, {\n startSlot: slot,\n order: 'desc',\n });\n\n if (Array.isArray(deposits)) {\n const matchingDeposit = deposits.find((deposit) => {\n const depositSlot =\n typeof deposit.createdAtSlot === 'string'\n ? Number(deposit.createdAtSlot)\n : deposit.createdAtSlot;\n return Number.isFinite(depositSlot) && depositSlot === slot;\n });\n\n if (matchingDeposit) {\n const rawEventIndex =\n matchingDeposit.eventIndex === undefined ||\n matchingDeposit.eventIndex === null\n ? null\n : Number(matchingDeposit.eventIndex);\n\n if (Number.isFinite(rawEventIndex)) {\n return rawEventIndex as number;\n }\n }\n }\n\n await delay(DEPOSIT_POLL_INTERVAL_MS);\n }\n\n throw new Error('Timed out waiting for Nord to index the deposit event.');\n};\n\nconst waitForNordAcknowledgement = async (\n nord: { getActionNonce: () => Promise<number | string | bigint> },\n targetEventIndex: number\n): Promise<void> => {\n logger.debug('Polling Nord for deposit acknowledgement', {\n targetEventIndex,\n });\n const deadline = Date.now() + NORD_ACK_TIMEOUT_MS;\n\n while (Date.now() < deadline) {\n const nonce = await nord.getActionNonce();\n const normalized =\n typeof nonce === 'bigint'\n ? Number(nonce)\n : typeof nonce === 'string'\n ? Number(nonce)\n : nonce;\n\n if (Number.isFinite(normalized) && normalized >= targetEventIndex) {\n return;\n }\n\n await delay(DEPOSIT_POLL_INTERVAL_MS);\n }\n\n throw new Error('Timed out waiting for N1 to process the deposit.');\n};\n\n/**\n * Hook to use the deposit context\n */\nexport const useDepositContext = (): DepositContextValue => {\n const context = useContext(DepositContext);\n if (context === undefined) {\n throw new Error('useDepositContext must be used within a DepositProvider');\n }\n return context;\n}; \n"]}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FlowContext as FlowContextType, FlowState, StoredDepositRecord } from '../../../modal/flow/types';
|
|
3
|
-
export interface FlowActions {
|
|
4
|
-
updateContext: (updates: Partial<FlowContextType>) => void;
|
|
5
|
-
goToChainSelection: (options?: {
|
|
6
|
-
resetSelection?: boolean;
|
|
7
|
-
}) => void;
|
|
8
|
-
selectChain: (selection: {
|
|
9
|
-
id: string;
|
|
10
|
-
name: string;
|
|
11
|
-
network?: string | null;
|
|
12
|
-
}) => void;
|
|
13
|
-
startDeposit: () => void;
|
|
14
|
-
markDepositSuccess: (payload: {
|
|
15
|
-
transactionId: string;
|
|
16
|
-
record: StoredDepositRecord;
|
|
17
|
-
}) => void;
|
|
18
|
-
markDepositFailed: (message: string) => void;
|
|
19
|
-
requireAuth: (options?: {
|
|
20
|
-
hasNordAccount?: boolean;
|
|
21
|
-
}) => void;
|
|
22
|
-
completeFlow: (options?: {
|
|
23
|
-
hasActiveSession?: boolean;
|
|
24
|
-
hasNordAccount?: boolean;
|
|
25
|
-
}) => void;
|
|
26
|
-
setErrorState: (error: Error) => void;
|
|
27
|
-
resetFlow: (overrideContext?: FlowContextType) => void;
|
|
28
|
-
}
|
|
29
|
-
export interface FlowStateContextValue {
|
|
30
|
-
state: FlowState;
|
|
31
|
-
context: FlowContextType;
|
|
32
|
-
isClosing: boolean;
|
|
33
|
-
isDebugOverride: boolean;
|
|
34
|
-
actions: FlowActions;
|
|
35
|
-
updateContext: (updates: Partial<FlowContextType>) => void;
|
|
36
|
-
}
|
|
37
|
-
interface FlowStateProviderProps {
|
|
38
|
-
children: React.ReactNode;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Provider component for the flow state context
|
|
42
|
-
*/
|
|
43
|
-
export declare const FlowStateProvider: React.FC<FlowStateProviderProps>;
|
|
44
|
-
/**
|
|
45
|
-
* Custom hook to use the flow state context
|
|
46
|
-
* @returns The flow state context value
|
|
47
|
-
* @throws Error if used outside of a FlowStateProvider
|
|
48
|
-
*/
|
|
49
|
-
export declare const useFlowStateContext: () => FlowStateContextValue;
|
|
50
|
-
export {};
|