@wagmi/core 2.10.3 → 2.10.5
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 +0 -1
- 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 +0 -3
- 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 +0 -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 +1 -0
- package/dist/esm/exports/index.js.map +1 -1
- package/dist/esm/exports/internal.js +1 -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/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 +1 -1
- 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 +3 -3
- 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 +6 -6
- 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 +1 -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 +2 -2
- package/dist/types/experimental/query/getCallsStatus.d.ts.map +1 -1
- package/dist/types/experimental/query/getCapabilities.d.ts +2 -2
- 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.map +1 -1
- 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 +2 -2
- 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 +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 +1 -1
- package/dist/types/query/getEnsResolver.d.ts.map +1 -1
- package/dist/types/query/getEnsText.d.ts +2 -2
- package/dist/types/query/getEnsText.d.ts.map +1 -1
- package/dist/types/query/getFeeHistory.d.ts +3 -3
- 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 +4 -4
- package/dist/types/query/getProof.d.ts.map +1 -1
- package/dist/types/query/getStorageAt.d.ts +2 -2
- 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 +5 -5
- 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/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 +5 -3
- 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 +4 -4
- package/src/actions/sendTransaction.ts +7 -5
- 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 +23 -22
- 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 +1 -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 +1 -0
- package/src/exports/internal.ts +1 -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/version.ts +1 -1
|
@@ -2,24 +2,25 @@ import type {
|
|
|
2
2
|
Account,
|
|
3
3
|
Address,
|
|
4
4
|
Chain,
|
|
5
|
+
Client,
|
|
6
|
+
TransactionRequest,
|
|
5
7
|
SendTransactionErrorType as viem_SendTransactionErrorType,
|
|
6
8
|
SendTransactionParameters as viem_SendTransactionParameters,
|
|
7
9
|
SendTransactionReturnType as viem_SendTransactionReturnType,
|
|
8
|
-
TransactionRequest,
|
|
9
10
|
} from 'viem'
|
|
10
11
|
import {
|
|
11
12
|
estimateGas as viem_estimateGas,
|
|
12
13
|
sendTransaction as viem_sendTransaction,
|
|
13
14
|
} from 'viem/actions'
|
|
14
15
|
|
|
15
|
-
import {
|
|
16
|
+
import type { Config } from '../createConfig.js'
|
|
16
17
|
import type { BaseErrorType, ErrorType } from '../errors/base.js'
|
|
17
18
|
import type { SelectChains } from '../types/chain.js'
|
|
18
19
|
import type {
|
|
19
20
|
ChainIdParameter,
|
|
20
21
|
ConnectorParameter,
|
|
21
22
|
} from '../types/properties.js'
|
|
22
|
-
import {
|
|
23
|
+
import type { Evaluate } from '../types/utils.js'
|
|
23
24
|
import { getAction } from '../utils/getAction.js'
|
|
24
25
|
import { getAccount } from './getAccount.js'
|
|
25
26
|
import {
|
|
@@ -29,7 +30,8 @@ import {
|
|
|
29
30
|
|
|
30
31
|
export type SendTransactionParameters<
|
|
31
32
|
config extends Config = Config,
|
|
32
|
-
chainId extends
|
|
33
|
+
chainId extends
|
|
34
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
33
35
|
///
|
|
34
36
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
35
37
|
> = {
|
|
@@ -69,7 +71,7 @@ export async function sendTransaction<
|
|
|
69
71
|
): Promise<SendTransactionReturnType> {
|
|
70
72
|
const { account, chainId, connector, gas: gas_, ...rest } = parameters
|
|
71
73
|
|
|
72
|
-
let client
|
|
74
|
+
let client: Client
|
|
73
75
|
if (typeof account === 'object' && account.type === 'local')
|
|
74
76
|
client = config.getClient({ chainId })
|
|
75
77
|
else
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Account, Client } from 'viem'
|
|
2
2
|
import {
|
|
3
3
|
type SignMessageErrorType as viem_SignMessageErrorType,
|
|
4
4
|
type SignMessageParameters as viem_SignMessageParameters,
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
signMessage as viem_signMessage,
|
|
7
7
|
} from 'viem/actions'
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
9
|
+
import type { Config } from '../createConfig.js'
|
|
10
|
+
import type { BaseErrorType, ErrorType } from '../errors/base.js'
|
|
11
|
+
import type { ConnectorParameter } from '../types/properties.js'
|
|
12
|
+
import type { Evaluate } from '../types/utils.js'
|
|
13
13
|
import { getAction } from '../utils/getAction.js'
|
|
14
14
|
import {
|
|
15
15
|
type GetConnectorClientErrorType,
|
|
@@ -38,7 +38,7 @@ export async function signMessage(
|
|
|
38
38
|
): Promise<SignMessageReturnType> {
|
|
39
39
|
const { account, connector, ...rest } = parameters
|
|
40
40
|
|
|
41
|
-
let client
|
|
41
|
+
let client: Client
|
|
42
42
|
if (typeof account === 'object' && account.type === 'local')
|
|
43
43
|
client = config.getClient()
|
|
44
44
|
else client = await getConnectorClient(config, { account, connector })
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Account, TypedData } from 'viem'
|
|
1
|
+
import type { Account, Client, TypedData } from 'viem'
|
|
2
2
|
import {
|
|
3
3
|
type SignMessageErrorType as viem_SignMessageErrorType,
|
|
4
4
|
type SignTypedDataParameters as viem_SignTypedDataParameters,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
signTypedData as viem_signTypedData,
|
|
7
7
|
} from 'viem/actions'
|
|
8
8
|
|
|
9
|
-
import {
|
|
9
|
+
import type { Config } from '../createConfig.js'
|
|
10
10
|
import type { BaseErrorType, ErrorType } from '../errors/base.js'
|
|
11
11
|
import type { ConnectorParameter } from '../types/properties.js'
|
|
12
12
|
import type { UnionEvaluate } from '../types/utils.js'
|
|
@@ -47,7 +47,7 @@ export async function signTypedData<
|
|
|
47
47
|
): Promise<SignTypedDataReturnType> {
|
|
48
48
|
const { account, connector, ...rest } = parameters
|
|
49
49
|
|
|
50
|
-
let client
|
|
50
|
+
let client: Client
|
|
51
51
|
if (typeof account === 'object' && account.type === 'local')
|
|
52
52
|
client = config.getClient()
|
|
53
53
|
else client = await getConnectorClient(config, { account, connector })
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
simulateContract as viem_simulateContract,
|
|
14
14
|
} from 'viem/actions'
|
|
15
15
|
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
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,
|
|
22
22
|
} from '../types/properties.js'
|
|
23
23
|
import type {
|
|
24
24
|
Evaluate,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Address } from 'viem'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import type { Config, Connector } from '../createConfig.js'
|
|
4
4
|
import type { BaseError, ErrorType } from '../errors/base.js'
|
|
5
5
|
import {
|
|
6
6
|
ConnectorNotConnectedError,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type {
|
|
2
|
+
AddEthereumChainParameter,
|
|
3
|
+
UserRejectedRequestErrorType,
|
|
4
|
+
SwitchChainErrorType as viem_SwitchChainErrorType,
|
|
5
5
|
} from 'viem'
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import type { Config } from '../createConfig.js'
|
|
8
8
|
import type { BaseErrorType, ErrorType } from '../errors/base.js'
|
|
9
9
|
import {
|
|
10
10
|
ChainNotConfiguredError,
|
|
@@ -16,11 +16,12 @@ import {
|
|
|
16
16
|
type SwitchChainNotSupportedErrorType,
|
|
17
17
|
} from '../errors/connector.js'
|
|
18
18
|
import type { ConnectorParameter } from '../types/properties.js'
|
|
19
|
-
import {
|
|
19
|
+
import type { Evaluate, ExactPartial } from '../types/utils.js'
|
|
20
20
|
|
|
21
21
|
export type SwitchChainParameters<
|
|
22
22
|
config extends Config = Config,
|
|
23
|
-
chainId extends
|
|
23
|
+
chainId extends
|
|
24
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
24
25
|
> = Evaluate<
|
|
25
26
|
ConnectorParameter & {
|
|
26
27
|
chainId: chainId | config['chains'][number]['id']
|
|
@@ -32,7 +33,8 @@ export type SwitchChainParameters<
|
|
|
32
33
|
|
|
33
34
|
export type SwitchChainReturnType<
|
|
34
35
|
config extends Config = Config,
|
|
35
|
-
chainId extends
|
|
36
|
+
chainId extends
|
|
37
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
36
38
|
> = Extract<
|
|
37
39
|
config['chains'][number],
|
|
38
40
|
{ id: Config extends config ? number : chainId }
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
verifyMessage as viem_verifyMessage,
|
|
6
6
|
} from 'viem/actions'
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
8
|
+
import type { Config } from '../createConfig.js'
|
|
9
|
+
import type { ChainIdParameter } from '../types/properties.js'
|
|
10
|
+
import type { Evaluate } from '../types/utils.js'
|
|
11
11
|
import { getAction } from '../utils/getAction.js'
|
|
12
12
|
|
|
13
13
|
export type VerifyMessageParameters<config extends Config = Config> = Evaluate<
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TypedData } from 'viem'
|
|
2
2
|
import {
|
|
3
3
|
type VerifyTypedDataErrorType as viem_VerifyTypedDataErrorType,
|
|
4
4
|
type VerifyTypedDataParameters as viem_VerifyTypedDataParameters,
|
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
verifyTypedData as viem_verifyTypedData,
|
|
7
7
|
} from 'viem/actions'
|
|
8
8
|
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import type { Config } from '../createConfig.js'
|
|
10
|
+
import type { ChainIdParameter } from '../types/properties.js'
|
|
11
|
+
import type { Evaluate } from '../types/utils.js'
|
|
12
12
|
import { getAction } from '../utils/getAction.js'
|
|
13
13
|
|
|
14
14
|
export type VerifyTypedDataParameters<
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Chain } from 'viem'
|
|
2
2
|
import { hexToString } from 'viem'
|
|
3
3
|
import {
|
|
4
|
+
call,
|
|
5
|
+
getTransaction,
|
|
4
6
|
type WaitForTransactionReceiptErrorType as viem_WaitForTransactionReceiptErrorType,
|
|
5
7
|
type WaitForTransactionReceiptParameters as viem_WaitForTransactionReceiptParameters,
|
|
6
8
|
type WaitForTransactionReceiptReturnType as viem_WaitForTransactionReceiptReturnType,
|
|
7
|
-
call,
|
|
8
|
-
getTransaction,
|
|
9
9
|
waitForTransactionReceipt as viem_waitForTransactionReceipt,
|
|
10
10
|
} from 'viem/actions'
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
12
|
+
import type { Config } from '../createConfig.js'
|
|
13
|
+
import type { SelectChains } from '../types/chain.js'
|
|
14
|
+
import type { ChainIdParameter } from '../types/properties.js'
|
|
15
|
+
import type { Evaluate, IsNarrowable } from '../types/utils.js'
|
|
16
16
|
import { getAction } from '../utils/getAction.js'
|
|
17
17
|
|
|
18
18
|
export type WaitForTransactionReceiptParameters<
|
|
19
19
|
config extends Config = Config,
|
|
20
|
-
chainId extends
|
|
20
|
+
chainId extends
|
|
21
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
21
22
|
> = Evaluate<
|
|
22
23
|
viem_WaitForTransactionReceiptParameters & ChainIdParameter<config, chainId>
|
|
23
24
|
>
|
|
24
25
|
|
|
25
26
|
export type WaitForTransactionReceiptReturnType<
|
|
26
27
|
config extends Config = Config,
|
|
27
|
-
chainId extends
|
|
28
|
+
chainId extends
|
|
29
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
28
30
|
///
|
|
29
31
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
30
32
|
> = Evaluate<
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Config } from '../createConfig.js'
|
|
2
2
|
import { deepEqual } from '../utils/deepEqual.js'
|
|
3
3
|
import { type GetAccountReturnType, getAccount } from './getAccount.js'
|
|
4
4
|
|
|
5
|
-
export type WatchAccountParameters = {
|
|
5
|
+
export type WatchAccountParameters<config extends Config = Config> = {
|
|
6
6
|
onChange(
|
|
7
|
-
account: GetAccountReturnType
|
|
8
|
-
prevAccount: GetAccountReturnType
|
|
7
|
+
account: GetAccountReturnType<config>,
|
|
8
|
+
prevAccount: GetAccountReturnType<config>,
|
|
9
9
|
): void
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export type WatchAccountReturnType = () => void
|
|
13
13
|
|
|
14
14
|
/** https://wagmi.sh/core/api/actions/watchAccount */
|
|
15
|
-
export function watchAccount(
|
|
16
|
-
config:
|
|
17
|
-
parameters: WatchAccountParameters
|
|
15
|
+
export function watchAccount<config extends Config>(
|
|
16
|
+
config: config,
|
|
17
|
+
parameters: WatchAccountParameters<config>,
|
|
18
18
|
): WatchAccountReturnType {
|
|
19
19
|
const { onChange } = parameters
|
|
20
20
|
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from 'viem/actions'
|
|
6
6
|
|
|
7
7
|
import type { Chain, Transport, WebSocketTransport } from 'viem'
|
|
8
|
-
import {
|
|
8
|
+
import type { Config } from '../createConfig.js'
|
|
9
9
|
import type { SelectChains } from '../types/chain.js'
|
|
10
10
|
import type {
|
|
11
11
|
ChainIdParameter,
|
|
@@ -16,13 +16,15 @@ import { getAction } from '../utils/getAction.js'
|
|
|
16
16
|
|
|
17
17
|
export type WatchBlockNumberParameters<
|
|
18
18
|
config extends Config = Config,
|
|
19
|
-
chainId extends
|
|
19
|
+
chainId extends
|
|
20
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
20
21
|
///
|
|
21
22
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
22
23
|
> = {
|
|
23
24
|
[key in keyof chains]: UnionEvaluate<
|
|
24
25
|
viem_WatchBlockNumberParameters<
|
|
25
|
-
config['_internal']['transports'][chains[key]['id']] extends infer transport extends
|
|
26
|
+
config['_internal']['transports'][chains[key]['id']] extends infer transport extends
|
|
27
|
+
Transport
|
|
26
28
|
? Transport extends transport
|
|
27
29
|
? WebSocketTransport
|
|
28
30
|
: transport
|
|
@@ -39,7 +41,8 @@ export type WatchBlockNumberReturnType = viem_WatchBlockNumberReturnType
|
|
|
39
41
|
/** https://wagmi.sh/core/api/actions/watchBlockNumber */
|
|
40
42
|
export function watchBlockNumber<
|
|
41
43
|
config extends Config,
|
|
42
|
-
chainId extends
|
|
44
|
+
chainId extends
|
|
45
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
43
46
|
>(
|
|
44
47
|
config: config,
|
|
45
48
|
parameters: WatchBlockNumberParameters<config, chainId>,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from 'viem/actions'
|
|
6
6
|
|
|
7
7
|
import type { BlockTag, Chain, Transport, WebSocketTransport } from 'viem'
|
|
8
|
-
import {
|
|
8
|
+
import type { Config } from '../createConfig.js'
|
|
9
9
|
import type { SelectChains } from '../types/chain.js'
|
|
10
10
|
import type {
|
|
11
11
|
ChainIdParameter,
|
|
@@ -18,13 +18,15 @@ export type WatchBlocksParameters<
|
|
|
18
18
|
includeTransactions extends boolean = false,
|
|
19
19
|
blockTag extends BlockTag = 'latest',
|
|
20
20
|
config extends Config = Config,
|
|
21
|
-
chainId extends
|
|
21
|
+
chainId extends
|
|
22
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
22
23
|
///
|
|
23
24
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
24
25
|
> = {
|
|
25
26
|
[key in keyof chains]: UnionEvaluate<
|
|
26
27
|
viem_WatchBlocksParameters<
|
|
27
|
-
config['_internal']['transports'][chains[key]['id']] extends infer transport extends
|
|
28
|
+
config['_internal']['transports'][chains[key]['id']] extends infer transport extends
|
|
29
|
+
Transport
|
|
28
30
|
? Transport extends transport
|
|
29
31
|
? WebSocketTransport
|
|
30
32
|
: transport
|
|
@@ -44,7 +46,8 @@ export type WatchBlocksReturnType = viem_WatchBlocksReturnType
|
|
|
44
46
|
/** https://wagmi.sh/core/actions/watchBlocks */
|
|
45
47
|
export function watchBlocks<
|
|
46
48
|
config extends Config,
|
|
47
|
-
chainId extends
|
|
49
|
+
chainId extends
|
|
50
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
48
51
|
includeTransactions extends boolean = false,
|
|
49
52
|
blockTag extends BlockTag = 'latest',
|
|
50
53
|
>(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Config } from '../createConfig.js'
|
|
2
|
+
import type { GetChainsReturnType } from './getChains.js'
|
|
3
3
|
|
|
4
4
|
export type WatchChainsParameters<config extends Config = Config> = {
|
|
5
5
|
onChange(
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Config } from '../createConfig.js'
|
|
2
2
|
import { type GetClientReturnType, getClient } from './getClient.js'
|
|
3
3
|
|
|
4
4
|
export type WatchClientParameters<
|
|
5
5
|
config extends Config = Config,
|
|
6
|
-
chainId extends
|
|
6
|
+
chainId extends
|
|
7
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
7
8
|
> = {
|
|
8
9
|
onChange(
|
|
9
10
|
publicClient: GetClientReturnType<config, chainId>,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Config } from '../createConfig.js'
|
|
2
|
+
import type { GetConnectorsReturnType } from './getConnectors.js'
|
|
3
3
|
|
|
4
4
|
export type WatchConnectorsParameters = {
|
|
5
5
|
onChange(
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
watchContractEvent as viem_watchContractEvent,
|
|
12
12
|
} from 'viem/actions'
|
|
13
13
|
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
import type { Config } from '../createConfig.js'
|
|
15
|
+
import type { SelectChains } from '../types/chain.js'
|
|
16
|
+
import type {
|
|
17
|
+
ChainIdParameter,
|
|
18
|
+
SyncConnectedChainParameter,
|
|
19
19
|
} from '../types/properties.js'
|
|
20
|
-
import {
|
|
20
|
+
import type { UnionEvaluate } from '../types/utils.js'
|
|
21
21
|
import { getAction } from '../utils/getAction.js'
|
|
22
22
|
|
|
23
23
|
export type WatchContractEventParameters<
|
|
@@ -25,7 +25,8 @@ export type WatchContractEventParameters<
|
|
|
25
25
|
eventName extends ContractEventName<abi> | undefined = ContractEventName<abi>,
|
|
26
26
|
strict extends boolean | undefined = undefined,
|
|
27
27
|
config extends Config = Config,
|
|
28
|
-
chainId extends
|
|
28
|
+
chainId extends
|
|
29
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
29
30
|
///
|
|
30
31
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
31
32
|
> = {
|
|
@@ -34,7 +35,8 @@ export type WatchContractEventParameters<
|
|
|
34
35
|
abi,
|
|
35
36
|
eventName,
|
|
36
37
|
strict,
|
|
37
|
-
config['_internal']['transports'][chains[key]['id']] extends infer transport extends
|
|
38
|
+
config['_internal']['transports'][chains[key]['id']] extends infer transport extends
|
|
39
|
+
Transport
|
|
38
40
|
? Transport extends transport
|
|
39
41
|
? WebSocketTransport
|
|
40
42
|
: transport
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
watchPendingTransactions as viem_watchPendingTransactions,
|
|
6
6
|
} from 'viem/actions'
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import type { Config } from '../createConfig.js'
|
|
9
9
|
import type { SelectChains } from '../types/chain.js'
|
|
10
10
|
import type {
|
|
11
11
|
ChainIdParameter,
|
|
@@ -16,13 +16,15 @@ import { getAction } from '../utils/getAction.js'
|
|
|
16
16
|
|
|
17
17
|
export type WatchPendingTransactionsParameters<
|
|
18
18
|
config extends Config = Config,
|
|
19
|
-
chainId extends
|
|
19
|
+
chainId extends
|
|
20
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
20
21
|
///
|
|
21
22
|
chains extends readonly Chain[] = SelectChains<config, chainId>,
|
|
22
23
|
> = {
|
|
23
24
|
[key in keyof chains]: UnionEvaluate<
|
|
24
25
|
viem_WatchPendingTransactionsParameters<
|
|
25
|
-
config['_internal']['transports'][chains[key]['id']] extends infer transport extends
|
|
26
|
+
config['_internal']['transports'][chains[key]['id']] extends infer transport extends
|
|
27
|
+
Transport
|
|
26
28
|
? Transport extends transport
|
|
27
29
|
? WebSocketTransport
|
|
28
30
|
: transport
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Config } from '../createConfig.js'
|
|
2
2
|
import {
|
|
3
3
|
type GetPublicClientReturnType,
|
|
4
4
|
getPublicClient,
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
|
|
7
7
|
export type WatchPublicClientParameters<
|
|
8
8
|
config extends Config = Config,
|
|
9
|
-
chainId extends
|
|
9
|
+
chainId extends
|
|
10
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
10
11
|
> = {
|
|
11
12
|
onChange(
|
|
12
13
|
publicClient: GetPublicClientReturnType<config, chainId>,
|
|
@@ -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,14 +13,14 @@ 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
|
-
import type { Evaluate, UnionEvaluate
|
|
23
|
+
import type { Evaluate, UnionEvaluate } from '../types/utils.js'
|
|
23
24
|
import { getAction } from '../utils/getAction.js'
|
|
24
25
|
import { getAccount } from './getAccount.js'
|
|
25
26
|
import {
|
|
@@ -43,23 +44,23 @@ 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>,
|
|
50
52
|
> = UnionEvaluate<
|
|
51
53
|
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
'chain'
|
|
54
|
+
// TODO: Should use `UnionOmit<..., 'chain'>` on `viem_WriteContractParameters` result instead
|
|
55
|
+
// temp workaround that doesn't affect runtime behavior for for https://github.com/wevm/wagmi/issues/3981
|
|
56
|
+
[key in keyof chains]: viem_WriteContractParameters<
|
|
57
|
+
abi,
|
|
58
|
+
functionName,
|
|
59
|
+
args,
|
|
60
|
+
chains[key],
|
|
61
|
+
Account,
|
|
62
|
+
chains[key],
|
|
63
|
+
allFunctionNames
|
|
63
64
|
>
|
|
64
65
|
}[number] &
|
|
65
66
|
Evaluate<ChainIdParameter<config, chainId>> &
|
|
@@ -96,7 +97,7 @@ export async function writeContract<
|
|
|
96
97
|
): Promise<WriteContractReturnType> {
|
|
97
98
|
const { account, chainId, connector, __mode, ...rest } = parameters
|
|
98
99
|
|
|
99
|
-
let client
|
|
100
|
+
let client: Client
|
|
100
101
|
if (typeof account === 'object' && account.type === 'local')
|
|
101
102
|
client = config.getClient({ chainId })
|
|
102
103
|
else
|
|
@@ -104,7 +105,7 @@ export async function writeContract<
|
|
|
104
105
|
|
|
105
106
|
const { connector: activeConnector } = getAccount(config)
|
|
106
107
|
|
|
107
|
-
let request
|
|
108
|
+
let request: any
|
|
108
109
|
if (__mode === 'prepared' || activeConnector?.supportsSimulation)
|
|
109
110
|
request = rest
|
|
110
111
|
else {
|
|
@@ -118,7 +119,7 @@ export async function writeContract<
|
|
|
118
119
|
|
|
119
120
|
const action = getAction(client, viem_writeContract, 'writeContract')
|
|
120
121
|
const hash = await action({
|
|
121
|
-
...
|
|
122
|
+
...request,
|
|
122
123
|
...(account ? { account } : {}),
|
|
123
124
|
chain: chainId ? { id: chainId } : null,
|
|
124
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
|
}
|