@wagmi/core 2.17.0 → 2.17.2
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/getCapabilities.js +5 -2
- package/dist/esm/actions/getCapabilities.js.map +1 -1
- package/dist/esm/actions/sendCalls.js.map +1 -1
- package/dist/esm/actions/waitForCallsStatus.js +2 -2
- package/dist/esm/actions/waitForCallsStatus.js.map +1 -1
- package/dist/esm/query/getCapabilities.js.map +1 -1
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/actions/getCapabilities.d.ts +3 -3
- package/dist/types/actions/getCapabilities.d.ts.map +1 -1
- package/dist/types/actions/sendCalls.d.ts +3 -3
- package/dist/types/actions/sendCalls.d.ts.map +1 -1
- package/dist/types/connectors/injected.d.ts +7 -3
- package/dist/types/connectors/injected.d.ts.map +1 -1
- package/dist/types/query/estimateFeesPerGas.d.ts +3 -3
- package/dist/types/query/estimateMaxPriorityFeePerGas.d.ts +3 -3
- package/dist/types/query/getBalance.d.ts +9 -9
- package/dist/types/query/getBlockNumber.d.ts +6 -6
- package/dist/types/query/getCallsStatus.d.ts +8 -4
- package/dist/types/query/getCallsStatus.d.ts.map +1 -1
- package/dist/types/query/getCapabilities.d.ts +64 -18
- package/dist/types/query/getCapabilities.d.ts.map +1 -1
- package/dist/types/query/getConnectorClient.d.ts +51 -4
- package/dist/types/query/getConnectorClient.d.ts.map +1 -1
- package/dist/types/query/getEnsAddress.d.ts +18 -18
- package/dist/types/query/getEnsAvatar.d.ts +15 -15
- package/dist/types/query/getEnsName.d.ts +15 -15
- package/dist/types/query/getEnsResolver.d.ts +9 -9
- package/dist/types/query/getEnsText.d.ts +15 -15
- package/dist/types/query/getFeeHistory.d.ts +3 -3
- package/dist/types/query/getGasPrice.d.ts +3 -3
- package/dist/types/query/getToken.d.ts +3 -3
- package/dist/types/query/getTransaction.d.ts +1 -1
- package/dist/types/query/getTransactionCount.d.ts +6 -6
- package/dist/types/query/getTransactionReceipt.d.ts +4 -4
- package/dist/types/query/getWalletClient.d.ts +2962 -2953
- package/dist/types/query/getWalletClient.d.ts.map +1 -1
- package/dist/types/query/infiniteReadContracts.d.ts +7 -7
- package/dist/types/query/readContract.d.ts +16 -16
- package/dist/types/query/readContracts.d.ts +7 -7
- package/dist/types/query/sendCalls.d.ts +9 -4
- package/dist/types/query/sendCalls.d.ts.map +1 -1
- package/dist/types/query/signTypedData.d.ts +5 -5
- package/dist/types/query/signTypedData.d.ts.map +1 -1
- package/dist/types/query/switchChain.d.ts +11 -1
- package/dist/types/query/switchChain.d.ts.map +1 -1
- package/dist/types/query/verifyMessage.d.ts +12 -12
- package/dist/types/query/waitForCallsStatus.d.ts +17 -13
- package/dist/types/query/waitForCallsStatus.d.ts.map +1 -1
- package/dist/types/query/waitForTransactionReceipt.d.ts +17 -17
- package/dist/types/query/watchAsset.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/actions/getCapabilities.ts +19 -8
- package/src/actions/sendCalls.ts +7 -2
- package/src/actions/waitForCallsStatus.ts +2 -2
- package/src/query/getCapabilities.ts +28 -13
- package/src/query/sendCalls.ts +8 -5
- package/src/version.ts +1 -1
|
@@ -12,14 +12,17 @@ import { filterQueryOptions } from '../query/utils.js'
|
|
|
12
12
|
import type { ScopeKeyParameter } from '../types/properties.js'
|
|
13
13
|
import type { Compute, ExactPartial } from '../types/utils.js'
|
|
14
14
|
|
|
15
|
-
export type GetCapabilitiesOptions
|
|
16
|
-
|
|
15
|
+
export type GetCapabilitiesOptions<
|
|
16
|
+
config extends Config = Config,
|
|
17
|
+
chainId extends config['chains'][number]['id'] | undefined = undefined,
|
|
18
|
+
> = Compute<
|
|
19
|
+
ExactPartial<GetCapabilitiesParameters<config, chainId>> & ScopeKeyParameter
|
|
17
20
|
>
|
|
18
21
|
|
|
19
|
-
export function getCapabilitiesQueryOptions<
|
|
20
|
-
config
|
|
21
|
-
|
|
22
|
-
) {
|
|
22
|
+
export function getCapabilitiesQueryOptions<
|
|
23
|
+
config extends Config,
|
|
24
|
+
chainId extends config['chains'][number]['id'] | undefined = undefined,
|
|
25
|
+
>(config: config, options: GetCapabilitiesOptions<config, chainId> = {}) {
|
|
23
26
|
return {
|
|
24
27
|
async queryFn({ queryKey }) {
|
|
25
28
|
const { scopeKey: _, ...parameters } = queryKey[1]
|
|
@@ -32,19 +35,31 @@ export function getCapabilitiesQueryOptions<config extends Config>(
|
|
|
32
35
|
return failureCount < 3
|
|
33
36
|
},
|
|
34
37
|
} as const satisfies QueryOptions<
|
|
35
|
-
GetCapabilitiesQueryFnData,
|
|
38
|
+
GetCapabilitiesQueryFnData<config, chainId>,
|
|
36
39
|
GetCapabilitiesErrorType,
|
|
37
|
-
GetCapabilitiesData,
|
|
38
|
-
GetCapabilitiesQueryKey
|
|
40
|
+
GetCapabilitiesData<config, chainId>,
|
|
41
|
+
GetCapabilitiesQueryKey<config, chainId>
|
|
39
42
|
>
|
|
40
43
|
}
|
|
41
44
|
|
|
42
|
-
export type GetCapabilitiesQueryFnData
|
|
45
|
+
export type GetCapabilitiesQueryFnData<
|
|
46
|
+
config extends Config = Config,
|
|
47
|
+
chainId extends config['chains'][number]['id'] | undefined = undefined,
|
|
48
|
+
> = GetCapabilitiesReturnType<config, chainId>
|
|
43
49
|
|
|
44
|
-
export type GetCapabilitiesData
|
|
50
|
+
export type GetCapabilitiesData<
|
|
51
|
+
config extends Config = Config,
|
|
52
|
+
chainId extends config['chains'][number]['id'] | undefined = undefined,
|
|
53
|
+
> = GetCapabilitiesQueryFnData<config, chainId>
|
|
45
54
|
|
|
46
|
-
export function getCapabilitiesQueryKey
|
|
55
|
+
export function getCapabilitiesQueryKey<
|
|
56
|
+
config extends Config,
|
|
57
|
+
chainId extends config['chains'][number]['id'] | undefined = undefined,
|
|
58
|
+
>(options: GetCapabilitiesOptions<config, chainId> = {}) {
|
|
47
59
|
return ['capabilities', filterQueryOptions(options)] as const
|
|
48
60
|
}
|
|
49
61
|
|
|
50
|
-
export type GetCapabilitiesQueryKey
|
|
62
|
+
export type GetCapabilitiesQueryKey<
|
|
63
|
+
config extends Config,
|
|
64
|
+
chainId extends config['chains'][number]['id'] | undefined = undefined,
|
|
65
|
+
> = ReturnType<typeof getCapabilitiesQueryKey<config, chainId>>
|
package/src/query/sendCalls.ts
CHANGED
|
@@ -29,18 +29,20 @@ export type SendCallsData = Compute<SendCallsReturnType>
|
|
|
29
29
|
export type SendCallsVariables<
|
|
30
30
|
config extends Config,
|
|
31
31
|
chainId extends config['chains'][number]['id'],
|
|
32
|
-
|
|
32
|
+
calls extends readonly unknown[] = readonly unknown[],
|
|
33
|
+
> = SendCallsParameters<config, chainId, calls>
|
|
33
34
|
|
|
34
35
|
export type SendCallsMutate<config extends Config, context = unknown> = <
|
|
36
|
+
const calls extends readonly unknown[],
|
|
35
37
|
chainId extends config['chains'][number]['id'],
|
|
36
38
|
>(
|
|
37
|
-
variables: SendCallsVariables<config, chainId>,
|
|
39
|
+
variables: SendCallsVariables<config, chainId, calls>,
|
|
38
40
|
options?:
|
|
39
41
|
| Compute<
|
|
40
42
|
MutateOptions<
|
|
41
43
|
SendCallsData,
|
|
42
44
|
SendCallsErrorType,
|
|
43
|
-
Compute<SendCallsVariables<config, chainId>>,
|
|
45
|
+
Compute<SendCallsVariables<config, chainId, calls>>,
|
|
44
46
|
context
|
|
45
47
|
>
|
|
46
48
|
>
|
|
@@ -48,15 +50,16 @@ export type SendCallsMutate<config extends Config, context = unknown> = <
|
|
|
48
50
|
) => void
|
|
49
51
|
|
|
50
52
|
export type SendCallsMutateAsync<config extends Config, context = unknown> = <
|
|
53
|
+
const calls extends readonly unknown[],
|
|
51
54
|
chainId extends config['chains'][number]['id'],
|
|
52
55
|
>(
|
|
53
|
-
variables: SendCallsVariables<config, chainId>,
|
|
56
|
+
variables: SendCallsVariables<config, chainId, calls>,
|
|
54
57
|
options?:
|
|
55
58
|
| Compute<
|
|
56
59
|
MutateOptions<
|
|
57
60
|
SendCallsData,
|
|
58
61
|
SendCallsErrorType,
|
|
59
|
-
Compute<SendCallsVariables<config, chainId>>,
|
|
62
|
+
Compute<SendCallsVariables<config, chainId, calls>>,
|
|
60
63
|
context
|
|
61
64
|
>
|
|
62
65
|
>
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.17.
|
|
1
|
+
export const version = '2.17.2'
|