@wagmi/core 1.4.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/actions/connect.js +53 -0
- package/dist/esm/actions/connect.js.map +1 -0
- package/dist/esm/actions/disconnect.js +49 -0
- package/dist/esm/actions/disconnect.js.map +1 -0
- package/dist/esm/actions/estimateFeesPerGas.js +24 -0
- package/dist/esm/actions/estimateFeesPerGas.js.map +1 -0
- package/dist/esm/actions/estimateGas.js +25 -0
- package/dist/esm/actions/estimateGas.js.map +1 -0
- package/dist/esm/actions/getAccount.js +61 -0
- package/dist/esm/actions/getAccount.js.map +1 -0
- package/dist/esm/actions/getBalance.js +83 -0
- package/dist/esm/actions/getBalance.js.map +1 -0
- package/dist/esm/actions/getBlockNumber.js +9 -0
- package/dist/esm/actions/getBlockNumber.js.map +1 -0
- package/dist/esm/actions/getChainId.js +5 -0
- package/dist/esm/actions/getChainId.js.map +1 -0
- package/dist/esm/actions/getClient.js +5 -0
- package/dist/esm/actions/getClient.js.map +1 -0
- package/dist/esm/actions/getConnections.js +13 -0
- package/dist/esm/actions/getConnections.js.map +1 -0
- package/dist/esm/actions/getConnectorClient.js +42 -0
- package/dist/esm/actions/getConnectorClient.js.map +1 -0
- package/dist/esm/actions/getEnsAddress.js +9 -0
- package/dist/esm/actions/getEnsAddress.js.map +1 -0
- package/dist/esm/actions/getEnsAvatar.js +9 -0
- package/dist/esm/actions/getEnsAvatar.js.map +1 -0
- package/dist/esm/actions/getEnsName.js +9 -0
- package/dist/esm/actions/getEnsName.js.map +1 -0
- package/dist/esm/actions/getEnsResolver.js +9 -0
- package/dist/esm/actions/getEnsResolver.js.map +1 -0
- package/dist/esm/actions/getPublicClient.js +6 -0
- package/dist/esm/actions/getPublicClient.js.map +1 -0
- package/dist/esm/actions/getToken.js +101 -0
- package/dist/esm/actions/getToken.js.map +1 -0
- package/dist/esm/actions/getTransaction.js +10 -0
- package/dist/esm/actions/getTransaction.js.map +1 -0
- package/dist/esm/actions/getWalletClient.js +7 -0
- package/dist/esm/actions/getWalletClient.js.map +1 -0
- package/dist/esm/actions/multicall.js +11 -0
- package/dist/esm/actions/multicall.js.map +1 -0
- package/dist/esm/actions/readContract.js +10 -0
- package/dist/esm/actions/readContract.js.map +1 -0
- package/dist/esm/actions/readContracts.js +46 -0
- package/dist/esm/actions/readContracts.js.map +1 -0
- package/dist/esm/actions/reconnect.js +78 -0
- package/dist/esm/actions/reconnect.js.map +1 -0
- package/dist/esm/actions/sendTransaction.js +22 -0
- package/dist/esm/actions/sendTransaction.js.map +1 -0
- package/dist/esm/actions/signMessage.js +10 -0
- package/dist/esm/actions/signMessage.js.map +1 -0
- package/dist/esm/actions/signTypedData.js +10 -0
- package/dist/esm/actions/signTypedData.js.map +1 -0
- package/dist/esm/actions/simulateContract.js +33 -0
- package/dist/esm/actions/simulateContract.js.map +1 -0
- package/dist/esm/actions/switchAccount.js +19 -0
- package/dist/esm/actions/switchAccount.js.map +1 -0
- package/dist/esm/actions/switchChain.js +23 -0
- package/dist/esm/actions/switchChain.js.map +1 -0
- package/dist/esm/actions/waitForTransactionReceipt.js +23 -0
- package/dist/esm/actions/waitForTransactionReceipt.js.map +1 -0
- package/dist/esm/actions/watchAccount.js +18 -0
- package/dist/esm/actions/watchAccount.js.map +1 -0
- package/dist/esm/actions/watchBlockNumber.js +28 -0
- package/dist/esm/actions/watchBlockNumber.js.map +1 -0
- package/dist/esm/actions/watchChainId.js +6 -0
- package/dist/esm/actions/watchChainId.js.map +1 -0
- package/dist/esm/actions/watchClient.js +11 -0
- package/dist/esm/actions/watchClient.js.map +1 -0
- package/dist/esm/actions/watchConnections.js +10 -0
- package/dist/esm/actions/watchConnections.js.map +1 -0
- package/dist/esm/actions/watchContractEvent.js +27 -0
- package/dist/esm/actions/watchContractEvent.js.map +1 -0
- package/dist/esm/actions/watchPendingTransactions.js +27 -0
- package/dist/esm/actions/watchPendingTransactions.js.map +1 -0
- package/dist/esm/actions/watchPublicClient.js +11 -0
- package/dist/esm/actions/watchPublicClient.js.map +1 -0
- package/dist/esm/actions/writeContract.js +31 -0
- package/dist/esm/actions/writeContract.js.map +1 -0
- package/dist/esm/createConfig.js +218 -0
- package/dist/esm/createConfig.js.map +1 -0
- package/dist/esm/createConnector.js +8 -0
- package/dist/esm/createConnector.js.map +1 -0
- package/dist/esm/createEmitter.js +39 -0
- package/dist/esm/createEmitter.js.map +1 -0
- package/dist/esm/createStorage.js +37 -0
- package/dist/esm/createStorage.js.map +1 -0
- package/dist/esm/errors/base.js +86 -0
- package/dist/esm/errors/base.js.map +1 -0
- package/dist/esm/errors/config.js +70 -0
- package/dist/esm/errors/config.js.map +1 -0
- package/dist/esm/errors/connector.js +24 -0
- package/dist/esm/errors/connector.js.map +1 -0
- package/dist/esm/exports/actions.js +42 -0
- package/dist/esm/exports/actions.js.map +1 -0
- package/dist/esm/exports/chains.js +4 -0
- package/dist/esm/exports/chains.js.map +1 -0
- package/dist/esm/exports/index.js +71 -0
- package/dist/esm/exports/index.js.map +1 -0
- package/dist/esm/exports/internal.js +11 -0
- package/dist/esm/exports/internal.js.map +1 -0
- package/dist/esm/exports/query.js +29 -0
- package/dist/esm/exports/query.js.map +1 -0
- package/dist/esm/query/connect.js +11 -0
- package/dist/esm/query/connect.js.map +1 -0
- package/dist/esm/query/disconnect.js +10 -0
- package/dist/esm/query/disconnect.js.map +1 -0
- package/dist/esm/query/estimateFeesPerGas.js +16 -0
- package/dist/esm/query/estimateFeesPerGas.js.map +1 -0
- package/dist/esm/query/estimateGas.js +20 -0
- package/dist/esm/query/estimateGas.js.map +1 -0
- package/dist/esm/query/getBalance.js +21 -0
- package/dist/esm/query/getBalance.js.map +1 -0
- package/dist/esm/query/getBlockNumber.js +18 -0
- package/dist/esm/query/getBlockNumber.js.map +1 -0
- package/dist/esm/query/getConnectorClient.js +24 -0
- package/dist/esm/query/getConnectorClient.js.map +1 -0
- package/dist/esm/query/getEnsAddress.js +18 -0
- package/dist/esm/query/getEnsAddress.js.map +1 -0
- package/dist/esm/query/getEnsAvatar.js +18 -0
- package/dist/esm/query/getEnsAvatar.js.map +1 -0
- package/dist/esm/query/getEnsName.js +18 -0
- package/dist/esm/query/getEnsName.js.map +1 -0
- package/dist/esm/query/getEnsResolver.js +18 -0
- package/dist/esm/query/getEnsResolver.js.map +1 -0
- package/dist/esm/query/getToken.js +18 -0
- package/dist/esm/query/getToken.js.map +1 -0
- package/dist/esm/query/getTransaction.js +20 -0
- package/dist/esm/query/getTransaction.js.map +1 -0
- package/dist/esm/query/getWalletClient.js +21 -0
- package/dist/esm/query/getWalletClient.js.map +1 -0
- package/dist/esm/query/readContract.js +32 -0
- package/dist/esm/query/readContract.js.map +1 -0
- package/dist/esm/query/readContracts.js +36 -0
- package/dist/esm/query/readContracts.js.map +1 -0
- package/dist/esm/query/reconnect.js +10 -0
- package/dist/esm/query/reconnect.js.map +1 -0
- package/dist/esm/query/sendTransaction.js +11 -0
- package/dist/esm/query/sendTransaction.js.map +1 -0
- package/dist/esm/query/signMessage.js +13 -0
- package/dist/esm/query/signMessage.js.map +1 -0
- package/dist/esm/query/signTypedData.js +11 -0
- package/dist/esm/query/signTypedData.js.map +1 -0
- package/dist/esm/query/simulateContract.js +25 -0
- package/dist/esm/query/simulateContract.js.map +1 -0
- package/dist/esm/query/switchAccount.js +11 -0
- package/dist/esm/query/switchAccount.js.map +1 -0
- package/dist/esm/query/switchChain.js +11 -0
- package/dist/esm/query/switchChain.js.map +1 -0
- package/dist/esm/query/types.js +2 -0
- package/dist/esm/query/types.js.map +1 -0
- package/dist/esm/query/utils.js +45 -0
- package/dist/esm/query/utils.js.map +1 -0
- package/dist/esm/query/waitForTransactionReceipt.js +23 -0
- package/dist/esm/query/waitForTransactionReceipt.js.map +1 -0
- package/dist/esm/query/writeContract.js +11 -0
- package/dist/esm/query/writeContract.js.map +1 -0
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -0
- package/dist/esm/types/chain.js +2 -0
- package/dist/esm/types/chain.js.map +1 -0
- package/dist/esm/types/properties.js +2 -0
- package/dist/esm/types/properties.js.map +1 -0
- package/dist/esm/types/register.js +2 -0
- package/dist/esm/types/register.js.map +1 -0
- package/dist/esm/types/unit.js +2 -0
- package/dist/esm/types/unit.js.map +1 -0
- package/dist/esm/types/utils.js +2 -0
- package/dist/esm/types/utils.js.map +1 -0
- package/dist/esm/utils/assertActiveChain.js +14 -0
- package/dist/esm/utils/assertActiveChain.js.map +1 -0
- package/dist/esm/utils/deepEqual.js +41 -0
- package/dist/esm/utils/deepEqual.js.map +1 -0
- package/dist/esm/utils/deserialize.js +11 -0
- package/dist/esm/utils/deserialize.js.map +1 -0
- package/dist/esm/utils/getUnit.js +10 -0
- package/dist/esm/utils/getUnit.js.map +1 -0
- package/dist/esm/utils/getVersion.js +3 -0
- package/dist/esm/utils/getVersion.js.map +1 -0
- package/dist/esm/utils/normalizeChainId.js +10 -0
- package/dist/esm/utils/normalizeChainId.js.map +1 -0
- package/dist/esm/utils/serialize.js +87 -0
- package/dist/esm/utils/serialize.js.map +1 -0
- package/dist/esm/utils/uid.js +14 -0
- package/dist/esm/utils/uid.js.map +1 -0
- package/dist/esm/version.js +2 -0
- package/dist/esm/version.js.map +1 -0
- package/dist/types/actions/connect.d.ts +19 -0
- package/dist/types/actions/connect.d.ts.map +1 -0
- package/dist/types/actions/disconnect.d.ts +9 -0
- package/dist/types/actions/disconnect.d.ts.map +1 -0
- package/dist/types/actions/estimateFeesPerGas.d.ts +16 -0
- package/dist/types/actions/estimateFeesPerGas.d.ts.map +1 -0
- package/dist/types/actions/estimateGas.d.ts +14 -0
- package/dist/types/actions/estimateGas.d.ts.map +1 -0
- package/dist/types/actions/getAccount.d.ts +46 -0
- package/dist/types/actions/getAccount.d.ts.map +1 -0
- package/dist/types/actions/getBalance.d.ts +21 -0
- package/dist/types/actions/getBalance.d.ts.map +1 -0
- package/dist/types/actions/getBlockNumber.d.ts +10 -0
- package/dist/types/actions/getBlockNumber.d.ts.map +1 -0
- package/dist/types/actions/getChainId.d.ts +5 -0
- package/dist/types/actions/getChainId.d.ts.map +1 -0
- package/dist/types/actions/getClient.d.ts +10 -0
- package/dist/types/actions/getClient.d.ts.map +1 -0
- package/dist/types/actions/getConnections.d.ts +6 -0
- package/dist/types/actions/getConnections.d.ts.map +1 -0
- package/dist/types/actions/getConnectorClient.d.ts +15 -0
- package/dist/types/actions/getConnectorClient.d.ts.map +1 -0
- package/dist/types/actions/getEnsAddress.d.ts +10 -0
- package/dist/types/actions/getEnsAddress.d.ts.map +1 -0
- package/dist/types/actions/getEnsAvatar.d.ts +10 -0
- package/dist/types/actions/getEnsAvatar.d.ts.map +1 -0
- package/dist/types/actions/getEnsName.d.ts +10 -0
- package/dist/types/actions/getEnsName.d.ts.map +1 -0
- package/dist/types/actions/getEnsResolver.d.ts +10 -0
- package/dist/types/actions/getEnsResolver.d.ts.map +1 -0
- package/dist/types/actions/getPublicClient.d.ts +10 -0
- package/dist/types/actions/getPublicClient.d.ts.map +1 -0
- package/dist/types/actions/getToken.d.ts +22 -0
- package/dist/types/actions/getToken.d.ts.map +1 -0
- package/dist/types/actions/getTransaction.d.ts +14 -0
- package/dist/types/actions/getTransaction.d.ts.map +1 -0
- package/dist/types/actions/getWalletClient.d.ts +11 -0
- package/dist/types/actions/getWalletClient.d.ts.map +1 -0
- package/dist/types/actions/multicall.d.ts +7 -0
- package/dist/types/actions/multicall.d.ts.map +1 -0
- package/dist/types/actions/readContract.d.ts +11 -0
- package/dist/types/actions/readContract.d.ts.map +1 -0
- package/dist/types/actions/readContracts.d.ts +10 -0
- package/dist/types/actions/readContracts.d.ts.map +1 -0
- package/dist/types/actions/reconnect.d.ts +12 -0
- package/dist/types/actions/reconnect.d.ts.map +1 -0
- package/dist/types/actions/sendTransaction.d.ts +15 -0
- package/dist/types/actions/sendTransaction.d.ts.map +1 -0
- package/dist/types/actions/signMessage.d.ts +11 -0
- package/dist/types/actions/signMessage.d.ts.map +1 -0
- package/dist/types/actions/signTypedData.d.ts +10 -0
- package/dist/types/actions/signTypedData.d.ts.map +1 -0
- package/dist/types/actions/simulateContract.d.ts +21 -0
- package/dist/types/actions/simulateContract.d.ts.map +1 -0
- package/dist/types/actions/switchAccount.d.ts +14 -0
- package/dist/types/actions/switchAccount.d.ts.map +1 -0
- package/dist/types/actions/switchChain.d.ts +16 -0
- package/dist/types/actions/switchChain.d.ts.map +1 -0
- package/dist/types/actions/waitForTransactionReceipt.d.ts +12 -0
- package/dist/types/actions/waitForTransactionReceipt.d.ts.map +1 -0
- package/dist/types/actions/watchAccount.d.ts +9 -0
- package/dist/types/actions/watchAccount.d.ts.map +1 -0
- package/dist/types/actions/watchBlockNumber.d.ts +13 -0
- package/dist/types/actions/watchBlockNumber.d.ts.map +1 -0
- package/dist/types/actions/watchChainId.d.ts +9 -0
- package/dist/types/actions/watchChainId.d.ts.map +1 -0
- package/dist/types/actions/watchClient.d.ts +9 -0
- package/dist/types/actions/watchClient.d.ts.map +1 -0
- package/dist/types/actions/watchConnections.d.ts +9 -0
- package/dist/types/actions/watchConnections.d.ts.map +1 -0
- package/dist/types/actions/watchContractEvent.d.ts +13 -0
- package/dist/types/actions/watchContractEvent.d.ts.map +1 -0
- package/dist/types/actions/watchPendingTransactions.d.ts +13 -0
- package/dist/types/actions/watchPendingTransactions.d.ts.map +1 -0
- package/dist/types/actions/watchPublicClient.d.ts +9 -0
- package/dist/types/actions/watchPublicClient.d.ts.map +1 -0
- package/dist/types/actions/writeContract.d.ts +15 -0
- package/dist/types/actions/writeContract.d.ts.map +1 -0
- package/dist/types/createConfig.d.ts +72 -0
- package/dist/types/createConfig.d.ts.map +1 -0
- package/dist/types/createConnector.d.ts +57 -0
- package/dist/types/createConnector.d.ts.map +1 -0
- package/dist/types/createEmitter.d.ts +31 -0
- package/dist/types/createEmitter.d.ts.map +1 -0
- package/dist/types/createStorage.d.ts +30 -0
- package/dist/types/createStorage.d.ts.map +1 -0
- package/dist/types/errors/base.d.ts +24 -0
- package/dist/types/errors/base.d.ts.map +1 -0
- package/dist/types/errors/config.d.ts +34 -0
- package/dist/types/errors/config.d.ts.map +1 -0
- package/dist/types/errors/connector.d.ts +13 -0
- package/dist/types/errors/connector.d.ts.map +1 -0
- package/dist/types/exports/actions.d.ts +40 -0
- package/dist/types/exports/actions.d.ts.map +1 -0
- package/dist/types/exports/chains.d.ts +2 -0
- package/dist/types/exports/chains.d.ts.map +1 -0
- package/dist/types/exports/index.d.ts +52 -0
- package/dist/types/exports/index.d.ts.map +1 -0
- package/dist/types/exports/internal.d.ts +5 -0
- package/dist/types/exports/internal.d.ts.map +1 -0
- package/dist/types/exports/query.d.ts +27 -0
- package/dist/types/exports/query.d.ts.map +1 -0
- package/dist/types/query/connect.d.ts +15 -0
- package/dist/types/query/connect.d.ts.map +1 -0
- package/dist/types/query/disconnect.d.ts +12 -0
- package/dist/types/query/disconnect.d.ts.map +1 -0
- package/dist/types/query/estimateFeesPerGas.d.ts +34 -0
- package/dist/types/query/estimateFeesPerGas.d.ts.map +1 -0
- package/dist/types/query/estimateGas.d.ts +18 -0
- package/dist/types/query/estimateGas.d.ts.map +1 -0
- package/dist/types/query/getBalance.d.ts +42 -0
- package/dist/types/query/getBalance.d.ts.map +1 -0
- package/dist/types/query/getBlockNumber.d.ts +34 -0
- package/dist/types/query/getBlockNumber.d.ts.map +1 -0
- package/dist/types/query/getConnectorClient.d.ts +319 -0
- package/dist/types/query/getConnectorClient.d.ts.map +1 -0
- package/dist/types/query/getEnsAddress.d.ts +42 -0
- package/dist/types/query/getEnsAddress.d.ts.map +1 -0
- package/dist/types/query/getEnsAvatar.d.ts +42 -0
- package/dist/types/query/getEnsAvatar.d.ts.map +1 -0
- package/dist/types/query/getEnsName.d.ts +39 -0
- package/dist/types/query/getEnsName.d.ts.map +1 -0
- package/dist/types/query/getEnsResolver.d.ts +39 -0
- package/dist/types/query/getEnsResolver.d.ts.map +1 -0
- package/dist/types/query/getToken.d.ts +33 -0
- package/dist/types/query/getToken.d.ts.map +1 -0
- package/dist/types/query/getTransaction.d.ts +110 -0
- package/dist/types/query/getTransaction.d.ts.map +1 -0
- package/dist/types/query/getWalletClient.d.ts +540 -0
- package/dist/types/query/getWalletClient.d.ts.map +1 -0
- package/dist/types/query/readContract.d.ts +19 -0
- package/dist/types/query/readContract.d.ts.map +1 -0
- package/dist/types/query/readContracts.d.ts +65 -0
- package/dist/types/query/readContracts.d.ts.map +1 -0
- package/dist/types/query/reconnect.d.ts +13 -0
- package/dist/types/query/reconnect.d.ts.map +1 -0
- package/dist/types/query/sendTransaction.d.ts +13 -0
- package/dist/types/query/sendTransaction.d.ts.map +1 -0
- package/dist/types/query/signMessage.d.ts +17 -0
- package/dist/types/query/signMessage.d.ts.map +1 -0
- package/dist/types/query/signTypedData.d.ts +219 -0
- package/dist/types/query/signTypedData.d.ts.map +1 -0
- package/dist/types/query/simulateContract.d.ts +19 -0
- package/dist/types/query/simulateContract.d.ts.map +1 -0
- package/dist/types/query/switchAccount.d.ts +15 -0
- package/dist/types/query/switchAccount.d.ts.map +1 -0
- package/dist/types/query/switchChain.d.ts +18 -0
- package/dist/types/query/switchChain.d.ts.map +1 -0
- package/dist/types/query/types.d.ts +9 -0
- package/dist/types/query/types.d.ts.map +1 -0
- package/dist/types/query/utils.d.ts +4 -0
- package/dist/types/query/utils.d.ts.map +1 -0
- package/dist/types/query/waitForTransactionReceipt.d.ts +131 -0
- package/dist/types/query/waitForTransactionReceipt.d.ts.map +1 -0
- package/dist/types/query/writeContract.d.ts +14 -0
- package/dist/types/query/writeContract.d.ts.map +1 -0
- package/dist/types/types/chain.d.ts +15 -0
- package/dist/types/types/chain.d.ts.map +1 -0
- package/dist/types/types/properties.d.ts +11 -0
- package/dist/types/types/properties.d.ts.map +1 -0
- package/dist/types/types/register.d.ts +8 -0
- package/dist/types/types/register.d.ts.map +1 -0
- package/dist/types/types/unit.d.ts +2 -0
- package/dist/types/types/unit.d.ts.map +1 -0
- package/dist/types/types/utils.d.ts +41 -0
- package/dist/types/types/utils.d.ts.map +1 -0
- package/dist/types/utils/assertActiveChain.d.ts +8 -0
- package/dist/types/utils/assertActiveChain.d.ts.map +1 -0
- package/dist/types/utils/deepEqual.d.ts +3 -0
- package/dist/types/utils/deepEqual.d.ts.map +1 -0
- package/dist/types/utils/deserialize.d.ts +4 -0
- package/dist/types/utils/deserialize.d.ts.map +1 -0
- package/dist/types/utils/getUnit.d.ts +3 -0
- package/dist/types/utils/getUnit.d.ts.map +1 -0
- package/dist/types/utils/getVersion.d.ts +2 -0
- package/dist/types/utils/getVersion.d.ts.map +1 -0
- package/dist/types/utils/normalizeChainId.d.ts +2 -0
- package/dist/types/utils/normalizeChainId.d.ts.map +1 -0
- package/dist/types/utils/serialize.d.ts +16 -0
- package/dist/types/utils/serialize.d.ts.map +1 -0
- package/dist/types/utils/uid.d.ts +2 -0
- package/dist/types/utils/uid.d.ts.map +1 -0
- package/dist/types/version.d.ts +2 -0
- package/dist/types/version.d.ts.map +1 -0
- package/package.json +65 -101
- package/src/actions/connect.ts +86 -0
- package/src/actions/disconnect.ts +68 -0
- package/src/actions/estimateFeesPerGas.ts +76 -0
- package/src/actions/estimateGas.ts +62 -0
- package/src/actions/getAccount.ts +109 -0
- package/src/actions/getBalance.ts +141 -0
- package/src/actions/getBlockNumber.ts +27 -0
- package/src/actions/getChainId.ts +11 -0
- package/src/actions/getClient.ts +30 -0
- package/src/actions/getConnections.ts +16 -0
- package/src/actions/getConnectorClient.ts +96 -0
- package/src/actions/getEnsAddress.ts +27 -0
- package/src/actions/getEnsAvatar.ts +27 -0
- package/src/actions/getEnsName.ts +27 -0
- package/src/actions/getEnsResolver.ts +27 -0
- package/src/actions/getPublicClient.ts +34 -0
- package/src/actions/getToken.ts +140 -0
- package/src/actions/getTransaction.ts +44 -0
- package/src/actions/getWalletClient.ts +41 -0
- package/src/actions/multicall.ts +37 -0
- package/src/actions/readContract.ts +55 -0
- package/src/actions/readContracts.ts +98 -0
- package/src/actions/reconnect.ts +102 -0
- package/src/actions/sendTransaction.ts +68 -0
- package/src/actions/signMessage.ts +29 -0
- package/src/actions/signTypedData.ts +36 -0
- package/src/actions/simulateContract.ts +161 -0
- package/src/actions/switchAccount.ts +37 -0
- package/src/actions/switchChain.ts +63 -0
- package/src/actions/waitForTransactionReceipt.ts +69 -0
- package/src/actions/watchAccount.ts +32 -0
- package/src/actions/watchBlockNumber.ts +78 -0
- package/src/actions/watchChainId.ts +20 -0
- package/src/actions/watchClient.ts +34 -0
- package/src/actions/watchConnections.ts +26 -0
- package/src/actions/watchContractEvent.ts +98 -0
- package/src/actions/watchPendingTransactions.ts +79 -0
- package/src/actions/watchPublicClient.ts +37 -0
- package/src/actions/writeContract.ts +111 -0
- package/src/createConfig.ts +382 -0
- package/src/createConnector.ts +78 -0
- package/src/createEmitter.ts +68 -0
- package/src/createStorage.ts +89 -0
- package/src/errors/base.ts +71 -0
- package/src/errors/config.ts +60 -0
- package/src/errors/connector.ts +17 -0
- package/src/exports/actions.ts +258 -0
- package/src/exports/chains.ts +4 -0
- package/src/exports/index.ts +339 -0
- package/src/exports/internal.ts +28 -0
- package/src/exports/query.ts +220 -0
- package/src/query/connect.ts +45 -0
- package/src/query/disconnect.ts +43 -0
- package/src/query/estimateFeesPerGas.ts +56 -0
- package/src/query/estimateGas.ts +55 -0
- package/src/query/getBalance.ts +61 -0
- package/src/query/getBlockNumber.ts +50 -0
- package/src/query/getConnectorClient.ts +68 -0
- package/src/query/getEnsAddress.ts +49 -0
- package/src/query/getEnsAvatar.ts +49 -0
- package/src/query/getEnsName.ts +49 -0
- package/src/query/getEnsResolver.ts +49 -0
- package/src/query/getToken.ts +49 -0
- package/src/query/getTransaction.ts +75 -0
- package/src/query/getWalletClient.ts +64 -0
- package/src/query/readContract.ts +88 -0
- package/src/query/readContracts.ts +98 -0
- package/src/query/reconnect.ts +42 -0
- package/src/query/sendTransaction.ts +65 -0
- package/src/query/signMessage.ts +42 -0
- package/src/query/signTypedData.ts +63 -0
- package/src/query/simulateContract.ts +128 -0
- package/src/query/switchAccount.ts +52 -0
- package/src/query/switchChain.ts +67 -0
- package/src/query/types.ts +52 -0
- package/src/query/utils.ts +54 -0
- package/src/query/waitForTransactionReceipt.ts +71 -0
- package/src/query/writeContract.ts +91 -0
- package/src/types/chain.ts +25 -0
- package/src/types/properties.ts +21 -0
- package/src/types/register.ts +8 -0
- package/src/types/unit.ts +1 -0
- package/src/types/utils.ts +85 -0
- package/src/utils/assertActiveChain.ts +26 -0
- package/src/utils/deepEqual.ts +43 -0
- package/src/utils/deserialize.ts +10 -0
- package/src/utils/getUnit.ts +9 -0
- package/src/utils/getVersion.ts +3 -0
- package/src/utils/normalizeChainId.ts +12 -0
- package/src/utils/serialize.ts +116 -0
- package/src/utils/uid.ts +14 -0
- package/src/version.ts +1 -0
- package/README.md +0 -30
- package/chains/package.json +0 -4
- package/connectors/coinbaseWallet/package.json +0 -4
- package/connectors/injected/package.json +0 -4
- package/connectors/ledger/package.json +0 -4
- package/connectors/metaMask/package.json +0 -4
- package/connectors/mock/package.json +0 -4
- package/connectors/package.json +0 -4
- package/connectors/safe/package.json +0 -4
- package/connectors/walletConnect/package.json +0 -4
- package/connectors/walletConnectLegacy/package.json +0 -4
- package/dist/chains.d.ts +0 -2
- package/dist/chains.js +0 -2
- package/dist/chunk-4E64EZ7V.js +0 -7
- package/dist/chunk-BVC4KGLQ.js +0 -8
- package/dist/chunk-EQOEZP46.js +0 -6
- package/dist/chunk-KFW652VN.js +0 -7
- package/dist/chunk-LAFZBYO7.js +0 -2934
- package/dist/chunk-MQXBDTVK.js +0 -29
- package/dist/connectors/coinbaseWallet.d.ts +0 -1
- package/dist/connectors/coinbaseWallet.js +0 -7
- package/dist/connectors/index.d.ts +0 -2
- package/dist/connectors/index.js +0 -9
- package/dist/connectors/injected.d.ts +0 -1
- package/dist/connectors/injected.js +0 -7
- package/dist/connectors/ledger.d.ts +0 -1
- package/dist/connectors/ledger.js +0 -7
- package/dist/connectors/metaMask.d.ts +0 -1
- package/dist/connectors/metaMask.js +0 -7
- package/dist/connectors/mock.d.ts +0 -1
- package/dist/connectors/mock.js +0 -9
- package/dist/connectors/safe.d.ts +0 -1
- package/dist/connectors/safe.js +0 -7
- package/dist/connectors/walletConnect.d.ts +0 -1
- package/dist/connectors/walletConnect.js +0 -7
- package/dist/connectors/walletConnectLegacy.d.ts +0 -1
- package/dist/connectors/walletConnectLegacy.js +0 -7
- package/dist/index-e744bbc2.d.ts +0 -22
- package/dist/index.d.ts +0 -1397
- package/dist/index.js +0 -135
- package/dist/internal/index.d.ts +0 -24
- package/dist/internal/index.js +0 -10
- package/dist/internal/test.d.ts +0 -438
- package/dist/internal/test.js +0 -160
- package/dist/providers/alchemy.d.ts +0 -11
- package/dist/providers/alchemy.js +0 -29
- package/dist/providers/infura.d.ts +0 -11
- package/dist/providers/infura.js +0 -29
- package/dist/providers/jsonRpc.d.ts +0 -13
- package/dist/providers/jsonRpc.js +0 -28
- package/dist/providers/public.d.ts +0 -7
- package/dist/providers/public.js +0 -16
- package/dist/window.d.ts +0 -7
- package/dist/window.js +0 -0
- package/internal/package.json +0 -4
- package/internal/test/package.json +0 -4
- package/providers/alchemy/package.json +0 -4
- package/providers/infura/package.json +0 -4
- package/providers/jsonRpc/package.json +0 -4
- package/providers/public/package.json +0 -4
- package/window/package.json +0 -4
package/dist/index.d.ts
DELETED
|
@@ -1,1397 +0,0 @@
|
|
|
1
|
-
import * as viem from 'viem';
|
|
2
|
-
import { Address, SignMessageReturnType, SignTypedDataParameters, Account, SignTypedDataReturnType, SimulateContractParameters, SimulateContractReturnType, GetContractParameters, Transport, Chain as Chain$1, PublicClient as PublicClient$1, GetContractReturnType, ContractFunctionConfig, MulticallParameters, MulticallReturnType, ReadContractParameters, ReadContractReturnType, MulticallContracts, WatchContractEventParameters, WriteContractParameters, WriteContractReturnType, GetEnsResolverReturnType, Hex, GetTransactionReturnType, SendTransactionParameters, SendTransactionReturnType, WaitForTransactionReceiptParameters, WaitForTransactionReceiptReturnType, WatchPendingTransactionsParameters, OnTransactionsParameter, FallbackTransportConfig, PublicClientConfig, FallbackTransport } from 'viem';
|
|
3
|
-
export { Address } from 'viem';
|
|
4
|
-
import { Mutate, StoreApi } from 'zustand/vanilla';
|
|
5
|
-
import { Connector, ConnectorData } from '@wagmi/connectors';
|
|
6
|
-
export { Connector, ConnectorData, ConnectorEvents, ConnectorNotFoundError, WindowProvider } from '@wagmi/connectors';
|
|
7
|
-
import { P as PublicClient, W as WebSocketPublicClient, U as Unit, a as WalletClient, H as Hash, C as ChainProviderFn } from './index-e744bbc2.js';
|
|
8
|
-
import { Chain } from 'viem/chains';
|
|
9
|
-
export { Chain, mainnet, sepolia } from 'viem/chains';
|
|
10
|
-
import { TypedData, Abi, Narrow, ExtractAbiFunctionNames } from 'abitype';
|
|
11
|
-
import { GetEnsAvatarReturnType } from 'viem/ens';
|
|
12
|
-
export { InjectedConnector, InjectedConnectorOptions } from '@wagmi/connectors/injected';
|
|
13
|
-
|
|
14
|
-
type BaseStorage = Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>;
|
|
15
|
-
type ClientStorage = {
|
|
16
|
-
getItem<T>(key: string, defaultState?: T | null): T | null;
|
|
17
|
-
setItem<T>(key: string, value: T | null): void;
|
|
18
|
-
removeItem(key: string): void;
|
|
19
|
-
};
|
|
20
|
-
declare const noopStorage: BaseStorage;
|
|
21
|
-
declare function createStorage({ deserialize, key: prefix, serialize, storage, }: {
|
|
22
|
-
deserialize?: <T>(value: string) => T;
|
|
23
|
-
key?: string;
|
|
24
|
-
serialize?: <T>(value: T) => string;
|
|
25
|
-
storage: BaseStorage;
|
|
26
|
-
}): ClientStorage;
|
|
27
|
-
|
|
28
|
-
type CreateConfigParameters<TPublicClient extends PublicClient = PublicClient, TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient> = {
|
|
29
|
-
/** Enables reconnecting to last used connector on init */
|
|
30
|
-
autoConnect?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Connectors used for linking accounts
|
|
33
|
-
* @default [new InjectedConnector()]
|
|
34
|
-
*/
|
|
35
|
-
connectors?: (() => Connector[]) | Connector[];
|
|
36
|
-
/** Custom logger */
|
|
37
|
-
logger?: {
|
|
38
|
-
warn: typeof console.warn | null;
|
|
39
|
-
};
|
|
40
|
-
/** Interface for connecting to network */
|
|
41
|
-
publicClient: ((config: {
|
|
42
|
-
chainId?: number;
|
|
43
|
-
}) => TPublicClient) | TPublicClient;
|
|
44
|
-
/**
|
|
45
|
-
* Custom storage for data persistance
|
|
46
|
-
* @default window.localStorage
|
|
47
|
-
*/
|
|
48
|
-
storage?: ClientStorage;
|
|
49
|
-
/** WebSocket interface for connecting to network */
|
|
50
|
-
webSocketPublicClient?: ((config: {
|
|
51
|
-
chainId?: number;
|
|
52
|
-
}) => TWebSocketPublicClient | undefined) | TWebSocketPublicClient;
|
|
53
|
-
};
|
|
54
|
-
type Data$1 = ConnectorData;
|
|
55
|
-
type State<TPublicClient extends PublicClient = PublicClient, TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient> = {
|
|
56
|
-
chains?: Connector['chains'];
|
|
57
|
-
connector?: Connector;
|
|
58
|
-
connectors: Connector[];
|
|
59
|
-
data?: Data$1;
|
|
60
|
-
error?: Error;
|
|
61
|
-
publicClient: TPublicClient;
|
|
62
|
-
status: 'connected' | 'connecting' | 'reconnecting' | 'disconnected';
|
|
63
|
-
webSocketPublicClient?: TWebSocketPublicClient;
|
|
64
|
-
};
|
|
65
|
-
declare class Config<TPublicClient extends PublicClient = PublicClient, TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient> {
|
|
66
|
-
#private;
|
|
67
|
-
args: CreateConfigParameters<TPublicClient, TWebSocketPublicClient>;
|
|
68
|
-
publicClients: Map<number, TPublicClient | undefined>;
|
|
69
|
-
storage: ClientStorage;
|
|
70
|
-
store: Mutate<StoreApi<State<TPublicClient, TWebSocketPublicClient>>, [
|
|
71
|
-
[
|
|
72
|
-
'zustand/subscribeWithSelector',
|
|
73
|
-
never
|
|
74
|
-
],
|
|
75
|
-
[
|
|
76
|
-
'zustand/persist',
|
|
77
|
-
Partial<State<TPublicClient, TWebSocketPublicClient>>
|
|
78
|
-
]
|
|
79
|
-
]>;
|
|
80
|
-
webSocketPublicClients: Map<number, TWebSocketPublicClient | undefined>;
|
|
81
|
-
constructor({ autoConnect, connectors, publicClient, storage, logger, webSocketPublicClient, }: CreateConfigParameters<TPublicClient, TWebSocketPublicClient>);
|
|
82
|
-
get chains(): viem.Chain[] | undefined;
|
|
83
|
-
get connectors(): Connector<any, any>[];
|
|
84
|
-
get connector(): Connector<any, any> | undefined;
|
|
85
|
-
get data(): ConnectorData | undefined;
|
|
86
|
-
get error(): Error | undefined;
|
|
87
|
-
get lastUsedChainId(): number | undefined;
|
|
88
|
-
get publicClient(): TPublicClient;
|
|
89
|
-
get status(): "connecting" | "connected" | "reconnecting" | "disconnected";
|
|
90
|
-
get subscribe(): {
|
|
91
|
-
(listener: (selectedState: State<TPublicClient, TWebSocketPublicClient>, previousSelectedState: State<TPublicClient, TWebSocketPublicClient>) => void): () => void;
|
|
92
|
-
<U>(selector: (state: State<TPublicClient, TWebSocketPublicClient>) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
93
|
-
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
94
|
-
fireImmediately?: boolean | undefined;
|
|
95
|
-
} | undefined): () => void;
|
|
96
|
-
};
|
|
97
|
-
get webSocketPublicClient(): TWebSocketPublicClient | undefined;
|
|
98
|
-
setState(updater: State<TPublicClient, TWebSocketPublicClient> | ((state: State<TPublicClient, TWebSocketPublicClient>) => State<TPublicClient, TWebSocketPublicClient>)): void;
|
|
99
|
-
clearState(): void;
|
|
100
|
-
destroy(): Promise<void>;
|
|
101
|
-
autoConnect(): Promise<ConnectorData | undefined>;
|
|
102
|
-
setConnectors(connectors: NonNullable<CreateConfigParameters['connectors']>): void;
|
|
103
|
-
getPublicClient({ chainId }?: {
|
|
104
|
-
chainId?: number;
|
|
105
|
-
}): TPublicClient;
|
|
106
|
-
setPublicClient(publicClient: CreateConfigParameters<TPublicClient>['publicClient']): void;
|
|
107
|
-
getWebSocketPublicClient({ chainId }?: {
|
|
108
|
-
chainId?: number;
|
|
109
|
-
}): TWebSocketPublicClient | undefined;
|
|
110
|
-
setWebSocketPublicClient(webSocketPublicClient: NonNullable<CreateConfigParameters<TPublicClient>['webSocketPublicClient']>): void;
|
|
111
|
-
setLastUsedConnector(lastUsedConnector?: string | null): void;
|
|
112
|
-
}
|
|
113
|
-
declare function createConfig<TPublicClient extends PublicClient = PublicClient, TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient>(args: CreateConfigParameters<TPublicClient, TWebSocketPublicClient>): Config<TPublicClient, TWebSocketPublicClient>;
|
|
114
|
-
declare function getConfig<TPublicClient extends PublicClient = PublicClient, TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient>(): Config<TPublicClient, TWebSocketPublicClient>;
|
|
115
|
-
|
|
116
|
-
type ConnectArgs = {
|
|
117
|
-
/** Chain ID to connect to */
|
|
118
|
-
chainId?: number;
|
|
119
|
-
/** Connector to connect */
|
|
120
|
-
connector: Connector;
|
|
121
|
-
};
|
|
122
|
-
type Data = Required<ConnectorData>;
|
|
123
|
-
type ConnectResult<TPublicClient extends PublicClient = PublicClient> = {
|
|
124
|
-
account: Data['account'];
|
|
125
|
-
chain: Data['chain'];
|
|
126
|
-
connector: Config<TPublicClient>['connector'];
|
|
127
|
-
};
|
|
128
|
-
declare function connect<TPublicClient extends PublicClient = PublicClient>({ chainId, connector }: ConnectArgs): Promise<ConnectResult<TPublicClient>>;
|
|
129
|
-
|
|
130
|
-
declare function disconnect(): Promise<void>;
|
|
131
|
-
|
|
132
|
-
type FetchBalanceArgs = {
|
|
133
|
-
/** Address of balance to check */
|
|
134
|
-
address: Address;
|
|
135
|
-
/** Chain id to use for Public Client. */
|
|
136
|
-
chainId?: number;
|
|
137
|
-
/** Units for formatting output */
|
|
138
|
-
formatUnits?: Unit;
|
|
139
|
-
/** ERC-20 address */
|
|
140
|
-
token?: Address;
|
|
141
|
-
};
|
|
142
|
-
type FetchBalanceResult = {
|
|
143
|
-
decimals: number;
|
|
144
|
-
formatted: string;
|
|
145
|
-
symbol: string;
|
|
146
|
-
value: bigint;
|
|
147
|
-
};
|
|
148
|
-
declare function fetchBalance({ address, chainId, formatUnits: unit, token, }: FetchBalanceArgs): Promise<FetchBalanceResult>;
|
|
149
|
-
|
|
150
|
-
type GetAccountResult<TPublicClient extends PublicClient = PublicClient> = {
|
|
151
|
-
address: NonNullable<Data$1['account']>;
|
|
152
|
-
connector: NonNullable<Config<TPublicClient>['connector']>;
|
|
153
|
-
isConnected: true;
|
|
154
|
-
isConnecting: false;
|
|
155
|
-
isDisconnected: false;
|
|
156
|
-
isReconnecting: false;
|
|
157
|
-
status: 'connected';
|
|
158
|
-
} | {
|
|
159
|
-
address: Data$1['account'];
|
|
160
|
-
connector: Config<TPublicClient>['connector'];
|
|
161
|
-
isConnected: boolean;
|
|
162
|
-
isConnecting: false;
|
|
163
|
-
isDisconnected: false;
|
|
164
|
-
isReconnecting: true;
|
|
165
|
-
status: 'reconnecting';
|
|
166
|
-
} | {
|
|
167
|
-
address: Data$1['account'];
|
|
168
|
-
connector: Config<TPublicClient>['connector'];
|
|
169
|
-
isConnected: false;
|
|
170
|
-
isReconnecting: false;
|
|
171
|
-
isConnecting: true;
|
|
172
|
-
isDisconnected: false;
|
|
173
|
-
status: 'connecting';
|
|
174
|
-
} | {
|
|
175
|
-
address: undefined;
|
|
176
|
-
connector: undefined;
|
|
177
|
-
isConnected: false;
|
|
178
|
-
isReconnecting: false;
|
|
179
|
-
isConnecting: false;
|
|
180
|
-
isDisconnected: true;
|
|
181
|
-
status: 'disconnected';
|
|
182
|
-
};
|
|
183
|
-
declare function getAccount<TPublicClient extends PublicClient>(): GetAccountResult<TPublicClient>;
|
|
184
|
-
|
|
185
|
-
type GetNetworkResult = {
|
|
186
|
-
chain?: Chain & {
|
|
187
|
-
unsupported?: boolean;
|
|
188
|
-
};
|
|
189
|
-
chains: Chain[];
|
|
190
|
-
};
|
|
191
|
-
declare function getNetwork(): GetNetworkResult;
|
|
192
|
-
|
|
193
|
-
type SignMessageArgs = {
|
|
194
|
-
/** Message to sign with wallet */
|
|
195
|
-
message: string;
|
|
196
|
-
};
|
|
197
|
-
type SignMessageResult = SignMessageReturnType;
|
|
198
|
-
declare function signMessage(args: SignMessageArgs): Promise<SignMessageResult>;
|
|
199
|
-
|
|
200
|
-
type SignTypedDataArgs<TTypedData extends TypedData | {
|
|
201
|
-
[key: string]: unknown;
|
|
202
|
-
} = TypedData, TPrimaryType extends string = string> = SignTypedDataParameters<TTypedData, TPrimaryType, Account>;
|
|
203
|
-
type SignTypedDataResult = SignTypedDataReturnType;
|
|
204
|
-
declare function signTypedData<TTypedData extends TypedData | {
|
|
205
|
-
[key: string]: unknown;
|
|
206
|
-
}, TPrimaryType extends string>({ domain, message, primaryType, types, }: SignTypedDataArgs<TTypedData, TPrimaryType>): Promise<SignTypedDataResult>;
|
|
207
|
-
|
|
208
|
-
type SwitchNetworkArgs = {
|
|
209
|
-
chainId: number;
|
|
210
|
-
};
|
|
211
|
-
type SwitchNetworkResult = Chain;
|
|
212
|
-
declare function switchNetwork({ chainId, }: SwitchNetworkArgs): Promise<SwitchNetworkResult>;
|
|
213
|
-
|
|
214
|
-
type WatchAccountCallback<TPublicClient extends PublicClient = PublicClient> = (data: GetAccountResult<TPublicClient>) => void;
|
|
215
|
-
type WatchAccountConfig = {
|
|
216
|
-
selector?({ address, connector, status, }: {
|
|
217
|
-
address?: string;
|
|
218
|
-
connector?: Connector;
|
|
219
|
-
status: GetAccountResult['status'];
|
|
220
|
-
}): any;
|
|
221
|
-
};
|
|
222
|
-
declare function watchAccount<TPublicClient extends PublicClient>(callback: WatchAccountCallback<TPublicClient>, { selector }?: WatchAccountConfig): () => void;
|
|
223
|
-
|
|
224
|
-
type WatchNetworkCallback = (data: GetNetworkResult) => void;
|
|
225
|
-
type WatchNetworkConfig = {
|
|
226
|
-
selector?({ chainId, chains }: {
|
|
227
|
-
chainId?: number;
|
|
228
|
-
chains?: Chain[];
|
|
229
|
-
}): any;
|
|
230
|
-
};
|
|
231
|
-
declare function watchNetwork(callback: WatchNetworkCallback, { selector }?: WatchNetworkConfig): () => void;
|
|
232
|
-
|
|
233
|
-
type FetchTokenArgs = {
|
|
234
|
-
/** Address of ERC-20 token */
|
|
235
|
-
address: Address;
|
|
236
|
-
/** Chain id to use for Public Client. */
|
|
237
|
-
chainId?: number;
|
|
238
|
-
/** Units for formatting output */
|
|
239
|
-
formatUnits?: Unit;
|
|
240
|
-
};
|
|
241
|
-
type FetchTokenResult = {
|
|
242
|
-
address: Address;
|
|
243
|
-
decimals: number;
|
|
244
|
-
name: string;
|
|
245
|
-
symbol: string;
|
|
246
|
-
totalSupply: {
|
|
247
|
-
formatted: string;
|
|
248
|
-
value: bigint;
|
|
249
|
-
};
|
|
250
|
-
};
|
|
251
|
-
declare function fetchToken({ address, chainId, formatUnits: unit, }: FetchTokenArgs): Promise<FetchTokenResult>;
|
|
252
|
-
|
|
253
|
-
type PrepareWriteContractConfig<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string, TChainId extends number = number, TWalletClient extends WalletClient = WalletClient> = Omit<SimulateContractParameters<TAbi, TFunctionName>, 'chain'> & {
|
|
254
|
-
/** Chain id to use for Public Client. */
|
|
255
|
-
chainId?: TChainId | number;
|
|
256
|
-
/** Custom Wallet Client. */
|
|
257
|
-
walletClient?: TWalletClient | null;
|
|
258
|
-
};
|
|
259
|
-
type PrepareWriteContractResult<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string, TChainId extends number = number> = Omit<SimulateContractReturnType<TAbi, TFunctionName>, 'request'> & {
|
|
260
|
-
request: SimulateContractReturnType<TAbi, TFunctionName>['request'] & {
|
|
261
|
-
chainId?: TChainId;
|
|
262
|
-
};
|
|
263
|
-
mode: 'prepared';
|
|
264
|
-
};
|
|
265
|
-
/**
|
|
266
|
-
* @description Prepares the parameters required for a contract write transaction.
|
|
267
|
-
*
|
|
268
|
-
* Returns config to be passed through to `writeContract`.
|
|
269
|
-
*
|
|
270
|
-
* @example
|
|
271
|
-
* import { prepareWriteContract, writeContract } from '@wagmi/core'
|
|
272
|
-
*
|
|
273
|
-
* const config = await prepareWriteContract({
|
|
274
|
-
* address: '0x...',
|
|
275
|
-
* abi: wagmiAbi,
|
|
276
|
-
* functionName: 'mint',
|
|
277
|
-
* })
|
|
278
|
-
* const result = await writeContract(config)
|
|
279
|
-
*/
|
|
280
|
-
declare function prepareWriteContract<TAbi extends Abi | readonly unknown[], TFunctionName extends string, TChainId extends number, TWalletClient extends WalletClient = WalletClient>({ abi, address, args, chainId, functionName, walletClient: walletClient_, ...config }: PrepareWriteContractConfig<TAbi, TFunctionName, TChainId, TWalletClient>): Promise<PrepareWriteContractResult<TAbi, TFunctionName, TChainId>>;
|
|
281
|
-
|
|
282
|
-
type GetContractArgs<TAbi extends Abi | readonly unknown[] = Abi, TWalletClient extends WalletClient | unknown = unknown> = Omit<GetContractParameters<Transport, Chain$1, Account, TAbi, PublicClient$1, TWalletClient>, 'publicClient' | 'walletClient'> & {
|
|
283
|
-
chainId?: number;
|
|
284
|
-
walletClient?: NonNullable<TWalletClient>;
|
|
285
|
-
};
|
|
286
|
-
type GetContractResult<TAbi extends Abi | readonly unknown[] = Abi, TWalletClient extends WalletClient | unknown = unknown> = GetContractReturnType<TAbi, PublicClient$1, TWalletClient>;
|
|
287
|
-
declare function getContract<TAbi extends Abi | readonly unknown[], TWalletClient extends WalletClient | unknown>({ address, abi, chainId, walletClient, }: GetContractArgs<TAbi, TWalletClient>): GetContractResult<TAbi, TWalletClient>;
|
|
288
|
-
|
|
289
|
-
type MulticallConfig<TContracts extends ContractFunctionConfig[] = ContractFunctionConfig[], TAllowFailure extends boolean = true> = MulticallParameters<TContracts, TAllowFailure> & {
|
|
290
|
-
/** Chain id to use for Public Client. */
|
|
291
|
-
chainId?: number;
|
|
292
|
-
};
|
|
293
|
-
type MulticallResult<TContracts extends ContractFunctionConfig[] = ContractFunctionConfig[], TAllowFailure extends boolean = true> = MulticallReturnType<TContracts, TAllowFailure>;
|
|
294
|
-
declare function multicall<TContracts extends ContractFunctionConfig[], TAllowFailure extends boolean = true>({ chainId, contracts, blockNumber, blockTag, ...args }: MulticallConfig<TContracts, TAllowFailure>): Promise<MulticallResult<TContracts, TAllowFailure>>;
|
|
295
|
-
|
|
296
|
-
type ReadContractConfig<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = ReadContractParameters<TAbi, TFunctionName> & {
|
|
297
|
-
/** Chain id to use for Public Client. */
|
|
298
|
-
chainId?: number;
|
|
299
|
-
};
|
|
300
|
-
type ReadContractResult<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = ReadContractReturnType<TAbi, TFunctionName>;
|
|
301
|
-
declare function readContract<TAbi extends Abi | readonly unknown[], TFunctionName extends string>({ address, account, chainId, abi, args, functionName, blockNumber, blockTag, }: ReadContractConfig<TAbi, TFunctionName>): Promise<ReadContractResult<TAbi, TFunctionName>>;
|
|
302
|
-
|
|
303
|
-
type ReadContractsConfig<TContracts extends ContractFunctionConfig[], TAllowFailure extends boolean = true> = Omit<MulticallConfig<TContracts, TAllowFailure>, 'contracts' | 'chainId'> & {
|
|
304
|
-
/** Contracts to query */
|
|
305
|
-
contracts: Narrow<readonly [
|
|
306
|
-
...MulticallContracts<TContracts, {
|
|
307
|
-
/** Chain id to use for Public Client. */
|
|
308
|
-
chainId?: number;
|
|
309
|
-
}>
|
|
310
|
-
]>;
|
|
311
|
-
};
|
|
312
|
-
type ReadContractsResult<TContracts extends ContractFunctionConfig[], TAllowFailure extends boolean = true> = MulticallResult<TContracts, TAllowFailure>;
|
|
313
|
-
declare function readContracts<TContracts extends ContractFunctionConfig[], TAllowFailure extends boolean = true>({ contracts, blockNumber, blockTag, ...args }: ReadContractsConfig<TContracts, TAllowFailure>): Promise<ReadContractsResult<TContracts, TAllowFailure>>;
|
|
314
|
-
|
|
315
|
-
type WatchContractEventConfig<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string = string> = Pick<WatchContractEventParameters<TAbi, TEventName>, 'abi' | 'address' | 'eventName'> & {
|
|
316
|
-
chainId?: number;
|
|
317
|
-
};
|
|
318
|
-
type WatchContractEventCallback<TAbi extends Abi | readonly unknown[] = Abi, TEventName extends string = string> = WatchContractEventParameters<TAbi, TEventName>['onLogs'];
|
|
319
|
-
declare function watchContractEvent<TAbi extends Abi | readonly unknown[], TEventName extends string>({ address, abi, chainId, eventName, }: WatchContractEventConfig<TAbi, TEventName>, callback: WatchContractEventCallback<TAbi, TEventName>): () => void;
|
|
320
|
-
|
|
321
|
-
type WatchMulticallConfig<TContracts extends ContractFunctionConfig[] = ContractFunctionConfig[], TAllowFailure extends boolean = true> = MulticallConfig<TContracts, TAllowFailure> & {
|
|
322
|
-
listenToBlock?: boolean;
|
|
323
|
-
};
|
|
324
|
-
type WatchMulticallCallback<TContracts extends ContractFunctionConfig[] = ContractFunctionConfig[], TAllowFailure extends boolean = true> = (results: MulticallResult<TContracts, TAllowFailure>) => void;
|
|
325
|
-
declare function watchMulticall<TContracts extends ContractFunctionConfig[], TAllowFailure extends boolean = true>(args: WatchMulticallConfig<TContracts, TAllowFailure>, callback: WatchMulticallCallback<TContracts, TAllowFailure>): () => void;
|
|
326
|
-
|
|
327
|
-
type WatchReadContractConfig<TAbi extends Abi | readonly unknown[] = Abi, TFunctionName extends string = string> = ReadContractConfig<TAbi, TFunctionName> & {
|
|
328
|
-
listenToBlock?: boolean;
|
|
329
|
-
};
|
|
330
|
-
type WatchReadContractCallback<TAbi extends Abi | readonly unknown[], TFunctionName extends string> = (result: ReadContractResult<TAbi, TFunctionName>) => void;
|
|
331
|
-
declare function watchReadContract<TAbi extends Abi | readonly unknown[], TFunctionName extends TAbi extends Abi ? ExtractAbiFunctionNames<TAbi, 'view' | 'pure'> : string>(args: WatchReadContractConfig<TAbi, TFunctionName>, callback: WatchReadContractCallback<TAbi, TFunctionName>): () => void;
|
|
332
|
-
|
|
333
|
-
type WatchReadContractsConfig<TContracts extends ContractFunctionConfig[] = ContractFunctionConfig[], TAllowFailure extends boolean = true> = ReadContractsConfig<TContracts, TAllowFailure> & {
|
|
334
|
-
listenToBlock?: boolean;
|
|
335
|
-
};
|
|
336
|
-
type WatchReadContractsCallback<TContracts extends ContractFunctionConfig[] = ContractFunctionConfig[], TAllowFailure extends boolean = true> = (results: ReadContractsResult<TContracts, TAllowFailure>) => void;
|
|
337
|
-
declare function watchReadContracts<TContracts extends ContractFunctionConfig[], TAllowFailure extends boolean = true>(args: WatchReadContractsConfig<TContracts, TAllowFailure>, callback: WatchReadContractsCallback<TContracts, TAllowFailure>): () => void;
|
|
338
|
-
|
|
339
|
-
type WriteContractMode = 'prepared' | undefined;
|
|
340
|
-
type WriteContractPreparedArgs<TAbi extends Abi | readonly unknown[] = readonly unknown[], TFunctionName extends string = string> = {
|
|
341
|
-
/** Chain id. */
|
|
342
|
-
chainId?: number;
|
|
343
|
-
mode: 'prepared';
|
|
344
|
-
request: WriteContractParameters<TAbi, TFunctionName, Chain$1, Account>;
|
|
345
|
-
};
|
|
346
|
-
type WriteContractUnpreparedArgs<TAbi extends Abi | readonly unknown[], TFunctionName extends string> = Omit<WriteContractParameters<TAbi, TFunctionName, Chain$1, Account>, 'chain'> & {
|
|
347
|
-
/** Chain id. */
|
|
348
|
-
chainId?: number;
|
|
349
|
-
mode?: never;
|
|
350
|
-
};
|
|
351
|
-
type WriteContractArgs<TAbi extends Abi | readonly unknown[], TFunctionName extends string> = WriteContractPreparedArgs<TAbi, TFunctionName> | WriteContractUnpreparedArgs<TAbi, TFunctionName>;
|
|
352
|
-
type WriteContractResult = {
|
|
353
|
-
hash: WriteContractReturnType;
|
|
354
|
-
};
|
|
355
|
-
/**
|
|
356
|
-
* @description Function to call a contract write method.
|
|
357
|
-
*
|
|
358
|
-
* It is recommended to pair this with the {@link prepareWriteContract} function
|
|
359
|
-
* to avoid [UX pitfalls](https://wagmi.sh/react/prepare-hooks#ux-pitfalls-without-prepare-hooks).
|
|
360
|
-
*
|
|
361
|
-
* @example
|
|
362
|
-
* import { prepareWriteContract, writeContract } from '@wagmi/core'
|
|
363
|
-
*
|
|
364
|
-
* const config = await prepareWriteContract({
|
|
365
|
-
* address: '0x...',
|
|
366
|
-
* abi: wagmiAbi,
|
|
367
|
-
* functionName: 'mint',
|
|
368
|
-
* })
|
|
369
|
-
* const result = await writeContract(config)
|
|
370
|
-
*/
|
|
371
|
-
declare function writeContract<TAbi extends Abi | readonly unknown[], TFunctionName extends string>(config: WriteContractUnpreparedArgs<TAbi, TFunctionName> | WriteContractPreparedArgs<TAbi, TFunctionName>): Promise<WriteContractResult>;
|
|
372
|
-
|
|
373
|
-
type FetchEnsAddressArgs = {
|
|
374
|
-
/** Chain id to use for Public Client. */
|
|
375
|
-
chainId?: number;
|
|
376
|
-
/** ENS name to resolve */
|
|
377
|
-
name: string;
|
|
378
|
-
};
|
|
379
|
-
type FetchEnsAddressResult = Address | null;
|
|
380
|
-
declare function fetchEnsAddress({ chainId, name, }: FetchEnsAddressArgs): Promise<FetchEnsAddressResult>;
|
|
381
|
-
|
|
382
|
-
type FetchEnsAvatarArgs = {
|
|
383
|
-
/** ENS name */
|
|
384
|
-
name: string;
|
|
385
|
-
/** Chain id to use for Public Client. */
|
|
386
|
-
chainId?: number;
|
|
387
|
-
};
|
|
388
|
-
type FetchEnsAvatarResult = GetEnsAvatarReturnType;
|
|
389
|
-
declare function fetchEnsAvatar({ name, chainId, }: FetchEnsAvatarArgs): Promise<FetchEnsAvatarResult>;
|
|
390
|
-
|
|
391
|
-
type FetchEnsNameArgs = {
|
|
392
|
-
/** Address to lookup */
|
|
393
|
-
address: Address;
|
|
394
|
-
/** Chain id to use for Public Client */
|
|
395
|
-
chainId?: number;
|
|
396
|
-
};
|
|
397
|
-
type FetchEnsNameResult = string | null;
|
|
398
|
-
declare function fetchEnsName({ address, chainId, }: FetchEnsNameArgs): Promise<FetchEnsNameResult>;
|
|
399
|
-
|
|
400
|
-
type FetchEnsResolverArgs = {
|
|
401
|
-
/** Chain id to use for Public Client */
|
|
402
|
-
chainId?: number;
|
|
403
|
-
/** ENS name to resolve */
|
|
404
|
-
name: string;
|
|
405
|
-
};
|
|
406
|
-
type FetchEnsResolverResult = GetEnsResolverReturnType;
|
|
407
|
-
declare function fetchEnsResolver({ chainId, name, }: FetchEnsResolverArgs): Promise<FetchEnsResolverResult>;
|
|
408
|
-
|
|
409
|
-
type FetchBlockNumberArgs = {
|
|
410
|
-
chainId?: number;
|
|
411
|
-
};
|
|
412
|
-
type FetchBlockNumberResult = bigint;
|
|
413
|
-
declare function fetchBlockNumber({ chainId, }?: FetchBlockNumberArgs): Promise<FetchBlockNumberResult>;
|
|
414
|
-
|
|
415
|
-
type FetchFeeDataArgs = {
|
|
416
|
-
/** Units for formatting output */
|
|
417
|
-
formatUnits?: Unit;
|
|
418
|
-
/** Chain id to use for Public Client. */
|
|
419
|
-
chainId?: number;
|
|
420
|
-
};
|
|
421
|
-
type FetchFeeDataResult = {
|
|
422
|
-
lastBaseFeePerGas: bigint | null;
|
|
423
|
-
gasPrice: bigint | null;
|
|
424
|
-
maxFeePerGas: bigint | null;
|
|
425
|
-
maxPriorityFeePerGas: bigint | null;
|
|
426
|
-
formatted: {
|
|
427
|
-
gasPrice: string | null;
|
|
428
|
-
maxFeePerGas: string | null;
|
|
429
|
-
maxPriorityFeePerGas: string | null;
|
|
430
|
-
};
|
|
431
|
-
};
|
|
432
|
-
declare function fetchFeeData({ chainId, formatUnits: units, }?: FetchFeeDataArgs): Promise<FetchFeeDataResult>;
|
|
433
|
-
|
|
434
|
-
type WatchBlockNumberArgs = {
|
|
435
|
-
chainId?: number;
|
|
436
|
-
listen: boolean;
|
|
437
|
-
};
|
|
438
|
-
type WatchBlockNumberCallback = (blockNumber: FetchBlockNumberResult) => void;
|
|
439
|
-
declare function watchBlockNumber(args: WatchBlockNumberArgs, callback: WatchBlockNumberCallback): () => void;
|
|
440
|
-
|
|
441
|
-
type GetPublicClientArgs = {
|
|
442
|
-
/** Chain id to use for public client. */
|
|
443
|
-
chainId?: number;
|
|
444
|
-
};
|
|
445
|
-
type GetPublicClientResult<TPublicClient extends PublicClient = PublicClient> = TPublicClient;
|
|
446
|
-
declare function getPublicClient<TPublicClient extends PublicClient = PublicClient>({ chainId }?: GetPublicClientArgs): GetPublicClientResult<TPublicClient>;
|
|
447
|
-
|
|
448
|
-
type GetWalletClientArgs = {
|
|
449
|
-
/** Chain ID to use for Wallet Client. */
|
|
450
|
-
chainId?: number;
|
|
451
|
-
};
|
|
452
|
-
type GetWalletClientResult = WalletClient | null;
|
|
453
|
-
declare function getWalletClient({ chainId, }?: GetWalletClientArgs): Promise<GetWalletClientResult>;
|
|
454
|
-
|
|
455
|
-
type GetWebSocketPublicClientArgs = {
|
|
456
|
-
/** Chain id to use for public client */
|
|
457
|
-
chainId?: number;
|
|
458
|
-
};
|
|
459
|
-
type GetWebSocketPublicClientResult<TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient> = TWebSocketPublicClient | undefined;
|
|
460
|
-
declare function getWebSocketPublicClient<TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient>({ chainId, }?: GetWebSocketPublicClientArgs): GetWebSocketPublicClientResult<TWebSocketPublicClient>;
|
|
461
|
-
|
|
462
|
-
type WatchPublicClientCallback<TPublicClient extends PublicClient = PublicClient> = (PublicClient: GetPublicClientResult<TPublicClient>) => void;
|
|
463
|
-
declare function watchPublicClient<TPublicClient extends PublicClient = PublicClient>(args: GetPublicClientArgs, callback: WatchPublicClientCallback<TPublicClient>): () => void;
|
|
464
|
-
|
|
465
|
-
type WatchWalletClientArgs = GetWalletClientArgs;
|
|
466
|
-
type WatchWalletClientCallback = (data: GetWalletClientResult) => void;
|
|
467
|
-
declare function watchWalletClient({ chainId }: WatchWalletClientArgs, callback: WatchWalletClientCallback): () => void;
|
|
468
|
-
|
|
469
|
-
type WatchWebSocketPublicClientCallback<TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient> = (webSocketPublicClient: GetWebSocketPublicClientResult<TWebSocketPublicClient>) => void;
|
|
470
|
-
declare function watchWebSocketPublicClient<TWebSocketPublicClient extends WebSocketPublicClient = WebSocketPublicClient>(args: GetWebSocketPublicClientArgs, callback: WatchWebSocketPublicClientCallback<TWebSocketPublicClient>): () => void;
|
|
471
|
-
|
|
472
|
-
type FetchTransactionArgs = {
|
|
473
|
-
/** Chain ID used to validate if the Wallet Client is connected to the target chain */
|
|
474
|
-
chainId?: number;
|
|
475
|
-
hash: Hex;
|
|
476
|
-
};
|
|
477
|
-
type FetchTransactionResult = GetTransactionReturnType;
|
|
478
|
-
/**
|
|
479
|
-
* @description Fetches transaction for hash
|
|
480
|
-
*
|
|
481
|
-
* @example
|
|
482
|
-
* import { fetchTransaction } from '@wagmi/core'
|
|
483
|
-
*
|
|
484
|
-
* const transaction = await fetchTransaction({
|
|
485
|
-
* chainId: 1,
|
|
486
|
-
* hash: '0x...',
|
|
487
|
-
* })
|
|
488
|
-
*/
|
|
489
|
-
declare function fetchTransaction({ chainId, hash, }: FetchTransactionArgs): Promise<FetchTransactionResult>;
|
|
490
|
-
|
|
491
|
-
type SendTransactionArgs = {
|
|
492
|
-
/** Chain ID used to validate if the walletClient is connected to the target chain */
|
|
493
|
-
chainId?: number;
|
|
494
|
-
mode?: 'prepared';
|
|
495
|
-
to: string;
|
|
496
|
-
} & Omit<SendTransactionParameters<Chain$1, Account>, 'chain' | 'to'>;
|
|
497
|
-
type SendTransactionResult = {
|
|
498
|
-
hash: SendTransactionReturnType;
|
|
499
|
-
};
|
|
500
|
-
/**
|
|
501
|
-
* @description Function to send a transaction.
|
|
502
|
-
*
|
|
503
|
-
* It is recommended to pair this with the `prepareSendTransaction` function to avoid
|
|
504
|
-
* [UX pitfalls](https://wagmi.sh/react/prepare-hooks#ux-pitfalls-without-prepare-hooks).
|
|
505
|
-
*
|
|
506
|
-
* @example
|
|
507
|
-
* import { prepareSendTransaction, sendTransaction } from '@wagmi/core'
|
|
508
|
-
*
|
|
509
|
-
* const config = await prepareSendTransaction({
|
|
510
|
-
* to: 'moxey.eth',
|
|
511
|
-
* value: parseEther('1'),
|
|
512
|
-
* })
|
|
513
|
-
* const result = await sendTransaction(config)
|
|
514
|
-
*/
|
|
515
|
-
declare function sendTransaction({ accessList, account, chainId, data, gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas, mode, nonce, to, value, }: SendTransactionArgs): Promise<SendTransactionResult>;
|
|
516
|
-
|
|
517
|
-
type PrepareSendTransactionArgs<TWalletClient extends WalletClient = WalletClient> = Omit<SendTransactionParameters<Chain$1, Account>, 'chain' | 'gas' | 'to'> & {
|
|
518
|
-
/** Chain ID used to validate if the walletClient is connected to the target chain */
|
|
519
|
-
chainId?: number;
|
|
520
|
-
gas?: bigint | null;
|
|
521
|
-
to?: string;
|
|
522
|
-
walletClient?: TWalletClient | null;
|
|
523
|
-
};
|
|
524
|
-
type PrepareSendTransactionResult = Omit<SendTransactionArgs, 'mode' | 'to'> & {
|
|
525
|
-
mode: 'prepared';
|
|
526
|
-
to: Address;
|
|
527
|
-
};
|
|
528
|
-
/**
|
|
529
|
-
* @description Prepares the parameters required for sending a transaction.
|
|
530
|
-
*
|
|
531
|
-
* Returns config to be passed through to `sendTransaction`.
|
|
532
|
-
*
|
|
533
|
-
* @example
|
|
534
|
-
* import { prepareSendTransaction, sendTransaction } from '@wagmi/core'
|
|
535
|
-
*
|
|
536
|
-
* const config = await prepareSendTransaction({
|
|
537
|
-
* request: {
|
|
538
|
-
* to: 'moxey.eth',
|
|
539
|
-
* value: parseEther('1'),
|
|
540
|
-
* }
|
|
541
|
-
* })
|
|
542
|
-
* const result = await sendTransaction(config)
|
|
543
|
-
*/
|
|
544
|
-
declare function prepareSendTransaction({ accessList, account, chainId, data, gas: gas_, gasPrice, maxFeePerGas, maxPriorityFeePerGas, nonce, to: to_, value, walletClient: walletClient_, }: PrepareSendTransactionArgs): Promise<PrepareSendTransactionResult>;
|
|
545
|
-
|
|
546
|
-
type WaitForTransactionArgs = {
|
|
547
|
-
/** Chain id to use for Public Client. */
|
|
548
|
-
chainId?: number;
|
|
549
|
-
/**
|
|
550
|
-
* Number of blocks to wait for after transaction is mined
|
|
551
|
-
* @default 1
|
|
552
|
-
*/
|
|
553
|
-
confirmations?: number;
|
|
554
|
-
/** Transaction hash to monitor */
|
|
555
|
-
hash: Hash;
|
|
556
|
-
/** Callback to invoke when the transaction has been replaced (sped up). */
|
|
557
|
-
onReplaced?: WaitForTransactionReceiptParameters['onReplaced'];
|
|
558
|
-
timeout?: number;
|
|
559
|
-
};
|
|
560
|
-
type WaitForTransactionResult = WaitForTransactionReceiptReturnType;
|
|
561
|
-
declare function waitForTransaction({ chainId, confirmations, hash, onReplaced, timeout, }: WaitForTransactionArgs): Promise<WaitForTransactionResult>;
|
|
562
|
-
|
|
563
|
-
type WatchPendingTransactionsArgs = {
|
|
564
|
-
chainId?: number;
|
|
565
|
-
};
|
|
566
|
-
type WatchPendingTransactionsCallback = WatchPendingTransactionsParameters['onTransactions'];
|
|
567
|
-
type WatchPendingTransactionsResult = OnTransactionsParameter;
|
|
568
|
-
declare function watchPendingTransactions(args: WatchPendingTransactionsArgs, callback: WatchPendingTransactionsCallback): () => void;
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* [ERC-20 Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-20)
|
|
572
|
-
*/
|
|
573
|
-
declare const erc20ABI: readonly [{
|
|
574
|
-
readonly type: "event";
|
|
575
|
-
readonly name: "Approval";
|
|
576
|
-
readonly inputs: readonly [{
|
|
577
|
-
readonly indexed: true;
|
|
578
|
-
readonly name: "owner";
|
|
579
|
-
readonly type: "address";
|
|
580
|
-
}, {
|
|
581
|
-
readonly indexed: true;
|
|
582
|
-
readonly name: "spender";
|
|
583
|
-
readonly type: "address";
|
|
584
|
-
}, {
|
|
585
|
-
readonly indexed: false;
|
|
586
|
-
readonly name: "value";
|
|
587
|
-
readonly type: "uint256";
|
|
588
|
-
}];
|
|
589
|
-
}, {
|
|
590
|
-
readonly type: "event";
|
|
591
|
-
readonly name: "Transfer";
|
|
592
|
-
readonly inputs: readonly [{
|
|
593
|
-
readonly indexed: true;
|
|
594
|
-
readonly name: "from";
|
|
595
|
-
readonly type: "address";
|
|
596
|
-
}, {
|
|
597
|
-
readonly indexed: true;
|
|
598
|
-
readonly name: "to";
|
|
599
|
-
readonly type: "address";
|
|
600
|
-
}, {
|
|
601
|
-
readonly indexed: false;
|
|
602
|
-
readonly name: "value";
|
|
603
|
-
readonly type: "uint256";
|
|
604
|
-
}];
|
|
605
|
-
}, {
|
|
606
|
-
readonly type: "function";
|
|
607
|
-
readonly name: "allowance";
|
|
608
|
-
readonly stateMutability: "view";
|
|
609
|
-
readonly inputs: readonly [{
|
|
610
|
-
readonly name: "owner";
|
|
611
|
-
readonly type: "address";
|
|
612
|
-
}, {
|
|
613
|
-
readonly name: "spender";
|
|
614
|
-
readonly type: "address";
|
|
615
|
-
}];
|
|
616
|
-
readonly outputs: readonly [{
|
|
617
|
-
readonly name: "";
|
|
618
|
-
readonly type: "uint256";
|
|
619
|
-
}];
|
|
620
|
-
}, {
|
|
621
|
-
readonly type: "function";
|
|
622
|
-
readonly name: "approve";
|
|
623
|
-
readonly stateMutability: "nonpayable";
|
|
624
|
-
readonly inputs: readonly [{
|
|
625
|
-
readonly name: "spender";
|
|
626
|
-
readonly type: "address";
|
|
627
|
-
}, {
|
|
628
|
-
readonly name: "amount";
|
|
629
|
-
readonly type: "uint256";
|
|
630
|
-
}];
|
|
631
|
-
readonly outputs: readonly [{
|
|
632
|
-
readonly name: "";
|
|
633
|
-
readonly type: "bool";
|
|
634
|
-
}];
|
|
635
|
-
}, {
|
|
636
|
-
readonly type: "function";
|
|
637
|
-
readonly name: "balanceOf";
|
|
638
|
-
readonly stateMutability: "view";
|
|
639
|
-
readonly inputs: readonly [{
|
|
640
|
-
readonly name: "account";
|
|
641
|
-
readonly type: "address";
|
|
642
|
-
}];
|
|
643
|
-
readonly outputs: readonly [{
|
|
644
|
-
readonly name: "";
|
|
645
|
-
readonly type: "uint256";
|
|
646
|
-
}];
|
|
647
|
-
}, {
|
|
648
|
-
readonly type: "function";
|
|
649
|
-
readonly name: "decimals";
|
|
650
|
-
readonly stateMutability: "view";
|
|
651
|
-
readonly inputs: readonly [];
|
|
652
|
-
readonly outputs: readonly [{
|
|
653
|
-
readonly name: "";
|
|
654
|
-
readonly type: "uint8";
|
|
655
|
-
}];
|
|
656
|
-
}, {
|
|
657
|
-
readonly type: "function";
|
|
658
|
-
readonly name: "name";
|
|
659
|
-
readonly stateMutability: "view";
|
|
660
|
-
readonly inputs: readonly [];
|
|
661
|
-
readonly outputs: readonly [{
|
|
662
|
-
readonly name: "";
|
|
663
|
-
readonly type: "string";
|
|
664
|
-
}];
|
|
665
|
-
}, {
|
|
666
|
-
readonly type: "function";
|
|
667
|
-
readonly name: "symbol";
|
|
668
|
-
readonly stateMutability: "view";
|
|
669
|
-
readonly inputs: readonly [];
|
|
670
|
-
readonly outputs: readonly [{
|
|
671
|
-
readonly name: "";
|
|
672
|
-
readonly type: "string";
|
|
673
|
-
}];
|
|
674
|
-
}, {
|
|
675
|
-
readonly type: "function";
|
|
676
|
-
readonly name: "totalSupply";
|
|
677
|
-
readonly stateMutability: "view";
|
|
678
|
-
readonly inputs: readonly [];
|
|
679
|
-
readonly outputs: readonly [{
|
|
680
|
-
readonly name: "";
|
|
681
|
-
readonly type: "uint256";
|
|
682
|
-
}];
|
|
683
|
-
}, {
|
|
684
|
-
readonly type: "function";
|
|
685
|
-
readonly name: "transfer";
|
|
686
|
-
readonly stateMutability: "nonpayable";
|
|
687
|
-
readonly inputs: readonly [{
|
|
688
|
-
readonly name: "recipient";
|
|
689
|
-
readonly type: "address";
|
|
690
|
-
}, {
|
|
691
|
-
readonly name: "amount";
|
|
692
|
-
readonly type: "uint256";
|
|
693
|
-
}];
|
|
694
|
-
readonly outputs: readonly [{
|
|
695
|
-
readonly name: "";
|
|
696
|
-
readonly type: "bool";
|
|
697
|
-
}];
|
|
698
|
-
}, {
|
|
699
|
-
readonly type: "function";
|
|
700
|
-
readonly name: "transferFrom";
|
|
701
|
-
readonly stateMutability: "nonpayable";
|
|
702
|
-
readonly inputs: readonly [{
|
|
703
|
-
readonly name: "sender";
|
|
704
|
-
readonly type: "address";
|
|
705
|
-
}, {
|
|
706
|
-
readonly name: "recipient";
|
|
707
|
-
readonly type: "address";
|
|
708
|
-
}, {
|
|
709
|
-
readonly name: "amount";
|
|
710
|
-
readonly type: "uint256";
|
|
711
|
-
}];
|
|
712
|
-
readonly outputs: readonly [{
|
|
713
|
-
readonly name: "";
|
|
714
|
-
readonly type: "bool";
|
|
715
|
-
}];
|
|
716
|
-
}];
|
|
717
|
-
/**
|
|
718
|
-
* [ERC-721 Non-Fungible Token Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-721)
|
|
719
|
-
*/
|
|
720
|
-
declare const erc721ABI: readonly [{
|
|
721
|
-
readonly type: "event";
|
|
722
|
-
readonly name: "Approval";
|
|
723
|
-
readonly inputs: readonly [{
|
|
724
|
-
readonly indexed: true;
|
|
725
|
-
readonly name: "owner";
|
|
726
|
-
readonly type: "address";
|
|
727
|
-
}, {
|
|
728
|
-
readonly indexed: true;
|
|
729
|
-
readonly name: "spender";
|
|
730
|
-
readonly type: "address";
|
|
731
|
-
}, {
|
|
732
|
-
readonly indexed: true;
|
|
733
|
-
readonly name: "tokenId";
|
|
734
|
-
readonly type: "uint256";
|
|
735
|
-
}];
|
|
736
|
-
}, {
|
|
737
|
-
readonly type: "event";
|
|
738
|
-
readonly name: "ApprovalForAll";
|
|
739
|
-
readonly inputs: readonly [{
|
|
740
|
-
readonly indexed: true;
|
|
741
|
-
readonly name: "owner";
|
|
742
|
-
readonly type: "address";
|
|
743
|
-
}, {
|
|
744
|
-
readonly indexed: true;
|
|
745
|
-
readonly name: "operator";
|
|
746
|
-
readonly type: "address";
|
|
747
|
-
}, {
|
|
748
|
-
readonly indexed: false;
|
|
749
|
-
readonly name: "approved";
|
|
750
|
-
readonly type: "bool";
|
|
751
|
-
}];
|
|
752
|
-
}, {
|
|
753
|
-
readonly type: "event";
|
|
754
|
-
readonly name: "Transfer";
|
|
755
|
-
readonly inputs: readonly [{
|
|
756
|
-
readonly indexed: true;
|
|
757
|
-
readonly name: "from";
|
|
758
|
-
readonly type: "address";
|
|
759
|
-
}, {
|
|
760
|
-
readonly indexed: true;
|
|
761
|
-
readonly name: "to";
|
|
762
|
-
readonly type: "address";
|
|
763
|
-
}, {
|
|
764
|
-
readonly indexed: true;
|
|
765
|
-
readonly name: "tokenId";
|
|
766
|
-
readonly type: "uint256";
|
|
767
|
-
}];
|
|
768
|
-
}, {
|
|
769
|
-
readonly type: "function";
|
|
770
|
-
readonly name: "approve";
|
|
771
|
-
readonly stateMutability: "payable";
|
|
772
|
-
readonly inputs: readonly [{
|
|
773
|
-
readonly name: "spender";
|
|
774
|
-
readonly type: "address";
|
|
775
|
-
}, {
|
|
776
|
-
readonly name: "tokenId";
|
|
777
|
-
readonly type: "uint256";
|
|
778
|
-
}];
|
|
779
|
-
readonly outputs: readonly [];
|
|
780
|
-
}, {
|
|
781
|
-
readonly type: "function";
|
|
782
|
-
readonly name: "balanceOf";
|
|
783
|
-
readonly stateMutability: "view";
|
|
784
|
-
readonly inputs: readonly [{
|
|
785
|
-
readonly name: "account";
|
|
786
|
-
readonly type: "address";
|
|
787
|
-
}];
|
|
788
|
-
readonly outputs: readonly [{
|
|
789
|
-
readonly name: "";
|
|
790
|
-
readonly type: "uint256";
|
|
791
|
-
}];
|
|
792
|
-
}, {
|
|
793
|
-
readonly type: "function";
|
|
794
|
-
readonly name: "getApproved";
|
|
795
|
-
readonly stateMutability: "view";
|
|
796
|
-
readonly inputs: readonly [{
|
|
797
|
-
readonly name: "tokenId";
|
|
798
|
-
readonly type: "uint256";
|
|
799
|
-
}];
|
|
800
|
-
readonly outputs: readonly [{
|
|
801
|
-
readonly name: "";
|
|
802
|
-
readonly type: "address";
|
|
803
|
-
}];
|
|
804
|
-
}, {
|
|
805
|
-
readonly type: "function";
|
|
806
|
-
readonly name: "isApprovedForAll";
|
|
807
|
-
readonly stateMutability: "view";
|
|
808
|
-
readonly inputs: readonly [{
|
|
809
|
-
readonly name: "owner";
|
|
810
|
-
readonly type: "address";
|
|
811
|
-
}, {
|
|
812
|
-
readonly name: "operator";
|
|
813
|
-
readonly type: "address";
|
|
814
|
-
}];
|
|
815
|
-
readonly outputs: readonly [{
|
|
816
|
-
readonly name: "";
|
|
817
|
-
readonly type: "bool";
|
|
818
|
-
}];
|
|
819
|
-
}, {
|
|
820
|
-
readonly type: "function";
|
|
821
|
-
readonly name: "name";
|
|
822
|
-
readonly stateMutability: "view";
|
|
823
|
-
readonly inputs: readonly [];
|
|
824
|
-
readonly outputs: readonly [{
|
|
825
|
-
readonly name: "";
|
|
826
|
-
readonly type: "string";
|
|
827
|
-
}];
|
|
828
|
-
}, {
|
|
829
|
-
readonly type: "function";
|
|
830
|
-
readonly name: "ownerOf";
|
|
831
|
-
readonly stateMutability: "view";
|
|
832
|
-
readonly inputs: readonly [{
|
|
833
|
-
readonly name: "tokenId";
|
|
834
|
-
readonly type: "uint256";
|
|
835
|
-
}];
|
|
836
|
-
readonly outputs: readonly [{
|
|
837
|
-
readonly name: "owner";
|
|
838
|
-
readonly type: "address";
|
|
839
|
-
}];
|
|
840
|
-
}, {
|
|
841
|
-
readonly type: "function";
|
|
842
|
-
readonly name: "safeTransferFrom";
|
|
843
|
-
readonly stateMutability: "payable";
|
|
844
|
-
readonly inputs: readonly [{
|
|
845
|
-
readonly name: "from";
|
|
846
|
-
readonly type: "address";
|
|
847
|
-
}, {
|
|
848
|
-
readonly name: "to";
|
|
849
|
-
readonly type: "address";
|
|
850
|
-
}, {
|
|
851
|
-
readonly name: "tokenId";
|
|
852
|
-
readonly type: "uint256";
|
|
853
|
-
}];
|
|
854
|
-
readonly outputs: readonly [];
|
|
855
|
-
}, {
|
|
856
|
-
readonly type: "function";
|
|
857
|
-
readonly name: "safeTransferFrom";
|
|
858
|
-
readonly stateMutability: "nonpayable";
|
|
859
|
-
readonly inputs: readonly [{
|
|
860
|
-
readonly name: "from";
|
|
861
|
-
readonly type: "address";
|
|
862
|
-
}, {
|
|
863
|
-
readonly name: "to";
|
|
864
|
-
readonly type: "address";
|
|
865
|
-
}, {
|
|
866
|
-
readonly name: "id";
|
|
867
|
-
readonly type: "uint256";
|
|
868
|
-
}, {
|
|
869
|
-
readonly name: "data";
|
|
870
|
-
readonly type: "bytes";
|
|
871
|
-
}];
|
|
872
|
-
readonly outputs: readonly [];
|
|
873
|
-
}, {
|
|
874
|
-
readonly type: "function";
|
|
875
|
-
readonly name: "setApprovalForAll";
|
|
876
|
-
readonly stateMutability: "nonpayable";
|
|
877
|
-
readonly inputs: readonly [{
|
|
878
|
-
readonly name: "operator";
|
|
879
|
-
readonly type: "address";
|
|
880
|
-
}, {
|
|
881
|
-
readonly name: "approved";
|
|
882
|
-
readonly type: "bool";
|
|
883
|
-
}];
|
|
884
|
-
readonly outputs: readonly [];
|
|
885
|
-
}, {
|
|
886
|
-
readonly type: "function";
|
|
887
|
-
readonly name: "symbol";
|
|
888
|
-
readonly stateMutability: "view";
|
|
889
|
-
readonly inputs: readonly [];
|
|
890
|
-
readonly outputs: readonly [{
|
|
891
|
-
readonly name: "";
|
|
892
|
-
readonly type: "string";
|
|
893
|
-
}];
|
|
894
|
-
}, {
|
|
895
|
-
readonly type: "function";
|
|
896
|
-
readonly name: "tokenByIndex";
|
|
897
|
-
readonly stateMutability: "view";
|
|
898
|
-
readonly inputs: readonly [{
|
|
899
|
-
readonly name: "index";
|
|
900
|
-
readonly type: "uint256";
|
|
901
|
-
}];
|
|
902
|
-
readonly outputs: readonly [{
|
|
903
|
-
readonly name: "";
|
|
904
|
-
readonly type: "uint256";
|
|
905
|
-
}];
|
|
906
|
-
}, {
|
|
907
|
-
readonly type: "function";
|
|
908
|
-
readonly name: "tokenByIndex";
|
|
909
|
-
readonly stateMutability: "view";
|
|
910
|
-
readonly inputs: readonly [{
|
|
911
|
-
readonly name: "owner";
|
|
912
|
-
readonly type: "address";
|
|
913
|
-
}, {
|
|
914
|
-
readonly name: "index";
|
|
915
|
-
readonly type: "uint256";
|
|
916
|
-
}];
|
|
917
|
-
readonly outputs: readonly [{
|
|
918
|
-
readonly name: "tokenId";
|
|
919
|
-
readonly type: "uint256";
|
|
920
|
-
}];
|
|
921
|
-
}, {
|
|
922
|
-
readonly type: "function";
|
|
923
|
-
readonly name: "tokenURI";
|
|
924
|
-
readonly stateMutability: "view";
|
|
925
|
-
readonly inputs: readonly [{
|
|
926
|
-
readonly name: "tokenId";
|
|
927
|
-
readonly type: "uint256";
|
|
928
|
-
}];
|
|
929
|
-
readonly outputs: readonly [{
|
|
930
|
-
readonly name: "";
|
|
931
|
-
readonly type: "string";
|
|
932
|
-
}];
|
|
933
|
-
}, {
|
|
934
|
-
readonly type: "function";
|
|
935
|
-
readonly name: "totalSupply";
|
|
936
|
-
readonly stateMutability: "view";
|
|
937
|
-
readonly inputs: readonly [];
|
|
938
|
-
readonly outputs: readonly [{
|
|
939
|
-
readonly name: "";
|
|
940
|
-
readonly type: "uint256";
|
|
941
|
-
}];
|
|
942
|
-
}, {
|
|
943
|
-
readonly type: "function";
|
|
944
|
-
readonly name: "transferFrom";
|
|
945
|
-
readonly stateMutability: "payable";
|
|
946
|
-
readonly inputs: readonly [{
|
|
947
|
-
readonly name: "sender";
|
|
948
|
-
readonly type: "address";
|
|
949
|
-
}, {
|
|
950
|
-
readonly name: "recipient";
|
|
951
|
-
readonly type: "address";
|
|
952
|
-
}, {
|
|
953
|
-
readonly name: "tokeId";
|
|
954
|
-
readonly type: "uint256";
|
|
955
|
-
}];
|
|
956
|
-
readonly outputs: readonly [];
|
|
957
|
-
}];
|
|
958
|
-
/**
|
|
959
|
-
* [ERC-4626 Tokenized Vaults Standard](https://ethereum.org/en/developers/docs/standards/tokens/erc-4626)
|
|
960
|
-
*/
|
|
961
|
-
declare const erc4626ABI: readonly [{
|
|
962
|
-
readonly anonymous: false;
|
|
963
|
-
readonly inputs: readonly [{
|
|
964
|
-
readonly indexed: true;
|
|
965
|
-
readonly name: "owner";
|
|
966
|
-
readonly type: "address";
|
|
967
|
-
}, {
|
|
968
|
-
readonly indexed: true;
|
|
969
|
-
readonly name: "spender";
|
|
970
|
-
readonly type: "address";
|
|
971
|
-
}, {
|
|
972
|
-
readonly indexed: false;
|
|
973
|
-
readonly name: "value";
|
|
974
|
-
readonly type: "uint256";
|
|
975
|
-
}];
|
|
976
|
-
readonly name: "Approval";
|
|
977
|
-
readonly type: "event";
|
|
978
|
-
}, {
|
|
979
|
-
readonly anonymous: false;
|
|
980
|
-
readonly inputs: readonly [{
|
|
981
|
-
readonly indexed: true;
|
|
982
|
-
readonly name: "sender";
|
|
983
|
-
readonly type: "address";
|
|
984
|
-
}, {
|
|
985
|
-
readonly indexed: true;
|
|
986
|
-
readonly name: "receiver";
|
|
987
|
-
readonly type: "address";
|
|
988
|
-
}, {
|
|
989
|
-
readonly indexed: false;
|
|
990
|
-
readonly name: "assets";
|
|
991
|
-
readonly type: "uint256";
|
|
992
|
-
}, {
|
|
993
|
-
readonly indexed: false;
|
|
994
|
-
readonly name: "shares";
|
|
995
|
-
readonly type: "uint256";
|
|
996
|
-
}];
|
|
997
|
-
readonly name: "Deposit";
|
|
998
|
-
readonly type: "event";
|
|
999
|
-
}, {
|
|
1000
|
-
readonly anonymous: false;
|
|
1001
|
-
readonly inputs: readonly [{
|
|
1002
|
-
readonly indexed: true;
|
|
1003
|
-
readonly name: "from";
|
|
1004
|
-
readonly type: "address";
|
|
1005
|
-
}, {
|
|
1006
|
-
readonly indexed: true;
|
|
1007
|
-
readonly name: "to";
|
|
1008
|
-
readonly type: "address";
|
|
1009
|
-
}, {
|
|
1010
|
-
readonly indexed: false;
|
|
1011
|
-
readonly name: "value";
|
|
1012
|
-
readonly type: "uint256";
|
|
1013
|
-
}];
|
|
1014
|
-
readonly name: "Transfer";
|
|
1015
|
-
readonly type: "event";
|
|
1016
|
-
}, {
|
|
1017
|
-
readonly anonymous: false;
|
|
1018
|
-
readonly inputs: readonly [{
|
|
1019
|
-
readonly indexed: true;
|
|
1020
|
-
readonly name: "sender";
|
|
1021
|
-
readonly type: "address";
|
|
1022
|
-
}, {
|
|
1023
|
-
readonly indexed: true;
|
|
1024
|
-
readonly name: "receiver";
|
|
1025
|
-
readonly type: "address";
|
|
1026
|
-
}, {
|
|
1027
|
-
readonly indexed: true;
|
|
1028
|
-
readonly name: "owner";
|
|
1029
|
-
readonly type: "address";
|
|
1030
|
-
}, {
|
|
1031
|
-
readonly indexed: false;
|
|
1032
|
-
readonly name: "assets";
|
|
1033
|
-
readonly type: "uint256";
|
|
1034
|
-
}, {
|
|
1035
|
-
readonly indexed: false;
|
|
1036
|
-
readonly name: "shares";
|
|
1037
|
-
readonly type: "uint256";
|
|
1038
|
-
}];
|
|
1039
|
-
readonly name: "Withdraw";
|
|
1040
|
-
readonly type: "event";
|
|
1041
|
-
}, {
|
|
1042
|
-
readonly inputs: readonly [{
|
|
1043
|
-
readonly name: "owner";
|
|
1044
|
-
readonly type: "address";
|
|
1045
|
-
}, {
|
|
1046
|
-
readonly name: "spender";
|
|
1047
|
-
readonly type: "address";
|
|
1048
|
-
}];
|
|
1049
|
-
readonly name: "allowance";
|
|
1050
|
-
readonly outputs: readonly [{
|
|
1051
|
-
readonly name: "";
|
|
1052
|
-
readonly type: "uint256";
|
|
1053
|
-
}];
|
|
1054
|
-
readonly stateMutability: "view";
|
|
1055
|
-
readonly type: "function";
|
|
1056
|
-
}, {
|
|
1057
|
-
readonly inputs: readonly [{
|
|
1058
|
-
readonly name: "spender";
|
|
1059
|
-
readonly type: "address";
|
|
1060
|
-
}, {
|
|
1061
|
-
readonly name: "amount";
|
|
1062
|
-
readonly type: "uint256";
|
|
1063
|
-
}];
|
|
1064
|
-
readonly name: "approve";
|
|
1065
|
-
readonly outputs: readonly [{
|
|
1066
|
-
readonly name: "";
|
|
1067
|
-
readonly type: "bool";
|
|
1068
|
-
}];
|
|
1069
|
-
readonly stateMutability: "nonpayable";
|
|
1070
|
-
readonly type: "function";
|
|
1071
|
-
}, {
|
|
1072
|
-
readonly inputs: readonly [];
|
|
1073
|
-
readonly name: "asset";
|
|
1074
|
-
readonly outputs: readonly [{
|
|
1075
|
-
readonly name: "assetTokenAddress";
|
|
1076
|
-
readonly type: "address";
|
|
1077
|
-
}];
|
|
1078
|
-
readonly stateMutability: "view";
|
|
1079
|
-
readonly type: "function";
|
|
1080
|
-
}, {
|
|
1081
|
-
readonly inputs: readonly [{
|
|
1082
|
-
readonly name: "account";
|
|
1083
|
-
readonly type: "address";
|
|
1084
|
-
}];
|
|
1085
|
-
readonly name: "balanceOf";
|
|
1086
|
-
readonly outputs: readonly [{
|
|
1087
|
-
readonly name: "";
|
|
1088
|
-
readonly type: "uint256";
|
|
1089
|
-
}];
|
|
1090
|
-
readonly stateMutability: "view";
|
|
1091
|
-
readonly type: "function";
|
|
1092
|
-
}, {
|
|
1093
|
-
readonly inputs: readonly [{
|
|
1094
|
-
readonly name: "shares";
|
|
1095
|
-
readonly type: "uint256";
|
|
1096
|
-
}];
|
|
1097
|
-
readonly name: "convertToAssets";
|
|
1098
|
-
readonly outputs: readonly [{
|
|
1099
|
-
readonly name: "assets";
|
|
1100
|
-
readonly type: "uint256";
|
|
1101
|
-
}];
|
|
1102
|
-
readonly stateMutability: "view";
|
|
1103
|
-
readonly type: "function";
|
|
1104
|
-
}, {
|
|
1105
|
-
readonly inputs: readonly [{
|
|
1106
|
-
readonly name: "assets";
|
|
1107
|
-
readonly type: "uint256";
|
|
1108
|
-
}];
|
|
1109
|
-
readonly name: "convertToShares";
|
|
1110
|
-
readonly outputs: readonly [{
|
|
1111
|
-
readonly name: "shares";
|
|
1112
|
-
readonly type: "uint256";
|
|
1113
|
-
}];
|
|
1114
|
-
readonly stateMutability: "view";
|
|
1115
|
-
readonly type: "function";
|
|
1116
|
-
}, {
|
|
1117
|
-
readonly inputs: readonly [{
|
|
1118
|
-
readonly name: "assets";
|
|
1119
|
-
readonly type: "uint256";
|
|
1120
|
-
}, {
|
|
1121
|
-
readonly name: "receiver";
|
|
1122
|
-
readonly type: "address";
|
|
1123
|
-
}];
|
|
1124
|
-
readonly name: "deposit";
|
|
1125
|
-
readonly outputs: readonly [{
|
|
1126
|
-
readonly name: "shares";
|
|
1127
|
-
readonly type: "uint256";
|
|
1128
|
-
}];
|
|
1129
|
-
readonly stateMutability: "nonpayable";
|
|
1130
|
-
readonly type: "function";
|
|
1131
|
-
}, {
|
|
1132
|
-
readonly inputs: readonly [{
|
|
1133
|
-
readonly name: "caller";
|
|
1134
|
-
readonly type: "address";
|
|
1135
|
-
}];
|
|
1136
|
-
readonly name: "maxDeposit";
|
|
1137
|
-
readonly outputs: readonly [{
|
|
1138
|
-
readonly name: "maxAssets";
|
|
1139
|
-
readonly type: "uint256";
|
|
1140
|
-
}];
|
|
1141
|
-
readonly stateMutability: "view";
|
|
1142
|
-
readonly type: "function";
|
|
1143
|
-
}, {
|
|
1144
|
-
readonly inputs: readonly [{
|
|
1145
|
-
readonly name: "caller";
|
|
1146
|
-
readonly type: "address";
|
|
1147
|
-
}];
|
|
1148
|
-
readonly name: "maxMint";
|
|
1149
|
-
readonly outputs: readonly [{
|
|
1150
|
-
readonly name: "maxShares";
|
|
1151
|
-
readonly type: "uint256";
|
|
1152
|
-
}];
|
|
1153
|
-
readonly stateMutability: "view";
|
|
1154
|
-
readonly type: "function";
|
|
1155
|
-
}, {
|
|
1156
|
-
readonly inputs: readonly [{
|
|
1157
|
-
readonly name: "owner";
|
|
1158
|
-
readonly type: "address";
|
|
1159
|
-
}];
|
|
1160
|
-
readonly name: "maxRedeem";
|
|
1161
|
-
readonly outputs: readonly [{
|
|
1162
|
-
readonly name: "maxShares";
|
|
1163
|
-
readonly type: "uint256";
|
|
1164
|
-
}];
|
|
1165
|
-
readonly stateMutability: "view";
|
|
1166
|
-
readonly type: "function";
|
|
1167
|
-
}, {
|
|
1168
|
-
readonly inputs: readonly [{
|
|
1169
|
-
readonly name: "owner";
|
|
1170
|
-
readonly type: "address";
|
|
1171
|
-
}];
|
|
1172
|
-
readonly name: "maxWithdraw";
|
|
1173
|
-
readonly outputs: readonly [{
|
|
1174
|
-
readonly name: "maxAssets";
|
|
1175
|
-
readonly type: "uint256";
|
|
1176
|
-
}];
|
|
1177
|
-
readonly stateMutability: "view";
|
|
1178
|
-
readonly type: "function";
|
|
1179
|
-
}, {
|
|
1180
|
-
readonly inputs: readonly [{
|
|
1181
|
-
readonly name: "shares";
|
|
1182
|
-
readonly type: "uint256";
|
|
1183
|
-
}, {
|
|
1184
|
-
readonly name: "receiver";
|
|
1185
|
-
readonly type: "address";
|
|
1186
|
-
}];
|
|
1187
|
-
readonly name: "mint";
|
|
1188
|
-
readonly outputs: readonly [{
|
|
1189
|
-
readonly name: "assets";
|
|
1190
|
-
readonly type: "uint256";
|
|
1191
|
-
}];
|
|
1192
|
-
readonly stateMutability: "nonpayable";
|
|
1193
|
-
readonly type: "function";
|
|
1194
|
-
}, {
|
|
1195
|
-
readonly inputs: readonly [{
|
|
1196
|
-
readonly name: "assets";
|
|
1197
|
-
readonly type: "uint256";
|
|
1198
|
-
}];
|
|
1199
|
-
readonly name: "previewDeposit";
|
|
1200
|
-
readonly outputs: readonly [{
|
|
1201
|
-
readonly name: "shares";
|
|
1202
|
-
readonly type: "uint256";
|
|
1203
|
-
}];
|
|
1204
|
-
readonly stateMutability: "view";
|
|
1205
|
-
readonly type: "function";
|
|
1206
|
-
}, {
|
|
1207
|
-
readonly inputs: readonly [{
|
|
1208
|
-
readonly name: "shares";
|
|
1209
|
-
readonly type: "uint256";
|
|
1210
|
-
}];
|
|
1211
|
-
readonly name: "previewMint";
|
|
1212
|
-
readonly outputs: readonly [{
|
|
1213
|
-
readonly name: "assets";
|
|
1214
|
-
readonly type: "uint256";
|
|
1215
|
-
}];
|
|
1216
|
-
readonly stateMutability: "view";
|
|
1217
|
-
readonly type: "function";
|
|
1218
|
-
}, {
|
|
1219
|
-
readonly inputs: readonly [{
|
|
1220
|
-
readonly name: "shares";
|
|
1221
|
-
readonly type: "uint256";
|
|
1222
|
-
}];
|
|
1223
|
-
readonly name: "previewRedeem";
|
|
1224
|
-
readonly outputs: readonly [{
|
|
1225
|
-
readonly name: "assets";
|
|
1226
|
-
readonly type: "uint256";
|
|
1227
|
-
}];
|
|
1228
|
-
readonly stateMutability: "view";
|
|
1229
|
-
readonly type: "function";
|
|
1230
|
-
}, {
|
|
1231
|
-
readonly inputs: readonly [{
|
|
1232
|
-
readonly name: "assets";
|
|
1233
|
-
readonly type: "uint256";
|
|
1234
|
-
}];
|
|
1235
|
-
readonly name: "previewWithdraw";
|
|
1236
|
-
readonly outputs: readonly [{
|
|
1237
|
-
readonly name: "shares";
|
|
1238
|
-
readonly type: "uint256";
|
|
1239
|
-
}];
|
|
1240
|
-
readonly stateMutability: "view";
|
|
1241
|
-
readonly type: "function";
|
|
1242
|
-
}, {
|
|
1243
|
-
readonly inputs: readonly [{
|
|
1244
|
-
readonly name: "shares";
|
|
1245
|
-
readonly type: "uint256";
|
|
1246
|
-
}, {
|
|
1247
|
-
readonly name: "receiver";
|
|
1248
|
-
readonly type: "address";
|
|
1249
|
-
}, {
|
|
1250
|
-
readonly name: "owner";
|
|
1251
|
-
readonly type: "address";
|
|
1252
|
-
}];
|
|
1253
|
-
readonly name: "redeem";
|
|
1254
|
-
readonly outputs: readonly [{
|
|
1255
|
-
readonly name: "assets";
|
|
1256
|
-
readonly type: "uint256";
|
|
1257
|
-
}];
|
|
1258
|
-
readonly stateMutability: "nonpayable";
|
|
1259
|
-
readonly type: "function";
|
|
1260
|
-
}, {
|
|
1261
|
-
readonly inputs: readonly [];
|
|
1262
|
-
readonly name: "totalAssets";
|
|
1263
|
-
readonly outputs: readonly [{
|
|
1264
|
-
readonly name: "totalManagedAssets";
|
|
1265
|
-
readonly type: "uint256";
|
|
1266
|
-
}];
|
|
1267
|
-
readonly stateMutability: "view";
|
|
1268
|
-
readonly type: "function";
|
|
1269
|
-
}, {
|
|
1270
|
-
readonly inputs: readonly [];
|
|
1271
|
-
readonly name: "totalSupply";
|
|
1272
|
-
readonly outputs: readonly [{
|
|
1273
|
-
readonly name: "";
|
|
1274
|
-
readonly type: "uint256";
|
|
1275
|
-
}];
|
|
1276
|
-
readonly stateMutability: "view";
|
|
1277
|
-
readonly type: "function";
|
|
1278
|
-
}, {
|
|
1279
|
-
readonly inputs: readonly [{
|
|
1280
|
-
readonly name: "to";
|
|
1281
|
-
readonly type: "address";
|
|
1282
|
-
}, {
|
|
1283
|
-
readonly name: "amount";
|
|
1284
|
-
readonly type: "uint256";
|
|
1285
|
-
}];
|
|
1286
|
-
readonly name: "transfer";
|
|
1287
|
-
readonly outputs: readonly [{
|
|
1288
|
-
readonly name: "";
|
|
1289
|
-
readonly type: "bool";
|
|
1290
|
-
}];
|
|
1291
|
-
readonly stateMutability: "nonpayable";
|
|
1292
|
-
readonly type: "function";
|
|
1293
|
-
}, {
|
|
1294
|
-
readonly inputs: readonly [{
|
|
1295
|
-
readonly name: "from";
|
|
1296
|
-
readonly type: "address";
|
|
1297
|
-
}, {
|
|
1298
|
-
readonly name: "to";
|
|
1299
|
-
readonly type: "address";
|
|
1300
|
-
}, {
|
|
1301
|
-
readonly name: "amount";
|
|
1302
|
-
readonly type: "uint256";
|
|
1303
|
-
}];
|
|
1304
|
-
readonly name: "transferFrom";
|
|
1305
|
-
readonly outputs: readonly [{
|
|
1306
|
-
readonly name: "";
|
|
1307
|
-
readonly type: "bool";
|
|
1308
|
-
}];
|
|
1309
|
-
readonly stateMutability: "nonpayable";
|
|
1310
|
-
readonly type: "function";
|
|
1311
|
-
}, {
|
|
1312
|
-
readonly inputs: readonly [{
|
|
1313
|
-
readonly name: "assets";
|
|
1314
|
-
readonly type: "uint256";
|
|
1315
|
-
}, {
|
|
1316
|
-
readonly name: "receiver";
|
|
1317
|
-
readonly type: "address";
|
|
1318
|
-
}, {
|
|
1319
|
-
readonly name: "owner";
|
|
1320
|
-
readonly type: "address";
|
|
1321
|
-
}];
|
|
1322
|
-
readonly name: "withdraw";
|
|
1323
|
-
readonly outputs: readonly [{
|
|
1324
|
-
readonly name: "shares";
|
|
1325
|
-
readonly type: "uint256";
|
|
1326
|
-
}];
|
|
1327
|
-
readonly stateMutability: "nonpayable";
|
|
1328
|
-
readonly type: "function";
|
|
1329
|
-
}];
|
|
1330
|
-
|
|
1331
|
-
declare class ChainMismatchError extends Error {
|
|
1332
|
-
name: string;
|
|
1333
|
-
constructor({ activeChain, targetChain, }: {
|
|
1334
|
-
activeChain: string;
|
|
1335
|
-
targetChain: string;
|
|
1336
|
-
});
|
|
1337
|
-
}
|
|
1338
|
-
declare class ChainNotConfiguredError extends Error {
|
|
1339
|
-
name: string;
|
|
1340
|
-
constructor({ chainId, connectorId, }: {
|
|
1341
|
-
chainId: number;
|
|
1342
|
-
connectorId?: string;
|
|
1343
|
-
});
|
|
1344
|
-
}
|
|
1345
|
-
declare class ConnectorAlreadyConnectedError extends Error {
|
|
1346
|
-
name: string;
|
|
1347
|
-
message: string;
|
|
1348
|
-
}
|
|
1349
|
-
declare class ConfigChainsNotFound extends Error {
|
|
1350
|
-
name: string;
|
|
1351
|
-
message: string;
|
|
1352
|
-
}
|
|
1353
|
-
declare class SwitchChainNotSupportedError extends Error {
|
|
1354
|
-
name: string;
|
|
1355
|
-
constructor({ connector }: {
|
|
1356
|
-
connector: Connector;
|
|
1357
|
-
});
|
|
1358
|
-
}
|
|
1359
|
-
|
|
1360
|
-
type ConfigureChainsConfig = Pick<FallbackTransportConfig, 'rank' | 'retryCount' | 'retryDelay'> & Pick<PublicClientConfig, 'batch' | 'pollingInterval'> & {
|
|
1361
|
-
stallTimeout?: number;
|
|
1362
|
-
};
|
|
1363
|
-
declare function configureChains<TChain extends Chain = Chain>(defaultChains: TChain[], providers: ChainProviderFn<TChain>[], { batch, pollingInterval, rank, retryCount, retryDelay, stallTimeout, }?: ConfigureChainsConfig): {
|
|
1364
|
-
readonly chains: TChain[];
|
|
1365
|
-
readonly publicClient: ({ chainId }: {
|
|
1366
|
-
chainId?: number | undefined;
|
|
1367
|
-
}) => PublicClient<FallbackTransport>;
|
|
1368
|
-
readonly webSocketPublicClient: ({ chainId }: {
|
|
1369
|
-
chainId?: number | undefined;
|
|
1370
|
-
}) => WebSocketPublicClient<FallbackTransport> | undefined;
|
|
1371
|
-
};
|
|
1372
|
-
|
|
1373
|
-
/** Forked from https://github.com/epoberezkin/fast-deep-equal */
|
|
1374
|
-
declare function deepEqual(a: any, b: any): boolean;
|
|
1375
|
-
|
|
1376
|
-
declare function deserialize(cachedString: string): any;
|
|
1377
|
-
|
|
1378
|
-
declare function getUnit(unit: Unit): number;
|
|
1379
|
-
|
|
1380
|
-
type StandardReplacer = (key: string, value: any) => any;
|
|
1381
|
-
type CircularReplacer = (key: string, value: any, referenceKey: string) => any;
|
|
1382
|
-
/**
|
|
1383
|
-
* @function stringify
|
|
1384
|
-
*
|
|
1385
|
-
* @description
|
|
1386
|
-
* stringifier that handles circular values
|
|
1387
|
-
* Forked from https://github.com/planttheidea/fast-stringify
|
|
1388
|
-
*
|
|
1389
|
-
* @param value to stringify
|
|
1390
|
-
* @param [replacer] a custom replacer function for handling standard values
|
|
1391
|
-
* @param [indent] the number of spaces to indent the output by
|
|
1392
|
-
* @param [circularReplacer] a custom replacer function for handling circular values
|
|
1393
|
-
* @returns the stringified output
|
|
1394
|
-
*/
|
|
1395
|
-
declare function serialize(value: any, replacer?: StandardReplacer | null | undefined, indent?: number | null | undefined, circularReplacer?: CircularReplacer | null | undefined): string;
|
|
1396
|
-
|
|
1397
|
-
export { ChainMismatchError, ChainNotConfiguredError, ChainProviderFn, Config, ConfigChainsNotFound, ConfigureChainsConfig, ConnectArgs, ConnectResult, ConnectorAlreadyConnectedError, CreateConfigParameters, FetchBalanceArgs, FetchBalanceResult, FetchBlockNumberArgs, FetchBlockNumberResult, FetchEnsAddressArgs, FetchEnsAddressResult, FetchEnsAvatarArgs, FetchEnsAvatarResult, FetchEnsNameArgs, FetchEnsNameResult, FetchEnsResolverArgs, FetchEnsResolverResult, FetchFeeDataArgs, FetchFeeDataResult, FetchTokenArgs, FetchTokenResult, FetchTransactionArgs, FetchTransactionResult, GetAccountResult, GetContractArgs, GetContractResult, GetNetworkResult, GetPublicClientArgs, GetPublicClientResult, GetWalletClientArgs, GetWalletClientResult, GetWebSocketPublicClientArgs, GetWebSocketPublicClientResult, Hash, MulticallConfig, MulticallResult, PrepareSendTransactionArgs, PrepareSendTransactionResult, PrepareWriteContractConfig, PrepareWriteContractResult, PublicClient, ReadContractConfig, ReadContractResult, ReadContractsConfig, ReadContractsResult, SendTransactionArgs, SendTransactionResult, SignMessageArgs, SignMessageResult, SignTypedDataArgs, SignTypedDataResult, ClientStorage as Storage, SwitchChainNotSupportedError, SwitchNetworkArgs, SwitchNetworkResult, Unit, WaitForTransactionArgs, WaitForTransactionResult, WalletClient, WatchAccountCallback, WatchBlockNumberArgs, WatchBlockNumberCallback, WatchContractEventCallback, WatchContractEventConfig, WatchMulticallCallback, WatchMulticallConfig, WatchNetworkCallback, WatchPendingTransactionsArgs, WatchPendingTransactionsCallback, WatchPendingTransactionsResult, WatchPublicClientCallback, WatchReadContractCallback, WatchReadContractConfig, WatchReadContractsCallback, WatchReadContractsConfig, WatchWalletClientArgs, WatchWalletClientCallback, WatchWebSocketPublicClientCallback, WebSocketPublicClient, WriteContractArgs, WriteContractMode, WriteContractPreparedArgs, WriteContractResult, WriteContractUnpreparedArgs, configureChains, connect, createConfig, createStorage, deepEqual, deserialize, disconnect, erc20ABI, erc4626ABI, erc721ABI, fetchBalance, fetchBlockNumber, fetchEnsAddress, fetchEnsAvatar, fetchEnsName, fetchEnsResolver, fetchFeeData, fetchToken, fetchTransaction, getAccount, getConfig, getContract, getNetwork, getPublicClient, getUnit, getWalletClient, getWebSocketPublicClient, multicall, noopStorage, prepareSendTransaction, prepareWriteContract, readContract, readContracts, sendTransaction, serialize, signMessage, signTypedData, switchNetwork, waitForTransaction, watchAccount, watchBlockNumber, watchContractEvent, watchMulticall, watchNetwork, watchPendingTransactions, watchPublicClient, watchReadContract, watchReadContracts, watchWalletClient, watchWebSocketPublicClient, writeContract };
|