@ton/appkit 0.0.1-alpha.2 → 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/README.md +95 -1
- 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 +84 -3
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/signing/sign-cell.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 { MutateOptions, MutationOptions } from '@tanstack/query-core';\n\nimport { signCell } from '../../actions/signing/sign-cell';\nimport type { SignCellParameters, SignCellReturnType } from '../../actions/signing/sign-cell';\nimport type { AppKit } from '../../core/app-kit';\nimport type { MutationParameter } from '../../types/query';\nimport type { Compute } from '../../types/utils';\n\nexport type SignCellErrorType = Error;\n\nexport type SignCellOptions<context = unknown> = MutationParameter<\n SignCellData,\n SignCellErrorType,\n SignCellVariables,\n context\n>;\n\nexport const signCellMutationOptions = <context = unknown>(\n appKit: AppKit,\n options: SignCellOptions<context> = {},\n): SignCellMutationOptions<context> => {\n return {\n ...options.mutation,\n mutationFn(variables) {\n return signCell(appKit, variables);\n },\n mutationKey: ['signCell'],\n };\n};\n\nexport type SignCellMutationOptions<context = unknown> = MutationOptions<\n SignCellData,\n SignCellErrorType,\n SignCellVariables,\n context\n>;\n\nexport type SignCellData = Compute<SignCellReturnType>;\n\nexport type SignCellVariables = SignCellParameters;\n\nexport type SignCellMutate<context = unknown> = (\n variables: SignCellVariables,\n options?: Compute<MutateOptions<SignCellData, SignCellErrorType, Compute<SignCellVariables>, context>> | undefined,\n) => void;\n\nexport type SignCellMutateAsync<context = unknown> = (\n variables: SignCellVariables,\n options?: Compute<MutateOptions<SignCellData, SignCellErrorType, Compute<SignCellVariables>, context>> | undefined,\n) => Promise<SignCellData>;\n"],"mappings":"AAUA,SAAS,gBAAgB;AAelB,MAAM,0BAA0B,CACnC,QACA,UAAoC,CAAC,MACF;AACnC,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,WAAW,WAAW;AAClB,aAAO,SAAS,QAAQ,SAAS;AAAA,IACrC;AAAA,IACA,aAAa,CAAC,UAAU;AAAA,EAC5B;AACJ;","names":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 sign_text_exports = {};
|
|
20
|
+
__export(sign_text_exports, {
|
|
21
|
+
signTextMutationOptions: () => signTextMutationOptions
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(sign_text_exports);
|
|
24
|
+
var import_sign_text = require("../../actions/signing/sign-text");
|
|
25
|
+
const signTextMutationOptions = (appKit, options = {}) => {
|
|
26
|
+
return {
|
|
27
|
+
...options.mutation,
|
|
28
|
+
mutationFn(variables) {
|
|
29
|
+
return (0, import_sign_text.signText)(appKit, variables);
|
|
30
|
+
},
|
|
31
|
+
mutationKey: ["signText"]
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=sign-text.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/signing/sign-text.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 { MutateOptions, MutationOptions } from '@tanstack/query-core';\n\nimport { signText } from '../../actions/signing/sign-text';\nimport type { SignTextParameters, SignTextReturnType } from '../../actions/signing/sign-text';\nimport type { AppKit } from '../../core/app-kit';\nimport type { MutationParameter } from '../../types/query';\nimport type { Compute } from '../../types/utils';\n\nexport type SignTextErrorType = Error;\n\nexport type SignTextOptions<context = unknown> = MutationParameter<\n SignTextData,\n SignTextErrorType,\n SignTextVariables,\n context\n>;\n\nexport const signTextMutationOptions = <context = unknown>(\n appKit: AppKit,\n options: SignTextOptions<context> = {},\n): SignTextMutationOptions<context> => {\n return {\n ...options.mutation,\n mutationFn(variables) {\n return signText(appKit, variables);\n },\n mutationKey: ['signText'],\n };\n};\n\nexport type SignTextMutationOptions<context = unknown> = MutationOptions<\n SignTextData,\n SignTextErrorType,\n SignTextVariables,\n context\n>;\n\nexport type SignTextData = Compute<SignTextReturnType>;\n\nexport type SignTextVariables = SignTextParameters;\n\nexport type SignTextMutate<context = unknown> = (\n variables: SignTextVariables,\n options?: Compute<MutateOptions<SignTextData, SignTextErrorType, Compute<SignTextVariables>, context>> | undefined,\n) => void;\n\nexport type SignTextMutateAsync<context = unknown> = (\n variables: SignTextVariables,\n options?: Compute<MutateOptions<SignTextData, SignTextErrorType, Compute<SignTextVariables>, context>> | undefined,\n) => Promise<SignTextData>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,uBAAyB;AAelB,MAAM,0BAA0B,CACnC,QACA,UAAoC,CAAC,MACF;AACnC,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,WAAW,WAAW;AAClB,iBAAO,2BAAS,QAAQ,SAAS;AAAA,IACrC;AAAA,IACA,aAAa,CAAC,UAAU;AAAA,EAC5B;AACJ;","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 { MutateOptions, MutationOptions } from '@tanstack/query-core';
|
|
9
|
+
import type { SignTextParameters, SignTextReturnType } from '../../actions/signing/sign-text';
|
|
10
|
+
import type { AppKit } from '../../core/app-kit';
|
|
11
|
+
import type { MutationParameter } from '../../types/query';
|
|
12
|
+
import type { Compute } from '../../types/utils';
|
|
13
|
+
export type SignTextErrorType = Error;
|
|
14
|
+
export type SignTextOptions<context = unknown> = MutationParameter<SignTextData, SignTextErrorType, SignTextVariables, context>;
|
|
15
|
+
export declare const signTextMutationOptions: <context = unknown>(appKit: AppKit, options?: SignTextOptions<context>) => SignTextMutationOptions<context>;
|
|
16
|
+
export type SignTextMutationOptions<context = unknown> = MutationOptions<SignTextData, SignTextErrorType, SignTextVariables, context>;
|
|
17
|
+
export type SignTextData = Compute<SignTextReturnType>;
|
|
18
|
+
export type SignTextVariables = SignTextParameters;
|
|
19
|
+
export type SignTextMutate<context = unknown> = (variables: SignTextVariables, options?: Compute<MutateOptions<SignTextData, SignTextErrorType, Compute<SignTextVariables>, context>> | undefined) => void;
|
|
20
|
+
export type SignTextMutateAsync<context = unknown> = (variables: SignTextVariables, options?: Compute<MutateOptions<SignTextData, SignTextErrorType, Compute<SignTextVariables>, context>> | undefined) => Promise<SignTextData>;
|
|
21
|
+
//# sourceMappingURL=sign-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sign-text.d.ts","sourceRoot":"","sources":["../../../src/queries/signing/sign-text.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAC9F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAEtC,MAAM,MAAM,eAAe,CAAC,OAAO,GAAG,OAAO,IAAI,iBAAiB,CAC9D,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,CACV,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,OAAO,GAAG,OAAO,EACrD,QAAQ,MAAM,EACd,UAAS,eAAe,CAAC,OAAO,CAAM,KACvC,uBAAuB,CAAC,OAAO,CAQjC,CAAC;AAEF,MAAM,MAAM,uBAAuB,CAAC,OAAO,GAAG,OAAO,IAAI,eAAe,CACpE,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,OAAO,CACV,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEvD,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAEnD,MAAM,MAAM,cAAc,CAAC,OAAO,GAAG,OAAO,IAAI,CAC5C,SAAS,EAAE,iBAAiB,EAC5B,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,YAAY,EAAE,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,KACjH,IAAI,CAAC;AAEV,MAAM,MAAM,mBAAmB,CAAC,OAAO,GAAG,OAAO,IAAI,CACjD,SAAS,EAAE,iBAAiB,EAC5B,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,YAAY,EAAE,iBAAiB,EAAE,OAAO,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC,CAAC,GAAG,SAAS,KACjH,OAAO,CAAC,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { signText } from "../../actions/signing/sign-text";
|
|
2
|
+
const signTextMutationOptions = (appKit, options = {}) => {
|
|
3
|
+
return {
|
|
4
|
+
...options.mutation,
|
|
5
|
+
mutationFn(variables) {
|
|
6
|
+
return signText(appKit, variables);
|
|
7
|
+
},
|
|
8
|
+
mutationKey: ["signText"]
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
signTextMutationOptions
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=sign-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/signing/sign-text.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 { MutateOptions, MutationOptions } from '@tanstack/query-core';\n\nimport { signText } from '../../actions/signing/sign-text';\nimport type { SignTextParameters, SignTextReturnType } from '../../actions/signing/sign-text';\nimport type { AppKit } from '../../core/app-kit';\nimport type { MutationParameter } from '../../types/query';\nimport type { Compute } from '../../types/utils';\n\nexport type SignTextErrorType = Error;\n\nexport type SignTextOptions<context = unknown> = MutationParameter<\n SignTextData,\n SignTextErrorType,\n SignTextVariables,\n context\n>;\n\nexport const signTextMutationOptions = <context = unknown>(\n appKit: AppKit,\n options: SignTextOptions<context> = {},\n): SignTextMutationOptions<context> => {\n return {\n ...options.mutation,\n mutationFn(variables) {\n return signText(appKit, variables);\n },\n mutationKey: ['signText'],\n };\n};\n\nexport type SignTextMutationOptions<context = unknown> = MutationOptions<\n SignTextData,\n SignTextErrorType,\n SignTextVariables,\n context\n>;\n\nexport type SignTextData = Compute<SignTextReturnType>;\n\nexport type SignTextVariables = SignTextParameters;\n\nexport type SignTextMutate<context = unknown> = (\n variables: SignTextVariables,\n options?: Compute<MutateOptions<SignTextData, SignTextErrorType, Compute<SignTextVariables>, context>> | undefined,\n) => void;\n\nexport type SignTextMutateAsync<context = unknown> = (\n variables: SignTextVariables,\n options?: Compute<MutateOptions<SignTextData, SignTextErrorType, Compute<SignTextVariables>, context>> | undefined,\n) => Promise<SignTextData>;\n"],"mappings":"AAUA,SAAS,gBAAgB;AAelB,MAAM,0BAA0B,CACnC,QACA,UAAoC,CAAC,MACF;AACnC,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,WAAW,WAAW;AAClB,aAAO,SAAS,QAAQ,SAAS;AAAA,IACrC;AAAA,IACA,aAAa,CAAC,UAAU;AAAA,EAC5B;AACJ;","names":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 build_swap_transaction_exports = {};
|
|
20
|
+
__export(build_swap_transaction_exports, {
|
|
21
|
+
buildSwapTransactionMutationOptions: () => buildSwapTransactionMutationOptions
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(build_swap_transaction_exports);
|
|
24
|
+
var import_build_swap_transaction = require("../../actions/swap/build-swap-transaction");
|
|
25
|
+
const buildSwapTransactionMutationOptions = (appKit, options = {}) => {
|
|
26
|
+
return {
|
|
27
|
+
...options.mutation,
|
|
28
|
+
mutationFn(variables) {
|
|
29
|
+
const { quote, userAddress } = variables;
|
|
30
|
+
if (!quote || !userAddress) {
|
|
31
|
+
throw new Error('Required parameters "quote" and "userAddress" are missing');
|
|
32
|
+
}
|
|
33
|
+
return (0, import_build_swap_transaction.buildSwapTransaction)(appKit, variables);
|
|
34
|
+
},
|
|
35
|
+
mutationKey: ["buildSwapTransaction"]
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=build-swap-transaction.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/swap/build-swap-transaction.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 { MutateOptions, MutationOptions } from '@tanstack/query-core';\n\nimport type { AppKit } from '../../core/app-kit';\nimport type { MutationParameter } from '../../types/query';\nimport type { Compute } from '../../types/utils';\nimport { buildSwapTransaction } from '../../actions/swap/build-swap-transaction';\nimport type {\n BuildSwapTransactionOptions,\n BuildSwapTransactionReturnType,\n} from '../../actions/swap/build-swap-transaction';\n\nexport type BuildSwapTransactionMutationOptions<context = unknown> = MutationParameter<\n BuildSwapTransactionData,\n BuildSwapTransactionErrorType,\n BuildSwapTransactionVariables,\n context\n>;\n\nexport const buildSwapTransactionMutationOptions = <context = unknown>(\n appKit: AppKit,\n options: BuildSwapTransactionMutationOptions<context> = {},\n): BuildSwapTransactionMutationConfig<context> => {\n return {\n ...options.mutation,\n mutationFn(variables) {\n const { quote, userAddress } = variables;\n if (!quote || !userAddress) {\n throw new Error('Required parameters \"quote\" and \"userAddress\" are missing');\n }\n\n return buildSwapTransaction(appKit, variables);\n },\n mutationKey: ['buildSwapTransaction'],\n };\n};\n\nexport type BuildSwapTransactionMutationConfig<context = unknown> = MutationOptions<\n BuildSwapTransactionData,\n BuildSwapTransactionErrorType,\n BuildSwapTransactionVariables,\n context\n>;\n\nexport type BuildSwapTransactionData = Compute<Awaited<BuildSwapTransactionReturnType>>;\n\nexport type BuildSwapTransactionErrorType = Error;\n\nexport type BuildSwapTransactionVariables = BuildSwapTransactionOptions;\n\nexport type BuildSwapTransactionMutate<context = unknown> = (\n variables: BuildSwapTransactionVariables,\n options?:\n | Compute<\n MutateOptions<\n BuildSwapTransactionData,\n BuildSwapTransactionErrorType,\n Compute<BuildSwapTransactionVariables>,\n context\n >\n >\n | undefined,\n) => void;\n\nexport type BuildSwapTransactionMutateAsync<context = unknown> = (\n variables: BuildSwapTransactionVariables,\n options?:\n | Compute<\n MutateOptions<\n BuildSwapTransactionData,\n BuildSwapTransactionErrorType,\n Compute<BuildSwapTransactionVariables>,\n context\n >\n >\n | undefined,\n) => Promise<BuildSwapTransactionData>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaA,oCAAqC;AAa9B,MAAM,sCAAsC,CAC/C,QACA,UAAwD,CAAC,MACX;AAC9C,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,WAAW,WAAW;AAClB,YAAM,EAAE,OAAO,YAAY,IAAI;AAC/B,UAAI,CAAC,SAAS,CAAC,aAAa;AACxB,cAAM,IAAI,MAAM,2DAA2D;AAAA,MAC/E;AAEA,iBAAO,oDAAqB,QAAQ,SAAS;AAAA,IACjD;AAAA,IACA,aAAa,CAAC,sBAAsB;AAAA,EACxC;AACJ;","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 { MutateOptions, MutationOptions } from '@tanstack/query-core';
|
|
9
|
+
import type { AppKit } from '../../core/app-kit';
|
|
10
|
+
import type { MutationParameter } from '../../types/query';
|
|
11
|
+
import type { Compute } from '../../types/utils';
|
|
12
|
+
import type { BuildSwapTransactionOptions, BuildSwapTransactionReturnType } from '../../actions/swap/build-swap-transaction';
|
|
13
|
+
export type BuildSwapTransactionMutationOptions<context = unknown> = MutationParameter<BuildSwapTransactionData, BuildSwapTransactionErrorType, BuildSwapTransactionVariables, context>;
|
|
14
|
+
export declare const buildSwapTransactionMutationOptions: <context = unknown>(appKit: AppKit, options?: BuildSwapTransactionMutationOptions<context>) => BuildSwapTransactionMutationConfig<context>;
|
|
15
|
+
export type BuildSwapTransactionMutationConfig<context = unknown> = MutationOptions<BuildSwapTransactionData, BuildSwapTransactionErrorType, BuildSwapTransactionVariables, context>;
|
|
16
|
+
export type BuildSwapTransactionData = Compute<Awaited<BuildSwapTransactionReturnType>>;
|
|
17
|
+
export type BuildSwapTransactionErrorType = Error;
|
|
18
|
+
export type BuildSwapTransactionVariables = BuildSwapTransactionOptions;
|
|
19
|
+
export type BuildSwapTransactionMutate<context = unknown> = (variables: BuildSwapTransactionVariables, options?: Compute<MutateOptions<BuildSwapTransactionData, BuildSwapTransactionErrorType, Compute<BuildSwapTransactionVariables>, context>> | undefined) => void;
|
|
20
|
+
export type BuildSwapTransactionMutateAsync<context = unknown> = (variables: BuildSwapTransactionVariables, options?: Compute<MutateOptions<BuildSwapTransactionData, BuildSwapTransactionErrorType, Compute<BuildSwapTransactionVariables>, context>> | undefined) => Promise<BuildSwapTransactionData>;
|
|
21
|
+
//# sourceMappingURL=build-swap-transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-swap-transaction.d.ts","sourceRoot":"","sources":["../../../src/queries/swap/build-swap-transaction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE3E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,KAAK,EACR,2BAA2B,EAC3B,8BAA8B,EACjC,MAAM,2CAA2C,CAAC;AAEnD,MAAM,MAAM,mCAAmC,CAAC,OAAO,GAAG,OAAO,IAAI,iBAAiB,CAClF,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,OAAO,CACV,CAAC;AAEF,eAAO,MAAM,mCAAmC,GAAI,OAAO,GAAG,OAAO,EACjE,QAAQ,MAAM,EACd,UAAS,mCAAmC,CAAC,OAAO,CAAM,KAC3D,kCAAkC,CAAC,OAAO,CAa5C,CAAC;AAEF,MAAM,MAAM,kCAAkC,CAAC,OAAO,GAAG,OAAO,IAAI,eAAe,CAC/E,wBAAwB,EACxB,6BAA6B,EAC7B,6BAA6B,EAC7B,OAAO,CACV,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,8BAA8B,CAAC,CAAC,CAAC;AAExF,MAAM,MAAM,6BAA6B,GAAG,KAAK,CAAC;AAElD,MAAM,MAAM,6BAA6B,GAAG,2BAA2B,CAAC;AAExE,MAAM,MAAM,0BAA0B,CAAC,OAAO,GAAG,OAAO,IAAI,CACxD,SAAS,EAAE,6BAA6B,EACxC,OAAO,CAAC,EACF,OAAO,CACH,aAAa,CACT,wBAAwB,EACxB,6BAA6B,EAC7B,OAAO,CAAC,6BAA6B,CAAC,EACtC,OAAO,CACV,CACJ,GACD,SAAS,KACd,IAAI,CAAC;AAEV,MAAM,MAAM,+BAA+B,CAAC,OAAO,GAAG,OAAO,IAAI,CAC7D,SAAS,EAAE,6BAA6B,EACxC,OAAO,CAAC,EACF,OAAO,CACH,aAAa,CACT,wBAAwB,EACxB,6BAA6B,EAC7B,OAAO,CAAC,6BAA6B,CAAC,EACtC,OAAO,CACV,CACJ,GACD,SAAS,KACd,OAAO,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { buildSwapTransaction } from "../../actions/swap/build-swap-transaction";
|
|
2
|
+
const buildSwapTransactionMutationOptions = (appKit, options = {}) => {
|
|
3
|
+
return {
|
|
4
|
+
...options.mutation,
|
|
5
|
+
mutationFn(variables) {
|
|
6
|
+
const { quote, userAddress } = variables;
|
|
7
|
+
if (!quote || !userAddress) {
|
|
8
|
+
throw new Error('Required parameters "quote" and "userAddress" are missing');
|
|
9
|
+
}
|
|
10
|
+
return buildSwapTransaction(appKit, variables);
|
|
11
|
+
},
|
|
12
|
+
mutationKey: ["buildSwapTransaction"]
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
buildSwapTransactionMutationOptions
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=build-swap-transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/swap/build-swap-transaction.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 { MutateOptions, MutationOptions } from '@tanstack/query-core';\n\nimport type { AppKit } from '../../core/app-kit';\nimport type { MutationParameter } from '../../types/query';\nimport type { Compute } from '../../types/utils';\nimport { buildSwapTransaction } from '../../actions/swap/build-swap-transaction';\nimport type {\n BuildSwapTransactionOptions,\n BuildSwapTransactionReturnType,\n} from '../../actions/swap/build-swap-transaction';\n\nexport type BuildSwapTransactionMutationOptions<context = unknown> = MutationParameter<\n BuildSwapTransactionData,\n BuildSwapTransactionErrorType,\n BuildSwapTransactionVariables,\n context\n>;\n\nexport const buildSwapTransactionMutationOptions = <context = unknown>(\n appKit: AppKit,\n options: BuildSwapTransactionMutationOptions<context> = {},\n): BuildSwapTransactionMutationConfig<context> => {\n return {\n ...options.mutation,\n mutationFn(variables) {\n const { quote, userAddress } = variables;\n if (!quote || !userAddress) {\n throw new Error('Required parameters \"quote\" and \"userAddress\" are missing');\n }\n\n return buildSwapTransaction(appKit, variables);\n },\n mutationKey: ['buildSwapTransaction'],\n };\n};\n\nexport type BuildSwapTransactionMutationConfig<context = unknown> = MutationOptions<\n BuildSwapTransactionData,\n BuildSwapTransactionErrorType,\n BuildSwapTransactionVariables,\n context\n>;\n\nexport type BuildSwapTransactionData = Compute<Awaited<BuildSwapTransactionReturnType>>;\n\nexport type BuildSwapTransactionErrorType = Error;\n\nexport type BuildSwapTransactionVariables = BuildSwapTransactionOptions;\n\nexport type BuildSwapTransactionMutate<context = unknown> = (\n variables: BuildSwapTransactionVariables,\n options?:\n | Compute<\n MutateOptions<\n BuildSwapTransactionData,\n BuildSwapTransactionErrorType,\n Compute<BuildSwapTransactionVariables>,\n context\n >\n >\n | undefined,\n) => void;\n\nexport type BuildSwapTransactionMutateAsync<context = unknown> = (\n variables: BuildSwapTransactionVariables,\n options?:\n | Compute<\n MutateOptions<\n BuildSwapTransactionData,\n BuildSwapTransactionErrorType,\n Compute<BuildSwapTransactionVariables>,\n context\n >\n >\n | undefined,\n) => Promise<BuildSwapTransactionData>;\n"],"mappings":"AAaA,SAAS,4BAA4B;AAa9B,MAAM,sCAAsC,CAC/C,QACA,UAAwD,CAAC,MACX;AAC9C,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,WAAW,WAAW;AAClB,YAAM,EAAE,OAAO,YAAY,IAAI;AAC/B,UAAI,CAAC,SAAS,CAAC,aAAa;AACxB,cAAM,IAAI,MAAM,2DAA2D;AAAA,MAC/E;AAEA,aAAO,qBAAqB,QAAQ,SAAS;AAAA,IACjD;AAAA,IACA,aAAa,CAAC,sBAAsB;AAAA,EACxC;AACJ;","names":[]}
|
|
@@ -0,0 +1,54 @@
|
|
|
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_swap_quote_exports = {};
|
|
20
|
+
__export(get_swap_quote_exports, {
|
|
21
|
+
getSwapQuoteQueryKey: () => getSwapQuoteQueryKey,
|
|
22
|
+
getSwapQuoteQueryOptions: () => getSwapQuoteQueryOptions
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(get_swap_quote_exports);
|
|
25
|
+
var import_get_swap_quote = require("../../actions/swap/get-swap-quote");
|
|
26
|
+
var import_utils = require("../../utils");
|
|
27
|
+
const getSwapQuoteQueryOptions = (appKit, options = {}) => {
|
|
28
|
+
return {
|
|
29
|
+
...options.query,
|
|
30
|
+
enabled: Boolean(options.amount && options.from && options.to && (options.query?.enabled ?? true)),
|
|
31
|
+
queryFn: async (context) => {
|
|
32
|
+
const [, parameters] = context.queryKey;
|
|
33
|
+
if (!parameters.amount || !parameters.from || !parameters.to) {
|
|
34
|
+
throw new Error("amount, fromToken, and toToken are required");
|
|
35
|
+
}
|
|
36
|
+
return (0, import_get_swap_quote.getSwapQuote)(appKit, parameters);
|
|
37
|
+
},
|
|
38
|
+
queryKey: getSwapQuoteQueryKey(options)
|
|
39
|
+
// refetchInterval: (query) => {
|
|
40
|
+
// const data = query.state.data as GetSwapQuoteData | undefined;
|
|
41
|
+
// if (!data?.expiresAt) {
|
|
42
|
+
// return false;
|
|
43
|
+
// }
|
|
44
|
+
// const now = Date.now();
|
|
45
|
+
// const expiresAt = data.expiresAt * 1000;
|
|
46
|
+
// const timeUntilExpiration = expiresAt - now;
|
|
47
|
+
// return Math.max(0, timeUntilExpiration);
|
|
48
|
+
// },
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
const getSwapQuoteQueryKey = (options = {}) => {
|
|
52
|
+
return ["swapQuote", (0, import_utils.filterQueryOptions)(options)];
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=get-swap-quote.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/swap/get-swap-quote.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 { getSwapQuote } from '../../actions/swap/get-swap-quote';\nimport type { GetSwapQuoteOptions } from '../../actions/swap/get-swap-quote';\nimport type { GetSwapQuoteReturnType } from '../../actions/swap/get-swap-quote';\nimport type { AppKit } from '../../core/app-kit';\nimport type { QueryOptions, QueryParameter } from '../../types/query';\nimport type { Compute, ExactPartial } from '../../types/utils';\nimport { filterQueryOptions } from '../../utils';\n\nexport type GetSwapQuoteErrorType = Error;\n\nexport type GetSwapQuoteQueryConfig<selectData = GetSwapQuoteData> = Compute<ExactPartial<GetSwapQuoteOptions>> &\n QueryParameter<GetSwapQuoteQueryFnData, GetSwapQuoteErrorType, selectData, GetSwapQuoteQueryKey>;\n\nexport const getSwapQuoteQueryOptions = <selectData = GetSwapQuoteData>(\n appKit: AppKit,\n options: GetSwapQuoteQueryConfig<selectData> = {},\n): GetSwapQuoteQueryOptions<selectData> => {\n return {\n ...options.query,\n enabled: Boolean(options.amount && options.from && options.to && (options.query?.enabled ?? true)),\n queryFn: async (context) => {\n const [, parameters] = context.queryKey as [string, GetSwapQuoteOptions];\n if (!parameters.amount || !parameters.from || !parameters.to) {\n throw new Error('amount, fromToken, and toToken are required');\n }\n\n return getSwapQuote(appKit, parameters);\n },\n queryKey: getSwapQuoteQueryKey(options),\n // refetchInterval: (query) => {\n // const data = query.state.data as GetSwapQuoteData | undefined;\n // if (!data?.expiresAt) {\n // return false;\n // }\n\n // const now = Date.now();\n // const expiresAt = data.expiresAt * 1000;\n // const timeUntilExpiration = expiresAt - now;\n\n // return Math.max(0, timeUntilExpiration);\n // },\n };\n};\n\nexport type GetSwapQuoteQueryFnData = Compute<Awaited<GetSwapQuoteReturnType>>;\n\nexport type GetSwapQuoteData = GetSwapQuoteQueryFnData;\n\nexport const getSwapQuoteQueryKey = (\n options: Compute<ExactPartial<GetSwapQuoteOptions>> = {},\n): GetSwapQuoteQueryKey => {\n return ['swapQuote', filterQueryOptions(options as unknown as Record<string, unknown>)] as const;\n};\n\nexport type GetSwapQuoteQueryKey = readonly ['swapQuote', Compute<ExactPartial<GetSwapQuoteOptions>>];\n\nexport type GetSwapQuoteQueryOptions<selectData = GetSwapQuoteData> = QueryOptions<\n GetSwapQuoteQueryFnData,\n GetSwapQuoteErrorType,\n selectData,\n GetSwapQuoteQueryKey\n>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,4BAA6B;AAM7B,mBAAmC;AAO5B,MAAM,2BAA2B,CACpC,QACA,UAA+C,CAAC,MACT;AACvC,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,SAAS,QAAQ,QAAQ,UAAU,QAAQ,QAAQ,QAAQ,OAAO,QAAQ,OAAO,WAAW,KAAK;AAAA,IACjG,SAAS,OAAO,YAAY;AACxB,YAAM,CAAC,EAAE,UAAU,IAAI,QAAQ;AAC/B,UAAI,CAAC,WAAW,UAAU,CAAC,WAAW,QAAQ,CAAC,WAAW,IAAI;AAC1D,cAAM,IAAI,MAAM,6CAA6C;AAAA,MACjE;AAEA,iBAAO,oCAAa,QAAQ,UAAU;AAAA,IAC1C;AAAA,IACA,UAAU,qBAAqB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa1C;AACJ;AAMO,MAAM,uBAAuB,CAChC,UAAsD,CAAC,MAChC;AACvB,SAAO,CAAC,iBAAa,iCAAmB,OAA6C,CAAC;AAC1F;","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 { GetSwapQuoteOptions } from '../../actions/swap/get-swap-quote';
|
|
9
|
+
import type { GetSwapQuoteReturnType } from '../../actions/swap/get-swap-quote';
|
|
10
|
+
import type { AppKit } from '../../core/app-kit';
|
|
11
|
+
import type { QueryOptions, QueryParameter } from '../../types/query';
|
|
12
|
+
import type { Compute, ExactPartial } from '../../types/utils';
|
|
13
|
+
export type GetSwapQuoteErrorType = Error;
|
|
14
|
+
export type GetSwapQuoteQueryConfig<selectData = GetSwapQuoteData> = Compute<ExactPartial<GetSwapQuoteOptions>> & QueryParameter<GetSwapQuoteQueryFnData, GetSwapQuoteErrorType, selectData, GetSwapQuoteQueryKey>;
|
|
15
|
+
export declare const getSwapQuoteQueryOptions: <selectData = GetSwapQuoteData>(appKit: AppKit, options?: GetSwapQuoteQueryConfig<selectData>) => GetSwapQuoteQueryOptions<selectData>;
|
|
16
|
+
export type GetSwapQuoteQueryFnData = Compute<Awaited<GetSwapQuoteReturnType>>;
|
|
17
|
+
export type GetSwapQuoteData = GetSwapQuoteQueryFnData;
|
|
18
|
+
export declare const getSwapQuoteQueryKey: (options?: Compute<ExactPartial<GetSwapQuoteOptions>>) => GetSwapQuoteQueryKey;
|
|
19
|
+
export type GetSwapQuoteQueryKey = readonly ['swapQuote', Compute<ExactPartial<GetSwapQuoteOptions>>];
|
|
20
|
+
export type GetSwapQuoteQueryOptions<selectData = GetSwapQuoteData> = QueryOptions<GetSwapQuoteQueryFnData, GetSwapQuoteErrorType, selectData, GetSwapQuoteQueryKey>;
|
|
21
|
+
//# sourceMappingURL=get-swap-quote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-swap-quote.d.ts","sourceRoot":"","sources":["../../../src/queries/swap/get-swap-quote.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,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,qBAAqB,GAAG,KAAK,CAAC;AAE1C,MAAM,MAAM,uBAAuB,CAAC,UAAU,GAAG,gBAAgB,IAAI,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC,GAC3G,cAAc,CAAC,uBAAuB,EAAE,qBAAqB,EAAE,UAAU,EAAE,oBAAoB,CAAC,CAAC;AAErG,eAAO,MAAM,wBAAwB,GAAI,UAAU,GAAG,gBAAgB,EAClE,QAAQ,MAAM,EACd,UAAS,uBAAuB,CAAC,UAAU,CAAM,KAClD,wBAAwB,CAAC,UAAU,CA0BrC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,CAAC;AAE/E,MAAM,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAEvD,eAAO,MAAM,oBAAoB,GAC7B,UAAS,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAM,KACzD,oBAEF,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC;AAEtG,MAAM,MAAM,wBAAwB,CAAC,UAAU,GAAG,gBAAgB,IAAI,YAAY,CAC9E,uBAAuB,EACvB,qBAAqB,EACrB,UAAU,EACV,oBAAoB,CACvB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { getSwapQuote } from "../../actions/swap/get-swap-quote";
|
|
2
|
+
import { filterQueryOptions } from "../../utils";
|
|
3
|
+
const getSwapQuoteQueryOptions = (appKit, options = {}) => {
|
|
4
|
+
return {
|
|
5
|
+
...options.query,
|
|
6
|
+
enabled: Boolean(options.amount && options.from && options.to && (options.query?.enabled ?? true)),
|
|
7
|
+
queryFn: async (context) => {
|
|
8
|
+
const [, parameters] = context.queryKey;
|
|
9
|
+
if (!parameters.amount || !parameters.from || !parameters.to) {
|
|
10
|
+
throw new Error("amount, fromToken, and toToken are required");
|
|
11
|
+
}
|
|
12
|
+
return getSwapQuote(appKit, parameters);
|
|
13
|
+
},
|
|
14
|
+
queryKey: getSwapQuoteQueryKey(options)
|
|
15
|
+
// refetchInterval: (query) => {
|
|
16
|
+
// const data = query.state.data as GetSwapQuoteData | undefined;
|
|
17
|
+
// if (!data?.expiresAt) {
|
|
18
|
+
// return false;
|
|
19
|
+
// }
|
|
20
|
+
// const now = Date.now();
|
|
21
|
+
// const expiresAt = data.expiresAt * 1000;
|
|
22
|
+
// const timeUntilExpiration = expiresAt - now;
|
|
23
|
+
// return Math.max(0, timeUntilExpiration);
|
|
24
|
+
// },
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
const getSwapQuoteQueryKey = (options = {}) => {
|
|
28
|
+
return ["swapQuote", filterQueryOptions(options)];
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
getSwapQuoteQueryKey,
|
|
32
|
+
getSwapQuoteQueryOptions
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=get-swap-quote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/swap/get-swap-quote.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 { getSwapQuote } from '../../actions/swap/get-swap-quote';\nimport type { GetSwapQuoteOptions } from '../../actions/swap/get-swap-quote';\nimport type { GetSwapQuoteReturnType } from '../../actions/swap/get-swap-quote';\nimport type { AppKit } from '../../core/app-kit';\nimport type { QueryOptions, QueryParameter } from '../../types/query';\nimport type { Compute, ExactPartial } from '../../types/utils';\nimport { filterQueryOptions } from '../../utils';\n\nexport type GetSwapQuoteErrorType = Error;\n\nexport type GetSwapQuoteQueryConfig<selectData = GetSwapQuoteData> = Compute<ExactPartial<GetSwapQuoteOptions>> &\n QueryParameter<GetSwapQuoteQueryFnData, GetSwapQuoteErrorType, selectData, GetSwapQuoteQueryKey>;\n\nexport const getSwapQuoteQueryOptions = <selectData = GetSwapQuoteData>(\n appKit: AppKit,\n options: GetSwapQuoteQueryConfig<selectData> = {},\n): GetSwapQuoteQueryOptions<selectData> => {\n return {\n ...options.query,\n enabled: Boolean(options.amount && options.from && options.to && (options.query?.enabled ?? true)),\n queryFn: async (context) => {\n const [, parameters] = context.queryKey as [string, GetSwapQuoteOptions];\n if (!parameters.amount || !parameters.from || !parameters.to) {\n throw new Error('amount, fromToken, and toToken are required');\n }\n\n return getSwapQuote(appKit, parameters);\n },\n queryKey: getSwapQuoteQueryKey(options),\n // refetchInterval: (query) => {\n // const data = query.state.data as GetSwapQuoteData | undefined;\n // if (!data?.expiresAt) {\n // return false;\n // }\n\n // const now = Date.now();\n // const expiresAt = data.expiresAt * 1000;\n // const timeUntilExpiration = expiresAt - now;\n\n // return Math.max(0, timeUntilExpiration);\n // },\n };\n};\n\nexport type GetSwapQuoteQueryFnData = Compute<Awaited<GetSwapQuoteReturnType>>;\n\nexport type GetSwapQuoteData = GetSwapQuoteQueryFnData;\n\nexport const getSwapQuoteQueryKey = (\n options: Compute<ExactPartial<GetSwapQuoteOptions>> = {},\n): GetSwapQuoteQueryKey => {\n return ['swapQuote', filterQueryOptions(options as unknown as Record<string, unknown>)] as const;\n};\n\nexport type GetSwapQuoteQueryKey = readonly ['swapQuote', Compute<ExactPartial<GetSwapQuoteOptions>>];\n\nexport type GetSwapQuoteQueryOptions<selectData = GetSwapQuoteData> = QueryOptions<\n GetSwapQuoteQueryFnData,\n GetSwapQuoteErrorType,\n selectData,\n GetSwapQuoteQueryKey\n>;\n"],"mappings":"AAQA,SAAS,oBAAoB;AAM7B,SAAS,0BAA0B;AAO5B,MAAM,2BAA2B,CACpC,QACA,UAA+C,CAAC,MACT;AACvC,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,SAAS,QAAQ,QAAQ,UAAU,QAAQ,QAAQ,QAAQ,OAAO,QAAQ,OAAO,WAAW,KAAK;AAAA,IACjG,SAAS,OAAO,YAAY;AACxB,YAAM,CAAC,EAAE,UAAU,IAAI,QAAQ;AAC/B,UAAI,CAAC,WAAW,UAAU,CAAC,WAAW,QAAQ,CAAC,WAAW,IAAI;AAC1D,cAAM,IAAI,MAAM,6CAA6C;AAAA,MACjE;AAEA,aAAO,aAAa,QAAQ,UAAU;AAAA,IAC1C;AAAA,IACA,UAAU,qBAAqB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAa1C;AACJ;AAMO,MAAM,uBAAuB,CAChC,UAAsD,CAAC,MAChC;AACvB,SAAO,CAAC,aAAa,mBAAmB,OAA6C,CAAC;AAC1F;","names":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 send_transaction_exports = {};
|
|
20
|
+
__export(send_transaction_exports, {
|
|
21
|
+
sendTransactionMutationOptions: () => sendTransactionMutationOptions
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(send_transaction_exports);
|
|
24
|
+
var import_send_transaction = require("../../actions/transaction/send-transaction");
|
|
25
|
+
const sendTransactionMutationOptions = (appKit, options = {}) => {
|
|
26
|
+
return {
|
|
27
|
+
...options.mutation,
|
|
28
|
+
mutationFn(variables) {
|
|
29
|
+
return (0, import_send_transaction.sendTransaction)(appKit, variables);
|
|
30
|
+
},
|
|
31
|
+
mutationKey: ["sendTransaction"]
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=send-transaction.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/transaction/send-transaction.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 { MutateOptions, MutationOptions } from '@tanstack/query-core';\n\nimport { sendTransaction } from '../../actions/transaction/send-transaction';\nimport type {\n SendTransactionErrorType,\n SendTransactionParameters,\n SendTransactionReturnType,\n} from '../../actions/transaction/send-transaction';\nimport type { AppKit } from '../../core/app-kit';\nimport type { MutationParameter } from '../../types/query';\nimport type { Compute } from '../../types/utils';\n\nexport type { SendTransactionErrorType, SendTransactionParameters, SendTransactionReturnType };\n\nexport type SendTransactionOptions<context = unknown> = MutationParameter<\n SendTransactionData,\n SendTransactionErrorType,\n SendTransactionVariables,\n context\n>;\n\nexport const sendTransactionMutationOptions = <context = unknown>(\n appKit: AppKit,\n options: SendTransactionOptions<context> = {},\n): SendTransactionMutationOptions<context> => {\n return {\n ...options.mutation,\n mutationFn(variables) {\n return sendTransaction(appKit, variables);\n },\n mutationKey: ['sendTransaction'],\n };\n};\n\nexport type SendTransactionMutationOptions<context = unknown> = MutationOptions<\n SendTransactionData,\n SendTransactionErrorType,\n SendTransactionVariables,\n context\n>;\n\nexport type SendTransactionData = Compute<SendTransactionReturnType>;\n\nexport type SendTransactionVariables = SendTransactionParameters;\n\nexport type SendTransactionMutate<context = unknown> = (\n variables: SendTransactionVariables,\n options?:\n | Compute<\n MutateOptions<SendTransactionData, SendTransactionErrorType, Compute<SendTransactionVariables>, context>\n >\n | undefined,\n) => void;\n\nexport type SendTransactionMutateAsync<context = unknown> = (\n variables: SendTransactionVariables,\n options?:\n | Compute<\n MutateOptions<SendTransactionData, SendTransactionErrorType, Compute<SendTransactionVariables>, context>\n >\n | undefined,\n) => Promise<SendTransactionData>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,8BAAgC;AAmBzB,MAAM,iCAAiC,CAC1C,QACA,UAA2C,CAAC,MACF;AAC1C,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,WAAW,WAAW;AAClB,iBAAO,yCAAgB,QAAQ,SAAS;AAAA,IAC5C;AAAA,IACA,aAAa,CAAC,iBAAiB;AAAA,EACnC;AACJ;","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 { MutateOptions, MutationOptions } from '@tanstack/query-core';
|
|
9
|
+
import type { SendTransactionErrorType, SendTransactionParameters, SendTransactionReturnType } from '../../actions/transaction/send-transaction';
|
|
10
|
+
import type { AppKit } from '../../core/app-kit';
|
|
11
|
+
import type { MutationParameter } from '../../types/query';
|
|
12
|
+
import type { Compute } from '../../types/utils';
|
|
13
|
+
export type { SendTransactionErrorType, SendTransactionParameters, SendTransactionReturnType };
|
|
14
|
+
export type SendTransactionOptions<context = unknown> = MutationParameter<SendTransactionData, SendTransactionErrorType, SendTransactionVariables, context>;
|
|
15
|
+
export declare const sendTransactionMutationOptions: <context = unknown>(appKit: AppKit, options?: SendTransactionOptions<context>) => SendTransactionMutationOptions<context>;
|
|
16
|
+
export type SendTransactionMutationOptions<context = unknown> = MutationOptions<SendTransactionData, SendTransactionErrorType, SendTransactionVariables, context>;
|
|
17
|
+
export type SendTransactionData = Compute<SendTransactionReturnType>;
|
|
18
|
+
export type SendTransactionVariables = SendTransactionParameters;
|
|
19
|
+
export type SendTransactionMutate<context = unknown> = (variables: SendTransactionVariables, options?: Compute<MutateOptions<SendTransactionData, SendTransactionErrorType, Compute<SendTransactionVariables>, context>> | undefined) => void;
|
|
20
|
+
export type SendTransactionMutateAsync<context = unknown> = (variables: SendTransactionVariables, options?: Compute<MutateOptions<SendTransactionData, SendTransactionErrorType, Compute<SendTransactionVariables>, context>> | undefined) => Promise<SendTransactionData>;
|
|
21
|
+
//# sourceMappingURL=send-transaction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-transaction.d.ts","sourceRoot":"","sources":["../../../src/queries/transaction/send-transaction.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG3E,OAAO,KAAK,EACR,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EAC5B,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,YAAY,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,CAAC;AAE/F,MAAM,MAAM,sBAAsB,CAAC,OAAO,GAAG,OAAO,IAAI,iBAAiB,CACrE,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,OAAO,CACV,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,OAAO,GAAG,OAAO,EAC5D,QAAQ,MAAM,EACd,UAAS,sBAAsB,CAAC,OAAO,CAAM,KAC9C,8BAA8B,CAAC,OAAO,CAQxC,CAAC;AAEF,MAAM,MAAM,8BAA8B,CAAC,OAAO,GAAG,OAAO,IAAI,eAAe,CAC3E,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,OAAO,CACV,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;AAErE,MAAM,MAAM,wBAAwB,GAAG,yBAAyB,CAAC;AAEjE,MAAM,MAAM,qBAAqB,CAAC,OAAO,GAAG,OAAO,IAAI,CACnD,SAAS,EAAE,wBAAwB,EACnC,OAAO,CAAC,EACF,OAAO,CACH,aAAa,CAAC,mBAAmB,EAAE,wBAAwB,EAAE,OAAO,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAC,CAC3G,GACD,SAAS,KACd,IAAI,CAAC;AAEV,MAAM,MAAM,0BAA0B,CAAC,OAAO,GAAG,OAAO,IAAI,CACxD,SAAS,EAAE,wBAAwB,EACnC,OAAO,CAAC,EACF,OAAO,CACH,aAAa,CAAC,mBAAmB,EAAE,wBAAwB,EAAE,OAAO,CAAC,wBAAwB,CAAC,EAAE,OAAO,CAAC,CAC3G,GACD,SAAS,KACd,OAAO,CAAC,mBAAmB,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { sendTransaction } from "../../actions/transaction/send-transaction";
|
|
2
|
+
const sendTransactionMutationOptions = (appKit, options = {}) => {
|
|
3
|
+
return {
|
|
4
|
+
...options.mutation,
|
|
5
|
+
mutationFn(variables) {
|
|
6
|
+
return sendTransaction(appKit, variables);
|
|
7
|
+
},
|
|
8
|
+
mutationKey: ["sendTransaction"]
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
sendTransactionMutationOptions
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=send-transaction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/transaction/send-transaction.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 { MutateOptions, MutationOptions } from '@tanstack/query-core';\n\nimport { sendTransaction } from '../../actions/transaction/send-transaction';\nimport type {\n SendTransactionErrorType,\n SendTransactionParameters,\n SendTransactionReturnType,\n} from '../../actions/transaction/send-transaction';\nimport type { AppKit } from '../../core/app-kit';\nimport type { MutationParameter } from '../../types/query';\nimport type { Compute } from '../../types/utils';\n\nexport type { SendTransactionErrorType, SendTransactionParameters, SendTransactionReturnType };\n\nexport type SendTransactionOptions<context = unknown> = MutationParameter<\n SendTransactionData,\n SendTransactionErrorType,\n SendTransactionVariables,\n context\n>;\n\nexport const sendTransactionMutationOptions = <context = unknown>(\n appKit: AppKit,\n options: SendTransactionOptions<context> = {},\n): SendTransactionMutationOptions<context> => {\n return {\n ...options.mutation,\n mutationFn(variables) {\n return sendTransaction(appKit, variables);\n },\n mutationKey: ['sendTransaction'],\n };\n};\n\nexport type SendTransactionMutationOptions<context = unknown> = MutationOptions<\n SendTransactionData,\n SendTransactionErrorType,\n SendTransactionVariables,\n context\n>;\n\nexport type SendTransactionData = Compute<SendTransactionReturnType>;\n\nexport type SendTransactionVariables = SendTransactionParameters;\n\nexport type SendTransactionMutate<context = unknown> = (\n variables: SendTransactionVariables,\n options?:\n | Compute<\n MutateOptions<SendTransactionData, SendTransactionErrorType, Compute<SendTransactionVariables>, context>\n >\n | undefined,\n) => void;\n\nexport type SendTransactionMutateAsync<context = unknown> = (\n variables: SendTransactionVariables,\n options?:\n | Compute<\n MutateOptions<SendTransactionData, SendTransactionErrorType, Compute<SendTransactionVariables>, context>\n >\n | undefined,\n) => Promise<SendTransactionData>;\n"],"mappings":"AAUA,SAAS,uBAAuB;AAmBzB,MAAM,iCAAiC,CAC1C,QACA,UAA2C,CAAC,MACF;AAC1C,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,WAAW,WAAW;AAClB,aAAO,gBAAgB,QAAQ,SAAS;AAAA,IAC5C;AAAA,IACA,aAAa,CAAC,iBAAiB;AAAA,EACnC;AACJ;","names":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 transfer_ton_exports = {};
|
|
20
|
+
__export(transfer_ton_exports, {
|
|
21
|
+
transferTonMutationOptions: () => transferTonMutationOptions
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(transfer_ton_exports);
|
|
24
|
+
var import_transfer_ton = require("../../actions/transaction/transfer-ton");
|
|
25
|
+
const transferTonMutationOptions = (appKit, options = {}) => {
|
|
26
|
+
return {
|
|
27
|
+
...options.mutation,
|
|
28
|
+
mutationFn(variables) {
|
|
29
|
+
return (0, import_transfer_ton.transferTon)(appKit, variables);
|
|
30
|
+
},
|
|
31
|
+
mutationKey: ["transferTon"]
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=transfer-ton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/transaction/transfer-ton.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 { MutateOptions, MutationOptions } from '@tanstack/query-core';\n\nimport { transferTon } from '../../actions/transaction/transfer-ton';\nimport type {\n TransferTonErrorType,\n TransferTonParameters,\n TransferTonReturnType,\n} from '../../actions/transaction/transfer-ton';\nimport type { AppKit } from '../../core/app-kit';\nimport type { MutationParameter } from '../../types/query';\nimport type { Compute } from '../../types/utils';\n\nexport type { TransferTonErrorType, TransferTonParameters, TransferTonReturnType };\n\nexport type TransferTonOptions<context = unknown> = MutationParameter<\n TransferTonData,\n TransferTonErrorType,\n TransferTonVariables,\n context\n>;\n\nexport const transferTonMutationOptions = <context = unknown>(\n appKit: AppKit,\n options: TransferTonOptions<context> = {},\n): TransferTonMutationOptions<context> => {\n return {\n ...options.mutation,\n mutationFn(variables) {\n return transferTon(appKit, variables);\n },\n mutationKey: ['transferTon'],\n };\n};\n\nexport type TransferTonMutationOptions<context = unknown> = MutationOptions<\n TransferTonData,\n TransferTonErrorType,\n TransferTonVariables,\n context\n>;\n\nexport type TransferTonData = Compute<TransferTonReturnType>;\n\nexport type TransferTonVariables = TransferTonParameters;\n\nexport type TransferTonMutate<context = unknown> = (\n variables: TransferTonVariables,\n options?:\n | Compute<MutateOptions<TransferTonData, TransferTonErrorType, Compute<TransferTonVariables>, context>>\n | undefined,\n) => void;\n\nexport type TransferTonMutateAsync<context = unknown> = (\n variables: TransferTonVariables,\n options?:\n | Compute<MutateOptions<TransferTonData, TransferTonErrorType, Compute<TransferTonVariables>, context>>\n | undefined,\n) => Promise<TransferTonData>;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,0BAA4B;AAmBrB,MAAM,6BAA6B,CACtC,QACA,UAAuC,CAAC,MACF;AACtC,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,WAAW,WAAW;AAClB,iBAAO,iCAAY,QAAQ,SAAS;AAAA,IACxC;AAAA,IACA,aAAa,CAAC,aAAa;AAAA,EAC/B;AACJ;","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 { MutateOptions, MutationOptions } from '@tanstack/query-core';
|
|
9
|
+
import type { TransferTonErrorType, TransferTonParameters, TransferTonReturnType } from '../../actions/transaction/transfer-ton';
|
|
10
|
+
import type { AppKit } from '../../core/app-kit';
|
|
11
|
+
import type { MutationParameter } from '../../types/query';
|
|
12
|
+
import type { Compute } from '../../types/utils';
|
|
13
|
+
export type { TransferTonErrorType, TransferTonParameters, TransferTonReturnType };
|
|
14
|
+
export type TransferTonOptions<context = unknown> = MutationParameter<TransferTonData, TransferTonErrorType, TransferTonVariables, context>;
|
|
15
|
+
export declare const transferTonMutationOptions: <context = unknown>(appKit: AppKit, options?: TransferTonOptions<context>) => TransferTonMutationOptions<context>;
|
|
16
|
+
export type TransferTonMutationOptions<context = unknown> = MutationOptions<TransferTonData, TransferTonErrorType, TransferTonVariables, context>;
|
|
17
|
+
export type TransferTonData = Compute<TransferTonReturnType>;
|
|
18
|
+
export type TransferTonVariables = TransferTonParameters;
|
|
19
|
+
export type TransferTonMutate<context = unknown> = (variables: TransferTonVariables, options?: Compute<MutateOptions<TransferTonData, TransferTonErrorType, Compute<TransferTonVariables>, context>> | undefined) => void;
|
|
20
|
+
export type TransferTonMutateAsync<context = unknown> = (variables: TransferTonVariables, options?: Compute<MutateOptions<TransferTonData, TransferTonErrorType, Compute<TransferTonVariables>, context>> | undefined) => Promise<TransferTonData>;
|
|
21
|
+
//# sourceMappingURL=transfer-ton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transfer-ton.d.ts","sourceRoot":"","sources":["../../../src/queries/transaction/transfer-ton.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG3E,OAAO,KAAK,EACR,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACxB,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,CAAC;AAEnF,MAAM,MAAM,kBAAkB,CAAC,OAAO,GAAG,OAAO,IAAI,iBAAiB,CACjE,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,OAAO,CACV,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,OAAO,GAAG,OAAO,EACxD,QAAQ,MAAM,EACd,UAAS,kBAAkB,CAAC,OAAO,CAAM,KAC1C,0BAA0B,CAAC,OAAO,CAQpC,CAAC;AAEF,MAAM,MAAM,0BAA0B,CAAC,OAAO,GAAG,OAAO,IAAI,eAAe,CACvE,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,OAAO,CACV,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAE7D,MAAM,MAAM,oBAAoB,GAAG,qBAAqB,CAAC;AAEzD,MAAM,MAAM,iBAAiB,CAAC,OAAO,GAAG,OAAO,IAAI,CAC/C,SAAS,EAAE,oBAAoB,EAC/B,OAAO,CAAC,EACF,OAAO,CAAC,aAAa,CAAC,eAAe,EAAE,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,CAAC,GACrG,SAAS,KACd,IAAI,CAAC;AAEV,MAAM,MAAM,sBAAsB,CAAC,OAAO,GAAG,OAAO,IAAI,CACpD,SAAS,EAAE,oBAAoB,EAC/B,OAAO,CAAC,EACF,OAAO,CAAC,aAAa,CAAC,eAAe,EAAE,oBAAoB,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,CAAC,GACrG,SAAS,KACd,OAAO,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { transferTon } from "../../actions/transaction/transfer-ton";
|
|
2
|
+
const transferTonMutationOptions = (appKit, options = {}) => {
|
|
3
|
+
return {
|
|
4
|
+
...options.mutation,
|
|
5
|
+
mutationFn(variables) {
|
|
6
|
+
return transferTon(appKit, variables);
|
|
7
|
+
},
|
|
8
|
+
mutationKey: ["transferTon"]
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export {
|
|
12
|
+
transferTonMutationOptions
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=transfer-ton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/queries/transaction/transfer-ton.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 { MutateOptions, MutationOptions } from '@tanstack/query-core';\n\nimport { transferTon } from '../../actions/transaction/transfer-ton';\nimport type {\n TransferTonErrorType,\n TransferTonParameters,\n TransferTonReturnType,\n} from '../../actions/transaction/transfer-ton';\nimport type { AppKit } from '../../core/app-kit';\nimport type { MutationParameter } from '../../types/query';\nimport type { Compute } from '../../types/utils';\n\nexport type { TransferTonErrorType, TransferTonParameters, TransferTonReturnType };\n\nexport type TransferTonOptions<context = unknown> = MutationParameter<\n TransferTonData,\n TransferTonErrorType,\n TransferTonVariables,\n context\n>;\n\nexport const transferTonMutationOptions = <context = unknown>(\n appKit: AppKit,\n options: TransferTonOptions<context> = {},\n): TransferTonMutationOptions<context> => {\n return {\n ...options.mutation,\n mutationFn(variables) {\n return transferTon(appKit, variables);\n },\n mutationKey: ['transferTon'],\n };\n};\n\nexport type TransferTonMutationOptions<context = unknown> = MutationOptions<\n TransferTonData,\n TransferTonErrorType,\n TransferTonVariables,\n context\n>;\n\nexport type TransferTonData = Compute<TransferTonReturnType>;\n\nexport type TransferTonVariables = TransferTonParameters;\n\nexport type TransferTonMutate<context = unknown> = (\n variables: TransferTonVariables,\n options?:\n | Compute<MutateOptions<TransferTonData, TransferTonErrorType, Compute<TransferTonVariables>, context>>\n | undefined,\n) => void;\n\nexport type TransferTonMutateAsync<context = unknown> = (\n variables: TransferTonVariables,\n options?:\n | Compute<MutateOptions<TransferTonData, TransferTonErrorType, Compute<TransferTonVariables>, context>>\n | undefined,\n) => Promise<TransferTonData>;\n"],"mappings":"AAUA,SAAS,mBAAmB;AAmBrB,MAAM,6BAA6B,CACtC,QACA,UAAuC,CAAC,MACF;AACtC,SAAO;AAAA,IACH,GAAG,QAAQ;AAAA,IACX,WAAW,WAAW;AAClB,aAAO,YAAY,QAAQ,SAAS;AAAA,IACxC;AAAA,IACA,aAAa,CAAC,aAAa;AAAA,EAC/B;AACJ;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var swap_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(swap_exports);
|
|
17
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/swap/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\nexport type { SwapToken, TokenAmount, SwapParams } from '@ton/walletkit';\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) TonTech.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export type { SwapToken, TokenAmount, SwapParams } from '@ton/walletkit';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/swap/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
|
+
var omniston_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(omniston_exports);
|
|
18
|
+
__reExport(omniston_exports, require("@ton/walletkit/swap/omniston"), module.exports);
|
|
19
|
+
//# sourceMappingURL=index.cjs.map
|