@ton/appkit 0.0.1-alpha.1 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +430 -0
- package/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/README.md +87 -7
- package/dist/actions/balances/get-balance-by-address.cjs +33 -0
- package/dist/actions/balances/get-balance-by-address.cjs.map +1 -0
- package/dist/actions/balances/get-balance-by-address.d.ts +18 -0
- package/dist/actions/balances/get-balance-by-address.d.ts.map +1 -0
- package/dist/actions/balances/get-balance-by-address.js +13 -0
- package/dist/actions/balances/get-balance-by-address.js.map +1 -0
- package/dist/actions/balances/get-balance.cjs +36 -0
- package/dist/actions/balances/get-balance.cjs.map +1 -0
- package/dist/actions/balances/get-balance.d.ts +15 -0
- package/dist/actions/balances/get-balance.d.ts.map +1 -0
- package/dist/actions/balances/get-balance.js +16 -0
- package/dist/actions/balances/get-balance.js.map +1 -0
- package/dist/actions/connectors/add-connector.cjs +27 -0
- package/dist/actions/connectors/add-connector.cjs.map +1 -0
- package/dist/actions/connectors/add-connector.d.ts +16 -0
- package/dist/actions/connectors/add-connector.d.ts.map +1 -0
- package/dist/actions/connectors/add-connector.js +7 -0
- package/dist/actions/connectors/add-connector.js.map +1 -0
- package/dist/actions/connectors/connect.cjs +32 -0
- package/dist/actions/connectors/connect.cjs.map +1 -0
- package/dist/actions/connectors/connect.d.ts +17 -0
- package/dist/actions/connectors/connect.d.ts.map +1 -0
- package/dist/actions/connectors/connect.js +12 -0
- package/dist/actions/connectors/connect.js.map +1 -0
- package/dist/actions/connectors/disconnect.cjs +32 -0
- package/dist/actions/connectors/disconnect.cjs.map +1 -0
- package/dist/actions/connectors/disconnect.d.ts +17 -0
- package/dist/actions/connectors/disconnect.d.ts.map +1 -0
- package/dist/actions/connectors/disconnect.js +12 -0
- package/dist/actions/connectors/disconnect.js.map +1 -0
- package/dist/actions/connectors/get-connector-by-id.cjs +27 -0
- package/dist/actions/connectors/get-connector-by-id.cjs.map +1 -0
- package/dist/actions/connectors/get-connector-by-id.d.ts +18 -0
- package/dist/actions/connectors/get-connector-by-id.d.ts.map +1 -0
- package/dist/actions/connectors/get-connector-by-id.js +7 -0
- package/dist/actions/connectors/get-connector-by-id.js.map +1 -0
- package/dist/actions/connectors/get-connectors.cjs +27 -0
- package/dist/actions/connectors/get-connectors.cjs.map +1 -0
- package/dist/actions/connectors/get-connectors.d.ts +15 -0
- package/dist/actions/connectors/get-connectors.d.ts.map +1 -0
- package/dist/actions/connectors/get-connectors.js +7 -0
- package/dist/actions/connectors/get-connectors.js.map +1 -0
- package/dist/actions/connectors/watch-connector-by-id.cjs +33 -0
- package/dist/actions/connectors/watch-connector-by-id.cjs.map +1 -0
- package/dist/actions/connectors/watch-connector-by-id.d.ts +19 -0
- package/dist/actions/connectors/watch-connector-by-id.d.ts.map +1 -0
- package/dist/actions/connectors/watch-connector-by-id.js +13 -0
- package/dist/actions/connectors/watch-connector-by-id.js.map +1 -0
- package/dist/actions/connectors/watch-connectors.cjs +33 -0
- package/dist/actions/connectors/watch-connectors.cjs.map +1 -0
- package/dist/actions/connectors/watch-connectors.d.ts +18 -0
- package/dist/actions/connectors/watch-connectors.d.ts.map +1 -0
- package/dist/actions/connectors/watch-connectors.js +13 -0
- package/dist/actions/connectors/watch-connectors.js.map +1 -0
- package/dist/actions/index.cjs +101 -0
- package/dist/actions/index.cjs.map +1 -0
- package/dist/actions/index.d.ts +47 -0
- package/dist/actions/index.d.ts.map +1 -0
- package/dist/actions/index.js +115 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/actions/jettons/create-transfer-jetton-transaction.cjs +47 -0
- package/dist/actions/jettons/create-transfer-jetton-transaction.cjs.map +1 -0
- package/dist/actions/jettons/create-transfer-jetton-transaction.d.ts +22 -0
- package/dist/actions/jettons/create-transfer-jetton-transaction.d.ts.map +1 -0
- package/dist/actions/jettons/create-transfer-jetton-transaction.js +33 -0
- package/dist/actions/jettons/create-transfer-jetton-transaction.js.map +1 -0
- package/dist/actions/jettons/get-jetton-balance.cjs +37 -0
- package/dist/actions/jettons/get-jetton-balance.cjs.map +1 -0
- package/dist/actions/jettons/get-jetton-balance.d.ts +19 -0
- package/dist/actions/jettons/get-jetton-balance.d.ts.map +1 -0
- package/dist/actions/jettons/get-jetton-balance.js +17 -0
- package/dist/actions/jettons/get-jetton-balance.js.map +1 -0
- package/dist/actions/jettons/get-jetton-info.cjs +56 -0
- package/dist/actions/jettons/get-jetton-info.cjs.map +1 -0
- package/dist/actions/jettons/get-jetton-info.d.ts +17 -0
- package/dist/actions/jettons/get-jetton-info.d.ts.map +1 -0
- package/dist/actions/jettons/get-jetton-info.js +36 -0
- package/dist/actions/jettons/get-jetton-info.js.map +1 -0
- package/dist/actions/jettons/get-jetton-wallet-address.cjs +30 -0
- package/dist/actions/jettons/get-jetton-wallet-address.cjs.map +1 -0
- package/dist/actions/jettons/get-jetton-wallet-address.d.ts +18 -0
- package/dist/actions/jettons/get-jetton-wallet-address.d.ts.map +1 -0
- package/dist/actions/jettons/get-jetton-wallet-address.js +10 -0
- package/dist/actions/jettons/get-jetton-wallet-address.js.map +1 -0
- package/dist/actions/jettons/get-jettons-by-address.cjs +51 -0
- package/dist/actions/jettons/get-jettons-by-address.cjs.map +1 -0
- package/dist/actions/jettons/get-jettons-by-address.d.ts +20 -0
- package/dist/actions/jettons/get-jettons-by-address.d.ts.map +1 -0
- package/dist/actions/jettons/get-jettons-by-address.js +31 -0
- package/dist/actions/jettons/get-jettons-by-address.js.map +1 -0
- package/dist/actions/jettons/get-jettons.cjs +38 -0
- package/dist/actions/jettons/get-jettons.cjs.map +1 -0
- package/dist/actions/jettons/get-jettons.d.ts +17 -0
- package/dist/actions/jettons/get-jettons.d.ts.map +1 -0
- package/dist/actions/jettons/get-jettons.js +18 -0
- package/dist/actions/jettons/get-jettons.js.map +1 -0
- package/dist/actions/jettons/transfer-jetton.cjs +30 -0
- package/dist/actions/jettons/transfer-jetton.cjs.map +1 -0
- package/dist/actions/jettons/transfer-jetton.d.ts +18 -0
- package/dist/actions/jettons/transfer-jetton.d.ts.map +1 -0
- package/dist/actions/jettons/transfer-jetton.js +10 -0
- package/dist/actions/jettons/transfer-jetton.js.map +1 -0
- package/dist/actions/network/get-network.cjs +29 -0
- package/dist/actions/network/get-network.cjs.map +1 -0
- package/dist/actions/network/get-network.d.ts +15 -0
- package/dist/actions/network/get-network.d.ts.map +1 -0
- package/dist/actions/network/get-network.js +9 -0
- package/dist/actions/network/get-network.js.map +1 -0
- package/dist/actions/network/get-networks.cjs +27 -0
- package/dist/actions/network/get-networks.cjs.map +1 -0
- package/dist/actions/network/get-networks.d.ts +15 -0
- package/dist/actions/network/get-networks.d.ts.map +1 -0
- package/dist/actions/network/get-networks.js +7 -0
- package/dist/actions/network/get-networks.js.map +1 -0
- package/dist/actions/network/watch-networks.cjs +33 -0
- package/dist/actions/network/watch-networks.cjs.map +1 -0
- package/dist/actions/network/watch-networks.d.ts +18 -0
- package/dist/actions/network/watch-networks.d.ts.map +1 -0
- package/dist/actions/network/watch-networks.js +13 -0
- package/dist/actions/network/watch-networks.js.map +1 -0
- package/dist/actions/nft/create-transfer-nft-transaction.cjs +44 -0
- package/dist/actions/nft/create-transfer-nft-transaction.cjs.map +1 -0
- package/dist/actions/nft/create-transfer-nft-transaction.d.ts +21 -0
- package/dist/actions/nft/create-transfer-nft-transaction.d.ts.map +1 -0
- package/dist/actions/nft/create-transfer-nft-transaction.js +24 -0
- package/dist/actions/nft/create-transfer-nft-transaction.js.map +1 -0
- package/dist/actions/nft/get-nft.cjs +32 -0
- package/dist/actions/nft/get-nft.cjs.map +1 -0
- package/dist/actions/nft/get-nft.d.ts +18 -0
- package/dist/actions/nft/get-nft.d.ts.map +1 -0
- package/dist/actions/nft/get-nft.js +12 -0
- package/dist/actions/nft/get-nft.js.map +1 -0
- package/dist/actions/nft/get-nfts-by-address.cjs +37 -0
- package/dist/actions/nft/get-nfts-by-address.cjs.map +1 -0
- package/dist/actions/nft/get-nfts-by-address.d.ts +20 -0
- package/dist/actions/nft/get-nfts-by-address.d.ts.map +1 -0
- package/dist/actions/nft/get-nfts-by-address.js +17 -0
- package/dist/actions/nft/get-nfts-by-address.js.map +1 -0
- package/dist/actions/nft/get-nfts.cjs +38 -0
- package/dist/actions/nft/get-nfts.cjs.map +1 -0
- package/dist/actions/nft/get-nfts.d.ts +17 -0
- package/dist/actions/nft/get-nfts.d.ts.map +1 -0
- package/dist/actions/nft/get-nfts.js +18 -0
- package/dist/actions/nft/get-nfts.js.map +1 -0
- package/dist/actions/nft/transfer-nft.cjs +30 -0
- package/dist/actions/nft/transfer-nft.cjs.map +1 -0
- package/dist/actions/nft/transfer-nft.d.ts +17 -0
- package/dist/actions/nft/transfer-nft.d.ts.map +1 -0
- package/dist/actions/nft/transfer-nft.js +10 -0
- package/dist/actions/nft/transfer-nft.js.map +1 -0
- package/dist/actions/providers/register-provider.cjs +27 -0
- package/dist/actions/providers/register-provider.cjs.map +1 -0
- package/dist/actions/providers/register-provider.d.ts +15 -0
- package/dist/actions/providers/register-provider.d.ts.map +1 -0
- package/dist/actions/providers/register-provider.js +7 -0
- package/dist/actions/providers/register-provider.js.map +1 -0
- package/dist/actions/signing/sign-binary.cjs +38 -0
- package/dist/actions/signing/sign-binary.cjs.map +1 -0
- package/dist/actions/signing/sign-binary.d.ts +29 -0
- package/dist/actions/signing/sign-binary.d.ts.map +1 -0
- package/dist/actions/signing/sign-binary.js +18 -0
- package/dist/actions/signing/sign-binary.js.map +1 -0
- package/dist/actions/signing/sign-cell.cjs +41 -0
- package/dist/actions/signing/sign-cell.cjs.map +1 -0
- package/dist/actions/signing/sign-cell.d.ts +35 -0
- package/dist/actions/signing/sign-cell.d.ts.map +1 -0
- package/dist/actions/signing/sign-cell.js +21 -0
- package/dist/actions/signing/sign-cell.js.map +1 -0
- package/dist/actions/signing/sign-text.cjs +38 -0
- package/dist/actions/signing/sign-text.cjs.map +1 -0
- package/dist/actions/signing/sign-text.d.ts +28 -0
- package/dist/actions/signing/sign-text.d.ts.map +1 -0
- package/dist/actions/signing/sign-text.js +18 -0
- package/dist/actions/signing/sign-text.js.map +1 -0
- package/dist/actions/swap/build-swap-transaction.cjs +27 -0
- package/dist/actions/swap/build-swap-transaction.cjs.map +1 -0
- package/dist/actions/swap/build-swap-transaction.d.ts +17 -0
- package/dist/actions/swap/build-swap-transaction.d.ts.map +1 -0
- package/dist/actions/swap/build-swap-transaction.js +7 -0
- package/dist/actions/swap/build-swap-transaction.js.map +1 -0
- package/dist/actions/swap/get-swap-manager.cjs +27 -0
- package/dist/actions/swap/get-swap-manager.cjs.map +1 -0
- package/dist/actions/swap/get-swap-manager.d.ts +15 -0
- package/dist/actions/swap/get-swap-manager.d.ts.map +1 -0
- package/dist/actions/swap/get-swap-manager.js +7 -0
- package/dist/actions/swap/get-swap-manager.js.map +1 -0
- package/dist/actions/swap/get-swap-quote.cjs +27 -0
- package/dist/actions/swap/get-swap-quote.cjs.map +1 -0
- package/dist/actions/swap/get-swap-quote.d.ts +18 -0
- package/dist/actions/swap/get-swap-quote.d.ts.map +1 -0
- package/dist/actions/swap/get-swap-quote.js +7 -0
- package/dist/actions/swap/get-swap-quote.js.map +1 -0
- package/dist/actions/transaction/create-transfer-ton-transaction.cjs +48 -0
- package/dist/actions/transaction/create-transfer-ton-transaction.cjs.map +1 -0
- package/dist/actions/transaction/create-transfer-ton-transaction.d.ts +27 -0
- package/dist/actions/transaction/create-transfer-ton-transaction.d.ts.map +1 -0
- package/dist/actions/transaction/create-transfer-ton-transaction.js +28 -0
- package/dist/actions/transaction/create-transfer-ton-transaction.js.map +1 -0
- package/dist/actions/transaction/send-transaction.cjs +32 -0
- package/dist/actions/transaction/send-transaction.cjs.map +1 -0
- package/dist/actions/transaction/send-transaction.d.ts +18 -0
- package/dist/actions/transaction/send-transaction.d.ts.map +1 -0
- package/dist/actions/transaction/send-transaction.js +12 -0
- package/dist/actions/transaction/send-transaction.js.map +1 -0
- package/dist/actions/transaction/transfer-ton.cjs +30 -0
- package/dist/actions/transaction/transfer-ton.cjs.map +1 -0
- package/dist/actions/transaction/transfer-ton.d.ts +18 -0
- package/dist/actions/transaction/transfer-ton.d.ts.map +1 -0
- package/dist/actions/transaction/transfer-ton.js +10 -0
- package/dist/actions/transaction/transfer-ton.js.map +1 -0
- package/dist/actions/wallets/get-connected-wallets.cjs +27 -0
- package/dist/actions/wallets/get-connected-wallets.cjs.map +1 -0
- package/dist/actions/wallets/get-connected-wallets.d.ts +15 -0
- package/dist/actions/wallets/get-connected-wallets.d.ts.map +1 -0
- package/dist/actions/wallets/get-connected-wallets.js +7 -0
- package/dist/actions/wallets/get-connected-wallets.js.map +1 -0
- package/dist/actions/wallets/get-selected-wallet.cjs +27 -0
- package/dist/actions/wallets/get-selected-wallet.cjs.map +1 -0
- package/dist/actions/wallets/get-selected-wallet.d.ts +15 -0
- package/dist/actions/wallets/get-selected-wallet.d.ts.map +1 -0
- package/dist/actions/wallets/get-selected-wallet.js +7 -0
- package/dist/actions/wallets/get-selected-wallet.js.map +1 -0
- package/dist/actions/wallets/set-selected-wallet-id.cjs +27 -0
- package/dist/actions/wallets/set-selected-wallet-id.cjs.map +1 -0
- package/dist/actions/wallets/set-selected-wallet-id.d.ts +17 -0
- package/dist/actions/wallets/set-selected-wallet-id.d.ts.map +1 -0
- package/dist/actions/wallets/set-selected-wallet-id.js +7 -0
- package/dist/actions/wallets/set-selected-wallet-id.js.map +1 -0
- package/dist/actions/wallets/watch-connected-wallets.cjs +32 -0
- package/dist/actions/wallets/watch-connected-wallets.cjs.map +1 -0
- package/dist/actions/wallets/watch-connected-wallets.d.ts +18 -0
- package/dist/actions/wallets/watch-connected-wallets.d.ts.map +1 -0
- package/dist/actions/wallets/watch-connected-wallets.js +12 -0
- package/dist/actions/wallets/watch-connected-wallets.js.map +1 -0
- package/dist/actions/wallets/watch-selected-wallet.cjs +34 -0
- package/dist/actions/wallets/watch-selected-wallet.cjs.map +1 -0
- package/dist/actions/wallets/watch-selected-wallet.d.ts +18 -0
- package/dist/actions/wallets/watch-selected-wallet.d.ts.map +1 -0
- package/dist/actions/wallets/watch-selected-wallet.js +14 -0
- package/dist/actions/wallets/watch-selected-wallet.js.map +1 -0
- package/dist/connectors/tonconnect/adapters/ton-connect-wallet-adapter.cjs +129 -0
- package/dist/connectors/tonconnect/adapters/ton-connect-wallet-adapter.cjs.map +1 -0
- package/dist/connectors/tonconnect/adapters/ton-connect-wallet-adapter.d.ts +41 -0
- package/dist/connectors/tonconnect/adapters/ton-connect-wallet-adapter.d.ts.map +1 -0
- package/dist/connectors/tonconnect/adapters/ton-connect-wallet-adapter.js +109 -0
- package/dist/connectors/tonconnect/adapters/ton-connect-wallet-adapter.js.map +1 -0
- package/dist/connectors/tonconnect/connectors/ton-connect-connector.cjs +82 -0
- package/dist/connectors/tonconnect/connectors/ton-connect-connector.cjs.map +1 -0
- package/dist/connectors/tonconnect/connectors/ton-connect-connector.d.ts +33 -0
- package/dist/connectors/tonconnect/connectors/ton-connect-connector.d.ts.map +1 -0
- package/dist/connectors/tonconnect/connectors/ton-connect-connector.js +62 -0
- package/dist/connectors/tonconnect/connectors/ton-connect-connector.js.map +1 -0
- package/dist/connectors/tonconnect/constants/id.cjs +25 -0
- package/dist/connectors/tonconnect/constants/id.cjs.map +1 -0
- package/dist/connectors/tonconnect/constants/id.d.ts +9 -0
- package/dist/connectors/tonconnect/constants/id.d.ts.map +1 -0
- package/dist/connectors/tonconnect/constants/id.js +5 -0
- package/dist/connectors/tonconnect/constants/id.js.map +1 -0
- package/dist/connectors/tonconnect/index.cjs +29 -0
- package/dist/connectors/tonconnect/index.cjs.map +1 -0
- package/dist/connectors/tonconnect/index.d.ts +27 -0
- package/dist/connectors/tonconnect/index.d.ts.map +1 -0
- package/dist/connectors/tonconnect/index.js +9 -0
- package/dist/connectors/tonconnect/index.js.map +1 -0
- package/dist/connectors/tonconnect/utils/transaction.cjs +45 -0
- package/dist/connectors/tonconnect/utils/transaction.cjs.map +1 -0
- package/dist/connectors/tonconnect/utils/transaction.d.ts +31 -0
- package/dist/connectors/tonconnect/utils/transaction.d.ts.map +1 -0
- package/dist/connectors/tonconnect/utils/transaction.js +25 -0
- package/dist/connectors/tonconnect/utils/transaction.js.map +1 -0
- package/dist/core/app-kit/constants/events.cjs +41 -0
- package/dist/core/app-kit/constants/events.cjs.map +1 -0
- package/dist/core/app-kit/constants/events.d.ts +34 -0
- package/dist/core/app-kit/constants/events.d.ts.map +1 -0
- package/dist/core/app-kit/constants/events.js +21 -0
- package/dist/core/app-kit/constants/events.js.map +1 -0
- package/dist/core/app-kit/index.cjs +30 -0
- package/dist/core/app-kit/index.cjs.map +1 -0
- package/dist/core/app-kit/index.d.ts +12 -0
- package/dist/core/app-kit/index.d.ts.map +1 -0
- package/dist/core/app-kit/index.js +10 -0
- package/dist/core/app-kit/index.js.map +1 -0
- package/dist/core/app-kit/services/app-kit-network-manager.cjs +36 -0
- package/dist/core/app-kit/services/app-kit-network-manager.cjs.map +1 -0
- package/dist/core/app-kit/services/app-kit-network-manager.d.ts +16 -0
- package/dist/core/app-kit/services/app-kit-network-manager.d.ts.map +1 -0
- package/dist/core/app-kit/services/app-kit-network-manager.js +16 -0
- package/dist/core/app-kit/services/app-kit-network-manager.js.map +1 -0
- package/dist/core/app-kit/services/app-kit.cjs +104 -0
- package/dist/core/app-kit/services/app-kit.cjs.map +1 -0
- package/dist/core/app-kit/services/app-kit.d.ts +44 -0
- package/dist/core/app-kit/services/app-kit.d.ts.map +1 -0
- package/dist/core/app-kit/services/app-kit.js +84 -0
- package/dist/core/app-kit/services/app-kit.js.map +1 -0
- package/dist/core/app-kit/types/config.cjs +17 -0
- package/dist/core/app-kit/types/config.cjs.map +1 -0
- package/dist/core/app-kit/types/config.d.ts +26 -0
- package/dist/core/app-kit/types/config.d.ts.map +1 -0
- package/dist/core/app-kit/types/config.js +1 -0
- package/dist/core/app-kit/types/config.js.map +1 -0
- package/dist/core/app-kit/types/events.cjs +17 -0
- package/dist/core/app-kit/types/events.cjs.map +1 -0
- package/dist/core/app-kit/types/events.d.ts +35 -0
- package/dist/core/app-kit/types/events.d.ts.map +1 -0
- package/dist/core/app-kit/types/events.js +1 -0
- package/dist/core/app-kit/types/events.js.map +1 -0
- package/dist/core/emitter/index.cjs +25 -0
- package/dist/core/emitter/index.cjs.map +1 -0
- package/dist/core/emitter/index.d.ts +14 -0
- package/dist/core/emitter/index.d.ts.map +1 -0
- package/dist/core/emitter/index.js +5 -0
- package/dist/core/emitter/index.js.map +1 -0
- package/dist/core/emitter/services/emitter.cjs +60 -0
- package/dist/core/emitter/services/emitter.cjs.map +1 -0
- package/dist/core/emitter/services/emitter.d.ts +18 -0
- package/dist/core/emitter/services/emitter.d.ts.map +1 -0
- package/dist/core/emitter/services/emitter.js +40 -0
- package/dist/core/emitter/services/emitter.js.map +1 -0
- package/dist/core/emitter/types/events.cjs +17 -0
- package/dist/core/emitter/types/events.cjs.map +1 -0
- package/dist/core/emitter/types/events.d.ts +16 -0
- package/dist/core/emitter/types/events.d.ts.map +1 -0
- package/dist/core/emitter/types/events.js +1 -0
- package/dist/core/emitter/types/events.js.map +1 -0
- package/dist/core/wallets-manager/index.cjs +25 -0
- package/dist/core/wallets-manager/index.cjs.map +1 -0
- package/dist/core/wallets-manager/index.d.ts +9 -0
- package/dist/core/wallets-manager/index.d.ts.map +1 -0
- package/dist/core/wallets-manager/index.js +5 -0
- package/dist/core/wallets-manager/index.js.map +1 -0
- package/dist/core/wallets-manager/services/wallets-manager.cjs +80 -0
- package/dist/core/wallets-manager/services/wallets-manager.cjs.map +1 -0
- package/dist/core/wallets-manager/services/wallets-manager.d.ts +40 -0
- package/dist/core/wallets-manager/services/wallets-manager.d.ts.map +1 -0
- package/dist/core/wallets-manager/services/wallets-manager.js +60 -0
- package/dist/core/wallets-manager/services/wallets-manager.js.map +1 -0
- package/dist/index.cjs +35 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/queries/balances/get-balance-by-address.cjs +43 -0
- package/dist/queries/balances/get-balance-by-address.cjs.map +1 -0
- package/dist/queries/balances/get-balance-by-address.d.ts +21 -0
- package/dist/queries/balances/get-balance-by-address.d.ts.map +1 -0
- package/dist/queries/balances/get-balance-by-address.js +23 -0
- package/dist/queries/balances/get-balance-by-address.js.map +1 -0
- package/dist/queries/connectors/connect.cjs +34 -0
- package/dist/queries/connectors/connect.cjs.map +1 -0
- package/dist/queries/connectors/connect.d.ts +22 -0
- package/dist/queries/connectors/connect.d.ts.map +1 -0
- package/dist/queries/connectors/connect.js +14 -0
- package/dist/queries/connectors/connect.js.map +1 -0
- package/dist/queries/connectors/disconnect.cjs +34 -0
- package/dist/queries/connectors/disconnect.cjs.map +1 -0
- package/dist/queries/connectors/disconnect.d.ts +22 -0
- package/dist/queries/connectors/disconnect.d.ts.map +1 -0
- package/dist/queries/connectors/disconnect.js +14 -0
- package/dist/queries/connectors/disconnect.js.map +1 -0
- package/dist/queries/index.cjs +59 -0
- package/dist/queries/index.cjs.map +1 -0
- package/dist/queries/index.d.ts +26 -0
- package/dist/queries/index.d.ts.map +1 -0
- package/dist/queries/index.js +75 -0
- package/dist/queries/index.js.map +1 -0
- package/dist/queries/jettons/get-jetton-balance-by-address.cjs +44 -0
- package/dist/queries/jettons/get-jetton-balance-by-address.cjs.map +1 -0
- package/dist/queries/jettons/get-jetton-balance-by-address.d.ts +24 -0
- package/dist/queries/jettons/get-jetton-balance-by-address.d.ts.map +1 -0
- package/dist/queries/jettons/get-jetton-balance-by-address.js +24 -0
- package/dist/queries/jettons/get-jetton-balance-by-address.js.map +1 -0
- package/dist/queries/jettons/get-jetton-info.cjs +43 -0
- package/dist/queries/jettons/get-jetton-info.cjs.map +1 -0
- package/dist/queries/jettons/get-jetton-info.d.ts +21 -0
- package/dist/queries/jettons/get-jetton-info.d.ts.map +1 -0
- package/dist/queries/jettons/get-jetton-info.js +23 -0
- package/dist/queries/jettons/get-jetton-info.js.map +1 -0
- package/dist/queries/jettons/get-jetton-wallet-address.cjs +44 -0
- package/dist/queries/jettons/get-jetton-wallet-address.cjs.map +1 -0
- package/dist/queries/jettons/get-jetton-wallet-address.d.ts +24 -0
- package/dist/queries/jettons/get-jetton-wallet-address.d.ts.map +1 -0
- package/dist/queries/jettons/get-jetton-wallet-address.js +24 -0
- package/dist/queries/jettons/get-jetton-wallet-address.js.map +1 -0
- package/dist/queries/jettons/get-jettons-by-address.cjs +43 -0
- package/dist/queries/jettons/get-jettons-by-address.cjs.map +1 -0
- package/dist/queries/jettons/get-jettons-by-address.d.ts +21 -0
- package/dist/queries/jettons/get-jettons-by-address.d.ts.map +1 -0
- package/dist/queries/jettons/get-jettons-by-address.js +23 -0
- package/dist/queries/jettons/get-jettons-by-address.js.map +1 -0
- package/dist/queries/jettons/transfer-jetton.cjs +34 -0
- package/dist/queries/jettons/transfer-jetton.cjs.map +1 -0
- package/dist/queries/jettons/transfer-jetton.d.ts +22 -0
- package/dist/queries/jettons/transfer-jetton.d.ts.map +1 -0
- package/dist/queries/jettons/transfer-jetton.js +14 -0
- package/dist/queries/jettons/transfer-jetton.js.map +1 -0
- package/dist/queries/nft/get-nft.cjs +43 -0
- package/dist/queries/nft/get-nft.cjs.map +1 -0
- package/dist/queries/nft/get-nft.d.ts +21 -0
- package/dist/queries/nft/get-nft.d.ts.map +1 -0
- package/dist/queries/nft/get-nft.js +23 -0
- package/dist/queries/nft/get-nft.js.map +1 -0
- package/dist/queries/nft/get-nfts-by-address.cjs +43 -0
- package/dist/queries/nft/get-nfts-by-address.cjs.map +1 -0
- package/dist/queries/nft/get-nfts-by-address.d.ts +21 -0
- package/dist/queries/nft/get-nfts-by-address.d.ts.map +1 -0
- package/dist/queries/nft/get-nfts-by-address.js +23 -0
- package/dist/queries/nft/get-nfts-by-address.js.map +1 -0
- package/dist/queries/nft/transfer-nft.cjs +34 -0
- package/dist/queries/nft/transfer-nft.cjs.map +1 -0
- package/dist/queries/nft/transfer-nft.d.ts +22 -0
- package/dist/queries/nft/transfer-nft.d.ts.map +1 -0
- package/dist/queries/nft/transfer-nft.js +14 -0
- package/dist/queries/nft/transfer-nft.js.map +1 -0
- package/dist/queries/signing/sign-binary.cjs +34 -0
- package/dist/queries/signing/sign-binary.cjs.map +1 -0
- package/dist/queries/signing/sign-binary.d.ts +21 -0
- package/dist/queries/signing/sign-binary.d.ts.map +1 -0
- package/dist/queries/signing/sign-binary.js +14 -0
- package/dist/queries/signing/sign-binary.js.map +1 -0
- package/dist/queries/signing/sign-cell.cjs +34 -0
- package/dist/queries/signing/sign-cell.cjs.map +1 -0
- package/dist/queries/signing/sign-cell.d.ts +21 -0
- package/dist/queries/signing/sign-cell.d.ts.map +1 -0
- package/dist/queries/signing/sign-cell.js +14 -0
- package/dist/queries/signing/sign-cell.js.map +1 -0
- package/dist/queries/signing/sign-text.cjs +34 -0
- package/dist/queries/signing/sign-text.cjs.map +1 -0
- package/dist/queries/signing/sign-text.d.ts +21 -0
- package/dist/queries/signing/sign-text.d.ts.map +1 -0
- package/dist/queries/signing/sign-text.js +14 -0
- package/dist/queries/signing/sign-text.js.map +1 -0
- package/dist/queries/swap/build-swap-transaction.cjs +38 -0
- package/dist/queries/swap/build-swap-transaction.cjs.map +1 -0
- package/dist/queries/swap/build-swap-transaction.d.ts +21 -0
- package/dist/queries/swap/build-swap-transaction.d.ts.map +1 -0
- package/dist/queries/swap/build-swap-transaction.js +18 -0
- package/dist/queries/swap/build-swap-transaction.js.map +1 -0
- package/dist/queries/swap/get-swap-quote.cjs +54 -0
- package/dist/queries/swap/get-swap-quote.cjs.map +1 -0
- package/dist/queries/swap/get-swap-quote.d.ts +21 -0
- package/dist/queries/swap/get-swap-quote.d.ts.map +1 -0
- package/dist/queries/swap/get-swap-quote.js +34 -0
- package/dist/queries/swap/get-swap-quote.js.map +1 -0
- package/dist/queries/transaction/send-transaction.cjs +34 -0
- package/dist/queries/transaction/send-transaction.cjs.map +1 -0
- package/dist/queries/transaction/send-transaction.d.ts +21 -0
- package/dist/queries/transaction/send-transaction.d.ts.map +1 -0
- package/dist/queries/transaction/send-transaction.js +14 -0
- package/dist/queries/transaction/send-transaction.js.map +1 -0
- package/dist/queries/transaction/transfer-ton.cjs +34 -0
- package/dist/queries/transaction/transfer-ton.cjs.map +1 -0
- package/dist/queries/transaction/transfer-ton.d.ts +21 -0
- package/dist/queries/transaction/transfer-ton.d.ts.map +1 -0
- package/dist/queries/transaction/transfer-ton.js +14 -0
- package/dist/queries/transaction/transfer-ton.js.map +1 -0
- package/dist/swap/index.cjs +17 -0
- package/dist/swap/index.cjs.map +1 -0
- package/dist/swap/index.d.ts +9 -0
- package/dist/swap/index.d.ts.map +1 -0
- package/dist/swap/index.js +1 -0
- package/dist/swap/index.js.map +1 -0
- package/dist/swap/omniston/index.cjs +19 -0
- package/dist/swap/omniston/index.cjs.map +1 -0
- package/dist/swap/omniston/index.d.ts +9 -0
- package/dist/swap/omniston/index.d.ts.map +1 -0
- package/dist/swap/omniston/index.js +2 -0
- package/dist/swap/omniston/index.js.map +1 -0
- package/dist/types/balance.cjs +17 -0
- package/dist/types/balance.cjs.map +1 -0
- package/dist/types/balance.d.ts +10 -0
- package/dist/types/balance.d.ts.map +1 -0
- package/dist/types/balance.js +1 -0
- package/dist/types/balance.js.map +1 -0
- package/dist/types/connector.cjs +17 -0
- package/dist/types/connector.cjs.map +1 -0
- package/dist/types/connector.d.ts +35 -0
- package/dist/types/connector.d.ts.map +1 -0
- package/dist/types/connector.js +1 -0
- package/dist/types/connector.js.map +1 -0
- package/dist/types/jetton.cjs +17 -0
- package/dist/types/jetton.cjs.map +1 -0
- package/dist/types/jetton.d.ts +9 -0
- package/dist/types/jetton.d.ts.map +1 -0
- package/dist/types/jetton.js +1 -0
- package/dist/types/jetton.js.map +1 -0
- package/dist/types/network.cjs +25 -0
- package/dist/types/network.cjs.map +1 -0
- package/dist/types/network.d.ts +9 -0
- package/dist/types/network.d.ts.map +1 -0
- package/dist/types/network.js +5 -0
- package/dist/types/network.js.map +1 -0
- package/dist/types/nft.cjs +17 -0
- package/dist/types/nft.cjs.map +1 -0
- package/dist/types/nft.d.ts +9 -0
- package/dist/types/nft.d.ts.map +1 -0
- package/dist/types/nft.js +1 -0
- package/dist/types/nft.js.map +1 -0
- package/dist/types/primitives.cjs +17 -0
- package/dist/types/primitives.cjs.map +1 -0
- package/dist/types/primitives.d.ts +9 -0
- package/dist/types/primitives.d.ts.map +1 -0
- package/dist/types/primitives.js +1 -0
- package/dist/types/primitives.js.map +1 -0
- package/dist/types/provider.cjs +17 -0
- package/dist/types/provider.cjs.map +1 -0
- package/dist/types/provider.d.ts +13 -0
- package/dist/types/provider.d.ts.map +1 -0
- package/dist/types/provider.js +1 -0
- package/dist/types/provider.js.map +1 -0
- package/dist/types/query.cjs +17 -0
- package/dist/types/query.cjs.map +1 -0
- package/dist/types/query.d.ts +19 -0
- package/dist/types/query.d.ts.map +1 -0
- package/dist/types/query.js +1 -0
- package/dist/types/query.js.map +1 -0
- package/dist/types/signing.cjs +17 -0
- package/dist/types/signing.cjs.map +1 -0
- package/dist/types/signing.d.ts +76 -0
- package/dist/types/signing.d.ts.map +1 -0
- package/dist/types/signing.js +1 -0
- package/dist/types/signing.js.map +1 -0
- package/dist/types/transaction.cjs +17 -0
- package/dist/types/transaction.cjs.map +1 -0
- package/dist/types/transaction.d.ts +53 -0
- package/dist/types/transaction.d.ts.map +1 -0
- package/dist/types/transaction.js +1 -0
- package/dist/types/transaction.js.map +1 -0
- package/dist/types/utils.cjs +17 -0
- package/dist/types/utils.cjs.map +1 -0
- package/dist/types/utils.d.ts +83 -0
- package/dist/types/utils.d.ts.map +1 -0
- package/dist/types/utils.js +1 -0
- package/dist/types/utils.js.map +1 -0
- package/dist/types/wallet.cjs +17 -0
- package/dist/types/wallet.cjs.map +1 -0
- package/dist/types/wallet.d.ts +32 -0
- package/dist/types/wallet.d.ts.map +1 -0
- package/dist/types/wallet.js +1 -0
- package/dist/types/wallet.js.map +1 -0
- package/dist/utils/amount/validate-numeric-string.cjs +37 -0
- package/dist/utils/amount/validate-numeric-string.cjs.map +1 -0
- package/dist/utils/amount/validate-numeric-string.d.ts +11 -0
- package/dist/utils/amount/validate-numeric-string.d.ts.map +1 -0
- package/dist/utils/amount/validate-numeric-string.js +17 -0
- package/dist/utils/amount/validate-numeric-string.js.map +1 -0
- package/dist/utils/amount/validate-numeric-string.test.d.ts +9 -0
- package/dist/utils/amount/validate-numeric-string.test.d.ts.map +1 -0
- package/dist/utils/arrays/key-by.cjs +32 -0
- package/dist/utils/arrays/key-by.cjs.map +1 -0
- package/dist/utils/arrays/key-by.d.ts +9 -0
- package/dist/utils/arrays/key-by.d.ts.map +1 -0
- package/dist/utils/arrays/key-by.js +12 -0
- package/dist/utils/arrays/key-by.js.map +1 -0
- package/dist/utils/arrays/key-by.test.d.ts +9 -0
- package/dist/utils/arrays/key-by.test.d.ts.map +1 -0
- package/dist/utils/arrays/random-from-array.cjs +25 -0
- package/dist/utils/arrays/random-from-array.cjs.map +1 -0
- package/dist/utils/arrays/random-from-array.d.ts +9 -0
- package/dist/utils/arrays/random-from-array.d.ts.map +1 -0
- package/dist/utils/arrays/random-from-array.js +5 -0
- package/dist/utils/arrays/random-from-array.js.map +1 -0
- package/dist/utils/arrays/random-from-array.test.d.ts +9 -0
- package/dist/utils/arrays/random-from-array.test.d.ts.map +1 -0
- package/dist/utils/errors/get-error-message.cjs +34 -0
- package/dist/utils/errors/get-error-message.cjs.map +1 -0
- package/dist/utils/errors/get-error-message.d.ts +9 -0
- package/dist/utils/errors/get-error-message.d.ts.map +1 -0
- package/dist/utils/errors/get-error-message.js +14 -0
- package/dist/utils/errors/get-error-message.js.map +1 -0
- package/dist/utils/errors/get-error-message.test.d.ts +9 -0
- package/dist/utils/errors/get-error-message.test.d.ts.map +1 -0
- package/dist/utils/functions/noop.cjs +26 -0
- package/dist/utils/functions/noop.cjs.map +1 -0
- package/dist/utils/functions/noop.d.ts +9 -0
- package/dist/utils/functions/noop.d.ts.map +1 -0
- package/dist/utils/functions/noop.js +6 -0
- package/dist/utils/functions/noop.js.map +1 -0
- package/dist/utils/index.cjs +40 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.ts +22 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +19 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/jetton/jetton-info.cjs +65 -0
- package/dist/utils/jetton/jetton-info.cjs.map +1 -0
- package/dist/utils/jetton/jetton-info.d.ts +23 -0
- package/dist/utils/jetton/jetton-info.d.ts.map +1 -0
- package/dist/utils/jetton/jetton-info.js +45 -0
- package/dist/utils/jetton/jetton-info.js.map +1 -0
- package/dist/utils/nft/nft-info.cjs +70 -0
- package/dist/utils/nft/nft-info.cjs.map +1 -0
- package/dist/utils/nft/nft-info.d.ts +21 -0
- package/dist/utils/nft/nft-info.d.ts.map +1 -0
- package/dist/utils/nft/nft-info.js +50 -0
- package/dist/utils/nft/nft-info.js.map +1 -0
- package/dist/utils/object/map-values.cjs +33 -0
- package/dist/utils/object/map-values.cjs.map +1 -0
- package/dist/utils/object/map-values.d.ts +9 -0
- package/dist/utils/object/map-values.d.ts.map +1 -0
- package/dist/utils/object/map-values.js +13 -0
- package/dist/utils/object/map-values.js.map +1 -0
- package/dist/utils/object/map-values.test.d.ts +9 -0
- package/dist/utils/object/map-values.test.d.ts.map +1 -0
- package/dist/utils/predicate/is-string.cjs +27 -0
- package/dist/utils/predicate/is-string.cjs.map +1 -0
- package/dist/utils/predicate/is-string.d.ts +9 -0
- package/dist/utils/predicate/is-string.d.ts.map +1 -0
- package/dist/utils/predicate/is-string.js +7 -0
- package/dist/utils/predicate/is-string.js.map +1 -0
- package/dist/utils/predicate/is-string.test.d.ts +9 -0
- package/dist/utils/predicate/is-string.test.d.ts.map +1 -0
- package/dist/utils/promise/cancel-promise.cjs +32 -0
- package/dist/utils/promise/cancel-promise.cjs.map +1 -0
- package/dist/utils/promise/cancel-promise.d.ts +9 -0
- package/dist/utils/promise/cancel-promise.d.ts.map +1 -0
- package/dist/utils/promise/cancel-promise.js +12 -0
- package/dist/utils/promise/cancel-promise.js.map +1 -0
- package/dist/utils/promise/cancel-promise.test.d.ts +9 -0
- package/dist/utils/promise/cancel-promise.test.d.ts.map +1 -0
- package/dist/utils/promise/sleep.cjs +29 -0
- package/dist/utils/promise/sleep.cjs.map +1 -0
- package/dist/utils/promise/sleep.d.ts +9 -0
- package/dist/utils/promise/sleep.d.ts.map +1 -0
- package/dist/utils/promise/sleep.js +9 -0
- package/dist/utils/promise/sleep.js.map +1 -0
- package/dist/utils/query/filter-query-options.cjs +28 -0
- package/dist/utils/query/filter-query-options.cjs.map +1 -0
- package/dist/utils/query/filter-query-options.d.ts +10 -0
- package/dist/utils/query/filter-query-options.d.ts.map +1 -0
- package/dist/utils/query/filter-query-options.js +8 -0
- package/dist/utils/query/filter-query-options.js.map +1 -0
- package/dist/utils/string/middle-ellipsis.cjs +30 -0
- package/dist/utils/string/middle-ellipsis.cjs.map +1 -0
- package/dist/utils/string/middle-ellipsis.d.ts +9 -0
- package/dist/utils/string/middle-ellipsis.d.ts.map +1 -0
- package/dist/utils/string/middle-ellipsis.js +10 -0
- package/dist/utils/string/middle-ellipsis.js.map +1 -0
- package/dist/utils/string/middle-ellipsis.test.d.ts +9 -0
- package/dist/utils/string/middle-ellipsis.test.d.ts.map +1 -0
- package/docs/actions.md +547 -0
- package/docs/connectors.md +135 -0
- package/docs/query.md +30 -0
- package/docs/swap.md +66 -0
- package/package.json +95 -8
- package/src/actions/balances/get-balance-by-address.ts +33 -0
- package/src/actions/balances/get-balance.ts +32 -0
- package/src/actions/connectors/add-connector.ts +21 -0
- package/src/actions/connectors/connect.ts +29 -0
- package/src/actions/connectors/disconnect.ts +29 -0
- package/src/actions/connectors/get-connector-by-id.ts +23 -0
- package/src/actions/connectors/get-connectors.ts +19 -0
- package/src/actions/connectors/watch-connector-by-id.ts +35 -0
- package/src/actions/connectors/watch-connectors.ts +31 -0
- package/src/actions/index.ts +134 -0
- package/src/actions/jettons/create-transfer-jetton-transaction.ts +67 -0
- package/src/actions/jettons/get-jetton-balance.ts +40 -0
- package/src/actions/jettons/get-jetton-info.ts +72 -0
- package/src/actions/jettons/get-jetton-wallet-address.ts +31 -0
- package/src/actions/jettons/get-jettons-by-address.ts +55 -0
- package/src/actions/jettons/get-jettons.ts +36 -0
- package/src/actions/jettons/transfer-jetton.ts +32 -0
- package/src/actions/network/get-network.ts +23 -0
- package/src/actions/network/get-networks.ts +20 -0
- package/src/actions/network/watch-networks.ts +32 -0
- package/src/actions/nft/create-transfer-nft-transaction.ts +51 -0
- package/src/actions/nft/get-nft.ts +29 -0
- package/src/actions/nft/get-nfts-by-address.ts +39 -0
- package/src/actions/nft/get-nfts.ts +36 -0
- package/src/actions/nft/transfer-nft.ts +30 -0
- package/src/actions/providers/register-provider.ts +19 -0
- package/src/actions/signing/sign-binary.ts +48 -0
- package/src/actions/signing/sign-cell.ts +57 -0
- package/src/actions/signing/sign-text.ts +47 -0
- package/src/actions/swap/build-swap-transaction.ts +25 -0
- package/src/actions/swap/get-swap-manager.ts +20 -0
- package/src/actions/swap/get-swap-quote.ts +27 -0
- package/src/actions/transaction/create-transfer-ton-transaction.ts +63 -0
- package/src/actions/transaction/send-transaction.ts +35 -0
- package/src/actions/transaction/transfer-ton.ts +32 -0
- package/src/actions/wallets/get-connected-wallets.ts +19 -0
- package/src/actions/wallets/get-selected-wallet.ts +19 -0
- package/src/actions/wallets/set-selected-wallet-id.ts +25 -0
- package/src/actions/wallets/watch-connected-wallets.ts +33 -0
- package/src/actions/wallets/watch-selected-wallet.ts +35 -0
- package/src/connectors/tonconnect/adapters/ton-connect-wallet-adapter.ts +161 -0
- package/src/connectors/tonconnect/connectors/ton-connect-connector.ts +99 -0
- package/src/connectors/tonconnect/constants/id.ts +9 -0
- package/src/connectors/tonconnect/index.ts +31 -0
- package/src/connectors/tonconnect/utils/transaction.ts +50 -0
- package/src/core/app-kit/constants/events.ts +37 -0
- package/src/core/app-kit/index.ts +19 -0
- package/src/core/app-kit/services/app-kit-network-manager.ts +27 -0
- package/src/core/app-kit/services/app-kit.ts +123 -0
- package/src/core/app-kit/types/config.ts +28 -0
- package/src/core/app-kit/types/events.ts +43 -0
- package/src/core/emitter/index.ts +15 -0
- package/src/core/emitter/services/emitter.ts +53 -0
- package/src/core/emitter/types/events.ts +18 -0
- package/src/core/wallets-manager/index.ts +9 -0
- package/src/core/wallets-manager/services/wallets-manager.ts +87 -0
- package/src/index.ts +52 -0
- package/src/queries/balances/get-balance-by-address.ts +58 -0
- package/src/queries/connectors/connect.ts +60 -0
- package/src/queries/connectors/disconnect.ts +64 -0
- package/src/queries/index.ts +181 -0
- package/src/queries/jettons/get-jetton-balance-by-address.ts +69 -0
- package/src/queries/jettons/get-jetton-info.ts +57 -0
- package/src/queries/jettons/get-jetton-wallet-address.ts +69 -0
- package/src/queries/jettons/get-jettons-by-address.ts +59 -0
- package/src/queries/jettons/transfer-jetton.ts +64 -0
- package/src/queries/nft/get-nft.ts +56 -0
- package/src/queries/nft/get-nfts-by-address.ts +59 -0
- package/src/queries/nft/transfer-nft.ts +64 -0
- package/src/queries/signing/sign-binary.ts +62 -0
- package/src/queries/signing/sign-cell.ts +58 -0
- package/src/queries/signing/sign-text.ts +58 -0
- package/src/queries/swap/build-swap-transaction.ts +84 -0
- package/src/queries/swap/get-swap-quote.ts +70 -0
- package/src/queries/transaction/send-transaction.ts +70 -0
- package/src/queries/transaction/transfer-ton.ts +66 -0
- package/src/swap/index.ts +9 -0
- package/src/swap/omniston/index.ts +9 -0
- package/src/types/balance.ts +11 -0
- package/src/types/connector.ts +45 -0
- package/src/types/jetton.ts +9 -0
- package/src/types/network.ts +9 -0
- package/src/types/nft.ts +9 -0
- package/src/types/primitives.ts +9 -0
- package/src/types/provider.ts +14 -0
- package/src/types/query.ts +44 -0
- package/src/types/signing.ts +78 -0
- package/src/types/transaction.ts +63 -0
- package/src/types/utils.ts +120 -0
- package/src/types/wallet.ts +48 -0
- package/src/utils/amount/validate-numeric-string.test.ts +53 -0
- package/src/utils/amount/validate-numeric-string.ts +25 -0
- package/src/utils/arrays/key-by.test.ts +55 -0
- package/src/utils/arrays/key-by.ts +18 -0
- package/src/utils/arrays/random-from-array.test.ts +37 -0
- package/src/utils/arrays/random-from-array.ts +9 -0
- package/src/utils/errors/get-error-message.test.ts +39 -0
- package/src/utils/errors/get-error-message.ts +24 -0
- package/src/utils/functions/noop.ts +11 -0
- package/src/utils/index.ts +23 -0
- package/src/utils/jetton/jetton-info.ts +62 -0
- package/src/utils/nft/nft-info.ts +62 -0
- package/src/utils/object/map-values.test.ts +37 -0
- package/src/utils/object/map-values.ts +23 -0
- package/src/utils/predicate/is-string.test.ts +29 -0
- package/src/utils/predicate/is-string.ts +11 -0
- package/src/utils/promise/cancel-promise.test.ts +28 -0
- package/src/utils/promise/cancel-promise.ts +16 -0
- package/src/utils/promise/sleep.ts +13 -0
- package/src/utils/query/filter-query-options.ts +15 -0
- package/src/utils/string/middle-ellipsis.test.ts +33 -0
- package/src/utils/string/middle-ellipsis.ts +15 -0
- package/tsconfig.json +29 -0
- package/tsup.config.ts +28 -0
- package/vitest.config.ts +21 -0
- package/index.js +0 -1
|
@@ -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 { getBalanceByAddressQueryOptions, type GetBalanceByAddressData, type GetBalanceErrorType, type GetBalanceByAddressQueryConfig, } from './balances/get-balance-by-address';
|
|
9
|
+
export { connectMutationOptions, type ConnectMutationOptions, type ConnectParameters, type ConnectReturnType, type ConnectData, type ConnectErrorType, type ConnectOptions, type ConnectVariables, } from './connectors/connect';
|
|
10
|
+
export { disconnectMutationOptions, type DisconnectMutationOptions, type DisconnectParameters, type DisconnectReturnType, type DisconnectData, type DisconnectErrorType, type DisconnectOptions, type DisconnectVariables, } from './connectors/disconnect';
|
|
11
|
+
export { getJettonInfoQueryOptions, type GetJettonInfoQueryConfig, type GetJettonInfoData, type GetJettonInfoErrorType, } from './jettons/get-jetton-info';
|
|
12
|
+
export { getJettonWalletAddressQueryOptions, type GetJettonWalletAddressQueryConfig, type GetJettonWalletAddressData, type GetJettonWalletAddressErrorType, } from './jettons/get-jetton-wallet-address';
|
|
13
|
+
export { getJettonBalanceByAddressQueryOptions, type GetJettonBalanceByAddressQueryConfig, type GetJettonBalanceByAddressData, type GetJettonBalanceErrorType, } from './jettons/get-jetton-balance-by-address';
|
|
14
|
+
export { getJettonsByAddressQueryOptions, type GetJettonsByAddressData, type GetJettonsErrorType, type GetJettonsByAddressQueryConfig, } from './jettons/get-jettons-by-address';
|
|
15
|
+
export { transferJettonMutationOptions, type TransferJettonData, type TransferJettonErrorType, type TransferJettonMutate, type TransferJettonMutateAsync, type TransferJettonMutationOptions, type TransferJettonOptions, type TransferJettonVariables, type TransferJettonParameters, type TransferJettonReturnType, } from './jettons/transfer-jetton';
|
|
16
|
+
export { getNFTsByAddressQueryOptions as getNFTsQueryOptions, type GetNFTsByAddressQueryConfig as GetNFTsQueryConfig, type GetNFTsByAddressData as GetNFTsData, type GetNFTsErrorType, } from './nft/get-nfts-by-address';
|
|
17
|
+
export { getNftQueryOptions, type GetNftQueryConfig, type GetNftData, type GetNftErrorType, type GetNftQueryOptions, } from './nft/get-nft';
|
|
18
|
+
export { transferNftMutationOptions, type TransferNftData, type TransferNftErrorType, type TransferNftMutate, type TransferNftMutateAsync, type TransferNftMutationOptions, type TransferNftOptions, type TransferNftVariables, type TransferNftParameters, type TransferNftReturnType, } from './nft/transfer-nft';
|
|
19
|
+
export { signTextMutationOptions, type SignTextOptions, type SignTextMutationOptions, type SignTextData, type SignTextVariables, type SignTextMutate, type SignTextMutateAsync, type SignTextErrorType, } from './signing/sign-text';
|
|
20
|
+
export { signBinaryMutationOptions, type SignBinaryOptions, type SignBinaryMutationOptions, type SignBinaryData, type SignBinaryVariables, type SignBinaryMutate, type SignBinaryMutateAsync, type SignBinaryErrorType, } from './signing/sign-binary';
|
|
21
|
+
export { signCellMutationOptions, type SignCellOptions, type SignCellMutationOptions, type SignCellData, type SignCellVariables, type SignCellMutate, type SignCellMutateAsync, type SignCellErrorType, } from './signing/sign-cell';
|
|
22
|
+
export { getSwapQuoteQueryOptions, type GetSwapQuoteQueryConfig, type GetSwapQuoteQueryOptions, type GetSwapQuoteData, type GetSwapQuoteErrorType, type GetSwapQuoteQueryFnData, type GetSwapQuoteQueryKey, } from './swap/get-swap-quote';
|
|
23
|
+
export { buildSwapTransactionMutationOptions, type BuildSwapTransactionMutationConfig, type BuildSwapTransactionMutationOptions, type BuildSwapTransactionData, type BuildSwapTransactionErrorType, type BuildSwapTransactionMutate, type BuildSwapTransactionMutateAsync, type BuildSwapTransactionVariables, } from './swap/build-swap-transaction';
|
|
24
|
+
export { transferTonMutationOptions, type TransferTonData, type TransferTonErrorType, type TransferTonMutate, type TransferTonMutateAsync, type TransferTonMutationOptions, type TransferTonOptions, type TransferTonVariables, type TransferTonParameters, type TransferTonReturnType, } from './transaction/transfer-ton';
|
|
25
|
+
export { sendTransactionMutationOptions, type SendTransactionData, type SendTransactionErrorType, type SendTransactionMutate, type SendTransactionMutateAsync, type SendTransactionMutationOptions, type SendTransactionOptions, type SendTransactionVariables, type SendTransactionParameters, type SendTransactionReturnType, } from './transaction/send-transaction';
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/queries/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACH,+BAA+B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,GACtC,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EACH,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACH,yBAAyB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GAC3B,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACH,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,GAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,kCAAkC,EAClC,KAAK,iCAAiC,EACtC,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,GACvC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACH,qCAAqC,EACrC,KAAK,oCAAoC,EACzC,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,GACjC,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACH,+BAA+B,EAC/B,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,8BAA8B,GACtC,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACH,6BAA6B,EAC7B,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,GAChC,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACH,4BAA4B,IAAI,mBAAmB,EACnD,KAAK,2BAA2B,IAAI,kBAAkB,EACtD,KAAK,oBAAoB,IAAI,WAAW,EACxC,KAAK,gBAAgB,GACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,kBAAkB,EAClB,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,kBAAkB,GAC1B,MAAM,eAAe,CAAC;AACvB,OAAO,EACH,0BAA0B,EAC1B,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC7B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACH,uBAAuB,EACvB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,yBAAyB,EACzB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,uBAAuB,EACvB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACzB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACH,wBAAwB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,mCAAmC,EACnC,KAAK,kCAAkC,EACvC,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,0BAA0B,EAC/B,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,GACrC,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACH,0BAA0B,EAC1B,KAAK,eAAe,EACpB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,EAC/B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,GAC7B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACH,8BAA8B,EAC9B,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,GACjC,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getBalanceByAddressQueryOptions
|
|
3
|
+
} from "./balances/get-balance-by-address";
|
|
4
|
+
import {
|
|
5
|
+
connectMutationOptions
|
|
6
|
+
} from "./connectors/connect";
|
|
7
|
+
import {
|
|
8
|
+
disconnectMutationOptions
|
|
9
|
+
} from "./connectors/disconnect";
|
|
10
|
+
import {
|
|
11
|
+
getJettonInfoQueryOptions
|
|
12
|
+
} from "./jettons/get-jetton-info";
|
|
13
|
+
import {
|
|
14
|
+
getJettonWalletAddressQueryOptions
|
|
15
|
+
} from "./jettons/get-jetton-wallet-address";
|
|
16
|
+
import {
|
|
17
|
+
getJettonBalanceByAddressQueryOptions
|
|
18
|
+
} from "./jettons/get-jetton-balance-by-address";
|
|
19
|
+
import {
|
|
20
|
+
getJettonsByAddressQueryOptions
|
|
21
|
+
} from "./jettons/get-jettons-by-address";
|
|
22
|
+
import {
|
|
23
|
+
transferJettonMutationOptions
|
|
24
|
+
} from "./jettons/transfer-jetton";
|
|
25
|
+
import {
|
|
26
|
+
getNFTsByAddressQueryOptions
|
|
27
|
+
} from "./nft/get-nfts-by-address";
|
|
28
|
+
import {
|
|
29
|
+
getNftQueryOptions
|
|
30
|
+
} from "./nft/get-nft";
|
|
31
|
+
import {
|
|
32
|
+
transferNftMutationOptions
|
|
33
|
+
} from "./nft/transfer-nft";
|
|
34
|
+
import {
|
|
35
|
+
signTextMutationOptions
|
|
36
|
+
} from "./signing/sign-text";
|
|
37
|
+
import {
|
|
38
|
+
signBinaryMutationOptions
|
|
39
|
+
} from "./signing/sign-binary";
|
|
40
|
+
import {
|
|
41
|
+
signCellMutationOptions
|
|
42
|
+
} from "./signing/sign-cell";
|
|
43
|
+
import {
|
|
44
|
+
getSwapQuoteQueryOptions
|
|
45
|
+
} from "./swap/get-swap-quote";
|
|
46
|
+
import {
|
|
47
|
+
buildSwapTransactionMutationOptions
|
|
48
|
+
} from "./swap/build-swap-transaction";
|
|
49
|
+
import {
|
|
50
|
+
transferTonMutationOptions
|
|
51
|
+
} from "./transaction/transfer-ton";
|
|
52
|
+
import {
|
|
53
|
+
sendTransactionMutationOptions
|
|
54
|
+
} from "./transaction/send-transaction";
|
|
55
|
+
export {
|
|
56
|
+
buildSwapTransactionMutationOptions,
|
|
57
|
+
connectMutationOptions,
|
|
58
|
+
disconnectMutationOptions,
|
|
59
|
+
getBalanceByAddressQueryOptions,
|
|
60
|
+
getJettonBalanceByAddressQueryOptions,
|
|
61
|
+
getJettonInfoQueryOptions,
|
|
62
|
+
getJettonWalletAddressQueryOptions,
|
|
63
|
+
getJettonsByAddressQueryOptions,
|
|
64
|
+
getNFTsByAddressQueryOptions as getNFTsQueryOptions,
|
|
65
|
+
getNftQueryOptions,
|
|
66
|
+
getSwapQuoteQueryOptions,
|
|
67
|
+
sendTransactionMutationOptions,
|
|
68
|
+
signBinaryMutationOptions,
|
|
69
|
+
signCellMutationOptions,
|
|
70
|
+
signTextMutationOptions,
|
|
71
|
+
transferJettonMutationOptions,
|
|
72
|
+
transferNftMutationOptions,
|
|
73
|
+
transferTonMutationOptions
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/queries/index.ts"],"sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\n// Balances\nexport {\n getBalanceByAddressQueryOptions,\n type GetBalanceByAddressData,\n type GetBalanceErrorType,\n type GetBalanceByAddressQueryConfig,\n} from './balances/get-balance-by-address';\n\n// Connectors\nexport {\n connectMutationOptions,\n type ConnectMutationOptions,\n type ConnectParameters,\n type ConnectReturnType,\n type ConnectData,\n type ConnectErrorType,\n type ConnectOptions,\n type ConnectVariables,\n} from './connectors/connect';\nexport {\n disconnectMutationOptions,\n type DisconnectMutationOptions,\n type DisconnectParameters,\n type DisconnectReturnType,\n type DisconnectData,\n type DisconnectErrorType,\n type DisconnectOptions,\n type DisconnectVariables,\n} from './connectors/disconnect';\n\n// Jettons\nexport {\n getJettonInfoQueryOptions,\n type GetJettonInfoQueryConfig,\n type GetJettonInfoData,\n type GetJettonInfoErrorType,\n} from './jettons/get-jetton-info';\nexport {\n getJettonWalletAddressQueryOptions,\n type GetJettonWalletAddressQueryConfig,\n type GetJettonWalletAddressData,\n type GetJettonWalletAddressErrorType,\n} from './jettons/get-jetton-wallet-address';\nexport {\n getJettonBalanceByAddressQueryOptions,\n type GetJettonBalanceByAddressQueryConfig,\n type GetJettonBalanceByAddressData,\n type GetJettonBalanceErrorType,\n} from './jettons/get-jetton-balance-by-address';\nexport {\n getJettonsByAddressQueryOptions,\n type GetJettonsByAddressData,\n type GetJettonsErrorType,\n type GetJettonsByAddressQueryConfig,\n} from './jettons/get-jettons-by-address';\nexport {\n transferJettonMutationOptions,\n type TransferJettonData,\n type TransferJettonErrorType,\n type TransferJettonMutate,\n type TransferJettonMutateAsync,\n type TransferJettonMutationOptions,\n type TransferJettonOptions,\n type TransferJettonVariables,\n type TransferJettonParameters,\n type TransferJettonReturnType,\n} from './jettons/transfer-jetton';\n\n// NFT\nexport {\n getNFTsByAddressQueryOptions as getNFTsQueryOptions,\n type GetNFTsByAddressQueryConfig as GetNFTsQueryConfig,\n type GetNFTsByAddressData as GetNFTsData,\n type GetNFTsErrorType,\n} from './nft/get-nfts-by-address';\nexport {\n getNftQueryOptions,\n type GetNftQueryConfig,\n type GetNftData,\n type GetNftErrorType,\n type GetNftQueryOptions,\n} from './nft/get-nft';\nexport {\n transferNftMutationOptions,\n type TransferNftData,\n type TransferNftErrorType,\n type TransferNftMutate,\n type TransferNftMutateAsync,\n type TransferNftMutationOptions,\n type TransferNftOptions,\n type TransferNftVariables,\n type TransferNftParameters,\n type TransferNftReturnType,\n} from './nft/transfer-nft';\n\n// Signing\nexport {\n signTextMutationOptions,\n type SignTextOptions,\n type SignTextMutationOptions,\n type SignTextData,\n type SignTextVariables,\n type SignTextMutate,\n type SignTextMutateAsync,\n type SignTextErrorType,\n} from './signing/sign-text';\nexport {\n signBinaryMutationOptions,\n type SignBinaryOptions,\n type SignBinaryMutationOptions,\n type SignBinaryData,\n type SignBinaryVariables,\n type SignBinaryMutate,\n type SignBinaryMutateAsync,\n type SignBinaryErrorType,\n} from './signing/sign-binary';\nexport {\n signCellMutationOptions,\n type SignCellOptions,\n type SignCellMutationOptions,\n type SignCellData,\n type SignCellVariables,\n type SignCellMutate,\n type SignCellMutateAsync,\n type SignCellErrorType,\n} from './signing/sign-cell';\n\n// Swap\nexport {\n getSwapQuoteQueryOptions,\n type GetSwapQuoteQueryConfig,\n type GetSwapQuoteQueryOptions,\n type GetSwapQuoteData,\n type GetSwapQuoteErrorType,\n type GetSwapQuoteQueryFnData,\n type GetSwapQuoteQueryKey,\n} from './swap/get-swap-quote';\nexport {\n buildSwapTransactionMutationOptions,\n type BuildSwapTransactionMutationConfig,\n type BuildSwapTransactionMutationOptions,\n type BuildSwapTransactionData,\n type BuildSwapTransactionErrorType,\n type BuildSwapTransactionMutate,\n type BuildSwapTransactionMutateAsync,\n type BuildSwapTransactionVariables,\n} from './swap/build-swap-transaction';\n\n// Transaction\nexport {\n transferTonMutationOptions,\n type TransferTonData,\n type TransferTonErrorType,\n type TransferTonMutate,\n type TransferTonMutateAsync,\n type TransferTonMutationOptions,\n type TransferTonOptions,\n type TransferTonVariables,\n type TransferTonParameters,\n type TransferTonReturnType,\n} from './transaction/transfer-ton';\nexport {\n sendTransactionMutationOptions,\n type SendTransactionData,\n type SendTransactionErrorType,\n type SendTransactionMutate,\n type SendTransactionMutateAsync,\n type SendTransactionMutationOptions,\n type SendTransactionOptions,\n type SendTransactionVariables,\n type SendTransactionParameters,\n type SendTransactionReturnType,\n} from './transaction/send-transaction';\n"],"mappings":"AASA;AAAA,EACI;AAAA,OAIG;AAGP;AAAA,EACI;AAAA,OAQG;AACP;AAAA,EACI;AAAA,OAQG;AAGP;AAAA,EACI;AAAA,OAIG;AACP;AAAA,EACI;AAAA,OAIG;AACP;AAAA,EACI;AAAA,OAIG;AACP;AAAA,EACI;AAAA,OAIG;AACP;AAAA,EACI;AAAA,OAUG;AAGP;AAAA,EACoC;AAAA,OAI7B;AACP;AAAA,EACI;AAAA,OAKG;AACP;AAAA,EACI;AAAA,OAUG;AAGP;AAAA,EACI;AAAA,OAQG;AACP;AAAA,EACI;AAAA,OAQG;AACP;AAAA,EACI;AAAA,OAQG;AAGP;AAAA,EACI;AAAA,OAOG;AACP;AAAA,EACI;AAAA,OAQG;AAGP;AAAA,EACI;AAAA,OAUG;AACP;AAAA,EACI;AAAA,OAUG;","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var get_jetton_balance_by_address_exports = {};
|
|
20
|
+
__export(get_jetton_balance_by_address_exports, {
|
|
21
|
+
getJettonBalanceByAddressQueryKey: () => getJettonBalanceByAddressQueryKey,
|
|
22
|
+
getJettonBalanceByAddressQueryOptions: () => getJettonBalanceByAddressQueryOptions
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(get_jetton_balance_by_address_exports);
|
|
25
|
+
var import_get_jetton_balance = require("../../actions/jettons/get-jetton-balance");
|
|
26
|
+
var import_utils = require("../../utils");
|
|
27
|
+
const getJettonBalanceByAddressQueryOptions = (appKit, options = {}) => {
|
|
28
|
+
return {
|
|
29
|
+
...options.query,
|
|
30
|
+
enabled: Boolean(options.jettonAddress && options.ownerAddress && (options.query?.enabled ?? true)),
|
|
31
|
+
queryFn: async (context) => {
|
|
32
|
+
const [, parameters] = context.queryKey;
|
|
33
|
+
if (!parameters.jettonAddress) throw new Error("jettonAddress is required");
|
|
34
|
+
if (!parameters.ownerAddress) throw new Error("ownerAddress is required");
|
|
35
|
+
const balance = await (0, import_get_jetton_balance.getJettonBalance)(appKit, parameters);
|
|
36
|
+
return balance;
|
|
37
|
+
},
|
|
38
|
+
queryKey: getJettonBalanceByAddressQueryKey(options)
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const getJettonBalanceByAddressQueryKey = (options = {}) => {
|
|
42
|
+
return ["jetton-balance", (0, import_utils.filterQueryOptions)(options)];
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=get-jetton-balance-by-address.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/jettons/get-jetton-balance-by-address.ts"],"sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { TokenAmount } from '@ton/walletkit';\n\nimport type { AppKit } from '../../core/app-kit';\nimport { getJettonBalance } from '../../actions/jettons/get-jetton-balance';\nimport type { GetJettonBalanceOptions as GetJettonBalanceParameters } from '../../actions/jettons/get-jetton-balance';\nimport type { QueryOptions, QueryParameter } from '../../types/query';\nimport type { Compute, ExactPartial } from '../../types/utils';\nimport { filterQueryOptions } from '../../utils';\n\nexport type GetJettonBalanceErrorType = Error;\n\nexport type GetJettonBalanceByAddressData = GetJettonBalanceQueryFnData;\n\nexport type GetJettonBalanceByAddressQueryConfig<selectData = GetJettonBalanceByAddressData> = Compute<\n ExactPartial<GetJettonBalanceParameters>\n> &\n QueryParameter<\n GetJettonBalanceQueryFnData,\n GetJettonBalanceErrorType,\n selectData,\n GetJettonBalanceByAddressQueryKey\n >;\n\nexport const getJettonBalanceByAddressQueryOptions = <selectData = GetJettonBalanceByAddressData>(\n appKit: AppKit,\n options: GetJettonBalanceByAddressQueryConfig<selectData> = {},\n): GetJettonBalanceByAddressQueryOptions<selectData> => {\n return {\n ...options.query,\n enabled: Boolean(options.jettonAddress && options.ownerAddress && (options.query?.enabled ?? true)),\n queryFn: async (context) => {\n const [, parameters] = context.queryKey as [string, GetJettonBalanceParameters];\n if (!parameters.jettonAddress) throw new Error('jettonAddress is required');\n if (!parameters.ownerAddress) throw new Error('ownerAddress is required');\n\n const balance = await getJettonBalance(appKit, parameters);\n return balance;\n },\n queryKey: getJettonBalanceByAddressQueryKey(options),\n };\n};\n\nexport type GetJettonBalanceQueryFnData = Compute<TokenAmount>;\n\nexport const getJettonBalanceByAddressQueryKey = (\n options: Compute<ExactPartial<GetJettonBalanceParameters>> = {},\n): GetJettonBalanceByAddressQueryKey => {\n return ['jetton-balance', filterQueryOptions(options)] as const;\n};\n\nexport type GetJettonBalanceByAddressQueryKey = readonly [\n 'jetton-balance',\n Compute<ExactPartial<GetJettonBalanceParameters>>,\n];\n\nexport type GetJettonBalanceByAddressQueryOptions<selectData = GetJettonBalanceByAddressData> = QueryOptions<\n GetJettonBalanceQueryFnData,\n GetJettonBalanceErrorType,\n selectData,\n GetJettonBalanceByAddressQueryKey\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,gCAAiC;AAIjC,mBAAmC;AAgB5B,MAAM,wCAAwC,CACjD,QACA,UAA4D,CAAC,MACT;AACpD,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,SAAS,QAAQ,QAAQ,iBAAiB,QAAQ,iBAAiB,QAAQ,OAAO,WAAW,KAAK;AAAA,IAClG,SAAS,OAAO,YAAY;AACxB,YAAM,CAAC,EAAE,UAAU,IAAI,QAAQ;AAC/B,UAAI,CAAC,WAAW,cAAe,OAAM,IAAI,MAAM,2BAA2B;AAC1E,UAAI,CAAC,WAAW,aAAc,OAAM,IAAI,MAAM,0BAA0B;AAExE,YAAM,UAAU,UAAM,4CAAiB,QAAQ,UAAU;AACzD,aAAO;AAAA,IACX;AAAA,IACA,UAAU,kCAAkC,OAAO;AAAA,EACvD;AACJ;AAIO,MAAM,oCAAoC,CAC7C,UAA6D,CAAC,MAC1B;AACpC,SAAO,CAAC,sBAAkB,iCAAmB,OAAO,CAAC;AACzD;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 type { TokenAmount } from '@ton/walletkit';
|
|
9
|
+
import type { AppKit } from '../../core/app-kit';
|
|
10
|
+
import type { GetJettonBalanceOptions as GetJettonBalanceParameters } from '../../actions/jettons/get-jetton-balance';
|
|
11
|
+
import type { QueryOptions, QueryParameter } from '../../types/query';
|
|
12
|
+
import type { Compute, ExactPartial } from '../../types/utils';
|
|
13
|
+
export type GetJettonBalanceErrorType = Error;
|
|
14
|
+
export type GetJettonBalanceByAddressData = GetJettonBalanceQueryFnData;
|
|
15
|
+
export type GetJettonBalanceByAddressQueryConfig<selectData = GetJettonBalanceByAddressData> = Compute<ExactPartial<GetJettonBalanceParameters>> & QueryParameter<GetJettonBalanceQueryFnData, GetJettonBalanceErrorType, selectData, GetJettonBalanceByAddressQueryKey>;
|
|
16
|
+
export declare const getJettonBalanceByAddressQueryOptions: <selectData = GetJettonBalanceByAddressData>(appKit: AppKit, options?: GetJettonBalanceByAddressQueryConfig<selectData>) => GetJettonBalanceByAddressQueryOptions<selectData>;
|
|
17
|
+
export type GetJettonBalanceQueryFnData = Compute<TokenAmount>;
|
|
18
|
+
export declare const getJettonBalanceByAddressQueryKey: (options?: Compute<ExactPartial<GetJettonBalanceParameters>>) => GetJettonBalanceByAddressQueryKey;
|
|
19
|
+
export type GetJettonBalanceByAddressQueryKey = readonly [
|
|
20
|
+
'jetton-balance',
|
|
21
|
+
Compute<ExactPartial<GetJettonBalanceParameters>>
|
|
22
|
+
];
|
|
23
|
+
export type GetJettonBalanceByAddressQueryOptions<selectData = GetJettonBalanceByAddressData> = QueryOptions<GetJettonBalanceQueryFnData, GetJettonBalanceErrorType, selectData, GetJettonBalanceByAddressQueryKey>;
|
|
24
|
+
//# sourceMappingURL=get-jetton-balance-by-address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-jetton-balance-by-address.d.ts","sourceRoot":"","sources":["../../../src/queries/jettons/get-jetton-balance-by-address.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,uBAAuB,IAAI,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG/D,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAAC;AAE9C,MAAM,MAAM,6BAA6B,GAAG,2BAA2B,CAAC;AAExE,MAAM,MAAM,oCAAoC,CAAC,UAAU,GAAG,6BAA6B,IAAI,OAAO,CAClG,YAAY,CAAC,0BAA0B,CAAC,CAC3C,GACG,cAAc,CACV,2BAA2B,EAC3B,yBAAyB,EACzB,UAAU,EACV,iCAAiC,CACpC,CAAC;AAEN,eAAO,MAAM,qCAAqC,GAAI,UAAU,GAAG,6BAA6B,EAC5F,QAAQ,MAAM,EACd,UAAS,oCAAoC,CAAC,UAAU,CAAM,KAC/D,qCAAqC,CAAC,UAAU,CAclD,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAE/D,eAAO,MAAM,iCAAiC,GAC1C,UAAS,OAAO,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAAM,KAChE,iCAEF,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,SAAS;IACrD,gBAAgB;IAChB,OAAO,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAAC;CACpD,CAAC;AAEF,MAAM,MAAM,qCAAqC,CAAC,UAAU,GAAG,6BAA6B,IAAI,YAAY,CACxG,2BAA2B,EAC3B,yBAAyB,EACzB,UAAU,EACV,iCAAiC,CACpC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getJettonBalance } from "../../actions/jettons/get-jetton-balance";
|
|
2
|
+
import { filterQueryOptions } from "../../utils";
|
|
3
|
+
const getJettonBalanceByAddressQueryOptions = (appKit, options = {}) => {
|
|
4
|
+
return {
|
|
5
|
+
...options.query,
|
|
6
|
+
enabled: Boolean(options.jettonAddress && options.ownerAddress && (options.query?.enabled ?? true)),
|
|
7
|
+
queryFn: async (context) => {
|
|
8
|
+
const [, parameters] = context.queryKey;
|
|
9
|
+
if (!parameters.jettonAddress) throw new Error("jettonAddress is required");
|
|
10
|
+
if (!parameters.ownerAddress) throw new Error("ownerAddress is required");
|
|
11
|
+
const balance = await getJettonBalance(appKit, parameters);
|
|
12
|
+
return balance;
|
|
13
|
+
},
|
|
14
|
+
queryKey: getJettonBalanceByAddressQueryKey(options)
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const getJettonBalanceByAddressQueryKey = (options = {}) => {
|
|
18
|
+
return ["jetton-balance", filterQueryOptions(options)];
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
getJettonBalanceByAddressQueryKey,
|
|
22
|
+
getJettonBalanceByAddressQueryOptions
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=get-jetton-balance-by-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/jettons/get-jetton-balance-by-address.ts"],"sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { TokenAmount } from '@ton/walletkit';\n\nimport type { AppKit } from '../../core/app-kit';\nimport { getJettonBalance } from '../../actions/jettons/get-jetton-balance';\nimport type { GetJettonBalanceOptions as GetJettonBalanceParameters } from '../../actions/jettons/get-jetton-balance';\nimport type { QueryOptions, QueryParameter } from '../../types/query';\nimport type { Compute, ExactPartial } from '../../types/utils';\nimport { filterQueryOptions } from '../../utils';\n\nexport type GetJettonBalanceErrorType = Error;\n\nexport type GetJettonBalanceByAddressData = GetJettonBalanceQueryFnData;\n\nexport type GetJettonBalanceByAddressQueryConfig<selectData = GetJettonBalanceByAddressData> = Compute<\n ExactPartial<GetJettonBalanceParameters>\n> &\n QueryParameter<\n GetJettonBalanceQueryFnData,\n GetJettonBalanceErrorType,\n selectData,\n GetJettonBalanceByAddressQueryKey\n >;\n\nexport const getJettonBalanceByAddressQueryOptions = <selectData = GetJettonBalanceByAddressData>(\n appKit: AppKit,\n options: GetJettonBalanceByAddressQueryConfig<selectData> = {},\n): GetJettonBalanceByAddressQueryOptions<selectData> => {\n return {\n ...options.query,\n enabled: Boolean(options.jettonAddress && options.ownerAddress && (options.query?.enabled ?? true)),\n queryFn: async (context) => {\n const [, parameters] = context.queryKey as [string, GetJettonBalanceParameters];\n if (!parameters.jettonAddress) throw new Error('jettonAddress is required');\n if (!parameters.ownerAddress) throw new Error('ownerAddress is required');\n\n const balance = await getJettonBalance(appKit, parameters);\n return balance;\n },\n queryKey: getJettonBalanceByAddressQueryKey(options),\n };\n};\n\nexport type GetJettonBalanceQueryFnData = Compute<TokenAmount>;\n\nexport const getJettonBalanceByAddressQueryKey = (\n options: Compute<ExactPartial<GetJettonBalanceParameters>> = {},\n): GetJettonBalanceByAddressQueryKey => {\n return ['jetton-balance', filterQueryOptions(options)] as const;\n};\n\nexport type GetJettonBalanceByAddressQueryKey = readonly [\n 'jetton-balance',\n Compute<ExactPartial<GetJettonBalanceParameters>>,\n];\n\nexport type GetJettonBalanceByAddressQueryOptions<selectData = GetJettonBalanceByAddressData> = QueryOptions<\n GetJettonBalanceQueryFnData,\n GetJettonBalanceErrorType,\n selectData,\n GetJettonBalanceByAddressQueryKey\n>;\n"],"mappings":"AAWA,SAAS,wBAAwB;AAIjC,SAAS,0BAA0B;AAgB5B,MAAM,wCAAwC,CACjD,QACA,UAA4D,CAAC,MACT;AACpD,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,SAAS,QAAQ,QAAQ,iBAAiB,QAAQ,iBAAiB,QAAQ,OAAO,WAAW,KAAK;AAAA,IAClG,SAAS,OAAO,YAAY;AACxB,YAAM,CAAC,EAAE,UAAU,IAAI,QAAQ;AAC/B,UAAI,CAAC,WAAW,cAAe,OAAM,IAAI,MAAM,2BAA2B;AAC1E,UAAI,CAAC,WAAW,aAAc,OAAM,IAAI,MAAM,0BAA0B;AAExE,YAAM,UAAU,MAAM,iBAAiB,QAAQ,UAAU;AACzD,aAAO;AAAA,IACX;AAAA,IACA,UAAU,kCAAkC,OAAO;AAAA,EACvD;AACJ;AAIO,MAAM,oCAAoC,CAC7C,UAA6D,CAAC,MAC1B;AACpC,SAAO,CAAC,kBAAkB,mBAAmB,OAAO,CAAC;AACzD;","names":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var get_jetton_info_exports = {};
|
|
20
|
+
__export(get_jetton_info_exports, {
|
|
21
|
+
getJettonInfoQueryKey: () => getJettonInfoQueryKey,
|
|
22
|
+
getJettonInfoQueryOptions: () => getJettonInfoQueryOptions
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(get_jetton_info_exports);
|
|
25
|
+
var import_get_jetton_info = require("../../actions/jettons/get-jetton-info");
|
|
26
|
+
var import_utils = require("../../utils");
|
|
27
|
+
const getJettonInfoQueryOptions = (appKit, options = {}) => {
|
|
28
|
+
return {
|
|
29
|
+
...options.query,
|
|
30
|
+
enabled: Boolean(options.address && (options.query?.enabled ?? true)),
|
|
31
|
+
queryFn: async (context) => {
|
|
32
|
+
const [, parameters] = context.queryKey;
|
|
33
|
+
if (!parameters.address) throw new Error("address is required");
|
|
34
|
+
const jettonInfo = await (0, import_get_jetton_info.getJettonInfo)(appKit, parameters);
|
|
35
|
+
return jettonInfo;
|
|
36
|
+
},
|
|
37
|
+
queryKey: getJettonInfoQueryKey(options)
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
const getJettonInfoQueryKey = (options = {}) => {
|
|
41
|
+
return ["jetton-info", (0, import_utils.filterQueryOptions)(options)];
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=get-jetton-info.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/jettons/get-jetton-info.ts"],"sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { AppKit } from '../../core/app-kit';\nimport { getJettonInfo } from '../../actions/jettons/get-jetton-info';\nimport type { GetJettonInfoOptions } from '../../actions/jettons/get-jetton-info';\nimport type { GetJettonInfoReturnType } from '../../actions/jettons/get-jetton-info';\nimport type { QueryOptions, QueryParameter } from '../../types/query';\nimport type { Compute, ExactPartial } from '../../types/utils';\nimport { filterQueryOptions } from '../../utils';\n\nexport type GetJettonInfoErrorType = Error;\n\nexport type GetJettonInfoQueryConfig<selectData = GetJettonInfoData> = Compute<ExactPartial<GetJettonInfoOptions>> &\n QueryParameter<GetJettonInfoQueryFnData, GetJettonInfoErrorType, selectData, GetJettonInfoQueryKey>;\n\nexport const getJettonInfoQueryOptions = <selectData = GetJettonInfoData>(\n appKit: AppKit,\n options: GetJettonInfoQueryConfig<selectData> = {},\n): GetJettonInfoQueryOptions<selectData> => {\n return {\n ...options.query,\n enabled: Boolean(options.address && (options.query?.enabled ?? true)),\n queryFn: async (context) => {\n const [, parameters] = context.queryKey as [string, GetJettonInfoOptions];\n if (!parameters.address) throw new Error('address is required');\n\n const jettonInfo = await getJettonInfo(appKit, parameters);\n return jettonInfo;\n },\n queryKey: getJettonInfoQueryKey(options),\n };\n};\n\nexport type GetJettonInfoQueryFnData = Compute<Awaited<GetJettonInfoReturnType>>;\n\nexport type GetJettonInfoData = GetJettonInfoQueryFnData;\n\nexport const getJettonInfoQueryKey = (\n options: Compute<ExactPartial<GetJettonInfoOptions>> = {},\n): GetJettonInfoQueryKey => {\n return ['jetton-info', filterQueryOptions(options)] as const;\n};\n\nexport type GetJettonInfoQueryKey = readonly ['jetton-info', Compute<ExactPartial<GetJettonInfoOptions>>];\n\nexport type GetJettonInfoQueryOptions<selectData = GetJettonInfoData> = QueryOptions<\n GetJettonInfoQueryFnData,\n GetJettonInfoErrorType,\n selectData,\n GetJettonInfoQueryKey\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,6BAA8B;AAK9B,mBAAmC;AAO5B,MAAM,4BAA4B,CACrC,QACA,UAAgD,CAAC,MACT;AACxC,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,SAAS,QAAQ,QAAQ,YAAY,QAAQ,OAAO,WAAW,KAAK;AAAA,IACpE,SAAS,OAAO,YAAY;AACxB,YAAM,CAAC,EAAE,UAAU,IAAI,QAAQ;AAC/B,UAAI,CAAC,WAAW,QAAS,OAAM,IAAI,MAAM,qBAAqB;AAE9D,YAAM,aAAa,UAAM,sCAAc,QAAQ,UAAU;AACzD,aAAO;AAAA,IACX;AAAA,IACA,UAAU,sBAAsB,OAAO;AAAA,EAC3C;AACJ;AAMO,MAAM,wBAAwB,CACjC,UAAuD,CAAC,MAChC;AACxB,SAAO,CAAC,mBAAe,iCAAmB,OAAO,CAAC;AACtD;","names":[]}
|
|
@@ -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 type { AppKit } from '../../core/app-kit';
|
|
9
|
+
import type { GetJettonInfoOptions } from '../../actions/jettons/get-jetton-info';
|
|
10
|
+
import type { GetJettonInfoReturnType } from '../../actions/jettons/get-jetton-info';
|
|
11
|
+
import type { QueryOptions, QueryParameter } from '../../types/query';
|
|
12
|
+
import type { Compute, ExactPartial } from '../../types/utils';
|
|
13
|
+
export type GetJettonInfoErrorType = Error;
|
|
14
|
+
export type GetJettonInfoQueryConfig<selectData = GetJettonInfoData> = Compute<ExactPartial<GetJettonInfoOptions>> & QueryParameter<GetJettonInfoQueryFnData, GetJettonInfoErrorType, selectData, GetJettonInfoQueryKey>;
|
|
15
|
+
export declare const getJettonInfoQueryOptions: <selectData = GetJettonInfoData>(appKit: AppKit, options?: GetJettonInfoQueryConfig<selectData>) => GetJettonInfoQueryOptions<selectData>;
|
|
16
|
+
export type GetJettonInfoQueryFnData = Compute<Awaited<GetJettonInfoReturnType>>;
|
|
17
|
+
export type GetJettonInfoData = GetJettonInfoQueryFnData;
|
|
18
|
+
export declare const getJettonInfoQueryKey: (options?: Compute<ExactPartial<GetJettonInfoOptions>>) => GetJettonInfoQueryKey;
|
|
19
|
+
export type GetJettonInfoQueryKey = readonly ['jetton-info', Compute<ExactPartial<GetJettonInfoOptions>>];
|
|
20
|
+
export type GetJettonInfoQueryOptions<selectData = GetJettonInfoData> = QueryOptions<GetJettonInfoQueryFnData, GetJettonInfoErrorType, selectData, GetJettonInfoQueryKey>;
|
|
21
|
+
//# sourceMappingURL=get-jetton-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-jetton-info.d.ts","sourceRoot":"","sources":["../../../src/queries/jettons/get-jetton-info.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG/D,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC;AAE3C,MAAM,MAAM,wBAAwB,CAAC,UAAU,GAAG,iBAAiB,IAAI,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC,GAC9G,cAAc,CAAC,wBAAwB,EAAE,sBAAsB,EAAE,UAAU,EAAE,qBAAqB,CAAC,CAAC;AAExG,eAAO,MAAM,yBAAyB,GAAI,UAAU,GAAG,iBAAiB,EACpE,QAAQ,MAAM,EACd,UAAS,wBAAwB,CAAC,UAAU,CAAM,KACnD,yBAAyB,CAAC,UAAU,CAatC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC;AAEjF,MAAM,MAAM,iBAAiB,GAAG,wBAAwB,CAAC;AAEzD,eAAO,MAAM,qBAAqB,GAC9B,UAAS,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAM,KAC1D,qBAEF,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,SAAS,CAAC,aAAa,EAAE,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;AAE1G,MAAM,MAAM,yBAAyB,CAAC,UAAU,GAAG,iBAAiB,IAAI,YAAY,CAChF,wBAAwB,EACxB,sBAAsB,EACtB,UAAU,EACV,qBAAqB,CACxB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getJettonInfo } from "../../actions/jettons/get-jetton-info";
|
|
2
|
+
import { filterQueryOptions } from "../../utils";
|
|
3
|
+
const getJettonInfoQueryOptions = (appKit, options = {}) => {
|
|
4
|
+
return {
|
|
5
|
+
...options.query,
|
|
6
|
+
enabled: Boolean(options.address && (options.query?.enabled ?? true)),
|
|
7
|
+
queryFn: async (context) => {
|
|
8
|
+
const [, parameters] = context.queryKey;
|
|
9
|
+
if (!parameters.address) throw new Error("address is required");
|
|
10
|
+
const jettonInfo = await getJettonInfo(appKit, parameters);
|
|
11
|
+
return jettonInfo;
|
|
12
|
+
},
|
|
13
|
+
queryKey: getJettonInfoQueryKey(options)
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
const getJettonInfoQueryKey = (options = {}) => {
|
|
17
|
+
return ["jetton-info", filterQueryOptions(options)];
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
getJettonInfoQueryKey,
|
|
21
|
+
getJettonInfoQueryOptions
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=get-jetton-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/jettons/get-jetton-info.ts"],"sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { AppKit } from '../../core/app-kit';\nimport { getJettonInfo } from '../../actions/jettons/get-jetton-info';\nimport type { GetJettonInfoOptions } from '../../actions/jettons/get-jetton-info';\nimport type { GetJettonInfoReturnType } from '../../actions/jettons/get-jetton-info';\nimport type { QueryOptions, QueryParameter } from '../../types/query';\nimport type { Compute, ExactPartial } from '../../types/utils';\nimport { filterQueryOptions } from '../../utils';\n\nexport type GetJettonInfoErrorType = Error;\n\nexport type GetJettonInfoQueryConfig<selectData = GetJettonInfoData> = Compute<ExactPartial<GetJettonInfoOptions>> &\n QueryParameter<GetJettonInfoQueryFnData, GetJettonInfoErrorType, selectData, GetJettonInfoQueryKey>;\n\nexport const getJettonInfoQueryOptions = <selectData = GetJettonInfoData>(\n appKit: AppKit,\n options: GetJettonInfoQueryConfig<selectData> = {},\n): GetJettonInfoQueryOptions<selectData> => {\n return {\n ...options.query,\n enabled: Boolean(options.address && (options.query?.enabled ?? true)),\n queryFn: async (context) => {\n const [, parameters] = context.queryKey as [string, GetJettonInfoOptions];\n if (!parameters.address) throw new Error('address is required');\n\n const jettonInfo = await getJettonInfo(appKit, parameters);\n return jettonInfo;\n },\n queryKey: getJettonInfoQueryKey(options),\n };\n};\n\nexport type GetJettonInfoQueryFnData = Compute<Awaited<GetJettonInfoReturnType>>;\n\nexport type GetJettonInfoData = GetJettonInfoQueryFnData;\n\nexport const getJettonInfoQueryKey = (\n options: Compute<ExactPartial<GetJettonInfoOptions>> = {},\n): GetJettonInfoQueryKey => {\n return ['jetton-info', filterQueryOptions(options)] as const;\n};\n\nexport type GetJettonInfoQueryKey = readonly ['jetton-info', Compute<ExactPartial<GetJettonInfoOptions>>];\n\nexport type GetJettonInfoQueryOptions<selectData = GetJettonInfoData> = QueryOptions<\n GetJettonInfoQueryFnData,\n GetJettonInfoErrorType,\n selectData,\n GetJettonInfoQueryKey\n>;\n"],"mappings":"AASA,SAAS,qBAAqB;AAK9B,SAAS,0BAA0B;AAO5B,MAAM,4BAA4B,CACrC,QACA,UAAgD,CAAC,MACT;AACxC,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,SAAS,QAAQ,QAAQ,YAAY,QAAQ,OAAO,WAAW,KAAK;AAAA,IACpE,SAAS,OAAO,YAAY;AACxB,YAAM,CAAC,EAAE,UAAU,IAAI,QAAQ;AAC/B,UAAI,CAAC,WAAW,QAAS,OAAM,IAAI,MAAM,qBAAqB;AAE9D,YAAM,aAAa,MAAM,cAAc,QAAQ,UAAU;AACzD,aAAO;AAAA,IACX;AAAA,IACA,UAAU,sBAAsB,OAAO;AAAA,EAC3C;AACJ;AAMO,MAAM,wBAAwB,CACjC,UAAuD,CAAC,MAChC;AACxB,SAAO,CAAC,eAAe,mBAAmB,OAAO,CAAC;AACtD;","names":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var get_jetton_wallet_address_exports = {};
|
|
20
|
+
__export(get_jetton_wallet_address_exports, {
|
|
21
|
+
getJettonWalletAddressQueryKey: () => getJettonWalletAddressQueryKey,
|
|
22
|
+
getJettonWalletAddressQueryOptions: () => getJettonWalletAddressQueryOptions
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(get_jetton_wallet_address_exports);
|
|
25
|
+
var import_get_jetton_wallet_address = require("../../actions/jettons/get-jetton-wallet-address");
|
|
26
|
+
var import_utils = require("../../utils");
|
|
27
|
+
const getJettonWalletAddressQueryOptions = (appKit, options = {}) => {
|
|
28
|
+
return {
|
|
29
|
+
...options.query,
|
|
30
|
+
enabled: Boolean(options.jettonAddress && options.ownerAddress && (options.query?.enabled ?? true)),
|
|
31
|
+
queryFn: async (context) => {
|
|
32
|
+
const [, parameters] = context.queryKey;
|
|
33
|
+
if (!parameters.jettonAddress) throw new Error("jettonAddress is required");
|
|
34
|
+
if (!parameters.ownerAddress) throw new Error("ownerAddress is required");
|
|
35
|
+
const jettonWalletAddress = await (0, import_get_jetton_wallet_address.getJettonWalletAddress)(appKit, parameters);
|
|
36
|
+
return jettonWalletAddress;
|
|
37
|
+
},
|
|
38
|
+
queryKey: getJettonWalletAddressQueryKey(options)
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const getJettonWalletAddressQueryKey = (options = {}) => {
|
|
42
|
+
return ["jetton-wallet-address", (0, import_utils.filterQueryOptions)(options)];
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=get-jetton-wallet-address.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/jettons/get-jetton-wallet-address.ts"],"sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { UserFriendlyAddress } from '@ton/walletkit';\n\nimport type { AppKit } from '../../core/app-kit';\nimport { getJettonWalletAddress } from '../../actions/jettons/get-jetton-wallet-address';\nimport type { GetJettonWalletAddressOptions as GetJettonWalletAddressParameters } from '../../actions/jettons/get-jetton-wallet-address';\nimport type { QueryOptions, QueryParameter } from '../../types/query';\nimport type { Compute, ExactPartial } from '../../types/utils';\nimport { filterQueryOptions } from '../../utils';\n\nexport type GetJettonWalletAddressErrorType = Error;\n\nexport type GetJettonWalletAddressQueryConfig<selectData = GetJettonWalletAddressData> = Compute<\n ExactPartial<GetJettonWalletAddressParameters>\n> &\n QueryParameter<\n GetJettonWalletAddressQueryFnData,\n GetJettonWalletAddressErrorType,\n selectData,\n GetJettonWalletAddressQueryKey\n >;\n\nexport const getJettonWalletAddressQueryOptions = <selectData = GetJettonWalletAddressData>(\n appKit: AppKit,\n options: GetJettonWalletAddressQueryConfig<selectData> = {},\n): GetJettonWalletAddressQueryOptions<selectData> => {\n return {\n ...options.query,\n enabled: Boolean(options.jettonAddress && options.ownerAddress && (options.query?.enabled ?? true)),\n queryFn: async (context) => {\n const [, parameters] = context.queryKey as [string, GetJettonWalletAddressParameters];\n if (!parameters.jettonAddress) throw new Error('jettonAddress is required');\n if (!parameters.ownerAddress) throw new Error('ownerAddress is required');\n\n const jettonWalletAddress = await getJettonWalletAddress(appKit, parameters);\n return jettonWalletAddress;\n },\n queryKey: getJettonWalletAddressQueryKey(options),\n };\n};\n\nexport type GetJettonWalletAddressQueryFnData = Compute<UserFriendlyAddress>;\n\nexport type GetJettonWalletAddressData = GetJettonWalletAddressQueryFnData;\n\nexport const getJettonWalletAddressQueryKey = (\n options: Compute<ExactPartial<GetJettonWalletAddressParameters>> = {},\n): GetJettonWalletAddressQueryKey => {\n return ['jetton-wallet-address', filterQueryOptions(options)] as const;\n};\n\nexport type GetJettonWalletAddressQueryKey = readonly [\n 'jetton-wallet-address',\n Compute<ExactPartial<GetJettonWalletAddressParameters>>,\n];\n\nexport type GetJettonWalletAddressQueryOptions<selectData = GetJettonWalletAddressData> = QueryOptions<\n GetJettonWalletAddressQueryFnData,\n GetJettonWalletAddressErrorType,\n selectData,\n GetJettonWalletAddressQueryKey\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWA,uCAAuC;AAIvC,mBAAmC;AAc5B,MAAM,qCAAqC,CAC9C,QACA,UAAyD,CAAC,MACT;AACjD,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,SAAS,QAAQ,QAAQ,iBAAiB,QAAQ,iBAAiB,QAAQ,OAAO,WAAW,KAAK;AAAA,IAClG,SAAS,OAAO,YAAY;AACxB,YAAM,CAAC,EAAE,UAAU,IAAI,QAAQ;AAC/B,UAAI,CAAC,WAAW,cAAe,OAAM,IAAI,MAAM,2BAA2B;AAC1E,UAAI,CAAC,WAAW,aAAc,OAAM,IAAI,MAAM,0BAA0B;AAExE,YAAM,sBAAsB,UAAM,yDAAuB,QAAQ,UAAU;AAC3E,aAAO;AAAA,IACX;AAAA,IACA,UAAU,+BAA+B,OAAO;AAAA,EACpD;AACJ;AAMO,MAAM,iCAAiC,CAC1C,UAAmE,CAAC,MACnC;AACjC,SAAO,CAAC,6BAAyB,iCAAmB,OAAO,CAAC;AAChE;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 type { UserFriendlyAddress } from '@ton/walletkit';
|
|
9
|
+
import type { AppKit } from '../../core/app-kit';
|
|
10
|
+
import type { GetJettonWalletAddressOptions as GetJettonWalletAddressParameters } from '../../actions/jettons/get-jetton-wallet-address';
|
|
11
|
+
import type { QueryOptions, QueryParameter } from '../../types/query';
|
|
12
|
+
import type { Compute, ExactPartial } from '../../types/utils';
|
|
13
|
+
export type GetJettonWalletAddressErrorType = Error;
|
|
14
|
+
export type GetJettonWalletAddressQueryConfig<selectData = GetJettonWalletAddressData> = Compute<ExactPartial<GetJettonWalletAddressParameters>> & QueryParameter<GetJettonWalletAddressQueryFnData, GetJettonWalletAddressErrorType, selectData, GetJettonWalletAddressQueryKey>;
|
|
15
|
+
export declare const getJettonWalletAddressQueryOptions: <selectData = GetJettonWalletAddressData>(appKit: AppKit, options?: GetJettonWalletAddressQueryConfig<selectData>) => GetJettonWalletAddressQueryOptions<selectData>;
|
|
16
|
+
export type GetJettonWalletAddressQueryFnData = Compute<UserFriendlyAddress>;
|
|
17
|
+
export type GetJettonWalletAddressData = GetJettonWalletAddressQueryFnData;
|
|
18
|
+
export declare const getJettonWalletAddressQueryKey: (options?: Compute<ExactPartial<GetJettonWalletAddressParameters>>) => GetJettonWalletAddressQueryKey;
|
|
19
|
+
export type GetJettonWalletAddressQueryKey = readonly [
|
|
20
|
+
'jetton-wallet-address',
|
|
21
|
+
Compute<ExactPartial<GetJettonWalletAddressParameters>>
|
|
22
|
+
];
|
|
23
|
+
export type GetJettonWalletAddressQueryOptions<selectData = GetJettonWalletAddressData> = QueryOptions<GetJettonWalletAddressQueryFnData, GetJettonWalletAddressErrorType, selectData, GetJettonWalletAddressQueryKey>;
|
|
24
|
+
//# sourceMappingURL=get-jetton-wallet-address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-jetton-wallet-address.d.ts","sourceRoot":"","sources":["../../../src/queries/jettons/get-jetton-wallet-address.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,6BAA6B,IAAI,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AACzI,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG/D,MAAM,MAAM,+BAA+B,GAAG,KAAK,CAAC;AAEpD,MAAM,MAAM,iCAAiC,CAAC,UAAU,GAAG,0BAA0B,IAAI,OAAO,CAC5F,YAAY,CAAC,gCAAgC,CAAC,CACjD,GACG,cAAc,CACV,iCAAiC,EACjC,+BAA+B,EAC/B,UAAU,EACV,8BAA8B,CACjC,CAAC;AAEN,eAAO,MAAM,kCAAkC,GAAI,UAAU,GAAG,0BAA0B,EACtF,QAAQ,MAAM,EACd,UAAS,iCAAiC,CAAC,UAAU,CAAM,KAC5D,kCAAkC,CAAC,UAAU,CAc/C,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAE7E,MAAM,MAAM,0BAA0B,GAAG,iCAAiC,CAAC;AAE3E,eAAO,MAAM,8BAA8B,GACvC,UAAS,OAAO,CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAM,KACtE,8BAEF,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,SAAS;IAClD,uBAAuB;IACvB,OAAO,CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAC;CAC1D,CAAC;AAEF,MAAM,MAAM,kCAAkC,CAAC,UAAU,GAAG,0BAA0B,IAAI,YAAY,CAClG,iCAAiC,EACjC,+BAA+B,EAC/B,UAAU,EACV,8BAA8B,CACjC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { getJettonWalletAddress } from "../../actions/jettons/get-jetton-wallet-address";
|
|
2
|
+
import { filterQueryOptions } from "../../utils";
|
|
3
|
+
const getJettonWalletAddressQueryOptions = (appKit, options = {}) => {
|
|
4
|
+
return {
|
|
5
|
+
...options.query,
|
|
6
|
+
enabled: Boolean(options.jettonAddress && options.ownerAddress && (options.query?.enabled ?? true)),
|
|
7
|
+
queryFn: async (context) => {
|
|
8
|
+
const [, parameters] = context.queryKey;
|
|
9
|
+
if (!parameters.jettonAddress) throw new Error("jettonAddress is required");
|
|
10
|
+
if (!parameters.ownerAddress) throw new Error("ownerAddress is required");
|
|
11
|
+
const jettonWalletAddress = await getJettonWalletAddress(appKit, parameters);
|
|
12
|
+
return jettonWalletAddress;
|
|
13
|
+
},
|
|
14
|
+
queryKey: getJettonWalletAddressQueryKey(options)
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const getJettonWalletAddressQueryKey = (options = {}) => {
|
|
18
|
+
return ["jetton-wallet-address", filterQueryOptions(options)];
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
getJettonWalletAddressQueryKey,
|
|
22
|
+
getJettonWalletAddressQueryOptions
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=get-jetton-wallet-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/jettons/get-jetton-wallet-address.ts"],"sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { UserFriendlyAddress } from '@ton/walletkit';\n\nimport type { AppKit } from '../../core/app-kit';\nimport { getJettonWalletAddress } from '../../actions/jettons/get-jetton-wallet-address';\nimport type { GetJettonWalletAddressOptions as GetJettonWalletAddressParameters } from '../../actions/jettons/get-jetton-wallet-address';\nimport type { QueryOptions, QueryParameter } from '../../types/query';\nimport type { Compute, ExactPartial } from '../../types/utils';\nimport { filterQueryOptions } from '../../utils';\n\nexport type GetJettonWalletAddressErrorType = Error;\n\nexport type GetJettonWalletAddressQueryConfig<selectData = GetJettonWalletAddressData> = Compute<\n ExactPartial<GetJettonWalletAddressParameters>\n> &\n QueryParameter<\n GetJettonWalletAddressQueryFnData,\n GetJettonWalletAddressErrorType,\n selectData,\n GetJettonWalletAddressQueryKey\n >;\n\nexport const getJettonWalletAddressQueryOptions = <selectData = GetJettonWalletAddressData>(\n appKit: AppKit,\n options: GetJettonWalletAddressQueryConfig<selectData> = {},\n): GetJettonWalletAddressQueryOptions<selectData> => {\n return {\n ...options.query,\n enabled: Boolean(options.jettonAddress && options.ownerAddress && (options.query?.enabled ?? true)),\n queryFn: async (context) => {\n const [, parameters] = context.queryKey as [string, GetJettonWalletAddressParameters];\n if (!parameters.jettonAddress) throw new Error('jettonAddress is required');\n if (!parameters.ownerAddress) throw new Error('ownerAddress is required');\n\n const jettonWalletAddress = await getJettonWalletAddress(appKit, parameters);\n return jettonWalletAddress;\n },\n queryKey: getJettonWalletAddressQueryKey(options),\n };\n};\n\nexport type GetJettonWalletAddressQueryFnData = Compute<UserFriendlyAddress>;\n\nexport type GetJettonWalletAddressData = GetJettonWalletAddressQueryFnData;\n\nexport const getJettonWalletAddressQueryKey = (\n options: Compute<ExactPartial<GetJettonWalletAddressParameters>> = {},\n): GetJettonWalletAddressQueryKey => {\n return ['jetton-wallet-address', filterQueryOptions(options)] as const;\n};\n\nexport type GetJettonWalletAddressQueryKey = readonly [\n 'jetton-wallet-address',\n Compute<ExactPartial<GetJettonWalletAddressParameters>>,\n];\n\nexport type GetJettonWalletAddressQueryOptions<selectData = GetJettonWalletAddressData> = QueryOptions<\n GetJettonWalletAddressQueryFnData,\n GetJettonWalletAddressErrorType,\n selectData,\n GetJettonWalletAddressQueryKey\n>;\n"],"mappings":"AAWA,SAAS,8BAA8B;AAIvC,SAAS,0BAA0B;AAc5B,MAAM,qCAAqC,CAC9C,QACA,UAAyD,CAAC,MACT;AACjD,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,SAAS,QAAQ,QAAQ,iBAAiB,QAAQ,iBAAiB,QAAQ,OAAO,WAAW,KAAK;AAAA,IAClG,SAAS,OAAO,YAAY;AACxB,YAAM,CAAC,EAAE,UAAU,IAAI,QAAQ;AAC/B,UAAI,CAAC,WAAW,cAAe,OAAM,IAAI,MAAM,2BAA2B;AAC1E,UAAI,CAAC,WAAW,aAAc,OAAM,IAAI,MAAM,0BAA0B;AAExE,YAAM,sBAAsB,MAAM,uBAAuB,QAAQ,UAAU;AAC3E,aAAO;AAAA,IACX;AAAA,IACA,UAAU,+BAA+B,OAAO;AAAA,EACpD;AACJ;AAMO,MAAM,iCAAiC,CAC1C,UAAmE,CAAC,MACnC;AACjC,SAAO,CAAC,yBAAyB,mBAAmB,OAAO,CAAC;AAChE;","names":[]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var get_jettons_by_address_exports = {};
|
|
20
|
+
__export(get_jettons_by_address_exports, {
|
|
21
|
+
getJettonsByAddressQueryKey: () => getJettonsByAddressQueryKey,
|
|
22
|
+
getJettonsByAddressQueryOptions: () => getJettonsByAddressQueryOptions
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(get_jettons_by_address_exports);
|
|
25
|
+
var import_get_jettons_by_address = require("../../actions/jettons/get-jettons-by-address");
|
|
26
|
+
var import_utils = require("../../utils");
|
|
27
|
+
const getJettonsByAddressQueryOptions = (appKit, options = {}) => {
|
|
28
|
+
return {
|
|
29
|
+
...options.query,
|
|
30
|
+
enabled: Boolean(options.address && (options.query?.enabled ?? true)),
|
|
31
|
+
queryFn: async (context) => {
|
|
32
|
+
const [, parameters] = context.queryKey;
|
|
33
|
+
if (!parameters.address) throw new Error("address is required");
|
|
34
|
+
const jettons = await (0, import_get_jettons_by_address.getJettonsByAddress)(appKit, parameters);
|
|
35
|
+
return jettons;
|
|
36
|
+
},
|
|
37
|
+
queryKey: getJettonsByAddressQueryKey(options)
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
const getJettonsByAddressQueryKey = (options = {}) => {
|
|
41
|
+
return ["jettons", (0, import_utils.filterQueryOptions)(options)];
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=get-jettons-by-address.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/jettons/get-jettons-by-address.ts"],"sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { AppKit } from '../../core/app-kit';\nimport { getJettonsByAddress } from '../../actions/jettons/get-jettons-by-address';\nimport type { GetJettonsByAddressOptions } from '../../actions/jettons/get-jettons-by-address';\nimport type { QueryOptions, QueryParameter } from '../../types/query';\nimport type { Compute, ExactPartial } from '../../types/utils';\nimport { filterQueryOptions } from '../../utils';\nimport type { GetJettonsByAddressReturnType } from '../../actions/jettons/get-jettons-by-address';\n\nexport type GetJettonsErrorType = Error;\n\nexport type GetJettonsByAddressData = GetJettonsQueryFnData;\n\nexport type GetJettonsByAddressQueryConfig<selectData = GetJettonsByAddressData> = Compute<\n ExactPartial<GetJettonsByAddressOptions>\n> &\n QueryParameter<GetJettonsQueryFnData, GetJettonsErrorType, selectData, GetJettonsByAddressQueryKey>;\n\nexport const getJettonsByAddressQueryOptions = <selectData = GetJettonsByAddressData>(\n appKit: AppKit,\n options: GetJettonsByAddressQueryConfig<selectData> = {},\n): GetJettonsByAddressQueryOptions<selectData> => {\n return {\n ...options.query,\n enabled: Boolean(options.address && (options.query?.enabled ?? true)),\n queryFn: async (context) => {\n const [, parameters] = context.queryKey as [string, GetJettonsByAddressOptions];\n if (!parameters.address) throw new Error('address is required');\n\n const jettons = await getJettonsByAddress(appKit, parameters);\n return jettons;\n },\n queryKey: getJettonsByAddressQueryKey(options),\n };\n};\n\nexport type GetJettonsQueryFnData = Compute<Awaited<GetJettonsByAddressReturnType>>;\n\nexport const getJettonsByAddressQueryKey = (\n options: Compute<ExactPartial<GetJettonsByAddressOptions>> = {},\n): GetJettonsByAddressQueryKey => {\n return ['jettons', filterQueryOptions(options)] as const;\n};\n\nexport type GetJettonsByAddressQueryKey = readonly ['jettons', Compute<ExactPartial<GetJettonsByAddressOptions>>];\n\nexport type GetJettonsByAddressQueryOptions<selectData = GetJettonsByAddressData> = QueryOptions<\n GetJettonsQueryFnData,\n GetJettonsErrorType,\n selectData,\n GetJettonsByAddressQueryKey\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASA,oCAAoC;AAIpC,mBAAmC;AAY5B,MAAM,kCAAkC,CAC3C,QACA,UAAsD,CAAC,MACT;AAC9C,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,SAAS,QAAQ,QAAQ,YAAY,QAAQ,OAAO,WAAW,KAAK;AAAA,IACpE,SAAS,OAAO,YAAY;AACxB,YAAM,CAAC,EAAE,UAAU,IAAI,QAAQ;AAC/B,UAAI,CAAC,WAAW,QAAS,OAAM,IAAI,MAAM,qBAAqB;AAE9D,YAAM,UAAU,UAAM,mDAAoB,QAAQ,UAAU;AAC5D,aAAO;AAAA,IACX;AAAA,IACA,UAAU,4BAA4B,OAAO;AAAA,EACjD;AACJ;AAIO,MAAM,8BAA8B,CACvC,UAA6D,CAAC,MAChC;AAC9B,SAAO,CAAC,eAAW,iCAAmB,OAAO,CAAC;AAClD;","names":[]}
|
|
@@ -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 type { AppKit } from '../../core/app-kit';
|
|
9
|
+
import type { GetJettonsByAddressOptions } from '../../actions/jettons/get-jettons-by-address';
|
|
10
|
+
import type { QueryOptions, QueryParameter } from '../../types/query';
|
|
11
|
+
import type { Compute, ExactPartial } from '../../types/utils';
|
|
12
|
+
import type { GetJettonsByAddressReturnType } from '../../actions/jettons/get-jettons-by-address';
|
|
13
|
+
export type GetJettonsErrorType = Error;
|
|
14
|
+
export type GetJettonsByAddressData = GetJettonsQueryFnData;
|
|
15
|
+
export type GetJettonsByAddressQueryConfig<selectData = GetJettonsByAddressData> = Compute<ExactPartial<GetJettonsByAddressOptions>> & QueryParameter<GetJettonsQueryFnData, GetJettonsErrorType, selectData, GetJettonsByAddressQueryKey>;
|
|
16
|
+
export declare const getJettonsByAddressQueryOptions: <selectData = GetJettonsByAddressData>(appKit: AppKit, options?: GetJettonsByAddressQueryConfig<selectData>) => GetJettonsByAddressQueryOptions<selectData>;
|
|
17
|
+
export type GetJettonsQueryFnData = Compute<Awaited<GetJettonsByAddressReturnType>>;
|
|
18
|
+
export declare const getJettonsByAddressQueryKey: (options?: Compute<ExactPartial<GetJettonsByAddressOptions>>) => GetJettonsByAddressQueryKey;
|
|
19
|
+
export type GetJettonsByAddressQueryKey = readonly ['jettons', Compute<ExactPartial<GetJettonsByAddressOptions>>];
|
|
20
|
+
export type GetJettonsByAddressQueryOptions<selectData = GetJettonsByAddressData> = QueryOptions<GetJettonsQueryFnData, GetJettonsErrorType, selectData, GetJettonsByAddressQueryKey>;
|
|
21
|
+
//# sourceMappingURL=get-jettons-by-address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-jettons-by-address.d.ts","sourceRoot":"","sources":["../../../src/queries/jettons/get-jettons-by-address.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC/F,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAElG,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAExC,MAAM,MAAM,uBAAuB,GAAG,qBAAqB,CAAC;AAE5D,MAAM,MAAM,8BAA8B,CAAC,UAAU,GAAG,uBAAuB,IAAI,OAAO,CACtF,YAAY,CAAC,0BAA0B,CAAC,CAC3C,GACG,cAAc,CAAC,qBAAqB,EAAE,mBAAmB,EAAE,UAAU,EAAE,2BAA2B,CAAC,CAAC;AAExG,eAAO,MAAM,+BAA+B,GAAI,UAAU,GAAG,uBAAuB,EAChF,QAAQ,MAAM,EACd,UAAS,8BAA8B,CAAC,UAAU,CAAM,KACzD,+BAA+B,CAAC,UAAU,CAa5C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,6BAA6B,CAAC,CAAC,CAAC;AAEpF,eAAO,MAAM,2BAA2B,GACpC,UAAS,OAAO,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAAM,KAChE,2BAEF,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,SAAS,CAAC,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;AAElH,MAAM,MAAM,+BAA+B,CAAC,UAAU,GAAG,uBAAuB,IAAI,YAAY,CAC5F,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,EACV,2BAA2B,CAC9B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getJettonsByAddress } from "../../actions/jettons/get-jettons-by-address";
|
|
2
|
+
import { filterQueryOptions } from "../../utils";
|
|
3
|
+
const getJettonsByAddressQueryOptions = (appKit, options = {}) => {
|
|
4
|
+
return {
|
|
5
|
+
...options.query,
|
|
6
|
+
enabled: Boolean(options.address && (options.query?.enabled ?? true)),
|
|
7
|
+
queryFn: async (context) => {
|
|
8
|
+
const [, parameters] = context.queryKey;
|
|
9
|
+
if (!parameters.address) throw new Error("address is required");
|
|
10
|
+
const jettons = await getJettonsByAddress(appKit, parameters);
|
|
11
|
+
return jettons;
|
|
12
|
+
},
|
|
13
|
+
queryKey: getJettonsByAddressQueryKey(options)
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
const getJettonsByAddressQueryKey = (options = {}) => {
|
|
17
|
+
return ["jettons", filterQueryOptions(options)];
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
getJettonsByAddressQueryKey,
|
|
21
|
+
getJettonsByAddressQueryOptions
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=get-jettons-by-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/jettons/get-jettons-by-address.ts"],"sourcesContent":["/**\n * Copyright (c) TonTech.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\n\nimport type { AppKit } from '../../core/app-kit';\nimport { getJettonsByAddress } from '../../actions/jettons/get-jettons-by-address';\nimport type { GetJettonsByAddressOptions } from '../../actions/jettons/get-jettons-by-address';\nimport type { QueryOptions, QueryParameter } from '../../types/query';\nimport type { Compute, ExactPartial } from '../../types/utils';\nimport { filterQueryOptions } from '../../utils';\nimport type { GetJettonsByAddressReturnType } from '../../actions/jettons/get-jettons-by-address';\n\nexport type GetJettonsErrorType = Error;\n\nexport type GetJettonsByAddressData = GetJettonsQueryFnData;\n\nexport type GetJettonsByAddressQueryConfig<selectData = GetJettonsByAddressData> = Compute<\n ExactPartial<GetJettonsByAddressOptions>\n> &\n QueryParameter<GetJettonsQueryFnData, GetJettonsErrorType, selectData, GetJettonsByAddressQueryKey>;\n\nexport const getJettonsByAddressQueryOptions = <selectData = GetJettonsByAddressData>(\n appKit: AppKit,\n options: GetJettonsByAddressQueryConfig<selectData> = {},\n): GetJettonsByAddressQueryOptions<selectData> => {\n return {\n ...options.query,\n enabled: Boolean(options.address && (options.query?.enabled ?? true)),\n queryFn: async (context) => {\n const [, parameters] = context.queryKey as [string, GetJettonsByAddressOptions];\n if (!parameters.address) throw new Error('address is required');\n\n const jettons = await getJettonsByAddress(appKit, parameters);\n return jettons;\n },\n queryKey: getJettonsByAddressQueryKey(options),\n };\n};\n\nexport type GetJettonsQueryFnData = Compute<Awaited<GetJettonsByAddressReturnType>>;\n\nexport const getJettonsByAddressQueryKey = (\n options: Compute<ExactPartial<GetJettonsByAddressOptions>> = {},\n): GetJettonsByAddressQueryKey => {\n return ['jettons', filterQueryOptions(options)] as const;\n};\n\nexport type GetJettonsByAddressQueryKey = readonly ['jettons', Compute<ExactPartial<GetJettonsByAddressOptions>>];\n\nexport type GetJettonsByAddressQueryOptions<selectData = GetJettonsByAddressData> = QueryOptions<\n GetJettonsQueryFnData,\n GetJettonsErrorType,\n selectData,\n GetJettonsByAddressQueryKey\n>;\n"],"mappings":"AASA,SAAS,2BAA2B;AAIpC,SAAS,0BAA0B;AAY5B,MAAM,kCAAkC,CAC3C,QACA,UAAsD,CAAC,MACT;AAC9C,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,SAAS,QAAQ,QAAQ,YAAY,QAAQ,OAAO,WAAW,KAAK;AAAA,IACpE,SAAS,OAAO,YAAY;AACxB,YAAM,CAAC,EAAE,UAAU,IAAI,QAAQ;AAC/B,UAAI,CAAC,WAAW,QAAS,OAAM,IAAI,MAAM,qBAAqB;AAE9D,YAAM,UAAU,MAAM,oBAAoB,QAAQ,UAAU;AAC5D,aAAO;AAAA,IACX;AAAA,IACA,UAAU,4BAA4B,OAAO;AAAA,EACjD;AACJ;AAIO,MAAM,8BAA8B,CACvC,UAA6D,CAAC,MAChC;AAC9B,SAAO,CAAC,WAAW,mBAAmB,OAAO,CAAC;AAClD;","names":[]}
|