@n1xyz/wallet-widget 0.0.32 → 0.0.33-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hooks/index.js.map +1 -1
- package/package.json +2 -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,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Format a Nord transaction for display
|
|
3
|
-
*
|
|
4
|
-
* @param tx Transaction object
|
|
5
|
-
* @returns Formatted transaction ID
|
|
6
|
-
*/
|
|
7
|
-
export function formatNordTransaction(tx) {
|
|
8
|
-
return tx.id
|
|
9
|
-
? tx.id.substring(0, 8) + '...' + tx.id.substring(tx.id.length - 8)
|
|
10
|
-
: 'Unknown';
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Get token balance for a specific token
|
|
14
|
-
*
|
|
15
|
-
* @param nordUser NordUser instance
|
|
16
|
-
* @param tokenSymbol Token symbol
|
|
17
|
-
* @returns Token balance
|
|
18
|
-
*/
|
|
19
|
-
export function getTokenBalance(nordUser, tokenSymbol) {
|
|
20
|
-
if (!nordUser || !nordUser.balances || !nordUser.balances[tokenSymbol]) {
|
|
21
|
-
return 0;
|
|
22
|
-
}
|
|
23
|
-
var tokenBalances = nordUser.balances[tokenSymbol];
|
|
24
|
-
return tokenBalances.reduce(function (total, balance) { return total + balance.balance; }, 0);
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Check if Nord is properly configured
|
|
28
|
-
*
|
|
29
|
-
* @param nord Nord instance
|
|
30
|
-
* @returns Whether Nord is properly configured
|
|
31
|
-
*/
|
|
32
|
-
export function isNordConfigured(nord) {
|
|
33
|
-
return !!nord && !!nord.webServerUrl && (!!nord.solanaConnection || !!nord.protonClient);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Format an amount with the appropriate number of decimal places
|
|
37
|
-
*
|
|
38
|
-
* @param amount Amount to format
|
|
39
|
-
* @param decimals Number of decimal places
|
|
40
|
-
* @returns Formatted amount
|
|
41
|
-
*/
|
|
42
|
-
export function formatAmount(amount, decimals) {
|
|
43
|
-
if (decimals === void 0) { decimals = 2; }
|
|
44
|
-
var numAmount = typeof amount === 'string' ? parseFloat(amount) : amount;
|
|
45
|
-
return numAmount.toFixed(decimals);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Shorten an address for display
|
|
49
|
-
*
|
|
50
|
-
* @param address Address to shorten
|
|
51
|
-
* @param startChars Number of characters to show at the start
|
|
52
|
-
* @param endChars Number of characters to show at the end
|
|
53
|
-
* @returns Shortened address
|
|
54
|
-
*/
|
|
55
|
-
export function shortenAddress(address, startChars, endChars) {
|
|
56
|
-
if (startChars === void 0) { startChars = 6; }
|
|
57
|
-
if (endChars === void 0) { endChars = 4; }
|
|
58
|
-
if (!address)
|
|
59
|
-
return '';
|
|
60
|
-
if (address.length <= startChars + endChars)
|
|
61
|
-
return address;
|
|
62
|
-
return "".concat(address.substring(0, startChars), "...").concat(address.substring(address.length - endChars));
|
|
63
|
-
}
|
|
64
|
-
//# sourceMappingURL=nordUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"nordUtils.js","sourceRoot":"","sources":["../../../../src/features/nord-flow/utils/nordUtils.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,EAAO;IAC3C,OAAO,EAAE,CAAC,EAAE;QACV,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,GAAG,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;QACnE,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,QAAyB,EACzB,WAAmB;IAEnB,IAAI,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,QAAQ,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;QACvE,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAM,aAAa,GAAG,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACrD,OAAO,aAAa,CAAC,MAAM,CAAC,UAAC,KAAK,EAAE,OAAO,IAAK,OAAA,KAAK,GAAG,OAAO,CAAC,OAAO,EAAvB,CAAuB,EAAE,CAAC,CAAC,CAAC;AAC9E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAS;IACxC,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;AAC3F,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,MAAuB,EACvB,QAAoB;IAApB,yBAAA,EAAA,YAAoB;IAEpB,IAAM,SAAS,GAAG,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IAC3E,OAAO,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAe,EACf,UAAsB,EACtB,QAAoB;IADpB,2BAAA,EAAA,cAAsB;IACtB,yBAAA,EAAA,YAAoB;IAEpB,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,IAAI,OAAO,CAAC,MAAM,IAAI,UAAU,GAAG,QAAQ;QAAE,OAAO,OAAO,CAAC;IAE5D,OAAO,UAAG,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,gBAAM,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,GAAG,QAAQ,CAAC,CAAE,CAAC;AACjG,CAAC","sourcesContent":["import type { NordUser } from '@n1xyz/nord-ts';\n\n/**\n * Format a Nord transaction for display\n *\n * @param tx Transaction object\n * @returns Formatted transaction ID\n */\nexport function formatNordTransaction(tx: any): string {\n return tx.id\n ? tx.id.substring(0, 8) + '...' + tx.id.substring(tx.id.length - 8)\n : 'Unknown';\n}\n\n/**\n * Get token balance for a specific token\n *\n * @param nordUser NordUser instance\n * @param tokenSymbol Token symbol\n * @returns Token balance\n */\nexport function getTokenBalance(\n nordUser: NordUser | null,\n tokenSymbol: string\n): number {\n if (!nordUser || !nordUser.balances || !nordUser.balances[tokenSymbol]) {\n return 0;\n }\n\n const tokenBalances = nordUser.balances[tokenSymbol];\n return tokenBalances.reduce((total, balance) => total + balance.balance, 0);\n}\n\n/**\n * Check if Nord is properly configured\n *\n * @param nord Nord instance\n * @returns Whether Nord is properly configured\n */\nexport function isNordConfigured(nord: any): boolean {\n return !!nord && !!nord.webServerUrl && (!!nord.solanaConnection || !!nord.protonClient);\n}\n\n/**\n * Format an amount with the appropriate number of decimal places\n *\n * @param amount Amount to format\n * @param decimals Number of decimal places\n * @returns Formatted amount\n */\nexport function formatAmount(\n amount: number | string,\n decimals: number = 2\n): string {\n const numAmount = typeof amount === 'string' ? parseFloat(amount) : amount;\n return numAmount.toFixed(decimals);\n}\n\n/**\n * Shorten an address for display\n *\n * @param address Address to shorten\n * @param startChars Number of characters to show at the start\n * @param endChars Number of characters to show at the end\n * @returns Shortened address\n */\nexport function shortenAddress(\n address: string,\n startChars: number = 6,\n endChars: number = 4\n): string {\n if (!address) return '';\n if (address.length <= startChars + endChars) return address;\n\n return `${address.substring(0, startChars)}...${address.substring(address.length - endChars)}`;\n}\n"]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { N1SessionMode } from '../../../types/wallet';
|
|
2
|
-
/**
|
|
3
|
-
* Interface for session key data stored in local storage
|
|
4
|
-
*/
|
|
5
|
-
export interface SessionKeyData {
|
|
6
|
-
ed25519PrivateKey: Uint8Array;
|
|
7
|
-
walletPublicKey: string;
|
|
8
|
-
chainName: string;
|
|
9
|
-
createdAt: string;
|
|
10
|
-
sessionMode: N1SessionMode;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Retrieve session keys from storage
|
|
14
|
-
* @param walletPublicKey The wallet public key to retrieve session keys for
|
|
15
|
-
* @returns The session key data or null if not found
|
|
16
|
-
*/
|
|
17
|
-
export declare function getSessionKeys(walletPublicKey: string): SessionKeyData | null;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { N1SessionMode } from '../../../types/wallet';
|
|
2
|
-
import { logger } from '../../../utils/logger';
|
|
3
|
-
import { base64ToUint8Array } from './utils';
|
|
4
|
-
/**
|
|
5
|
-
* Default secure storage adapter (currently wraps localStorage but warns about security)
|
|
6
|
-
* TODO: Implement a more secure storage mechanism (e.g. encrypted storage or in-memory only with regular re-auth)
|
|
7
|
-
*/
|
|
8
|
-
var defaultStorage = {
|
|
9
|
-
getItem: function (key) {
|
|
10
|
-
try {
|
|
11
|
-
return localStorage.getItem(key);
|
|
12
|
-
}
|
|
13
|
-
catch (e) {
|
|
14
|
-
logger.error('Failed to access storage', e);
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
setItem: function (key, value) {
|
|
19
|
-
try {
|
|
20
|
-
localStorage.setItem(key, value);
|
|
21
|
-
}
|
|
22
|
-
catch (e) {
|
|
23
|
-
logger.error('Failed to write to storage', e);
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
removeItem: function (key) {
|
|
27
|
-
try {
|
|
28
|
-
localStorage.removeItem(key);
|
|
29
|
-
}
|
|
30
|
-
catch (e) {
|
|
31
|
-
logger.error('Failed to remove from storage', e);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Retrieve session keys from storage
|
|
37
|
-
* @param walletPublicKey The wallet public key to retrieve session keys for
|
|
38
|
-
* @returns The session key data or null if not found
|
|
39
|
-
*/
|
|
40
|
-
export function getSessionKeys(walletPublicKey) {
|
|
41
|
-
var storageKey = "n1_sessionKey_".concat(walletPublicKey);
|
|
42
|
-
var data = defaultStorage.getItem(storageKey);
|
|
43
|
-
if (!data) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
var parsedData = JSON.parse(data);
|
|
48
|
-
if (parsedData.ed25519PrivateKey) {
|
|
49
|
-
parsedData.ed25519PrivateKey = base64ToUint8Array(parsedData.ed25519PrivateKey);
|
|
50
|
-
}
|
|
51
|
-
// Convert sessionMode string to enum value
|
|
52
|
-
var storedSessionMode = parsedData.sessionMode;
|
|
53
|
-
if (storedSessionMode === N1SessionMode.Nord ||
|
|
54
|
-
storedSessionMode === N1SessionMode.Nord.toString() ||
|
|
55
|
-
storedSessionMode === 'Nord') {
|
|
56
|
-
parsedData.sessionMode = N1SessionMode.Nord;
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
logger.warn('Encountered legacy session mode. Defaulting to Nord session mode.');
|
|
60
|
-
parsedData.sessionMode = N1SessionMode.Nord;
|
|
61
|
-
}
|
|
62
|
-
return parsedData;
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
logger.error('Failed to parse session key data', error);
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=session.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../../src/features/nord-flow/utils/session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAsB7C;;;GAGG;AACH,IAAM,cAAc,GAAmB;IACrC,OAAO,EAAE,UAAC,GAAG;QACX,IAAI,CAAC;YACH,OAAO,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,0BAA0B,EAAE,CAAC,CAAC,CAAC;YAC5C,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,EAAE,UAAC,GAAG,EAAE,KAAK;QAClB,IAAI,CAAC;YACH,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QACnC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,CAAC,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;IACD,UAAU,EAAE,UAAC,GAAG;QACd,IAAI,CAAC;YACH,YAAY,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,+BAA+B,EAAE,CAAC,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,eAAuB;IACpD,IAAM,UAAU,GAAG,wBAAiB,eAAe,CAAE,CAAC;IAEtD,IAAM,IAAI,GAAG,cAAc,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAChD,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC;QACH,IAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,iBAAiB,EAAE,CAAC;YACjC,UAAU,CAAC,iBAAiB,GAAG,kBAAkB,CAC/C,UAAU,CAAC,iBAAiB,CAC7B,CAAC;QACJ,CAAC;QAED,2CAA2C;QAC3C,IAAM,iBAAiB,GAAG,UAAU,CAAC,WAAW,CAAC;QACjD,IACE,iBAAiB,KAAK,aAAa,CAAC,IAAI;YACxC,iBAAiB,KAAK,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE;YACnD,iBAAiB,KAAK,MAAM,EAC5B,CAAC;YACD,UAAU,CAAC,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC;QAC9C,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CACT,mEAAmE,CACpE,CAAC;YACF,UAAU,CAAC,WAAW,GAAG,aAAa,CAAC,IAAI,CAAC;QAC9C,CAAC;QAED,OAAO,UAA4B,CAAC;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,kCAAkC,EAAE,KAAK,CAAC,CAAC;QACxD,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["import { N1SessionMode } from '../../../types/wallet';\nimport { logger } from '../../../utils/logger';\nimport { base64ToUint8Array } from './utils';\n\n/**\n * Interface for session key data stored in local storage\n */\nexport interface SessionKeyData {\n ed25519PrivateKey: Uint8Array;\n walletPublicKey: string;\n chainName: string;\n createdAt: string;\n sessionMode: N1SessionMode;\n}\n\n/**\n * Abstract storage adapter to allow switching implementations\n */\ninterface StorageAdapter {\n getItem(key: string): string | null;\n setItem(key: string, value: string): void;\n removeItem(key: string): void;\n}\n\n/**\n * Default secure storage adapter (currently wraps localStorage but warns about security)\n * TODO: Implement a more secure storage mechanism (e.g. encrypted storage or in-memory only with regular re-auth)\n */\nconst defaultStorage: StorageAdapter = {\n getItem: (key) => {\n try {\n return localStorage.getItem(key);\n } catch (e) {\n logger.error('Failed to access storage', e);\n return null;\n }\n },\n setItem: (key, value) => {\n try {\n localStorage.setItem(key, value);\n } catch (e) {\n logger.error('Failed to write to storage', e);\n }\n },\n removeItem: (key) => {\n try {\n localStorage.removeItem(key);\n } catch (e) {\n logger.error('Failed to remove from storage', e);\n }\n }\n};\n\n/**\n * Retrieve session keys from storage\n * @param walletPublicKey The wallet public key to retrieve session keys for\n * @returns The session key data or null if not found\n */\nexport function getSessionKeys(walletPublicKey: string): SessionKeyData | null {\n const storageKey = `n1_sessionKey_${walletPublicKey}`;\n\n const data = defaultStorage.getItem(storageKey);\n if (!data) {\n return null;\n }\n\n try {\n const parsedData = JSON.parse(data);\n if (parsedData.ed25519PrivateKey) {\n parsedData.ed25519PrivateKey = base64ToUint8Array(\n parsedData.ed25519PrivateKey\n );\n }\n\n // Convert sessionMode string to enum value\n const storedSessionMode = parsedData.sessionMode;\n if (\n storedSessionMode === N1SessionMode.Nord ||\n storedSessionMode === N1SessionMode.Nord.toString() ||\n storedSessionMode === 'Nord'\n ) {\n parsedData.sessionMode = N1SessionMode.Nord;\n } else {\n logger.warn(\n 'Encountered legacy session mode. Defaulting to Nord session mode.'\n );\n parsedData.sessionMode = N1SessionMode.Nord;\n }\n\n return parsedData as SessionKeyData;\n } catch (error) {\n logger.error('Failed to parse session key data', error);\n return null;\n }\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Interface for transaction result
|
|
3
|
-
*/
|
|
4
|
-
export interface TransactionResult {
|
|
5
|
-
success: boolean;
|
|
6
|
-
transactionId: string;
|
|
7
|
-
amount: string;
|
|
8
|
-
tokenSymbol: string;
|
|
9
|
-
fromAddress: string;
|
|
10
|
-
toAddress: string;
|
|
11
|
-
networkName: string;
|
|
12
|
-
status: 'Completed' | 'Failed' | 'Pending';
|
|
13
|
-
explorerUrl?: string;
|
|
14
|
-
error?: Error;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Get explorer URL for a transaction
|
|
18
|
-
*/
|
|
19
|
-
export declare function getExplorerUrl(transactionId: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../../../src/features/nord-flow/utils/transaction.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,aAAqB;IAClD,IAAM,OAAO,GAAG,iCAAiC,CAAC;IAClD,OAAO,UAAG,OAAO,SAAG,aAAa,oBAAiB,CAAC;AACrD,CAAC","sourcesContent":["/**\n * Interface for transaction result\n */\nexport interface TransactionResult {\n success: boolean;\n transactionId: string;\n amount: string;\n tokenSymbol: string;\n fromAddress: string;\n toAddress: string;\n networkName: string;\n status: 'Completed' | 'Failed' | 'Pending';\n explorerUrl?: string;\n error?: Error;\n}\n\n/**\n * Get explorer URL for a transaction\n */\nexport function getExplorerUrl(transactionId: string) {\n const baseUrl = 'https://explorer.solana.com/tx/';\n return `${baseUrl}${transactionId}?cluster=devnet`;\n}\n"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { generateEd25519KeyPair, generateRandomUint8Array as createRandomUint8Array } from '../../../utils/ed25519';
|
|
2
|
-
export declare const generateSessionKeyPair: typeof generateEd25519KeyPair;
|
|
3
|
-
export declare const generateRandomUint8Array: typeof createRandomUint8Array;
|
|
4
|
-
export declare function arrayBufferToBase64(buffer: Uint8Array): string;
|
|
5
|
-
export declare function base64ToUint8Array(base64String: string): Uint8Array<ArrayBuffer>;
|
|
6
|
-
export declare function storeSessionKeysInLocalStorage({ privKey, publicKey, walletPublicKey, chainName, }: {
|
|
7
|
-
privKey: Uint8Array;
|
|
8
|
-
publicKey: Uint8Array;
|
|
9
|
-
walletPublicKey: string;
|
|
10
|
-
chainName: string;
|
|
11
|
-
}): void;
|
|
12
|
-
export declare function getSessionKeysFromLocalStorage(walletPublicKey: string): {
|
|
13
|
-
ed25519PrivateKey: Uint8Array;
|
|
14
|
-
ed25519PublicKey: Uint8Array | null;
|
|
15
|
-
walletPublicKey: string;
|
|
16
|
-
chainName: string;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
} | null;
|
|
19
|
-
export declare function removeKeysFromLocalStorage(walletPublicKey: string): void;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { generateEd25519KeyPair, generateRandomUint8Array as createRandomUint8Array, } from '../../../utils/ed25519';
|
|
2
|
-
export var generateSessionKeyPair = generateEd25519KeyPair;
|
|
3
|
-
export var generateRandomUint8Array = createRandomUint8Array;
|
|
4
|
-
export function arrayBufferToBase64(buffer) {
|
|
5
|
-
var binary = '';
|
|
6
|
-
var bytes = new Uint8Array(buffer);
|
|
7
|
-
for (var i = 0; i < bytes.length; i++) {
|
|
8
|
-
binary += String.fromCharCode(bytes[i]);
|
|
9
|
-
}
|
|
10
|
-
return btoa(binary);
|
|
11
|
-
}
|
|
12
|
-
// Convert Base64 string back to Uint8Array
|
|
13
|
-
export function base64ToUint8Array(base64String) {
|
|
14
|
-
var binaryString = atob(base64String);
|
|
15
|
-
var length = binaryString.length;
|
|
16
|
-
var bytes = new Uint8Array(length);
|
|
17
|
-
for (var i = 0; i < length; i++) {
|
|
18
|
-
bytes[i] = binaryString.charCodeAt(i);
|
|
19
|
-
}
|
|
20
|
-
return bytes;
|
|
21
|
-
}
|
|
22
|
-
// Function to store keys with a custom ID format in local storage, including private key
|
|
23
|
-
export function storeSessionKeysInLocalStorage(_a) {
|
|
24
|
-
var privKey = _a.privKey, publicKey = _a.publicKey, walletPublicKey = _a.walletPublicKey, chainName = _a.chainName;
|
|
25
|
-
var storageKey = "n1_sessionKey_".concat(walletPublicKey);
|
|
26
|
-
var data = {
|
|
27
|
-
ed25519PrivateKey: arrayBufferToBase64(privKey),
|
|
28
|
-
ed25519PublicKey: arrayBufferToBase64(publicKey),
|
|
29
|
-
walletPublicKey: walletPublicKey,
|
|
30
|
-
chainName: chainName,
|
|
31
|
-
createdAt: new Date().toISOString(),
|
|
32
|
-
};
|
|
33
|
-
localStorage.setItem(storageKey, JSON.stringify(data));
|
|
34
|
-
}
|
|
35
|
-
// Retrieve data from local storage by wallet key and convert the private and public key back to Uint8Array
|
|
36
|
-
export function getSessionKeysFromLocalStorage(walletPublicKey) {
|
|
37
|
-
var storageKey = "n1_sessionKey_".concat(walletPublicKey);
|
|
38
|
-
var data = localStorage.getItem(storageKey);
|
|
39
|
-
if (data) {
|
|
40
|
-
var parsedData = JSON.parse(data);
|
|
41
|
-
if (parsedData.ed25519PrivateKey) {
|
|
42
|
-
parsedData.ed25519PrivateKey = base64ToUint8Array(parsedData.ed25519PrivateKey);
|
|
43
|
-
}
|
|
44
|
-
else {
|
|
45
|
-
throw new Error('Missing ed25519PrivateKey in session storage');
|
|
46
|
-
}
|
|
47
|
-
if (parsedData.ed25519PublicKey) {
|
|
48
|
-
parsedData.ed25519PublicKey = base64ToUint8Array(parsedData.ed25519PublicKey);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
throw new Error('Missing ed25519PublicKey in session storage');
|
|
52
|
-
}
|
|
53
|
-
// Validate keys: check that public key is present and is Uint8Array of length 32
|
|
54
|
-
if (!parsedData.ed25519PublicKey || !(parsedData.ed25519PublicKey instanceof Uint8Array) || parsedData.ed25519PublicKey.length !== 32) {
|
|
55
|
-
throw new Error('Invalid public key in session storage');
|
|
56
|
-
}
|
|
57
|
-
return parsedData;
|
|
58
|
-
}
|
|
59
|
-
return null;
|
|
60
|
-
}
|
|
61
|
-
// Function to remove data from local storage by wallet key
|
|
62
|
-
export function removeKeysFromLocalStorage(walletPublicKey) {
|
|
63
|
-
var storageKey = "n1_sessionKey_".concat(walletPublicKey);
|
|
64
|
-
localStorage.removeItem(storageKey);
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/features/nord-flow/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,wBAAwB,IAAI,sBAAsB,GACnD,MAAM,wBAAwB,CAAC;AAEhC,MAAM,CAAC,IAAM,sBAAsB,GAAG,sBAAsB,CAAC;AAC7D,MAAM,CAAC,IAAM,wBAAwB,GAAG,sBAAsB,CAAC;AAE/D,MAAM,UAAU,mBAAmB,CAAC,MAAkB;IACpD,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,IAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC;AACtB,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,kBAAkB,CAAC,YAAoB;IACrD,IAAM,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC;IACxC,IAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC;IACnC,IAAM,KAAK,GAAG,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;IACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,KAAK,CAAC,CAAC,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,8BAA8B,CAAC,EAU9C;QATC,OAAO,aAAA,EACP,SAAS,eAAA,EACT,eAAe,qBAAA,EACf,SAAS,eAAA;IAOT,IAAM,UAAU,GAAG,wBAAiB,eAAe,CAAE,CAAC;IAEtD,IAAM,IAAI,GAAG;QACX,iBAAiB,EAAE,mBAAmB,CAAC,OAAO,CAAC;QAC/C,gBAAgB,EAAE,mBAAmB,CAAC,SAAS,CAAC;QAChD,eAAe,iBAAA;QACf,SAAS,WAAA;QACT,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC;IAEF,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AACzD,CAAC;AAED,2GAA2G;AAC3G,MAAM,UAAU,8BAA8B,CAAC,eAAuB;IAOpE,IAAM,UAAU,GAAG,wBAAiB,eAAe,CAAE,CAAC;IAEtD,IAAM,IAAI,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC9C,IAAI,IAAI,EAAE,CAAC;QACT,IAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,UAAU,CAAC,iBAAiB,EAAE,CAAC;YACjC,UAAU,CAAC,iBAAiB,GAAG,kBAAkB,CAC/C,UAAU,CAAC,iBAAiB,CAC7B,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAClE,CAAC;QACD,IAAI,UAAU,CAAC,gBAAgB,EAAE,CAAC;YAChC,UAAU,CAAC,gBAAgB,GAAG,kBAAkB,CAC9C,UAAU,CAAC,gBAAgB,CAC5B,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACjE,CAAC;QACD,iFAAiF;QACjF,IAAI,CAAC,UAAU,CAAC,gBAAgB,IAAI,CAAC,CAAC,UAAU,CAAC,gBAAgB,YAAY,UAAU,CAAC,IAAI,UAAU,CAAC,gBAAgB,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;YACtI,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,0BAA0B,CAAC,eAAuB;IAChE,IAAM,UAAU,GAAG,wBAAiB,eAAe,CAAE,CAAC;IAEtD,YAAY,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC","sourcesContent":["import {\n generateEd25519KeyPair,\n generateRandomUint8Array as createRandomUint8Array,\n} from '../../../utils/ed25519';\n\nexport const generateSessionKeyPair = generateEd25519KeyPair;\nexport const generateRandomUint8Array = createRandomUint8Array;\n\nexport function arrayBufferToBase64(buffer: Uint8Array) {\n let binary = '';\n const bytes = new Uint8Array(buffer);\n for (let i = 0; i < bytes.length; i++) {\n binary += String.fromCharCode(bytes[i]);\n }\n return btoa(binary);\n}\n\n// Convert Base64 string back to Uint8Array\nexport function base64ToUint8Array(base64String: string) {\n const binaryString = atob(base64String);\n const length = binaryString.length;\n const bytes = new Uint8Array(length);\n for (let i = 0; i < length; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\n\n// Function to store keys with a custom ID format in local storage, including private key\nexport function storeSessionKeysInLocalStorage({\n privKey,\n publicKey,\n walletPublicKey,\n chainName,\n}: {\n privKey: Uint8Array;\n publicKey: Uint8Array;\n walletPublicKey: string;\n chainName: string;\n}) {\n const storageKey = `n1_sessionKey_${walletPublicKey}`;\n\n const data = {\n ed25519PrivateKey: arrayBufferToBase64(privKey),\n ed25519PublicKey: arrayBufferToBase64(publicKey),\n walletPublicKey,\n chainName,\n createdAt: new Date().toISOString(),\n };\n\n localStorage.setItem(storageKey, JSON.stringify(data));\n}\n\n// Retrieve data from local storage by wallet key and convert the private and public key back to Uint8Array\nexport function getSessionKeysFromLocalStorage(walletPublicKey: string): {\n ed25519PrivateKey: Uint8Array;\n ed25519PublicKey: Uint8Array | null;\n walletPublicKey: string;\n chainName: string;\n createdAt: string;\n} | null {\n const storageKey = `n1_sessionKey_${walletPublicKey}`;\n\n const data = localStorage.getItem(storageKey);\n if (data) {\n const parsedData = JSON.parse(data);\n if (parsedData.ed25519PrivateKey) {\n parsedData.ed25519PrivateKey = base64ToUint8Array(\n parsedData.ed25519PrivateKey\n );\n } else {\n throw new Error('Missing ed25519PrivateKey in session storage');\n }\n if (parsedData.ed25519PublicKey) {\n parsedData.ed25519PublicKey = base64ToUint8Array(\n parsedData.ed25519PublicKey\n );\n } else {\n throw new Error('Missing ed25519PublicKey in session storage');\n }\n // Validate keys: check that public key is present and is Uint8Array of length 32\n if (!parsedData.ed25519PublicKey || !(parsedData.ed25519PublicKey instanceof Uint8Array) || parsedData.ed25519PublicKey.length !== 32) {\n throw new Error('Invalid public key in session storage');\n }\n return parsedData;\n }\n return null;\n}\n\n// Function to remove data from local storage by wallet key\nexport function removeKeysFromLocalStorage(walletPublicKey: string) {\n const storageKey = `n1_sessionKey_${walletPublicKey}`;\n\n localStorage.removeItem(storageKey);\n}\n"]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* A Higher-Order Component (HOC) that adds image fallback functionality to a component
|
|
4
|
-
* @param WrappedComponent The component to wrap
|
|
5
|
-
* @returns A new component with image fallback functionality
|
|
6
|
-
*/
|
|
7
|
-
export declare function withImageFallback<P extends object>(WrappedComponent: ComponentType<P>): React.FC<P>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import React from 'react';
|
|
25
|
-
import { ImageWithFallback } from '../components';
|
|
26
|
-
/**
|
|
27
|
-
* A Higher-Order Component (HOC) that adds image fallback functionality to a component
|
|
28
|
-
* @param WrappedComponent The component to wrap
|
|
29
|
-
* @returns A new component with image fallback functionality
|
|
30
|
-
*/
|
|
31
|
-
export function withImageFallback(WrappedComponent) {
|
|
32
|
-
// Create a new component that wraps the original component
|
|
33
|
-
var WithImageFallback = function (props) {
|
|
34
|
-
// Function to recursively process React elements
|
|
35
|
-
var processNode = function (node) {
|
|
36
|
-
if (!React.isValidElement(node)) {
|
|
37
|
-
return node;
|
|
38
|
-
}
|
|
39
|
-
var element = node;
|
|
40
|
-
// If it's an img element, replace it with ImageWithFallback
|
|
41
|
-
if (element.type === 'img') {
|
|
42
|
-
var _a = element.props, src = _a.src, alt = _a.alt, width = _a.width, height = _a.height, className = _a.className, rest = __rest(_a, ["src", "alt", "width", "height", "className"]);
|
|
43
|
-
return (_jsx(ImageWithFallback, __assign({ src: src, alt: alt || 'Image', width: width, height: height, className: className }, rest)));
|
|
44
|
-
}
|
|
45
|
-
// If it has children, process them recursively
|
|
46
|
-
if (element.props && element.props.children) {
|
|
47
|
-
var children = React.Children.map(element.props.children, processNode);
|
|
48
|
-
return React.cloneElement(element, __assign({}, element.props), children);
|
|
49
|
-
}
|
|
50
|
-
return element;
|
|
51
|
-
};
|
|
52
|
-
// Render the wrapped component and process its output
|
|
53
|
-
var renderedComponent = _jsx(WrappedComponent, __assign({}, props));
|
|
54
|
-
return processNode(renderedComponent);
|
|
55
|
-
};
|
|
56
|
-
// Set display name for debugging
|
|
57
|
-
var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
|
58
|
-
WithImageFallback.displayName = "withImageFallback(".concat(wrappedComponentName, ")");
|
|
59
|
-
return WithImageFallback;
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=withImageFallback.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"withImageFallback.js","sourceRoot":"","sources":["../../../../src/features/nord-flow/utils/withImageFallback.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,gBAAkC;IAElC,2DAA2D;IAC3D,IAAM,iBAAiB,GAAgB,UAAC,KAAK;QAC3C,iDAAiD;QACjD,IAAM,WAAW,GAAG,UAAC,IAAqB;YACxC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC;gBAChC,OAAO,IAAI,CAAC;YACd,CAAC;YAED,IAAM,OAAO,GAAG,IAA0B,CAAC;YAE3C,4DAA4D;YAC5D,IAAI,OAAO,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;gBAC3B,IAAM,KAAkD,OAAO,CAAC,KAAK,EAA7D,GAAG,SAAA,EAAE,GAAG,SAAA,EAAE,KAAK,WAAA,EAAE,MAAM,YAAA,EAAE,SAAS,eAAA,EAAK,IAAI,cAA7C,8CAA+C,CAAgB,CAAC;gBAEtE,OAAO,CACL,KAAC,iBAAiB,aAChB,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,IAAI,OAAO,EACnB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,IAChB,IAAI,EACR,CACH,CAAC;YACJ,CAAC;YAED,+CAA+C;YAC/C,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;gBAC5C,IAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CACjC,OAAO,CAAC,KAAK,CAAC,QAAQ,EACtB,WAAW,CACZ,CAAC;gBAEF,OAAO,KAAK,CAAC,YAAY,CAAC,OAAO,eAAO,OAAO,CAAC,KAAK,GAAI,QAAQ,CAAC,CAAC;YACrE,CAAC;YAED,OAAO,OAAO,CAAC;QACjB,CAAC,CAAC;QAEF,sDAAsD;QACtD,IAAM,iBAAiB,GAAG,KAAC,gBAAgB,eAAK,KAAK,EAAI,CAAC;QAC1D,OAAO,WAAW,CAAC,iBAAiB,CAAuB,CAAC;IAC9D,CAAC,CAAC;IAEF,iCAAiC;IACjC,IAAM,oBAAoB,GACxB,gBAAgB,CAAC,WAAW,IAAI,gBAAgB,CAAC,IAAI,IAAI,WAAW,CAAC;IACvE,iBAAiB,CAAC,WAAW,GAAG,4BAAqB,oBAAoB,MAAG,CAAC;IAE7E,OAAO,iBAAiB,CAAC;AAC3B,CAAC","sourcesContent":["import React, { ComponentType } from 'react';\nimport { ImageWithFallback } from '../components';\n\n/**\n * A Higher-Order Component (HOC) that adds image fallback functionality to a component\n * @param WrappedComponent The component to wrap\n * @returns A new component with image fallback functionality\n */\nexport function withImageFallback<P extends object>(\n WrappedComponent: ComponentType<P>\n): React.FC<P> {\n // Create a new component that wraps the original component\n const WithImageFallback: React.FC<P> = (props) => {\n // Function to recursively process React elements\n const processNode = (node: React.ReactNode): React.ReactNode => {\n if (!React.isValidElement(node)) {\n return node;\n }\n\n const element = node as React.ReactElement;\n\n // If it's an img element, replace it with ImageWithFallback\n if (element.type === 'img') {\n const { src, alt, width, height, className, ...rest } = element.props;\n\n return (\n <ImageWithFallback\n src={src}\n alt={alt || 'Image'}\n width={width}\n height={height}\n className={className}\n {...rest}\n />\n );\n }\n\n // If it has children, process them recursively\n if (element.props && element.props.children) {\n const children = React.Children.map(\n element.props.children,\n processNode\n );\n\n return React.cloneElement(element, { ...element.props }, children);\n }\n\n return element;\n };\n\n // Render the wrapped component and process its output\n const renderedComponent = <WrappedComponent {...props} />;\n return processNode(renderedComponent) as React.ReactElement;\n };\n\n // Set display name for debugging\n const wrappedComponentName =\n WrappedComponent.displayName || WrappedComponent.name || 'Component';\n WithImageFallback.displayName = `withImageFallback(${wrappedComponentName})`;\n\n return WithImageFallback;\n}\n"]}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FlowContext as FlowContextType, FlowState, StoredDepositRecord } from '../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 {};
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useRef, useState, } from 'react';
|
|
14
|
-
import { FlowState, initialFlowContext, } from '../types';
|
|
15
|
-
import { logger } from '../../../utils/logger';
|
|
16
|
-
import { useN1WalletContext, useN1WalletInternalContext } from '../../../hooks';
|
|
17
|
-
import { N1ModalViewMode } from '../../../types/wallet';
|
|
18
|
-
import { DEBUG_VIEW_TO_FLOW } from './debug';
|
|
19
|
-
import { createInitialMachineState, flowReducer, } from './flowMachine';
|
|
20
|
-
// Create the context with a default value
|
|
21
|
-
var FlowStateContext = createContext(undefined);
|
|
22
|
-
/**
|
|
23
|
-
* Provider component for the flow state context
|
|
24
|
-
*/
|
|
25
|
-
export var FlowStateProvider = function (_a) {
|
|
26
|
-
var children = _a.children;
|
|
27
|
-
var _b = useReducer(flowReducer, undefined, createInitialMachineState), machineState = _b[0], dispatch = _b[1];
|
|
28
|
-
var state = machineState.state, context = machineState.context;
|
|
29
|
-
var _c = useState(false), isClosing = _c[0], setIsClosing = _c[1];
|
|
30
|
-
var _d = useState(false), isDebugOverride = _d[0], setIsDebugOverride = _d[1];
|
|
31
|
-
var contextRef = useRef(context);
|
|
32
|
-
var debugOverrideRef = useRef(false);
|
|
33
|
-
var lastDepositRequestRef = useRef(0);
|
|
34
|
-
var prevStateRef = useRef(null);
|
|
35
|
-
var _e = useN1WalletContext(), nordUser = _e.nordUser, viewMode = _e.viewMode;
|
|
36
|
-
var _f = useN1WalletInternalContext(), dynamicSdkHasLoaded = _f.dynamicSdkHasLoaded, depositFlowRequestId = _f.depositFlowRequestId, dynamicWallet = _f.dynamicWallet;
|
|
37
|
-
useEffect(function () {
|
|
38
|
-
contextRef.current = context;
|
|
39
|
-
}, [context]);
|
|
40
|
-
var guardedDispatch = useCallback(function (action) {
|
|
41
|
-
if (isDebugOverride) {
|
|
42
|
-
logger.debug("Transition suppressed (debug override \u2192 ".concat(N1ModalViewMode[viewMode], ")"));
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (!dynamicSdkHasLoaded) {
|
|
46
|
-
logger.debug("Ignoring action ".concat(action.type, " until Dynamic SDK is ready"));
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
dispatch(action);
|
|
50
|
-
}, [dynamicSdkHasLoaded, isDebugOverride, viewMode]);
|
|
51
|
-
useEffect(function () {
|
|
52
|
-
var prevState = prevStateRef.current;
|
|
53
|
-
if (prevState && prevState !== state) {
|
|
54
|
-
logger.debug("State changed from ".concat(prevState, " to ").concat(state));
|
|
55
|
-
}
|
|
56
|
-
prevStateRef.current = state;
|
|
57
|
-
if (state === FlowState.CONNECTING_WALLET) {
|
|
58
|
-
forcedAuthRequestedRef.current = false;
|
|
59
|
-
}
|
|
60
|
-
}, [state]);
|
|
61
|
-
var forcedAuthRequestedRef = useRef(false);
|
|
62
|
-
useEffect(function () {
|
|
63
|
-
if (!dynamicWallet ||
|
|
64
|
-
state !== FlowState.CONNECTING_WALLET ||
|
|
65
|
-
context.isDepositOnlyFlow ||
|
|
66
|
-
forcedAuthRequestedRef.current ||
|
|
67
|
-
!context.hasNordAccount) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
forcedAuthRequestedRef.current = true;
|
|
71
|
-
guardedDispatch({
|
|
72
|
-
type: 'GO_TO_AUTH',
|
|
73
|
-
hasNordAccount: context.hasNordAccount || undefined,
|
|
74
|
-
});
|
|
75
|
-
}, [dynamicWallet, state, context.isDepositOnlyFlow, context.hasNordAccount, guardedDispatch]);
|
|
76
|
-
/**
|
|
77
|
-
* Update context without changing the current state
|
|
78
|
-
*/
|
|
79
|
-
var updateContext = useCallback(function (updates) {
|
|
80
|
-
if (!updates || Object.keys(updates).length === 0) {
|
|
81
|
-
return;
|
|
82
|
-
}
|
|
83
|
-
var prev = contextRef.current;
|
|
84
|
-
var hasChanges = Object.keys(updates).some(function (key) { return prev[key] !== updates[key]; });
|
|
85
|
-
if (!hasChanges) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
dispatch({ type: 'SET_CONTEXT', updates: updates });
|
|
89
|
-
}, [dispatch]);
|
|
90
|
-
var actions = useMemo(function () { return ({
|
|
91
|
-
updateContext: updateContext,
|
|
92
|
-
goToChainSelection: function (options) {
|
|
93
|
-
var _a;
|
|
94
|
-
return guardedDispatch({
|
|
95
|
-
type: 'GO_TO_CHAIN_SELECTION',
|
|
96
|
-
resetSelection: (_a = options === null || options === void 0 ? void 0 : options.resetSelection) !== null && _a !== void 0 ? _a : false,
|
|
97
|
-
});
|
|
98
|
-
},
|
|
99
|
-
selectChain: function (selection) {
|
|
100
|
-
return guardedDispatch({ type: 'SELECT_CHAIN', selection: selection });
|
|
101
|
-
},
|
|
102
|
-
startDeposit: function () { return guardedDispatch({ type: 'START_DEPOSIT' }); },
|
|
103
|
-
markDepositSuccess: function (payload) {
|
|
104
|
-
return guardedDispatch({ type: 'DEPOSIT_SUCCESS', payload: payload });
|
|
105
|
-
},
|
|
106
|
-
markDepositFailed: function (message) {
|
|
107
|
-
return guardedDispatch({ type: 'DEPOSIT_FAILED', message: message });
|
|
108
|
-
},
|
|
109
|
-
requireAuth: function (options) {
|
|
110
|
-
return guardedDispatch({
|
|
111
|
-
type: 'GO_TO_AUTH',
|
|
112
|
-
hasNordAccount: options === null || options === void 0 ? void 0 : options.hasNordAccount,
|
|
113
|
-
});
|
|
114
|
-
},
|
|
115
|
-
completeFlow: function (options) {
|
|
116
|
-
return guardedDispatch({
|
|
117
|
-
type: 'COMPLETE_FLOW',
|
|
118
|
-
hasActiveSession: options === null || options === void 0 ? void 0 : options.hasActiveSession,
|
|
119
|
-
hasNordAccount: options === null || options === void 0 ? void 0 : options.hasNordAccount,
|
|
120
|
-
});
|
|
121
|
-
},
|
|
122
|
-
setErrorState: function (error) { return guardedDispatch({ type: 'SET_ERROR', error: error }); },
|
|
123
|
-
resetFlow: function (overrideContext) {
|
|
124
|
-
return guardedDispatch({ type: 'RESET', context: overrideContext });
|
|
125
|
-
},
|
|
126
|
-
}); }, [guardedDispatch, updateContext]);
|
|
127
|
-
useEffect(function () {
|
|
128
|
-
if (!depositFlowRequestId ||
|
|
129
|
-
depositFlowRequestId === lastDepositRequestRef.current) {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
|
-
lastDepositRequestRef.current = depositFlowRequestId;
|
|
133
|
-
if (!nordUser || !nordUser.sessionId) {
|
|
134
|
-
logger.warn('Ignoring deposit flow request without an active Nord session');
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
var nextContext = __assign(__assign({}, initialFlowContext), { hasNordAccount: true, hasActiveSession: true, isDepositOnlyFlow: true });
|
|
138
|
-
debugOverrideRef.current = false;
|
|
139
|
-
setIsDebugOverride(false);
|
|
140
|
-
dispatch({ type: 'RESET', context: nextContext });
|
|
141
|
-
dispatch({ type: 'GO_TO_CHAIN_SELECTION', resetSelection: false });
|
|
142
|
-
setIsClosing(false);
|
|
143
|
-
logger.debug('Deposit-only flow activated');
|
|
144
|
-
}, [depositFlowRequestId, nordUser, dispatch]);
|
|
145
|
-
// Debug-only: allow external callers (e.g. UI playground) to jump to a specific view
|
|
146
|
-
useEffect(function () {
|
|
147
|
-
var debugTarget = viewMode === N1ModalViewMode.Automatic ? undefined : DEBUG_VIEW_TO_FLOW[viewMode];
|
|
148
|
-
if (debugTarget) {
|
|
149
|
-
debugOverrideRef.current = true;
|
|
150
|
-
setIsDebugOverride(true);
|
|
151
|
-
var snapshot = {
|
|
152
|
-
state: debugTarget.state,
|
|
153
|
-
context: debugTarget.context,
|
|
154
|
-
};
|
|
155
|
-
dispatch({ type: 'APPLY_SNAPSHOT', snapshot: snapshot });
|
|
156
|
-
logger.debug("Debug view override: ".concat(N1ModalViewMode[viewMode], " \u2192 ").concat(debugTarget.state));
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
if (debugOverrideRef.current) {
|
|
160
|
-
debugOverrideRef.current = false;
|
|
161
|
-
setIsDebugOverride(false);
|
|
162
|
-
dispatch({
|
|
163
|
-
type: 'APPLY_SNAPSHOT',
|
|
164
|
-
snapshot: createInitialMachineState(),
|
|
165
|
-
});
|
|
166
|
-
logger.debug('Debug view override cleared; returning to state machine');
|
|
167
|
-
}
|
|
168
|
-
}, [viewMode, dispatch]);
|
|
169
|
-
// Create the context value
|
|
170
|
-
var contextValue = {
|
|
171
|
-
state: state,
|
|
172
|
-
context: context,
|
|
173
|
-
isClosing: isClosing,
|
|
174
|
-
isDebugOverride: isDebugOverride,
|
|
175
|
-
actions: actions,
|
|
176
|
-
updateContext: updateContext,
|
|
177
|
-
};
|
|
178
|
-
return (_jsx(FlowStateContext.Provider, { value: contextValue, children: children }));
|
|
179
|
-
};
|
|
180
|
-
/**
|
|
181
|
-
* Custom hook to use the flow state context
|
|
182
|
-
* @returns The flow state context value
|
|
183
|
-
* @throws Error if used outside of a FlowStateProvider
|
|
184
|
-
*/
|
|
185
|
-
export var useFlowStateContext = function () {
|
|
186
|
-
var contextValue = useContext(FlowStateContext);
|
|
187
|
-
if (contextValue === undefined) {
|
|
188
|
-
throw new Error('useFlowStateContext must be used within a FlowStateProvider');
|
|
189
|
-
}
|
|
190
|
-
return contextValue;
|
|
191
|
-
};
|
|
192
|
-
//# sourceMappingURL=FlowStateProvider.js.map
|