@ton/appkit-react 0.0.1 → 0.0.3
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/esm/components/block/block.js +7 -0
- package/dist/esm/components/block/block.js.map +1 -0
- package/dist/{components → esm/components}/block/block.module.css +1 -1
- package/dist/esm/components/block/index.js +9 -0
- package/dist/esm/components/block/index.js.map +1 -0
- package/dist/esm/components/button/button.js +7 -0
- package/dist/esm/components/button/button.js.map +1 -0
- package/dist/{components → esm/components}/button/button.module.css +7 -2
- package/dist/esm/components/button/index.js +9 -0
- package/dist/esm/components/button/index.js.map +1 -0
- package/dist/esm/components/circle-icon/circle-icon.js +8 -0
- package/dist/esm/components/circle-icon/circle-icon.js.map +1 -0
- package/dist/esm/components/circle-icon/circle-icon.module.css +32 -0
- package/dist/esm/components/circle-icon/index.js +9 -0
- package/dist/esm/components/circle-icon/index.js.map +1 -0
- package/dist/esm/components/ton-icon/index.js +9 -0
- package/dist/esm/components/ton-icon/index.js.map +1 -0
- package/dist/esm/components/ton-icon/ton-icon.js +8 -0
- package/dist/esm/components/ton-icon/ton-icon.js.map +1 -0
- package/dist/esm/features/balances/components/balance-badge/balance-badge.js +33 -0
- package/dist/esm/features/balances/components/balance-badge/balance-badge.js.map +1 -0
- package/dist/{features → esm/features}/balances/components/balance-badge/balance-badge.module.css +3 -1
- package/dist/esm/features/balances/components/balance-badge/index.js +9 -0
- package/dist/esm/features/balances/components/balance-badge/index.js.map +1 -0
- package/dist/esm/features/balances/components/currency-item/currency-item.js +8 -0
- package/dist/esm/features/balances/components/currency-item/currency-item.js.map +1 -0
- package/dist/esm/features/balances/components/currency-item/currency-item.module.css +80 -0
- package/dist/esm/features/balances/components/currency-item/index.js +9 -0
- package/dist/esm/features/balances/components/currency-item/index.js.map +1 -0
- package/dist/esm/features/balances/components/send-jetton-button/index.js +9 -0
- package/dist/esm/features/balances/components/send-jetton-button/index.js.map +1 -0
- package/dist/esm/features/balances/components/send-jetton-button/send-jetton-button.js +43 -0
- package/dist/esm/features/balances/components/send-jetton-button/send-jetton-button.js.map +1 -0
- package/dist/esm/features/balances/components/send-ton-button/index.js +9 -0
- package/dist/esm/features/balances/components/send-ton-button/index.js.map +1 -0
- package/dist/esm/features/balances/components/send-ton-button/send-ton-button.js +26 -0
- package/dist/esm/features/balances/components/send-ton-button/send-ton-button.js.map +1 -0
- package/dist/esm/features/balances/hooks/use-balance-by-address.js +18 -0
- package/dist/esm/features/balances/hooks/use-balance-by-address.js.map +1 -0
- package/dist/esm/features/balances/hooks/use-balance.js +17 -0
- package/dist/esm/features/balances/hooks/use-balance.js.map +1 -0
- package/dist/esm/features/balances/index.js +14 -0
- package/dist/esm/features/balances/index.js.map +1 -0
- package/dist/esm/features/jettons/hooks/use-jetton-balance-by-address.js +18 -0
- package/dist/esm/features/jettons/hooks/use-jetton-balance-by-address.js.map +1 -0
- package/dist/esm/features/jettons/hooks/use-jetton-info.js +18 -0
- package/dist/esm/features/jettons/hooks/use-jetton-info.js.map +1 -0
- package/dist/esm/features/jettons/hooks/use-jetton-wallet-address.js +18 -0
- package/dist/esm/features/jettons/hooks/use-jetton-wallet-address.js.map +1 -0
- package/dist/esm/features/jettons/hooks/use-jettons-by-address.js +18 -0
- package/dist/esm/features/jettons/hooks/use-jettons-by-address.js.map +1 -0
- package/dist/esm/features/jettons/hooks/use-jettons.js +17 -0
- package/dist/esm/features/jettons/hooks/use-jettons.js.map +1 -0
- package/dist/esm/features/jettons/hooks/use-transfer-jetton.js +16 -0
- package/dist/esm/features/jettons/hooks/use-transfer-jetton.js.map +1 -0
- package/dist/esm/features/jettons/index.js +14 -0
- package/dist/esm/features/jettons/index.js.map +1 -0
- package/dist/esm/features/network/hooks/use-network.js +17 -0
- package/dist/esm/features/network/hooks/use-network.js.map +1 -0
- package/dist/esm/features/network/hooks/use-networks.js +24 -0
- package/dist/esm/features/network/hooks/use-networks.js.map +1 -0
- package/dist/esm/features/network/index.js +11 -0
- package/dist/esm/features/network/index.js.map +1 -0
- package/dist/esm/features/nft/components/nft-item/index.js +9 -0
- package/dist/esm/features/nft/components/nft-item/index.js.map +1 -0
- package/dist/esm/features/nft/components/nft-item/nft-item.js +15 -0
- package/dist/esm/features/nft/components/nft-item/nft-item.js.map +1 -0
- package/dist/esm/features/nft/components/nft-item/nft-item.module.css +74 -0
- package/dist/esm/features/nft/hooks/use-nft.js +18 -0
- package/dist/esm/features/nft/hooks/use-nft.js.map +1 -0
- package/dist/esm/features/nft/hooks/use-nfts-by-address.js +18 -0
- package/dist/esm/features/nft/hooks/use-nfts-by-address.js.map +1 -0
- package/dist/esm/features/nft/hooks/use-nfts.js +17 -0
- package/dist/esm/features/nft/hooks/use-nfts.js.map +1 -0
- package/dist/esm/features/nft/hooks/use-transfer-nft.js +16 -0
- package/dist/esm/features/nft/hooks/use-transfer-nft.js.map +1 -0
- package/dist/esm/features/nft/index.js +13 -0
- package/dist/esm/features/nft/index.js.map +1 -0
- package/dist/esm/features/signing/hooks/use-sign-binary.js +27 -0
- package/dist/esm/features/signing/hooks/use-sign-binary.js.map +1 -0
- package/dist/esm/features/signing/hooks/use-sign-cell.js +28 -0
- package/dist/esm/features/signing/hooks/use-sign-cell.js.map +1 -0
- package/dist/esm/features/signing/hooks/use-sign-text.js +27 -0
- package/dist/esm/features/signing/hooks/use-sign-text.js.map +1 -0
- package/dist/esm/features/signing/index.js +11 -0
- package/dist/esm/features/signing/index.js.map +1 -0
- package/dist/esm/features/swap/hooks/use-build-swap-transaction.js +16 -0
- package/dist/esm/features/swap/hooks/use-build-swap-transaction.js.map +1 -0
- package/dist/esm/features/swap/hooks/use-swap-quote.js +16 -0
- package/dist/esm/features/swap/hooks/use-swap-quote.js.map +1 -0
- package/dist/esm/features/swap/index.js +10 -0
- package/dist/esm/features/swap/index.js.map +1 -0
- package/dist/esm/features/transaction/components/transaction/index.js +9 -0
- package/dist/esm/features/transaction/components/transaction/index.js.map +1 -0
- package/dist/esm/features/transaction/components/transaction/transaction.js +41 -0
- package/dist/esm/features/transaction/components/transaction/transaction.js.map +1 -0
- package/dist/esm/features/transaction/components/transaction-progress/index.js +10 -0
- package/dist/esm/features/transaction/components/transaction-progress/index.js.map +1 -0
- package/dist/esm/features/transaction/components/transaction-progress/transaction-progress-icons.js +14 -0
- package/dist/esm/features/transaction/components/transaction-progress/transaction-progress-icons.js.map +1 -0
- package/dist/esm/features/transaction/components/transaction-progress/transaction-progress-provider.js +42 -0
- package/dist/esm/features/transaction/components/transaction-progress/transaction-progress-provider.js.map +1 -0
- package/dist/esm/features/transaction/components/transaction-progress/transaction-progress.js +44 -0
- package/dist/esm/features/transaction/components/transaction-progress/transaction-progress.js.map +1 -0
- package/dist/esm/features/transaction/components/transaction-progress/transaction-progress.module.css +44 -0
- package/dist/esm/features/transaction/components/transaction-provider/index.js +9 -0
- package/dist/esm/features/transaction/components/transaction-provider/index.js.map +1 -0
- package/dist/esm/features/transaction/components/transaction-provider/transaction-provider.js +64 -0
- package/dist/esm/features/transaction/components/transaction-provider/transaction-provider.js.map +1 -0
- package/dist/esm/features/transaction/hooks/use-send-transaction.js +16 -0
- package/dist/esm/features/transaction/hooks/use-send-transaction.js.map +1 -0
- package/dist/esm/features/transaction/hooks/use-transaction-status.js +35 -0
- package/dist/esm/features/transaction/hooks/use-transaction-status.js.map +1 -0
- package/dist/esm/features/transaction/hooks/use-transfer-ton.js +16 -0
- package/dist/esm/features/transaction/hooks/use-transfer-ton.js.map +1 -0
- package/dist/esm/features/transaction/index.js +13 -0
- package/dist/esm/features/transaction/index.js.map +1 -0
- package/dist/esm/features/wallets/components/connect-button/index.js +9 -0
- package/dist/esm/features/wallets/components/connect-button/index.js.map +1 -0
- package/dist/esm/features/wallets/hooks/use-address.js +17 -0
- package/dist/esm/features/wallets/hooks/use-address.js.map +1 -0
- package/dist/esm/features/wallets/hooks/use-connect.js +15 -0
- package/dist/esm/features/wallets/hooks/use-connect.js.map +1 -0
- package/dist/esm/features/wallets/hooks/use-connected-wallets.js +21 -0
- package/dist/esm/features/wallets/hooks/use-connected-wallets.js.map +1 -0
- package/dist/esm/features/wallets/hooks/use-connector-by-id.js +21 -0
- package/dist/esm/features/wallets/hooks/use-connector-by-id.js.map +1 -0
- package/dist/esm/features/wallets/hooks/use-connectors.js +21 -0
- package/dist/esm/features/wallets/hooks/use-connectors.js.map +1 -0
- package/dist/esm/features/wallets/hooks/use-disconnect.js +16 -0
- package/dist/esm/features/wallets/hooks/use-disconnect.js.map +1 -0
- package/dist/esm/features/wallets/hooks/use-selected-wallet.js +28 -0
- package/dist/esm/features/wallets/hooks/use-selected-wallet.js.map +1 -0
- package/dist/esm/features/wallets/index.js +16 -0
- package/dist/esm/features/wallets/index.js.map +1 -0
- package/dist/esm/hooks/use-app-kit-theme.js +17 -0
- package/dist/esm/hooks/use-app-kit-theme.js.map +1 -0
- package/dist/esm/hooks/use-app-kit.js +17 -0
- package/dist/esm/hooks/use-app-kit.js.map +1 -0
- package/dist/esm/hooks/use-i18n.js +17 -0
- package/dist/esm/hooks/use-i18n.js.map +1 -0
- package/dist/esm/index.js +26 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/libs/i18n.js +14 -0
- package/dist/esm/libs/i18n.js.map +1 -0
- package/dist/esm/libs/query.js +18 -0
- package/dist/esm/libs/query.js.map +1 -0
- package/dist/esm/locales/en.js +37 -0
- package/dist/esm/locales/en.js.map +1 -0
- package/dist/esm/providers/app-kit-provider.js +9 -0
- package/dist/esm/providers/app-kit-provider.js.map +1 -0
- package/dist/esm/providers/i18n-provider.js +51 -0
- package/dist/esm/providers/i18n-provider.js.map +1 -0
- package/dist/{styles → esm/styles}/index.css +27 -11
- package/dist/{styles → esm/styles}/typography.module.css +14 -1
- package/dist/esm/tonconnect/tonconnect-bridge.js +27 -0
- package/dist/esm/tonconnect/tonconnect-bridge.js.map +1 -0
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/components/block/block.d.ts.map +1 -0
- package/dist/types/components/block/index.d.ts.map +1 -0
- package/dist/types/components/button/button.d.ts.map +1 -0
- package/dist/types/components/button/index.d.ts.map +1 -0
- package/dist/types/components/circle-icon/circle-icon.d.ts.map +1 -0
- package/dist/types/components/circle-icon/index.d.ts.map +1 -0
- package/dist/types/components/ton-icon/index.d.ts.map +1 -0
- package/dist/types/components/ton-icon/ton-icon.d.ts.map +1 -0
- package/dist/types/features/balances/components/balance-badge/balance-badge.d.ts.map +1 -0
- package/dist/types/features/balances/components/balance-badge/index.d.ts.map +1 -0
- package/dist/types/features/balances/components/currency-item/currency-item.d.ts.map +1 -0
- package/dist/types/features/balances/components/currency-item/index.d.ts.map +1 -0
- package/dist/types/features/balances/components/send-jetton-button/index.d.ts.map +1 -0
- package/dist/types/features/balances/components/send-jetton-button/send-jetton-button.d.ts.map +1 -0
- package/dist/types/features/balances/components/send-ton-button/index.d.ts.map +1 -0
- package/dist/types/features/balances/components/send-ton-button/send-ton-button.d.ts.map +1 -0
- package/dist/types/features/balances/hooks/use-balance-by-address.d.ts.map +1 -0
- package/dist/types/features/balances/hooks/use-balance.d.ts.map +1 -0
- package/dist/types/features/balances/index.d.ts.map +1 -0
- package/dist/types/features/jettons/hooks/use-jetton-balance-by-address.d.ts.map +1 -0
- package/dist/types/features/jettons/hooks/use-jetton-info.d.ts.map +1 -0
- package/dist/types/features/jettons/hooks/use-jetton-wallet-address.d.ts.map +1 -0
- package/dist/types/features/jettons/hooks/use-jettons-by-address.d.ts.map +1 -0
- package/dist/types/features/jettons/hooks/use-jettons.d.ts.map +1 -0
- package/dist/types/features/jettons/hooks/use-transfer-jetton.d.ts.map +1 -0
- package/dist/types/features/jettons/index.d.ts.map +1 -0
- package/dist/types/features/network/hooks/use-network.d.ts.map +1 -0
- package/dist/types/features/network/hooks/use-networks.d.ts.map +1 -0
- package/dist/types/features/network/index.d.ts.map +1 -0
- package/dist/types/features/nft/components/nft-item/index.d.ts.map +1 -0
- package/dist/types/features/nft/components/nft-item/nft-item.d.ts.map +1 -0
- package/dist/types/features/nft/hooks/use-nft.d.ts.map +1 -0
- package/dist/types/features/nft/hooks/use-nfts-by-address.d.ts.map +1 -0
- package/dist/types/features/nft/hooks/use-nfts.d.ts.map +1 -0
- package/dist/types/features/nft/hooks/use-transfer-nft.d.ts.map +1 -0
- package/dist/types/features/nft/index.d.ts.map +1 -0
- package/dist/types/features/signing/hooks/use-sign-binary.d.ts.map +1 -0
- package/dist/types/features/signing/hooks/use-sign-cell.d.ts.map +1 -0
- package/dist/types/features/signing/hooks/use-sign-text.d.ts.map +1 -0
- package/dist/types/features/signing/index.d.ts.map +1 -0
- package/dist/types/features/swap/hooks/use-build-swap-transaction.d.ts.map +1 -0
- package/dist/types/features/swap/hooks/use-swap-quote.d.ts.map +1 -0
- package/dist/types/features/swap/index.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction/index.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction/transaction.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction-progress/index.d.ts +10 -0
- package/dist/types/features/transaction/components/transaction-progress/index.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction-progress/transaction-progress-icons.d.ts +15 -0
- package/dist/types/features/transaction/components/transaction-progress/transaction-progress-icons.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction-progress/transaction-progress-provider.d.ts +23 -0
- package/dist/types/features/transaction/components/transaction-progress/transaction-progress-provider.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction-progress/transaction-progress.d.ts +32 -0
- package/dist/types/features/transaction/components/transaction-progress/transaction-progress.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction-provider/index.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction-provider/transaction-provider.d.ts.map +1 -0
- package/dist/types/features/transaction/hooks/use-send-transaction.d.ts.map +1 -0
- package/dist/types/features/transaction/hooks/use-transaction-status.d.ts +33 -0
- package/dist/types/features/transaction/hooks/use-transaction-status.d.ts.map +1 -0
- package/dist/types/features/transaction/hooks/use-transfer-ton.d.ts.map +1 -0
- package/dist/types/features/transaction/index.d.ts +13 -0
- package/dist/types/features/transaction/index.d.ts.map +1 -0
- package/dist/types/features/wallets/components/connect-button/index.d.ts.map +1 -0
- package/dist/types/features/wallets/hooks/use-address.d.ts.map +1 -0
- package/dist/types/features/wallets/hooks/use-connect.d.ts.map +1 -0
- package/dist/types/features/wallets/hooks/use-connected-wallets.d.ts.map +1 -0
- package/dist/types/features/wallets/hooks/use-connector-by-id.d.ts.map +1 -0
- package/dist/types/features/wallets/hooks/use-connectors.d.ts.map +1 -0
- package/dist/types/features/wallets/hooks/use-disconnect.d.ts.map +1 -0
- package/dist/types/features/wallets/hooks/use-selected-wallet.d.ts.map +1 -0
- package/dist/types/features/wallets/index.d.ts.map +1 -0
- package/dist/types/hooks/use-app-kit-theme.d.ts.map +1 -0
- package/dist/types/hooks/use-app-kit.d.ts.map +1 -0
- package/dist/types/hooks/use-i18n.d.ts.map +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/{libs → types/libs}/i18n.d.ts +5 -0
- package/dist/types/libs/i18n.d.ts.map +1 -0
- package/dist/types/libs/query.d.ts.map +1 -0
- package/dist/{locales → types/locales}/en.d.ts +5 -0
- package/dist/types/locales/en.d.ts.map +1 -0
- package/dist/types/providers/app-kit-provider.d.ts.map +1 -0
- package/dist/types/providers/i18n-provider.d.ts.map +1 -0
- package/dist/types/tonconnect/tonconnect-bridge.d.ts.map +1 -0
- package/package.json +28 -14
- package/src/components/block/block.tsx +20 -0
- package/src/components/block/index.ts +9 -0
- package/src/components/button/button.tsx +16 -0
- package/src/components/button/index.ts +9 -0
- package/src/components/circle-icon/circle-icon.tsx +34 -0
- package/src/components/circle-icon/index.ts +9 -0
- package/src/components/ton-icon/index.ts +9 -0
- package/src/components/ton-icon/ton-icon.tsx +46 -0
- package/src/features/balances/components/balance-badge/balance-badge.tsx +47 -0
- package/src/features/balances/components/balance-badge/index.ts +9 -0
- package/src/features/balances/components/currency-item/currency-item.tsx +59 -0
- package/src/features/balances/components/currency-item/index.ts +9 -0
- package/src/features/balances/components/send-jetton-button/index.ts +9 -0
- package/src/features/balances/components/send-jetton-button/send-jetton-button.tsx +76 -0
- package/src/features/balances/components/send-ton-button/index.ts +9 -0
- package/src/features/balances/components/send-ton-button/send-ton-button.tsx +44 -0
- package/src/features/balances/hooks/use-balance-by-address.ts +33 -0
- package/src/features/balances/hooks/use-balance.ts +28 -0
- package/{dist/features/balances/index.mjs → src/features/balances/index.ts} +9 -2
- package/src/features/jettons/hooks/use-jetton-balance-by-address.ts +37 -0
- package/src/features/jettons/hooks/use-jetton-info.ts +32 -0
- package/src/features/jettons/hooks/use-jetton-wallet-address.ts +37 -0
- package/src/features/jettons/hooks/use-jettons-by-address.ts +33 -0
- package/src/features/jettons/hooks/use-jettons.ts +28 -0
- package/src/features/jettons/hooks/use-transfer-jetton.ts +44 -0
- package/{dist/features/jettons/index.mjs → src/features/jettons/index.ts} +8 -2
- package/src/features/network/hooks/use-network.ts +23 -0
- package/src/features/network/hooks/use-networks.ts +35 -0
- package/src/features/network/index.ts +11 -0
- package/src/features/nft/components/nft-item/index.ts +9 -0
- package/src/features/nft/components/nft-item/nft-item.tsx +57 -0
- package/src/features/nft/hooks/use-nft.ts +29 -0
- package/src/features/nft/hooks/use-nfts-by-address.ts +29 -0
- package/src/features/nft/hooks/use-nfts.ts +28 -0
- package/src/features/nft/hooks/use-transfer-nft.ts +44 -0
- package/{dist/features/nft/index.mjs → src/features/nft/index.ts} +9 -2
- package/src/features/signing/hooks/use-sign-binary.ts +43 -0
- package/src/features/signing/hooks/use-sign-cell.ts +44 -0
- package/src/features/signing/hooks/use-sign-text.ts +43 -0
- package/src/features/signing/index.ts +11 -0
- package/src/features/swap/hooks/use-build-swap-transaction.ts +38 -0
- package/src/features/swap/hooks/use-swap-quote.ts +31 -0
- package/src/features/swap/index.ts +10 -0
- package/src/features/transaction/components/transaction/index.ts +10 -0
- package/src/features/transaction/components/transaction/transaction.tsx +105 -0
- package/src/features/transaction/components/transaction-progress/index.ts +10 -0
- package/src/features/transaction/components/transaction-progress/transaction-progress-icons.tsx +80 -0
- package/src/features/transaction/components/transaction-progress/transaction-progress-provider.tsx +60 -0
- package/src/features/transaction/components/transaction-progress/transaction-progress.tsx +97 -0
- package/src/features/transaction/components/transaction-provider/index.ts +10 -0
- package/src/features/transaction/components/transaction-provider/transaction-provider.tsx +114 -0
- package/src/features/transaction/hooks/use-send-transaction.ts +44 -0
- package/src/features/transaction/hooks/use-transaction-status.ts +55 -0
- package/src/features/transaction/hooks/use-transfer-ton.ts +44 -0
- package/{dist/features/transaction/index.d.ts → src/features/transaction/index.ts} +4 -1
- package/src/features/wallets/components/connect-button/index.ts +9 -0
- package/src/features/wallets/hooks/use-address.ts +22 -0
- package/src/features/wallets/hooks/use-connect.ts +37 -0
- package/src/features/wallets/hooks/use-connected-wallets.ts +32 -0
- package/src/features/wallets/hooks/use-connector-by-id.ts +30 -0
- package/src/features/wallets/hooks/use-connectors.ts +32 -0
- package/src/features/wallets/hooks/use-disconnect.ts +39 -0
- package/src/features/wallets/hooks/use-selected-wallet.ts +44 -0
- package/{dist/features/wallets/index.mjs → src/features/wallets/index.ts} +10 -2
- package/src/global.d.ts +12 -0
- package/src/hooks/use-app-kit-theme.ts +22 -0
- package/src/hooks/use-app-kit.ts +21 -0
- package/src/hooks/use-i18n.ts +21 -0
- package/{dist/index.mjs → src/index.ts} +11 -2
- package/src/libs/i18n.ts +20 -0
- package/src/libs/query.ts +69 -0
- package/src/locales/en.ts +40 -0
- package/src/providers/app-kit-provider.tsx +30 -0
- package/src/providers/i18n-provider.tsx +83 -0
- package/src/tonconnect/tonconnect-bridge.tsx +39 -0
- package/dist/components/block/block.d.ts.map +0 -1
- package/dist/components/block/block.js +0 -18
- package/dist/components/block/block.js.map +0 -1
- package/dist/components/block/block.mjs +0 -11
- package/dist/components/block/block.mjs.map +0 -1
- package/dist/components/block/block.module.css.map +0 -1
- package/dist/components/block/block.stories.d.ts +0 -15
- package/dist/components/block/block.stories.d.ts.map +0 -1
- package/dist/components/block/block.stories.js +0 -45
- package/dist/components/block/block.stories.js.map +0 -1
- package/dist/components/block/block.stories.mjs +0 -39
- package/dist/components/block/block.stories.mjs.map +0 -1
- package/dist/components/block/index.d.ts.map +0 -1
- package/dist/components/block/index.js +0 -14
- package/dist/components/block/index.js.map +0 -1
- package/dist/components/block/index.mjs +0 -3
- package/dist/components/block/index.mjs.map +0 -1
- package/dist/components/button/button.d.ts.map +0 -1
- package/dist/components/button/button.js +0 -18
- package/dist/components/button/button.js.map +0 -1
- package/dist/components/button/button.mjs +0 -11
- package/dist/components/button/button.mjs.map +0 -1
- package/dist/components/button/button.module.css.map +0 -1
- package/dist/components/button/button.stories.d.ts +0 -16
- package/dist/components/button/button.stories.d.ts.map +0 -1
- package/dist/components/button/button.stories.js +0 -53
- package/dist/components/button/button.stories.js.map +0 -1
- package/dist/components/button/button.stories.mjs +0 -46
- package/dist/components/button/button.stories.mjs.map +0 -1
- package/dist/components/button/index.d.ts.map +0 -1
- package/dist/components/button/index.js +0 -12
- package/dist/components/button/index.js.map +0 -1
- package/dist/components/button/index.mjs +0 -3
- package/dist/components/button/index.mjs.map +0 -1
- package/dist/components/circle-icon/circle-icon.d.ts.map +0 -1
- package/dist/components/circle-icon/circle-icon.js +0 -22
- package/dist/components/circle-icon/circle-icon.js.map +0 -1
- package/dist/components/circle-icon/circle-icon.mjs +0 -15
- package/dist/components/circle-icon/circle-icon.mjs.map +0 -1
- package/dist/components/circle-icon/circle-icon.module.css +0 -31
- package/dist/components/circle-icon/circle-icon.module.css.map +0 -1
- package/dist/components/circle-icon/circle-icon.stories.d.ts +0 -18
- package/dist/components/circle-icon/circle-icon.stories.d.ts.map +0 -1
- package/dist/components/circle-icon/circle-icon.stories.js +0 -62
- package/dist/components/circle-icon/circle-icon.stories.js.map +0 -1
- package/dist/components/circle-icon/circle-icon.stories.mjs +0 -53
- package/dist/components/circle-icon/circle-icon.stories.mjs.map +0 -1
- package/dist/components/circle-icon/index.d.ts.map +0 -1
- package/dist/components/circle-icon/index.js +0 -14
- package/dist/components/circle-icon/index.js.map +0 -1
- package/dist/components/circle-icon/index.mjs +0 -3
- package/dist/components/circle-icon/index.mjs.map +0 -1
- package/dist/components/ton-icon/index.d.ts.map +0 -1
- package/dist/components/ton-icon/index.js +0 -16
- package/dist/components/ton-icon/index.js.map +0 -1
- package/dist/components/ton-icon/index.mjs +0 -3
- package/dist/components/ton-icon/index.mjs.map +0 -1
- package/dist/components/ton-icon/ton-icon.d.ts.map +0 -1
- package/dist/components/ton-icon/ton-icon.js +0 -39
- package/dist/components/ton-icon/ton-icon.js.map +0 -1
- package/dist/components/ton-icon/ton-icon.mjs +0 -36
- package/dist/components/ton-icon/ton-icon.mjs.map +0 -1
- package/dist/components/ton-icon/ton-icon.stories.d.ts +0 -20
- package/dist/components/ton-icon/ton-icon.stories.d.ts.map +0 -1
- package/dist/components/ton-icon/ton-icon.stories.js +0 -71
- package/dist/components/ton-icon/ton-icon.stories.js.map +0 -1
- package/dist/components/ton-icon/ton-icon.stories.mjs +0 -60
- package/dist/components/ton-icon/ton-icon.stories.mjs.map +0 -1
- package/dist/features/balances/components/balance-badge/balance-badge.d.ts.map +0 -1
- package/dist/features/balances/components/balance-badge/balance-badge.js +0 -41
- package/dist/features/balances/components/balance-badge/balance-badge.js.map +0 -1
- package/dist/features/balances/components/balance-badge/balance-badge.mjs +0 -34
- package/dist/features/balances/components/balance-badge/balance-badge.mjs.map +0 -1
- package/dist/features/balances/components/balance-badge/balance-badge.module.css.map +0 -1
- package/dist/features/balances/components/balance-badge/balance-badge.stories.d.ts +0 -16
- package/dist/features/balances/components/balance-badge/balance-badge.stories.d.ts.map +0 -1
- package/dist/features/balances/components/balance-badge/balance-badge.stories.js +0 -59
- package/dist/features/balances/components/balance-badge/balance-badge.stories.js.map +0 -1
- package/dist/features/balances/components/balance-badge/balance-badge.stories.mjs +0 -51
- package/dist/features/balances/components/balance-badge/balance-badge.stories.mjs.map +0 -1
- package/dist/features/balances/components/balance-badge/index.d.ts.map +0 -1
- package/dist/features/balances/components/balance-badge/index.js +0 -12
- package/dist/features/balances/components/balance-badge/index.js.map +0 -1
- package/dist/features/balances/components/balance-badge/index.mjs +0 -3
- package/dist/features/balances/components/balance-badge/index.mjs.map +0 -1
- package/dist/features/balances/components/currency-item/currency-item.d.ts.map +0 -1
- package/dist/features/balances/components/currency-item/currency-item.js +0 -44
- package/dist/features/balances/components/currency-item/currency-item.js.map +0 -1
- package/dist/features/balances/components/currency-item/currency-item.mjs +0 -37
- package/dist/features/balances/components/currency-item/currency-item.mjs.map +0 -1
- package/dist/features/balances/components/currency-item/currency-item.module.css +0 -69
- package/dist/features/balances/components/currency-item/currency-item.module.css.map +0 -1
- package/dist/features/balances/components/currency-item/currency-item.stories.d.ts +0 -19
- package/dist/features/balances/components/currency-item/currency-item.stories.d.ts.map +0 -1
- package/dist/features/balances/components/currency-item/currency-item.stories.js +0 -89
- package/dist/features/balances/components/currency-item/currency-item.stories.js.map +0 -1
- package/dist/features/balances/components/currency-item/currency-item.stories.mjs +0 -79
- package/dist/features/balances/components/currency-item/currency-item.stories.mjs.map +0 -1
- package/dist/features/balances/components/currency-item/index.d.ts.map +0 -1
- package/dist/features/balances/components/currency-item/index.js +0 -14
- package/dist/features/balances/components/currency-item/index.js.map +0 -1
- package/dist/features/balances/components/currency-item/index.mjs +0 -3
- package/dist/features/balances/components/currency-item/index.mjs.map +0 -1
- package/dist/features/balances/components/send-jetton-button/index.d.ts.map +0 -1
- package/dist/features/balances/components/send-jetton-button/index.js +0 -14
- package/dist/features/balances/components/send-jetton-button/index.js.map +0 -1
- package/dist/features/balances/components/send-jetton-button/index.mjs +0 -3
- package/dist/features/balances/components/send-jetton-button/index.mjs.map +0 -1
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.d.ts.map +0 -1
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.js +0 -56
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.js.map +0 -1
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.mjs +0 -54
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.mjs.map +0 -1
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.d.ts +0 -22
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.d.ts.map +0 -1
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.js +0 -58
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.js.map +0 -1
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.mjs +0 -49
- package/dist/features/balances/components/send-jetton-button/send-jetton-button.stories.mjs.map +0 -1
- package/dist/features/balances/components/send-ton-button/index.d.ts.map +0 -1
- package/dist/features/balances/components/send-ton-button/index.js +0 -14
- package/dist/features/balances/components/send-ton-button/index.js.map +0 -1
- package/dist/features/balances/components/send-ton-button/index.mjs +0 -3
- package/dist/features/balances/components/send-ton-button/index.mjs.map +0 -1
- package/dist/features/balances/components/send-ton-button/send-ton-button.d.ts.map +0 -1
- package/dist/features/balances/components/send-ton-button/send-ton-button.js +0 -33
- package/dist/features/balances/components/send-ton-button/send-ton-button.js.map +0 -1
- package/dist/features/balances/components/send-ton-button/send-ton-button.mjs +0 -31
- package/dist/features/balances/components/send-ton-button/send-ton-button.mjs.map +0 -1
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.d.ts +0 -21
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.d.ts.map +0 -1
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.js +0 -52
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.js.map +0 -1
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.mjs +0 -44
- package/dist/features/balances/components/send-ton-button/send-ton-button.stories.mjs.map +0 -1
- package/dist/features/balances/hooks/use-balance-by-address.d.ts.map +0 -1
- package/dist/features/balances/hooks/use-balance-by-address.js +0 -14
- package/dist/features/balances/hooks/use-balance-by-address.js.map +0 -1
- package/dist/features/balances/hooks/use-balance-by-address.mjs +0 -12
- package/dist/features/balances/hooks/use-balance-by-address.mjs.map +0 -1
- package/dist/features/balances/hooks/use-balance.d.ts.map +0 -1
- package/dist/features/balances/hooks/use-balance.js +0 -13
- package/dist/features/balances/hooks/use-balance.js.map +0 -1
- package/dist/features/balances/hooks/use-balance.mjs +0 -11
- package/dist/features/balances/hooks/use-balance.mjs.map +0 -1
- package/dist/features/balances/index.d.ts.map +0 -1
- package/dist/features/balances/index.js +0 -49
- package/dist/features/balances/index.js.map +0 -1
- package/dist/features/balances/index.mjs.map +0 -1
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.d.ts.map +0 -1
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.js +0 -14
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.js.map +0 -1
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.mjs +0 -12
- package/dist/features/jettons/hooks/use-jetton-balance-by-address.mjs.map +0 -1
- package/dist/features/jettons/hooks/use-jetton-info.d.ts.map +0 -1
- package/dist/features/jettons/hooks/use-jetton-info.js +0 -14
- package/dist/features/jettons/hooks/use-jetton-info.js.map +0 -1
- package/dist/features/jettons/hooks/use-jetton-info.mjs +0 -12
- package/dist/features/jettons/hooks/use-jetton-info.mjs.map +0 -1
- package/dist/features/jettons/hooks/use-jetton-wallet-address.d.ts.map +0 -1
- package/dist/features/jettons/hooks/use-jetton-wallet-address.js +0 -14
- package/dist/features/jettons/hooks/use-jetton-wallet-address.js.map +0 -1
- package/dist/features/jettons/hooks/use-jetton-wallet-address.mjs +0 -12
- package/dist/features/jettons/hooks/use-jetton-wallet-address.mjs.map +0 -1
- package/dist/features/jettons/hooks/use-jettons-by-address.d.ts.map +0 -1
- package/dist/features/jettons/hooks/use-jettons-by-address.js +0 -14
- package/dist/features/jettons/hooks/use-jettons-by-address.js.map +0 -1
- package/dist/features/jettons/hooks/use-jettons-by-address.mjs +0 -12
- package/dist/features/jettons/hooks/use-jettons-by-address.mjs.map +0 -1
- package/dist/features/jettons/hooks/use-jettons.d.ts.map +0 -1
- package/dist/features/jettons/hooks/use-jettons.js +0 -13
- package/dist/features/jettons/hooks/use-jettons.js.map +0 -1
- package/dist/features/jettons/hooks/use-jettons.mjs +0 -11
- package/dist/features/jettons/hooks/use-jettons.mjs.map +0 -1
- package/dist/features/jettons/hooks/use-transfer-jetton.d.ts.map +0 -1
- package/dist/features/jettons/hooks/use-transfer-jetton.js +0 -14
- package/dist/features/jettons/hooks/use-transfer-jetton.js.map +0 -1
- package/dist/features/jettons/hooks/use-transfer-jetton.mjs +0 -12
- package/dist/features/jettons/hooks/use-transfer-jetton.mjs.map +0 -1
- package/dist/features/jettons/index.d.ts.map +0 -1
- package/dist/features/jettons/index.js +0 -49
- package/dist/features/jettons/index.js.map +0 -1
- package/dist/features/jettons/index.mjs.map +0 -1
- package/dist/features/network/hooks/use-network.d.ts.map +0 -1
- package/dist/features/network/hooks/use-network.js +0 -13
- package/dist/features/network/hooks/use-network.js.map +0 -1
- package/dist/features/network/hooks/use-network.mjs +0 -11
- package/dist/features/network/hooks/use-network.mjs.map +0 -1
- package/dist/features/network/hooks/use-networks.d.ts.map +0 -1
- package/dist/features/network/hooks/use-networks.js +0 -23
- package/dist/features/network/hooks/use-networks.js.map +0 -1
- package/dist/features/network/hooks/use-networks.mjs +0 -21
- package/dist/features/network/hooks/use-networks.mjs.map +0 -1
- package/dist/features/network/index.d.ts.map +0 -1
- package/dist/features/network/index.js +0 -17
- package/dist/features/network/index.js.map +0 -1
- package/dist/features/network/index.mjs +0 -4
- package/dist/features/network/index.mjs.map +0 -1
- package/dist/features/nft/components/nft-item/index.d.ts.map +0 -1
- package/dist/features/nft/components/nft-item/index.js +0 -14
- package/dist/features/nft/components/nft-item/index.js.map +0 -1
- package/dist/features/nft/components/nft-item/index.mjs +0 -3
- package/dist/features/nft/components/nft-item/index.mjs.map +0 -1
- package/dist/features/nft/components/nft-item/nft-item.d.ts.map +0 -1
- package/dist/features/nft/components/nft-item/nft-item.js +0 -43
- package/dist/features/nft/components/nft-item/nft-item.js.map +0 -1
- package/dist/features/nft/components/nft-item/nft-item.mjs +0 -36
- package/dist/features/nft/components/nft-item/nft-item.mjs.map +0 -1
- package/dist/features/nft/components/nft-item/nft-item.module.css +0 -65
- package/dist/features/nft/components/nft-item/nft-item.module.css.map +0 -1
- package/dist/features/nft/components/nft-item/nft-item.stories.d.ts +0 -25
- package/dist/features/nft/components/nft-item/nft-item.stories.d.ts.map +0 -1
- package/dist/features/nft/components/nft-item/nft-item.stories.js +0 -124
- package/dist/features/nft/components/nft-item/nft-item.stories.js.map +0 -1
- package/dist/features/nft/components/nft-item/nft-item.stories.mjs +0 -110
- package/dist/features/nft/components/nft-item/nft-item.stories.mjs.map +0 -1
- package/dist/features/nft/hooks/use-nft.d.ts.map +0 -1
- package/dist/features/nft/hooks/use-nft.js +0 -14
- package/dist/features/nft/hooks/use-nft.js.map +0 -1
- package/dist/features/nft/hooks/use-nft.mjs +0 -12
- package/dist/features/nft/hooks/use-nft.mjs.map +0 -1
- package/dist/features/nft/hooks/use-nfts-by-address.d.ts.map +0 -1
- package/dist/features/nft/hooks/use-nfts-by-address.js +0 -14
- package/dist/features/nft/hooks/use-nfts-by-address.js.map +0 -1
- package/dist/features/nft/hooks/use-nfts-by-address.mjs +0 -12
- package/dist/features/nft/hooks/use-nfts-by-address.mjs.map +0 -1
- package/dist/features/nft/hooks/use-nfts.d.ts.map +0 -1
- package/dist/features/nft/hooks/use-nfts.js +0 -13
- package/dist/features/nft/hooks/use-nfts.js.map +0 -1
- package/dist/features/nft/hooks/use-nfts.mjs +0 -11
- package/dist/features/nft/hooks/use-nfts.mjs.map +0 -1
- package/dist/features/nft/hooks/use-transfer-nft.d.ts.map +0 -1
- package/dist/features/nft/hooks/use-transfer-nft.js +0 -14
- package/dist/features/nft/hooks/use-transfer-nft.js.map +0 -1
- package/dist/features/nft/hooks/use-transfer-nft.mjs +0 -12
- package/dist/features/nft/hooks/use-transfer-nft.mjs.map +0 -1
- package/dist/features/nft/index.d.ts.map +0 -1
- package/dist/features/nft/index.js +0 -42
- package/dist/features/nft/index.js.map +0 -1
- package/dist/features/nft/index.mjs.map +0 -1
- package/dist/features/signing/hooks/use-sign-binary.d.ts.map +0 -1
- package/dist/features/signing/hooks/use-sign-binary.js +0 -14
- package/dist/features/signing/hooks/use-sign-binary.js.map +0 -1
- package/dist/features/signing/hooks/use-sign-binary.mjs +0 -12
- package/dist/features/signing/hooks/use-sign-binary.mjs.map +0 -1
- package/dist/features/signing/hooks/use-sign-cell.d.ts.map +0 -1
- package/dist/features/signing/hooks/use-sign-cell.js +0 -14
- package/dist/features/signing/hooks/use-sign-cell.js.map +0 -1
- package/dist/features/signing/hooks/use-sign-cell.mjs +0 -12
- package/dist/features/signing/hooks/use-sign-cell.mjs.map +0 -1
- package/dist/features/signing/hooks/use-sign-text.d.ts.map +0 -1
- package/dist/features/signing/hooks/use-sign-text.js +0 -14
- package/dist/features/signing/hooks/use-sign-text.js.map +0 -1
- package/dist/features/signing/hooks/use-sign-text.mjs +0 -12
- package/dist/features/signing/hooks/use-sign-text.mjs.map +0 -1
- package/dist/features/signing/index.d.ts.map +0 -1
- package/dist/features/signing/index.js +0 -28
- package/dist/features/signing/index.js.map +0 -1
- package/dist/features/signing/index.mjs +0 -5
- package/dist/features/signing/index.mjs.map +0 -1
- package/dist/features/swap/hooks/use-build-swap-transaction.d.ts.map +0 -1
- package/dist/features/swap/hooks/use-build-swap-transaction.js +0 -14
- package/dist/features/swap/hooks/use-build-swap-transaction.js.map +0 -1
- package/dist/features/swap/hooks/use-build-swap-transaction.mjs +0 -12
- package/dist/features/swap/hooks/use-build-swap-transaction.mjs.map +0 -1
- package/dist/features/swap/hooks/use-swap-quote.d.ts.map +0 -1
- package/dist/features/swap/hooks/use-swap-quote.js +0 -14
- package/dist/features/swap/hooks/use-swap-quote.js.map +0 -1
- package/dist/features/swap/hooks/use-swap-quote.mjs +0 -12
- package/dist/features/swap/hooks/use-swap-quote.mjs.map +0 -1
- package/dist/features/swap/index.d.ts.map +0 -1
- package/dist/features/swap/index.js +0 -21
- package/dist/features/swap/index.js.map +0 -1
- package/dist/features/swap/index.mjs +0 -4
- package/dist/features/swap/index.mjs.map +0 -1
- package/dist/features/transaction/components/transaction/index.d.ts.map +0 -1
- package/dist/features/transaction/components/transaction/index.js +0 -12
- package/dist/features/transaction/components/transaction/index.js.map +0 -1
- package/dist/features/transaction/components/transaction/index.mjs +0 -3
- package/dist/features/transaction/components/transaction/index.mjs.map +0 -1
- package/dist/features/transaction/components/transaction/transaction.d.ts.map +0 -1
- package/dist/features/transaction/components/transaction/transaction.js +0 -49
- package/dist/features/transaction/components/transaction/transaction.js.map +0 -1
- package/dist/features/transaction/components/transaction/transaction.mjs +0 -47
- package/dist/features/transaction/components/transaction/transaction.mjs.map +0 -1
- package/dist/features/transaction/components/transaction/transaction.stories.d.ts +0 -23
- package/dist/features/transaction/components/transaction/transaction.stories.d.ts.map +0 -1
- package/dist/features/transaction/components/transaction/transaction.stories.js +0 -64
- package/dist/features/transaction/components/transaction/transaction.stories.js.map +0 -1
- package/dist/features/transaction/components/transaction/transaction.stories.mjs +0 -54
- package/dist/features/transaction/components/transaction/transaction.stories.mjs.map +0 -1
- package/dist/features/transaction/components/transaction-provider/index.d.ts.map +0 -1
- package/dist/features/transaction/components/transaction-provider/index.js +0 -20
- package/dist/features/transaction/components/transaction-provider/index.js.map +0 -1
- package/dist/features/transaction/components/transaction-provider/index.mjs +0 -3
- package/dist/features/transaction/components/transaction-provider/index.mjs.map +0 -1
- package/dist/features/transaction/components/transaction-provider/transaction-provider.d.ts.map +0 -1
- package/dist/features/transaction/components/transaction-provider/transaction-provider.js +0 -76
- package/dist/features/transaction/components/transaction-provider/transaction-provider.js.map +0 -1
- package/dist/features/transaction/components/transaction-provider/transaction-provider.mjs +0 -72
- package/dist/features/transaction/components/transaction-provider/transaction-provider.mjs.map +0 -1
- package/dist/features/transaction/hooks/use-send-transaction.d.ts.map +0 -1
- package/dist/features/transaction/hooks/use-send-transaction.js +0 -14
- package/dist/features/transaction/hooks/use-send-transaction.js.map +0 -1
- package/dist/features/transaction/hooks/use-send-transaction.mjs +0 -12
- package/dist/features/transaction/hooks/use-send-transaction.mjs.map +0 -1
- package/dist/features/transaction/hooks/use-transfer-ton.d.ts.map +0 -1
- package/dist/features/transaction/hooks/use-transfer-ton.js +0 -14
- package/dist/features/transaction/hooks/use-transfer-ton.js.map +0 -1
- package/dist/features/transaction/hooks/use-transfer-ton.mjs +0 -12
- package/dist/features/transaction/hooks/use-transfer-ton.mjs.map +0 -1
- package/dist/features/transaction/index.d.ts.map +0 -1
- package/dist/features/transaction/index.js +0 -28
- package/dist/features/transaction/index.js.map +0 -1
- package/dist/features/transaction/index.mjs +0 -5
- package/dist/features/transaction/index.mjs.map +0 -1
- package/dist/features/wallets/components/connect-button/index.d.ts.map +0 -1
- package/dist/features/wallets/components/connect-button/index.js +0 -12
- package/dist/features/wallets/components/connect-button/index.js.map +0 -1
- package/dist/features/wallets/components/connect-button/index.mjs +0 -3
- package/dist/features/wallets/components/connect-button/index.mjs.map +0 -1
- package/dist/features/wallets/hooks/use-address.d.ts.map +0 -1
- package/dist/features/wallets/hooks/use-address.js +0 -13
- package/dist/features/wallets/hooks/use-address.js.map +0 -1
- package/dist/features/wallets/hooks/use-address.mjs +0 -11
- package/dist/features/wallets/hooks/use-address.mjs.map +0 -1
- package/dist/features/wallets/hooks/use-connect.d.ts.map +0 -1
- package/dist/features/wallets/hooks/use-connect.js +0 -14
- package/dist/features/wallets/hooks/use-connect.js.map +0 -1
- package/dist/features/wallets/hooks/use-connect.mjs +0 -12
- package/dist/features/wallets/hooks/use-connect.mjs.map +0 -1
- package/dist/features/wallets/hooks/use-connected-wallets.d.ts.map +0 -1
- package/dist/features/wallets/hooks/use-connected-wallets.js +0 -23
- package/dist/features/wallets/hooks/use-connected-wallets.js.map +0 -1
- package/dist/features/wallets/hooks/use-connected-wallets.mjs +0 -21
- package/dist/features/wallets/hooks/use-connected-wallets.mjs.map +0 -1
- package/dist/features/wallets/hooks/use-connector-by-id.d.ts.map +0 -1
- package/dist/features/wallets/hooks/use-connector-by-id.js +0 -23
- package/dist/features/wallets/hooks/use-connector-by-id.js.map +0 -1
- package/dist/features/wallets/hooks/use-connector-by-id.mjs +0 -21
- package/dist/features/wallets/hooks/use-connector-by-id.mjs.map +0 -1
- package/dist/features/wallets/hooks/use-connectors.d.ts.map +0 -1
- package/dist/features/wallets/hooks/use-connectors.js +0 -23
- package/dist/features/wallets/hooks/use-connectors.js.map +0 -1
- package/dist/features/wallets/hooks/use-connectors.mjs +0 -21
- package/dist/features/wallets/hooks/use-connectors.mjs.map +0 -1
- package/dist/features/wallets/hooks/use-disconnect.d.ts.map +0 -1
- package/dist/features/wallets/hooks/use-disconnect.js +0 -14
- package/dist/features/wallets/hooks/use-disconnect.js.map +0 -1
- package/dist/features/wallets/hooks/use-disconnect.mjs +0 -12
- package/dist/features/wallets/hooks/use-disconnect.mjs.map +0 -1
- package/dist/features/wallets/hooks/use-selected-wallet.d.ts.map +0 -1
- package/dist/features/wallets/hooks/use-selected-wallet.js +0 -30
- package/dist/features/wallets/hooks/use-selected-wallet.js.map +0 -1
- package/dist/features/wallets/hooks/use-selected-wallet.mjs +0 -28
- package/dist/features/wallets/hooks/use-selected-wallet.mjs.map +0 -1
- package/dist/features/wallets/index.d.ts.map +0 -1
- package/dist/features/wallets/index.js +0 -63
- package/dist/features/wallets/index.js.map +0 -1
- package/dist/features/wallets/index.mjs.map +0 -1
- package/dist/global.d.js +0 -4
- package/dist/global.d.js.map +0 -1
- package/dist/global.d.mjs +0 -3
- package/dist/global.d.mjs.map +0 -1
- package/dist/hooks/use-app-kit-theme.d.ts.map +0 -1
- package/dist/hooks/use-app-kit-theme.js +0 -16
- package/dist/hooks/use-app-kit-theme.js.map +0 -1
- package/dist/hooks/use-app-kit-theme.mjs +0 -14
- package/dist/hooks/use-app-kit-theme.mjs.map +0 -1
- package/dist/hooks/use-app-kit.d.ts.map +0 -1
- package/dist/hooks/use-app-kit.js +0 -16
- package/dist/hooks/use-app-kit.js.map +0 -1
- package/dist/hooks/use-app-kit.mjs +0 -14
- package/dist/hooks/use-app-kit.mjs.map +0 -1
- package/dist/hooks/use-i18n.d.ts.map +0 -1
- package/dist/hooks/use-i18n.js +0 -16
- package/dist/hooks/use-i18n.js.map +0 -1
- package/dist/hooks/use-i18n.mjs +0 -14
- package/dist/hooks/use-i18n.mjs.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -123
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/libs/i18n.d.ts.map +0 -1
- package/dist/libs/i18n.js +0 -22
- package/dist/libs/i18n.js.map +0 -1
- package/dist/libs/i18n.mjs +0 -11
- package/dist/libs/i18n.mjs.map +0 -1
- package/dist/libs/query.d.ts.map +0 -1
- package/dist/libs/query.js +0 -20
- package/dist/libs/query.js.map +0 -1
- package/dist/libs/query.mjs +0 -15
- package/dist/libs/query.mjs.map +0 -1
- package/dist/locales/en.d.ts.map +0 -1
- package/dist/locales/en.js +0 -30
- package/dist/locales/en.js.map +0 -1
- package/dist/locales/en.mjs +0 -28
- package/dist/locales/en.mjs.map +0 -1
- package/dist/providers/app-kit-provider.d.ts.map +0 -1
- package/dist/providers/app-kit-provider.js +0 -16
- package/dist/providers/app-kit-provider.js.map +0 -1
- package/dist/providers/app-kit-provider.mjs +0 -13
- package/dist/providers/app-kit-provider.mjs.map +0 -1
- package/dist/providers/i18n-provider.d.ts.map +0 -1
- package/dist/providers/i18n-provider.js +0 -55
- package/dist/providers/i18n-provider.js.map +0 -1
- package/dist/providers/i18n-provider.mjs +0 -52
- package/dist/providers/i18n-provider.mjs.map +0 -1
- package/dist/styles/index.css.map +0 -1
- package/dist/styles/typography.module.css.map +0 -1
- package/dist/tonconnect/tonconnect-bridge.d.ts.map +0 -1
- package/dist/tonconnect/tonconnect-bridge.js +0 -23
- package/dist/tonconnect/tonconnect-bridge.js.map +0 -1
- package/dist/tonconnect/tonconnect-bridge.mjs +0 -21
- package/dist/tonconnect/tonconnect-bridge.mjs.map +0 -1
- /package/dist/{components → types/components}/block/block.d.ts +0 -0
- /package/dist/{components → types/components}/block/index.d.ts +0 -0
- /package/dist/{components → types/components}/button/button.d.ts +0 -0
- /package/dist/{components → types/components}/button/index.d.ts +0 -0
- /package/dist/{components → types/components}/circle-icon/circle-icon.d.ts +0 -0
- /package/dist/{components → types/components}/circle-icon/index.d.ts +0 -0
- /package/dist/{components → types/components}/ton-icon/index.d.ts +0 -0
- /package/dist/{components → types/components}/ton-icon/ton-icon.d.ts +0 -0
- /package/dist/{features → types/features}/balances/components/balance-badge/balance-badge.d.ts +0 -0
- /package/dist/{features → types/features}/balances/components/balance-badge/index.d.ts +0 -0
- /package/dist/{features → types/features}/balances/components/currency-item/currency-item.d.ts +0 -0
- /package/dist/{features → types/features}/balances/components/currency-item/index.d.ts +0 -0
- /package/dist/{features → types/features}/balances/components/send-jetton-button/index.d.ts +0 -0
- /package/dist/{features → types/features}/balances/components/send-jetton-button/send-jetton-button.d.ts +0 -0
- /package/dist/{features → types/features}/balances/components/send-ton-button/index.d.ts +0 -0
- /package/dist/{features → types/features}/balances/components/send-ton-button/send-ton-button.d.ts +0 -0
- /package/dist/{features → types/features}/balances/hooks/use-balance-by-address.d.ts +0 -0
- /package/dist/{features → types/features}/balances/hooks/use-balance.d.ts +0 -0
- /package/dist/{features → types/features}/balances/index.d.ts +0 -0
- /package/dist/{features → types/features}/jettons/hooks/use-jetton-balance-by-address.d.ts +0 -0
- /package/dist/{features → types/features}/jettons/hooks/use-jetton-info.d.ts +0 -0
- /package/dist/{features → types/features}/jettons/hooks/use-jetton-wallet-address.d.ts +0 -0
- /package/dist/{features → types/features}/jettons/hooks/use-jettons-by-address.d.ts +0 -0
- /package/dist/{features → types/features}/jettons/hooks/use-jettons.d.ts +0 -0
- /package/dist/{features → types/features}/jettons/hooks/use-transfer-jetton.d.ts +0 -0
- /package/dist/{features → types/features}/jettons/index.d.ts +0 -0
- /package/dist/{features → types/features}/network/hooks/use-network.d.ts +0 -0
- /package/dist/{features → types/features}/network/hooks/use-networks.d.ts +0 -0
- /package/dist/{features → types/features}/network/index.d.ts +0 -0
- /package/dist/{features → types/features}/nft/components/nft-item/index.d.ts +0 -0
- /package/dist/{features → types/features}/nft/components/nft-item/nft-item.d.ts +0 -0
- /package/dist/{features → types/features}/nft/hooks/use-nft.d.ts +0 -0
- /package/dist/{features → types/features}/nft/hooks/use-nfts-by-address.d.ts +0 -0
- /package/dist/{features → types/features}/nft/hooks/use-nfts.d.ts +0 -0
- /package/dist/{features → types/features}/nft/hooks/use-transfer-nft.d.ts +0 -0
- /package/dist/{features → types/features}/nft/index.d.ts +0 -0
- /package/dist/{features → types/features}/signing/hooks/use-sign-binary.d.ts +0 -0
- /package/dist/{features → types/features}/signing/hooks/use-sign-cell.d.ts +0 -0
- /package/dist/{features → types/features}/signing/hooks/use-sign-text.d.ts +0 -0
- /package/dist/{features → types/features}/signing/index.d.ts +0 -0
- /package/dist/{features → types/features}/swap/hooks/use-build-swap-transaction.d.ts +0 -0
- /package/dist/{features → types/features}/swap/hooks/use-swap-quote.d.ts +0 -0
- /package/dist/{features → types/features}/swap/index.d.ts +0 -0
- /package/dist/{features → types/features}/transaction/components/transaction/index.d.ts +0 -0
- /package/dist/{features → types/features}/transaction/components/transaction/transaction.d.ts +0 -0
- /package/dist/{features → types/features}/transaction/components/transaction-provider/index.d.ts +0 -0
- /package/dist/{features → types/features}/transaction/components/transaction-provider/transaction-provider.d.ts +0 -0
- /package/dist/{features → types/features}/transaction/hooks/use-send-transaction.d.ts +0 -0
- /package/dist/{features → types/features}/transaction/hooks/use-transfer-ton.d.ts +0 -0
- /package/dist/{features → types/features}/wallets/components/connect-button/index.d.ts +0 -0
- /package/dist/{features → types/features}/wallets/hooks/use-address.d.ts +0 -0
- /package/dist/{features → types/features}/wallets/hooks/use-connect.d.ts +0 -0
- /package/dist/{features → types/features}/wallets/hooks/use-connected-wallets.d.ts +0 -0
- /package/dist/{features → types/features}/wallets/hooks/use-connector-by-id.d.ts +0 -0
- /package/dist/{features → types/features}/wallets/hooks/use-connectors.d.ts +0 -0
- /package/dist/{features → types/features}/wallets/hooks/use-disconnect.d.ts +0 -0
- /package/dist/{features → types/features}/wallets/hooks/use-selected-wallet.d.ts +0 -0
- /package/dist/{features → types/features}/wallets/index.d.ts +0 -0
- /package/dist/{hooks → types/hooks}/use-app-kit-theme.d.ts +0 -0
- /package/dist/{hooks → types/hooks}/use-app-kit.d.ts +0 -0
- /package/dist/{hooks → types/hooks}/use-i18n.d.ts +0 -0
- /package/dist/{index.d.ts → types/index.d.ts} +0 -0
- /package/dist/{libs → types/libs}/query.d.ts +0 -0
- /package/dist/{providers → types/providers}/app-kit-provider.d.ts +0 -0
- /package/dist/{providers → types/providers}/i18n-provider.d.ts +0 -0
- /package/dist/{tonconnect → types/tonconnect}/tonconnect-bridge.d.ts +0 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useCallback, useMemo } from 'react';
|
|
10
|
+
import type { FC, ReactNode, ComponentProps } from 'react';
|
|
11
|
+
import type { SendTransactionParameters, SendTransactionReturnType } from '@ton/appkit';
|
|
12
|
+
|
|
13
|
+
import { TransactionProvider, useTransactionContext } from '../transaction-provider';
|
|
14
|
+
import { useI18n } from '../../../../hooks/use-i18n';
|
|
15
|
+
import { Button } from '../../../../components/button';
|
|
16
|
+
|
|
17
|
+
export interface TransactionRenderProps {
|
|
18
|
+
isLoading: boolean;
|
|
19
|
+
onSubmit: () => void;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
text: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type TransactionRequest =
|
|
25
|
+
| SendTransactionParameters
|
|
26
|
+
| Promise<SendTransactionParameters>
|
|
27
|
+
| (() => SendTransactionParameters)
|
|
28
|
+
| (() => Promise<SendTransactionParameters>);
|
|
29
|
+
|
|
30
|
+
export interface TransactionProps extends Omit<ComponentProps<'button'>, 'children' | 'onError'> {
|
|
31
|
+
/** The transaction request parameters */
|
|
32
|
+
request: TransactionRequest;
|
|
33
|
+
/** Callback when an error occurs */
|
|
34
|
+
onError?: (error: Error) => void;
|
|
35
|
+
/** Callback when the transaction is successful */
|
|
36
|
+
onSuccess?: (response: SendTransactionReturnType) => void;
|
|
37
|
+
/** Custom button text */
|
|
38
|
+
text?: ReactNode;
|
|
39
|
+
/** Custom render function */
|
|
40
|
+
children?: (props: TransactionRenderProps) => ReactNode;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
interface TransactionContentProps extends Omit<ComponentProps<'button'>, 'children'> {
|
|
44
|
+
text?: ReactNode;
|
|
45
|
+
children?: (props: TransactionRenderProps) => ReactNode;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const TransactionContent: FC<TransactionContentProps> = ({ text, children, ...props }) => {
|
|
49
|
+
const { isLoading, onSubmit, disabled } = useTransactionContext();
|
|
50
|
+
const { t } = useI18n();
|
|
51
|
+
|
|
52
|
+
const isDisabled = disabled || isLoading;
|
|
53
|
+
|
|
54
|
+
const handleSubmit = useCallback(() => {
|
|
55
|
+
if (!isDisabled) {
|
|
56
|
+
onSubmit();
|
|
57
|
+
}
|
|
58
|
+
}, [isDisabled, onSubmit]);
|
|
59
|
+
|
|
60
|
+
const buttonText = useMemo(() => {
|
|
61
|
+
if (isLoading) {
|
|
62
|
+
return t('transaction.processing');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return text ?? t('transaction.sendTransaction');
|
|
66
|
+
}, [isLoading, text, t]);
|
|
67
|
+
|
|
68
|
+
if (children) {
|
|
69
|
+
return (
|
|
70
|
+
<>
|
|
71
|
+
{children({
|
|
72
|
+
isLoading,
|
|
73
|
+
onSubmit: handleSubmit,
|
|
74
|
+
disabled: isDisabled,
|
|
75
|
+
text: buttonText,
|
|
76
|
+
})}
|
|
77
|
+
</>
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<Button onClick={handleSubmit} disabled={isDisabled} {...props}>
|
|
83
|
+
{buttonText}
|
|
84
|
+
</Button>
|
|
85
|
+
);
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export const Transaction: FC<TransactionProps> = ({
|
|
89
|
+
request,
|
|
90
|
+
children,
|
|
91
|
+
className,
|
|
92
|
+
onError,
|
|
93
|
+
onSuccess,
|
|
94
|
+
disabled = false,
|
|
95
|
+
text,
|
|
96
|
+
...props
|
|
97
|
+
}) => {
|
|
98
|
+
return (
|
|
99
|
+
<TransactionProvider request={request} onError={onError} onSuccess={onSuccess} disabled={disabled}>
|
|
100
|
+
<TransactionContent className={className} text={text} {...props}>
|
|
101
|
+
{children}
|
|
102
|
+
</TransactionContent>
|
|
103
|
+
</TransactionProvider>
|
|
104
|
+
);
|
|
105
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export * from './transaction-progress';
|
|
10
|
+
export * from './transaction-progress-provider';
|
package/src/features/transaction/components/transaction-progress/transaction-progress-icons.tsx
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type { ComponentProps, FC } from 'react';
|
|
10
|
+
import clsx from 'clsx';
|
|
11
|
+
import type { TransactionStatus } from '@ton/appkit';
|
|
12
|
+
|
|
13
|
+
import styles from './transaction-progress.module.css';
|
|
14
|
+
|
|
15
|
+
export interface TransactionProgressIconsProps extends ComponentProps<'svg'> {
|
|
16
|
+
status: TransactionStatus;
|
|
17
|
+
isError: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const SpinnerIcon: FC<ComponentProps<'svg'>> = ({ className }) => (
|
|
21
|
+
<svg
|
|
22
|
+
className={clsx(styles.spinner, className)}
|
|
23
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
24
|
+
width="48"
|
|
25
|
+
height="48"
|
|
26
|
+
viewBox="0 0 24 24"
|
|
27
|
+
fill="none"
|
|
28
|
+
stroke="currentColor"
|
|
29
|
+
strokeWidth="2"
|
|
30
|
+
strokeLinecap="round"
|
|
31
|
+
strokeLinejoin="round"
|
|
32
|
+
>
|
|
33
|
+
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
|
|
34
|
+
</svg>
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
const SuccessIcon: FC<ComponentProps<'svg'>> = ({ className }) => (
|
|
38
|
+
<svg
|
|
39
|
+
className={clsx(styles.success, className)}
|
|
40
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
41
|
+
width="48"
|
|
42
|
+
height="48"
|
|
43
|
+
viewBox="0 0 24 24"
|
|
44
|
+
fill="none"
|
|
45
|
+
stroke="currentColor"
|
|
46
|
+
strokeWidth="2"
|
|
47
|
+
strokeLinecap="round"
|
|
48
|
+
strokeLinejoin="round"
|
|
49
|
+
>
|
|
50
|
+
<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" />
|
|
51
|
+
<polyline points="22 4 12 14.01 9 11.01" />
|
|
52
|
+
</svg>
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const FailedIcon: FC<ComponentProps<'svg'>> = ({ className }) => (
|
|
56
|
+
<svg
|
|
57
|
+
className={clsx(styles.failed, className)}
|
|
58
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
59
|
+
width="48"
|
|
60
|
+
height="48"
|
|
61
|
+
viewBox="0 0 24 24"
|
|
62
|
+
fill="none"
|
|
63
|
+
stroke="currentColor"
|
|
64
|
+
strokeWidth="2"
|
|
65
|
+
strokeLinecap="round"
|
|
66
|
+
strokeLinejoin="round"
|
|
67
|
+
>
|
|
68
|
+
<circle cx="12" cy="12" r="10" />
|
|
69
|
+
<line x1="15" y1="9" x2="9" y2="15" />
|
|
70
|
+
<line x1="9" y1="9" x2="15" y2="15" />
|
|
71
|
+
</svg>
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
export const TransactionProgressIcon: FC<TransactionProgressIconsProps> = ({ status, isError, ...props }) => {
|
|
75
|
+
if (status === 'completed') return <SuccessIcon {...props} />;
|
|
76
|
+
|
|
77
|
+
if (status === 'failed' || isError) return <FailedIcon {...props} />;
|
|
78
|
+
|
|
79
|
+
return <SpinnerIcon {...props} />;
|
|
80
|
+
};
|
package/src/features/transaction/components/transaction-progress/transaction-progress-provider.tsx
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { createContext, useContext } from 'react';
|
|
10
|
+
import type { ReactNode } from 'react';
|
|
11
|
+
import type { GetTransactionStatusReturnType } from '@ton/appkit';
|
|
12
|
+
import type { GetTransactionStatusErrorType } from '@ton/appkit/queries';
|
|
13
|
+
|
|
14
|
+
import { useTransactionStatus } from '../../hooks/use-transaction-status';
|
|
15
|
+
|
|
16
|
+
export interface TransactionProgressContextValue extends GetTransactionStatusReturnType {
|
|
17
|
+
isFetching: boolean;
|
|
18
|
+
error: GetTransactionStatusErrorType | null;
|
|
19
|
+
boc: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const TransactionProgressContext = createContext<TransactionProgressContextValue | undefined>(undefined);
|
|
23
|
+
|
|
24
|
+
export const useTransactionProgressContext = () => {
|
|
25
|
+
const context = useContext(TransactionProgressContext);
|
|
26
|
+
if (!context) {
|
|
27
|
+
throw new Error('useTransactionProgressContext must be used within a TransactionProgressProvider');
|
|
28
|
+
}
|
|
29
|
+
return context;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export interface TransactionProgressProviderProps {
|
|
33
|
+
boc: string;
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export const TransactionProgressProvider = ({ boc, children }: TransactionProgressProviderProps) => {
|
|
38
|
+
const { data, isFetching, error } = useTransactionStatus({
|
|
39
|
+
boc,
|
|
40
|
+
query: {
|
|
41
|
+
refetchInterval: (query) => {
|
|
42
|
+
const status = query.state.data?.status;
|
|
43
|
+
if (status === 'completed' || status === 'failed') return false;
|
|
44
|
+
return 2000;
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const value: TransactionProgressContextValue = {
|
|
50
|
+
status: data?.status ?? 'pending',
|
|
51
|
+
totalMessages: data?.totalMessages ?? 0,
|
|
52
|
+
pendingMessages: data?.pendingMessages ?? 0,
|
|
53
|
+
onchainMessages: data?.onchainMessages ?? 0,
|
|
54
|
+
isFetching,
|
|
55
|
+
error,
|
|
56
|
+
boc,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
return <TransactionProgressContext.Provider value={value}>{children}</TransactionProgressContext.Provider>;
|
|
60
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useMemo } from 'react';
|
|
10
|
+
import type { FC, ReactNode, ComponentProps } from 'react';
|
|
11
|
+
import { clsx } from 'clsx';
|
|
12
|
+
|
|
13
|
+
import { useI18n } from '../../../../hooks/use-i18n';
|
|
14
|
+
import { TransactionProgressProvider, useTransactionProgressContext } from './transaction-progress-provider';
|
|
15
|
+
import type { TransactionProgressContextValue } from './transaction-progress-provider';
|
|
16
|
+
import { TransactionProgressIcon } from './transaction-progress-icons';
|
|
17
|
+
import styles from './transaction-progress.module.css';
|
|
18
|
+
|
|
19
|
+
export interface TransactionProgressTexts {
|
|
20
|
+
pending: string;
|
|
21
|
+
completed: string;
|
|
22
|
+
failed: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface TransactionProgressRenderProps extends TransactionProgressContextValue {
|
|
26
|
+
texts: TransactionProgressTexts;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface TransactionProgressProps extends Omit<ComponentProps<'div'>, 'children'> {
|
|
30
|
+
/** BOC of the transaction to strictly track status */
|
|
31
|
+
boc: string;
|
|
32
|
+
/** Render props function for full control over rendering */
|
|
33
|
+
children?: (props: TransactionProgressRenderProps) => ReactNode;
|
|
34
|
+
/** Allows targeting specific internal elements for styling */
|
|
35
|
+
classNames?: {
|
|
36
|
+
container?: string;
|
|
37
|
+
icon?: string;
|
|
38
|
+
message?: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export const TransactionProgressContent: FC<Omit<TransactionProgressProps, 'boc'>> = ({
|
|
43
|
+
children,
|
|
44
|
+
className,
|
|
45
|
+
classNames = {},
|
|
46
|
+
...props
|
|
47
|
+
}) => {
|
|
48
|
+
const context = useTransactionProgressContext();
|
|
49
|
+
const { status, onchainMessages, totalMessages, error } = context;
|
|
50
|
+
const { t } = useI18n();
|
|
51
|
+
|
|
52
|
+
const texts = useMemo(
|
|
53
|
+
() => ({
|
|
54
|
+
pending: t('transaction.status.pending'),
|
|
55
|
+
completed: t('transaction.status.completed'),
|
|
56
|
+
failed: t('transaction.status.failed'),
|
|
57
|
+
}),
|
|
58
|
+
[t],
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
if (children) {
|
|
62
|
+
return <>{children({ ...context, texts })}</>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const isPending = status === 'pending' && !error;
|
|
66
|
+
const isCompleted = status === 'completed';
|
|
67
|
+
const isFailed = status === 'failed' || !!error;
|
|
68
|
+
|
|
69
|
+
let messageText = texts.pending;
|
|
70
|
+
if (isCompleted) messageText = texts.completed;
|
|
71
|
+
if (isFailed) messageText = texts.failed;
|
|
72
|
+
|
|
73
|
+
let progressText = null;
|
|
74
|
+
if (isPending && totalMessages > 0) {
|
|
75
|
+
progressText = `(${onchainMessages} / ${totalMessages})`;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<div className={clsx(styles.container, className, classNames.container)} {...props}>
|
|
80
|
+
<div className={clsx(styles.iconContainer, classNames.icon)}>
|
|
81
|
+
<TransactionProgressIcon status={status} isError={!!error} />
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div className={clsx(styles.message, classNames.message)}>
|
|
85
|
+
{messageText} {progressText}
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const TransactionProgress: FC<TransactionProgressProps> = ({ boc, ...rest }) => {
|
|
92
|
+
return (
|
|
93
|
+
<TransactionProgressProvider boc={boc}>
|
|
94
|
+
<TransactionProgressContent {...rest} />
|
|
95
|
+
</TransactionProgressProvider>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { TransactionProvider, useTransactionContext, TransactionContext } from './transaction-provider';
|
|
10
|
+
export type { TransactionContextType } from './transaction-provider';
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { createContext, useCallback, useContext, useMemo, useState } from 'react';
|
|
10
|
+
import type { FC, PropsWithChildren } from 'react';
|
|
11
|
+
import type { SendTransactionReturnType } from '@ton/appkit';
|
|
12
|
+
|
|
13
|
+
import { useSendTransaction } from '../../hooks/use-send-transaction';
|
|
14
|
+
import type { TransactionRequest } from '../transaction/transaction';
|
|
15
|
+
|
|
16
|
+
export interface TransactionContextType {
|
|
17
|
+
/** Function to submit the transaction */
|
|
18
|
+
onSubmit: () => void;
|
|
19
|
+
/** Whether the transaction is currently loading */
|
|
20
|
+
isLoading: boolean;
|
|
21
|
+
/** The error object if the transaction failed */
|
|
22
|
+
error?: Error | null;
|
|
23
|
+
/** The receipt of the successful transaction */
|
|
24
|
+
receipt?: SendTransactionReturnType | null;
|
|
25
|
+
/** Disable the button/interaction */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const TransactionContext = createContext<TransactionContextType>({
|
|
30
|
+
onSubmit: () => {
|
|
31
|
+
throw new Error('onSubmit is not defined');
|
|
32
|
+
},
|
|
33
|
+
isLoading: false,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export function useTransactionContext() {
|
|
37
|
+
const context = useContext(TransactionContext);
|
|
38
|
+
|
|
39
|
+
return context;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface TransactionProviderProps extends PropsWithChildren {
|
|
43
|
+
/** The transaction request parameters */
|
|
44
|
+
request: TransactionRequest;
|
|
45
|
+
/** Callback when an error occurs */
|
|
46
|
+
onError?: (error: Error) => void;
|
|
47
|
+
/** Callback when the transaction is successful */
|
|
48
|
+
onSuccess?: (response: SendTransactionReturnType) => void;
|
|
49
|
+
/** Disable the button/interaction */
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export const TransactionProvider: FC<TransactionProviderProps> = ({
|
|
54
|
+
children,
|
|
55
|
+
request,
|
|
56
|
+
onError,
|
|
57
|
+
onSuccess,
|
|
58
|
+
disabled = false,
|
|
59
|
+
}) => {
|
|
60
|
+
const [receipt, setReceipt] = useState<SendTransactionReturnType | null>(null);
|
|
61
|
+
const [isPreparing, setIsPreparing] = useState(false);
|
|
62
|
+
|
|
63
|
+
const {
|
|
64
|
+
mutateAsync: sendTransaction,
|
|
65
|
+
isPending,
|
|
66
|
+
error: mutationError,
|
|
67
|
+
} = useSendTransaction({
|
|
68
|
+
mutation: {
|
|
69
|
+
onSuccess: (data) => {
|
|
70
|
+
setReceipt(data);
|
|
71
|
+
onSuccess?.(data);
|
|
72
|
+
},
|
|
73
|
+
onError: (err) => {
|
|
74
|
+
onError?.(err);
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const handleSubmit = useCallback(async () => {
|
|
80
|
+
if (disabled || isPreparing || isPending) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
setIsPreparing(true);
|
|
85
|
+
|
|
86
|
+
try {
|
|
87
|
+
const transactionRequest = typeof request === 'function' ? await request() : await request;
|
|
88
|
+
|
|
89
|
+
if (!transactionRequest) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
await sendTransaction(transactionRequest);
|
|
94
|
+
} catch (e) {
|
|
95
|
+
const error = e instanceof Error ? e : new Error(String(e));
|
|
96
|
+
onError?.(error);
|
|
97
|
+
} finally {
|
|
98
|
+
setIsPreparing(false);
|
|
99
|
+
}
|
|
100
|
+
}, [sendTransaction, request, disabled, isPreparing, isPending, onError]);
|
|
101
|
+
|
|
102
|
+
const value = useMemo(
|
|
103
|
+
() => ({
|
|
104
|
+
error: mutationError,
|
|
105
|
+
isLoading: isPreparing || isPending,
|
|
106
|
+
onSubmit: handleSubmit,
|
|
107
|
+
receipt,
|
|
108
|
+
disabled,
|
|
109
|
+
}),
|
|
110
|
+
[mutationError, isPreparing, isPending, handleSubmit, receipt, disabled],
|
|
111
|
+
);
|
|
112
|
+
|
|
113
|
+
return <TransactionContext.Provider value={value}>{children}</TransactionContext.Provider>;
|
|
114
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
'use client';
|
|
10
|
+
|
|
11
|
+
import type { MutateFunction, MutateOptions } from '@tanstack/react-query';
|
|
12
|
+
import type {
|
|
13
|
+
SendTransactionData,
|
|
14
|
+
SendTransactionErrorType,
|
|
15
|
+
SendTransactionOptions,
|
|
16
|
+
SendTransactionVariables,
|
|
17
|
+
} from '@ton/appkit/queries';
|
|
18
|
+
import { sendTransactionMutationOptions } from '@ton/appkit/queries';
|
|
19
|
+
|
|
20
|
+
import { useMutation } from '../../../libs/query';
|
|
21
|
+
import type { UseMutationReturnType } from '../../../libs/query';
|
|
22
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
23
|
+
|
|
24
|
+
export type UseSendTransactionParameters<context = unknown> = SendTransactionOptions<context>;
|
|
25
|
+
|
|
26
|
+
export type UseSendTransactionReturnType<context = unknown> = UseMutationReturnType<
|
|
27
|
+
SendTransactionData,
|
|
28
|
+
SendTransactionErrorType,
|
|
29
|
+
SendTransactionVariables,
|
|
30
|
+
context,
|
|
31
|
+
(
|
|
32
|
+
variables: SendTransactionVariables,
|
|
33
|
+
options?: MutateOptions<SendTransactionData, SendTransactionErrorType, SendTransactionVariables, context>,
|
|
34
|
+
) => void,
|
|
35
|
+
MutateFunction<SendTransactionData, SendTransactionErrorType, SendTransactionVariables, context>
|
|
36
|
+
>;
|
|
37
|
+
|
|
38
|
+
export const useSendTransaction = <context = unknown>(
|
|
39
|
+
parameters: UseSendTransactionParameters<context> = {},
|
|
40
|
+
): UseSendTransactionReturnType<context> => {
|
|
41
|
+
const appKit = useAppKit();
|
|
42
|
+
|
|
43
|
+
return useMutation(sendTransactionMutationOptions(appKit, parameters));
|
|
44
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import type {
|
|
10
|
+
GetTransactionStatusData,
|
|
11
|
+
GetTransactionStatusErrorType,
|
|
12
|
+
GetTransactionStatusParameters,
|
|
13
|
+
GetTransactionStatusQueryConfig,
|
|
14
|
+
} from '@ton/appkit/queries';
|
|
15
|
+
import { getTransactionStatusQueryOptions } from '@ton/appkit/queries';
|
|
16
|
+
|
|
17
|
+
import { useQuery } from '../../../libs/query';
|
|
18
|
+
import type { UseQueryReturnType } from '../../../libs/query';
|
|
19
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
20
|
+
|
|
21
|
+
export type UseTransactionStatusParameters<selectData = GetTransactionStatusData> = GetTransactionStatusParameters &
|
|
22
|
+
GetTransactionStatusQueryConfig<selectData>;
|
|
23
|
+
|
|
24
|
+
export type UseTransactionStatusReturnType<selectData = GetTransactionStatusData> = UseQueryReturnType<
|
|
25
|
+
selectData,
|
|
26
|
+
GetTransactionStatusErrorType
|
|
27
|
+
>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Hook to get the status of a transaction trace by BOC.
|
|
31
|
+
*
|
|
32
|
+
* This hook polls the toncenter API to track the progress of a transaction trace.
|
|
33
|
+
* It is useful for tracking complex operations like swaps or multi-step flows.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const { data: status } = useTransactionStatus({
|
|
38
|
+
* boc: 'te6cc...',
|
|
39
|
+
* query: {
|
|
40
|
+
* refetchInterval: 2000, // Poll every 2 seconds
|
|
41
|
+
* }
|
|
42
|
+
* });
|
|
43
|
+
*
|
|
44
|
+
* if (status?.status === 'pending') {
|
|
45
|
+
* console.log(`Progress: ${status.completedMessages}/${status.totalMessages}`);
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export const useTransactionStatus = <selectData = GetTransactionStatusData>(
|
|
50
|
+
parameters: UseTransactionStatusParameters<selectData>,
|
|
51
|
+
): UseTransactionStatusReturnType<selectData> => {
|
|
52
|
+
const appKit = useAppKit();
|
|
53
|
+
|
|
54
|
+
return useQuery(getTransactionStatusQueryOptions(appKit, parameters));
|
|
55
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
'use client';
|
|
10
|
+
|
|
11
|
+
import type { MutateFunction, MutateOptions } from '@tanstack/react-query';
|
|
12
|
+
import type {
|
|
13
|
+
TransferTonData,
|
|
14
|
+
TransferTonErrorType,
|
|
15
|
+
TransferTonOptions,
|
|
16
|
+
TransferTonVariables,
|
|
17
|
+
} from '@ton/appkit/queries';
|
|
18
|
+
import { transferTonMutationOptions } from '@ton/appkit/queries';
|
|
19
|
+
|
|
20
|
+
import { useMutation } from '../../../libs/query';
|
|
21
|
+
import type { UseMutationReturnType } from '../../../libs/query';
|
|
22
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
23
|
+
|
|
24
|
+
export type UseTransferTonParameters<context = unknown> = TransferTonOptions<context>;
|
|
25
|
+
|
|
26
|
+
export type UseTransferTonReturnType<context = unknown> = UseMutationReturnType<
|
|
27
|
+
TransferTonData,
|
|
28
|
+
TransferTonErrorType,
|
|
29
|
+
TransferTonVariables,
|
|
30
|
+
context,
|
|
31
|
+
(
|
|
32
|
+
variables: TransferTonVariables,
|
|
33
|
+
options?: MutateOptions<TransferTonData, TransferTonErrorType, TransferTonVariables, context>,
|
|
34
|
+
) => void,
|
|
35
|
+
MutateFunction<TransferTonData, TransferTonErrorType, TransferTonVariables, context>
|
|
36
|
+
>;
|
|
37
|
+
|
|
38
|
+
export const useTransferTon = <context = unknown>(
|
|
39
|
+
parameters: UseTransferTonParameters<context> = {},
|
|
40
|
+
): UseTransferTonReturnType<context> => {
|
|
41
|
+
const appKit = useAppKit();
|
|
42
|
+
|
|
43
|
+
return useMutation(transferTonMutationOptions(appKit, parameters));
|
|
44
|
+
};
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
+
|
|
8
9
|
export * from './hooks/use-send-transaction';
|
|
9
10
|
export * from './hooks/use-transfer-ton';
|
|
11
|
+
export * from './hooks/use-transaction-status';
|
|
12
|
+
|
|
10
13
|
export * from './components/transaction';
|
|
11
|
-
|
|
14
|
+
export * from './components/transaction-progress';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useMemo } from 'react';
|
|
10
|
+
|
|
11
|
+
import { useSelectedWallet } from './use-selected-wallet';
|
|
12
|
+
|
|
13
|
+
export type UseAddressReturnType = string | undefined;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Hook to get current wallet address
|
|
17
|
+
*/
|
|
18
|
+
export const useAddress = (): UseAddressReturnType => {
|
|
19
|
+
const [wallet] = useSelectedWallet();
|
|
20
|
+
|
|
21
|
+
return useMemo(() => wallet?.getAddress(), [wallet]);
|
|
22
|
+
};
|