@wagmi/core 2.10.4 → 2.10.6
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/call.js +0 -2
- package/dist/esm/actions/call.js.map +1 -1
- package/dist/esm/actions/codegen/createReadContract.js +0 -3
- package/dist/esm/actions/codegen/createReadContract.js.map +1 -1
- package/dist/esm/actions/codegen/createSimulateContract.js +0 -5
- package/dist/esm/actions/codegen/createSimulateContract.js.map +1 -1
- package/dist/esm/actions/codegen/createWatchContractEvent.js +0 -3
- package/dist/esm/actions/codegen/createWatchContractEvent.js.map +1 -1
- package/dist/esm/actions/codegen/createWriteContract.js +0 -5
- package/dist/esm/actions/codegen/createWriteContract.js.map +1 -1
- package/dist/esm/actions/connect.js +0 -5
- package/dist/esm/actions/connect.js.map +1 -1
- package/dist/esm/actions/estimateFeesPerGas.js +0 -4
- package/dist/esm/actions/estimateFeesPerGas.js.map +1 -1
- package/dist/esm/actions/estimateGas.js +0 -2
- package/dist/esm/actions/estimateGas.js.map +1 -1
- package/dist/esm/actions/estimateMaxPriorityFeePerGas.js +0 -4
- package/dist/esm/actions/estimateMaxPriorityFeePerGas.js.map +1 -1
- package/dist/esm/actions/getAccount.js +0 -2
- package/dist/esm/actions/getAccount.js.map +1 -1
- package/dist/esm/actions/getBalance.js +0 -4
- package/dist/esm/actions/getBalance.js.map +1 -1
- package/dist/esm/actions/getBlock.js +0 -3
- package/dist/esm/actions/getBlock.js.map +1 -1
- package/dist/esm/actions/getBlockNumber.js +0 -3
- package/dist/esm/actions/getBlockNumber.js.map +1 -1
- package/dist/esm/actions/getBlockTransactionCount.js +0 -3
- package/dist/esm/actions/getBlockTransactionCount.js.map +1 -1
- package/dist/esm/actions/getBytecode.js +0 -3
- package/dist/esm/actions/getBytecode.js.map +1 -1
- package/dist/esm/actions/getChainId.js +0 -1
- package/dist/esm/actions/getChainId.js.map +1 -1
- package/dist/esm/actions/getChains.js +0 -2
- package/dist/esm/actions/getChains.js.map +1 -1
- package/dist/esm/actions/getClient.js +0 -4
- package/dist/esm/actions/getClient.js.map +1 -1
- package/dist/esm/actions/getConnections.js +0 -1
- package/dist/esm/actions/getConnections.js.map +1 -1
- package/dist/esm/actions/getConnectorClient.js +10 -4
- package/dist/esm/actions/getConnectorClient.js.map +1 -1
- package/dist/esm/actions/getEnsAddress.js +0 -3
- package/dist/esm/actions/getEnsAddress.js.map +1 -1
- package/dist/esm/actions/getEnsAvatar.js +0 -3
- package/dist/esm/actions/getEnsAvatar.js.map +1 -1
- package/dist/esm/actions/getEnsName.js +0 -3
- package/dist/esm/actions/getEnsName.js.map +1 -1
- package/dist/esm/actions/getEnsResolver.js +0 -3
- package/dist/esm/actions/getEnsResolver.js.map +1 -1
- package/dist/esm/actions/getEnsText.js +0 -3
- package/dist/esm/actions/getEnsText.js.map +1 -1
- package/dist/esm/actions/getFeeHistory.js +0 -3
- package/dist/esm/actions/getFeeHistory.js.map +1 -1
- package/dist/esm/actions/getGasPrice.js +0 -3
- package/dist/esm/actions/getGasPrice.js.map +1 -1
- package/dist/esm/actions/getProof.js +0 -3
- package/dist/esm/actions/getProof.js.map +1 -1
- package/dist/esm/actions/getPublicClient.js +0 -3
- package/dist/esm/actions/getPublicClient.js.map +1 -1
- package/dist/esm/actions/getStorageAt.js +0 -3
- package/dist/esm/actions/getStorageAt.js.map +1 -1
- package/dist/esm/actions/getToken.js +0 -4
- package/dist/esm/actions/getToken.js.map +1 -1
- package/dist/esm/actions/getTransaction.js +0 -3
- package/dist/esm/actions/getTransaction.js.map +1 -1
- package/dist/esm/actions/getTransactionConfirmations.js +0 -4
- package/dist/esm/actions/getTransactionConfirmations.js.map +1 -1
- package/dist/esm/actions/getTransactionCount.js +0 -3
- package/dist/esm/actions/getTransactionCount.js.map +1 -1
- package/dist/esm/actions/getTransactionReceipt.js +0 -4
- package/dist/esm/actions/getTransactionReceipt.js.map +1 -1
- package/dist/esm/actions/getWalletClient.js +0 -2
- package/dist/esm/actions/getWalletClient.js.map +1 -1
- package/dist/esm/actions/multicall.js +0 -2
- package/dist/esm/actions/multicall.js.map +1 -1
- package/dist/esm/actions/prepareTransactionRequest.js +0 -5
- package/dist/esm/actions/prepareTransactionRequest.js.map +1 -1
- package/dist/esm/actions/readContract.js +0 -3
- package/dist/esm/actions/readContract.js.map +1 -1
- package/dist/esm/actions/readContracts.js +7 -9
- package/dist/esm/actions/readContracts.js.map +1 -1
- package/dist/esm/actions/reconnect.js +4 -7
- package/dist/esm/actions/reconnect.js.map +1 -1
- package/dist/esm/actions/sendTransaction.js +0 -2
- package/dist/esm/actions/sendTransaction.js.map +1 -1
- package/dist/esm/actions/signMessage.js +0 -5
- package/dist/esm/actions/signMessage.js.map +1 -1
- package/dist/esm/actions/signTypedData.js +0 -1
- package/dist/esm/actions/signTypedData.js.map +1 -1
- package/dist/esm/actions/simulateContract.js +0 -4
- package/dist/esm/actions/simulateContract.js.map +1 -1
- package/dist/esm/actions/switchAccount.js +0 -2
- package/dist/esm/actions/switchAccount.js.map +1 -1
- package/dist/esm/actions/switchChain.js +0 -3
- package/dist/esm/actions/switchChain.js.map +1 -1
- package/dist/esm/actions/verifyMessage.js +0 -3
- package/dist/esm/actions/verifyMessage.js.map +1 -1
- package/dist/esm/actions/verifyTypedData.js +0 -4
- package/dist/esm/actions/verifyTypedData.js.map +1 -1
- package/dist/esm/actions/waitForTransactionReceipt.js +0 -5
- package/dist/esm/actions/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/actions/watchAccount.js +0 -1
- package/dist/esm/actions/watchAccount.js.map +1 -1
- package/dist/esm/actions/watchBlockNumber.js +0 -1
- package/dist/esm/actions/watchBlockNumber.js.map +1 -1
- package/dist/esm/actions/watchBlocks.js +0 -1
- package/dist/esm/actions/watchBlocks.js.map +1 -1
- package/dist/esm/actions/watchChainId.js +0 -1
- package/dist/esm/actions/watchChainId.js.map +1 -1
- package/dist/esm/actions/watchChains.js +0 -2
- package/dist/esm/actions/watchChains.js.map +1 -1
- package/dist/esm/actions/watchClient.js +0 -1
- package/dist/esm/actions/watchClient.js.map +1 -1
- package/dist/esm/actions/watchConnections.js +0 -1
- package/dist/esm/actions/watchConnections.js.map +1 -1
- package/dist/esm/actions/watchConnectors.js +0 -2
- package/dist/esm/actions/watchConnectors.js.map +1 -1
- package/dist/esm/actions/watchContractEvent.js +0 -4
- package/dist/esm/actions/watchContractEvent.js.map +1 -1
- package/dist/esm/actions/watchPendingTransactions.js +0 -1
- package/dist/esm/actions/watchPendingTransactions.js.map +1 -1
- package/dist/esm/actions/watchPublicClient.js +0 -1
- package/dist/esm/actions/watchPublicClient.js.map +1 -1
- package/dist/esm/actions/writeContract.js +0 -4
- package/dist/esm/actions/writeContract.js.map +1 -1
- package/dist/esm/connectors/createConnector.js +0 -4
- package/dist/esm/connectors/createConnector.js.map +1 -1
- package/dist/esm/connectors/injected.js +1 -2
- package/dist/esm/connectors/injected.js.map +1 -1
- package/dist/esm/createConfig.js +17 -20
- package/dist/esm/createConfig.js.map +1 -1
- package/dist/esm/createStorage.js +0 -2
- package/dist/esm/createStorage.js.map +1 -1
- package/dist/esm/errors/base.js.map +1 -1
- package/dist/esm/errors/config.js +16 -1
- package/dist/esm/errors/config.js.map +1 -1
- package/dist/esm/experimental/actions/getCallsStatus.js +0 -1
- package/dist/esm/experimental/actions/getCallsStatus.js.map +1 -1
- package/dist/esm/experimental/actions/getCapabilities.js +0 -1
- package/dist/esm/experimental/actions/getCapabilities.js.map +1 -1
- package/dist/esm/experimental/actions/sendCalls.js +0 -3
- package/dist/esm/experimental/actions/sendCalls.js.map +1 -1
- package/dist/esm/experimental/actions/showCallsStatus.js +0 -1
- package/dist/esm/experimental/actions/showCallsStatus.js.map +1 -1
- package/dist/esm/experimental/actions/writeContracts.js +0 -3
- package/dist/esm/experimental/actions/writeContracts.js.map +1 -1
- package/dist/esm/experimental/query/getCallsStatus.js +0 -2
- package/dist/esm/experimental/query/getCallsStatus.js.map +1 -1
- package/dist/esm/experimental/query/getCapabilities.js +0 -2
- package/dist/esm/experimental/query/getCapabilities.js.map +1 -1
- package/dist/esm/experimental/query/sendCalls.js +0 -2
- package/dist/esm/experimental/query/sendCalls.js.map +1 -1
- package/dist/esm/experimental/query/showCallsStatus.js +0 -2
- package/dist/esm/experimental/query/showCallsStatus.js.map +1 -1
- package/dist/esm/experimental/query/writeContracts.js +0 -2
- package/dist/esm/experimental/query/writeContracts.js.map +1 -1
- package/dist/esm/exports/actions.js +1 -0
- package/dist/esm/exports/actions.js.map +1 -1
- package/dist/esm/exports/chains.js +2 -0
- package/dist/esm/exports/chains.js.map +1 -1
- package/dist/esm/exports/codegen.js +1 -0
- package/dist/esm/exports/codegen.js.map +1 -1
- package/dist/esm/exports/experimental.js +1 -0
- package/dist/esm/exports/experimental.js.map +1 -1
- package/dist/esm/exports/index.js +2 -1
- package/dist/esm/exports/index.js.map +1 -1
- package/dist/esm/exports/internal.js +2 -0
- package/dist/esm/exports/internal.js.map +1 -1
- package/dist/esm/exports/query.js +1 -0
- package/dist/esm/exports/query.js.map +1 -1
- package/dist/esm/query/call.js +0 -2
- package/dist/esm/query/call.js.map +1 -1
- package/dist/esm/query/connect.js +0 -1
- package/dist/esm/query/connect.js.map +1 -1
- package/dist/esm/query/disconnect.js +0 -1
- package/dist/esm/query/disconnect.js.map +1 -1
- package/dist/esm/query/estimateFeesPerGas.js +0 -2
- package/dist/esm/query/estimateFeesPerGas.js.map +1 -1
- package/dist/esm/query/estimateGas.js +0 -2
- package/dist/esm/query/estimateGas.js.map +1 -1
- package/dist/esm/query/estimateMaxPriorityFeePerGas.js +0 -4
- package/dist/esm/query/estimateMaxPriorityFeePerGas.js.map +1 -1
- package/dist/esm/query/getBalance.js +0 -2
- package/dist/esm/query/getBalance.js.map +1 -1
- package/dist/esm/query/getBlock.js +0 -2
- package/dist/esm/query/getBlock.js.map +1 -1
- package/dist/esm/query/getBlockNumber.js +0 -2
- package/dist/esm/query/getBlockNumber.js.map +1 -1
- package/dist/esm/query/getBlockTransactionCount.js +0 -4
- package/dist/esm/query/getBlockTransactionCount.js.map +1 -1
- package/dist/esm/query/getBytecode.js +0 -4
- package/dist/esm/query/getBytecode.js.map +1 -1
- package/dist/esm/query/getConnectorClient.js +0 -2
- package/dist/esm/query/getConnectorClient.js.map +1 -1
- package/dist/esm/query/getEnsAddress.js +0 -2
- package/dist/esm/query/getEnsAddress.js.map +1 -1
- package/dist/esm/query/getEnsAvatar.js +0 -2
- package/dist/esm/query/getEnsAvatar.js.map +1 -1
- package/dist/esm/query/getEnsName.js +0 -2
- package/dist/esm/query/getEnsName.js.map +1 -1
- package/dist/esm/query/getEnsResolver.js +0 -2
- package/dist/esm/query/getEnsResolver.js.map +1 -1
- package/dist/esm/query/getEnsText.js +0 -2
- package/dist/esm/query/getEnsText.js.map +1 -1
- package/dist/esm/query/getFeeHistory.js +0 -3
- package/dist/esm/query/getFeeHistory.js.map +1 -1
- package/dist/esm/query/getGasPrice.js +0 -4
- package/dist/esm/query/getGasPrice.js.map +1 -1
- package/dist/esm/query/getProof.js +0 -4
- package/dist/esm/query/getProof.js.map +1 -1
- package/dist/esm/query/getStorageAt.js +0 -2
- package/dist/esm/query/getStorageAt.js.map +1 -1
- package/dist/esm/query/getToken.js +0 -2
- package/dist/esm/query/getToken.js.map +1 -1
- package/dist/esm/query/getTransaction.js +0 -2
- package/dist/esm/query/getTransaction.js.map +1 -1
- package/dist/esm/query/getTransactionConfirmations.js +0 -4
- package/dist/esm/query/getTransactionConfirmations.js.map +1 -1
- package/dist/esm/query/getTransactionCount.js +0 -2
- package/dist/esm/query/getTransactionCount.js.map +1 -1
- package/dist/esm/query/getTransactionReceipt.js +0 -5
- package/dist/esm/query/getTransactionReceipt.js.map +1 -1
- package/dist/esm/query/getWalletClient.js +0 -2
- package/dist/esm/query/getWalletClient.js.map +1 -1
- package/dist/esm/query/infiniteReadContracts.js +0 -4
- package/dist/esm/query/infiniteReadContracts.js.map +1 -1
- package/dist/esm/query/prepareTransactionRequest.js +0 -5
- package/dist/esm/query/prepareTransactionRequest.js.map +1 -1
- package/dist/esm/query/readContract.js +0 -5
- package/dist/esm/query/readContract.js.map +1 -1
- package/dist/esm/query/readContracts.js +0 -4
- package/dist/esm/query/readContracts.js.map +1 -1
- package/dist/esm/query/reconnect.js +0 -2
- package/dist/esm/query/reconnect.js.map +1 -1
- package/dist/esm/query/sendTransaction.js +0 -2
- package/dist/esm/query/sendTransaction.js.map +1 -1
- package/dist/esm/query/signMessage.js +0 -3
- package/dist/esm/query/signMessage.js.map +1 -1
- package/dist/esm/query/signTypedData.js +0 -2
- package/dist/esm/query/signTypedData.js.map +1 -1
- package/dist/esm/query/simulateContract.js +0 -3
- package/dist/esm/query/simulateContract.js.map +1 -1
- package/dist/esm/query/switchAccount.js +0 -4
- package/dist/esm/query/switchAccount.js.map +1 -1
- package/dist/esm/query/switchChain.js +0 -3
- package/dist/esm/query/switchChain.js.map +1 -1
- package/dist/esm/query/types.js +1 -2
- package/dist/esm/query/types.js.map +1 -1
- package/dist/esm/query/utils.js +4 -7
- package/dist/esm/query/utils.js.map +1 -1
- package/dist/esm/query/verifyMessage.js +0 -2
- package/dist/esm/query/verifyMessage.js.map +1 -1
- package/dist/esm/query/verifyTypedData.js +0 -5
- package/dist/esm/query/verifyTypedData.js.map +1 -1
- package/dist/esm/query/waitForTransactionReceipt.js +0 -4
- package/dist/esm/query/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/query/writeContract.js +0 -4
- package/dist/esm/query/writeContract.js.map +1 -1
- package/dist/esm/transports/fallback.js +0 -1
- package/dist/esm/transports/fallback.js.map +1 -1
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/types/chain.js +1 -3
- 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 +1 -3
- package/dist/esm/utils/cookie.js.map +1 -1
- package/dist/esm/utils/getAction.js +0 -1
- package/dist/esm/utils/getAction.js.map +1 -1
- package/dist/esm/utils/getUnit.js +0 -1
- package/dist/esm/utils/getUnit.js.map +1 -1
- package/dist/esm/utils/loadDefault.js +11 -0
- package/dist/esm/utils/loadDefault.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/actions/call.d.ts +2 -2
- package/dist/types/actions/call.d.ts.map +1 -1
- package/dist/types/actions/codegen/createReadContract.d.ts +3 -3
- package/dist/types/actions/codegen/createReadContract.d.ts.map +1 -1
- package/dist/types/actions/codegen/createSimulateContract.d.ts +5 -5
- package/dist/types/actions/codegen/createSimulateContract.d.ts.map +1 -1
- package/dist/types/actions/codegen/createWatchContractEvent.d.ts +3 -3
- package/dist/types/actions/codegen/createWatchContractEvent.d.ts.map +1 -1
- package/dist/types/actions/codegen/createWriteContract.d.ts +5 -5
- package/dist/types/actions/codegen/createWriteContract.d.ts.map +1 -1
- package/dist/types/actions/connect.d.ts +5 -5
- package/dist/types/actions/connect.d.ts.map +1 -1
- package/dist/types/actions/estimateFeesPerGas.d.ts +4 -4
- package/dist/types/actions/estimateFeesPerGas.d.ts.map +1 -1
- package/dist/types/actions/estimateGas.d.ts +2 -2
- package/dist/types/actions/estimateGas.d.ts.map +1 -1
- package/dist/types/actions/estimateMaxPriorityFeePerGas.d.ts +4 -4
- package/dist/types/actions/estimateMaxPriorityFeePerGas.d.ts.map +1 -1
- package/dist/types/actions/getAccount.d.ts +2 -2
- package/dist/types/actions/getAccount.d.ts.map +1 -1
- package/dist/types/actions/getBalance.d.ts +4 -4
- package/dist/types/actions/getBalance.d.ts.map +1 -1
- package/dist/types/actions/getBlock.d.ts +3 -3
- package/dist/types/actions/getBlock.d.ts.map +1 -1
- package/dist/types/actions/getBlockNumber.d.ts +3 -3
- package/dist/types/actions/getBlockNumber.d.ts.map +1 -1
- package/dist/types/actions/getBlockTransactionCount.d.ts +3 -3
- package/dist/types/actions/getBlockTransactionCount.d.ts.map +1 -1
- package/dist/types/actions/getBytecode.d.ts +3 -3
- package/dist/types/actions/getBytecode.d.ts.map +1 -1
- package/dist/types/actions/getChainId.d.ts +1 -1
- package/dist/types/actions/getChainId.d.ts.map +1 -1
- package/dist/types/actions/getChains.d.ts +2 -2
- package/dist/types/actions/getChains.d.ts.map +1 -1
- package/dist/types/actions/getClient.d.ts +4 -4
- package/dist/types/actions/getClient.d.ts.map +1 -1
- package/dist/types/actions/getConnections.d.ts +1 -1
- package/dist/types/actions/getConnections.d.ts.map +1 -1
- package/dist/types/actions/getConnectorClient.d.ts +3 -3
- package/dist/types/actions/getConnectorClient.d.ts.map +1 -1
- package/dist/types/actions/getEnsAddress.d.ts +3 -3
- package/dist/types/actions/getEnsAddress.d.ts.map +1 -1
- package/dist/types/actions/getEnsAvatar.d.ts +3 -3
- package/dist/types/actions/getEnsAvatar.d.ts.map +1 -1
- package/dist/types/actions/getEnsName.d.ts +3 -3
- package/dist/types/actions/getEnsName.d.ts.map +1 -1
- package/dist/types/actions/getEnsResolver.d.ts +3 -3
- package/dist/types/actions/getEnsResolver.d.ts.map +1 -1
- package/dist/types/actions/getEnsText.d.ts +3 -3
- package/dist/types/actions/getEnsText.d.ts.map +1 -1
- package/dist/types/actions/getFeeHistory.d.ts +3 -3
- package/dist/types/actions/getFeeHistory.d.ts.map +1 -1
- package/dist/types/actions/getGasPrice.d.ts +3 -3
- package/dist/types/actions/getGasPrice.d.ts.map +1 -1
- package/dist/types/actions/getProof.d.ts +3 -3
- package/dist/types/actions/getProof.d.ts.map +1 -1
- package/dist/types/actions/getPublicClient.d.ts +3 -3
- package/dist/types/actions/getPublicClient.d.ts.map +1 -1
- package/dist/types/actions/getStorageAt.d.ts +3 -3
- package/dist/types/actions/getStorageAt.d.ts.map +1 -1
- package/dist/types/actions/getToken.d.ts +4 -4
- package/dist/types/actions/getToken.d.ts.map +1 -1
- package/dist/types/actions/getTransaction.d.ts +3 -3
- package/dist/types/actions/getTransaction.d.ts.map +1 -1
- package/dist/types/actions/getTransactionConfirmations.d.ts +4 -4
- package/dist/types/actions/getTransactionConfirmations.d.ts.map +1 -1
- package/dist/types/actions/getTransactionCount.d.ts +3 -3
- package/dist/types/actions/getTransactionCount.d.ts.map +1 -1
- package/dist/types/actions/getTransactionReceipt.d.ts +4 -4
- package/dist/types/actions/getTransactionReceipt.d.ts.map +1 -1
- package/dist/types/actions/getWalletClient.d.ts +2 -2
- package/dist/types/actions/getWalletClient.d.ts.map +1 -1
- package/dist/types/actions/multicall.d.ts +2 -2
- package/dist/types/actions/multicall.d.ts.map +1 -1
- package/dist/types/actions/prepareTransactionRequest.d.ts +5 -5
- package/dist/types/actions/prepareTransactionRequest.d.ts.map +1 -1
- package/dist/types/actions/readContract.d.ts +3 -3
- package/dist/types/actions/readContract.d.ts.map +1 -1
- package/dist/types/actions/readContracts.d.ts +2 -2
- package/dist/types/actions/readContracts.d.ts.map +1 -1
- package/dist/types/actions/reconnect.d.ts +2 -2
- package/dist/types/actions/reconnect.d.ts.map +1 -1
- package/dist/types/actions/sendTransaction.d.ts +4 -6
- package/dist/types/actions/sendTransaction.d.ts.map +1 -1
- package/dist/types/actions/signMessage.d.ts +5 -5
- package/dist/types/actions/signMessage.d.ts.map +1 -1
- package/dist/types/actions/signTypedData.d.ts +1 -1
- package/dist/types/actions/signTypedData.d.ts.map +1 -1
- package/dist/types/actions/simulateContract.d.ts +4 -4
- package/dist/types/actions/simulateContract.d.ts.map +1 -1
- package/dist/types/actions/switchAccount.d.ts +2 -2
- package/dist/types/actions/switchAccount.d.ts.map +1 -1
- package/dist/types/actions/switchChain.d.ts +3 -3
- package/dist/types/actions/switchChain.d.ts.map +1 -1
- package/dist/types/actions/verifyMessage.d.ts +3 -3
- package/dist/types/actions/verifyMessage.d.ts.map +1 -1
- package/dist/types/actions/verifyTypedData.d.ts +4 -4
- package/dist/types/actions/verifyTypedData.d.ts.map +1 -1
- package/dist/types/actions/waitForTransactionReceipt.d.ts +5 -5
- package/dist/types/actions/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/actions/watchAccount.d.ts +4 -4
- 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 +1 -1
- package/dist/types/actions/watchBlocks.d.ts.map +1 -1
- package/dist/types/actions/watchChainId.d.ts +1 -1
- package/dist/types/actions/watchChainId.d.ts.map +1 -1
- package/dist/types/actions/watchChains.d.ts +2 -2
- package/dist/types/actions/watchChains.d.ts.map +1 -1
- package/dist/types/actions/watchClient.d.ts +1 -1
- package/dist/types/actions/watchClient.d.ts.map +1 -1
- package/dist/types/actions/watchConnections.d.ts +1 -1
- package/dist/types/actions/watchConnections.d.ts.map +1 -1
- package/dist/types/actions/watchConnectors.d.ts +2 -2
- package/dist/types/actions/watchConnectors.d.ts.map +1 -1
- package/dist/types/actions/watchContractEvent.d.ts +4 -4
- package/dist/types/actions/watchContractEvent.d.ts.map +1 -1
- package/dist/types/actions/watchPendingTransactions.d.ts +1 -1
- package/dist/types/actions/watchPendingTransactions.d.ts.map +1 -1
- package/dist/types/actions/watchPublicClient.d.ts +1 -1
- package/dist/types/actions/watchPublicClient.d.ts.map +1 -1
- package/dist/types/actions/writeContract.d.ts +4 -4
- package/dist/types/actions/writeContract.d.ts.map +1 -1
- package/dist/types/connectors/createConnector.d.ts +6 -6
- package/dist/types/connectors/createConnector.d.ts.map +1 -1
- package/dist/types/connectors/injected.d.ts +1 -1
- package/dist/types/connectors/injected.d.ts.map +1 -1
- package/dist/types/connectors/mock.d.ts +2 -2
- package/dist/types/connectors/mock.d.ts.map +1 -1
- package/dist/types/createConfig.d.ts +2 -2
- 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/config.d.ts +11 -1
- package/dist/types/errors/config.d.ts.map +1 -1
- package/dist/types/experimental/actions/getCallsStatus.d.ts +1 -1
- package/dist/types/experimental/actions/getCallsStatus.d.ts.map +1 -1
- package/dist/types/experimental/actions/getCapabilities.d.ts +1 -1
- package/dist/types/experimental/actions/getCapabilities.d.ts.map +1 -1
- package/dist/types/experimental/actions/sendCalls.d.ts +3 -3
- package/dist/types/experimental/actions/sendCalls.d.ts.map +1 -1
- package/dist/types/experimental/actions/showCallsStatus.d.ts +1 -1
- package/dist/types/experimental/actions/showCallsStatus.d.ts.map +1 -1
- package/dist/types/experimental/actions/writeContracts.d.ts +3 -3
- package/dist/types/experimental/actions/writeContracts.d.ts.map +1 -1
- package/dist/types/experimental/query/getCallsStatus.d.ts +1 -1
- package/dist/types/experimental/query/getCallsStatus.d.ts.map +1 -1
- package/dist/types/experimental/query/getCapabilities.d.ts +1 -1
- package/dist/types/experimental/query/getCapabilities.d.ts.map +1 -1
- package/dist/types/experimental/query/sendCalls.d.ts +2 -2
- package/dist/types/experimental/query/sendCalls.d.ts.map +1 -1
- package/dist/types/experimental/query/showCallsStatus.d.ts +2 -2
- package/dist/types/experimental/query/showCallsStatus.d.ts.map +1 -1
- package/dist/types/experimental/query/writeContracts.d.ts +2 -2
- package/dist/types/experimental/query/writeContracts.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/types/exports/experimental.d.ts.map +1 -1
- package/dist/types/exports/index.d.ts +1 -1
- package/dist/types/exports/index.d.ts.map +1 -1
- package/dist/types/exports/internal.d.ts +1 -0
- package/dist/types/exports/internal.d.ts.map +1 -1
- package/dist/types/exports/query.d.ts.map +1 -1
- package/dist/types/query/call.d.ts +1 -1
- package/dist/types/query/call.d.ts.map +1 -1
- package/dist/types/query/connect.d.ts +1 -1
- package/dist/types/query/connect.d.ts.map +1 -1
- package/dist/types/query/disconnect.d.ts +1 -1
- package/dist/types/query/disconnect.d.ts.map +1 -1
- package/dist/types/query/estimateFeesPerGas.d.ts +1 -1
- package/dist/types/query/estimateFeesPerGas.d.ts.map +1 -1
- package/dist/types/query/estimateGas.d.ts +1 -1
- package/dist/types/query/estimateGas.d.ts.map +1 -1
- package/dist/types/query/estimateMaxPriorityFeePerGas.d.ts +3 -3
- package/dist/types/query/estimateMaxPriorityFeePerGas.d.ts.map +1 -1
- package/dist/types/query/getBalance.d.ts +1 -1
- package/dist/types/query/getBalance.d.ts.map +1 -1
- package/dist/types/query/getBlock.d.ts +1 -1
- package/dist/types/query/getBlock.d.ts.map +1 -1
- package/dist/types/query/getBlockNumber.d.ts +1 -1
- package/dist/types/query/getBlockNumber.d.ts.map +1 -1
- package/dist/types/query/getBlockTransactionCount.d.ts +3 -3
- package/dist/types/query/getBlockTransactionCount.d.ts.map +1 -1
- package/dist/types/query/getBytecode.d.ts +3 -3
- package/dist/types/query/getBytecode.d.ts.map +1 -1
- package/dist/types/query/getConnectorClient.d.ts +1 -1
- package/dist/types/query/getConnectorClient.d.ts.map +1 -1
- package/dist/types/query/getEnsAddress.d.ts +1 -1
- package/dist/types/query/getEnsAddress.d.ts.map +1 -1
- package/dist/types/query/getEnsAvatar.d.ts +1 -1
- package/dist/types/query/getEnsAvatar.d.ts.map +1 -1
- package/dist/types/query/getEnsName.d.ts +1 -1
- package/dist/types/query/getEnsName.d.ts.map +1 -1
- package/dist/types/query/getEnsResolver.d.ts +1 -1
- package/dist/types/query/getEnsResolver.d.ts.map +1 -1
- package/dist/types/query/getEnsText.d.ts +1 -1
- package/dist/types/query/getEnsText.d.ts.map +1 -1
- package/dist/types/query/getFeeHistory.d.ts +2 -2
- package/dist/types/query/getFeeHistory.d.ts.map +1 -1
- package/dist/types/query/getGasPrice.d.ts +3 -3
- package/dist/types/query/getGasPrice.d.ts.map +1 -1
- package/dist/types/query/getProof.d.ts +3 -3
- package/dist/types/query/getProof.d.ts.map +1 -1
- package/dist/types/query/getStorageAt.d.ts +1 -1
- package/dist/types/query/getStorageAt.d.ts.map +1 -1
- package/dist/types/query/getToken.d.ts +1 -1
- package/dist/types/query/getToken.d.ts.map +1 -1
- package/dist/types/query/getTransaction.d.ts +1 -1
- package/dist/types/query/getTransaction.d.ts.map +1 -1
- package/dist/types/query/getTransactionConfirmations.d.ts +3 -3
- package/dist/types/query/getTransactionConfirmations.d.ts.map +1 -1
- package/dist/types/query/getTransactionCount.d.ts +1 -1
- package/dist/types/query/getTransactionCount.d.ts.map +1 -1
- package/dist/types/query/getTransactionReceipt.d.ts +4 -4
- package/dist/types/query/getTransactionReceipt.d.ts.map +1 -1
- package/dist/types/query/getWalletClient.d.ts +1 -1
- package/dist/types/query/getWalletClient.d.ts.map +1 -1
- package/dist/types/query/infiniteReadContracts.d.ts +3 -3
- package/dist/types/query/infiniteReadContracts.d.ts.map +1 -1
- package/dist/types/query/prepareTransactionRequest.d.ts +4 -4
- package/dist/types/query/prepareTransactionRequest.d.ts.map +1 -1
- package/dist/types/query/readContract.d.ts +4 -4
- package/dist/types/query/readContract.d.ts.map +1 -1
- package/dist/types/query/readContracts.d.ts +3 -3
- package/dist/types/query/readContracts.d.ts.map +1 -1
- package/dist/types/query/reconnect.d.ts +2 -2
- package/dist/types/query/reconnect.d.ts.map +1 -1
- package/dist/types/query/sendTransaction.d.ts +2 -2
- 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 +2 -2
- package/dist/types/query/signTypedData.d.ts.map +1 -1
- package/dist/types/query/simulateContract.d.ts +2 -2
- package/dist/types/query/simulateContract.d.ts.map +1 -1
- package/dist/types/query/switchAccount.d.ts +3 -3
- package/dist/types/query/switchAccount.d.ts.map +1 -1
- package/dist/types/query/switchChain.d.ts +3 -3
- package/dist/types/query/switchChain.d.ts.map +1 -1
- package/dist/types/query/types.d.ts +3 -2
- package/dist/types/query/types.d.ts.map +1 -1
- package/dist/types/query/utils.d.ts.map +1 -1
- package/dist/types/query/verifyMessage.d.ts +1 -1
- package/dist/types/query/verifyMessage.d.ts.map +1 -1
- package/dist/types/query/verifyTypedData.d.ts +4 -4
- package/dist/types/query/verifyTypedData.d.ts.map +1 -1
- package/dist/types/query/waitForTransactionReceipt.d.ts +3 -3
- package/dist/types/query/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/query/writeContract.d.ts +4 -4
- package/dist/types/query/writeContract.d.ts.map +1 -1
- package/dist/types/transports/fallback.d.ts +1 -1
- package/dist/types/transports/fallback.d.ts.map +1 -1
- 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 +1 -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.map +1 -1
- package/dist/types/utils/cookie.d.ts +1 -1
- package/dist/types/utils/cookie.d.ts.map +1 -1
- package/dist/types/utils/getAction.d.ts +1 -1
- package/dist/types/utils/getAction.d.ts.map +1 -1
- package/dist/types/utils/getUnit.d.ts +1 -1
- package/dist/types/utils/getUnit.d.ts.map +1 -1
- package/dist/types/utils/loadDefault.d.ts +4 -0
- package/dist/types/utils/loadDefault.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/actions/call.ts +3 -3
- package/src/actions/codegen/createReadContract.ts +7 -7
- package/src/actions/codegen/createSimulateContract.ts +14 -14
- package/src/actions/codegen/createWatchContractEvent.ts +5 -4
- package/src/actions/codegen/createWriteContract.ts +15 -19
- package/src/actions/connect.ts +8 -8
- package/src/actions/estimateFeesPerGas.ts +4 -4
- package/src/actions/estimateGas.ts +2 -2
- package/src/actions/estimateMaxPriorityFeePerGas.ts +8 -6
- package/src/actions/getAccount.ts +2 -2
- package/src/actions/getBalance.ts +4 -4
- package/src/actions/getBlock.ts +6 -5
- package/src/actions/getBlockNumber.ts +7 -5
- package/src/actions/getBlockTransactionCount.ts +7 -5
- package/src/actions/getBytecode.ts +3 -3
- package/src/actions/getChainId.ts +1 -1
- package/src/actions/getChains.ts +2 -2
- package/src/actions/getClient.ts +4 -4
- package/src/actions/getConnections.ts +1 -1
- package/src/actions/getConnectorClient.ts +18 -5
- package/src/actions/getEnsAddress.ts +3 -3
- package/src/actions/getEnsAvatar.ts +3 -3
- package/src/actions/getEnsName.ts +3 -3
- package/src/actions/getEnsResolver.ts +3 -3
- package/src/actions/getEnsText.ts +3 -3
- package/src/actions/getFeeHistory.ts +7 -5
- package/src/actions/getGasPrice.ts +7 -5
- package/src/actions/getProof.ts +3 -3
- package/src/actions/getPublicClient.ts +3 -3
- package/src/actions/getStorageAt.ts +3 -3
- package/src/actions/getToken.ts +4 -4
- package/src/actions/getTransaction.ts +7 -5
- package/src/actions/getTransactionConfirmations.ts +4 -4
- package/src/actions/getTransactionCount.ts +3 -3
- package/src/actions/getTransactionReceipt.ts +8 -6
- package/src/actions/getWalletClient.ts +6 -4
- package/src/actions/multicall.ts +2 -2
- package/src/actions/prepareTransactionRequest.ts +16 -16
- package/src/actions/readContract.ts +3 -3
- package/src/actions/readContracts.ts +14 -18
- package/src/actions/reconnect.ts +8 -8
- package/src/actions/sendTransaction.ts +8 -9
- package/src/actions/signMessage.ts +6 -6
- package/src/actions/signTypedData.ts +3 -3
- package/src/actions/simulateContract.ts +6 -6
- package/src/actions/switchAccount.ts +2 -2
- package/src/actions/switchChain.ts +10 -8
- package/src/actions/verifyMessage.ts +3 -3
- package/src/actions/verifyTypedData.ts +4 -4
- package/src/actions/waitForTransactionReceipt.ts +11 -9
- package/src/actions/watchAccount.ts +7 -7
- package/src/actions/watchBlockNumber.ts +7 -4
- package/src/actions/watchBlocks.ts +7 -4
- package/src/actions/watchChainId.ts +1 -1
- package/src/actions/watchChains.ts +2 -2
- package/src/actions/watchClient.ts +3 -2
- package/src/actions/watchConnections.ts +1 -1
- package/src/actions/watchConnectors.ts +2 -2
- package/src/actions/watchContractEvent.ts +10 -8
- package/src/actions/watchPendingTransactions.ts +5 -3
- package/src/actions/watchPublicClient.ts +3 -2
- package/src/actions/writeContract.ts +12 -10
- package/src/connectors/createConnector.ts +14 -14
- package/src/connectors/injected.ts +6 -6
- package/src/connectors/mock.ts +1 -1
- package/src/createConfig.ts +21 -22
- package/src/createStorage.ts +4 -4
- package/src/errors/base.ts +2 -2
- package/src/errors/config.ts +25 -1
- package/src/experimental/actions/getCallsStatus.ts +1 -1
- package/src/experimental/actions/getCapabilities.ts +1 -1
- package/src/experimental/actions/sendCalls.ts +5 -4
- package/src/experimental/actions/showCallsStatus.ts +1 -1
- package/src/experimental/actions/writeContracts.ts +5 -4
- package/src/experimental/query/getCallsStatus.ts +3 -3
- package/src/experimental/query/getCapabilities.ts +3 -3
- package/src/experimental/query/sendCalls.ts +2 -2
- package/src/experimental/query/showCallsStatus.ts +3 -3
- package/src/experimental/query/writeContracts.ts +4 -4
- package/src/exports/actions.ts +1 -0
- package/src/exports/chains.ts +2 -0
- package/src/exports/codegen.ts +1 -0
- package/src/exports/experimental.ts +1 -0
- package/src/exports/index.ts +3 -0
- package/src/exports/internal.ts +3 -0
- package/src/exports/query.ts +1 -0
- package/src/query/call.ts +2 -2
- package/src/query/connect.ts +1 -1
- package/src/query/disconnect.ts +1 -1
- package/src/query/estimateFeesPerGas.ts +3 -3
- package/src/query/estimateGas.ts +2 -2
- package/src/query/estimateMaxPriorityFeePerGas.ts +7 -7
- package/src/query/getBalance.ts +2 -2
- package/src/query/getBlock.ts +3 -3
- package/src/query/getBlockNumber.ts +2 -2
- package/src/query/getBlockTransactionCount.ts +4 -4
- package/src/query/getBytecode.ts +4 -4
- package/src/query/getConnectorClient.ts +2 -2
- package/src/query/getEnsAddress.ts +2 -2
- package/src/query/getEnsAvatar.ts +2 -2
- package/src/query/getEnsName.ts +2 -2
- package/src/query/getEnsResolver.ts +2 -2
- package/src/query/getEnsText.ts +2 -2
- package/src/query/getFeeHistory.ts +3 -3
- package/src/query/getGasPrice.ts +4 -4
- package/src/query/getProof.ts +4 -4
- package/src/query/getStorageAt.ts +2 -2
- package/src/query/getToken.ts +2 -2
- package/src/query/getTransaction.ts +2 -2
- package/src/query/getTransactionConfirmations.ts +4 -4
- package/src/query/getTransactionCount.ts +2 -2
- package/src/query/getTransactionReceipt.ts +5 -5
- package/src/query/getWalletClient.ts +2 -2
- package/src/query/infiniteReadContracts.ts +6 -6
- package/src/query/prepareTransactionRequest.ts +5 -5
- package/src/query/readContract.ts +5 -9
- package/src/query/readContracts.ts +6 -6
- package/src/query/reconnect.ts +2 -2
- package/src/query/sendTransaction.ts +2 -2
- package/src/query/signMessage.ts +3 -3
- package/src/query/signTypedData.ts +2 -2
- package/src/query/simulateContract.ts +3 -7
- package/src/query/switchAccount.ts +4 -4
- package/src/query/switchChain.ts +3 -3
- package/src/query/types.ts +13 -7
- package/src/query/utils.ts +4 -7
- package/src/query/verifyMessage.ts +2 -2
- package/src/query/verifyTypedData.ts +5 -5
- package/src/query/waitForTransactionReceipt.ts +4 -4
- package/src/query/writeContract.ts +4 -8
- package/src/transports/fallback.ts +1 -1
- package/src/types/chain.ts +8 -8
- package/src/types/properties.ts +1 -1
- package/src/types/register.ts +2 -1
- package/src/types/utils.ts +7 -6
- package/src/utils/cookie.ts +3 -3
- package/src/utils/getAction.ts +8 -8
- package/src/utils/getUnit.ts +1 -1
- package/src/utils/loadDefault.ts +12 -0
- package/src/version.ts +1 -1
|
@@ -2,6 +2,7 @@ import type {
|
|
|
2
2
|
Abi,
|
|
3
3
|
Account,
|
|
4
4
|
Chain,
|
|
5
|
+
Client,
|
|
5
6
|
ContractFunctionArgs,
|
|
6
7
|
ContractFunctionName,
|
|
7
8
|
} from 'viem'
|
|
@@ -12,12 +13,12 @@ import {
|
|
|
12
13
|
writeContract as viem_writeContract,
|
|
13
14
|
} from 'viem/actions'
|
|
14
15
|
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
import type { Config } from '../createConfig.js'
|
|
17
|
+
import type { BaseErrorType, ErrorType } from '../errors/base.js'
|
|
18
|
+
import type { SelectChains } from '../types/chain.js'
|
|
19
|
+
import type {
|
|
20
|
+
ChainIdParameter,
|
|
21
|
+
ConnectorParameter,
|
|
21
22
|
} from '../types/properties.js'
|
|
22
23
|
import type { Evaluate, UnionEvaluate } from '../types/utils.js'
|
|
23
24
|
import { getAction } from '../utils/getAction.js'
|
|
@@ -43,7 +44,8 @@ export type WriteContractParameters<
|
|
|
43
44
|
functionName
|
|
44
45
|
> = ContractFunctionArgs<abi, 'nonpayable' | 'payable', functionName>,
|
|
45
46
|
config extends Config = Config,
|
|
46
|
-
chainId extends
|
|
47
|
+
chainId extends
|
|
48
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
47
49
|
///
|
|
48
50
|
allFunctionNames = ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
|
49
51
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
@@ -95,7 +97,7 @@ export async function writeContract<
|
|
|
95
97
|
): Promise<WriteContractReturnType> {
|
|
96
98
|
const { account, chainId, connector, __mode, ...rest } = parameters
|
|
97
99
|
|
|
98
|
-
let client
|
|
100
|
+
let client: Client
|
|
99
101
|
if (typeof account === 'object' && account.type === 'local')
|
|
100
102
|
client = config.getClient({ chainId })
|
|
101
103
|
else
|
|
@@ -103,7 +105,7 @@ export async function writeContract<
|
|
|
103
105
|
|
|
104
106
|
const { connector: activeConnector } = getAccount(config)
|
|
105
107
|
|
|
106
|
-
let request
|
|
108
|
+
let request: any
|
|
107
109
|
if (__mode === 'prepared' || activeConnector?.supportsSimulation)
|
|
108
110
|
request = rest
|
|
109
111
|
else {
|
|
@@ -117,7 +119,7 @@ export async function writeContract<
|
|
|
117
119
|
|
|
118
120
|
const action = getAction(client, viem_writeContract, 'writeContract')
|
|
119
121
|
const hash = await action({
|
|
120
|
-
...
|
|
122
|
+
...request,
|
|
121
123
|
...(account ? { account } : {}),
|
|
122
124
|
chain: chainId ? { id: chainId } : null,
|
|
123
125
|
})
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type {
|
|
2
|
+
AddEthereumChainParameter,
|
|
3
|
+
Address,
|
|
4
|
+
Chain,
|
|
5
|
+
Client,
|
|
6
|
+
ProviderConnectInfo,
|
|
7
|
+
ProviderMessage,
|
|
8
8
|
} from 'viem'
|
|
9
9
|
|
|
10
|
-
import { Emitter } from '../createEmitter.js'
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import type { Emitter } from '../createEmitter.js'
|
|
11
|
+
import type { Storage } from '../createStorage.js'
|
|
12
|
+
import type { Evaluate, ExactPartial, Omit } from '../types/utils.js'
|
|
13
13
|
|
|
14
14
|
export type ConnectorEventMap = {
|
|
15
15
|
change: {
|
|
@@ -24,8 +24,8 @@ export type ConnectorEventMap = {
|
|
|
24
24
|
|
|
25
25
|
export type CreateConnectorFn<
|
|
26
26
|
provider = unknown,
|
|
27
|
-
properties extends Record<string, unknown> =
|
|
28
|
-
storageItem extends Record<string, unknown> =
|
|
27
|
+
properties extends Record<string, unknown> = Record<string, unknown>,
|
|
28
|
+
storageItem extends Record<string, unknown> = Record<string, unknown>,
|
|
29
29
|
> = (config: {
|
|
30
30
|
chains: readonly [Chain, ...Chain[]]
|
|
31
31
|
emitter: Emitter<ConnectorEventMap>
|
|
@@ -76,8 +76,8 @@ export type CreateConnectorFn<
|
|
|
76
76
|
|
|
77
77
|
export function createConnector<
|
|
78
78
|
provider,
|
|
79
|
-
properties extends Record<string, unknown> =
|
|
80
|
-
storageItem extends Record<string, unknown> =
|
|
79
|
+
properties extends Record<string, unknown> = Record<string, unknown>,
|
|
80
|
+
storageItem extends Record<string, unknown> = Record<string, unknown>,
|
|
81
81
|
>(createConnectorFn: CreateConnectorFn<provider, properties, storageItem>) {
|
|
82
82
|
return createConnectorFn
|
|
83
83
|
}
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
type Address,
|
|
4
4
|
type EIP1193Provider,
|
|
5
5
|
type ProviderConnectInfo,
|
|
6
|
-
ProviderRpcError,
|
|
6
|
+
type ProviderRpcError,
|
|
7
7
|
ResourceUnavailableRpcError,
|
|
8
|
-
RpcError,
|
|
8
|
+
type RpcError,
|
|
9
9
|
SwitchChainError,
|
|
10
10
|
UserRejectedRequestError,
|
|
11
11
|
getAddress,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import type { Connector } from '../createConfig.js'
|
|
18
18
|
import { ChainNotConfiguredError } from '../errors/config.js'
|
|
19
19
|
import { ProviderNotFoundError } from '../errors/connector.js'
|
|
20
|
-
import {
|
|
20
|
+
import type { Evaluate } from '../types/utils.js'
|
|
21
21
|
import { createConnector } from './createConnector.js'
|
|
22
22
|
|
|
23
23
|
export type InjectedParameters = {
|
|
@@ -303,7 +303,7 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
303
303
|
async getProvider() {
|
|
304
304
|
if (typeof window === 'undefined') return undefined
|
|
305
305
|
|
|
306
|
-
let provider
|
|
306
|
+
let provider: Provider
|
|
307
307
|
const target = getTarget()
|
|
308
308
|
if (typeof target.provider === 'function')
|
|
309
309
|
provider = target.provider(window as Window | undefined)
|
|
@@ -440,7 +440,7 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
440
440
|
try {
|
|
441
441
|
const { default: blockExplorer, ...blockExplorers } =
|
|
442
442
|
chain.blockExplorers ?? {}
|
|
443
|
-
let blockExplorerUrls
|
|
443
|
+
let blockExplorerUrls: string[] | undefined
|
|
444
444
|
if (addEthereumChainParameter?.blockExplorerUrls)
|
|
445
445
|
blockExplorerUrls = addEthereumChainParameter.blockExplorerUrls
|
|
446
446
|
else if (blockExplorer)
|
|
@@ -449,7 +449,7 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
449
449
|
...Object.values(blockExplorers).map((x) => x.url),
|
|
450
450
|
]
|
|
451
451
|
|
|
452
|
-
let rpcUrls
|
|
452
|
+
let rpcUrls: readonly string[]
|
|
453
453
|
if (addEthereumChainParameter?.rpcUrls?.length)
|
|
454
454
|
rpcUrls = addEthereumChainParameter.rpcUrls
|
|
455
455
|
else rpcUrls = [chain.rpcUrls.default?.http[0] ?? '']
|
package/src/connectors/mock.ts
CHANGED
|
@@ -42,7 +42,7 @@ export function mock(parameters: MockParameters) {
|
|
|
42
42
|
const features = parameters.features ?? {}
|
|
43
43
|
|
|
44
44
|
type Provider = ReturnType<
|
|
45
|
-
Transport<'custom',
|
|
45
|
+
Transport<'custom', unknown, EIP1193RequestFn<WalletRpcSchema>>
|
|
46
46
|
>
|
|
47
47
|
let connected = false
|
|
48
48
|
let connectedChainId: number
|
package/src/createConfig.ts
CHANGED
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
type Address,
|
|
8
8
|
type Chain,
|
|
9
9
|
type Client,
|
|
10
|
+
createClient,
|
|
10
11
|
type ClientConfig as viem_ClientConfig,
|
|
11
12
|
type Transport as viem_Transport,
|
|
12
|
-
createClient,
|
|
13
13
|
} from 'viem'
|
|
14
14
|
import { persist, subscribeWithSelector } from 'zustand/middleware'
|
|
15
15
|
import { type Mutate, type StoreApi, createStore } from 'zustand/vanilla'
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
import type {
|
|
18
|
+
ConnectorEventMap,
|
|
19
|
+
CreateConnectorFn,
|
|
20
20
|
} from './connectors/createConnector.js'
|
|
21
21
|
import { injected } from './connectors/injected.js'
|
|
22
|
-
import { Emitter, type EventData, createEmitter } from './createEmitter.js'
|
|
22
|
+
import { type Emitter, type EventData, createEmitter } from './createEmitter.js'
|
|
23
23
|
import { type Storage, createStorage, noopStorage } from './createStorage.js'
|
|
24
24
|
import { ChainNotConfiguredError } from './errors/config.js'
|
|
25
25
|
import type { Evaluate, ExactPartial, LooseOmit, OneOf } from './types/utils.js'
|
|
@@ -130,7 +130,7 @@ export function createConfig<
|
|
|
130
130
|
{
|
|
131
131
|
const client = clients.get(store.getState().chainId)
|
|
132
132
|
if (client && !chain) return client as Return
|
|
133
|
-
|
|
133
|
+
if (!chain) throw new ChainNotConfiguredError()
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
// If a memoized client exists for a chain id, use that.
|
|
@@ -139,7 +139,7 @@ export function createConfig<
|
|
|
139
139
|
if (client) return client as Return
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
let client
|
|
142
|
+
let client: Client<Transport, chains[number]>
|
|
143
143
|
if (rest.client) client = rest.client({ chain })
|
|
144
144
|
else {
|
|
145
145
|
const chainId = chain.id as chains[number]['id']
|
|
@@ -156,19 +156,18 @@ export function createConfig<
|
|
|
156
156
|
key === 'transports'
|
|
157
157
|
)
|
|
158
158
|
continue
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
159
|
+
|
|
160
|
+
if (typeof value === 'object') {
|
|
161
|
+
// check if value is chainId-specific since some values can be objects
|
|
162
|
+
// e.g. { batch: { multicall: { batchSize: 1024 } } }
|
|
163
|
+
if (chainId in value) properties[key] = value[chainId]
|
|
164
|
+
else {
|
|
165
|
+
// check if value is chainId-specific, but does not have value for current chainId
|
|
166
|
+
const hasChainSpecificValue = chainIds.some((x) => x in value)
|
|
167
|
+
if (hasChainSpecificValue) continue
|
|
168
|
+
properties[key] = value
|
|
169
|
+
}
|
|
170
|
+
} else properties[key] = value
|
|
172
171
|
}
|
|
173
172
|
|
|
174
173
|
client = createClient({
|
|
@@ -200,8 +199,8 @@ export function createConfig<
|
|
|
200
199
|
let currentVersion: number
|
|
201
200
|
const prefix = '0.0.0-canary-'
|
|
202
201
|
if (version.startsWith(prefix))
|
|
203
|
-
currentVersion = parseInt(version.replace(prefix, ''))
|
|
204
|
-
else currentVersion = parseInt(version.split('.')[0] ?? '0')
|
|
202
|
+
currentVersion = Number.parseInt(version.replace(prefix, ''))
|
|
203
|
+
else currentVersion = Number.parseInt(version.split('.')[0] ?? '0')
|
|
205
204
|
|
|
206
205
|
const store = createStore(
|
|
207
206
|
subscribeWithSelector(
|
package/src/createStorage.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { PartializedState } from './createConfig.js'
|
|
2
|
+
import type { Evaluate } from './types/utils.js'
|
|
3
3
|
import { deserialize as deserialize_ } from './utils/deserialize.js'
|
|
4
4
|
import { serialize as serialize_ } from './utils/serialize.js'
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ export type StorageItemMap = {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export type Storage<
|
|
13
|
-
itemMap extends Record<string, unknown> =
|
|
13
|
+
itemMap extends Record<string, unknown> = Record<string, unknown>,
|
|
14
14
|
///
|
|
15
15
|
storageItemMap extends StorageItemMap = StorageItemMap & itemMap,
|
|
16
16
|
> = {
|
|
@@ -48,7 +48,7 @@ export type CreateStorageParameters = {
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
export function createStorage<
|
|
51
|
-
itemMap extends Record<string, unknown> =
|
|
51
|
+
itemMap extends Record<string, unknown> = Record<string, unknown>,
|
|
52
52
|
storageItemMap extends StorageItemMap = StorageItemMap & itemMap,
|
|
53
53
|
>(parameters: CreateStorageParameters): Evaluate<Storage<storageItemMap>> {
|
|
54
54
|
const {
|
package/src/errors/base.ts
CHANGED
|
@@ -33,8 +33,8 @@ export class BaseError extends Error {
|
|
|
33
33
|
options.cause instanceof BaseError
|
|
34
34
|
? options.cause.details
|
|
35
35
|
: options.cause?.message
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
? options.cause.message
|
|
37
|
+
: options.details!
|
|
38
38
|
const docsPath =
|
|
39
39
|
options.cause instanceof BaseError
|
|
40
40
|
? options.cause.docsPath || options.docsPath
|
package/src/errors/config.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Address } from 'viem'
|
|
2
2
|
|
|
3
3
|
import type { Connector } from '../createConfig.js'
|
|
4
4
|
import { BaseError } from './base.js'
|
|
@@ -60,3 +60,27 @@ export class ConnectorAccountNotFoundError extends BaseError {
|
|
|
60
60
|
super(`Account "${address}" not found for connector "${connector.name}".`)
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
export type ConnectorChainMismatchErrorType = ConnectorAccountNotFoundError & {
|
|
65
|
+
name: 'ConnectorChainMismatchError'
|
|
66
|
+
}
|
|
67
|
+
export class ConnectorChainMismatchError extends BaseError {
|
|
68
|
+
override name = 'ConnectorChainMismatchError'
|
|
69
|
+
constructor({
|
|
70
|
+
connectionChainId,
|
|
71
|
+
connectorChainId,
|
|
72
|
+
}: {
|
|
73
|
+
connectionChainId: number
|
|
74
|
+
connectorChainId: number
|
|
75
|
+
}) {
|
|
76
|
+
super(
|
|
77
|
+
`The current chain of the connector (id: ${connectorChainId}) does not match the connection's chain (id: ${connectionChainId}).`,
|
|
78
|
+
{
|
|
79
|
+
metaMessages: [
|
|
80
|
+
`Current Chain ID: ${connectorChainId}`,
|
|
81
|
+
`Expected Chain ID: ${connectionChainId}`,
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from 'viem/experimental'
|
|
7
7
|
|
|
8
8
|
import { getConnectorClient } from '../../actions/getConnectorClient.js'
|
|
9
|
-
import {
|
|
9
|
+
import type { Config } from '../../createConfig.js'
|
|
10
10
|
import type { ConnectorParameter } from '../../types/properties.js'
|
|
11
11
|
|
|
12
12
|
export type GetCallsStatusParameters = viem_GetCallsStatusParameters &
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from 'viem/experimental'
|
|
8
8
|
|
|
9
9
|
import { getConnectorClient } from '../../actions/getConnectorClient.js'
|
|
10
|
-
import {
|
|
10
|
+
import type { Config } from '../../createConfig.js'
|
|
11
11
|
import type { ConnectorParameter } from '../../types/properties.js'
|
|
12
12
|
|
|
13
13
|
export type GetCapabilitiesParameters =
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Account, Chain } from 'viem'
|
|
2
2
|
import {
|
|
3
3
|
type SendCallsErrorType as viem_SendCallsErrorType,
|
|
4
4
|
type SendCallsParameters as viem_SendCallsParameters,
|
|
@@ -10,18 +10,19 @@ import {
|
|
|
10
10
|
type GetConnectorClientErrorType,
|
|
11
11
|
getConnectorClient,
|
|
12
12
|
} from '../../actions/getConnectorClient.js'
|
|
13
|
-
import {
|
|
13
|
+
import type { Config } from '../../createConfig.js'
|
|
14
14
|
import type { BaseErrorType, ErrorType } from '../../errors/base.js'
|
|
15
15
|
import type { SelectChains } from '../../types/chain.js'
|
|
16
16
|
import type {
|
|
17
17
|
ChainIdParameter,
|
|
18
18
|
ConnectorParameter,
|
|
19
19
|
} from '../../types/properties.js'
|
|
20
|
-
import {
|
|
20
|
+
import type { Evaluate } from '../../types/utils.js'
|
|
21
21
|
|
|
22
22
|
export type SendCallsParameters<
|
|
23
23
|
config extends Config = Config,
|
|
24
|
-
chainId extends
|
|
24
|
+
chainId extends
|
|
25
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
25
26
|
///
|
|
26
27
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
27
28
|
> = {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from 'viem/experimental'
|
|
7
7
|
|
|
8
8
|
import { getConnectorClient } from '../../actions/getConnectorClient.js'
|
|
9
|
-
import {
|
|
9
|
+
import type { Config } from '../../createConfig.js'
|
|
10
10
|
import type { ConnectorParameter } from '../../types/properties.js'
|
|
11
11
|
|
|
12
12
|
export type ShowCallsStatusParameters = viem_ShowCallsStatusParameters &
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Account, Chain, ContractFunctionParameters } from 'viem'
|
|
2
2
|
import {
|
|
3
3
|
type WriteContractsErrorType as viem_WriteContractsErrorType,
|
|
4
4
|
type WriteContractsParameters as viem_WriteContractsParameters,
|
|
@@ -10,19 +10,20 @@ import {
|
|
|
10
10
|
type GetConnectorClientErrorType,
|
|
11
11
|
getConnectorClient,
|
|
12
12
|
} from '../../actions/getConnectorClient.js'
|
|
13
|
-
import {
|
|
13
|
+
import type { Config } from '../../createConfig.js'
|
|
14
14
|
import type { BaseErrorType, ErrorType } from '../../errors/base.js'
|
|
15
15
|
import type { SelectChains } from '../../types/chain.js'
|
|
16
16
|
import type {
|
|
17
17
|
ChainIdParameter,
|
|
18
18
|
ConnectorParameter,
|
|
19
19
|
} from '../../types/properties.js'
|
|
20
|
-
import {
|
|
20
|
+
import type { Evaluate } from '../../types/utils.js'
|
|
21
21
|
|
|
22
22
|
export type WriteContractsParameters<
|
|
23
23
|
contracts extends readonly unknown[] = readonly ContractFunctionParameters[],
|
|
24
24
|
config extends Config = Config,
|
|
25
|
-
chainId extends
|
|
25
|
+
chainId extends
|
|
26
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
26
27
|
///
|
|
27
28
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
28
29
|
> = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { QueryOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { Config } from '../../createConfig.js'
|
|
4
4
|
import { ConnectorNotConnectedError } from '../../errors/config.js'
|
|
5
5
|
import { filterQueryOptions } from '../../query/utils.js'
|
|
6
6
|
import type { ScopeKeyParameter } from '../../types/properties.js'
|
|
@@ -16,7 +16,7 @@ export type GetCallsStatusOptions = Evaluate<
|
|
|
16
16
|
GetCallsStatusParameters & ScopeKeyParameter
|
|
17
17
|
>
|
|
18
18
|
|
|
19
|
-
export function getCallsStatusQueryOptions<config extends Config
|
|
19
|
+
export function getCallsStatusQueryOptions<config extends Config>(
|
|
20
20
|
config: config,
|
|
21
21
|
options: GetCallsStatusOptions,
|
|
22
22
|
) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { QueryOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { Config } from '../../createConfig.js'
|
|
4
4
|
import { ConnectorNotConnectedError } from '../../errors/config.js'
|
|
5
5
|
import { filterQueryOptions } from '../../query/utils.js'
|
|
6
6
|
import type { ScopeKeyParameter } from '../../types/properties.js'
|
|
@@ -16,7 +16,7 @@ export type GetCapabilitiesOptions = Evaluate<
|
|
|
16
16
|
ExactPartial<GetCapabilitiesParameters> & ScopeKeyParameter
|
|
17
17
|
>
|
|
18
18
|
|
|
19
|
-
export function getCapabilitiesQueryOptions<config extends Config
|
|
19
|
+
export function getCapabilitiesQueryOptions<config extends Config>(
|
|
20
20
|
config: config,
|
|
21
21
|
options: GetCapabilitiesOptions = {},
|
|
22
22
|
) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MutateOptions, MutationOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { Config } from '../../createConfig.js'
|
|
4
|
+
import type { Evaluate } from '../../types/utils.js'
|
|
5
5
|
import {
|
|
6
6
|
type SendCallsErrorType,
|
|
7
7
|
type SendCallsParameters,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MutateOptions, MutationOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { Config } from '../../createConfig.js'
|
|
4
|
+
import type { Evaluate } from '../../types/utils.js'
|
|
5
5
|
import {
|
|
6
6
|
type ShowCallsStatusErrorType,
|
|
7
7
|
type ShowCallsStatusParameters,
|
|
@@ -42,7 +42,7 @@ export type ShowCallsStatusMutate<context = unknown> = (
|
|
|
42
42
|
| undefined,
|
|
43
43
|
) => void
|
|
44
44
|
|
|
45
|
-
export type ShowCallsStatusMutateAsync<context = unknown
|
|
45
|
+
export type ShowCallsStatusMutateAsync<context = unknown> = (
|
|
46
46
|
variables: ShowCallsStatusVariables,
|
|
47
47
|
options?:
|
|
48
48
|
| Evaluate<
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MutateOptions, MutationOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { Config } from '../../createConfig.js'
|
|
4
|
+
import type { Evaluate } from '../../types/utils.js'
|
|
5
5
|
import {
|
|
6
6
|
type WriteContractsErrorType,
|
|
7
7
|
type WriteContractsParameters,
|
|
@@ -37,7 +37,7 @@ export type WriteContractsMutate<
|
|
|
37
37
|
contracts extends readonly unknown[],
|
|
38
38
|
config extends Config,
|
|
39
39
|
context = unknown,
|
|
40
|
-
> = <chainId extends config['chains'][number]['id']
|
|
40
|
+
> = <chainId extends config['chains'][number]['id']>(
|
|
41
41
|
variables: WriteContractsVariables<contracts, config, chainId>,
|
|
42
42
|
options?:
|
|
43
43
|
| Evaluate<
|
|
@@ -55,7 +55,7 @@ export type WriteContractsMutateAsync<
|
|
|
55
55
|
contracts extends readonly unknown[],
|
|
56
56
|
config extends Config,
|
|
57
57
|
context = unknown,
|
|
58
|
-
> = <chainId extends config['chains'][number]['id']
|
|
58
|
+
> = <chainId extends config['chains'][number]['id']>(
|
|
59
59
|
variables: WriteContractsVariables<contracts, config, chainId>,
|
|
60
60
|
options?:
|
|
61
61
|
| Evaluate<
|
package/src/exports/actions.ts
CHANGED
package/src/exports/chains.ts
CHANGED
package/src/exports/codegen.ts
CHANGED
package/src/exports/index.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Actions
|
|
3
3
|
////////////////////////////////////////////////////////////////////////////////
|
|
4
4
|
|
|
5
|
+
// biome-ignore lint/performance/noBarrelFile: entrypoint module
|
|
5
6
|
export {
|
|
6
7
|
type CallErrorType,
|
|
7
8
|
type CallParameters,
|
|
@@ -481,6 +482,8 @@ export {
|
|
|
481
482
|
ConnectorNotFoundError,
|
|
482
483
|
type ConnectorAccountNotFoundErrorType,
|
|
483
484
|
ConnectorAccountNotFoundError,
|
|
485
|
+
type ConnectorChainMismatchErrorType,
|
|
486
|
+
ConnectorChainMismatchError,
|
|
484
487
|
} from '../errors/config.js'
|
|
485
488
|
|
|
486
489
|
export {
|
package/src/exports/internal.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Actions
|
|
3
3
|
////////////////////////////////////////////////////////////////////////////////
|
|
4
4
|
|
|
5
|
+
// biome-ignore lint/performance/noBarrelFile: entrypoint module
|
|
5
6
|
export {
|
|
6
7
|
type WatchChainsParameters,
|
|
7
8
|
type WatchChainsReturnType,
|
|
@@ -48,3 +49,5 @@ export {
|
|
|
48
49
|
export { deepEqual } from '../utils/deepEqual.js'
|
|
49
50
|
|
|
50
51
|
export { uid } from '../utils/uid.js'
|
|
52
|
+
|
|
53
|
+
export { loadDefault } from '../utils/loadDefault.js'
|
package/src/exports/query.ts
CHANGED
package/src/query/call.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { QueryOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
type CallErrorType,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type CallReturnType,
|
|
7
7
|
call,
|
|
8
8
|
} from '../actions/call.js'
|
|
9
|
-
import {
|
|
9
|
+
import type { Config } from '../createConfig.js'
|
|
10
10
|
import type { ScopeKeyParameter } from '../types/properties.js'
|
|
11
11
|
import type { Evaluate, ExactPartial } from '../types/utils.js'
|
|
12
12
|
import { filterQueryOptions } from './utils.js'
|
package/src/query/connect.ts
CHANGED
package/src/query/disconnect.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type DisconnectReturnType,
|
|
7
7
|
disconnect,
|
|
8
8
|
} from '../actions/disconnect.js'
|
|
9
|
-
import {
|
|
9
|
+
import type { Config } from '../createConfig.js'
|
|
10
10
|
import type { Mutate, MutateAsync } from './types.js'
|
|
11
11
|
|
|
12
12
|
export function disconnectMutationOptions<config extends Config>(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { QueryOptions } from '@tanstack/query-core'
|
|
2
2
|
import type { FeeValuesType } from 'viem'
|
|
3
3
|
|
|
4
4
|
import {
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
type EstimateFeesPerGasReturnType,
|
|
8
8
|
estimateFeesPerGas,
|
|
9
9
|
} from '../actions/estimateFeesPerGas.js'
|
|
10
|
-
import {
|
|
10
|
+
import type { Config } from '../createConfig.js'
|
|
11
11
|
import type { ScopeKeyParameter } from '../types/properties.js'
|
|
12
12
|
import type { Evaluate, ExactPartial } from '../types/utils.js'
|
|
13
13
|
import { filterQueryOptions } from './utils.js'
|
|
@@ -40,7 +40,7 @@ export function estimateFeesPerGasQueryOptions<
|
|
|
40
40
|
export type EstimateFeesPerGasQueryFnData<type extends FeeValuesType> =
|
|
41
41
|
EstimateFeesPerGasReturnType<type>
|
|
42
42
|
|
|
43
|
-
export type EstimateFeesPerGasData<type extends FeeValuesType
|
|
43
|
+
export type EstimateFeesPerGasData<type extends FeeValuesType> =
|
|
44
44
|
EstimateFeesPerGasQueryFnData<type>
|
|
45
45
|
|
|
46
46
|
export function estimateFeesPerGasQueryKey<
|