@ton/appkit-react 0.0.1-alpha.2 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +211 -1
- package/dist/esm/components/block/block.js +7 -0
- package/dist/esm/components/block/block.js.map +1 -0
- package/dist/esm/components/block/block.module.css +13 -0
- package/dist/esm/components/block/block.stories.js +27 -0
- package/dist/esm/components/block/block.stories.js.map +1 -0
- 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/esm/components/button/button.module.css +38 -0
- package/dist/esm/components/button/button.stories.js +30 -0
- package/dist/esm/components/button/button.stories.js.map +1 -0
- 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/circle-icon.stories.js +56 -0
- package/dist/esm/components/circle-icon/circle-icon.stories.js.map +1 -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/components/ton-icon/ton-icon.stories.js +56 -0
- package/dist/esm/components/ton-icon/ton-icon.stories.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/esm/features/balances/components/balance-badge/balance-badge.module.css +21 -0
- package/dist/esm/features/balances/components/balance-badge/balance-badge.stories.js +23 -0
- package/dist/esm/features/balances/components/balance-badge/balance-badge.stories.js.map +1 -0
- 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/currency-item.stories.js +61 -0
- package/dist/esm/features/balances/components/currency-item/currency-item.stories.js.map +1 -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-jetton-button/send-jetton-button.stories.js +41 -0
- package/dist/esm/features/balances/components/send-jetton-button/send-jetton-button.stories.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/components/send-ton-button/send-ton-button.stories.js +36 -0
- package/dist/esm/features/balances/components/send-ton-button/send-ton-button.stories.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/components/nft-item/nft-item.stories.js +52 -0
- package/dist/esm/features/nft/components/nft-item/nft-item.stories.js.map +1 -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/transaction.stories.js +47 -0
- package/dist/esm/features/transaction/components/transaction/transaction.stories.js.map +1 -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-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 +11 -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 +32 -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/esm/styles/index.css +88 -0
- package/dist/esm/styles/typography.module.css +92 -0
- 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 +13 -0
- package/dist/types/components/block/block.d.ts.map +1 -0
- package/dist/types/components/block/block.stories.d.ts +15 -0
- package/dist/types/components/block/block.stories.d.ts.map +1 -0
- package/dist/types/components/block/index.d.ts +9 -0
- package/dist/types/components/block/index.d.ts.map +1 -0
- package/dist/types/components/button/button.d.ts +10 -0
- package/dist/types/components/button/button.d.ts.map +1 -0
- package/dist/types/components/button/button.stories.d.ts +16 -0
- package/dist/types/components/button/button.stories.d.ts.map +1 -0
- package/dist/types/components/button/index.d.ts +9 -0
- package/dist/types/components/button/index.d.ts.map +1 -0
- package/dist/types/components/circle-icon/circle-icon.d.ts +16 -0
- package/dist/types/components/circle-icon/circle-icon.d.ts.map +1 -0
- package/dist/types/components/circle-icon/circle-icon.stories.d.ts +18 -0
- package/dist/types/components/circle-icon/circle-icon.stories.d.ts.map +1 -0
- package/dist/types/components/circle-icon/index.d.ts +9 -0
- package/dist/types/components/circle-icon/index.d.ts.map +1 -0
- package/dist/types/components/ton-icon/index.d.ts +9 -0
- package/dist/types/components/ton-icon/index.d.ts.map +1 -0
- package/dist/types/components/ton-icon/ton-icon.d.ts +14 -0
- package/dist/types/components/ton-icon/ton-icon.d.ts.map +1 -0
- package/dist/types/components/ton-icon/ton-icon.stories.d.ts +20 -0
- package/dist/types/components/ton-icon/ton-icon.stories.d.ts.map +1 -0
- package/dist/types/features/balances/components/balance-badge/balance-badge.d.ts +21 -0
- package/dist/types/features/balances/components/balance-badge/balance-badge.d.ts.map +1 -0
- package/dist/types/features/balances/components/balance-badge/balance-badge.stories.d.ts +16 -0
- package/dist/types/features/balances/components/balance-badge/balance-badge.stories.d.ts.map +1 -0
- package/dist/types/features/balances/components/balance-badge/index.d.ts +9 -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 +17 -0
- package/dist/types/features/balances/components/currency-item/currency-item.d.ts.map +1 -0
- package/dist/types/features/balances/components/currency-item/currency-item.stories.d.ts +19 -0
- package/dist/types/features/balances/components/currency-item/currency-item.stories.d.ts.map +1 -0
- package/dist/types/features/balances/components/currency-item/index.d.ts +9 -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 +9 -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 +21 -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-jetton-button/send-jetton-button.stories.d.ts +22 -0
- package/dist/types/features/balances/components/send-jetton-button/send-jetton-button.stories.d.ts.map +1 -0
- package/dist/types/features/balances/components/send-ton-button/index.d.ts +9 -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 +16 -0
- package/dist/types/features/balances/components/send-ton-button/send-ton-button.d.ts.map +1 -0
- package/dist/types/features/balances/components/send-ton-button/send-ton-button.stories.d.ts +21 -0
- package/dist/types/features/balances/components/send-ton-button/send-ton-button.stories.d.ts.map +1 -0
- package/dist/types/features/balances/hooks/use-balance-by-address.d.ts +16 -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 +16 -0
- package/dist/types/features/balances/hooks/use-balance.d.ts.map +1 -0
- package/dist/types/features/balances/index.d.ts +14 -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 +16 -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 +16 -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 +16 -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 +16 -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 +16 -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 +14 -0
- package/dist/types/features/jettons/hooks/use-transfer-jetton.d.ts.map +1 -0
- package/dist/types/features/jettons/index.d.ts +14 -0
- package/dist/types/features/jettons/index.d.ts.map +1 -0
- package/dist/types/features/network/hooks/use-network.d.ts +14 -0
- package/dist/types/features/network/hooks/use-network.d.ts.map +1 -0
- package/dist/types/features/network/hooks/use-networks.d.ts +14 -0
- package/dist/types/features/network/hooks/use-networks.d.ts.map +1 -0
- package/dist/types/features/network/index.d.ts +10 -0
- package/dist/types/features/network/index.d.ts.map +1 -0
- package/dist/types/features/nft/components/nft-item/index.d.ts +9 -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 +14 -0
- package/dist/types/features/nft/components/nft-item/nft-item.d.ts.map +1 -0
- package/dist/types/features/nft/components/nft-item/nft-item.stories.d.ts +25 -0
- package/dist/types/features/nft/components/nft-item/nft-item.stories.d.ts.map +1 -0
- package/dist/types/features/nft/hooks/use-nft.d.ts +16 -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 +16 -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 +16 -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 +14 -0
- package/dist/types/features/nft/hooks/use-transfer-nft.d.ts.map +1 -0
- package/dist/types/features/nft/index.d.ts +13 -0
- package/dist/types/features/nft/index.d.ts.map +1 -0
- package/dist/types/features/signing/hooks/use-sign-binary.d.ts +25 -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 +26 -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 +25 -0
- package/dist/types/features/signing/hooks/use-sign-text.d.ts.map +1 -0
- package/dist/types/features/signing/index.d.ts +11 -0
- package/dist/types/features/signing/index.d.ts.map +1 -0
- package/dist/types/features/swap/hooks/use-build-swap-transaction.d.ts +13 -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 +13 -0
- package/dist/types/features/swap/hooks/use-swap-quote.d.ts.map +1 -0
- package/dist/types/features/swap/index.d.ts +10 -0
- package/dist/types/features/swap/index.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction/index.d.ts +10 -0
- package/dist/types/features/transaction/components/transaction/index.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction/transaction.d.ts +30 -0
- package/dist/types/features/transaction/components/transaction/transaction.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction/transaction.stories.d.ts +23 -0
- package/dist/types/features/transaction/components/transaction/transaction.stories.d.ts.map +1 -0
- package/dist/types/features/transaction/components/transaction-provider/index.d.ts +10 -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 +36 -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 +14 -0
- package/dist/types/features/transaction/hooks/use-send-transaction.d.ts.map +1 -0
- package/dist/types/features/transaction/hooks/use-transfer-ton.d.ts +14 -0
- package/dist/types/features/transaction/hooks/use-transfer-ton.d.ts.map +1 -0
- package/dist/types/features/transaction/index.d.ts +11 -0
- package/dist/types/features/transaction/index.d.ts.map +1 -0
- package/dist/types/features/wallets/components/connect-button/index.d.ts +9 -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 +13 -0
- package/dist/types/features/wallets/hooks/use-address.d.ts.map +1 -0
- package/dist/types/features/wallets/hooks/use-connect.d.ts +14 -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 +11 -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 +10 -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 +11 -0
- package/dist/types/features/wallets/hooks/use-connectors.d.ts.map +1 -0
- package/dist/types/features/wallets/hooks/use-disconnect.d.ts +14 -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 +14 -0
- package/dist/types/features/wallets/hooks/use-selected-wallet.d.ts.map +1 -0
- package/dist/types/features/wallets/index.d.ts +16 -0
- package/dist/types/features/wallets/index.d.ts.map +1 -0
- package/dist/types/hooks/use-app-kit-theme.d.ts +10 -0
- package/dist/types/hooks/use-app-kit-theme.d.ts.map +1 -0
- package/dist/types/hooks/use-app-kit.d.ts +9 -0
- package/dist/types/hooks/use-app-kit.d.ts.map +1 -0
- package/dist/types/hooks/use-i18n.d.ts +9 -0
- package/dist/types/hooks/use-i18n.d.ts.map +1 -0
- package/dist/types/index.d.ts +26 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/libs/i18n.d.ts +34 -0
- package/dist/types/libs/i18n.d.ts.map +1 -0
- package/dist/types/libs/query.d.ts +26 -0
- package/dist/types/libs/query.d.ts.map +1 -0
- package/dist/types/locales/en.d.ts +29 -0
- package/dist/types/locales/en.d.ts.map +1 -0
- package/dist/types/providers/app-kit-provider.d.ts +15 -0
- package/dist/types/providers/app-kit-provider.d.ts.map +1 -0
- package/dist/types/providers/i18n-provider.d.ts +22 -0
- package/dist/types/providers/i18n-provider.d.ts.map +1 -0
- package/dist/types/tonconnect/tonconnect-bridge.d.ts +19 -0
- package/dist/types/tonconnect/tonconnect-bridge.d.ts.map +1 -0
- package/package.json +70 -7
- 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/src/features/balances/index.ts +15 -0
- 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/src/features/jettons/index.ts +14 -0
- 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/src/features/nft/index.ts +14 -0
- 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-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-transfer-ton.ts +44 -0
- package/src/features/transaction/index.ts +12 -0
- 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/src/features/wallets/index.ts +18 -0
- 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/src/index.ts +29 -0
- package/src/libs/i18n.ts +20 -0
- package/src/libs/query.ts +69 -0
- package/src/locales/en.ts +35 -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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '../../../../components/button';
|
|
3
|
+
// Create a preview component that doesn't depend on context
|
|
4
|
+
const TransactionButtonPreview = ({ text = 'Send Transaction', isLoading = false, disabled = false, }) => {
|
|
5
|
+
return _jsx(Button, { disabled: disabled || isLoading, children: isLoading ? 'Processing...' : text });
|
|
6
|
+
};
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Public/Features/Transaction/Transaction',
|
|
9
|
+
component: TransactionButtonPreview,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'centered',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
export const Default = {
|
|
17
|
+
args: {
|
|
18
|
+
text: 'Send Transaction',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
export const CustomText = {
|
|
22
|
+
args: {
|
|
23
|
+
text: 'Send 1.5 TON',
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
export const Loading = {
|
|
27
|
+
args: {
|
|
28
|
+
isLoading: true,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
export const Disabled = {
|
|
32
|
+
args: {
|
|
33
|
+
text: 'Send Transaction',
|
|
34
|
+
disabled: true,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export const SendTonButton = {
|
|
38
|
+
args: {
|
|
39
|
+
text: 'Send 10 TON',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
export const SendJettonButton = {
|
|
43
|
+
args: {
|
|
44
|
+
text: 'Send 100 USDT',
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=transaction.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction.stories.js","sourceRoot":"","sources":["../../../../../../src/features/transaction/components/transaction/transaction.stories.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAEvD,4DAA4D;AAC5D,MAAM,wBAAwB,GAAG,CAAC,EAC9B,IAAI,GAAG,kBAAkB,EACzB,SAAS,GAAG,KAAK,EACjB,QAAQ,GAAG,KAAK,GAKnB,EAAE,EAAE;IACD,OAAO,KAAC,MAAM,IAAC,QAAQ,EAAE,QAAQ,IAAI,SAAS,YAAG,SAAS,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,GAAU,CAAC;AAClG,CAAC,CAAC;AAEF,MAAM,IAAI,GAA0C;IAChD,KAAK,EAAE,yCAAyC;IAChD,SAAS,EAAE,wBAAwB;IACnC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;QACR,MAAM,EAAE,UAAU;KACrB;CACJ,CAAC;AAEF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,IAAI,EAAE;QACF,IAAI,EAAE,kBAAkB;KAC3B;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC7B,IAAI,EAAE;QACF,IAAI,EAAE,cAAc;KACvB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC1B,IAAI,EAAE;QACF,SAAS,EAAE,IAAI;KAClB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC3B,IAAI,EAAE;QACF,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,IAAI;KACjB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IAChC,IAAI,EAAE;QACF,IAAI,EAAE,aAAa;KACtB;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACnC,IAAI,EAAE;QACF,IAAI,EAAE,eAAe;KACxB;CACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export { TransactionProvider, useTransactionContext, TransactionContext } from './transaction-provider';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/features/transaction/components/transaction-provider/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) TonTech.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the MIT license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
import { createContext, useCallback, useContext, useMemo, useState } from 'react';
|
|
10
|
+
import { useSendTransaction } from '../../hooks/use-send-transaction';
|
|
11
|
+
export const TransactionContext = createContext({
|
|
12
|
+
onSubmit: () => {
|
|
13
|
+
throw new Error('onSubmit is not defined');
|
|
14
|
+
},
|
|
15
|
+
isLoading: false,
|
|
16
|
+
});
|
|
17
|
+
export function useTransactionContext() {
|
|
18
|
+
const context = useContext(TransactionContext);
|
|
19
|
+
return context;
|
|
20
|
+
}
|
|
21
|
+
export const TransactionProvider = ({ children, request, onError, onSuccess, disabled = false, }) => {
|
|
22
|
+
const [receipt, setReceipt] = useState(null);
|
|
23
|
+
const [isPreparing, setIsPreparing] = useState(false);
|
|
24
|
+
const { mutateAsync: sendTransaction, isPending, error: mutationError, } = useSendTransaction({
|
|
25
|
+
mutation: {
|
|
26
|
+
onSuccess: (data) => {
|
|
27
|
+
setReceipt(data);
|
|
28
|
+
onSuccess?.(data);
|
|
29
|
+
},
|
|
30
|
+
onError: (err) => {
|
|
31
|
+
onError?.(err);
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
const handleSubmit = useCallback(async () => {
|
|
36
|
+
if (disabled || isPreparing || isPending) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
setIsPreparing(true);
|
|
40
|
+
try {
|
|
41
|
+
const transactionRequest = typeof request === 'function' ? await request() : await request;
|
|
42
|
+
if (!transactionRequest) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
await sendTransaction(transactionRequest);
|
|
46
|
+
}
|
|
47
|
+
catch (e) {
|
|
48
|
+
const error = e instanceof Error ? e : new Error(String(e));
|
|
49
|
+
onError?.(error);
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
setIsPreparing(false);
|
|
53
|
+
}
|
|
54
|
+
}, [sendTransaction, request, disabled, isPreparing, isPending, onError]);
|
|
55
|
+
const value = useMemo(() => ({
|
|
56
|
+
error: mutationError,
|
|
57
|
+
isLoading: isPreparing || isPending,
|
|
58
|
+
onSubmit: handleSubmit,
|
|
59
|
+
receipt,
|
|
60
|
+
disabled,
|
|
61
|
+
}), [mutationError, isPreparing, isPending, handleSubmit, receipt, disabled]);
|
|
62
|
+
return _jsx(TransactionContext.Provider, { value: value, children: children });
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=transaction-provider.js.map
|
package/dist/esm/features/transaction/components/transaction-provider/transaction-provider.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-provider.js","sourceRoot":"","sources":["../../../../../../src/features/transaction/components/transaction-provider/transaction-provider.tsx"],"names":[],"mappings":";AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIlF,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAgBtE,MAAM,CAAC,MAAM,kBAAkB,GAAG,aAAa,CAAyB;IACpE,QAAQ,EAAE,GAAG,EAAE;QACX,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC/C,CAAC;IACD,SAAS,EAAE,KAAK;CACnB,CAAC,CAAC;AAEH,MAAM,UAAU,qBAAqB;IACjC,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAAC;IAE/C,OAAO,OAAO,CAAC;AACnB,CAAC;AAaD,MAAM,CAAC,MAAM,mBAAmB,GAAiC,CAAC,EAC9D,QAAQ,EACR,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,GAAG,KAAK,GACnB,EAAE,EAAE;IACD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAmC,IAAI,CAAC,CAAC;IAC/E,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEtD,MAAM,EACF,WAAW,EAAE,eAAe,EAC5B,SAAS,EACT,KAAK,EAAE,aAAa,GACvB,GAAG,kBAAkB,CAAC;QACnB,QAAQ,EAAE;YACN,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;gBAChB,UAAU,CAAC,IAAI,CAAC,CAAC;gBACjB,SAAS,EAAE,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;YACD,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;gBACb,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC;YACnB,CAAC;SACJ;KACJ,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QACxC,IAAI,QAAQ,IAAI,WAAW,IAAI,SAAS,EAAE,CAAC;YACvC,OAAO;QACX,CAAC;QAED,cAAc,CAAC,IAAI,CAAC,CAAC;QAErB,IAAI,CAAC;YACD,MAAM,kBAAkB,GAAG,OAAO,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,MAAM,OAAO,EAAE,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC;YAE3F,IAAI,CAAC,kBAAkB,EAAE,CAAC;gBACtB,OAAO;YACX,CAAC;YAED,MAAM,eAAe,CAAC,kBAAkB,CAAC,CAAC;QAC9C,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,MAAM,KAAK,GAAG,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5D,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;gBAAS,CAAC;YACP,cAAc,CAAC,KAAK,CAAC,CAAC;QAC1B,CAAC;IACL,CAAC,EAAE,CAAC,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC;IAE1E,MAAM,KAAK,GAAG,OAAO,CACjB,GAAG,EAAE,CAAC,CAAC;QACH,KAAK,EAAE,aAAa;QACpB,SAAS,EAAE,WAAW,IAAI,SAAS;QACnC,QAAQ,EAAE,YAAY;QACtB,OAAO;QACP,QAAQ;KACX,CAAC,EACF,CAAC,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,CAAC,CAC3E,CAAC;IAEF,OAAO,KAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAA+B,CAAC;AAC/F,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
'use client';
|
|
9
|
+
import { sendTransactionMutationOptions } from '@ton/appkit/queries';
|
|
10
|
+
import { useMutation } from '../../../libs/query';
|
|
11
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
12
|
+
export const useSendTransaction = (parameters = {}) => {
|
|
13
|
+
const appKit = useAppKit();
|
|
14
|
+
return useMutation(sendTransactionMutationOptions(appKit, parameters));
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=use-send-transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-send-transaction.js","sourceRoot":"","sources":["../../../../../src/features/transaction/hooks/use-send-transaction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,CAAC;AASb,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAgBvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAC9B,aAAoD,EAAE,EACjB,EAAE;IACvC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,WAAW,CAAC,8BAA8B,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AAC3E,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
'use client';
|
|
9
|
+
import { transferTonMutationOptions } from '@ton/appkit/queries';
|
|
10
|
+
import { useMutation } from '../../../libs/query';
|
|
11
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
12
|
+
export const useTransferTon = (parameters = {}) => {
|
|
13
|
+
const appKit = useAppKit();
|
|
14
|
+
return useMutation(transferTonMutationOptions(appKit, parameters));
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=use-transfer-ton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-transfer-ton.js","sourceRoot":"","sources":["../../../../../src/features/transaction/hooks/use-transfer-ton.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,CAAC;AASb,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAgBvD,MAAM,CAAC,MAAM,cAAc,GAAG,CAC1B,aAAgD,EAAE,EACjB,EAAE;IACnC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,WAAW,CAAC,0BAA0B,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AACvE,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
export * from './hooks/use-send-transaction';
|
|
9
|
+
export * from './hooks/use-transfer-ton';
|
|
10
|
+
export * from './components/transaction';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/transaction/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AAEzC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
export { TonConnectButton } from '@tonconnect/ui-react';
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/features/wallets/components/connect-button/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { useMemo } from 'react';
|
|
9
|
+
import { useSelectedWallet } from './use-selected-wallet';
|
|
10
|
+
/**
|
|
11
|
+
* Hook to get current wallet address
|
|
12
|
+
*/
|
|
13
|
+
export const useAddress = () => {
|
|
14
|
+
const [wallet] = useSelectedWallet();
|
|
15
|
+
return useMemo(() => wallet?.getAddress(), [wallet]);
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=use-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-address.js","sourceRoot":"","sources":["../../../../../src/features/wallets/hooks/use-address.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI1D;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,GAAyB,EAAE;IACjD,MAAM,CAAC,MAAM,CAAC,GAAG,iBAAiB,EAAE,CAAC;IAErC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;AACzD,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
import { connectMutationOptions } from '@ton/appkit/queries';
|
|
9
|
+
import { useMutation } from '../../../libs/query';
|
|
10
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
11
|
+
export const useConnect = (parameters = {}) => {
|
|
12
|
+
const appKit = useAppKit();
|
|
13
|
+
return useMutation(connectMutationOptions(appKit, parameters));
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=use-connect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-connect.js","sourceRoot":"","sources":["../../../../../src/features/wallets/hooks/use-connect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAG7D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAgBvD,MAAM,CAAC,MAAM,UAAU,GAAG,CACtB,aAA4C,EAAE,EACjB,EAAE;IAC/B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,WAAW,CAAC,sBAAsB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AACnE,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { useSyncExternalStore, useCallback } from 'react';
|
|
9
|
+
import { getConnectedWallets, watchConnectedWallets } from '@ton/appkit';
|
|
10
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
11
|
+
export const useConnectedWallets = () => {
|
|
12
|
+
const appKit = useAppKit();
|
|
13
|
+
const subscribe = useCallback((onChange) => {
|
|
14
|
+
return watchConnectedWallets(appKit, { onChange });
|
|
15
|
+
}, [appKit]);
|
|
16
|
+
const getSnapshot = useCallback(() => {
|
|
17
|
+
return getConnectedWallets(appKit);
|
|
18
|
+
}, [appKit]);
|
|
19
|
+
return useSyncExternalStore(subscribe, getSnapshot, () => []);
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=use-connected-wallets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-connected-wallets.js","sourceRoot":"","sources":["../../../../../src/features/wallets/hooks/use-connected-wallets.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGzE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAIvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAkC,EAAE;IACnE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,MAAM,SAAS,GAAG,WAAW,CACzB,CAAC,QAAoB,EAAE,EAAE;QACrB,OAAO,qBAAqB,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IACvD,CAAC,EACD,CAAC,MAAM,CAAC,CACX,CAAC;IAEF,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,oBAAoB,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAClE,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { useSyncExternalStore, useCallback } from 'react';
|
|
9
|
+
import { getConnectorById, watchConnectorById } from '@ton/appkit';
|
|
10
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
11
|
+
export const useConnectorById = (id) => {
|
|
12
|
+
const appKit = useAppKit();
|
|
13
|
+
const subscribe = useCallback((onChange) => {
|
|
14
|
+
return watchConnectorById(appKit, { id, onChange });
|
|
15
|
+
}, [appKit, id]);
|
|
16
|
+
const getSnapshot = useCallback(() => {
|
|
17
|
+
return getConnectorById(appKit, { id });
|
|
18
|
+
}, [appKit, id]);
|
|
19
|
+
return useSyncExternalStore(subscribe, getSnapshot, () => undefined);
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=use-connector-by-id.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-connector-by-id.js","sourceRoot":"","sources":["../../../../../src/features/wallets/hooks/use-connector-by-id.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGnE,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAAU,EAAyB,EAAE;IAClE,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,MAAM,SAAS,GAAG,WAAW,CACzB,CAAC,QAAoB,EAAE,EAAE;QACrB,OAAO,kBAAkB,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IACxD,CAAC,EACD,CAAC,MAAM,EAAE,EAAE,CAAC,CACf,CAAC;IAEF,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,OAAO,gBAAgB,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5C,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC;IAEjB,OAAO,oBAAoB,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AACzE,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { useSyncExternalStore, useCallback } from 'react';
|
|
9
|
+
import { getConnectors, watchConnectors } from '@ton/appkit';
|
|
10
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
11
|
+
export const useConnectors = () => {
|
|
12
|
+
const appKit = useAppKit();
|
|
13
|
+
const subscribe = useCallback((onChange) => {
|
|
14
|
+
return watchConnectors(appKit, { onChange });
|
|
15
|
+
}, [appKit]);
|
|
16
|
+
const getSnapshot = useCallback(() => {
|
|
17
|
+
return getConnectors(appKit);
|
|
18
|
+
}, [appKit]);
|
|
19
|
+
return useSyncExternalStore(subscribe, getSnapshot, () => []);
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=use-connectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-connectors.js","sourceRoot":"","sources":["../../../../../src/features/wallets/hooks/use-connectors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG7D,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAIvD,MAAM,CAAC,MAAM,aAAa,GAAG,GAA4B,EAAE;IACvD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,MAAM,SAAS,GAAG,WAAW,CACzB,CAAC,QAAoB,EAAE,EAAE;QACrB,OAAO,eAAe,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IACjD,CAAC,EACD,CAAC,MAAM,CAAC,CACX,CAAC;IAEF,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,oBAAoB,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;AAClE,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
'use client';
|
|
9
|
+
import { disconnectMutationOptions } from '@ton/appkit/queries';
|
|
10
|
+
import { useMutation } from '../../../libs/query';
|
|
11
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
12
|
+
export const useDisconnect = (parameters = {}) => {
|
|
13
|
+
const appKit = useAppKit();
|
|
14
|
+
return useMutation(disconnectMutationOptions(appKit, parameters));
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=use-disconnect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-disconnect.js","sourceRoot":"","sources":["../../../../../src/features/wallets/hooks/use-disconnect.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,CAAC;AAGb,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAgBvD,MAAM,CAAC,MAAM,aAAa,GAAG,CACzB,aAA+C,EAAE,EACjB,EAAE;IAClC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,WAAW,CAAC,yBAAyB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC;AACtE,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
import { useSyncExternalStore, useCallback } from 'react';
|
|
9
|
+
import { getSelectedWallet, watchSelectedWallet, setSelectedWalletId } from '@ton/appkit';
|
|
10
|
+
import { useAppKit } from '../../../hooks/use-app-kit';
|
|
11
|
+
/**
|
|
12
|
+
* Hook to get the currently selected wallet
|
|
13
|
+
*/
|
|
14
|
+
export const useSelectedWallet = () => {
|
|
15
|
+
const appKit = useAppKit();
|
|
16
|
+
const subscribe = useCallback((onChange) => {
|
|
17
|
+
return watchSelectedWallet(appKit, { onChange });
|
|
18
|
+
}, [appKit]);
|
|
19
|
+
const getSnapshot = useCallback(() => {
|
|
20
|
+
return getSelectedWallet(appKit);
|
|
21
|
+
}, [appKit]);
|
|
22
|
+
const wallet = useSyncExternalStore(subscribe, getSnapshot, () => null);
|
|
23
|
+
const setWalletId = useCallback((walletId) => {
|
|
24
|
+
setSelectedWalletId(appKit, { walletId });
|
|
25
|
+
}, [appKit]);
|
|
26
|
+
return [wallet, setWalletId];
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=use-selected-wallet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-selected-wallet.js","sourceRoot":"","sources":["../../../../../src/features/wallets/hooks/use-selected-wallet.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAG1F,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAIvD;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAgC,EAAE;IAC/D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,MAAM,SAAS,GAAG,WAAW,CACzB,CAAC,QAAoB,EAAE,EAAE;QACrB,OAAO,mBAAmB,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrD,CAAC,EACD,CAAC,MAAM,CAAC,CACX,CAAC;IAEF,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,EAAE;QACjC,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,MAAM,MAAM,GAAG,oBAAoB,CAAC,SAAS,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAExE,MAAM,WAAW,GAAG,WAAW,CAC3B,CAAC,QAAuB,EAAE,EAAE;QACxB,mBAAmB,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAC9C,CAAC,EACD,CAAC,MAAM,CAAC,CACX,CAAC;IAEF,OAAO,CAAC,MAAM,EAAE,WAAW,CAAU,CAAC;AAC1C,CAAC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
export * from './components/connect-button';
|
|
9
|
+
export * from './hooks/use-connected-wallets';
|
|
10
|
+
export * from './hooks/use-selected-wallet';
|
|
11
|
+
export * from './hooks/use-address';
|
|
12
|
+
export * from './hooks/use-connect';
|
|
13
|
+
export * from './hooks/use-disconnect';
|
|
14
|
+
export * from './hooks/use-connectors';
|
|
15
|
+
export * from './hooks/use-connector-by-id';
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/features/wallets/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,6BAA6B,CAAC;AAE5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AAEpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { useEffect, useState } from 'react';
|
|
9
|
+
export function useAppKitTheme() {
|
|
10
|
+
const [theme, setTheme] = useState('light');
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const body = document.body;
|
|
13
|
+
body.dataset['taTheme'] = theme;
|
|
14
|
+
}, [theme]);
|
|
15
|
+
return [theme, setTheme];
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=use-app-kit-theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-app-kit-theme.js","sourceRoot":"","sources":["../../../src/hooks/use-app-kit-theme.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,UAAU,cAAc;IAC1B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAc,OAAO,CAAC,CAAC;IAEzD,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;QAC3B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,KAAK,CAAC;IACpC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAU,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { useContext } from 'react';
|
|
9
|
+
import { AppKitContext } from '../providers/app-kit-provider';
|
|
10
|
+
export function useAppKit() {
|
|
11
|
+
const context = useContext(AppKitContext);
|
|
12
|
+
if (!context) {
|
|
13
|
+
throw new Error('useAppKit must be used within an AppKitProvider');
|
|
14
|
+
}
|
|
15
|
+
return context;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=use-app-kit.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-app-kit.js","sourceRoot":"","sources":["../../../src/hooks/use-app-kit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,MAAM,UAAU,SAAS;IACrB,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAE1C,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { useContext } from 'react';
|
|
9
|
+
import { I18nContext } from '../providers/i18n-provider';
|
|
10
|
+
export const useI18n = () => {
|
|
11
|
+
const i18n = useContext(I18nContext);
|
|
12
|
+
if (!i18n) {
|
|
13
|
+
throw new Error('useI18n must be used within an I18nProvider');
|
|
14
|
+
}
|
|
15
|
+
return i18n;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=use-i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-i18n.js","sourceRoot":"","sources":["../../../src/hooks/use-i18n.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,MAAM,CAAC,MAAM,OAAO,GAAG,GAAG,EAAE;IACxB,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IAErC,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACnE,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
export { AppKitProvider } from './providers/app-kit-provider';
|
|
9
|
+
export { useAppKit } from './hooks/use-app-kit';
|
|
10
|
+
export { useAppKitTheme } from './hooks/use-app-kit-theme';
|
|
11
|
+
export { I18nProvider } from './providers/i18n-provider';
|
|
12
|
+
export { useI18n } from './hooks/use-i18n';
|
|
13
|
+
export * from '@ton/appkit';
|
|
14
|
+
export * from './components/block';
|
|
15
|
+
export * from './components/button';
|
|
16
|
+
export * from './components/circle-icon';
|
|
17
|
+
export * from './components/ton-icon';
|
|
18
|
+
export * from './features/balances';
|
|
19
|
+
export * from './features/jettons';
|
|
20
|
+
export * from './features/network';
|
|
21
|
+
export * from './features/nft';
|
|
22
|
+
export * from './features/transaction';
|
|
23
|
+
export * from './features/wallets';
|
|
24
|
+
export * from './features/swap';
|
|
25
|
+
export * from './features/signing';
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,cAAc,aAAa,CAAC;AAE5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AAEtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
import rosetta from 'rosetta';
|
|
9
|
+
import en from '../locales/en';
|
|
10
|
+
export const i18n = rosetta({ en });
|
|
11
|
+
export { en };
|
|
12
|
+
export const defaultLanguage = 'en';
|
|
13
|
+
i18n.locale(defaultLanguage);
|
|
14
|
+
//# sourceMappingURL=i18n.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../../src/libs/i18n.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,MAAM,eAAe,CAAC;AAE/B,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;AACpC,OAAO,EAAE,EAAE,EAAE,CAAC;AACd,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
import { useQuery as tanstack_useQuery, useMutation } from '@tanstack/react-query';
|
|
9
|
+
export { useMutation };
|
|
10
|
+
export function useQuery(parameters) {
|
|
11
|
+
const result = tanstack_useQuery({
|
|
12
|
+
...parameters,
|
|
13
|
+
// queryKeyHashFn: hashFn, // for bigint support
|
|
14
|
+
});
|
|
15
|
+
result.queryKey = parameters.queryKey;
|
|
16
|
+
return result;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/libs/query.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAYnF,OAAO,EAAE,WAAW,EAAE,CAAC;AAoBvB,MAAM,UAAU,QAAQ,CACpB,UAEC;IAED,MAAM,MAAM,GAAG,iBAAiB,CAAC;QAC7B,GAAG,UAAU;QACb,gDAAgD;KACnD,CAAoC,CAAC;IACtC,MAAM,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;IACtC,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
export default {
|
|
9
|
+
// Wallet connection
|
|
10
|
+
wallet: {
|
|
11
|
+
connect: 'Connect',
|
|
12
|
+
disconnect: 'Disconnect',
|
|
13
|
+
connectWallet: 'Connect Wallet',
|
|
14
|
+
noWalletsFound: 'No wallets found',
|
|
15
|
+
},
|
|
16
|
+
// Transaction
|
|
17
|
+
transaction: {
|
|
18
|
+
sendTransaction: 'Send Transaction',
|
|
19
|
+
processing: 'Processing...',
|
|
20
|
+
},
|
|
21
|
+
// Balances
|
|
22
|
+
balances: {
|
|
23
|
+
sendTon: 'Send {{ amount }} TON',
|
|
24
|
+
sendJetton: 'Send {{ amount }} TON',
|
|
25
|
+
sendJettonWithAmount: 'Send {{ amount }} {{ symbol }}',
|
|
26
|
+
},
|
|
27
|
+
// NFT
|
|
28
|
+
nft: {
|
|
29
|
+
onSale: 'On Sale',
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=en.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../../src/locales/en.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAe;IACX,oBAAoB;IACpB,MAAM,EAAE;QACJ,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,YAAY;QACxB,aAAa,EAAE,gBAAgB;QAC/B,cAAc,EAAE,kBAAkB;KACrC;IAED,cAAc;IACd,WAAW,EAAE;QACT,eAAe,EAAE,kBAAkB;QACnC,UAAU,EAAE,eAAe;KAC9B;IAED,WAAW;IACX,QAAQ,EAAE;QACN,OAAO,EAAE,uBAAuB;QAChC,UAAU,EAAE,uBAAuB;QACnC,oBAAoB,EAAE,gCAAgC;KACzD;IAED,MAAM;IACN,GAAG,EAAE;QACD,MAAM,EAAE,SAAS;KACpB;CACK,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { createContext } from 'react';
|
|
3
|
+
import { I18nProvider } from './i18n-provider';
|
|
4
|
+
import { TonConnectBridge } from '../tonconnect/tonconnect-bridge';
|
|
5
|
+
export const AppKitContext = createContext(undefined);
|
|
6
|
+
export function AppKitProvider({ appKit, children }) {
|
|
7
|
+
return (_jsx(AppKitContext.Provider, { value: appKit, children: _jsx(TonConnectBridge, { children: _jsx(I18nProvider, { children: children }) }) }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=app-kit-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-kit-provider.js","sourceRoot":"","sources":["../../../src/providers/app-kit-provider.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAEnE,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAqB,SAAS,CAAC,CAAC;AAM1E,MAAM,UAAU,cAAc,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAuB;IACpE,OAAO,CACH,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,YACjC,KAAC,gBAAgB,cACb,KAAC,YAAY,cAAE,QAAQ,GAAgB,GACxB,GACE,CAC5B,CAAC;AACN,CAAC"}
|