wagmi 3.3.1 → 3.3.4
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/hooks/codegen/createUseReadContract.js.map +1 -1
- package/dist/esm/hooks/codegen/createUseSimulateContract.js.map +1 -1
- package/dist/esm/hooks/useBalance.js +2 -3
- package/dist/esm/hooks/useBalance.js.map +1 -1
- package/dist/esm/hooks/useBlock.js +10 -13
- package/dist/esm/hooks/useBlock.js.map +1 -1
- package/dist/esm/hooks/useBlockNumber.js +10 -9
- package/dist/esm/hooks/useBlockNumber.js.map +1 -1
- package/dist/esm/hooks/useBlockTransactionCount.js +4 -5
- package/dist/esm/hooks/useBlockTransactionCount.js.map +1 -1
- package/dist/esm/hooks/useBytecode.js +2 -3
- package/dist/esm/hooks/useBytecode.js.map +1 -1
- package/dist/esm/hooks/useCall.js +2 -2
- package/dist/esm/hooks/useCall.js.map +1 -1
- package/dist/esm/hooks/useCallsStatus.js +8 -3
- package/dist/esm/hooks/useCallsStatus.js.map +1 -1
- package/dist/esm/hooks/useCapabilities.js +5 -7
- package/dist/esm/hooks/useCapabilities.js.map +1 -1
- package/dist/esm/hooks/useConnectorClient.js +10 -20
- package/dist/esm/hooks/useConnectorClient.js.map +1 -1
- package/dist/esm/hooks/useEnsAddress.js +2 -3
- package/dist/esm/hooks/useEnsAddress.js.map +1 -1
- package/dist/esm/hooks/useEnsAvatar.js +2 -3
- package/dist/esm/hooks/useEnsAvatar.js.map +1 -1
- package/dist/esm/hooks/useEnsName.js +2 -3
- package/dist/esm/hooks/useEnsName.js.map +1 -1
- package/dist/esm/hooks/useEnsResolver.js +2 -3
- package/dist/esm/hooks/useEnsResolver.js.map +1 -1
- package/dist/esm/hooks/useEnsText.js +2 -3
- package/dist/esm/hooks/useEnsText.js.map +1 -1
- package/dist/esm/hooks/useEstimateFeesPerGas.js +2 -2
- package/dist/esm/hooks/useEstimateFeesPerGas.js.map +1 -1
- package/dist/esm/hooks/useEstimateGas.js +6 -12
- package/dist/esm/hooks/useEstimateGas.js.map +1 -1
- package/dist/esm/hooks/useEstimateMaxPriorityFeePerGas.js +2 -2
- package/dist/esm/hooks/useEstimateMaxPriorityFeePerGas.js.map +1 -1
- package/dist/esm/hooks/useFeeHistory.js +2 -3
- package/dist/esm/hooks/useFeeHistory.js.map +1 -1
- package/dist/esm/hooks/useGasPrice.js +4 -5
- package/dist/esm/hooks/useGasPrice.js.map +1 -1
- package/dist/esm/hooks/usePrepareTransactionRequest.js +2 -7
- package/dist/esm/hooks/usePrepareTransactionRequest.js.map +1 -1
- package/dist/esm/hooks/useProof.js +2 -3
- package/dist/esm/hooks/useProof.js.map +1 -1
- package/dist/esm/hooks/useReadContract.js +6 -11
- package/dist/esm/hooks/useReadContract.js.map +1 -1
- package/dist/esm/hooks/useReadContracts.js +9 -24
- package/dist/esm/hooks/useReadContracts.js.map +1 -1
- package/dist/esm/hooks/useSimulateContract.js +6 -10
- package/dist/esm/hooks/useSimulateContract.js.map +1 -1
- package/dist/esm/hooks/useStorageAt.js +2 -3
- package/dist/esm/hooks/useStorageAt.js.map +1 -1
- package/dist/esm/hooks/useTransaction.js +2 -7
- package/dist/esm/hooks/useTransaction.js.map +1 -1
- package/dist/esm/hooks/useTransactionConfirmations.js +2 -5
- package/dist/esm/hooks/useTransactionConfirmations.js.map +1 -1
- package/dist/esm/hooks/useTransactionCount.js +2 -3
- package/dist/esm/hooks/useTransactionCount.js.map +1 -1
- package/dist/esm/hooks/useTransactionReceipt.js +2 -7
- package/dist/esm/hooks/useTransactionReceipt.js.map +1 -1
- package/dist/esm/hooks/useVerifyMessage.js +2 -3
- package/dist/esm/hooks/useVerifyMessage.js.map +1 -1
- package/dist/esm/hooks/useVerifyTypedData.js +2 -8
- package/dist/esm/hooks/useVerifyTypedData.js.map +1 -1
- package/dist/esm/hooks/useWaitForCallsStatus.js +8 -4
- package/dist/esm/hooks/useWaitForCallsStatus.js.map +1 -1
- package/dist/esm/hooks/useWaitForTransactionReceipt.js +2 -7
- package/dist/esm/hooks/useWaitForTransactionReceipt.js.map +1 -1
- package/dist/esm/hooks/useWalletClient.js +9 -19
- package/dist/esm/hooks/useWalletClient.js.map +1 -1
- package/dist/esm/tempo/hooks/amm.js.map +1 -1
- package/dist/esm/tempo/hooks/dex.js.map +1 -1
- package/dist/esm/tempo/hooks/fee.js.map +1 -1
- package/dist/esm/tempo/hooks/nonce.js.map +1 -1
- package/dist/esm/tempo/hooks/policy.js.map +1 -1
- package/dist/esm/tempo/hooks/reward.js.map +1 -1
- package/dist/esm/tempo/hooks/token.js.map +1 -1
- package/dist/esm/tempo/utils.js +2 -0
- package/dist/esm/tempo/utils.js.map +1 -0
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/exports/internal.d.ts +1 -1
- package/dist/types/exports/internal.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/useBalance.d.ts +3 -4
- package/dist/types/hooks/useBalance.d.ts.map +1 -1
- package/dist/types/hooks/useBlock.d.ts +3 -3
- package/dist/types/hooks/useBlock.d.ts.map +1 -1
- package/dist/types/hooks/useBlockNumber.d.ts +3 -3
- package/dist/types/hooks/useBlockNumber.d.ts.map +1 -1
- package/dist/types/hooks/useBlockTransactionCount.d.ts +3 -3
- package/dist/types/hooks/useBlockTransactionCount.d.ts.map +1 -1
- package/dist/types/hooks/useBytecode.d.ts +3 -4
- package/dist/types/hooks/useBytecode.d.ts.map +1 -1
- package/dist/types/hooks/useCall.d.ts +3 -4
- package/dist/types/hooks/useCall.d.ts.map +1 -1
- package/dist/types/hooks/useCallsStatus.d.ts +3 -3
- package/dist/types/hooks/useCallsStatus.d.ts.map +1 -1
- package/dist/types/hooks/useCapabilities.d.ts +3 -3
- package/dist/types/hooks/useCapabilities.d.ts.map +1 -1
- package/dist/types/hooks/useConnectorClient.d.ts +4 -6
- package/dist/types/hooks/useConnectorClient.d.ts.map +1 -1
- package/dist/types/hooks/useEnsAddress.d.ts +3 -3
- package/dist/types/hooks/useEnsAddress.d.ts.map +1 -1
- package/dist/types/hooks/useEnsAvatar.d.ts +3 -3
- package/dist/types/hooks/useEnsAvatar.d.ts.map +1 -1
- package/dist/types/hooks/useEnsName.d.ts +3 -3
- package/dist/types/hooks/useEnsName.d.ts.map +1 -1
- package/dist/types/hooks/useEnsResolver.d.ts +3 -3
- package/dist/types/hooks/useEnsResolver.d.ts.map +1 -1
- package/dist/types/hooks/useEnsText.d.ts +3 -3
- package/dist/types/hooks/useEnsText.d.ts.map +1 -1
- package/dist/types/hooks/useEstimateFeesPerGas.d.ts +3 -3
- package/dist/types/hooks/useEstimateFeesPerGas.d.ts.map +1 -1
- package/dist/types/hooks/useEstimateGas.d.ts +3 -3
- package/dist/types/hooks/useEstimateGas.d.ts.map +1 -1
- package/dist/types/hooks/useEstimateMaxPriorityFeePerGas.d.ts +3 -3
- package/dist/types/hooks/useEstimateMaxPriorityFeePerGas.d.ts.map +1 -1
- package/dist/types/hooks/useFeeHistory.d.ts +3 -3
- package/dist/types/hooks/useFeeHistory.d.ts.map +1 -1
- package/dist/types/hooks/useGasPrice.d.ts +3 -3
- package/dist/types/hooks/useGasPrice.d.ts.map +1 -1
- package/dist/types/hooks/usePrepareTransactionRequest.d.ts +3 -4
- package/dist/types/hooks/usePrepareTransactionRequest.d.ts.map +1 -1
- package/dist/types/hooks/useProof.d.ts +3 -4
- 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 +3 -3
- package/dist/types/hooks/useReadContracts.d.ts.map +1 -1
- package/dist/types/hooks/useSimulateContract.d.ts +4 -4
- package/dist/types/hooks/useSimulateContract.d.ts.map +1 -1
- package/dist/types/hooks/useStorageAt.d.ts +3 -4
- package/dist/types/hooks/useStorageAt.d.ts.map +1 -1
- package/dist/types/hooks/useTransaction.d.ts +3 -3
- package/dist/types/hooks/useTransaction.d.ts.map +1 -1
- package/dist/types/hooks/useTransactionConfirmations.d.ts +3 -3
- package/dist/types/hooks/useTransactionConfirmations.d.ts.map +1 -1
- package/dist/types/hooks/useTransactionCount.d.ts +3 -4
- package/dist/types/hooks/useTransactionCount.d.ts.map +1 -1
- package/dist/types/hooks/useTransactionReceipt.d.ts +3 -4
- package/dist/types/hooks/useTransactionReceipt.d.ts.map +1 -1
- package/dist/types/hooks/useVerifyMessage.d.ts +3 -4
- package/dist/types/hooks/useVerifyMessage.d.ts.map +1 -1
- package/dist/types/hooks/useVerifyTypedData.d.ts +3 -4
- package/dist/types/hooks/useVerifyTypedData.d.ts.map +1 -1
- package/dist/types/hooks/useWaitForCallsStatus.d.ts +3 -3
- package/dist/types/hooks/useWaitForCallsStatus.d.ts.map +1 -1
- package/dist/types/hooks/useWaitForTransactionReceipt.d.ts +3 -3
- package/dist/types/hooks/useWaitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/hooks/useWalletClient.d.ts +4 -6
- package/dist/types/hooks/useWalletClient.d.ts.map +1 -1
- package/dist/types/tempo/hooks/amm.d.ts +4 -3
- package/dist/types/tempo/hooks/amm.d.ts.map +1 -1
- package/dist/types/tempo/hooks/dex.d.ts +8 -7
- package/dist/types/tempo/hooks/dex.d.ts.map +1 -1
- package/dist/types/tempo/hooks/fee.d.ts +3 -2
- package/dist/types/tempo/hooks/fee.d.ts.map +1 -1
- package/dist/types/tempo/hooks/nonce.d.ts +3 -2
- package/dist/types/tempo/hooks/nonce.d.ts.map +1 -1
- package/dist/types/tempo/hooks/policy.d.ts +4 -3
- package/dist/types/tempo/hooks/policy.d.ts.map +1 -1
- package/dist/types/tempo/hooks/reward.d.ts +4 -3
- package/dist/types/tempo/hooks/reward.d.ts.map +1 -1
- package/dist/types/tempo/hooks/token.d.ts +7 -6
- package/dist/types/tempo/hooks/token.d.ts.map +1 -1
- package/dist/types/tempo/utils.d.ts +6 -0
- package/dist/types/tempo/utils.d.ts.map +1 -0
- package/dist/types/types/properties.d.ts +1 -4
- package/dist/types/types/properties.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/exports/internal.ts +1 -4
- package/src/hooks/codegen/createUseReadContract.ts +9 -10
- package/src/hooks/codegen/createUseSimulateContract.ts +9 -6
- package/src/hooks/useBalance.ts +4 -21
- package/src/hooks/useBlock.ts +13 -36
- package/src/hooks/useBlockNumber.ts +13 -26
- package/src/hooks/useBlockTransactionCount.ts +7 -21
- package/src/hooks/useBytecode.ts +4 -20
- package/src/hooks/useCall.ts +4 -20
- package/src/hooks/useCallsStatus.ts +10 -21
- package/src/hooks/useCapabilities.ts +7 -23
- package/src/hooks/useConnectorClient.ts +13 -50
- package/src/hooks/useEnsAddress.ts +4 -21
- package/src/hooks/useEnsAvatar.ts +4 -21
- package/src/hooks/useEnsName.ts +4 -21
- package/src/hooks/useEnsResolver.ts +4 -21
- package/src/hooks/useEnsText.ts +4 -21
- package/src/hooks/useEstimateFeesPerGas.ts +4 -18
- package/src/hooks/useEstimateGas.ts +8 -28
- package/src/hooks/useEstimateMaxPriorityFeePerGas.ts +5 -18
- package/src/hooks/useFeeHistory.ts +4 -21
- package/src/hooks/useGasPrice.ts +6 -21
- package/src/hooks/usePrepareTransactionRequest.ts +5 -28
- package/src/hooks/useProof.ts +4 -21
- package/src/hooks/useReadContract.ts +9 -33
- package/src/hooks/useReadContracts.ts +13 -45
- package/src/hooks/useSimulateContract.ts +19 -37
- package/src/hooks/useStorageAt.ts +4 -20
- package/src/hooks/useTransaction.ts +4 -25
- package/src/hooks/useTransactionConfirmations.ts +5 -23
- package/src/hooks/useTransactionCount.ts +4 -19
- package/src/hooks/useTransactionReceipt.ts +5 -22
- package/src/hooks/useVerifyMessage.ts +4 -22
- package/src/hooks/useVerifyTypedData.ts +9 -39
- package/src/hooks/useWaitForCallsStatus.ts +10 -22
- package/src/hooks/useWaitForTransactionReceipt.ts +5 -23
- package/src/hooks/useWalletClient.ts +15 -56
- package/src/tempo/hooks/amm.ts +4 -16
- package/src/tempo/hooks/dex.ts +8 -25
- package/src/tempo/hooks/fee.ts +3 -5
- package/src/tempo/hooks/nonce.ts +3 -7
- package/src/tempo/hooks/policy.ts +4 -13
- package/src/tempo/hooks/reward.ts +4 -19
- package/src/tempo/hooks/token.ts +7 -31
- package/src/tempo/utils.ts +16 -0
- package/src/types/properties.ts +1 -18
- package/src/version.ts +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
2
|
import type {
|
|
4
3
|
Config,
|
|
5
4
|
GetTransactionErrorType,
|
|
@@ -9,12 +8,9 @@ import type { Compute } from '@wagmi/core/internal'
|
|
|
9
8
|
import {
|
|
10
9
|
type GetTransactionData,
|
|
11
10
|
type GetTransactionOptions,
|
|
12
|
-
type GetTransactionQueryFnData,
|
|
13
|
-
type GetTransactionQueryKey,
|
|
14
11
|
getTransactionQueryOptions,
|
|
15
12
|
} from '@wagmi/core/query'
|
|
16
|
-
|
|
17
|
-
import type { ConfigParameter, QueryParameter } from '../types/properties.js'
|
|
13
|
+
import type { ConfigParameter } from '../types/properties.js'
|
|
18
14
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
19
15
|
import { useChainId } from './useChainId.js'
|
|
20
16
|
import { useConfig } from './useConfig.js'
|
|
@@ -25,14 +21,7 @@ export type UseTransactionParameters<
|
|
|
25
21
|
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
26
22
|
selectData = GetTransactionData<config, chainId>,
|
|
27
23
|
> = Compute<
|
|
28
|
-
GetTransactionOptions<config, chainId> &
|
|
29
|
-
ConfigParameter<config> &
|
|
30
|
-
QueryParameter<
|
|
31
|
-
GetTransactionQueryFnData<config, chainId>,
|
|
32
|
-
GetTransactionErrorType,
|
|
33
|
-
selectData,
|
|
34
|
-
GetTransactionQueryKey<config, chainId>
|
|
35
|
-
>
|
|
24
|
+
GetTransactionOptions<config, chainId, selectData> & ConfigParameter<config>
|
|
36
25
|
>
|
|
37
26
|
|
|
38
27
|
export type UseTransactionReturnType<
|
|
@@ -51,22 +40,12 @@ export function useTransaction<
|
|
|
51
40
|
>(
|
|
52
41
|
parameters: UseTransactionParameters<config, chainId, selectData> = {},
|
|
53
42
|
): UseTransactionReturnType<config, chainId, selectData> {
|
|
54
|
-
const { blockHash, blockNumber, blockTag, hash, query = {} } = parameters
|
|
55
|
-
|
|
56
43
|
const config = useConfig(parameters)
|
|
57
44
|
const chainId = useChainId({ config })
|
|
58
|
-
|
|
59
45
|
const options = getTransactionQueryOptions(config, {
|
|
60
46
|
...parameters,
|
|
61
47
|
chainId: parameters.chainId ?? chainId,
|
|
48
|
+
query: parameters.query,
|
|
62
49
|
})
|
|
63
|
-
|
|
64
|
-
!(blockHash && blockNumber && blockTag && hash) && (query.enabled ?? true),
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
return useQuery({
|
|
68
|
-
...(query as any),
|
|
69
|
-
...options,
|
|
70
|
-
enabled,
|
|
71
|
-
}) as UseTransactionReturnType<config, chainId, selectData>
|
|
50
|
+
return useQuery(options) as any
|
|
72
51
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
2
|
import type {
|
|
4
3
|
Config,
|
|
5
4
|
GetTransactionConfirmationsErrorType,
|
|
@@ -8,12 +7,9 @@ import type {
|
|
|
8
7
|
import {
|
|
9
8
|
type GetTransactionConfirmationsData,
|
|
10
9
|
type GetTransactionConfirmationsOptions,
|
|
11
|
-
type GetTransactionConfirmationsQueryFnData,
|
|
12
|
-
type GetTransactionConfirmationsQueryKey,
|
|
13
10
|
getTransactionConfirmationsQueryOptions,
|
|
14
11
|
} from '@wagmi/core/query'
|
|
15
|
-
|
|
16
|
-
import type { ConfigParameter, QueryParameter } from '../types/properties.js'
|
|
12
|
+
import type { ConfigParameter } from '../types/properties.js'
|
|
17
13
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
18
14
|
import { useChainId } from './useChainId.js'
|
|
19
15
|
import { useConfig } from './useConfig.js'
|
|
@@ -22,14 +18,8 @@ export type UseTransactionConfirmationsParameters<
|
|
|
22
18
|
config extends Config = Config,
|
|
23
19
|
chainId extends config['chains'][number]['id'] | undefined = undefined,
|
|
24
20
|
selectData = GetTransactionConfirmationsData,
|
|
25
|
-
> = GetTransactionConfirmationsOptions<config, chainId> &
|
|
26
|
-
ConfigParameter<config>
|
|
27
|
-
QueryParameter<
|
|
28
|
-
GetTransactionConfirmationsQueryFnData,
|
|
29
|
-
GetTransactionConfirmationsErrorType,
|
|
30
|
-
selectData,
|
|
31
|
-
GetTransactionConfirmationsQueryKey<config, chainId>
|
|
32
|
-
>
|
|
21
|
+
> = GetTransactionConfirmationsOptions<config, chainId, selectData> &
|
|
22
|
+
ConfigParameter<config>
|
|
33
23
|
|
|
34
24
|
export type UseTransactionConfirmationsReturnType<
|
|
35
25
|
selectData = GetTransactionConfirmationsData,
|
|
@@ -47,20 +37,12 @@ export function useTransactionConfirmations<
|
|
|
47
37
|
selectData
|
|
48
38
|
> = {} as any,
|
|
49
39
|
): UseTransactionConfirmationsReturnType<selectData> {
|
|
50
|
-
const { hash, transactionReceipt, query = {} } = parameters
|
|
51
|
-
|
|
52
40
|
const config = useConfig(parameters)
|
|
53
41
|
const chainId = useChainId({ config })
|
|
54
|
-
|
|
55
42
|
const options = getTransactionConfirmationsQueryOptions(config, {
|
|
56
43
|
...parameters,
|
|
57
44
|
chainId: parameters.chainId ?? chainId,
|
|
45
|
+
query: parameters.query,
|
|
58
46
|
})
|
|
59
|
-
|
|
60
|
-
!(hash && transactionReceipt) &&
|
|
61
|
-
(hash || transactionReceipt) &&
|
|
62
|
-
(query.enabled ?? true),
|
|
63
|
-
)
|
|
64
|
-
|
|
65
|
-
return useQuery({ ...query, ...options, enabled })
|
|
47
|
+
return useQuery(options) as any
|
|
66
48
|
}
|
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
2
|
import type {
|
|
4
3
|
Config,
|
|
5
4
|
GetTransactionCountErrorType,
|
|
6
5
|
ResolvedRegister,
|
|
7
6
|
} from '@wagmi/core'
|
|
8
7
|
import type { Compute } from '@wagmi/core/internal'
|
|
9
|
-
import type { GetTransactionCountQueryFnData } from '@wagmi/core/query'
|
|
10
8
|
import {
|
|
11
9
|
type GetTransactionCountData,
|
|
12
10
|
type GetTransactionCountOptions,
|
|
13
|
-
type GetTransactionCountQueryKey,
|
|
14
11
|
getTransactionCountQueryOptions,
|
|
15
12
|
} from '@wagmi/core/query'
|
|
16
|
-
|
|
17
|
-
import type { ConfigParameter, QueryParameter } from '../types/properties.js'
|
|
13
|
+
import type { ConfigParameter } from '../types/properties.js'
|
|
18
14
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
19
15
|
import { useChainId } from './useChainId.js'
|
|
20
16
|
import { useConfig } from './useConfig.js'
|
|
@@ -23,14 +19,7 @@ export type UseTransactionCountParameters<
|
|
|
23
19
|
config extends Config = Config,
|
|
24
20
|
selectData = GetTransactionCountData,
|
|
25
21
|
> = Compute<
|
|
26
|
-
GetTransactionCountOptions<config> &
|
|
27
|
-
ConfigParameter<config> &
|
|
28
|
-
QueryParameter<
|
|
29
|
-
GetTransactionCountQueryFnData,
|
|
30
|
-
GetTransactionCountErrorType,
|
|
31
|
-
selectData,
|
|
32
|
-
GetTransactionCountQueryKey<config>
|
|
33
|
-
>
|
|
22
|
+
GetTransactionCountOptions<config, selectData> & ConfigParameter<config>
|
|
34
23
|
>
|
|
35
24
|
|
|
36
25
|
export type UseTransactionCountReturnType<
|
|
@@ -44,16 +33,12 @@ export function useTransactionCount<
|
|
|
44
33
|
>(
|
|
45
34
|
parameters: UseTransactionCountParameters<config, selectData> = {},
|
|
46
35
|
): UseTransactionCountReturnType<selectData> {
|
|
47
|
-
const { address, query = {} } = parameters
|
|
48
|
-
|
|
49
36
|
const config = useConfig(parameters)
|
|
50
37
|
const chainId = useChainId({ config })
|
|
51
|
-
|
|
52
38
|
const options = getTransactionCountQueryOptions(config, {
|
|
53
39
|
...parameters,
|
|
54
40
|
chainId: parameters.chainId ?? chainId,
|
|
41
|
+
query: parameters.query,
|
|
55
42
|
})
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
return useQuery({ ...query, ...options, enabled })
|
|
43
|
+
return useQuery(options)
|
|
59
44
|
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
2
|
import type {
|
|
4
3
|
Config,
|
|
5
4
|
GetTransactionReceiptErrorType,
|
|
6
5
|
ResolvedRegister,
|
|
7
6
|
} from '@wagmi/core'
|
|
8
7
|
import type { Compute } from '@wagmi/core/internal'
|
|
9
|
-
import type { GetTransactionReceiptQueryFnData } from '@wagmi/core/query'
|
|
10
8
|
import {
|
|
11
9
|
type GetTransactionReceiptData,
|
|
12
10
|
type GetTransactionReceiptOptions,
|
|
13
|
-
type GetTransactionReceiptQueryKey,
|
|
14
11
|
getTransactionReceiptQueryOptions,
|
|
15
12
|
} from '@wagmi/core/query'
|
|
16
|
-
import type { ConfigParameter
|
|
13
|
+
import type { ConfigParameter } from '../types/properties.js'
|
|
17
14
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
18
15
|
import { useChainId } from './useChainId.js'
|
|
19
16
|
import { useConfig } from './useConfig.js'
|
|
@@ -24,14 +21,8 @@ export type UseTransactionReceiptParameters<
|
|
|
24
21
|
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
25
22
|
selectData = GetTransactionReceiptData<config, chainId>,
|
|
26
23
|
> = Compute<
|
|
27
|
-
GetTransactionReceiptOptions<config, chainId> &
|
|
28
|
-
ConfigParameter<config>
|
|
29
|
-
QueryParameter<
|
|
30
|
-
GetTransactionReceiptQueryFnData<config, chainId>,
|
|
31
|
-
GetTransactionReceiptErrorType,
|
|
32
|
-
selectData,
|
|
33
|
-
GetTransactionReceiptQueryKey<config, chainId>
|
|
34
|
-
>
|
|
24
|
+
GetTransactionReceiptOptions<config, chainId, selectData> &
|
|
25
|
+
ConfigParameter<config>
|
|
35
26
|
>
|
|
36
27
|
|
|
37
28
|
export type UseTransactionReceiptReturnType<
|
|
@@ -50,20 +41,12 @@ export function useTransactionReceipt<
|
|
|
50
41
|
>(
|
|
51
42
|
parameters: UseTransactionReceiptParameters<config, chainId, selectData> = {},
|
|
52
43
|
): UseTransactionReceiptReturnType<config, chainId, selectData> {
|
|
53
|
-
const { hash, query = {} } = parameters
|
|
54
|
-
|
|
55
44
|
const config = useConfig(parameters)
|
|
56
45
|
const chainId = useChainId({ config })
|
|
57
|
-
|
|
58
46
|
const options = getTransactionReceiptQueryOptions(config, {
|
|
59
47
|
...parameters,
|
|
60
48
|
chainId: parameters.chainId ?? chainId,
|
|
49
|
+
query: parameters.query,
|
|
61
50
|
})
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
return useQuery({
|
|
65
|
-
...(query as any),
|
|
66
|
-
...options,
|
|
67
|
-
enabled,
|
|
68
|
-
}) as UseTransactionReceiptReturnType<config, chainId, selectData>
|
|
51
|
+
return useQuery(options) as any
|
|
69
52
|
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
2
|
import type {
|
|
4
3
|
Config,
|
|
5
4
|
ResolvedRegister,
|
|
6
5
|
VerifyMessageErrorType,
|
|
7
6
|
} from '@wagmi/core'
|
|
8
7
|
import type { Compute } from '@wagmi/core/internal'
|
|
9
|
-
import type { VerifyMessageQueryFnData } from '@wagmi/core/query'
|
|
10
8
|
import {
|
|
11
9
|
type VerifyMessageData,
|
|
12
10
|
type VerifyMessageOptions,
|
|
13
|
-
type VerifyMessageQueryKey,
|
|
14
11
|
verifyMessageQueryOptions,
|
|
15
12
|
} from '@wagmi/core/query'
|
|
16
|
-
import type { ConfigParameter
|
|
13
|
+
import type { ConfigParameter } from '../types/properties.js'
|
|
17
14
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
18
15
|
import { useChainId } from './useChainId.js'
|
|
19
16
|
import { useConfig } from './useConfig.js'
|
|
@@ -21,16 +18,7 @@ import { useConfig } from './useConfig.js'
|
|
|
21
18
|
export type UseVerifyMessageParameters<
|
|
22
19
|
config extends Config = Config,
|
|
23
20
|
selectData = VerifyMessageData,
|
|
24
|
-
> = Compute<
|
|
25
|
-
VerifyMessageOptions<config> &
|
|
26
|
-
ConfigParameter<config> &
|
|
27
|
-
QueryParameter<
|
|
28
|
-
VerifyMessageQueryFnData,
|
|
29
|
-
VerifyMessageErrorType,
|
|
30
|
-
selectData,
|
|
31
|
-
VerifyMessageQueryKey<config>
|
|
32
|
-
>
|
|
33
|
-
>
|
|
21
|
+
> = Compute<VerifyMessageOptions<config, selectData> & ConfigParameter<config>>
|
|
34
22
|
|
|
35
23
|
export type UseVerifyMessageReturnType<selectData = VerifyMessageData> =
|
|
36
24
|
UseQueryReturnType<selectData, VerifyMessageErrorType>
|
|
@@ -42,18 +30,12 @@ export function useVerifyMessage<
|
|
|
42
30
|
>(
|
|
43
31
|
parameters: UseVerifyMessageParameters<config, selectData> = {},
|
|
44
32
|
): UseVerifyMessageReturnType<selectData> {
|
|
45
|
-
const { address, message, signature, query = {} } = parameters
|
|
46
|
-
|
|
47
33
|
const config = useConfig(parameters)
|
|
48
34
|
const chainId = useChainId({ config })
|
|
49
|
-
|
|
50
35
|
const options = verifyMessageQueryOptions(config, {
|
|
51
36
|
...parameters,
|
|
52
37
|
chainId: parameters.chainId ?? chainId,
|
|
38
|
+
query: parameters.query,
|
|
53
39
|
})
|
|
54
|
-
|
|
55
|
-
address && message && signature && (query.enabled ?? true),
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
return useQuery({ ...query, ...options, enabled })
|
|
40
|
+
return useQuery(options)
|
|
59
41
|
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
2
|
import type {
|
|
4
3
|
Config,
|
|
5
4
|
ResolvedRegister,
|
|
6
5
|
VerifyTypedDataErrorType,
|
|
7
6
|
} from '@wagmi/core'
|
|
8
|
-
import type { VerifyTypedDataQueryFnData } from '@wagmi/core/query'
|
|
9
7
|
import {
|
|
10
8
|
type VerifyTypedDataData,
|
|
11
9
|
type VerifyTypedDataOptions,
|
|
12
|
-
type VerifyTypedDataQueryKey,
|
|
13
10
|
verifyTypedDataQueryOptions,
|
|
14
11
|
} from '@wagmi/core/query'
|
|
15
12
|
import type { TypedData } from 'viem'
|
|
16
|
-
import type { ConfigParameter
|
|
13
|
+
import type { ConfigParameter } from '../types/properties.js'
|
|
17
14
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
18
15
|
import { useChainId } from './useChainId.js'
|
|
19
16
|
import { useConfig } from './useConfig.js'
|
|
@@ -23,14 +20,8 @@ export type UseVerifyTypedDataParameters<
|
|
|
23
20
|
primaryType extends keyof typedData | 'EIP712Domain' = keyof typedData,
|
|
24
21
|
config extends Config = Config,
|
|
25
22
|
selectData = VerifyTypedDataData,
|
|
26
|
-
> = VerifyTypedDataOptions<typedData, primaryType, config> &
|
|
27
|
-
ConfigParameter<config>
|
|
28
|
-
QueryParameter<
|
|
29
|
-
VerifyTypedDataQueryFnData,
|
|
30
|
-
VerifyTypedDataErrorType,
|
|
31
|
-
selectData,
|
|
32
|
-
VerifyTypedDataQueryKey<typedData, primaryType, config>
|
|
33
|
-
>
|
|
23
|
+
> = VerifyTypedDataOptions<typedData, primaryType, config, selectData> &
|
|
24
|
+
ConfigParameter<config>
|
|
34
25
|
|
|
35
26
|
export type UseVerifyTypedDataReturnType<selectData = VerifyTypedDataData> =
|
|
36
27
|
UseQueryReturnType<selectData, VerifyTypedDataErrorType>
|
|
@@ -49,33 +40,12 @@ export function useVerifyTypedData<
|
|
|
49
40
|
selectData
|
|
50
41
|
> = {} as any,
|
|
51
42
|
): UseVerifyTypedDataReturnType<selectData> {
|
|
52
|
-
const {
|
|
53
|
-
address,
|
|
54
|
-
message,
|
|
55
|
-
primaryType,
|
|
56
|
-
signature,
|
|
57
|
-
types,
|
|
58
|
-
query = {},
|
|
59
|
-
} = parameters
|
|
60
|
-
|
|
61
43
|
const config = useConfig(parameters)
|
|
62
44
|
const chainId = useChainId({ config })
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
)
|
|
71
|
-
const enabled = Boolean(
|
|
72
|
-
address &&
|
|
73
|
-
message &&
|
|
74
|
-
primaryType &&
|
|
75
|
-
signature &&
|
|
76
|
-
types &&
|
|
77
|
-
(query.enabled ?? true),
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
return useQuery({ ...query, ...options, enabled })
|
|
45
|
+
const options = verifyTypedDataQueryOptions(config, {
|
|
46
|
+
...(parameters as any),
|
|
47
|
+
chainId: parameters.chainId ?? chainId,
|
|
48
|
+
query: parameters.query,
|
|
49
|
+
})
|
|
50
|
+
return useQuery(options) as any
|
|
81
51
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
2
|
import type {
|
|
4
3
|
Config,
|
|
5
4
|
ResolvedRegister,
|
|
@@ -9,28 +8,17 @@ import type { Compute } from '@wagmi/core/internal'
|
|
|
9
8
|
import {
|
|
10
9
|
type WaitForCallsStatusData,
|
|
11
10
|
type WaitForCallsStatusOptions,
|
|
12
|
-
type WaitForCallsStatusQueryFnData,
|
|
13
|
-
type WaitForCallsStatusQueryKey,
|
|
14
11
|
waitForCallsStatusQueryOptions,
|
|
15
12
|
} from '@wagmi/core/query'
|
|
16
|
-
|
|
17
|
-
import type { ConfigParameter, QueryParameter } from '../types/properties.js'
|
|
13
|
+
import type { ConfigParameter } from '../types/properties.js'
|
|
18
14
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
19
15
|
import { useConfig } from './useConfig.js'
|
|
16
|
+
import { useConnection } from './useConnection.js'
|
|
20
17
|
|
|
21
18
|
export type UseWaitForCallsStatusParameters<
|
|
22
19
|
config extends Config = Config,
|
|
23
20
|
selectData = WaitForCallsStatusData,
|
|
24
|
-
> = Compute<
|
|
25
|
-
WaitForCallsStatusOptions &
|
|
26
|
-
ConfigParameter<config> &
|
|
27
|
-
QueryParameter<
|
|
28
|
-
WaitForCallsStatusQueryFnData,
|
|
29
|
-
WaitForCallsStatusErrorType,
|
|
30
|
-
selectData,
|
|
31
|
-
WaitForCallsStatusQueryKey
|
|
32
|
-
>
|
|
33
|
-
>
|
|
21
|
+
> = Compute<WaitForCallsStatusOptions<selectData> & ConfigParameter<config>>
|
|
34
22
|
|
|
35
23
|
export type UseWaitForCallsStatusReturnType<
|
|
36
24
|
selectData = WaitForCallsStatusData,
|
|
@@ -43,12 +31,12 @@ export function useWaitForCallsStatus<
|
|
|
43
31
|
>(
|
|
44
32
|
parameters: UseWaitForCallsStatusParameters<config, selectData>,
|
|
45
33
|
): UseWaitForCallsStatusReturnType<selectData> {
|
|
46
|
-
const { id, query = {} } = parameters
|
|
47
|
-
|
|
48
34
|
const config = useConfig(parameters)
|
|
49
|
-
|
|
50
|
-
const options = waitForCallsStatusQueryOptions(config,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
35
|
+
const { connector } = useConnection({ config })
|
|
36
|
+
const options = waitForCallsStatusQueryOptions(config, {
|
|
37
|
+
...parameters,
|
|
38
|
+
connector: parameters.connector ?? connector,
|
|
39
|
+
query: parameters.query,
|
|
40
|
+
})
|
|
41
|
+
return useQuery(options)
|
|
54
42
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
2
|
import type {
|
|
4
3
|
Config,
|
|
5
4
|
ResolvedRegister,
|
|
@@ -9,12 +8,9 @@ import type { Compute } from '@wagmi/core/internal'
|
|
|
9
8
|
import {
|
|
10
9
|
type WaitForTransactionReceiptData,
|
|
11
10
|
type WaitForTransactionReceiptOptions,
|
|
12
|
-
type WaitForTransactionReceiptQueryFnData,
|
|
13
|
-
type WaitForTransactionReceiptQueryKey,
|
|
14
11
|
waitForTransactionReceiptQueryOptions,
|
|
15
12
|
} from '@wagmi/core/query'
|
|
16
|
-
|
|
17
|
-
import type { ConfigParameter, QueryParameter } from '../types/properties.js'
|
|
13
|
+
import type { ConfigParameter } from '../types/properties.js'
|
|
18
14
|
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
19
15
|
import { useChainId } from './useChainId.js'
|
|
20
16
|
import { useConfig } from './useConfig.js'
|
|
@@ -25,14 +21,8 @@ export type UseWaitForTransactionReceiptParameters<
|
|
|
25
21
|
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
26
22
|
selectData = WaitForTransactionReceiptData<config, chainId>,
|
|
27
23
|
> = Compute<
|
|
28
|
-
WaitForTransactionReceiptOptions<config, chainId> &
|
|
29
|
-
ConfigParameter<config>
|
|
30
|
-
QueryParameter<
|
|
31
|
-
WaitForTransactionReceiptQueryFnData<config, chainId>,
|
|
32
|
-
WaitForTransactionReceiptErrorType,
|
|
33
|
-
selectData,
|
|
34
|
-
WaitForTransactionReceiptQueryKey<config, chainId>
|
|
35
|
-
>
|
|
24
|
+
WaitForTransactionReceiptOptions<config, chainId, selectData> &
|
|
25
|
+
ConfigParameter<config>
|
|
36
26
|
>
|
|
37
27
|
|
|
38
28
|
export type UseWaitForTransactionReceiptReturnType<
|
|
@@ -55,20 +45,12 @@ export function useWaitForTransactionReceipt<
|
|
|
55
45
|
selectData
|
|
56
46
|
> = {},
|
|
57
47
|
): UseWaitForTransactionReceiptReturnType<config, chainId, selectData> {
|
|
58
|
-
const { hash, query = {} } = parameters
|
|
59
|
-
|
|
60
48
|
const config = useConfig(parameters)
|
|
61
49
|
const chainId = useChainId({ config })
|
|
62
|
-
|
|
63
50
|
const options = waitForTransactionReceiptQueryOptions(config, {
|
|
64
51
|
...parameters,
|
|
65
52
|
chainId: parameters.chainId ?? chainId,
|
|
53
|
+
query: parameters.query,
|
|
66
54
|
})
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
return useQuery({
|
|
70
|
-
...(query as any),
|
|
71
|
-
...options,
|
|
72
|
-
enabled,
|
|
73
|
-
}) as UseWaitForTransactionReceiptReturnType<config, chainId, selectData>
|
|
55
|
+
return useQuery(options) as any
|
|
74
56
|
}
|
|
@@ -1,30 +1,21 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
|
|
3
2
|
// Almost identical implementation to `useConnectorClient` (except for return type)
|
|
4
3
|
// Should update both in tandem
|
|
5
|
-
|
|
6
4
|
import { useQueryClient } from '@tanstack/react-query'
|
|
7
5
|
import type {
|
|
8
6
|
Config,
|
|
9
7
|
GetWalletClientErrorType,
|
|
10
8
|
ResolvedRegister,
|
|
11
9
|
} from '@wagmi/core'
|
|
12
|
-
import type { Compute
|
|
10
|
+
import type { Compute } from '@wagmi/core/internal'
|
|
13
11
|
import {
|
|
14
12
|
type GetWalletClientData,
|
|
15
13
|
type GetWalletClientOptions,
|
|
16
|
-
type GetWalletClientQueryFnData,
|
|
17
|
-
type GetWalletClientQueryKey,
|
|
18
14
|
getWalletClientQueryOptions,
|
|
19
15
|
} from '@wagmi/core/query'
|
|
20
16
|
import { useEffect, useRef } from 'react'
|
|
21
|
-
|
|
22
17
|
import type { ConfigParameter } from '../types/properties.js'
|
|
23
|
-
import {
|
|
24
|
-
type UseQueryParameters,
|
|
25
|
-
type UseQueryReturnType,
|
|
26
|
-
useQuery,
|
|
27
|
-
} from '../utils/query.js'
|
|
18
|
+
import { type UseQueryReturnType, useQuery } from '../utils/query.js'
|
|
28
19
|
import { useChainId } from './useChainId.js'
|
|
29
20
|
import { useConfig } from './useConfig.js'
|
|
30
21
|
import { useConnection } from './useConnection.js'
|
|
@@ -35,22 +26,7 @@ export type UseWalletClientParameters<
|
|
|
35
26
|
config['chains'][number]['id'] = config['chains'][number]['id'],
|
|
36
27
|
selectData = GetWalletClientData<config, chainId>,
|
|
37
28
|
> = Compute<
|
|
38
|
-
GetWalletClientOptions<config, chainId> &
|
|
39
|
-
ConfigParameter<config> & {
|
|
40
|
-
query?:
|
|
41
|
-
| Compute<
|
|
42
|
-
Omit<
|
|
43
|
-
UseQueryParameters<
|
|
44
|
-
GetWalletClientQueryFnData<config, chainId>,
|
|
45
|
-
GetWalletClientErrorType,
|
|
46
|
-
selectData,
|
|
47
|
-
GetWalletClientQueryKey<config, chainId>
|
|
48
|
-
>,
|
|
49
|
-
'gcTime' | 'staleTime'
|
|
50
|
-
>
|
|
51
|
-
>
|
|
52
|
-
| undefined
|
|
53
|
-
}
|
|
29
|
+
GetWalletClientOptions<config, chainId, selectData> & ConfigParameter<config>
|
|
54
30
|
>
|
|
55
31
|
|
|
56
32
|
export type UseWalletClientReturnType<
|
|
@@ -69,48 +45,31 @@ export function useWalletClient<
|
|
|
69
45
|
>(
|
|
70
46
|
parameters: UseWalletClientParameters<config, chainId, selectData> = {},
|
|
71
47
|
): UseWalletClientReturnType<config, chainId, selectData> {
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
const config = useConfig(rest)
|
|
75
|
-
const queryClient = useQueryClient()
|
|
76
|
-
const { address, connector, status } = useConnection({ config })
|
|
48
|
+
const config = useConfig(parameters)
|
|
77
49
|
const chainId = useChainId({ config })
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
connector: parameters.connector ?? connector,
|
|
86
|
-
},
|
|
87
|
-
)
|
|
88
|
-
const enabled = Boolean(
|
|
89
|
-
(status === 'connected' ||
|
|
90
|
-
(status === 'reconnecting' && activeConnector?.getProvider)) &&
|
|
91
|
-
(query.enabled ?? true),
|
|
92
|
-
)
|
|
50
|
+
const { address, connector } = useConnection({ config })
|
|
51
|
+
const options = getWalletClientQueryOptions(config, {
|
|
52
|
+
...parameters,
|
|
53
|
+
chainId: parameters.chainId ?? chainId,
|
|
54
|
+
connector: parameters.connector ?? connector,
|
|
55
|
+
query: parameters.query as any,
|
|
56
|
+
})
|
|
93
57
|
|
|
94
58
|
const addressRef = useRef(address)
|
|
59
|
+
const queryClient = useQueryClient()
|
|
95
60
|
// biome-ignore lint/correctness/useExhaustiveDependencies: `queryKey` not required
|
|
96
61
|
useEffect(() => {
|
|
97
62
|
const previousAddress = addressRef.current
|
|
98
63
|
if (!address && previousAddress) {
|
|
99
64
|
// remove when account is disconnected
|
|
100
|
-
queryClient.removeQueries({ queryKey })
|
|
65
|
+
queryClient.removeQueries({ queryKey: options.queryKey })
|
|
101
66
|
addressRef.current = undefined
|
|
102
67
|
} else if (address !== previousAddress) {
|
|
103
68
|
// invalidate when address changes
|
|
104
|
-
queryClient.invalidateQueries({ queryKey })
|
|
69
|
+
queryClient.invalidateQueries({ queryKey: options.queryKey })
|
|
105
70
|
addressRef.current = address
|
|
106
71
|
}
|
|
107
72
|
}, [address, queryClient])
|
|
108
73
|
|
|
109
|
-
return useQuery(
|
|
110
|
-
...query,
|
|
111
|
-
...options,
|
|
112
|
-
queryKey,
|
|
113
|
-
enabled,
|
|
114
|
-
staleTime: Number.POSITIVE_INFINITY,
|
|
115
|
-
} as any) as UseWalletClientReturnType<config, chainId, selectData>
|
|
74
|
+
return useQuery(options) as any
|
|
116
75
|
}
|
package/src/tempo/hooks/amm.ts
CHANGED
|
@@ -6,13 +6,14 @@ import { useEffect } from 'react'
|
|
|
6
6
|
|
|
7
7
|
import { useChainId } from '../../hooks/useChainId.js'
|
|
8
8
|
import { useConfig } from '../../hooks/useConfig.js'
|
|
9
|
-
import type { ConfigParameter
|
|
9
|
+
import type { ConfigParameter } from '../../types/properties.js'
|
|
10
10
|
import {
|
|
11
11
|
type UseMutationParameters,
|
|
12
12
|
type UseQueryReturnType,
|
|
13
13
|
useMutation,
|
|
14
14
|
useQuery,
|
|
15
15
|
} from '../../utils/query.js'
|
|
16
|
+
import type { QueryParameter } from '../utils.js'
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Hook for getting the reserves for a liquidity pool.
|
|
@@ -66,12 +67,7 @@ export declare namespace usePool {
|
|
|
66
67
|
selectData,
|
|
67
68
|
Actions.amm.getPool.QueryKey<config>
|
|
68
69
|
> &
|
|
69
|
-
ExactPartial<
|
|
70
|
-
Omit<
|
|
71
|
-
Actions.amm.getPool.queryOptions.Parameters<config, selectData>,
|
|
72
|
-
'query'
|
|
73
|
-
>
|
|
74
|
-
>
|
|
70
|
+
ExactPartial<Actions.amm.getPool.Parameters<config>>
|
|
75
71
|
|
|
76
72
|
export type ReturnValue<selectData = Actions.amm.getPool.ReturnValue> =
|
|
77
73
|
UseQueryReturnType<selectData, Error>
|
|
@@ -129,15 +125,7 @@ export declare namespace useLiquidityBalance {
|
|
|
129
125
|
selectData,
|
|
130
126
|
Actions.amm.getLiquidityBalance.QueryKey<config>
|
|
131
127
|
> &
|
|
132
|
-
ExactPartial<
|
|
133
|
-
Omit<
|
|
134
|
-
Actions.amm.getLiquidityBalance.queryOptions.Parameters<
|
|
135
|
-
config,
|
|
136
|
-
selectData
|
|
137
|
-
>,
|
|
138
|
-
'query'
|
|
139
|
-
>
|
|
140
|
-
>
|
|
128
|
+
ExactPartial<Actions.amm.getLiquidityBalance.Parameters<config>>
|
|
141
129
|
|
|
142
130
|
export type ReturnValue<
|
|
143
131
|
selectData = Actions.amm.getLiquidityBalance.ReturnValue,
|