@wagmi/core 2.0.0 → 2.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/README.md +13 -0
- package/actions/package.json +5 -0
- package/chains/package.json +5 -0
- package/dist/esm/actions/codegen/createReadContract.js +31 -0
- package/dist/esm/actions/codegen/createReadContract.js.map +1 -0
- package/dist/esm/actions/codegen/createSimulateContract.js +33 -0
- package/dist/esm/actions/codegen/createSimulateContract.js.map +1 -0
- package/dist/esm/actions/codegen/createWatchContractEvent.js +31 -0
- package/dist/esm/actions/codegen/createWatchContractEvent.js.map +1 -0
- package/dist/esm/actions/codegen/createWriteContract.js +43 -0
- package/dist/esm/actions/codegen/createWriteContract.js.map +1 -0
- package/dist/esm/actions/connect.js +15 -19
- package/dist/esm/actions/connect.js.map +1 -1
- package/dist/esm/actions/disconnect.js +10 -12
- package/dist/esm/actions/disconnect.js.map +1 -1
- package/dist/esm/actions/estimateFeesPerGas.js +3 -0
- package/dist/esm/actions/estimateFeesPerGas.js.map +1 -1
- package/dist/esm/actions/estimateGas.js +2 -2
- package/dist/esm/actions/estimateGas.js.map +1 -1
- package/dist/esm/actions/estimateMaxPriorityFeePerGas.js +12 -0
- package/dist/esm/actions/estimateMaxPriorityFeePerGas.js.map +1 -0
- package/dist/esm/actions/getAccount.js +6 -1
- package/dist/esm/actions/getAccount.js.map +1 -1
- package/dist/esm/actions/getBalance.js +14 -5
- package/dist/esm/actions/getBalance.js.map +1 -1
- package/dist/esm/actions/getBlock.js +15 -0
- package/dist/esm/actions/getBlock.js.map +1 -0
- package/dist/esm/actions/getBlockNumber.js +3 -1
- package/dist/esm/actions/getBlockNumber.js.map +1 -1
- package/dist/esm/actions/getBlockTransactionCount.js +11 -0
- package/dist/esm/actions/getBlockTransactionCount.js.map +1 -0
- package/dist/esm/actions/getChainId.js +2 -1
- package/dist/esm/actions/getChainId.js.map +1 -1
- package/dist/esm/actions/getClient.js +3 -0
- package/dist/esm/actions/getClient.js.map +1 -1
- package/dist/esm/actions/getConnections.js +2 -1
- package/dist/esm/actions/getConnections.js.map +1 -1
- package/dist/esm/actions/getConnectorClient.js +7 -3
- package/dist/esm/actions/getConnectorClient.js.map +1 -1
- package/dist/esm/actions/getConnectors.js +11 -0
- package/dist/esm/actions/getConnectors.js.map +1 -0
- package/dist/esm/actions/getEnsAddress.js +3 -1
- package/dist/esm/actions/getEnsAddress.js.map +1 -1
- package/dist/esm/actions/getEnsAvatar.js +3 -1
- package/dist/esm/actions/getEnsAvatar.js.map +1 -1
- package/dist/esm/actions/getEnsName.js +3 -1
- package/dist/esm/actions/getEnsName.js.map +1 -1
- package/dist/esm/actions/getEnsResolver.js +3 -1
- package/dist/esm/actions/getEnsResolver.js.map +1 -1
- package/dist/esm/actions/getFeeHistory.js +11 -0
- package/dist/esm/actions/getFeeHistory.js.map +1 -0
- package/dist/esm/actions/getGasPrice.js +11 -0
- package/dist/esm/actions/getGasPrice.js.map +1 -0
- package/dist/esm/actions/getPublicClient.js +3 -0
- package/dist/esm/actions/getPublicClient.js.map +1 -1
- package/dist/esm/actions/getToken.js +5 -0
- package/dist/esm/actions/getToken.js.map +1 -1
- package/dist/esm/actions/getTransaction.js +2 -1
- package/dist/esm/actions/getTransaction.js.map +1 -1
- package/dist/esm/actions/getTransactionCount.js +11 -0
- package/dist/esm/actions/getTransactionCount.js.map +1 -0
- package/dist/esm/actions/getWalletClient.js +4 -0
- package/dist/esm/actions/getWalletClient.js.map +1 -1
- package/dist/esm/actions/multicall.js +2 -0
- package/dist/esm/actions/multicall.js.map +1 -1
- package/dist/esm/actions/readContract.js +2 -1
- package/dist/esm/actions/readContract.js.map +1 -1
- package/dist/esm/actions/readContracts.js.map +1 -1
- package/dist/esm/actions/reconnect.js +13 -7
- package/dist/esm/actions/reconnect.js.map +1 -1
- package/dist/esm/actions/sendTransaction.js +5 -8
- package/dist/esm/actions/sendTransaction.js.map +1 -1
- package/dist/esm/actions/signMessage.js +4 -2
- package/dist/esm/actions/signMessage.js.map +1 -1
- package/dist/esm/actions/signTypedData.js +2 -2
- package/dist/esm/actions/signTypedData.js.map +1 -1
- package/dist/esm/actions/simulateContract.js +6 -7
- package/dist/esm/actions/simulateContract.js.map +1 -1
- package/dist/esm/actions/switchAccount.js +3 -2
- package/dist/esm/actions/switchAccount.js.map +1 -1
- package/dist/esm/actions/switchChain.js +5 -5
- package/dist/esm/actions/switchChain.js.map +1 -1
- package/dist/esm/actions/verifyMessage.js +11 -0
- package/dist/esm/actions/verifyMessage.js.map +1 -0
- package/dist/esm/actions/verifyTypedData.js +12 -0
- package/dist/esm/actions/verifyTypedData.js.map +1 -0
- package/dist/esm/actions/waitForTransactionReceipt.js +7 -1
- package/dist/esm/actions/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/actions/watchAccount.js +1 -1
- package/dist/esm/actions/watchAccount.js.map +1 -1
- package/dist/esm/actions/watchBlockNumber.js +2 -4
- package/dist/esm/actions/watchBlockNumber.js.map +1 -1
- package/dist/esm/actions/watchBlocks.js +26 -0
- package/dist/esm/actions/watchBlocks.js.map +1 -0
- package/dist/esm/actions/watchChainId.js +2 -1
- package/dist/esm/actions/watchChainId.js.map +1 -1
- package/dist/esm/actions/watchClient.js +2 -1
- package/dist/esm/actions/watchClient.js.map +1 -1
- package/dist/esm/actions/watchConnections.js +2 -1
- package/dist/esm/actions/watchConnections.js.map +1 -1
- package/dist/esm/actions/watchConnectors.js +10 -0
- package/dist/esm/actions/watchConnectors.js.map +1 -0
- package/dist/esm/actions/watchContractEvent.js +6 -4
- package/dist/esm/actions/watchContractEvent.js.map +1 -1
- package/dist/esm/actions/watchPendingTransactions.js +3 -4
- package/dist/esm/actions/watchPendingTransactions.js.map +1 -1
- package/dist/esm/actions/watchPublicClient.js +2 -1
- package/dist/esm/actions/watchPublicClient.js.map +1 -1
- package/dist/esm/actions/writeContract.js +9 -11
- package/dist/esm/actions/writeContract.js.map +1 -1
- package/dist/esm/connectors/createConnector.js +8 -0
- package/dist/esm/connectors/createConnector.js.map +1 -0
- package/dist/esm/connectors/injected.js +400 -0
- package/dist/esm/connectors/injected.js.map +1 -0
- package/dist/esm/connectors/mock.js +131 -0
- package/dist/esm/connectors/mock.js.map +1 -0
- package/dist/esm/createConfig.js +65 -23
- package/dist/esm/createConfig.js.map +1 -1
- package/dist/esm/createStorage.js +4 -2
- package/dist/esm/createStorage.js.map +1 -1
- package/dist/esm/errors/base.js +1 -1
- package/dist/esm/errors/base.js.map +1 -1
- package/dist/esm/errors/config.js +3 -15
- package/dist/esm/errors/config.js.map +1 -1
- package/dist/esm/errors/connector.js.map +1 -1
- package/dist/esm/exports/actions.js +43 -11
- package/dist/esm/exports/actions.js.map +1 -1
- package/dist/esm/exports/chains.js +1 -0
- package/dist/esm/exports/chains.js.map +1 -1
- package/dist/esm/exports/codegen.js +5 -0
- package/dist/esm/exports/codegen.js.map +1 -0
- package/dist/esm/exports/index.js +67 -18
- package/dist/esm/exports/index.js.map +1 -1
- package/dist/esm/exports/internal.js +5 -0
- package/dist/esm/exports/internal.js.map +1 -1
- package/dist/esm/exports/query.js +10 -0
- package/dist/esm/exports/query.js.map +1 -1
- package/dist/esm/hydrate.js +34 -0
- package/dist/esm/hydrate.js.map +1 -0
- package/dist/esm/query/disconnect.js +1 -0
- package/dist/esm/query/disconnect.js.map +1 -1
- package/dist/esm/query/estimateFeesPerGas.js +1 -0
- package/dist/esm/query/estimateFeesPerGas.js.map +1 -1
- package/dist/esm/query/estimateGas.js +1 -0
- package/dist/esm/query/estimateGas.js.map +1 -1
- package/dist/esm/query/estimateMaxPriorityFeePerGas.js +19 -0
- package/dist/esm/query/estimateMaxPriorityFeePerGas.js.map +1 -0
- package/dist/esm/query/getBalance.js +6 -4
- package/dist/esm/query/getBalance.js.map +1 -1
- package/dist/esm/query/getBlock.js +18 -0
- package/dist/esm/query/getBlock.js.map +1 -0
- package/dist/esm/query/getBlockNumber.js +1 -0
- package/dist/esm/query/getBlockNumber.js.map +1 -1
- package/dist/esm/query/getBlockTransactionCount.js +20 -0
- package/dist/esm/query/getBlockTransactionCount.js.map +1 -0
- package/dist/esm/query/getConnectorClient.js +2 -0
- package/dist/esm/query/getConnectorClient.js.map +1 -1
- package/dist/esm/query/getEnsAddress.js +1 -0
- package/dist/esm/query/getEnsAddress.js.map +1 -1
- package/dist/esm/query/getEnsAvatar.js +1 -0
- package/dist/esm/query/getEnsAvatar.js.map +1 -1
- package/dist/esm/query/getEnsName.js +1 -0
- package/dist/esm/query/getEnsName.js.map +1 -1
- package/dist/esm/query/getEnsResolver.js +1 -0
- package/dist/esm/query/getEnsResolver.js.map +1 -1
- package/dist/esm/query/getFeeHistory.js +27 -0
- package/dist/esm/query/getFeeHistory.js.map +1 -0
- package/dist/esm/query/getGasPrice.js +20 -0
- package/dist/esm/query/getGasPrice.js.map +1 -0
- package/dist/esm/query/getToken.js +1 -0
- package/dist/esm/query/getToken.js.map +1 -1
- package/dist/esm/query/getTransaction.js +4 -2
- package/dist/esm/query/getTransaction.js.map +1 -1
- package/dist/esm/query/getTransactionCount.js +23 -0
- package/dist/esm/query/getTransactionCount.js.map +1 -0
- package/dist/esm/query/getWalletClient.js +2 -0
- package/dist/esm/query/getWalletClient.js.map +1 -1
- package/dist/esm/query/infiniteReadContracts.js +25 -0
- package/dist/esm/query/infiniteReadContracts.js.map +1 -0
- package/dist/esm/query/readContract.js +7 -2
- package/dist/esm/query/readContract.js.map +1 -1
- package/dist/esm/query/readContracts.js +5 -3
- package/dist/esm/query/readContracts.js.map +1 -1
- package/dist/esm/query/reconnect.js +2 -0
- package/dist/esm/query/reconnect.js.map +1 -1
- package/dist/esm/query/sendTransaction.js +1 -0
- package/dist/esm/query/sendTransaction.js.map +1 -1
- package/dist/esm/query/signTypedData.js +1 -0
- package/dist/esm/query/signTypedData.js.map +1 -1
- package/dist/esm/query/simulateContract.js +6 -1
- package/dist/esm/query/simulateContract.js.map +1 -1
- package/dist/esm/query/switchAccount.js +3 -0
- package/dist/esm/query/switchAccount.js.map +1 -1
- package/dist/esm/query/switchChain.js +2 -0
- package/dist/esm/query/switchChain.js.map +1 -1
- package/dist/esm/query/types.js +2 -1
- package/dist/esm/query/types.js.map +1 -1
- package/dist/esm/query/utils.js +13 -0
- package/dist/esm/query/utils.js.map +1 -1
- package/dist/esm/query/verifyMessage.js +21 -0
- package/dist/esm/query/verifyMessage.js.map +1 -0
- package/dist/esm/query/verifyTypedData.js +38 -0
- package/dist/esm/query/verifyTypedData.js.map +1 -0
- package/dist/esm/query/waitForTransactionReceipt.js +3 -0
- package/dist/esm/query/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/query/writeContract.js +3 -0
- package/dist/esm/query/writeContract.js.map +1 -1
- package/dist/esm/transports/connector.js +37 -0
- package/dist/esm/transports/connector.js.map +1 -0
- package/dist/esm/transports/fallback.js +6 -0
- package/dist/esm/transports/fallback.js.map +1 -0
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/types/chain.js +3 -1
- package/dist/esm/types/chain.js.map +1 -1
- package/dist/esm/types/properties.js +1 -1
- package/dist/esm/types/properties.js.map +1 -1
- package/dist/esm/types/register.js +1 -1
- package/dist/esm/types/register.js.map +1 -1
- package/dist/esm/utils/cookie.js +37 -0
- package/dist/esm/utils/cookie.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/actions/codegen/createReadContract.d.ts +16 -0
- package/dist/types/actions/codegen/createReadContract.d.ts.map +1 -0
- package/dist/types/actions/codegen/createSimulateContract.d.ts +20 -0
- package/dist/types/actions/codegen/createSimulateContract.d.ts.map +1 -0
- package/dist/types/actions/codegen/createWatchContractEvent.d.ts +14 -0
- package/dist/types/actions/codegen/createWatchContractEvent.d.ts.map +1 -0
- package/dist/types/actions/codegen/createWriteContract.d.ts +22 -0
- package/dist/types/actions/codegen/createWriteContract.d.ts.map +1 -0
- package/dist/types/actions/connect.d.ts +10 -11
- package/dist/types/actions/connect.d.ts.map +1 -1
- package/dist/types/actions/disconnect.d.ts +7 -6
- package/dist/types/actions/disconnect.d.ts.map +1 -1
- package/dist/types/actions/estimateFeesPerGas.d.ts +7 -5
- package/dist/types/actions/estimateFeesPerGas.d.ts.map +1 -1
- package/dist/types/actions/estimateGas.d.ts +7 -5
- package/dist/types/actions/estimateGas.d.ts.map +1 -1
- package/dist/types/actions/estimateMaxPriorityFeePerGas.d.ts +11 -0
- package/dist/types/actions/estimateMaxPriorityFeePerGas.d.ts.map +1 -0
- package/dist/types/actions/getAccount.d.ts +6 -2
- package/dist/types/actions/getAccount.d.ts.map +1 -1
- package/dist/types/actions/getBalance.d.ts +7 -5
- package/dist/types/actions/getBalance.d.ts.map +1 -1
- package/dist/types/actions/getBlock.d.ts +16 -0
- package/dist/types/actions/getBlock.d.ts.map +1 -0
- package/dist/types/actions/getBlockNumber.d.ts +7 -7
- package/dist/types/actions/getBlockNumber.d.ts.map +1 -1
- package/dist/types/actions/getBlockTransactionCount.d.ts +10 -0
- package/dist/types/actions/getBlockTransactionCount.d.ts.map +1 -0
- package/dist/types/actions/getChainId.d.ts +2 -2
- package/dist/types/actions/getChainId.d.ts.map +1 -1
- package/dist/types/actions/getClient.d.ts +3 -3
- package/dist/types/actions/getClient.d.ts.map +1 -1
- package/dist/types/actions/getConnections.d.ts +2 -2
- package/dist/types/actions/getConnections.d.ts.map +1 -1
- package/dist/types/actions/getConnectorClient.d.ts +6 -5
- package/dist/types/actions/getConnectorClient.d.ts.map +1 -1
- package/dist/types/actions/getConnectors.d.ts +5 -0
- package/dist/types/actions/getConnectors.d.ts.map +1 -0
- package/dist/types/actions/getEnsAddress.d.ts +5 -5
- package/dist/types/actions/getEnsAddress.d.ts.map +1 -1
- package/dist/types/actions/getEnsAvatar.d.ts +5 -5
- package/dist/types/actions/getEnsAvatar.d.ts.map +1 -1
- package/dist/types/actions/getEnsName.d.ts +5 -5
- package/dist/types/actions/getEnsName.d.ts.map +1 -1
- package/dist/types/actions/getEnsResolver.d.ts +5 -5
- package/dist/types/actions/getEnsResolver.d.ts.map +1 -1
- package/dist/types/actions/getFeeHistory.d.ts +10 -0
- package/dist/types/actions/getFeeHistory.d.ts.map +1 -0
- package/dist/types/actions/getGasPrice.d.ts +10 -0
- package/dist/types/actions/getGasPrice.d.ts.map +1 -0
- package/dist/types/actions/getPublicClient.d.ts +3 -3
- package/dist/types/actions/getPublicClient.d.ts.map +1 -1
- package/dist/types/actions/getToken.d.ts +10 -8
- package/dist/types/actions/getToken.d.ts.map +1 -1
- package/dist/types/actions/getTransaction.d.ts +8 -6
- package/dist/types/actions/getTransaction.d.ts.map +1 -1
- package/dist/types/actions/getTransactionCount.d.ts +10 -0
- package/dist/types/actions/getTransactionCount.d.ts.map +1 -0
- package/dist/types/actions/getWalletClient.d.ts +5 -4
- package/dist/types/actions/getWalletClient.d.ts.map +1 -1
- package/dist/types/actions/multicall.d.ts +5 -4
- package/dist/types/actions/multicall.d.ts.map +1 -1
- package/dist/types/actions/readContract.d.ts +4 -4
- package/dist/types/actions/readContract.d.ts.map +1 -1
- package/dist/types/actions/readContracts.d.ts +3 -1
- package/dist/types/actions/readContracts.d.ts.map +1 -1
- package/dist/types/actions/reconnect.d.ts +5 -4
- package/dist/types/actions/reconnect.d.ts.map +1 -1
- package/dist/types/actions/sendTransaction.d.ts +7 -5
- package/dist/types/actions/sendTransaction.d.ts.map +1 -1
- package/dist/types/actions/signMessage.d.ts +7 -5
- package/dist/types/actions/signMessage.d.ts.map +1 -1
- package/dist/types/actions/signTypedData.d.ts +7 -4
- package/dist/types/actions/signTypedData.d.ts.map +1 -1
- package/dist/types/actions/simulateContract.d.ts +15 -11
- package/dist/types/actions/simulateContract.d.ts.map +1 -1
- package/dist/types/actions/switchAccount.d.ts +5 -4
- package/dist/types/actions/switchAccount.d.ts.map +1 -1
- package/dist/types/actions/switchChain.d.ts +9 -8
- package/dist/types/actions/switchChain.d.ts.map +1 -1
- package/dist/types/actions/verifyMessage.d.ts +10 -0
- package/dist/types/actions/verifyMessage.d.ts.map +1 -0
- package/dist/types/actions/verifyTypedData.d.ts +11 -0
- package/dist/types/actions/verifyTypedData.d.ts.map +1 -0
- package/dist/types/actions/waitForTransactionReceipt.d.ts +9 -6
- package/dist/types/actions/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/actions/watchAccount.d.ts +1 -1
- package/dist/types/actions/watchAccount.d.ts.map +1 -1
- package/dist/types/actions/watchBlockNumber.d.ts +1 -1
- package/dist/types/actions/watchBlockNumber.d.ts.map +1 -1
- package/dist/types/actions/watchBlocks.d.ts +13 -0
- package/dist/types/actions/watchBlocks.d.ts.map +1 -0
- package/dist/types/actions/watchChainId.d.ts +2 -2
- package/dist/types/actions/watchChainId.d.ts.map +1 -1
- package/dist/types/actions/watchClient.d.ts +2 -2
- package/dist/types/actions/watchClient.d.ts.map +1 -1
- package/dist/types/actions/watchConnections.d.ts +2 -2
- package/dist/types/actions/watchConnections.d.ts.map +1 -1
- package/dist/types/actions/watchConnectors.d.ts +9 -0
- package/dist/types/actions/watchConnectors.d.ts.map +1 -0
- package/dist/types/actions/watchContractEvent.d.ts +5 -5
- package/dist/types/actions/watchContractEvent.d.ts.map +1 -1
- package/dist/types/actions/watchPendingTransactions.d.ts +2 -2
- package/dist/types/actions/watchPendingTransactions.d.ts.map +1 -1
- package/dist/types/actions/watchPublicClient.d.ts +2 -2
- package/dist/types/actions/watchPublicClient.d.ts.map +1 -1
- package/dist/types/actions/writeContract.d.ts +14 -10
- package/dist/types/actions/writeContract.d.ts.map +1 -1
- package/dist/types/{createConnector.d.ts → connectors/createConnector.d.ts} +7 -4
- package/dist/types/connectors/createConnector.d.ts.map +1 -0
- package/dist/types/connectors/injected.d.ts +356 -0
- package/dist/types/connectors/injected.d.ts.map +1 -0
- package/dist/types/connectors/mock.d.ts +20 -0
- package/dist/types/connectors/mock.d.ts.map +1 -0
- package/dist/types/createConfig.d.ts +30 -20
- package/dist/types/createConfig.d.ts.map +1 -1
- package/dist/types/createStorage.d.ts +4 -4
- package/dist/types/createStorage.d.ts.map +1 -1
- package/dist/types/errors/base.d.ts +13 -7
- package/dist/types/errors/base.d.ts.map +1 -1
- package/dist/types/errors/config.d.ts +17 -9
- package/dist/types/errors/config.d.ts.map +1 -1
- package/dist/types/errors/connector.d.ts +6 -0
- package/dist/types/errors/connector.d.ts.map +1 -1
- package/dist/types/exports/actions.d.ts +56 -25
- package/dist/types/exports/actions.d.ts.map +1 -1
- package/dist/types/exports/chains.d.ts.map +1 -1
- package/dist/types/exports/codegen.d.ts +5 -0
- package/dist/types/exports/codegen.d.ts.map +1 -0
- package/dist/types/exports/index.d.ts +67 -29
- package/dist/types/exports/index.d.ts.map +1 -1
- package/dist/types/exports/internal.d.ts +3 -1
- package/dist/types/exports/internal.d.ts.map +1 -1
- package/dist/types/exports/query.d.ts +9 -0
- package/dist/types/exports/query.d.ts.map +1 -1
- package/dist/types/hydrate.d.ts +10 -0
- package/dist/types/hydrate.d.ts.map +1 -0
- package/dist/types/query/connect.d.ts +4 -4
- package/dist/types/query/connect.d.ts.map +1 -1
- package/dist/types/query/disconnect.d.ts +4 -4
- package/dist/types/query/disconnect.d.ts.map +1 -1
- package/dist/types/query/estimateFeesPerGas.d.ts +2 -2
- package/dist/types/query/estimateFeesPerGas.d.ts.map +1 -1
- package/dist/types/query/estimateGas.d.ts +2 -2
- package/dist/types/query/estimateGas.d.ts.map +1 -1
- package/dist/types/query/estimateMaxPriorityFeePerGas.d.ts +27 -0
- package/dist/types/query/estimateMaxPriorityFeePerGas.d.ts.map +1 -0
- package/dist/types/query/getBalance.d.ts +2 -2
- package/dist/types/query/getBalance.d.ts.map +1 -1
- package/dist/types/query/getBlock.d.ts +19 -0
- package/dist/types/query/getBlock.d.ts.map +1 -0
- package/dist/types/query/getBlockNumber.d.ts +9 -12
- package/dist/types/query/getBlockNumber.d.ts.map +1 -1
- package/dist/types/query/getBlockTransactionCount.d.ts +18 -0
- package/dist/types/query/getBlockTransactionCount.d.ts.map +1 -0
- package/dist/types/query/getConnectorClient.d.ts +12 -3
- package/dist/types/query/getConnectorClient.d.ts.map +1 -1
- package/dist/types/query/getEnsAddress.d.ts +2 -2
- package/dist/types/query/getEnsAddress.d.ts.map +1 -1
- package/dist/types/query/getEnsAvatar.d.ts +2 -2
- package/dist/types/query/getEnsAvatar.d.ts.map +1 -1
- package/dist/types/query/getEnsName.d.ts +2 -2
- package/dist/types/query/getEnsName.d.ts.map +1 -1
- package/dist/types/query/getEnsResolver.d.ts +2 -2
- package/dist/types/query/getEnsResolver.d.ts.map +1 -1
- package/dist/types/query/getFeeHistory.d.ts +39 -0
- package/dist/types/query/getFeeHistory.d.ts.map +1 -0
- package/dist/types/query/getGasPrice.d.ts +27 -0
- package/dist/types/query/getGasPrice.d.ts.map +1 -0
- package/dist/types/query/getToken.d.ts +5 -5
- package/dist/types/query/getToken.d.ts.map +1 -1
- package/dist/types/query/getTransaction.d.ts +7 -95
- package/dist/types/query/getTransaction.d.ts.map +1 -1
- package/dist/types/query/getTransactionCount.d.ts +36 -0
- package/dist/types/query/getTransactionCount.d.ts.map +1 -0
- package/dist/types/query/getWalletClient.d.ts +27 -256
- package/dist/types/query/getWalletClient.d.ts.map +1 -1
- package/dist/types/query/infiniteReadContracts.d.ts +60 -0
- package/dist/types/query/infiniteReadContracts.d.ts.map +1 -0
- package/dist/types/query/readContract.d.ts +6 -6
- package/dist/types/query/readContract.d.ts.map +1 -1
- package/dist/types/query/readContracts.d.ts +15 -15
- package/dist/types/query/readContracts.d.ts.map +1 -1
- package/dist/types/query/reconnect.d.ts +5 -5
- package/dist/types/query/reconnect.d.ts.map +1 -1
- package/dist/types/query/sendTransaction.d.ts +4 -4
- package/dist/types/query/sendTransaction.d.ts.map +1 -1
- package/dist/types/query/signMessage.d.ts +3 -3
- package/dist/types/query/signMessage.d.ts.map +1 -1
- package/dist/types/query/signTypedData.d.ts +224 -211
- package/dist/types/query/signTypedData.d.ts.map +1 -1
- package/dist/types/query/simulateContract.d.ts +5 -5
- package/dist/types/query/simulateContract.d.ts.map +1 -1
- package/dist/types/query/switchAccount.d.ts +5 -5
- package/dist/types/query/switchAccount.d.ts.map +1 -1
- package/dist/types/query/switchChain.d.ts +6 -6
- package/dist/types/query/switchChain.d.ts.map +1 -1
- package/dist/types/query/types.d.ts +12 -5
- package/dist/types/query/types.d.ts.map +1 -1
- package/dist/types/query/utils.d.ts +1 -1
- package/dist/types/query/utils.d.ts.map +1 -1
- package/dist/types/query/verifyMessage.d.ts +42 -0
- package/dist/types/query/verifyMessage.d.ts.map +1 -0
- package/dist/types/query/verifyTypedData.d.ts +19 -0
- package/dist/types/query/verifyTypedData.d.ts.map +1 -0
- package/dist/types/query/waitForTransactionReceipt.d.ts +9 -97
- package/dist/types/query/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/query/writeContract.d.ts +12 -8
- package/dist/types/query/writeContract.d.ts.map +1 -1
- package/dist/types/transports/connector.d.ts +15 -0
- package/dist/types/transports/connector.d.ts.map +1 -0
- package/dist/types/transports/fallback.d.ts +4 -0
- package/dist/types/transports/fallback.d.ts.map +1 -0
- package/dist/types/types/chain.d.ts +3 -3
- package/dist/types/types/chain.d.ts.map +1 -1
- package/dist/types/types/properties.d.ts +4 -1
- package/dist/types/types/properties.d.ts.map +1 -1
- package/dist/types/types/register.d.ts +1 -1
- package/dist/types/types/register.d.ts.map +1 -1
- package/dist/types/types/utils.d.ts +9 -3
- package/dist/types/types/utils.d.ts.map +1 -1
- package/dist/types/utils/cookie.d.ts +9 -0
- package/dist/types/utils/cookie.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/internal/package.json +5 -0
- package/package.json +25 -27
- package/query/package.json +5 -0
- package/src/actions/codegen/createReadContract.ts +100 -0
- package/src/actions/codegen/createSimulateContract.ts +122 -0
- package/src/actions/codegen/createWatchContractEvent.ts +87 -0
- package/src/actions/codegen/createWriteContract.ts +142 -0
- package/src/actions/connect.ts +32 -32
- package/src/actions/disconnect.ts +23 -20
- package/src/actions/estimateFeesPerGas.ts +7 -4
- package/src/actions/estimateGas.ts +16 -4
- package/src/actions/estimateMaxPriorityFeePerGas.ts +41 -0
- package/src/actions/getAccount.ts +11 -2
- package/src/actions/getBalance.ts +19 -8
- package/src/actions/getBlock.ts +71 -0
- package/src/actions/getBlockNumber.ts +14 -9
- package/src/actions/getBlockTransactionCount.ts +36 -0
- package/src/actions/getChainId.ts +2 -2
- package/src/actions/getClient.ts +3 -3
- package/src/actions/getConnections.ts +2 -2
- package/src/actions/getConnectorClient.ts +18 -9
- package/src/actions/getConnectors.ts +14 -0
- package/src/actions/getEnsAddress.ts +5 -4
- package/src/actions/getEnsAvatar.ts +5 -4
- package/src/actions/getEnsName.ts +5 -4
- package/src/actions/getEnsResolver.ts +5 -4
- package/src/actions/getFeeHistory.ts +32 -0
- package/src/actions/getGasPrice.ts +31 -0
- package/src/actions/getPublicClient.ts +3 -3
- package/src/actions/getToken.ts +10 -9
- package/src/actions/getTransaction.ts +8 -5
- package/src/actions/getTransactionCount.ts +31 -0
- package/src/actions/getWalletClient.ts +13 -4
- package/src/actions/multicall.ts +6 -3
- package/src/actions/readContract.ts +4 -3
- package/src/actions/readContracts.ts +4 -4
- package/src/actions/reconnect.ts +15 -10
- package/src/actions/sendTransaction.ts +20 -13
- package/src/actions/signMessage.ts +17 -5
- package/src/actions/signTypedData.ts +22 -5
- package/src/actions/simulateContract.ts +38 -31
- package/src/actions/switchAccount.ts +12 -4
- package/src/actions/switchChain.ts +27 -16
- package/src/actions/verifyMessage.ts +28 -0
- package/src/actions/verifyTypedData.ts +38 -0
- package/src/actions/waitForTransactionReceipt.ts +22 -16
- package/src/actions/watchAccount.ts +2 -1
- package/src/actions/watchBlockNumber.ts +4 -6
- package/src/actions/watchBlocks.ts +85 -0
- package/src/actions/watchChainId.ts +2 -2
- package/src/actions/watchClient.ts +2 -2
- package/src/actions/watchConnections.ts +2 -2
- package/src/actions/watchConnectors.ts +22 -0
- package/src/actions/watchContractEvent.ts +9 -10
- package/src/actions/watchPendingTransactions.ts +3 -5
- package/src/actions/watchPublicClient.ts +2 -2
- package/src/actions/writeContract.ts +52 -44
- package/src/{createConnector.ts → connectors/createConnector.ts} +12 -16
- package/src/connectors/injected.ts +555 -0
- package/src/connectors/mock.ts +176 -0
- package/src/createConfig.ts +153 -76
- package/src/createStorage.ts +7 -6
- package/src/errors/base.ts +9 -6
- package/src/errors/config.ts +20 -18
- package/src/errors/connector.ts +6 -0
- package/src/exports/actions.ts +121 -29
- package/src/exports/chains.ts +1 -0
- package/src/exports/codegen.ts +7 -0
- package/src/exports/index.ts +177 -47
- package/src/exports/internal.ts +12 -0
- package/src/exports/query.ts +82 -0
- package/src/hydrate.ts +42 -0
- package/src/query/connect.ts +4 -4
- package/src/query/disconnect.ts +5 -5
- package/src/query/estimateFeesPerGas.ts +4 -4
- package/src/query/estimateGas.ts +5 -5
- package/src/query/estimateMaxPriorityFeePerGas.ts +51 -0
- package/src/query/getBalance.ts +9 -17
- package/src/query/getBlock.ts +84 -0
- package/src/query/getBlockNumber.ts +22 -17
- package/src/query/getBlockTransactionCount.ts +62 -0
- package/src/query/getConnectorClient.ts +5 -4
- package/src/query/getEnsAddress.ts +4 -4
- package/src/query/getEnsAvatar.ts +4 -4
- package/src/query/getEnsName.ts +4 -4
- package/src/query/getEnsResolver.ts +4 -4
- package/src/query/getFeeHistory.ts +69 -0
- package/src/query/getGasPrice.ts +54 -0
- package/src/query/getToken.ts +4 -4
- package/src/query/getTransaction.ts +7 -13
- package/src/query/getTransactionCount.ts +55 -0
- package/src/query/getWalletClient.ts +5 -4
- package/src/query/infiniteReadContracts.ts +129 -0
- package/src/query/readContract.ts +14 -12
- package/src/query/readContracts.ts +16 -16
- package/src/query/reconnect.ts +6 -6
- package/src/query/sendTransaction.ts +5 -5
- package/src/query/signMessage.ts +4 -4
- package/src/query/signTypedData.ts +20 -8
- package/src/query/simulateContract.ts +12 -8
- package/src/query/switchAccount.ts +7 -7
- package/src/query/switchChain.ts +6 -6
- package/src/query/types.ts +63 -34
- package/src/query/utils.ts +16 -1
- package/src/query/verifyMessage.ts +54 -0
- package/src/query/verifyTypedData.ts +81 -0
- package/src/query/waitForTransactionReceipt.ts +6 -6
- package/src/query/writeContract.ts +39 -10
- package/src/transports/connector.ts +87 -0
- package/src/transports/fallback.ts +10 -0
- package/src/types/chain.ts +5 -4
- package/src/types/properties.ts +3 -1
- package/src/types/register.ts +1 -1
- package/src/types/utils.ts +10 -2
- package/src/utils/cookie.ts +34 -0
- package/src/version.ts +1 -1
- package/dist/esm/createConnector.js +0 -8
- package/dist/esm/createConnector.js.map +0 -1
- package/dist/esm/utils/assertActiveChain.js +0 -14
- package/dist/esm/utils/assertActiveChain.js.map +0 -1
- package/dist/types/createConnector.d.ts.map +0 -1
- package/dist/types/utils/assertActiveChain.d.ts +0 -8
- package/dist/types/utils/assertActiveChain.d.ts.map +0 -1
- package/src/utils/assertActiveChain.ts +0 -26
package/src/exports/index.ts
CHANGED
|
@@ -1,45 +1,42 @@
|
|
|
1
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
2
|
-
// Viem
|
|
3
|
-
|
|
4
|
-
// extremely commonly used viem exports
|
|
5
|
-
export {
|
|
6
|
-
custom,
|
|
7
|
-
fallback,
|
|
8
|
-
http,
|
|
9
|
-
webSocket,
|
|
10
|
-
} from 'viem'
|
|
11
|
-
|
|
12
1
|
////////////////////////////////////////////////////////////////////////////////
|
|
13
2
|
// Actions
|
|
3
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
14
4
|
|
|
15
5
|
export {
|
|
16
|
-
type
|
|
6
|
+
type ConnectErrorType,
|
|
17
7
|
type ConnectParameters,
|
|
18
8
|
type ConnectReturnType,
|
|
19
9
|
connect,
|
|
20
10
|
} from '../actions/connect.js'
|
|
21
11
|
|
|
22
12
|
export {
|
|
23
|
-
type
|
|
13
|
+
type DisconnectErrorType,
|
|
24
14
|
type DisconnectParameters,
|
|
25
15
|
type DisconnectReturnType,
|
|
26
16
|
disconnect,
|
|
27
17
|
} from '../actions/disconnect.js'
|
|
28
18
|
|
|
29
19
|
export {
|
|
30
|
-
type
|
|
20
|
+
type EstimateGasErrorType,
|
|
31
21
|
type EstimateGasParameters,
|
|
32
22
|
type EstimateGasReturnType,
|
|
33
23
|
estimateGas,
|
|
34
24
|
} from '../actions/estimateGas.js'
|
|
35
25
|
|
|
36
26
|
export {
|
|
37
|
-
type
|
|
27
|
+
type EstimateFeesPerGasErrorType,
|
|
38
28
|
type EstimateFeesPerGasParameters,
|
|
39
29
|
type EstimateFeesPerGasReturnType,
|
|
40
30
|
estimateFeesPerGas,
|
|
41
31
|
} from '../actions/estimateFeesPerGas.js'
|
|
42
32
|
|
|
33
|
+
export {
|
|
34
|
+
type EstimateMaxPriorityFeePerGasErrorType,
|
|
35
|
+
type EstimateMaxPriorityFeePerGasParameters,
|
|
36
|
+
type EstimateMaxPriorityFeePerGasReturnType,
|
|
37
|
+
estimateMaxPriorityFeePerGas,
|
|
38
|
+
} from '../actions/estimateMaxPriorityFeePerGas.js'
|
|
39
|
+
|
|
43
40
|
export {
|
|
44
41
|
type GetAccountReturnType,
|
|
45
42
|
getAccount,
|
|
@@ -48,17 +45,35 @@ export {
|
|
|
48
45
|
export {
|
|
49
46
|
type GetBalanceParameters,
|
|
50
47
|
type GetBalanceReturnType,
|
|
51
|
-
type
|
|
48
|
+
type GetBalanceErrorType,
|
|
52
49
|
getBalance,
|
|
50
|
+
/** @deprecated use `getBalance` instead */
|
|
51
|
+
getBalance as fetchBalance,
|
|
53
52
|
} from '../actions/getBalance.js'
|
|
54
53
|
|
|
55
54
|
export {
|
|
56
|
-
type
|
|
55
|
+
type GetBlockErrorType,
|
|
56
|
+
type GetBlockParameters,
|
|
57
|
+
type GetBlockReturnType,
|
|
58
|
+
getBlock,
|
|
59
|
+
} from '../actions/getBlock.js'
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
type GetBlockNumberErrorType,
|
|
57
63
|
type GetBlockNumberParameters,
|
|
58
64
|
type GetBlockNumberReturnType,
|
|
59
65
|
getBlockNumber,
|
|
66
|
+
/** @deprecated use `getBlockNumber` instead */
|
|
67
|
+
getBlockNumber as fetchBlockNumber,
|
|
60
68
|
} from '../actions/getBlockNumber.js'
|
|
61
69
|
|
|
70
|
+
export {
|
|
71
|
+
type GetBlockTransactionCountErrorType,
|
|
72
|
+
type GetBlockTransactionCountParameters,
|
|
73
|
+
type GetBlockTransactionCountReturnType,
|
|
74
|
+
getBlockTransactionCount,
|
|
75
|
+
} from '../actions/getBlockTransactionCount.js'
|
|
76
|
+
|
|
62
77
|
export {
|
|
63
78
|
type GetChainIdReturnType,
|
|
64
79
|
getChainId,
|
|
@@ -76,40 +91,67 @@ export {
|
|
|
76
91
|
} from '../actions/getConnections.js'
|
|
77
92
|
|
|
78
93
|
export {
|
|
79
|
-
type
|
|
94
|
+
type GetConnectorsReturnType,
|
|
95
|
+
getConnectors,
|
|
96
|
+
} from '../actions/getConnectors.js'
|
|
97
|
+
|
|
98
|
+
export {
|
|
99
|
+
type GetConnectorClientErrorType,
|
|
80
100
|
type GetConnectorClientParameters,
|
|
81
101
|
type GetConnectorClientReturnType,
|
|
82
102
|
getConnectorClient,
|
|
83
103
|
} from '../actions/getConnectorClient.js'
|
|
84
104
|
|
|
85
105
|
export {
|
|
86
|
-
type
|
|
106
|
+
type GetEnsAddressErrorType,
|
|
87
107
|
type GetEnsAddressParameters,
|
|
88
108
|
type GetEnsAddressReturnType,
|
|
89
109
|
getEnsAddress,
|
|
110
|
+
/** @deprecated use `getEnsAddress` instead */
|
|
111
|
+
getEnsAddress as fetchEnsAddress,
|
|
90
112
|
} from '../actions/getEnsAddress.js'
|
|
91
113
|
|
|
92
114
|
export {
|
|
93
|
-
type
|
|
115
|
+
type GetEnsAvatarErrorType,
|
|
94
116
|
type GetEnsAvatarParameters,
|
|
95
117
|
type GetEnsAvatarReturnType,
|
|
96
118
|
getEnsAvatar,
|
|
119
|
+
/** @deprecated use `getEnsAvatar` instead */
|
|
120
|
+
getEnsAvatar as fetchEnsAvatar,
|
|
97
121
|
} from '../actions/getEnsAvatar.js'
|
|
98
122
|
|
|
99
123
|
export {
|
|
100
|
-
type
|
|
124
|
+
type GetEnsNameErrorType,
|
|
101
125
|
type GetEnsNameParameters,
|
|
102
126
|
type GetEnsNameReturnType,
|
|
103
127
|
getEnsName,
|
|
128
|
+
/** @deprecated */
|
|
129
|
+
getEnsName as fetchEnsName,
|
|
104
130
|
} from '../actions/getEnsName.js'
|
|
105
131
|
|
|
106
132
|
export {
|
|
107
|
-
type
|
|
133
|
+
type GetEnsResolverErrorType,
|
|
108
134
|
type GetEnsResolverParameters,
|
|
109
135
|
type GetEnsResolverReturnType,
|
|
110
136
|
getEnsResolver,
|
|
137
|
+
/** @deprecated use `getEnsResolver` instead */
|
|
138
|
+
getEnsResolver as fetchEnsResolver,
|
|
111
139
|
} from '../actions/getEnsResolver.js'
|
|
112
140
|
|
|
141
|
+
export {
|
|
142
|
+
type GetFeeHistoryErrorType,
|
|
143
|
+
type GetFeeHistoryParameters,
|
|
144
|
+
type GetFeeHistoryReturnType,
|
|
145
|
+
getFeeHistory,
|
|
146
|
+
} from '../actions/getFeeHistory.js'
|
|
147
|
+
|
|
148
|
+
export {
|
|
149
|
+
type GetGasPriceErrorType,
|
|
150
|
+
type GetGasPriceParameters,
|
|
151
|
+
type GetGasPriceReturnType,
|
|
152
|
+
getGasPrice,
|
|
153
|
+
} from '../actions/getGasPrice.js'
|
|
154
|
+
|
|
113
155
|
export {
|
|
114
156
|
type GetPublicClientParameters,
|
|
115
157
|
type GetPublicClientReturnType,
|
|
@@ -117,21 +159,32 @@ export {
|
|
|
117
159
|
} from '../actions/getPublicClient.js'
|
|
118
160
|
|
|
119
161
|
export {
|
|
120
|
-
type
|
|
162
|
+
type GetTokenErrorType,
|
|
121
163
|
type GetTokenParameters,
|
|
122
164
|
type GetTokenReturnType,
|
|
123
165
|
getToken,
|
|
166
|
+
/** @deprecated use `getToken` instead */
|
|
167
|
+
getToken as fetchToken,
|
|
124
168
|
} from '../actions/getToken.js'
|
|
125
169
|
|
|
126
170
|
export {
|
|
127
|
-
type
|
|
171
|
+
type GetTransactionErrorType,
|
|
128
172
|
type GetTransactionParameters,
|
|
129
173
|
type GetTransactionReturnType,
|
|
130
174
|
getTransaction,
|
|
175
|
+
/** @deprecated use `getTransaction` instead */
|
|
176
|
+
getTransaction as fetchTransaction,
|
|
131
177
|
} from '../actions/getTransaction.js'
|
|
132
178
|
|
|
133
179
|
export {
|
|
134
|
-
type
|
|
180
|
+
type GetTransactionCountErrorType,
|
|
181
|
+
type GetTransactionCountParameters,
|
|
182
|
+
type GetTransactionCountReturnType,
|
|
183
|
+
getTransactionCount,
|
|
184
|
+
} from '../actions/getTransactionCount.js'
|
|
185
|
+
|
|
186
|
+
export {
|
|
187
|
+
type GetWalletClientErrorType,
|
|
135
188
|
type GetWalletClientParameters,
|
|
136
189
|
type GetWalletClientReturnType,
|
|
137
190
|
getWalletClient,
|
|
@@ -146,72 +199,94 @@ export {
|
|
|
146
199
|
export {
|
|
147
200
|
type ReadContractParameters,
|
|
148
201
|
type ReadContractReturnType,
|
|
149
|
-
type
|
|
202
|
+
type ReadContractErrorType,
|
|
150
203
|
readContract,
|
|
151
204
|
} from '../actions/readContract.js'
|
|
152
205
|
|
|
153
206
|
export {
|
|
154
207
|
type ReadContractsParameters,
|
|
155
208
|
type ReadContractsReturnType,
|
|
156
|
-
type
|
|
209
|
+
type ReadContractsErrorType,
|
|
157
210
|
readContracts,
|
|
158
211
|
} from '../actions/readContracts.js'
|
|
159
212
|
|
|
160
213
|
export {
|
|
161
|
-
type
|
|
214
|
+
type ReconnectErrorType,
|
|
162
215
|
type ReconnectParameters,
|
|
163
216
|
type ReconnectReturnType,
|
|
164
217
|
reconnect,
|
|
165
218
|
} from '../actions/reconnect.js'
|
|
166
219
|
|
|
167
220
|
export {
|
|
168
|
-
type
|
|
221
|
+
type SendTransactionErrorType,
|
|
169
222
|
type SendTransactionParameters,
|
|
170
223
|
type SendTransactionReturnType,
|
|
171
224
|
sendTransaction,
|
|
172
225
|
} from '../actions/sendTransaction.js'
|
|
173
226
|
|
|
174
227
|
export {
|
|
175
|
-
type
|
|
228
|
+
type SignMessageErrorType,
|
|
176
229
|
type SignMessageParameters,
|
|
177
230
|
type SignMessageReturnType,
|
|
178
231
|
signMessage,
|
|
179
232
|
} from '../actions/signMessage.js'
|
|
180
233
|
|
|
181
234
|
export {
|
|
182
|
-
type
|
|
235
|
+
type SignTypedDataErrorType,
|
|
183
236
|
type SignTypedDataParameters,
|
|
184
237
|
type SignTypedDataReturnType,
|
|
185
238
|
signTypedData,
|
|
186
239
|
} from '../actions/signTypedData.js'
|
|
187
240
|
|
|
188
241
|
export {
|
|
189
|
-
type
|
|
242
|
+
type SimulateContractErrorType,
|
|
190
243
|
type SimulateContractParameters,
|
|
191
244
|
type SimulateContractReturnType,
|
|
192
245
|
simulateContract,
|
|
193
246
|
} from '../actions/simulateContract.js'
|
|
194
247
|
|
|
195
248
|
export {
|
|
196
|
-
type
|
|
249
|
+
type SwitchAccountErrorType,
|
|
197
250
|
type SwitchAccountParameters,
|
|
198
251
|
type SwitchAccountReturnType,
|
|
199
252
|
switchAccount,
|
|
200
253
|
} from '../actions/switchAccount.js'
|
|
201
254
|
|
|
202
255
|
export {
|
|
203
|
-
type
|
|
256
|
+
type SwitchChainErrorType,
|
|
204
257
|
type SwitchChainParameters,
|
|
205
258
|
type SwitchChainReturnType,
|
|
206
259
|
switchChain,
|
|
260
|
+
/** @deprecated use `switchChain` instead */
|
|
261
|
+
switchChain as switchNetwork,
|
|
207
262
|
} from '../actions/switchChain.js'
|
|
208
263
|
|
|
264
|
+
export {
|
|
265
|
+
type VerifyMessageErrorType,
|
|
266
|
+
type VerifyMessageParameters,
|
|
267
|
+
type VerifyMessageReturnType,
|
|
268
|
+
verifyMessage,
|
|
269
|
+
} from '../actions/verifyMessage.js'
|
|
270
|
+
|
|
271
|
+
export {
|
|
272
|
+
type VerifyTypedDataErrorType,
|
|
273
|
+
type VerifyTypedDataParameters,
|
|
274
|
+
type VerifyTypedDataReturnType,
|
|
275
|
+
verifyTypedData,
|
|
276
|
+
} from '../actions/verifyTypedData.js'
|
|
277
|
+
|
|
209
278
|
export {
|
|
210
279
|
type WatchAccountParameters,
|
|
211
280
|
type WatchAccountReturnType,
|
|
212
281
|
watchAccount,
|
|
213
282
|
} from '../actions/watchAccount.js'
|
|
214
283
|
|
|
284
|
+
export {
|
|
285
|
+
type WatchBlocksParameters,
|
|
286
|
+
type WatchBlocksReturnType,
|
|
287
|
+
watchBlocks,
|
|
288
|
+
} from '../actions/watchBlocks.js'
|
|
289
|
+
|
|
215
290
|
export {
|
|
216
291
|
type WatchBlockNumberParameters,
|
|
217
292
|
type WatchBlockNumberReturnType,
|
|
@@ -236,6 +311,12 @@ export {
|
|
|
236
311
|
watchConnections,
|
|
237
312
|
} from '../actions/watchConnections.js'
|
|
238
313
|
|
|
314
|
+
export {
|
|
315
|
+
type WatchConnectorsParameters,
|
|
316
|
+
type WatchConnectorsReturnType,
|
|
317
|
+
watchConnectors,
|
|
318
|
+
} from '../actions/watchConnectors.js'
|
|
319
|
+
|
|
239
320
|
export {
|
|
240
321
|
type WatchContractEventParameters,
|
|
241
322
|
type WatchContractEventReturnType,
|
|
@@ -255,21 +336,44 @@ export {
|
|
|
255
336
|
} from '../actions/watchPublicClient.js'
|
|
256
337
|
|
|
257
338
|
export {
|
|
258
|
-
type
|
|
339
|
+
type WaitForTransactionReceiptErrorType,
|
|
259
340
|
type WaitForTransactionReceiptParameters,
|
|
260
341
|
type WaitForTransactionReceiptReturnType,
|
|
261
342
|
waitForTransactionReceipt,
|
|
343
|
+
/** @deprecated use `waitForTransactionReceipt` instead */
|
|
344
|
+
waitForTransactionReceipt as waitForTransaction,
|
|
262
345
|
} from '../actions/waitForTransactionReceipt.js'
|
|
263
346
|
|
|
264
347
|
export {
|
|
265
|
-
type
|
|
348
|
+
type WriteContractErrorType,
|
|
266
349
|
type WriteContractParameters,
|
|
267
350
|
type WriteContractReturnType,
|
|
268
351
|
writeContract,
|
|
269
352
|
} from '../actions/writeContract.js'
|
|
270
353
|
|
|
354
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
355
|
+
// Connectors
|
|
356
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
357
|
+
|
|
358
|
+
export {
|
|
359
|
+
type ConnectorEventMap,
|
|
360
|
+
type CreateConnectorFn,
|
|
361
|
+
createConnector,
|
|
362
|
+
} from '../connectors/createConnector.js'
|
|
363
|
+
|
|
364
|
+
export {
|
|
365
|
+
type InjectedParameters,
|
|
366
|
+
injected,
|
|
367
|
+
} from '../connectors/injected.js'
|
|
368
|
+
|
|
369
|
+
export {
|
|
370
|
+
type MockParameters,
|
|
371
|
+
mock,
|
|
372
|
+
} from '../connectors/mock.js'
|
|
373
|
+
|
|
271
374
|
////////////////////////////////////////////////////////////////////////////////
|
|
272
375
|
// createConfig
|
|
376
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
273
377
|
|
|
274
378
|
export {
|
|
275
379
|
type Connection,
|
|
@@ -280,17 +384,9 @@ export {
|
|
|
280
384
|
createConfig,
|
|
281
385
|
} from '../createConfig.js'
|
|
282
386
|
|
|
283
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
284
|
-
// createConnector
|
|
285
|
-
|
|
286
|
-
export {
|
|
287
|
-
type ConnectorEventMap,
|
|
288
|
-
type CreateConnectorFn,
|
|
289
|
-
createConnector,
|
|
290
|
-
} from '../createConnector.js'
|
|
291
|
-
|
|
292
387
|
////////////////////////////////////////////////////////////////////////////////
|
|
293
388
|
// createStorage
|
|
389
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
294
390
|
|
|
295
391
|
export {
|
|
296
392
|
type CreateStorageParameters,
|
|
@@ -300,32 +396,65 @@ export {
|
|
|
300
396
|
noopStorage,
|
|
301
397
|
} from '../createStorage.js'
|
|
302
398
|
|
|
399
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
400
|
+
// Hydrate
|
|
401
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
402
|
+
|
|
403
|
+
export { hydrate } from '../hydrate.js'
|
|
404
|
+
|
|
303
405
|
////////////////////////////////////////////////////////////////////////////////
|
|
304
406
|
// Errors
|
|
407
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
305
408
|
|
|
306
409
|
export { BaseError } from '../errors/base.js'
|
|
307
410
|
|
|
308
411
|
export {
|
|
309
|
-
|
|
412
|
+
type ChainNotConfiguredErrorType,
|
|
310
413
|
ChainNotConfiguredError,
|
|
414
|
+
type ConnectorNotConnectedErrorType,
|
|
311
415
|
ConnectorNotConnectedError,
|
|
416
|
+
type ConnectorAlreadyConnectedErrorType,
|
|
312
417
|
ConnectorAlreadyConnectedError,
|
|
418
|
+
type ConnectorNotFoundErrorType,
|
|
313
419
|
ConnectorNotFoundError,
|
|
314
|
-
|
|
420
|
+
type ConnectorAccountNotFoundErrorType,
|
|
421
|
+
ConnectorAccountNotFoundError,
|
|
315
422
|
} from '../errors/config.js'
|
|
316
423
|
|
|
317
424
|
export {
|
|
425
|
+
type ProviderNotFoundErrorType,
|
|
318
426
|
ProviderNotFoundError,
|
|
427
|
+
type SwitchChainNotSupportedErrorType,
|
|
319
428
|
SwitchChainNotSupportedError,
|
|
320
429
|
} from '../errors/connector.js'
|
|
321
430
|
|
|
431
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
432
|
+
// Transports
|
|
433
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
434
|
+
|
|
435
|
+
export { custom, http, webSocket } from 'viem'
|
|
436
|
+
|
|
437
|
+
export { unstable_connector } from '../transports/connector.js'
|
|
438
|
+
|
|
439
|
+
export { fallback } from '../transports/fallback.js'
|
|
440
|
+
|
|
322
441
|
////////////////////////////////////////////////////////////////////////////////
|
|
323
442
|
// Types
|
|
443
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
324
444
|
|
|
325
445
|
export { type Register, type ResolvedRegister } from '../types/register.js'
|
|
326
446
|
|
|
327
447
|
////////////////////////////////////////////////////////////////////////////////
|
|
328
448
|
// Utilities
|
|
449
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
450
|
+
|
|
451
|
+
export {
|
|
452
|
+
cookieStorage,
|
|
453
|
+
cookieToInitialState,
|
|
454
|
+
parseCookie,
|
|
455
|
+
} from '../utils/cookie.js'
|
|
456
|
+
|
|
457
|
+
export { deepEqual } from '../utils/deepEqual.js'
|
|
329
458
|
|
|
330
459
|
export { deserialize } from '../utils/deserialize.js'
|
|
331
460
|
|
|
@@ -335,5 +464,6 @@ export { serialize } from '../utils/serialize.js'
|
|
|
335
464
|
|
|
336
465
|
////////////////////////////////////////////////////////////////////////////////
|
|
337
466
|
// Version
|
|
467
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
338
468
|
|
|
339
469
|
export { version } from '../version.js'
|
package/src/exports/internal.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
////////////////////////////////////////////////////////////////////////////////
|
|
2
2
|
// Emitter
|
|
3
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
3
4
|
|
|
4
5
|
export {
|
|
5
6
|
type EventData,
|
|
@@ -9,6 +10,15 @@ export {
|
|
|
9
10
|
|
|
10
11
|
////////////////////////////////////////////////////////////////////////////////
|
|
11
12
|
// Types
|
|
13
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
14
|
+
|
|
15
|
+
export { type SelectChains } from '../types/chain.js'
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
type ChainIdParameter,
|
|
19
|
+
type ConnectorParameter,
|
|
20
|
+
type ScopeKeyParameter,
|
|
21
|
+
} from '../types/properties.js'
|
|
12
22
|
|
|
13
23
|
export {
|
|
14
24
|
type Evaluate,
|
|
@@ -17,11 +27,13 @@ export {
|
|
|
17
27
|
type Omit,
|
|
18
28
|
type OneOf,
|
|
19
29
|
type UnionEvaluate,
|
|
30
|
+
type UnionOmit,
|
|
20
31
|
type UnionPartial,
|
|
21
32
|
} from '../types/utils.js'
|
|
22
33
|
|
|
23
34
|
////////////////////////////////////////////////////////////////////////////////
|
|
24
35
|
// Utilities
|
|
36
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
25
37
|
|
|
26
38
|
export { deepEqual } from '../utils/deepEqual.js'
|
|
27
39
|
|
package/src/exports/query.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
////////////////////////////////////////////////////////////////////////////////
|
|
2
2
|
// Tanstack Query
|
|
3
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
3
4
|
|
|
4
5
|
export {
|
|
5
6
|
type ConnectData,
|
|
@@ -35,6 +36,15 @@ export {
|
|
|
35
36
|
estimateGasQueryOptions,
|
|
36
37
|
} from '../query/estimateGas.js'
|
|
37
38
|
|
|
39
|
+
export {
|
|
40
|
+
type EstimateMaxPriorityFeePerGasData,
|
|
41
|
+
type EstimateMaxPriorityFeePerGasOptions,
|
|
42
|
+
type EstimateMaxPriorityFeePerGasQueryFnData,
|
|
43
|
+
type EstimateMaxPriorityFeePerGasQueryKey,
|
|
44
|
+
estimateMaxPriorityFeePerGasQueryKey,
|
|
45
|
+
estimateMaxPriorityFeePerGasQueryOptions,
|
|
46
|
+
} from '../query/estimateMaxPriorityFeePerGas.js'
|
|
47
|
+
|
|
38
48
|
export {
|
|
39
49
|
type GetBalanceData,
|
|
40
50
|
type GetBalanceOptions,
|
|
@@ -44,6 +54,15 @@ export {
|
|
|
44
54
|
getBalanceQueryOptions,
|
|
45
55
|
} from '../query/getBalance.js'
|
|
46
56
|
|
|
57
|
+
export {
|
|
58
|
+
type GetBlockData,
|
|
59
|
+
type GetBlockOptions,
|
|
60
|
+
type GetBlockQueryFnData,
|
|
61
|
+
type GetBlockQueryKey,
|
|
62
|
+
getBlockQueryKey,
|
|
63
|
+
getBlockQueryOptions,
|
|
64
|
+
} from '../query/getBlock.js'
|
|
65
|
+
|
|
47
66
|
export {
|
|
48
67
|
type GetBlockNumberData,
|
|
49
68
|
type GetBlockNumberOptions,
|
|
@@ -53,6 +72,15 @@ export {
|
|
|
53
72
|
getBlockNumberQueryOptions,
|
|
54
73
|
} from '../query/getBlockNumber.js'
|
|
55
74
|
|
|
75
|
+
export {
|
|
76
|
+
type GetBlockTransactionCountData,
|
|
77
|
+
type GetBlockTransactionCountOptions,
|
|
78
|
+
type GetBlockTransactionCountQueryFnData,
|
|
79
|
+
type GetBlockTransactionCountQueryKey,
|
|
80
|
+
getBlockTransactionCountQueryKey,
|
|
81
|
+
getBlockTransactionCountQueryOptions,
|
|
82
|
+
} from '../query/getBlockTransactionCount.js'
|
|
83
|
+
|
|
56
84
|
export {
|
|
57
85
|
type GetConnectorClientData,
|
|
58
86
|
type GetConnectorClientOptions,
|
|
@@ -98,6 +126,24 @@ export {
|
|
|
98
126
|
getEnsResolverQueryOptions,
|
|
99
127
|
} from '../query/getEnsResolver.js'
|
|
100
128
|
|
|
129
|
+
export {
|
|
130
|
+
type GetFeeHistoryData,
|
|
131
|
+
type GetFeeHistoryOptions,
|
|
132
|
+
type GetFeeHistoryQueryFnData,
|
|
133
|
+
type GetFeeHistoryQueryKey,
|
|
134
|
+
getFeeHistoryQueryKey,
|
|
135
|
+
getFeeHistoryQueryOptions,
|
|
136
|
+
} from '../query/getFeeHistory.js'
|
|
137
|
+
|
|
138
|
+
export {
|
|
139
|
+
type GetGasPriceData,
|
|
140
|
+
type GetGasPriceOptions,
|
|
141
|
+
type GetGasPriceQueryFnData,
|
|
142
|
+
type GetGasPriceQueryKey,
|
|
143
|
+
getGasPriceQueryKey,
|
|
144
|
+
getGasPriceQueryOptions,
|
|
145
|
+
} from '../query/getGasPrice.js'
|
|
146
|
+
|
|
101
147
|
export {
|
|
102
148
|
type GetTokenData,
|
|
103
149
|
type GetTokenOptions,
|
|
@@ -116,6 +162,15 @@ export {
|
|
|
116
162
|
getTransactionQueryOptions,
|
|
117
163
|
} from '../query/getTransaction.js'
|
|
118
164
|
|
|
165
|
+
export {
|
|
166
|
+
type GetTransactionCountData,
|
|
167
|
+
type GetTransactionCountOptions,
|
|
168
|
+
type GetTransactionCountQueryFnData,
|
|
169
|
+
type GetTransactionCountQueryKey,
|
|
170
|
+
getTransactionCountQueryKey,
|
|
171
|
+
getTransactionCountQueryOptions,
|
|
172
|
+
} from '../query/getTransactionCount.js'
|
|
173
|
+
|
|
119
174
|
export {
|
|
120
175
|
type GetWalletClientData,
|
|
121
176
|
type GetWalletClientOptions,
|
|
@@ -125,6 +180,15 @@ export {
|
|
|
125
180
|
getWalletClientQueryOptions,
|
|
126
181
|
} from '../query/getWalletClient.js'
|
|
127
182
|
|
|
183
|
+
export {
|
|
184
|
+
type InfiniteReadContractsData,
|
|
185
|
+
type InfiniteReadContractsOptions,
|
|
186
|
+
type InfiniteReadContractsQueryFnData,
|
|
187
|
+
type InfiniteReadContractsQueryKey,
|
|
188
|
+
infiniteReadContractsQueryKey,
|
|
189
|
+
infiniteReadContractsQueryOptions,
|
|
190
|
+
} from '../query/infiniteReadContracts.js'
|
|
191
|
+
|
|
128
192
|
export {
|
|
129
193
|
type ReadContractData,
|
|
130
194
|
type ReadContractOptions,
|
|
@@ -200,6 +264,24 @@ export {
|
|
|
200
264
|
switchChainMutationOptions,
|
|
201
265
|
} from '../query/switchChain.js'
|
|
202
266
|
|
|
267
|
+
export {
|
|
268
|
+
type VerifyMessageData,
|
|
269
|
+
type VerifyMessageOptions,
|
|
270
|
+
type VerifyMessageQueryFnData,
|
|
271
|
+
type VerifyMessageQueryKey,
|
|
272
|
+
verifyMessageQueryKey,
|
|
273
|
+
verifyMessageQueryOptions,
|
|
274
|
+
} from '../query/verifyMessage.js'
|
|
275
|
+
|
|
276
|
+
export {
|
|
277
|
+
type VerifyTypedDataData,
|
|
278
|
+
type VerifyTypedDataOptions,
|
|
279
|
+
type VerifyTypedDataQueryFnData,
|
|
280
|
+
type VerifyTypedDataQueryKey,
|
|
281
|
+
verifyTypedDataQueryKey,
|
|
282
|
+
verifyTypedDataQueryOptions,
|
|
283
|
+
} from '../query/verifyTypedData.js'
|
|
284
|
+
|
|
203
285
|
export {
|
|
204
286
|
type WaitForTransactionReceiptData,
|
|
205
287
|
type WaitForTransactionReceiptOptions,
|
package/src/hydrate.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { reconnect } from './actions/reconnect.js'
|
|
2
|
+
import type { Config, State } from './createConfig.js'
|
|
3
|
+
|
|
4
|
+
type HydrateParameters = {
|
|
5
|
+
initialState?: State | undefined
|
|
6
|
+
reconnectOnMount?: boolean | undefined
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function hydrate(config: Config, parameters: HydrateParameters) {
|
|
10
|
+
const { initialState, reconnectOnMount } = parameters
|
|
11
|
+
|
|
12
|
+
if (initialState)
|
|
13
|
+
config.setState({
|
|
14
|
+
...initialState,
|
|
15
|
+
connections: reconnectOnMount ? initialState.connections : new Map(),
|
|
16
|
+
status: reconnectOnMount ? 'reconnecting' : 'disconnected',
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
async onMount() {
|
|
21
|
+
if (config._internal.ssr) {
|
|
22
|
+
await config._internal.store.persist.rehydrate()
|
|
23
|
+
const mipdConnectors = config._internal.mipd
|
|
24
|
+
?.getProviders()
|
|
25
|
+
.map(config._internal.connectors.providerDetailToConnector)
|
|
26
|
+
.map(config._internal.connectors.setup)
|
|
27
|
+
config._internal.connectors.setState((connectors) => [
|
|
28
|
+
...connectors,
|
|
29
|
+
...(mipdConnectors ?? []),
|
|
30
|
+
])
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (reconnectOnMount) reconnect(config)
|
|
34
|
+
else if (config.storage)
|
|
35
|
+
// Reset connections that may have been hydrated from storage.
|
|
36
|
+
config.setState((x) => ({
|
|
37
|
+
...x,
|
|
38
|
+
connections: new Map(),
|
|
39
|
+
}))
|
|
40
|
+
},
|
|
41
|
+
}
|
|
42
|
+
}
|