@wagmi/core 3.2.1 → 3.2.3
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/deployContract.js +7 -1
- package/dist/esm/actions/deployContract.js.map +1 -1
- package/dist/esm/actions/prepareTransactionRequest.js.map +1 -1
- package/dist/esm/actions/sendTransaction.js +7 -1
- package/dist/esm/actions/sendTransaction.js.map +1 -1
- package/dist/esm/actions/sendTransactionSync.js +7 -1
- package/dist/esm/actions/sendTransactionSync.js.map +1 -1
- package/dist/esm/actions/simulateContract.js.map +1 -1
- package/dist/esm/actions/writeContract.js +7 -1
- package/dist/esm/actions/writeContract.js.map +1 -1
- package/dist/esm/exports/internal.js.map +1 -1
- package/dist/esm/exports/query.js.map +1 -1
- package/dist/esm/query/call.js +4 -3
- package/dist/esm/query/call.js.map +1 -1
- package/dist/esm/query/estimateFeesPerGas.js +3 -2
- package/dist/esm/query/estimateFeesPerGas.js.map +1 -1
- package/dist/esm/query/estimateGas.js +12 -7
- package/dist/esm/query/estimateGas.js.map +1 -1
- package/dist/esm/query/estimateMaxPriorityFeePerGas.js +3 -2
- package/dist/esm/query/estimateMaxPriorityFeePerGas.js.map +1 -1
- package/dist/esm/query/getBalance.js +6 -4
- package/dist/esm/query/getBalance.js.map +1 -1
- package/dist/esm/query/getBlock.js +3 -2
- package/dist/esm/query/getBlock.js.map +1 -1
- package/dist/esm/query/getBlockNumber.js +3 -2
- package/dist/esm/query/getBlockNumber.js.map +1 -1
- package/dist/esm/query/getBlockTransactionCount.js +3 -2
- package/dist/esm/query/getBlockTransactionCount.js.map +1 -1
- package/dist/esm/query/getBytecode.js +10 -5
- package/dist/esm/query/getBytecode.js.map +1 -1
- package/dist/esm/query/getCallsStatus.js +6 -8
- package/dist/esm/query/getCallsStatus.js.map +1 -1
- package/dist/esm/query/getCapabilities.js +6 -8
- package/dist/esm/query/getCapabilities.js.map +1 -1
- package/dist/esm/query/getConnectorClient.js +7 -9
- package/dist/esm/query/getConnectorClient.js.map +1 -1
- package/dist/esm/query/getEnsAddress.js +6 -4
- package/dist/esm/query/getEnsAddress.js.map +1 -1
- package/dist/esm/query/getEnsAvatar.js +6 -4
- package/dist/esm/query/getEnsAvatar.js.map +1 -1
- package/dist/esm/query/getEnsName.js +6 -4
- package/dist/esm/query/getEnsName.js.map +1 -1
- package/dist/esm/query/getEnsResolver.js +6 -4
- package/dist/esm/query/getEnsResolver.js.map +1 -1
- package/dist/esm/query/getEnsText.js +10 -4
- package/dist/esm/query/getEnsText.js.map +1 -1
- package/dist/esm/query/getFeeHistory.js +10 -6
- package/dist/esm/query/getFeeHistory.js.map +1 -1
- package/dist/esm/query/getGasPrice.js +3 -2
- package/dist/esm/query/getGasPrice.js.map +1 -1
- package/dist/esm/query/getProof.js +13 -5
- package/dist/esm/query/getProof.js.map +1 -1
- package/dist/esm/query/getStorageAt.js +11 -5
- package/dist/esm/query/getStorageAt.js.map +1 -1
- package/dist/esm/query/getTransaction.js +14 -8
- package/dist/esm/query/getTransaction.js.map +1 -1
- package/dist/esm/query/getTransactionConfirmations.js +8 -5
- package/dist/esm/query/getTransactionConfirmations.js.map +1 -1
- package/dist/esm/query/getTransactionCount.js +6 -4
- package/dist/esm/query/getTransactionCount.js.map +1 -1
- package/dist/esm/query/getTransactionReceipt.js +10 -5
- package/dist/esm/query/getTransactionReceipt.js.map +1 -1
- package/dist/esm/query/getWalletClient.js +12 -9
- package/dist/esm/query/getWalletClient.js.map +1 -1
- package/dist/esm/query/infiniteReadContracts.js +1 -1
- package/dist/esm/query/infiniteReadContracts.js.map +1 -1
- package/dist/esm/query/prepareTransactionRequest.js +7 -5
- package/dist/esm/query/prepareTransactionRequest.js.map +1 -1
- package/dist/esm/query/readContract.js +18 -21
- package/dist/esm/query/readContract.js.map +1 -1
- package/dist/esm/query/readContracts.js +5 -4
- package/dist/esm/query/readContracts.js.map +1 -1
- package/dist/esm/query/simulateContract.js +18 -10
- package/dist/esm/query/simulateContract.js.map +1 -1
- package/dist/esm/query/utils.js +3 -1
- package/dist/esm/query/utils.js.map +1 -1
- package/dist/esm/query/verifyMessage.js +20 -7
- package/dist/esm/query/verifyMessage.js.map +1 -1
- package/dist/esm/query/verifyTypedData.js +20 -13
- package/dist/esm/query/verifyTypedData.js.map +1 -1
- package/dist/esm/query/waitForCallsStatus.js +14 -11
- package/dist/esm/query/waitForCallsStatus.js.map +1 -1
- package/dist/esm/query/waitForTransactionReceipt.js +6 -4
- package/dist/esm/query/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/tempo/Connectors.js +4 -2
- package/dist/esm/tempo/Connectors.js.map +1 -1
- package/dist/esm/tempo/KeyManager.js +49 -1
- package/dist/esm/tempo/KeyManager.js.map +1 -1
- package/dist/esm/tempo/actions/amm.js +1 -1
- package/dist/esm/tempo/actions/amm.js.map +1 -1
- package/dist/esm/tempo/actions/fee.js +1 -1
- package/dist/esm/tempo/actions/fee.js.map +1 -1
- package/dist/esm/tempo/actions/nonce.js +1 -1
- package/dist/esm/tempo/actions/nonce.js.map +1 -1
- package/dist/esm/tempo/actions/utils.js +17 -1
- package/dist/esm/tempo/actions/utils.js.map +1 -1
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/types/query.js +2 -0
- package/dist/esm/types/query.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/actions/deployContract.d.ts.map +1 -1
- package/dist/types/actions/prepareTransactionRequest.d.ts +2 -2
- package/dist/types/actions/prepareTransactionRequest.d.ts.map +1 -1
- package/dist/types/actions/sendTransaction.d.ts.map +1 -1
- package/dist/types/actions/sendTransactionSync.d.ts.map +1 -1
- package/dist/types/actions/simulateContract.d.ts +5 -3
- package/dist/types/actions/simulateContract.d.ts.map +1 -1
- package/dist/types/actions/verifyTypedData.d.ts +2 -2
- package/dist/types/actions/verifyTypedData.d.ts.map +1 -1
- package/dist/types/actions/writeContract.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 +34 -34
- package/dist/types/exports/query.d.ts.map +1 -1
- package/dist/types/query/call.d.ts +34 -13
- package/dist/types/query/call.d.ts.map +1 -1
- package/dist/types/query/estimateFeesPerGas.d.ts +7 -22
- package/dist/types/query/estimateFeesPerGas.d.ts.map +1 -1
- package/dist/types/query/estimateGas.d.ts +12 -15
- package/dist/types/query/estimateGas.d.ts.map +1 -1
- package/dist/types/query/estimateMaxPriorityFeePerGas.d.ts +6 -19
- package/dist/types/query/estimateMaxPriorityFeePerGas.d.ts.map +1 -1
- package/dist/types/query/getBalance.d.ts +8 -27
- package/dist/types/query/getBalance.d.ts.map +1 -1
- package/dist/types/query/getBlock.d.ts +13 -13
- package/dist/types/query/getBlock.d.ts.map +1 -1
- package/dist/types/query/getBlockNumber.d.ts +7 -23
- package/dist/types/query/getBlockNumber.d.ts.map +1 -1
- package/dist/types/query/getBlockTransactionCount.d.ts +12 -13
- package/dist/types/query/getBlockTransactionCount.d.ts.map +1 -1
- package/dist/types/query/getBytecode.d.ts +12 -13
- package/dist/types/query/getBytecode.d.ts.map +1 -1
- package/dist/types/query/getCallsStatus.d.ts +7 -36
- package/dist/types/query/getCallsStatus.d.ts.map +1 -1
- package/dist/types/query/getCapabilities.d.ts +8 -50
- package/dist/types/query/getCapabilities.d.ts.map +1 -1
- package/dist/types/query/getConnectorClient.d.ts +11 -521
- package/dist/types/query/getConnectorClient.d.ts.map +1 -1
- package/dist/types/query/getEnsAddress.d.ts +8 -35
- package/dist/types/query/getEnsAddress.d.ts.map +1 -1
- package/dist/types/query/getEnsAvatar.d.ts +7 -34
- package/dist/types/query/getEnsAvatar.d.ts.map +1 -1
- package/dist/types/query/getEnsName.d.ts +8 -35
- package/dist/types/query/getEnsName.d.ts.map +1 -1
- package/dist/types/query/getEnsResolver.d.ts +8 -29
- package/dist/types/query/getEnsResolver.d.ts.map +1 -1
- package/dist/types/query/getEnsText.d.ts +9 -36
- package/dist/types/query/getEnsText.d.ts.map +1 -1
- package/dist/types/query/getFeeHistory.d.ts +9 -30
- package/dist/types/query/getFeeHistory.d.ts.map +1 -1
- package/dist/types/query/getGasPrice.d.ts +6 -19
- package/dist/types/query/getGasPrice.d.ts.map +1 -1
- package/dist/types/query/getProof.d.ts +13 -13
- package/dist/types/query/getProof.d.ts.map +1 -1
- package/dist/types/query/getStorageAt.d.ts +13 -13
- package/dist/types/query/getStorageAt.d.ts.map +1 -1
- package/dist/types/query/getTransaction.d.ts +16 -15
- package/dist/types/query/getTransaction.d.ts.map +1 -1
- package/dist/types/query/getTransactionConfirmations.d.ts +9 -13
- package/dist/types/query/getTransactionConfirmations.d.ts.map +1 -1
- package/dist/types/query/getTransactionCount.d.ts +8 -27
- package/dist/types/query/getTransactionCount.d.ts.map +1 -1
- package/dist/types/query/getTransactionReceipt.d.ts +7 -24
- package/dist/types/query/getTransactionReceipt.d.ts.map +1 -1
- package/dist/types/query/getWalletClient.d.ts +11 -31
- package/dist/types/query/getWalletClient.d.ts.map +1 -1
- package/dist/types/query/infiniteReadContracts.d.ts +13 -13
- package/dist/types/query/infiniteReadContracts.d.ts.map +1 -1
- package/dist/types/query/prepareTransactionRequest.d.ts +9 -13
- package/dist/types/query/prepareTransactionRequest.d.ts.map +1 -1
- package/dist/types/query/readContract.d.ts +9 -167
- package/dist/types/query/readContract.d.ts.map +1 -1
- package/dist/types/query/readContracts.d.ts +18 -60
- package/dist/types/query/readContracts.d.ts.map +1 -1
- package/dist/types/query/simulateContract.d.ts +11 -14
- package/dist/types/query/simulateContract.d.ts.map +1 -1
- package/dist/types/query/utils.d.ts +9 -1
- package/dist/types/query/utils.d.ts.map +1 -1
- package/dist/types/query/verifyMessage.d.ts +8 -43
- package/dist/types/query/verifyMessage.d.ts.map +1 -1
- package/dist/types/query/verifyTypedData.d.ts +10 -14
- package/dist/types/query/verifyTypedData.d.ts.map +1 -1
- package/dist/types/query/waitForCallsStatus.d.ts +9 -56
- package/dist/types/query/waitForCallsStatus.d.ts.map +1 -1
- package/dist/types/query/waitForTransactionReceipt.d.ts +11 -46
- package/dist/types/query/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/tempo/Connectors.d.ts.map +1 -1
- package/dist/types/tempo/KeyManager.d.ts.map +1 -1
- package/dist/types/tempo/actions/amm.d.ts.map +1 -1
- package/dist/types/tempo/actions/fee.d.ts.map +1 -1
- package/dist/types/tempo/actions/nonce.d.ts.map +1 -1
- package/dist/types/tempo/actions/utils.d.ts +1 -0
- package/dist/types/tempo/actions/utils.d.ts.map +1 -1
- package/dist/types/types/query.d.ts +9 -0
- package/dist/types/types/query.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/actions/deployContract.ts +7 -1
- package/src/actions/prepareTransactionRequest.ts +9 -12
- package/src/actions/sendTransaction.ts +7 -1
- package/src/actions/sendTransactionSync.ts +7 -1
- package/src/actions/simulateContract.ts +11 -19
- package/src/actions/verifyTypedData.ts +2 -2
- package/src/actions/writeContract.ts +7 -1
- package/src/exports/internal.ts +2 -0
- package/src/exports/query.ts +34 -0
- package/src/query/call.ts +29 -16
- package/src/query/estimateFeesPerGas.ts +34 -12
- package/src/query/estimateGas.ts +53 -24
- package/src/query/estimateMaxPriorityFeePerGas.ts +37 -18
- package/src/query/getBalance.ts +38 -20
- package/src/query/getBlock.ts +50 -16
- package/src/query/getBlockNumber.ts +34 -13
- package/src/query/getBlockTransactionCount.ts +34 -15
- package/src/query/getBytecode.ts +41 -19
- package/src/query/getCallsStatus.ts +36 -21
- package/src/query/getCapabilities.ts +40 -18
- package/src/query/getConnectorClient.ts +45 -20
- package/src/query/getEnsAddress.ts +37 -19
- package/src/query/getEnsAvatar.ts +37 -19
- package/src/query/getEnsName.ts +37 -19
- package/src/query/getEnsResolver.ts +38 -18
- package/src/query/getEnsText.ts +44 -19
- package/src/query/getFeeHistory.ts +46 -28
- package/src/query/getGasPrice.ts +34 -13
- package/src/query/getProof.ts +45 -19
- package/src/query/getStorageAt.ts +44 -19
- package/src/query/getTransaction.ts +51 -19
- package/src/query/getTransactionConfirmations.ts +46 -23
- package/src/query/getTransactionCount.ts +41 -22
- package/src/query/getTransactionReceipt.ts +42 -14
- package/src/query/getWalletClient.ts +46 -20
- package/src/query/infiniteReadContracts.ts +1 -1
- package/src/query/prepareTransactionRequest.ts +45 -17
- package/src/query/readContract.ts +55 -36
- package/src/query/readContracts.ts +38 -16
- package/src/query/simulateContract.ts +68 -33
- package/src/query/utils.ts +14 -5
- package/src/query/verifyMessage.ts +50 -26
- package/src/query/verifyTypedData.ts +65 -38
- package/src/query/waitForCallsStatus.ts +47 -25
- package/src/query/waitForTransactionReceipt.ts +36 -16
- package/src/tempo/Connectors.ts +3 -4
- package/src/tempo/KeyManager.ts +64 -1
- package/src/tempo/actions/amm.ts +2 -2
- package/src/tempo/actions/fee.ts +1 -1
- package/src/tempo/actions/nonce.ts +1 -1
- package/src/tempo/actions/utils.ts +26 -0
- package/src/types/query.ts +40 -0
- package/src/version.ts +1 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import type { QueryOptions } from '@tanstack/query-core'
|
|
2
1
|
import type {
|
|
3
2
|
ContractFunctionParameters,
|
|
4
3
|
MulticallParameters as viem_MulticallParameters,
|
|
5
4
|
} from 'viem'
|
|
6
|
-
|
|
7
5
|
import {
|
|
8
6
|
type ReadContractsErrorType,
|
|
9
7
|
type ReadContractsReturnType,
|
|
@@ -14,6 +12,7 @@ import type {
|
|
|
14
12
|
ChainIdParameter,
|
|
15
13
|
ScopeKeyParameter,
|
|
16
14
|
} from '../types/properties.js'
|
|
15
|
+
import type { QueryOptions, QueryParameter } from '../types/query.js'
|
|
17
16
|
import type { ExactPartial } from '../types/utils.js'
|
|
18
17
|
import { filterQueryOptions } from './utils.js'
|
|
19
18
|
|
|
@@ -21,6 +20,7 @@ export type ReadContractsOptions<
|
|
|
21
20
|
contracts extends readonly unknown[],
|
|
22
21
|
allowFailure extends boolean,
|
|
23
22
|
config extends Config,
|
|
23
|
+
selectData = ReadContractsData<contracts, allowFailure>,
|
|
24
24
|
> = ExactPartial<
|
|
25
25
|
viem_MulticallParameters<
|
|
26
26
|
contracts,
|
|
@@ -28,39 +28,42 @@ export type ReadContractsOptions<
|
|
|
28
28
|
{ optional: true; properties: ChainIdParameter<config> }
|
|
29
29
|
>
|
|
30
30
|
> &
|
|
31
|
-
ScopeKeyParameter
|
|
31
|
+
ScopeKeyParameter &
|
|
32
|
+
QueryParameter<
|
|
33
|
+
ReadContractsQueryFnData<contracts, allowFailure>,
|
|
34
|
+
ReadContractsErrorType,
|
|
35
|
+
selectData,
|
|
36
|
+
ReadContractsQueryKey<contracts, allowFailure, config>
|
|
37
|
+
>
|
|
32
38
|
|
|
33
39
|
export function readContractsQueryOptions<
|
|
34
40
|
config extends Config,
|
|
35
41
|
const contracts extends readonly unknown[],
|
|
36
42
|
allowFailure extends boolean = true,
|
|
43
|
+
selectData = ReadContractsData<contracts, allowFailure>,
|
|
37
44
|
>(
|
|
38
45
|
config: config,
|
|
39
|
-
options: ReadContractsOptions<contracts, allowFailure, config> &
|
|
46
|
+
options: ReadContractsOptions<contracts, allowFailure, config, selectData> &
|
|
40
47
|
ChainIdParameter<config> = {},
|
|
41
|
-
) {
|
|
48
|
+
): ReadContractsQueryOptions<contracts, allowFailure, config, selectData> {
|
|
42
49
|
return {
|
|
43
|
-
|
|
50
|
+
...options.query,
|
|
51
|
+
queryFn: async (context) => {
|
|
44
52
|
const contracts: ContractFunctionParameters[] = []
|
|
45
|
-
const length = queryKey[1].contracts.length
|
|
53
|
+
const length = context.queryKey[1].contracts.length
|
|
46
54
|
for (let i = 0; i < length; i++) {
|
|
47
|
-
const contract = queryKey[1].contracts[i]!
|
|
55
|
+
const contract = context.queryKey[1].contracts[i]!
|
|
48
56
|
const abi = (options.contracts?.[i] as ContractFunctionParameters).abi
|
|
49
57
|
contracts.push({ ...contract, abi })
|
|
50
58
|
}
|
|
51
|
-
const { scopeKey: _, ...parameters } = queryKey[1]
|
|
59
|
+
const { scopeKey: _, ...parameters } = context.queryKey[1]
|
|
52
60
|
return readContracts(config, {
|
|
53
61
|
...parameters,
|
|
54
62
|
contracts,
|
|
55
63
|
}) as Promise<ReadContractsReturnType<contracts, allowFailure>>
|
|
56
64
|
},
|
|
57
65
|
queryKey: readContractsQueryKey(options),
|
|
58
|
-
}
|
|
59
|
-
ReadContractsQueryFnData<contracts, allowFailure>,
|
|
60
|
-
ReadContractsErrorType,
|
|
61
|
-
ReadContractsData<contracts, allowFailure>,
|
|
62
|
-
ReadContractsQueryKey<contracts, allowFailure, config>
|
|
63
|
-
>
|
|
66
|
+
}
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
export type ReadContractsQueryFnData<
|
|
@@ -78,7 +81,14 @@ export function readContractsQueryKey<
|
|
|
78
81
|
const contracts extends readonly unknown[],
|
|
79
82
|
allowFailure extends boolean,
|
|
80
83
|
>(
|
|
81
|
-
options:
|
|
84
|
+
options: ExactPartial<
|
|
85
|
+
viem_MulticallParameters<
|
|
86
|
+
contracts,
|
|
87
|
+
allowFailure,
|
|
88
|
+
{ optional: true; properties: ChainIdParameter<config> }
|
|
89
|
+
>
|
|
90
|
+
> &
|
|
91
|
+
ScopeKeyParameter &
|
|
82
92
|
ChainIdParameter<config> = {},
|
|
83
93
|
) {
|
|
84
94
|
const contracts = []
|
|
@@ -98,3 +108,15 @@ export type ReadContractsQueryKey<
|
|
|
98
108
|
allowFailure extends boolean,
|
|
99
109
|
config extends Config,
|
|
100
110
|
> = ReturnType<typeof readContractsQueryKey<config, contracts, allowFailure>>
|
|
111
|
+
|
|
112
|
+
export type ReadContractsQueryOptions<
|
|
113
|
+
contracts extends readonly unknown[],
|
|
114
|
+
allowFailure extends boolean,
|
|
115
|
+
config extends Config,
|
|
116
|
+
selectData = ReadContractsData<contracts, allowFailure>,
|
|
117
|
+
> = QueryOptions<
|
|
118
|
+
ReadContractsQueryFnData<contracts, allowFailure>,
|
|
119
|
+
ReadContractsErrorType,
|
|
120
|
+
selectData,
|
|
121
|
+
ReadContractsQueryKey<contracts, allowFailure, config>
|
|
122
|
+
>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { QueryOptions } from '@tanstack/query-core'
|
|
2
1
|
import type { Abi, ContractFunctionArgs, ContractFunctionName } from 'viem'
|
|
3
2
|
|
|
4
3
|
import {
|
|
@@ -9,6 +8,7 @@ import {
|
|
|
9
8
|
} from '../actions/simulateContract.js'
|
|
10
9
|
import type { Config } from '../createConfig.js'
|
|
11
10
|
import type { ScopeKeyParameter } from '../types/properties.js'
|
|
11
|
+
import type { QueryOptions, QueryParameter } from '../types/query.js'
|
|
12
12
|
import type { UnionExactPartial } from '../types/utils.js'
|
|
13
13
|
import { filterQueryOptions } from './utils.js'
|
|
14
14
|
|
|
@@ -22,21 +22,29 @@ export type SimulateContractOptions<
|
|
|
22
22
|
>,
|
|
23
23
|
config extends Config,
|
|
24
24
|
chainId extends config['chains'][number]['id'] | undefined,
|
|
25
|
+
selectData = SimulateContractData<abi, functionName, args, config, chainId>,
|
|
25
26
|
> = UnionExactPartial<
|
|
26
27
|
SimulateContractParameters<abi, functionName, args, config, chainId>
|
|
27
28
|
> &
|
|
28
|
-
ScopeKeyParameter
|
|
29
|
+
ScopeKeyParameter &
|
|
30
|
+
QueryParameter<
|
|
31
|
+
SimulateContractQueryFnData<abi, functionName, args, config, chainId>,
|
|
32
|
+
SimulateContractErrorType,
|
|
33
|
+
selectData,
|
|
34
|
+
SimulateContractQueryKey<abi, functionName, args, config, chainId>
|
|
35
|
+
>
|
|
29
36
|
|
|
30
37
|
export function simulateContractQueryOptions<
|
|
31
|
-
config extends Config,
|
|
32
38
|
const abi extends Abi | readonly unknown[],
|
|
33
39
|
functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
|
34
|
-
args extends ContractFunctionArgs<
|
|
40
|
+
const args extends ContractFunctionArgs<
|
|
35
41
|
abi,
|
|
36
42
|
'nonpayable' | 'payable',
|
|
37
43
|
functionName
|
|
38
44
|
>,
|
|
45
|
+
config extends Config,
|
|
39
46
|
chainId extends config['chains'][number]['id'] | undefined,
|
|
47
|
+
selectData = SimulateContractData<abi, functionName, args, config, chainId>,
|
|
40
48
|
>(
|
|
41
49
|
config: config,
|
|
42
50
|
options: SimulateContractOptions<
|
|
@@ -44,30 +52,42 @@ export function simulateContractQueryOptions<
|
|
|
44
52
|
functionName,
|
|
45
53
|
args,
|
|
46
54
|
config,
|
|
47
|
-
chainId
|
|
55
|
+
chainId,
|
|
56
|
+
selectData
|
|
48
57
|
> = {} as any,
|
|
49
|
-
)
|
|
58
|
+
): SimulateContractQueryOptions<
|
|
59
|
+
abi,
|
|
60
|
+
functionName,
|
|
61
|
+
args,
|
|
62
|
+
config,
|
|
63
|
+
chainId,
|
|
64
|
+
selectData
|
|
65
|
+
> {
|
|
50
66
|
return {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
67
|
+
...options.query,
|
|
68
|
+
enabled: Boolean(
|
|
69
|
+
options.abi &&
|
|
70
|
+
options.address &&
|
|
71
|
+
options.connector &&
|
|
72
|
+
options.functionName &&
|
|
73
|
+
(options.query?.enabled ?? true),
|
|
74
|
+
),
|
|
75
|
+
queryFn: async (context) => {
|
|
76
|
+
if (!options.abi) throw new Error('abi is required')
|
|
77
|
+
if (!options.connector) throw new Error('connector is required')
|
|
78
|
+
const [, { scopeKey: _, ...parameters }] = context.queryKey
|
|
79
|
+
if (!parameters.address) throw new Error('address is required')
|
|
80
|
+
if (!parameters.functionName) throw new Error('functionName is required')
|
|
58
81
|
return simulateContract(config, {
|
|
59
|
-
abi,
|
|
60
|
-
connector,
|
|
61
82
|
...(parameters as any),
|
|
83
|
+
abi: options.abi,
|
|
84
|
+
address: parameters.address,
|
|
85
|
+
connector: options.connector,
|
|
86
|
+
functionName: parameters.functionName,
|
|
62
87
|
})
|
|
63
88
|
},
|
|
64
|
-
queryKey: simulateContractQueryKey(options),
|
|
65
|
-
}
|
|
66
|
-
SimulateContractQueryFnData<abi, functionName, args, config, chainId>,
|
|
67
|
-
SimulateContractErrorType,
|
|
68
|
-
SimulateContractData<abi, functionName, args, config, chainId>,
|
|
69
|
-
SimulateContractQueryKey<abi, functionName, args, config, chainId>
|
|
70
|
-
>
|
|
89
|
+
queryKey: simulateContractQueryKey(options as any),
|
|
90
|
+
}
|
|
71
91
|
}
|
|
72
92
|
|
|
73
93
|
export type SimulateContractQueryFnData<
|
|
@@ -95,25 +115,22 @@ export type SimulateContractData<
|
|
|
95
115
|
> = SimulateContractQueryFnData<abi, functionName, args, config, chainId>
|
|
96
116
|
|
|
97
117
|
export function simulateContractQueryKey<
|
|
98
|
-
config extends Config,
|
|
99
118
|
abi extends Abi | readonly unknown[],
|
|
100
119
|
functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
|
101
|
-
args extends ContractFunctionArgs<
|
|
120
|
+
const args extends ContractFunctionArgs<
|
|
102
121
|
abi,
|
|
103
122
|
'nonpayable' | 'payable',
|
|
104
123
|
functionName
|
|
105
124
|
>,
|
|
125
|
+
const config extends Config,
|
|
106
126
|
chainId extends config['chains'][number]['id'] | undefined,
|
|
107
127
|
>(
|
|
108
|
-
options:
|
|
109
|
-
abi,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
config,
|
|
113
|
-
chainId
|
|
114
|
-
> = {} as any,
|
|
128
|
+
options: UnionExactPartial<
|
|
129
|
+
SimulateContractParameters<abi, functionName, args, config, chainId>
|
|
130
|
+
> &
|
|
131
|
+
ScopeKeyParameter = {} as any,
|
|
115
132
|
) {
|
|
116
|
-
const {
|
|
133
|
+
const { connector: _, ...rest } = options
|
|
117
134
|
return ['simulateContract', filterQueryOptions(rest)] as const
|
|
118
135
|
}
|
|
119
136
|
|
|
@@ -128,5 +145,23 @@ export type SimulateContractQueryKey<
|
|
|
128
145
|
config extends Config,
|
|
129
146
|
chainId extends config['chains'][number]['id'] | undefined,
|
|
130
147
|
> = ReturnType<
|
|
131
|
-
typeof simulateContractQueryKey<
|
|
148
|
+
typeof simulateContractQueryKey<abi, functionName, args, config, chainId>
|
|
149
|
+
>
|
|
150
|
+
|
|
151
|
+
export type SimulateContractQueryOptions<
|
|
152
|
+
abi extends Abi | readonly unknown[],
|
|
153
|
+
functionName extends ContractFunctionName<abi, 'nonpayable' | 'payable'>,
|
|
154
|
+
args extends ContractFunctionArgs<
|
|
155
|
+
abi,
|
|
156
|
+
'nonpayable' | 'payable',
|
|
157
|
+
functionName
|
|
158
|
+
>,
|
|
159
|
+
config extends Config,
|
|
160
|
+
chainId extends config['chains'][number]['id'] | undefined,
|
|
161
|
+
selectData = SimulateContractData<abi, functionName, args, config, chainId>,
|
|
162
|
+
> = QueryOptions<
|
|
163
|
+
SimulateContractQueryFnData<abi, functionName, args, config, chainId>,
|
|
164
|
+
SimulateContractErrorType,
|
|
165
|
+
selectData,
|
|
166
|
+
SimulateContractQueryKey<abi, functionName, args, config, chainId>
|
|
132
167
|
>
|
package/src/query/utils.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type QueryKey, replaceEqualDeep } from '@tanstack/query-core'
|
|
2
|
+
import type { Connector } from '../createConfig.js'
|
|
3
|
+
import type { Compute, StrictOmit } from '../types/utils.js'
|
|
2
4
|
|
|
3
5
|
export function structuralSharing<data>(
|
|
4
6
|
oldData: data | undefined,
|
|
@@ -47,9 +49,16 @@ function hasObjectPrototype(o: any): boolean {
|
|
|
47
49
|
return Object.prototype.toString.call(o) === '[object Object]'
|
|
48
50
|
}
|
|
49
51
|
|
|
50
|
-
export function filterQueryOptions<
|
|
52
|
+
export function filterQueryOptions<
|
|
53
|
+
type extends Record<string, unknown> & { connector?: Connector | undefined },
|
|
54
|
+
>(
|
|
51
55
|
options: type,
|
|
52
|
-
):
|
|
56
|
+
): Compute<
|
|
57
|
+
StrictOmit<type, 'abi' | 'config' | 'connector' | 'query' | 'watch'> &
|
|
58
|
+
(type extends { connector?: Connector | undefined }
|
|
59
|
+
? { connectorUid?: string }
|
|
60
|
+
: unknown)
|
|
61
|
+
> {
|
|
53
62
|
// destructuring is super fast
|
|
54
63
|
// biome-ignore format: no formatting
|
|
55
64
|
const {
|
|
@@ -69,9 +78,9 @@ export function filterQueryOptions<type extends Record<string, unknown>>(
|
|
|
69
78
|
// wagmi
|
|
70
79
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
71
80
|
// biome-ignore lint/correctness/noUnusedVariables: tossing
|
|
72
|
-
config, connector, query,
|
|
81
|
+
abi, config, connector, query, watch,
|
|
73
82
|
...rest
|
|
74
83
|
} = options
|
|
75
|
-
|
|
76
|
-
return rest as
|
|
84
|
+
if (connector) return { connectorUid: connector?.uid, ...rest } as never
|
|
85
|
+
return rest as never
|
|
77
86
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { QueryOptions } from '@tanstack/query-core'
|
|
2
|
-
|
|
3
1
|
import {
|
|
4
2
|
type VerifyMessageErrorType,
|
|
5
3
|
type VerifyMessageParameters,
|
|
@@ -8,45 +6,61 @@ import {
|
|
|
8
6
|
} from '../actions/verifyMessage.js'
|
|
9
7
|
import type { Config } from '../createConfig.js'
|
|
10
8
|
import type { ScopeKeyParameter } from '../types/properties.js'
|
|
9
|
+
import type { QueryOptions, QueryParameter } from '../types/query.js'
|
|
11
10
|
import type { Compute, ExactPartial } from '../types/utils.js'
|
|
12
11
|
import { filterQueryOptions } from './utils.js'
|
|
13
12
|
|
|
14
|
-
export type VerifyMessageOptions<
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
export type VerifyMessageOptions<
|
|
14
|
+
config extends Config,
|
|
15
|
+
selectData = VerifyMessageData,
|
|
16
|
+
> = Compute<ExactPartial<VerifyMessageParameters<config>> & ScopeKeyParameter> &
|
|
17
|
+
QueryParameter<
|
|
18
|
+
VerifyMessageQueryFnData,
|
|
19
|
+
VerifyMessageErrorType,
|
|
20
|
+
selectData,
|
|
21
|
+
VerifyMessageQueryKey<config>
|
|
22
|
+
>
|
|
17
23
|
|
|
18
|
-
export function verifyMessageQueryOptions<
|
|
24
|
+
export function verifyMessageQueryOptions<
|
|
25
|
+
config extends Config,
|
|
26
|
+
selectData = VerifyMessageData,
|
|
27
|
+
>(
|
|
19
28
|
config: config,
|
|
20
|
-
options: VerifyMessageOptions<config> = {},
|
|
21
|
-
) {
|
|
29
|
+
options: VerifyMessageOptions<config, selectData> = {},
|
|
30
|
+
): VerifyMessageQueryOptions<config, selectData> {
|
|
22
31
|
return {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
)
|
|
32
|
+
...options.query,
|
|
33
|
+
enabled: Boolean(
|
|
34
|
+
options.address &&
|
|
35
|
+
options.message &&
|
|
36
|
+
options.signature &&
|
|
37
|
+
(options.query?.enabled ?? true),
|
|
38
|
+
),
|
|
39
|
+
queryFn: async (context) => {
|
|
40
|
+
const [, { scopeKey: _, ...parameters }] = context.queryKey
|
|
41
|
+
if (!parameters.address) throw new Error('address is required')
|
|
42
|
+
if (!parameters.message) throw new Error('message is required')
|
|
43
|
+
if (!parameters.signature) throw new Error('signature is required')
|
|
44
|
+
const verified = await verifyMessage(config, {
|
|
45
|
+
...parameters,
|
|
46
|
+
address: parameters.address,
|
|
47
|
+
message: parameters.message,
|
|
48
|
+
signature: parameters.signature,
|
|
49
|
+
})
|
|
34
50
|
return verified ?? null
|
|
35
51
|
},
|
|
36
52
|
queryKey: verifyMessageQueryKey(options),
|
|
37
|
-
}
|
|
38
|
-
VerifyMessageQueryFnData,
|
|
39
|
-
VerifyMessageErrorType,
|
|
40
|
-
VerifyMessageData,
|
|
41
|
-
VerifyMessageQueryKey<config>
|
|
42
|
-
>
|
|
53
|
+
}
|
|
43
54
|
}
|
|
55
|
+
|
|
44
56
|
export type VerifyMessageQueryFnData = VerifyMessageReturnType
|
|
45
57
|
|
|
46
58
|
export type VerifyMessageData = VerifyMessageQueryFnData
|
|
47
59
|
|
|
48
60
|
export function verifyMessageQueryKey<config extends Config>(
|
|
49
|
-
options:
|
|
61
|
+
options: Compute<
|
|
62
|
+
ExactPartial<VerifyMessageParameters<config>> & ScopeKeyParameter
|
|
63
|
+
> = {},
|
|
50
64
|
) {
|
|
51
65
|
return ['verifyMessage', filterQueryOptions(options)] as const
|
|
52
66
|
}
|
|
@@ -54,3 +68,13 @@ export function verifyMessageQueryKey<config extends Config>(
|
|
|
54
68
|
export type VerifyMessageQueryKey<config extends Config> = ReturnType<
|
|
55
69
|
typeof verifyMessageQueryKey<config>
|
|
56
70
|
>
|
|
71
|
+
|
|
72
|
+
export type VerifyMessageQueryOptions<
|
|
73
|
+
config extends Config,
|
|
74
|
+
selectData = VerifyMessageData,
|
|
75
|
+
> = QueryOptions<
|
|
76
|
+
VerifyMessageQueryFnData,
|
|
77
|
+
VerifyMessageErrorType,
|
|
78
|
+
selectData,
|
|
79
|
+
VerifyMessageQueryKey<config>
|
|
80
|
+
>
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { QueryOptions } from '@tanstack/query-core'
|
|
2
1
|
import type { TypedData } from 'viem'
|
|
3
2
|
|
|
4
3
|
import {
|
|
@@ -9,58 +8,69 @@ import {
|
|
|
9
8
|
} from '../actions/verifyTypedData.js'
|
|
10
9
|
import type { Config } from '../createConfig.js'
|
|
11
10
|
import type { ScopeKeyParameter } from '../types/properties.js'
|
|
12
|
-
import type {
|
|
11
|
+
import type { QueryOptions, QueryParameter } from '../types/query.js'
|
|
12
|
+
import type { UnionExactPartial } from '../types/utils.js'
|
|
13
13
|
import { filterQueryOptions } from './utils.js'
|
|
14
14
|
|
|
15
15
|
export type VerifyTypedDataOptions<
|
|
16
16
|
typedData extends TypedData | Record<string, unknown>,
|
|
17
17
|
primaryType extends keyof typedData | 'EIP712Domain',
|
|
18
18
|
config extends Config,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
selectData = VerifyTypedDataData,
|
|
20
|
+
> = UnionExactPartial<
|
|
21
|
+
VerifyTypedDataParameters<typedData, primaryType, config>
|
|
22
|
+
> &
|
|
23
|
+
ScopeKeyParameter &
|
|
24
|
+
QueryParameter<
|
|
25
|
+
VerifyTypedDataQueryFnData,
|
|
26
|
+
VerifyTypedDataErrorType,
|
|
27
|
+
selectData,
|
|
28
|
+
VerifyTypedDataQueryKey<typedData, primaryType, config>
|
|
29
|
+
>
|
|
21
30
|
|
|
22
31
|
export function verifyTypedDataQueryOptions<
|
|
23
|
-
config extends Config,
|
|
24
32
|
const typedData extends TypedData | Record<string, unknown>,
|
|
25
33
|
primaryType extends keyof typedData | 'EIP712Domain',
|
|
34
|
+
config extends Config,
|
|
35
|
+
selectData = VerifyTypedDataData,
|
|
26
36
|
>(
|
|
27
37
|
config: config,
|
|
28
|
-
options: VerifyTypedDataOptions<
|
|
29
|
-
|
|
38
|
+
options: VerifyTypedDataOptions<
|
|
39
|
+
typedData,
|
|
40
|
+
primaryType,
|
|
41
|
+
config,
|
|
42
|
+
selectData
|
|
43
|
+
> = {} as any,
|
|
44
|
+
): VerifyTypedDataQueryOptions<typedData, primaryType, config, selectData> {
|
|
30
45
|
return {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
message
|
|
35
|
-
primaryType
|
|
36
|
-
signature
|
|
37
|
-
types
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (!
|
|
43
|
-
if (!
|
|
44
|
-
if (!
|
|
45
|
-
if (!
|
|
46
|
-
|
|
46
|
+
...options.query,
|
|
47
|
+
enabled: Boolean(
|
|
48
|
+
options.address &&
|
|
49
|
+
options.message &&
|
|
50
|
+
options.primaryType &&
|
|
51
|
+
options.signature &&
|
|
52
|
+
options.types &&
|
|
53
|
+
(options.query?.enabled ?? true),
|
|
54
|
+
),
|
|
55
|
+
queryFn: async (context) => {
|
|
56
|
+
const [, { scopeKey: _, ...parameters }] = context.queryKey
|
|
57
|
+
if (!parameters.address) throw new Error('address is required')
|
|
58
|
+
if (!parameters.message) throw new Error('message is required')
|
|
59
|
+
if (!parameters.primaryType) throw new Error('primaryType is required')
|
|
60
|
+
if (!parameters.signature) throw new Error('signature is required')
|
|
61
|
+
if (!parameters.types) throw new Error('types is required')
|
|
47
62
|
const verified = await verifyTypedData(config, {
|
|
48
|
-
...parameters,
|
|
49
|
-
address,
|
|
50
|
-
message,
|
|
51
|
-
primaryType,
|
|
52
|
-
signature,
|
|
53
|
-
types,
|
|
54
|
-
}
|
|
63
|
+
...(parameters as any),
|
|
64
|
+
address: parameters.address,
|
|
65
|
+
message: parameters.message,
|
|
66
|
+
primaryType: parameters.primaryType,
|
|
67
|
+
signature: parameters.signature,
|
|
68
|
+
types: parameters.types,
|
|
69
|
+
})
|
|
55
70
|
return verified ?? null
|
|
56
71
|
},
|
|
57
|
-
queryKey: verifyTypedDataQueryKey(options),
|
|
58
|
-
}
|
|
59
|
-
VerifyTypedDataQueryFnData,
|
|
60
|
-
VerifyTypedDataErrorType,
|
|
61
|
-
VerifyTypedDataData,
|
|
62
|
-
VerifyTypedDataQueryKey<typedData, primaryType, config>
|
|
63
|
-
>
|
|
72
|
+
queryKey: verifyTypedDataQueryKey(options as any) as any,
|
|
73
|
+
}
|
|
64
74
|
}
|
|
65
75
|
|
|
66
76
|
export type VerifyTypedDataQueryFnData = VerifyTypedDataReturnType
|
|
@@ -71,7 +81,12 @@ export function verifyTypedDataQueryKey<
|
|
|
71
81
|
config extends Config,
|
|
72
82
|
const typedData extends TypedData | Record<string, unknown>,
|
|
73
83
|
primaryType extends keyof typedData | 'EIP712Domain',
|
|
74
|
-
>(
|
|
84
|
+
>(
|
|
85
|
+
options: UnionExactPartial<
|
|
86
|
+
VerifyTypedDataParameters<typedData, primaryType, config>
|
|
87
|
+
> &
|
|
88
|
+
ScopeKeyParameter = {} as any,
|
|
89
|
+
) {
|
|
75
90
|
return ['verifyTypedData', filterQueryOptions(options)] as const
|
|
76
91
|
}
|
|
77
92
|
|
|
@@ -80,3 +95,15 @@ export type VerifyTypedDataQueryKey<
|
|
|
80
95
|
primaryType extends keyof typedData | 'EIP712Domain',
|
|
81
96
|
config extends Config,
|
|
82
97
|
> = ReturnType<typeof verifyTypedDataQueryKey<config, typedData, primaryType>>
|
|
98
|
+
|
|
99
|
+
export type VerifyTypedDataQueryOptions<
|
|
100
|
+
typedData extends TypedData | Record<string, unknown>,
|
|
101
|
+
primaryType extends keyof typedData | 'EIP712Domain',
|
|
102
|
+
config extends Config,
|
|
103
|
+
selectData = VerifyTypedDataData,
|
|
104
|
+
> = QueryOptions<
|
|
105
|
+
VerifyTypedDataQueryFnData,
|
|
106
|
+
VerifyTypedDataErrorType,
|
|
107
|
+
selectData,
|
|
108
|
+
VerifyTypedDataQueryKey<typedData, primaryType, config>
|
|
109
|
+
>
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { QueryOptions } from '@tanstack/query-core'
|
|
2
|
-
|
|
3
1
|
import {
|
|
4
2
|
type WaitForCallsStatusErrorType,
|
|
5
3
|
type WaitForCallsStatusParameters,
|
|
@@ -7,47 +5,71 @@ import {
|
|
|
7
5
|
waitForCallsStatus,
|
|
8
6
|
} from '../actions/waitForCallsStatus.js'
|
|
9
7
|
import type { Config } from '../createConfig.js'
|
|
10
|
-
import { ConnectorNotConnectedError } from '../errors/config.js'
|
|
11
8
|
import { filterQueryOptions } from '../query/utils.js'
|
|
12
9
|
import type { ScopeKeyParameter } from '../types/properties.js'
|
|
13
|
-
import type {
|
|
10
|
+
import type { QueryOptions, QueryParameter } from '../types/query.js'
|
|
11
|
+
import type { Compute, ExactPartial } from '../types/utils.js'
|
|
14
12
|
|
|
15
|
-
export type WaitForCallsStatusOptions =
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
export type WaitForCallsStatusOptions<selectData = WaitForCallsStatusData> =
|
|
14
|
+
Compute<ExactPartial<WaitForCallsStatusParameters> & ScopeKeyParameter> &
|
|
15
|
+
QueryParameter<
|
|
16
|
+
WaitForCallsStatusQueryFnData,
|
|
17
|
+
WaitForCallsStatusErrorType,
|
|
18
|
+
selectData,
|
|
19
|
+
WaitForCallsStatusQueryKey
|
|
20
|
+
>
|
|
18
21
|
|
|
19
|
-
export function waitForCallsStatusQueryOptions<
|
|
22
|
+
export function waitForCallsStatusQueryOptions<
|
|
23
|
+
config extends Config,
|
|
24
|
+
selectData = WaitForCallsStatusData,
|
|
25
|
+
>(
|
|
20
26
|
config: config,
|
|
21
|
-
options: WaitForCallsStatusOptions
|
|
22
|
-
) {
|
|
27
|
+
options: WaitForCallsStatusOptions<selectData>,
|
|
28
|
+
): WaitForCallsStatusQueryOptions<selectData> {
|
|
23
29
|
return {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
...options.query,
|
|
31
|
+
enabled: Boolean(
|
|
32
|
+
options.id &&
|
|
33
|
+
options.connector?.getProvider &&
|
|
34
|
+
(options.query?.enabled ?? true),
|
|
35
|
+
),
|
|
36
|
+
queryFn: async (context) => {
|
|
37
|
+
if (!options.connector?.getProvider)
|
|
38
|
+
throw new Error('connector is required')
|
|
39
|
+
const [, { connectorUid: _, scopeKey: __, ...parameters }] =
|
|
40
|
+
context.queryKey
|
|
41
|
+
if (!parameters.id) throw new Error('id is required')
|
|
42
|
+
const status = await waitForCallsStatus(config, {
|
|
43
|
+
...parameters,
|
|
44
|
+
id: parameters.id,
|
|
45
|
+
})
|
|
28
46
|
return status
|
|
29
47
|
},
|
|
30
48
|
queryKey: waitForCallsStatusQueryKey(options),
|
|
31
|
-
|
|
32
|
-
if (error instanceof ConnectorNotConnectedError) return false
|
|
33
|
-
return failureCount < 3
|
|
34
|
-
},
|
|
35
|
-
} as const satisfies QueryOptions<
|
|
36
|
-
WaitForCallsStatusQueryFnData,
|
|
37
|
-
WaitForCallsStatusErrorType,
|
|
38
|
-
WaitForCallsStatusData,
|
|
39
|
-
WaitForCallsStatusQueryKey
|
|
40
|
-
>
|
|
49
|
+
}
|
|
41
50
|
}
|
|
42
51
|
|
|
43
52
|
export type WaitForCallsStatusQueryFnData = WaitForCallsStatusReturnType
|
|
44
53
|
|
|
45
54
|
export type WaitForCallsStatusData = WaitForCallsStatusQueryFnData
|
|
46
55
|
|
|
47
|
-
export function waitForCallsStatusQueryKey(
|
|
56
|
+
export function waitForCallsStatusQueryKey(
|
|
57
|
+
options: Compute<
|
|
58
|
+
ExactPartial<WaitForCallsStatusParameters> & ScopeKeyParameter
|
|
59
|
+
> = {},
|
|
60
|
+
) {
|
|
48
61
|
return ['callsStatus', filterQueryOptions(options)] as const
|
|
49
62
|
}
|
|
50
63
|
|
|
51
64
|
export type WaitForCallsStatusQueryKey = ReturnType<
|
|
52
65
|
typeof waitForCallsStatusQueryKey
|
|
53
66
|
>
|
|
67
|
+
|
|
68
|
+
export type WaitForCallsStatusQueryOptions<
|
|
69
|
+
selectData = WaitForCallsStatusData,
|
|
70
|
+
> = QueryOptions<
|
|
71
|
+
WaitForCallsStatusQueryFnData,
|
|
72
|
+
WaitForCallsStatusErrorType,
|
|
73
|
+
selectData,
|
|
74
|
+
WaitForCallsStatusQueryKey
|
|
75
|
+
>
|