wagmi 2.9.6 → 2.9.8
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/context.js +0 -1
- package/dist/esm/context.js.map +1 -1
- package/dist/esm/experimental/hooks/useCallsStatus.js +0 -2
- package/dist/esm/experimental/hooks/useCallsStatus.js.map +1 -1
- package/dist/esm/experimental/hooks/useCapabilities.js +0 -2
- package/dist/esm/experimental/hooks/useCapabilities.js.map +1 -1
- package/dist/esm/experimental/hooks/useWriteContracts.js.map +1 -1
- package/dist/esm/exports/actions.js +2 -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 +2 -0
- package/dist/esm/exports/codegen.js.map +1 -1
- package/dist/esm/exports/connectors.js +2 -0
- package/dist/esm/exports/connectors.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/query.js +2 -0
- package/dist/esm/exports/query.js.map +1 -1
- package/dist/esm/hooks/codegen/createUseReadContract.js +0 -5
- package/dist/esm/hooks/codegen/createUseReadContract.js.map +1 -1
- package/dist/esm/hooks/codegen/createUseSimulateContract.js +0 -5
- package/dist/esm/hooks/codegen/createUseSimulateContract.js.map +1 -1
- package/dist/esm/hooks/codegen/createUseWatchContractEvent.js +0 -4
- package/dist/esm/hooks/codegen/createUseWatchContractEvent.js.map +1 -1
- package/dist/esm/hooks/codegen/createUseWriteContract.js +0 -5
- package/dist/esm/hooks/codegen/createUseWriteContract.js.map +1 -1
- package/dist/esm/hooks/useAccount.js +0 -1
- package/dist/esm/hooks/useAccount.js.map +1 -1
- package/dist/esm/hooks/useBalance.js +0 -1
- package/dist/esm/hooks/useBalance.js.map +1 -1
- package/dist/esm/hooks/useBlock.js +0 -2
- package/dist/esm/hooks/useBlock.js.map +1 -1
- package/dist/esm/hooks/useBlockNumber.js +0 -2
- package/dist/esm/hooks/useBlockNumber.js.map +1 -1
- package/dist/esm/hooks/useBlockTransactionCount.js +0 -2
- package/dist/esm/hooks/useBlockTransactionCount.js.map +1 -1
- package/dist/esm/hooks/useBytecode.js +0 -3
- package/dist/esm/hooks/useBytecode.js.map +1 -1
- package/dist/esm/hooks/useCall.js +0 -1
- package/dist/esm/hooks/useCall.js.map +1 -1
- package/dist/esm/hooks/useConfig.js +0 -1
- package/dist/esm/hooks/useConfig.js.map +1 -1
- package/dist/esm/hooks/useConnect.js +0 -1
- package/dist/esm/hooks/useConnect.js.map +1 -1
- package/dist/esm/hooks/useConnectorClient.js +2 -3
- package/dist/esm/hooks/useConnectorClient.js.map +1 -1
- package/dist/esm/hooks/useDisconnect.js +0 -1
- package/dist/esm/hooks/useDisconnect.js.map +1 -1
- package/dist/esm/hooks/useEnsAddress.js +0 -1
- package/dist/esm/hooks/useEnsAddress.js.map +1 -1
- package/dist/esm/hooks/useEnsAvatar.js +0 -1
- package/dist/esm/hooks/useEnsAvatar.js.map +1 -1
- package/dist/esm/hooks/useEnsName.js +0 -1
- package/dist/esm/hooks/useEnsName.js.map +1 -1
- package/dist/esm/hooks/useEnsResolver.js +0 -1
- package/dist/esm/hooks/useEnsResolver.js.map +1 -1
- package/dist/esm/hooks/useEnsText.js +0 -1
- package/dist/esm/hooks/useEnsText.js.map +1 -1
- package/dist/esm/hooks/useEstimateFeesPerGas.js +0 -2
- package/dist/esm/hooks/useEstimateFeesPerGas.js.map +1 -1
- package/dist/esm/hooks/useEstimateMaxPriorityFeePerGas.js +0 -2
- package/dist/esm/hooks/useEstimateMaxPriorityFeePerGas.js.map +1 -1
- package/dist/esm/hooks/useFeeHistory.js +0 -2
- package/dist/esm/hooks/useFeeHistory.js.map +1 -1
- package/dist/esm/hooks/useGasPrice.js +0 -2
- package/dist/esm/hooks/useGasPrice.js.map +1 -1
- package/dist/esm/hooks/usePrepareTransactionRequest.js +0 -3
- package/dist/esm/hooks/usePrepareTransactionRequest.js.map +1 -1
- package/dist/esm/hooks/useProof.js +0 -3
- package/dist/esm/hooks/useProof.js.map +1 -1
- package/dist/esm/hooks/useReadContract.js +0 -3
- package/dist/esm/hooks/useReadContract.js.map +1 -1
- package/dist/esm/hooks/useReadContracts.js +0 -4
- package/dist/esm/hooks/useReadContracts.js.map +1 -1
- package/dist/esm/hooks/useReconnect.js +0 -1
- package/dist/esm/hooks/useReconnect.js.map +1 -1
- package/dist/esm/hooks/useSignMessage.js +0 -1
- package/dist/esm/hooks/useSignMessage.js.map +1 -1
- package/dist/esm/hooks/useSimulateContract.js +0 -1
- package/dist/esm/hooks/useSimulateContract.js.map +1 -1
- package/dist/esm/hooks/useStorageAt.js +0 -3
- package/dist/esm/hooks/useStorageAt.js.map +1 -1
- package/dist/esm/hooks/useSwitchChain.js +0 -4
- package/dist/esm/hooks/useSwitchChain.js.map +1 -1
- package/dist/esm/hooks/useSyncExternalStoreWithTracked.js +6 -4
- package/dist/esm/hooks/useSyncExternalStoreWithTracked.js.map +1 -1
- package/dist/esm/hooks/useToken.js +0 -1
- package/dist/esm/hooks/useToken.js.map +1 -1
- package/dist/esm/hooks/useTransaction.js +0 -1
- package/dist/esm/hooks/useTransaction.js.map +1 -1
- package/dist/esm/hooks/useTransactionConfirmations.js +0 -2
- package/dist/esm/hooks/useTransactionConfirmations.js.map +1 -1
- package/dist/esm/hooks/useTransactionCount.js +0 -1
- package/dist/esm/hooks/useTransactionCount.js.map +1 -1
- package/dist/esm/hooks/useTransactionReceipt.js +0 -4
- package/dist/esm/hooks/useTransactionReceipt.js.map +1 -1
- package/dist/esm/hooks/useVerifyMessage.js +0 -1
- package/dist/esm/hooks/useVerifyMessage.js.map +1 -1
- package/dist/esm/hooks/useVerifyTypedData.js +0 -2
- package/dist/esm/hooks/useVerifyTypedData.js.map +1 -1
- package/dist/esm/hooks/useWaitForTransactionReceipt.js +0 -1
- package/dist/esm/hooks/useWaitForTransactionReceipt.js.map +1 -1
- package/dist/esm/hooks/useWalletClient.js +2 -3
- package/dist/esm/hooks/useWalletClient.js.map +1 -1
- package/dist/esm/hooks/useWatchBlockNumber.js +0 -1
- package/dist/esm/hooks/useWatchBlockNumber.js.map +1 -1
- package/dist/esm/hooks/useWatchBlocks.js +0 -1
- package/dist/esm/hooks/useWatchBlocks.js.map +1 -1
- package/dist/esm/hooks/useWatchContractEvent.js +0 -1
- package/dist/esm/hooks/useWatchContractEvent.js.map +1 -1
- package/dist/esm/hooks/useWatchPendingTransactions.js +0 -1
- package/dist/esm/hooks/useWatchPendingTransactions.js.map +1 -1
- package/dist/esm/hydrate.js +1 -1
- package/dist/esm/hydrate.js.map +1 -1
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/types/properties.js +1 -3
- package/dist/esm/types/properties.js.map +1 -1
- package/dist/esm/utils/query.js +1 -2
- package/dist/esm/utils/query.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/context.d.ts +1 -1
- package/dist/types/context.d.ts.map +1 -1
- package/dist/types/experimental/hooks/useCallsStatus.d.ts +2 -2
- package/dist/types/experimental/hooks/useCallsStatus.d.ts.map +1 -1
- package/dist/types/experimental/hooks/useCapabilities.d.ts +2 -2
- package/dist/types/experimental/hooks/useCapabilities.d.ts.map +1 -1
- package/dist/types/experimental/hooks/useShowCallsStatus.d.ts.map +1 -1
- package/dist/types/experimental/hooks/useWriteContracts.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/connectors.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/query.d.ts.map +1 -1
- package/dist/types/hooks/codegen/createUseReadContract.d.ts +5 -5
- package/dist/types/hooks/codegen/createUseReadContract.d.ts.map +1 -1
- package/dist/types/hooks/codegen/createUseSimulateContract.d.ts +5 -5
- package/dist/types/hooks/codegen/createUseSimulateContract.d.ts.map +1 -1
- package/dist/types/hooks/codegen/createUseWatchContractEvent.d.ts +4 -4
- package/dist/types/hooks/codegen/createUseWatchContractEvent.d.ts.map +1 -1
- package/dist/types/hooks/codegen/createUseWriteContract.d.ts +5 -5
- package/dist/types/hooks/codegen/createUseWriteContract.d.ts.map +1 -1
- package/dist/types/hooks/useAccount.d.ts +1 -1
- package/dist/types/hooks/useAccount.d.ts.map +1 -1
- package/dist/types/hooks/useBalance.d.ts +1 -1
- package/dist/types/hooks/useBalance.d.ts.map +1 -1
- package/dist/types/hooks/useBlock.d.ts +2 -2
- package/dist/types/hooks/useBlock.d.ts.map +1 -1
- package/dist/types/hooks/useBlockNumber.d.ts +2 -2
- package/dist/types/hooks/useBlockNumber.d.ts.map +1 -1
- package/dist/types/hooks/useBlockTransactionCount.d.ts +2 -2
- package/dist/types/hooks/useBlockTransactionCount.d.ts.map +1 -1
- package/dist/types/hooks/useBytecode.d.ts +3 -3
- package/dist/types/hooks/useBytecode.d.ts.map +1 -1
- package/dist/types/hooks/useCall.d.ts +1 -1
- package/dist/types/hooks/useCall.d.ts.map +1 -1
- package/dist/types/hooks/useConfig.d.ts +1 -1
- package/dist/types/hooks/useConfig.d.ts.map +1 -1
- package/dist/types/hooks/useConnect.d.ts +1 -1
- package/dist/types/hooks/useConnect.d.ts.map +1 -1
- package/dist/types/hooks/useConnectorClient.d.ts +1 -1
- package/dist/types/hooks/useConnectorClient.d.ts.map +1 -1
- package/dist/types/hooks/useDisconnect.d.ts +1 -1
- package/dist/types/hooks/useDisconnect.d.ts.map +1 -1
- package/dist/types/hooks/useEnsAddress.d.ts +1 -1
- package/dist/types/hooks/useEnsAddress.d.ts.map +1 -1
- package/dist/types/hooks/useEnsAvatar.d.ts +1 -1
- package/dist/types/hooks/useEnsAvatar.d.ts.map +1 -1
- package/dist/types/hooks/useEnsName.d.ts +1 -1
- package/dist/types/hooks/useEnsName.d.ts.map +1 -1
- package/dist/types/hooks/useEnsResolver.d.ts +1 -1
- package/dist/types/hooks/useEnsResolver.d.ts.map +1 -1
- package/dist/types/hooks/useEnsText.d.ts +1 -1
- package/dist/types/hooks/useEnsText.d.ts.map +1 -1
- package/dist/types/hooks/useEstimateFeesPerGas.d.ts +2 -2
- package/dist/types/hooks/useEstimateFeesPerGas.d.ts.map +1 -1
- package/dist/types/hooks/useEstimateMaxPriorityFeePerGas.d.ts +2 -2
- package/dist/types/hooks/useEstimateMaxPriorityFeePerGas.d.ts.map +1 -1
- package/dist/types/hooks/useFeeHistory.d.ts +2 -2
- package/dist/types/hooks/useFeeHistory.d.ts.map +1 -1
- package/dist/types/hooks/useGasPrice.d.ts +2 -2
- package/dist/types/hooks/useGasPrice.d.ts.map +1 -1
- package/dist/types/hooks/usePrepareTransactionRequest.d.ts +3 -3
- package/dist/types/hooks/usePrepareTransactionRequest.d.ts.map +1 -1
- package/dist/types/hooks/useProof.d.ts +3 -3
- package/dist/types/hooks/useProof.d.ts.map +1 -1
- package/dist/types/hooks/useReadContract.d.ts +3 -3
- package/dist/types/hooks/useReadContract.d.ts.map +1 -1
- package/dist/types/hooks/useReadContracts.d.ts +4 -4
- package/dist/types/hooks/useReadContracts.d.ts.map +1 -1
- package/dist/types/hooks/useReconnect.d.ts +1 -1
- package/dist/types/hooks/useReconnect.d.ts.map +1 -1
- package/dist/types/hooks/useSignMessage.d.ts +1 -1
- package/dist/types/hooks/useSignMessage.d.ts.map +1 -1
- package/dist/types/hooks/useSimulateContract.d.ts +1 -1
- package/dist/types/hooks/useSimulateContract.d.ts.map +1 -1
- package/dist/types/hooks/useStorageAt.d.ts +3 -3
- package/dist/types/hooks/useStorageAt.d.ts.map +1 -1
- package/dist/types/hooks/useSwitchChain.d.ts +4 -4
- package/dist/types/hooks/useSwitchChain.d.ts.map +1 -1
- package/dist/types/hooks/useSyncExternalStoreWithTracked.d.ts.map +1 -1
- package/dist/types/hooks/useToken.d.ts +1 -1
- package/dist/types/hooks/useToken.d.ts.map +1 -1
- package/dist/types/hooks/useTransaction.d.ts +1 -1
- package/dist/types/hooks/useTransaction.d.ts.map +1 -1
- package/dist/types/hooks/useTransactionConfirmations.d.ts +2 -2
- package/dist/types/hooks/useTransactionConfirmations.d.ts.map +1 -1
- package/dist/types/hooks/useTransactionCount.d.ts +1 -1
- package/dist/types/hooks/useTransactionCount.d.ts.map +1 -1
- package/dist/types/hooks/useTransactionReceipt.d.ts +4 -4
- package/dist/types/hooks/useTransactionReceipt.d.ts.map +1 -1
- package/dist/types/hooks/useVerifyMessage.d.ts +1 -1
- package/dist/types/hooks/useVerifyMessage.d.ts.map +1 -1
- package/dist/types/hooks/useVerifyTypedData.d.ts +2 -2
- package/dist/types/hooks/useVerifyTypedData.d.ts.map +1 -1
- package/dist/types/hooks/useWaitForTransactionReceipt.d.ts +1 -1
- package/dist/types/hooks/useWaitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/hooks/useWalletClient.d.ts +1 -1
- package/dist/types/hooks/useWalletClient.d.ts.map +1 -1
- package/dist/types/hooks/useWatchBlockNumber.d.ts +1 -1
- package/dist/types/hooks/useWatchBlockNumber.d.ts.map +1 -1
- package/dist/types/hooks/useWatchBlocks.d.ts +1 -1
- package/dist/types/hooks/useWatchBlocks.d.ts.map +1 -1
- package/dist/types/hooks/useWatchContractEvent.d.ts +1 -1
- package/dist/types/hooks/useWatchContractEvent.d.ts.map +1 -1
- package/dist/types/hooks/useWatchPendingTransactions.d.ts +1 -1
- package/dist/types/hooks/useWatchPendingTransactions.d.ts.map +1 -1
- package/dist/types/types/properties.d.ts +3 -3
- package/dist/types/types/properties.d.ts.map +1 -1
- package/dist/types/utils/query.d.ts +1 -1
- package/dist/types/utils/query.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/context.ts +1 -1
- package/src/experimental/hooks/useCallsStatus.ts +2 -2
- package/src/experimental/hooks/useCapabilities.ts +2 -2
- package/src/experimental/hooks/useShowCallsStatus.ts +1 -1
- package/src/experimental/hooks/useWriteContracts.ts +2 -1
- package/src/exports/actions.ts +2 -0
- package/src/exports/chains.ts +2 -0
- package/src/exports/codegen.ts +2 -0
- package/src/exports/connectors.ts +2 -0
- package/src/exports/experimental.ts +1 -0
- package/src/exports/index.ts +1 -0
- package/src/exports/query.ts +2 -0
- package/src/hooks/codegen/createUseReadContract.ts +20 -23
- package/src/hooks/codegen/createUseSimulateContract.ts +16 -19
- package/src/hooks/codegen/createUseWatchContractEvent.ts +14 -13
- package/src/hooks/codegen/createUseWriteContract.ts +19 -19
- package/src/hooks/useAccount.ts +1 -1
- package/src/hooks/useBalance.ts +1 -5
- package/src/hooks/useBlock.ts +8 -13
- package/src/hooks/useBlockNumber.ts +9 -11
- package/src/hooks/useBlockTransactionCount.ts +9 -7
- package/src/hooks/useBytecode.ts +6 -9
- package/src/hooks/useCall.ts +1 -5
- package/src/hooks/useConfig.ts +1 -1
- package/src/hooks/useConnect.ts +1 -5
- package/src/hooks/useConnectorClient.ts +9 -6
- package/src/hooks/useDisconnect.ts +1 -1
- package/src/hooks/useEnsAddress.ts +1 -1
- package/src/hooks/useEnsAvatar.ts +1 -1
- package/src/hooks/useEnsName.ts +1 -1
- package/src/hooks/useEnsResolver.ts +1 -1
- package/src/hooks/useEnsText.ts +1 -1
- package/src/hooks/useEstimateFeesPerGas.ts +5 -5
- package/src/hooks/useEstimateMaxPriorityFeePerGas.ts +5 -5
- package/src/hooks/useFeeHistory.ts +9 -7
- package/src/hooks/useGasPrice.ts +9 -7
- package/src/hooks/usePrepareTransactionRequest.ts +7 -10
- package/src/hooks/useProof.ts +3 -10
- package/src/hooks/useReadContract.ts +6 -10
- package/src/hooks/useReadContracts.ts +7 -10
- package/src/hooks/useReconnect.ts +1 -1
- package/src/hooks/useSignMessage.ts +1 -1
- package/src/hooks/useSimulateContract.ts +1 -4
- package/src/hooks/useStorageAt.ts +6 -9
- package/src/hooks/useSwitchChain.ts +9 -9
- package/src/hooks/useSyncExternalStoreWithTracked.ts +18 -20
- package/src/hooks/useToken.ts +1 -1
- package/src/hooks/useTransaction.ts +7 -4
- package/src/hooks/useTransactionConfirmations.ts +5 -8
- package/src/hooks/useTransactionCount.ts +4 -4
- package/src/hooks/useTransactionReceipt.ts +13 -13
- package/src/hooks/useVerifyMessage.ts +4 -4
- package/src/hooks/useVerifyTypedData.ts +5 -5
- package/src/hooks/useWaitForTransactionReceipt.ts +7 -4
- package/src/hooks/useWalletClient.ts +9 -6
- package/src/hooks/useWatchBlockNumber.ts +5 -3
- package/src/hooks/useWatchBlocks.ts +5 -3
- package/src/hooks/useWatchContractEvent.ts +5 -3
- package/src/hooks/useWatchPendingTransactions.ts +5 -3
- package/src/hydrate.ts +1 -1
- package/src/types/properties.ts +3 -3
- package/src/utils/query.ts +6 -6
- package/src/version.ts +1 -1
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import type {
|
|
4
|
+
Config,
|
|
5
|
+
GetTransactionReceiptErrorType,
|
|
6
|
+
ResolvedRegister,
|
|
7
7
|
} from '@wagmi/core'
|
|
8
|
-
import {
|
|
8
|
+
import type { Evaluate } from '@wagmi/core/internal'
|
|
9
9
|
import {
|
|
10
10
|
type GetTransactionReceiptData,
|
|
11
11
|
type GetTransactionReceiptOptions,
|
|
12
12
|
type GetTransactionReceiptQueryKey,
|
|
13
13
|
getTransactionReceiptQueryOptions,
|
|
14
14
|
} from '@wagmi/core/query'
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
type ConfigParameter,
|
|
18
|
-
type QueryParameter,
|
|
19
|
-
} from '../types/properties.js'
|
|
15
|
+
import type { GetTransactionReceiptQueryFnData } from '@wagmi/core/query'
|
|
16
|
+
import type { ConfigParameter, QueryParameter } from '../types/properties.js'
|
|
20
17
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
21
18
|
import { useChainId } from './useChainId.js'
|
|
22
19
|
import { useConfig } from './useConfig.js'
|
|
23
20
|
|
|
24
21
|
export type UseTransactionReceiptParameters<
|
|
25
22
|
config extends Config = Config,
|
|
26
|
-
chainId extends
|
|
23
|
+
chainId extends
|
|
24
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
27
25
|
selectData = GetTransactionReceiptData<config, chainId>,
|
|
28
26
|
> = Evaluate<
|
|
29
27
|
GetTransactionReceiptOptions<config, chainId> &
|
|
@@ -38,14 +36,16 @@ export type UseTransactionReceiptParameters<
|
|
|
38
36
|
|
|
39
37
|
export type UseTransactionReceiptReturnType<
|
|
40
38
|
config extends Config = Config,
|
|
41
|
-
chainId extends
|
|
39
|
+
chainId extends
|
|
40
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
42
41
|
selectData = GetTransactionReceiptData<config, chainId>,
|
|
43
42
|
> = UseQueryReturnType<selectData, GetTransactionReceiptErrorType>
|
|
44
43
|
|
|
45
44
|
/** https://wagmi.sh/react/api/hooks/useTransactionReceipt */
|
|
46
45
|
export function useTransactionReceipt<
|
|
47
46
|
config extends Config = ResolvedRegister['config'],
|
|
48
|
-
chainId extends
|
|
47
|
+
chainId extends
|
|
48
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
49
49
|
selectData = GetTransactionReceiptData<config, chainId>,
|
|
50
50
|
>(
|
|
51
51
|
parameters: UseTransactionReceiptParameters<config, chainId, selectData> = {},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import type {
|
|
4
|
+
Config,
|
|
5
|
+
ResolvedRegister,
|
|
6
|
+
VerifyMessageErrorType,
|
|
7
7
|
} from '@wagmi/core'
|
|
8
8
|
import type { Evaluate } from '@wagmi/core/internal'
|
|
9
9
|
import {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import type {
|
|
4
|
+
Config,
|
|
5
|
+
ResolvedRegister,
|
|
6
|
+
VerifyTypedDataErrorType,
|
|
7
7
|
} from '@wagmi/core'
|
|
8
8
|
import {
|
|
9
9
|
type VerifyTypedDataData,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
verifyTypedDataQueryOptions,
|
|
13
13
|
} from '@wagmi/core/query'
|
|
14
14
|
import type { VerifyTypedDataQueryFnData } from '@wagmi/core/query'
|
|
15
|
-
import {
|
|
15
|
+
import type { TypedData } from 'viem'
|
|
16
16
|
import type { ConfigParameter, QueryParameter } from '../types/properties.js'
|
|
17
17
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
18
18
|
import { useChainId } from './useChainId.js'
|
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
ResolvedRegister,
|
|
6
6
|
WaitForTransactionReceiptErrorType,
|
|
7
7
|
} from '@wagmi/core'
|
|
8
|
-
import {
|
|
8
|
+
import type { Evaluate } from '@wagmi/core/internal'
|
|
9
9
|
import {
|
|
10
10
|
type WaitForTransactionReceiptData,
|
|
11
11
|
type WaitForTransactionReceiptOptions,
|
|
@@ -21,7 +21,8 @@ import { useConfig } from './useConfig.js'
|
|
|
21
21
|
|
|
22
22
|
export type UseWaitForTransactionReceiptParameters<
|
|
23
23
|
config extends Config = Config,
|
|
24
|
-
chainId extends
|
|
24
|
+
chainId extends
|
|
25
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
25
26
|
selectData = WaitForTransactionReceiptData<config, chainId>,
|
|
26
27
|
> = Evaluate<
|
|
27
28
|
WaitForTransactionReceiptOptions<config, chainId> &
|
|
@@ -36,14 +37,16 @@ export type UseWaitForTransactionReceiptParameters<
|
|
|
36
37
|
|
|
37
38
|
export type UseWaitForTransactionReceiptReturnType<
|
|
38
39
|
config extends Config = Config,
|
|
39
|
-
chainId extends
|
|
40
|
+
chainId extends
|
|
41
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
40
42
|
selectData = WaitForTransactionReceiptData<config, chainId>,
|
|
41
43
|
> = UseQueryReturnType<selectData, WaitForTransactionReceiptErrorType>
|
|
42
44
|
|
|
43
45
|
/** https://wagmi.sh/react/api/hooks/useWaitForTransactionReceipt */
|
|
44
46
|
export function useWaitForTransactionReceipt<
|
|
45
47
|
config extends Config = ResolvedRegister['config'],
|
|
46
|
-
chainId extends
|
|
48
|
+
chainId extends
|
|
49
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
47
50
|
selectData = WaitForTransactionReceiptData<config, chainId>,
|
|
48
51
|
>(
|
|
49
52
|
parameters: UseWaitForTransactionReceiptParameters<
|
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
GetWalletClientErrorType,
|
|
10
10
|
ResolvedRegister,
|
|
11
11
|
} from '@wagmi/core'
|
|
12
|
-
import {
|
|
12
|
+
import type { Evaluate, Omit } from '@wagmi/core/internal'
|
|
13
13
|
import {
|
|
14
14
|
type GetWalletClientData,
|
|
15
15
|
type GetWalletClientOptions,
|
|
@@ -31,7 +31,8 @@ import { useConfig } from './useConfig.js'
|
|
|
31
31
|
|
|
32
32
|
export type UseWalletClientParameters<
|
|
33
33
|
config extends Config = Config,
|
|
34
|
-
chainId extends
|
|
34
|
+
chainId extends
|
|
35
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
35
36
|
selectData = GetWalletClientData<config, chainId>,
|
|
36
37
|
> = Evaluate<
|
|
37
38
|
GetWalletClientOptions<config, chainId> &
|
|
@@ -54,14 +55,16 @@ export type UseWalletClientParameters<
|
|
|
54
55
|
|
|
55
56
|
export type UseWalletClientReturnType<
|
|
56
57
|
config extends Config = Config,
|
|
57
|
-
chainId extends
|
|
58
|
+
chainId extends
|
|
59
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
58
60
|
selectData = GetWalletClientData<config, chainId>,
|
|
59
61
|
> = UseQueryReturnType<selectData, GetWalletClientErrorType>
|
|
60
62
|
|
|
61
63
|
/** https://wagmi.sh/react/api/hooks/useWalletClient */
|
|
62
64
|
export function useWalletClient<
|
|
63
65
|
config extends Config = ResolvedRegister['config'],
|
|
64
|
-
chainId extends
|
|
66
|
+
chainId extends
|
|
67
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
65
68
|
selectData = GetWalletClientData<config, chainId>,
|
|
66
69
|
>(
|
|
67
70
|
parameters: UseWalletClientParameters<config, chainId, selectData> = {},
|
|
@@ -84,7 +87,7 @@ export function useWalletClient<
|
|
|
84
87
|
const enabled = Boolean(status !== 'disconnected' && (query.enabled ?? true))
|
|
85
88
|
|
|
86
89
|
const addressRef = useRef(address)
|
|
87
|
-
// biome-ignore lint/
|
|
90
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: `queryKey` not required
|
|
88
91
|
useEffect(() => {
|
|
89
92
|
const previousAddress = addressRef.current
|
|
90
93
|
if (!address && previousAddress) {
|
|
@@ -103,6 +106,6 @@ export function useWalletClient<
|
|
|
103
106
|
...options,
|
|
104
107
|
queryKey,
|
|
105
108
|
enabled,
|
|
106
|
-
staleTime:
|
|
109
|
+
staleTime: Number.POSITIVE_INFINITY,
|
|
107
110
|
} as any) as UseWalletClientReturnType<config, chainId, selectData>
|
|
108
111
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type WatchBlockNumberParameters,
|
|
7
7
|
watchBlockNumber,
|
|
8
8
|
} from '@wagmi/core'
|
|
9
|
-
import {
|
|
9
|
+
import type { UnionEvaluate, UnionPartial } from '@wagmi/core/internal'
|
|
10
10
|
import { useEffect } from 'react'
|
|
11
11
|
|
|
12
12
|
import type { ConfigParameter, EnabledParameter } from '../types/properties.js'
|
|
@@ -15,7 +15,8 @@ import { useConfig } from './useConfig.js'
|
|
|
15
15
|
|
|
16
16
|
export type UseWatchBlockNumberParameters<
|
|
17
17
|
config extends Config = Config,
|
|
18
|
-
chainId extends
|
|
18
|
+
chainId extends
|
|
19
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
19
20
|
> = UnionEvaluate<
|
|
20
21
|
UnionPartial<WatchBlockNumberParameters<config, chainId>> &
|
|
21
22
|
ConfigParameter<config> &
|
|
@@ -27,7 +28,8 @@ export type UseWatchBlockNumberReturnType = void
|
|
|
27
28
|
/** https://wagmi.sh/react/api/hooks/useWatchBlockNumber */
|
|
28
29
|
export function useWatchBlockNumber<
|
|
29
30
|
config extends Config = ResolvedRegister['config'],
|
|
30
|
-
chainId extends
|
|
31
|
+
chainId extends
|
|
32
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
31
33
|
>(
|
|
32
34
|
parameters: UseWatchBlockNumberParameters<config, chainId> = {} as any,
|
|
33
35
|
): UseWatchBlockNumberReturnType {
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type WatchBlocksParameters,
|
|
7
7
|
watchBlocks,
|
|
8
8
|
} from '@wagmi/core'
|
|
9
|
-
import {
|
|
9
|
+
import type { UnionEvaluate, UnionPartial } from '@wagmi/core/internal'
|
|
10
10
|
import { useEffect } from 'react'
|
|
11
11
|
import type { BlockTag } from 'viem'
|
|
12
12
|
|
|
@@ -18,7 +18,8 @@ export type UseWatchBlocksParameters<
|
|
|
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
|
> = UnionEvaluate<
|
|
23
24
|
UnionPartial<
|
|
24
25
|
WatchBlocksParameters<includeTransactions, blockTag, config, chainId>
|
|
@@ -32,7 +33,8 @@ export type UseWatchBlocksReturnType = void
|
|
|
32
33
|
/** https://wagmi.sh/react/hooks/useWatchBlocks */
|
|
33
34
|
export function useWatchBlocks<
|
|
34
35
|
config extends Config = ResolvedRegister['config'],
|
|
35
|
-
chainId extends
|
|
36
|
+
chainId extends
|
|
37
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
36
38
|
includeTransactions extends boolean = false,
|
|
37
39
|
blockTag extends BlockTag = 'latest',
|
|
38
40
|
>(
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type WatchContractEventParameters,
|
|
7
7
|
watchContractEvent,
|
|
8
8
|
} from '@wagmi/core'
|
|
9
|
-
import {
|
|
9
|
+
import type { UnionEvaluate, UnionPartial } from '@wagmi/core/internal'
|
|
10
10
|
import { useEffect } from 'react'
|
|
11
11
|
|
|
12
12
|
import type { Abi, ContractEventName } from 'viem'
|
|
@@ -19,7 +19,8 @@ export type UseWatchContractEventParameters<
|
|
|
19
19
|
eventName extends ContractEventName<abi> = ContractEventName<abi>,
|
|
20
20
|
strict extends boolean | undefined = undefined,
|
|
21
21
|
config extends Config = Config,
|
|
22
|
-
chainId extends
|
|
22
|
+
chainId extends
|
|
23
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
23
24
|
> = UnionEvaluate<
|
|
24
25
|
UnionPartial<
|
|
25
26
|
WatchContractEventParameters<abi, eventName, strict, config, chainId>
|
|
@@ -36,7 +37,8 @@ export function useWatchContractEvent<
|
|
|
36
37
|
eventName extends ContractEventName<abi>,
|
|
37
38
|
strict extends boolean | undefined = undefined,
|
|
38
39
|
config extends Config = ResolvedRegister['config'],
|
|
39
|
-
chainId extends
|
|
40
|
+
chainId extends
|
|
41
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
40
42
|
>(
|
|
41
43
|
parameters: UseWatchContractEventParameters<
|
|
42
44
|
abi,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type WatchPendingTransactionsParameters,
|
|
7
7
|
watchPendingTransactions,
|
|
8
8
|
} from '@wagmi/core'
|
|
9
|
-
import {
|
|
9
|
+
import type { UnionEvaluate, UnionPartial } from '@wagmi/core/internal'
|
|
10
10
|
import { useEffect } from 'react'
|
|
11
11
|
|
|
12
12
|
import type { ConfigParameter, EnabledParameter } from '../types/properties.js'
|
|
@@ -15,7 +15,8 @@ import { useConfig } from './useConfig.js'
|
|
|
15
15
|
|
|
16
16
|
export type UseWatchPendingTransactionsParameters<
|
|
17
17
|
config extends Config = Config,
|
|
18
|
-
chainId extends
|
|
18
|
+
chainId extends
|
|
19
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
19
20
|
> = UnionEvaluate<
|
|
20
21
|
UnionPartial<WatchPendingTransactionsParameters<config, chainId>> &
|
|
21
22
|
ConfigParameter<config> &
|
|
@@ -27,7 +28,8 @@ export type UseWatchPendingTransactionsReturnType = void
|
|
|
27
28
|
/** https://wagmi.sh/react/api/hooks/useWatchPendingTransactions */
|
|
28
29
|
export function useWatchPendingTransactions<
|
|
29
30
|
config extends Config = ResolvedRegister['config'],
|
|
30
|
-
chainId extends
|
|
31
|
+
chainId extends
|
|
32
|
+
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
31
33
|
>(
|
|
32
34
|
parameters: UseWatchPendingTransactionsParameters<
|
|
33
35
|
config,
|
package/src/hydrate.ts
CHANGED
|
@@ -22,7 +22,7 @@ export function Hydrate(parameters: React.PropsWithChildren<HydrateProps>) {
|
|
|
22
22
|
|
|
23
23
|
// Hydrate for SSR
|
|
24
24
|
const active = useRef(true)
|
|
25
|
-
// biome-ignore lint/
|
|
25
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: `queryKey` not required
|
|
26
26
|
useEffect(() => {
|
|
27
27
|
if (!active.current) return
|
|
28
28
|
if (!config._internal.ssr) return
|
package/src/types/properties.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { DefaultError, QueryKey } from '@tanstack/react-query'
|
|
2
|
+
import type { Config } from '@wagmi/core'
|
|
3
|
+
import type { Omit } from '@wagmi/core/internal'
|
|
4
4
|
|
|
5
5
|
import type {
|
|
6
6
|
UseInfiniteQueryParameters,
|
package/src/utils/query.ts
CHANGED
|
@@ -8,14 +8,14 @@ import {
|
|
|
8
8
|
type UseQueryOptions,
|
|
9
9
|
type UseQueryResult,
|
|
10
10
|
useInfiniteQuery as tanstack_useInfiniteQuery,
|
|
11
|
-
useMutation,
|
|
12
11
|
useQuery as tanstack_useQuery,
|
|
12
|
+
useMutation,
|
|
13
13
|
} from '@tanstack/react-query'
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
import type {
|
|
15
|
+
Evaluate,
|
|
16
|
+
ExactPartial,
|
|
17
|
+
Omit,
|
|
18
|
+
UnionOmit,
|
|
19
19
|
} from '@wagmi/core/internal'
|
|
20
20
|
import { hashFn } from '@wagmi/core/query'
|
|
21
21
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.9.
|
|
1
|
+
export const version = '2.9.8'
|