@wagmi/core 2.0.0-alpha.5 → 2.0.0-alpha.7
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/estimateFeesPerGas.js.map +1 -1
- package/dist/esm/actions/estimateGas.js.map +1 -1
- package/dist/esm/actions/getBalance.js.map +1 -1
- package/dist/esm/actions/getBlock.js.map +1 -1
- package/dist/esm/actions/getBlockNumber.js.map +1 -1
- package/dist/esm/actions/getEnsAddress.js.map +1 -1
- package/dist/esm/actions/getEnsAvatar.js.map +1 -1
- package/dist/esm/actions/getEnsName.js.map +1 -1
- package/dist/esm/actions/getEnsResolver.js.map +1 -1
- package/dist/esm/actions/getToken.js.map +1 -1
- package/dist/esm/actions/getTransaction.js.map +1 -1
- package/dist/esm/actions/multicall.js.map +1 -1
- package/dist/esm/actions/readContract.js.map +1 -1
- package/dist/esm/actions/readContracts.js.map +1 -1
- package/dist/esm/actions/sendTransaction.js +1 -3
- package/dist/esm/actions/sendTransaction.js.map +1 -1
- package/dist/esm/actions/signMessage.js.map +1 -1
- package/dist/esm/actions/signTypedData.js.map +1 -1
- package/dist/esm/actions/simulateContract.js.map +1 -1
- package/dist/esm/actions/waitForTransactionReceipt.js.map +1 -1
- package/dist/esm/actions/writeContract.js +2 -4
- package/dist/esm/actions/writeContract.js.map +1 -1
- package/dist/esm/connectors/injected.js +3 -5
- package/dist/esm/connectors/injected.js.map +1 -1
- package/dist/esm/exports/query.js +1 -0
- package/dist/esm/exports/query.js.map +1 -1
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/actions/connect.d.ts +1 -1
- package/dist/types/actions/connect.d.ts.map +1 -1
- package/dist/types/actions/disconnect.d.ts +1 -1
- package/dist/types/actions/disconnect.d.ts.map +1 -1
- package/dist/types/actions/estimateFeesPerGas.d.ts +2 -2
- package/dist/types/actions/estimateFeesPerGas.d.ts.map +1 -1
- package/dist/types/actions/estimateGas.d.ts +2 -2
- package/dist/types/actions/estimateGas.d.ts.map +1 -1
- package/dist/types/actions/getBalance.d.ts +2 -2
- package/dist/types/actions/getBalance.d.ts.map +1 -1
- package/dist/types/actions/getBlock.d.ts +2 -2
- package/dist/types/actions/getBlock.d.ts.map +1 -1
- package/dist/types/actions/getBlockNumber.d.ts +2 -2
- package/dist/types/actions/getBlockNumber.d.ts.map +1 -1
- package/dist/types/actions/getConnectorClient.d.ts +1 -1
- package/dist/types/actions/getConnectorClient.d.ts.map +1 -1
- package/dist/types/actions/getEnsAddress.d.ts +2 -2
- package/dist/types/actions/getEnsAddress.d.ts.map +1 -1
- package/dist/types/actions/getEnsAvatar.d.ts +2 -2
- package/dist/types/actions/getEnsAvatar.d.ts.map +1 -1
- package/dist/types/actions/getEnsName.d.ts +2 -2
- package/dist/types/actions/getEnsName.d.ts.map +1 -1
- package/dist/types/actions/getEnsResolver.d.ts +2 -2
- package/dist/types/actions/getEnsResolver.d.ts.map +1 -1
- package/dist/types/actions/getToken.d.ts +2 -1
- package/dist/types/actions/getToken.d.ts.map +1 -1
- package/dist/types/actions/getTransaction.d.ts +2 -2
- package/dist/types/actions/getTransaction.d.ts.map +1 -1
- package/dist/types/actions/getWalletClient.d.ts +2 -2
- package/dist/types/actions/getWalletClient.d.ts.map +1 -1
- package/dist/types/actions/multicall.d.ts +2 -1
- package/dist/types/actions/multicall.d.ts.map +1 -1
- package/dist/types/actions/readContract.d.ts +2 -2
- package/dist/types/actions/readContract.d.ts.map +1 -1
- package/dist/types/actions/readContracts.d.ts +3 -1
- package/dist/types/actions/readContracts.d.ts.map +1 -1
- package/dist/types/actions/reconnect.d.ts +1 -1
- package/dist/types/actions/reconnect.d.ts.map +1 -1
- package/dist/types/actions/sendTransaction.d.ts +2 -2
- package/dist/types/actions/sendTransaction.d.ts.map +1 -1
- package/dist/types/actions/signMessage.d.ts +2 -2
- package/dist/types/actions/signMessage.d.ts.map +1 -1
- package/dist/types/actions/signTypedData.d.ts +2 -2
- package/dist/types/actions/signTypedData.d.ts.map +1 -1
- package/dist/types/actions/simulateContract.d.ts +2 -2
- package/dist/types/actions/simulateContract.d.ts.map +1 -1
- package/dist/types/actions/switchAccount.d.ts +1 -1
- package/dist/types/actions/switchAccount.d.ts.map +1 -1
- package/dist/types/actions/switchChain.d.ts +1 -1
- package/dist/types/actions/switchChain.d.ts.map +1 -1
- package/dist/types/actions/waitForTransactionReceipt.d.ts +3 -2
- package/dist/types/actions/waitForTransactionReceipt.d.ts.map +1 -1
- package/dist/types/actions/writeContract.d.ts +3 -2
- package/dist/types/actions/writeContract.d.ts.map +1 -1
- package/dist/types/connectors/injected.d.ts +4 -5
- package/dist/types/connectors/injected.d.ts.map +1 -1
- package/dist/types/exports/actions.d.ts +26 -26
- package/dist/types/exports/actions.d.ts.map +1 -1
- package/dist/types/exports/index.d.ts +26 -26
- package/dist/types/exports/index.d.ts.map +1 -1
- package/dist/types/exports/query.d.ts +1 -0
- package/dist/types/exports/query.d.ts.map +1 -1
- package/dist/types/query/connect.d.ts +3 -3
- package/dist/types/query/connect.d.ts.map +1 -1
- package/dist/types/query/disconnect.d.ts +3 -3
- package/dist/types/query/disconnect.d.ts.map +1 -1
- package/dist/types/query/reconnect.d.ts +3 -3
- package/dist/types/query/reconnect.d.ts.map +1 -1
- package/dist/types/query/sendTransaction.d.ts +3 -3
- package/dist/types/query/sendTransaction.d.ts.map +1 -1
- package/dist/types/query/signMessage.d.ts +3 -3
- package/dist/types/query/signMessage.d.ts.map +1 -1
- package/dist/types/query/signTypedData.d.ts +3 -3
- package/dist/types/query/signTypedData.d.ts.map +1 -1
- package/dist/types/query/switchAccount.d.ts +3 -3
- package/dist/types/query/switchAccount.d.ts.map +1 -1
- package/dist/types/query/switchChain.d.ts +3 -3
- package/dist/types/query/switchChain.d.ts.map +1 -1
- package/dist/types/query/writeContract.d.ts +3 -3
- package/dist/types/query/writeContract.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +6 -10
- package/src/actions/connect.ts +1 -1
- package/src/actions/disconnect.ts +1 -1
- package/src/actions/estimateFeesPerGas.ts +2 -1
- package/src/actions/estimateGas.ts +2 -1
- package/src/actions/getBalance.ts +2 -1
- package/src/actions/getBlock.ts +2 -1
- package/src/actions/getBlockNumber.ts +2 -1
- package/src/actions/getConnectorClient.ts +1 -1
- package/src/actions/getEnsAddress.ts +2 -1
- package/src/actions/getEnsAvatar.ts +2 -1
- package/src/actions/getEnsName.ts +2 -1
- package/src/actions/getEnsResolver.ts +2 -1
- package/src/actions/getToken.ts +2 -2
- package/src/actions/getTransaction.ts +2 -1
- package/src/actions/getWalletClient.ts +2 -2
- package/src/actions/multicall.ts +3 -0
- package/src/actions/readContract.ts +2 -1
- package/src/actions/readContracts.ts +3 -3
- package/src/actions/reconnect.ts +1 -1
- package/src/actions/sendTransaction.ts +5 -6
- package/src/actions/signMessage.ts +2 -1
- package/src/actions/signTypedData.ts +2 -1
- package/src/actions/simulateContract.ts +2 -1
- package/src/actions/switchAccount.ts +1 -1
- package/src/actions/switchChain.ts +1 -1
- package/src/actions/waitForTransactionReceipt.ts +6 -7
- package/src/actions/writeContract.ts +8 -7
- package/src/connectors/injected.ts +8 -13
- package/src/exports/actions.ts +26 -26
- package/src/exports/index.ts +26 -26
- package/src/exports/query.ts +1 -0
- package/src/query/connect.ts +4 -4
- package/src/query/disconnect.ts +4 -4
- package/src/query/estimateFeesPerGas.ts +2 -2
- package/src/query/estimateGas.ts +2 -2
- package/src/query/getBalance.ts +2 -2
- package/src/query/getBlock.ts +2 -2
- package/src/query/getBlockNumber.ts +2 -2
- package/src/query/getConnectorClient.ts +2 -2
- package/src/query/getEnsAddress.ts +2 -2
- package/src/query/getEnsAvatar.ts +2 -2
- package/src/query/getEnsName.ts +2 -2
- package/src/query/getEnsResolver.ts +2 -2
- package/src/query/getToken.ts +2 -2
- package/src/query/getTransaction.ts +2 -2
- package/src/query/getWalletClient.ts +2 -2
- package/src/query/infiniteReadContracts.ts +2 -2
- package/src/query/readContract.ts +2 -2
- package/src/query/readContracts.ts +2 -2
- package/src/query/reconnect.ts +4 -4
- package/src/query/sendTransaction.ts +4 -4
- package/src/query/signMessage.ts +4 -4
- package/src/query/signTypedData.ts +4 -4
- package/src/query/simulateContract.ts +2 -2
- package/src/query/switchAccount.ts +4 -4
- package/src/query/switchChain.ts +4 -4
- package/src/query/waitForTransactionReceipt.ts +2 -2
- package/src/query/writeContract.ts +4 -4
- package/src/version.ts +1 -1
|
@@ -28,11 +28,7 @@ export type InjectedParameters = {
|
|
|
28
28
|
/**
|
|
29
29
|
* [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) Ethereum Provider to target
|
|
30
30
|
*/
|
|
31
|
-
target?:
|
|
32
|
-
| TargetId
|
|
33
|
-
| TargetMap[TargetId]
|
|
34
|
-
| (() => TargetMap[TargetId] | undefined)
|
|
35
|
-
| undefined
|
|
31
|
+
target?: TargetId | Target | (() => Target | undefined) | undefined
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
const targetMap = {
|
|
@@ -91,7 +87,7 @@ const targetMap = {
|
|
|
91
87
|
export function injected(parameters: InjectedParameters = {}) {
|
|
92
88
|
const { shimDisconnect = true, unstable_shimAsyncInject } = parameters
|
|
93
89
|
|
|
94
|
-
function getTarget(): Evaluate<
|
|
90
|
+
function getTarget(): Evaluate<Target & { id: string }> {
|
|
95
91
|
const target = parameters.target
|
|
96
92
|
if (typeof target === 'function') {
|
|
97
93
|
const result = target()
|
|
@@ -151,7 +147,7 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
151
147
|
accounts = await this.getAccounts().catch(() => null)
|
|
152
148
|
const isAuthorized = !!accounts?.length
|
|
153
149
|
if (isAuthorized)
|
|
154
|
-
// Attempt to show another prompt for selecting
|
|
150
|
+
// Attempt to show another prompt for selecting account if already connected
|
|
155
151
|
try {
|
|
156
152
|
const permissions = await provider.request({
|
|
157
153
|
method: 'wallet_requestPermissions',
|
|
@@ -262,7 +258,6 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
262
258
|
// automatically whenever there is a targeted connector configured.
|
|
263
259
|
if (!parameters.target) {
|
|
264
260
|
const connected = await config.storage?.getItem('injected.connected')
|
|
265
|
-
console.log({ connected })
|
|
266
261
|
if (!connected) return false
|
|
267
262
|
}
|
|
268
263
|
|
|
@@ -323,13 +318,11 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
323
318
|
const chain = config.chains.find((x) => x.id === chainId)
|
|
324
319
|
if (!chain) throw new SwitchChainError(new ChainNotConfiguredError())
|
|
325
320
|
|
|
326
|
-
const id = numberToHex(chainId)
|
|
327
|
-
|
|
328
321
|
try {
|
|
329
322
|
await Promise.all([
|
|
330
323
|
provider.request({
|
|
331
324
|
method: 'wallet_switchEthereumChain',
|
|
332
|
-
params: [{ chainId:
|
|
325
|
+
params: [{ chainId: numberToHex(chainId) }],
|
|
333
326
|
}),
|
|
334
327
|
new Promise<void>((resolve) =>
|
|
335
328
|
config.emitter.once('change', ({ chainId: currentChainId }) => {
|
|
@@ -363,7 +356,7 @@ export function injected(parameters: InjectedParameters = {}) {
|
|
|
363
356
|
method: 'wallet_addEthereumChain',
|
|
364
357
|
params: [
|
|
365
358
|
{
|
|
366
|
-
chainId:
|
|
359
|
+
chainId: numberToHex(chainId),
|
|
367
360
|
chainName: chain.name,
|
|
368
361
|
nativeCurrency: chain.nativeCurrency,
|
|
369
362
|
rpcUrls: [chain.rpcUrls.public?.http[0] ?? ''],
|
|
@@ -459,7 +452,8 @@ type Target = {
|
|
|
459
452
|
| ((window?: Window | undefined) => WalletProvider | undefined)
|
|
460
453
|
}
|
|
461
454
|
|
|
462
|
-
|
|
455
|
+
/** @deprecated */
|
|
456
|
+
type TargetId = Evaluate<WalletProviderFlags> extends `is${infer name}`
|
|
463
457
|
? name extends `${infer char}${infer rest}`
|
|
464
458
|
? `${Lowercase<char>}${rest}`
|
|
465
459
|
: never
|
|
@@ -467,6 +461,7 @@ export type TargetId = Evaluate<WalletProviderFlags> extends `is${infer name}`
|
|
|
467
461
|
|
|
468
462
|
type TargetMap = { [_ in TargetId]?: Target | undefined }
|
|
469
463
|
|
|
464
|
+
/** @deprecated */
|
|
470
465
|
type WalletProviderFlags =
|
|
471
466
|
| 'isApexWallet'
|
|
472
467
|
| 'isAvalanche'
|
package/src/exports/actions.ts
CHANGED
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
// Actions
|
|
3
3
|
|
|
4
4
|
export {
|
|
5
|
-
type
|
|
5
|
+
type ConnectErrorType,
|
|
6
6
|
type ConnectParameters,
|
|
7
7
|
type ConnectReturnType,
|
|
8
8
|
connect,
|
|
9
9
|
} from '../actions/connect.js'
|
|
10
10
|
|
|
11
11
|
export {
|
|
12
|
-
type
|
|
12
|
+
type DisconnectErrorType,
|
|
13
13
|
type DisconnectParameters,
|
|
14
14
|
type DisconnectReturnType,
|
|
15
15
|
disconnect,
|
|
16
16
|
} from '../actions/disconnect.js'
|
|
17
17
|
|
|
18
18
|
export {
|
|
19
|
-
type
|
|
19
|
+
type EstimateGasErrorType,
|
|
20
20
|
type EstimateGasParameters,
|
|
21
21
|
type EstimateGasReturnType,
|
|
22
22
|
estimateGas,
|
|
23
23
|
} from '../actions/estimateGas.js'
|
|
24
24
|
|
|
25
25
|
export {
|
|
26
|
-
type
|
|
26
|
+
type EstimateFeesPerGasErrorType,
|
|
27
27
|
type EstimateFeesPerGasParameters,
|
|
28
28
|
type EstimateFeesPerGasReturnType,
|
|
29
29
|
estimateFeesPerGas,
|
|
@@ -37,21 +37,21 @@ export {
|
|
|
37
37
|
export {
|
|
38
38
|
type GetBalanceParameters,
|
|
39
39
|
type GetBalanceReturnType,
|
|
40
|
-
type
|
|
40
|
+
type GetBalanceErrorType,
|
|
41
41
|
getBalance,
|
|
42
42
|
/** @deprecated use `getBalance` instead */
|
|
43
43
|
getBalance as fetchBalance,
|
|
44
44
|
} from '../actions/getBalance.js'
|
|
45
45
|
|
|
46
46
|
export {
|
|
47
|
-
type
|
|
47
|
+
type GetBlockErrorType,
|
|
48
48
|
type GetBlockParameters,
|
|
49
49
|
type GetBlockReturnType,
|
|
50
50
|
getBlock,
|
|
51
51
|
} from '../actions/getBlock.js'
|
|
52
52
|
|
|
53
53
|
export {
|
|
54
|
-
type
|
|
54
|
+
type GetBlockNumberErrorType,
|
|
55
55
|
type GetBlockNumberParameters,
|
|
56
56
|
type GetBlockNumberReturnType,
|
|
57
57
|
getBlockNumber,
|
|
@@ -81,14 +81,14 @@ export {
|
|
|
81
81
|
} from '../actions/getConnectors.js'
|
|
82
82
|
|
|
83
83
|
export {
|
|
84
|
-
type
|
|
84
|
+
type GetConnectorClientErrorType,
|
|
85
85
|
type GetConnectorClientParameters,
|
|
86
86
|
type GetConnectorClientReturnType,
|
|
87
87
|
getConnectorClient,
|
|
88
88
|
} from '../actions/getConnectorClient.js'
|
|
89
89
|
|
|
90
90
|
export {
|
|
91
|
-
type
|
|
91
|
+
type GetEnsAddressErrorType,
|
|
92
92
|
type GetEnsAddressParameters,
|
|
93
93
|
type GetEnsAddressReturnType,
|
|
94
94
|
getEnsAddress,
|
|
@@ -97,7 +97,7 @@ export {
|
|
|
97
97
|
} from '../actions/getEnsAddress.js'
|
|
98
98
|
|
|
99
99
|
export {
|
|
100
|
-
type
|
|
100
|
+
type GetEnsAvatarErrorType,
|
|
101
101
|
type GetEnsAvatarParameters,
|
|
102
102
|
type GetEnsAvatarReturnType,
|
|
103
103
|
getEnsAvatar,
|
|
@@ -106,7 +106,7 @@ export {
|
|
|
106
106
|
} from '../actions/getEnsAvatar.js'
|
|
107
107
|
|
|
108
108
|
export {
|
|
109
|
-
type
|
|
109
|
+
type GetEnsNameErrorType,
|
|
110
110
|
type GetEnsNameParameters,
|
|
111
111
|
type GetEnsNameReturnType,
|
|
112
112
|
getEnsName,
|
|
@@ -115,7 +115,7 @@ export {
|
|
|
115
115
|
} from '../actions/getEnsName.js'
|
|
116
116
|
|
|
117
117
|
export {
|
|
118
|
-
type
|
|
118
|
+
type GetEnsResolverErrorType,
|
|
119
119
|
type GetEnsResolverParameters,
|
|
120
120
|
type GetEnsResolverReturnType,
|
|
121
121
|
getEnsResolver,
|
|
@@ -130,7 +130,7 @@ export {
|
|
|
130
130
|
} from '../actions/getPublicClient.js'
|
|
131
131
|
|
|
132
132
|
export {
|
|
133
|
-
type
|
|
133
|
+
type GetTokenErrorType,
|
|
134
134
|
type GetTokenParameters,
|
|
135
135
|
type GetTokenReturnType,
|
|
136
136
|
getToken,
|
|
@@ -139,7 +139,7 @@ export {
|
|
|
139
139
|
} from '../actions/getToken.js'
|
|
140
140
|
|
|
141
141
|
export {
|
|
142
|
-
type
|
|
142
|
+
type GetTransactionErrorType,
|
|
143
143
|
type GetTransactionParameters,
|
|
144
144
|
type GetTransactionReturnType,
|
|
145
145
|
getTransaction,
|
|
@@ -148,7 +148,7 @@ export {
|
|
|
148
148
|
} from '../actions/getTransaction.js'
|
|
149
149
|
|
|
150
150
|
export {
|
|
151
|
-
type
|
|
151
|
+
type GetWalletClientErrorType,
|
|
152
152
|
type GetWalletClientParameters,
|
|
153
153
|
type GetWalletClientReturnType,
|
|
154
154
|
getWalletClient,
|
|
@@ -163,61 +163,61 @@ export {
|
|
|
163
163
|
export {
|
|
164
164
|
type ReadContractParameters,
|
|
165
165
|
type ReadContractReturnType,
|
|
166
|
-
type
|
|
166
|
+
type ReadContractErrorType,
|
|
167
167
|
readContract,
|
|
168
168
|
} from '../actions/readContract.js'
|
|
169
169
|
|
|
170
170
|
export {
|
|
171
171
|
type ReadContractsParameters,
|
|
172
172
|
type ReadContractsReturnType,
|
|
173
|
-
type
|
|
173
|
+
type ReadContractsErrorType,
|
|
174
174
|
readContracts,
|
|
175
175
|
} from '../actions/readContracts.js'
|
|
176
176
|
|
|
177
177
|
export {
|
|
178
|
-
type
|
|
178
|
+
type ReconnectErrorType,
|
|
179
179
|
type ReconnectParameters,
|
|
180
180
|
type ReconnectReturnType,
|
|
181
181
|
reconnect,
|
|
182
182
|
} from '../actions/reconnect.js'
|
|
183
183
|
|
|
184
184
|
export {
|
|
185
|
-
type
|
|
185
|
+
type SendTransactionErrorType,
|
|
186
186
|
type SendTransactionParameters,
|
|
187
187
|
type SendTransactionReturnType,
|
|
188
188
|
sendTransaction,
|
|
189
189
|
} from '../actions/sendTransaction.js'
|
|
190
190
|
|
|
191
191
|
export {
|
|
192
|
-
type
|
|
192
|
+
type SignMessageErrorType,
|
|
193
193
|
type SignMessageParameters,
|
|
194
194
|
type SignMessageReturnType,
|
|
195
195
|
signMessage,
|
|
196
196
|
} from '../actions/signMessage.js'
|
|
197
197
|
|
|
198
198
|
export {
|
|
199
|
-
type
|
|
199
|
+
type SignTypedDataErrorType,
|
|
200
200
|
type SignTypedDataParameters,
|
|
201
201
|
type SignTypedDataReturnType,
|
|
202
202
|
signTypedData,
|
|
203
203
|
} from '../actions/signTypedData.js'
|
|
204
204
|
|
|
205
205
|
export {
|
|
206
|
-
type
|
|
206
|
+
type SimulateContractErrorType,
|
|
207
207
|
type SimulateContractParameters,
|
|
208
208
|
type SimulateContractReturnType,
|
|
209
209
|
simulateContract,
|
|
210
210
|
} from '../actions/simulateContract.js'
|
|
211
211
|
|
|
212
212
|
export {
|
|
213
|
-
type
|
|
213
|
+
type SwitchAccountErrorType,
|
|
214
214
|
type SwitchAccountParameters,
|
|
215
215
|
type SwitchAccountReturnType,
|
|
216
216
|
switchAccount,
|
|
217
217
|
} from '../actions/switchAccount.js'
|
|
218
218
|
|
|
219
219
|
export {
|
|
220
|
-
type
|
|
220
|
+
type SwitchChainErrorType,
|
|
221
221
|
type SwitchChainParameters,
|
|
222
222
|
type SwitchChainReturnType,
|
|
223
223
|
switchChain,
|
|
@@ -286,7 +286,7 @@ export {
|
|
|
286
286
|
} from '../actions/watchPublicClient.js'
|
|
287
287
|
|
|
288
288
|
export {
|
|
289
|
-
type
|
|
289
|
+
type WaitForTransactionReceiptErrorType,
|
|
290
290
|
type WaitForTransactionReceiptParameters,
|
|
291
291
|
type WaitForTransactionReceiptReturnType,
|
|
292
292
|
waitForTransactionReceipt,
|
|
@@ -295,7 +295,7 @@ export {
|
|
|
295
295
|
} from '../actions/waitForTransactionReceipt.js'
|
|
296
296
|
|
|
297
297
|
export {
|
|
298
|
-
type
|
|
298
|
+
type WriteContractErrorType,
|
|
299
299
|
type WriteContractParameters,
|
|
300
300
|
type WriteContractReturnType,
|
|
301
301
|
writeContract,
|
package/src/exports/index.ts
CHANGED
|
@@ -13,28 +13,28 @@ export {
|
|
|
13
13
|
// Actions
|
|
14
14
|
|
|
15
15
|
export {
|
|
16
|
-
type
|
|
16
|
+
type ConnectErrorType,
|
|
17
17
|
type ConnectParameters,
|
|
18
18
|
type ConnectReturnType,
|
|
19
19
|
connect,
|
|
20
20
|
} from '../actions/connect.js'
|
|
21
21
|
|
|
22
22
|
export {
|
|
23
|
-
type
|
|
23
|
+
type DisconnectErrorType,
|
|
24
24
|
type DisconnectParameters,
|
|
25
25
|
type DisconnectReturnType,
|
|
26
26
|
disconnect,
|
|
27
27
|
} from '../actions/disconnect.js'
|
|
28
28
|
|
|
29
29
|
export {
|
|
30
|
-
type
|
|
30
|
+
type EstimateGasErrorType,
|
|
31
31
|
type EstimateGasParameters,
|
|
32
32
|
type EstimateGasReturnType,
|
|
33
33
|
estimateGas,
|
|
34
34
|
} from '../actions/estimateGas.js'
|
|
35
35
|
|
|
36
36
|
export {
|
|
37
|
-
type
|
|
37
|
+
type EstimateFeesPerGasErrorType,
|
|
38
38
|
type EstimateFeesPerGasParameters,
|
|
39
39
|
type EstimateFeesPerGasReturnType,
|
|
40
40
|
estimateFeesPerGas,
|
|
@@ -48,21 +48,21 @@ export {
|
|
|
48
48
|
export {
|
|
49
49
|
type GetBalanceParameters,
|
|
50
50
|
type GetBalanceReturnType,
|
|
51
|
-
type
|
|
51
|
+
type GetBalanceErrorType,
|
|
52
52
|
getBalance,
|
|
53
53
|
/** @deprecated use `getBalance` instead */
|
|
54
54
|
getBalance as fetchBalance,
|
|
55
55
|
} from '../actions/getBalance.js'
|
|
56
56
|
|
|
57
57
|
export {
|
|
58
|
-
type
|
|
58
|
+
type GetBlockErrorType,
|
|
59
59
|
type GetBlockParameters,
|
|
60
60
|
type GetBlockReturnType,
|
|
61
61
|
getBlock,
|
|
62
62
|
} from '../actions/getBlock.js'
|
|
63
63
|
|
|
64
64
|
export {
|
|
65
|
-
type
|
|
65
|
+
type GetBlockNumberErrorType,
|
|
66
66
|
type GetBlockNumberParameters,
|
|
67
67
|
type GetBlockNumberReturnType,
|
|
68
68
|
getBlockNumber,
|
|
@@ -92,14 +92,14 @@ export {
|
|
|
92
92
|
} from '../actions/getConnectors.js'
|
|
93
93
|
|
|
94
94
|
export {
|
|
95
|
-
type
|
|
95
|
+
type GetConnectorClientErrorType,
|
|
96
96
|
type GetConnectorClientParameters,
|
|
97
97
|
type GetConnectorClientReturnType,
|
|
98
98
|
getConnectorClient,
|
|
99
99
|
} from '../actions/getConnectorClient.js'
|
|
100
100
|
|
|
101
101
|
export {
|
|
102
|
-
type
|
|
102
|
+
type GetEnsAddressErrorType,
|
|
103
103
|
type GetEnsAddressParameters,
|
|
104
104
|
type GetEnsAddressReturnType,
|
|
105
105
|
getEnsAddress,
|
|
@@ -108,7 +108,7 @@ export {
|
|
|
108
108
|
} from '../actions/getEnsAddress.js'
|
|
109
109
|
|
|
110
110
|
export {
|
|
111
|
-
type
|
|
111
|
+
type GetEnsAvatarErrorType,
|
|
112
112
|
type GetEnsAvatarParameters,
|
|
113
113
|
type GetEnsAvatarReturnType,
|
|
114
114
|
getEnsAvatar,
|
|
@@ -117,7 +117,7 @@ export {
|
|
|
117
117
|
} from '../actions/getEnsAvatar.js'
|
|
118
118
|
|
|
119
119
|
export {
|
|
120
|
-
type
|
|
120
|
+
type GetEnsNameErrorType,
|
|
121
121
|
type GetEnsNameParameters,
|
|
122
122
|
type GetEnsNameReturnType,
|
|
123
123
|
getEnsName,
|
|
@@ -126,7 +126,7 @@ export {
|
|
|
126
126
|
} from '../actions/getEnsName.js'
|
|
127
127
|
|
|
128
128
|
export {
|
|
129
|
-
type
|
|
129
|
+
type GetEnsResolverErrorType,
|
|
130
130
|
type GetEnsResolverParameters,
|
|
131
131
|
type GetEnsResolverReturnType,
|
|
132
132
|
getEnsResolver,
|
|
@@ -141,7 +141,7 @@ export {
|
|
|
141
141
|
} from '../actions/getPublicClient.js'
|
|
142
142
|
|
|
143
143
|
export {
|
|
144
|
-
type
|
|
144
|
+
type GetTokenErrorType,
|
|
145
145
|
type GetTokenParameters,
|
|
146
146
|
type GetTokenReturnType,
|
|
147
147
|
getToken,
|
|
@@ -150,7 +150,7 @@ export {
|
|
|
150
150
|
} from '../actions/getToken.js'
|
|
151
151
|
|
|
152
152
|
export {
|
|
153
|
-
type
|
|
153
|
+
type GetTransactionErrorType,
|
|
154
154
|
type GetTransactionParameters,
|
|
155
155
|
type GetTransactionReturnType,
|
|
156
156
|
getTransaction,
|
|
@@ -159,7 +159,7 @@ export {
|
|
|
159
159
|
} from '../actions/getTransaction.js'
|
|
160
160
|
|
|
161
161
|
export {
|
|
162
|
-
type
|
|
162
|
+
type GetWalletClientErrorType,
|
|
163
163
|
type GetWalletClientParameters,
|
|
164
164
|
type GetWalletClientReturnType,
|
|
165
165
|
getWalletClient,
|
|
@@ -174,61 +174,61 @@ export {
|
|
|
174
174
|
export {
|
|
175
175
|
type ReadContractParameters,
|
|
176
176
|
type ReadContractReturnType,
|
|
177
|
-
type
|
|
177
|
+
type ReadContractErrorType,
|
|
178
178
|
readContract,
|
|
179
179
|
} from '../actions/readContract.js'
|
|
180
180
|
|
|
181
181
|
export {
|
|
182
182
|
type ReadContractsParameters,
|
|
183
183
|
type ReadContractsReturnType,
|
|
184
|
-
type
|
|
184
|
+
type ReadContractsErrorType,
|
|
185
185
|
readContracts,
|
|
186
186
|
} from '../actions/readContracts.js'
|
|
187
187
|
|
|
188
188
|
export {
|
|
189
|
-
type
|
|
189
|
+
type ReconnectErrorType,
|
|
190
190
|
type ReconnectParameters,
|
|
191
191
|
type ReconnectReturnType,
|
|
192
192
|
reconnect,
|
|
193
193
|
} from '../actions/reconnect.js'
|
|
194
194
|
|
|
195
195
|
export {
|
|
196
|
-
type
|
|
196
|
+
type SendTransactionErrorType,
|
|
197
197
|
type SendTransactionParameters,
|
|
198
198
|
type SendTransactionReturnType,
|
|
199
199
|
sendTransaction,
|
|
200
200
|
} from '../actions/sendTransaction.js'
|
|
201
201
|
|
|
202
202
|
export {
|
|
203
|
-
type
|
|
203
|
+
type SignMessageErrorType,
|
|
204
204
|
type SignMessageParameters,
|
|
205
205
|
type SignMessageReturnType,
|
|
206
206
|
signMessage,
|
|
207
207
|
} from '../actions/signMessage.js'
|
|
208
208
|
|
|
209
209
|
export {
|
|
210
|
-
type
|
|
210
|
+
type SignTypedDataErrorType,
|
|
211
211
|
type SignTypedDataParameters,
|
|
212
212
|
type SignTypedDataReturnType,
|
|
213
213
|
signTypedData,
|
|
214
214
|
} from '../actions/signTypedData.js'
|
|
215
215
|
|
|
216
216
|
export {
|
|
217
|
-
type
|
|
217
|
+
type SimulateContractErrorType,
|
|
218
218
|
type SimulateContractParameters,
|
|
219
219
|
type SimulateContractReturnType,
|
|
220
220
|
simulateContract,
|
|
221
221
|
} from '../actions/simulateContract.js'
|
|
222
222
|
|
|
223
223
|
export {
|
|
224
|
-
type
|
|
224
|
+
type SwitchAccountErrorType,
|
|
225
225
|
type SwitchAccountParameters,
|
|
226
226
|
type SwitchAccountReturnType,
|
|
227
227
|
switchAccount,
|
|
228
228
|
} from '../actions/switchAccount.js'
|
|
229
229
|
|
|
230
230
|
export {
|
|
231
|
-
type
|
|
231
|
+
type SwitchChainErrorType,
|
|
232
232
|
type SwitchChainParameters,
|
|
233
233
|
type SwitchChainReturnType,
|
|
234
234
|
switchChain,
|
|
@@ -297,7 +297,7 @@ export {
|
|
|
297
297
|
} from '../actions/watchPublicClient.js'
|
|
298
298
|
|
|
299
299
|
export {
|
|
300
|
-
type
|
|
300
|
+
type WaitForTransactionReceiptErrorType,
|
|
301
301
|
type WaitForTransactionReceiptParameters,
|
|
302
302
|
type WaitForTransactionReceiptReturnType,
|
|
303
303
|
waitForTransactionReceipt,
|
|
@@ -306,7 +306,7 @@ export {
|
|
|
306
306
|
} from '../actions/waitForTransactionReceipt.js'
|
|
307
307
|
|
|
308
308
|
export {
|
|
309
|
-
type
|
|
309
|
+
type WriteContractErrorType,
|
|
310
310
|
type WriteContractParameters,
|
|
311
311
|
type WriteContractReturnType,
|
|
312
312
|
writeContract,
|
package/src/exports/query.ts
CHANGED
package/src/query/connect.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MutationOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
type
|
|
4
|
+
type ConnectErrorType,
|
|
5
5
|
type ConnectParameters,
|
|
6
6
|
type ConnectReturnType,
|
|
7
7
|
connect,
|
|
@@ -18,7 +18,7 @@ export function connectMutationOptions<config extends Config>(config: config) {
|
|
|
18
18
|
mutationKey: ['connect'],
|
|
19
19
|
} as const satisfies MutationOptions<
|
|
20
20
|
ConnectData<config>,
|
|
21
|
-
|
|
21
|
+
ConnectErrorType,
|
|
22
22
|
ConnectVariables<config>
|
|
23
23
|
>
|
|
24
24
|
}
|
|
@@ -29,7 +29,7 @@ export type ConnectVariables<config extends Config> = ConnectParameters<config>
|
|
|
29
29
|
|
|
30
30
|
export type ConnectMutate<config extends Config, context = unknown> = Mutate<
|
|
31
31
|
ConnectData<config>,
|
|
32
|
-
|
|
32
|
+
ConnectErrorType,
|
|
33
33
|
ConnectVariables<config>,
|
|
34
34
|
context
|
|
35
35
|
>
|
|
@@ -39,7 +39,7 @@ export type ConnectMutateAsync<
|
|
|
39
39
|
context = unknown,
|
|
40
40
|
> = MutateAsync<
|
|
41
41
|
ConnectData<config>,
|
|
42
|
-
|
|
42
|
+
ConnectErrorType,
|
|
43
43
|
ConnectVariables<config>,
|
|
44
44
|
context
|
|
45
45
|
>
|
package/src/query/disconnect.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MutationOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
type
|
|
4
|
+
type DisconnectErrorType,
|
|
5
5
|
type DisconnectParameters,
|
|
6
6
|
type DisconnectReturnType,
|
|
7
7
|
disconnect,
|
|
@@ -19,7 +19,7 @@ export function disconnectMutationOptions<config extends Config>(
|
|
|
19
19
|
mutationKey: ['disconnect'],
|
|
20
20
|
} as const satisfies MutationOptions<
|
|
21
21
|
DisconnectData,
|
|
22
|
-
|
|
22
|
+
DisconnectErrorType,
|
|
23
23
|
DisconnectVariables
|
|
24
24
|
>
|
|
25
25
|
}
|
|
@@ -30,14 +30,14 @@ export type DisconnectVariables = DisconnectParameters | undefined
|
|
|
30
30
|
|
|
31
31
|
export type DisconnectMutate<context = unknown> = Mutate<
|
|
32
32
|
DisconnectData,
|
|
33
|
-
|
|
33
|
+
DisconnectErrorType,
|
|
34
34
|
DisconnectVariables,
|
|
35
35
|
context
|
|
36
36
|
>
|
|
37
37
|
|
|
38
38
|
export type DisconnectMutateAsync<context = unknown> = MutateAsync<
|
|
39
39
|
DisconnectData,
|
|
40
|
-
|
|
40
|
+
DisconnectErrorType,
|
|
41
41
|
DisconnectVariables,
|
|
42
42
|
context
|
|
43
43
|
>
|
|
@@ -2,7 +2,7 @@ import { type QueryOptions } from '@tanstack/query-core'
|
|
|
2
2
|
import type { FeeValuesType } from 'viem'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
type
|
|
5
|
+
type EstimateFeesPerGasErrorType,
|
|
6
6
|
type EstimateFeesPerGasParameters,
|
|
7
7
|
type EstimateFeesPerGasReturnType,
|
|
8
8
|
estimateFeesPerGas,
|
|
@@ -31,7 +31,7 @@ export function estimateFeesPerGasQueryOptions<
|
|
|
31
31
|
queryKey: estimateFeesPerGasQueryKey(options),
|
|
32
32
|
} as const satisfies QueryOptions<
|
|
33
33
|
EstimateFeesPerGasQueryFnData<type>,
|
|
34
|
-
|
|
34
|
+
EstimateFeesPerGasErrorType,
|
|
35
35
|
EstimateFeesPerGasData<type>,
|
|
36
36
|
EstimateFeesPerGasQueryKey<config, type>
|
|
37
37
|
>
|
package/src/query/estimateGas.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type QueryOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
type
|
|
4
|
+
type EstimateGasErrorType,
|
|
5
5
|
type EstimateGasParameters,
|
|
6
6
|
type EstimateGasReturnType,
|
|
7
7
|
estimateGas,
|
|
@@ -31,7 +31,7 @@ export function estimateGasQueryOptions<
|
|
|
31
31
|
queryKey: estimateGasQueryKey(options),
|
|
32
32
|
} as const satisfies QueryOptions<
|
|
33
33
|
EstimateGasQueryFnData,
|
|
34
|
-
|
|
34
|
+
EstimateGasErrorType,
|
|
35
35
|
EstimateGasData,
|
|
36
36
|
EstimateGasQueryKey<config, chainId>
|
|
37
37
|
>
|
package/src/query/getBalance.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type QueryOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
type
|
|
4
|
+
type GetBalanceErrorType,
|
|
5
5
|
type GetBalanceParameters,
|
|
6
6
|
type GetBalanceReturnType,
|
|
7
7
|
getBalance,
|
|
@@ -32,7 +32,7 @@ export function getBalanceQueryOptions<config extends Config>(
|
|
|
32
32
|
queryKey: getBalanceQueryKey(options),
|
|
33
33
|
} as const satisfies QueryOptions<
|
|
34
34
|
GetBalanceQueryFnData,
|
|
35
|
-
|
|
35
|
+
GetBalanceErrorType,
|
|
36
36
|
GetBalanceData,
|
|
37
37
|
GetBalanceQueryKey<config>
|
|
38
38
|
>
|
package/src/query/getBlock.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { type QueryOptions } from '@tanstack/query-core'
|
|
|
2
2
|
import type { BlockTag } from 'viem'
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
type
|
|
5
|
+
type GetBlockErrorType,
|
|
6
6
|
type GetBlockParameters,
|
|
7
7
|
type GetBlockReturnType,
|
|
8
8
|
getBlock,
|
|
@@ -43,7 +43,7 @@ export function getBlockQueryOptions<
|
|
|
43
43
|
queryKey: getBlockQueryKey(options),
|
|
44
44
|
} as const satisfies QueryOptions<
|
|
45
45
|
GetBlockQueryFnData,
|
|
46
|
-
|
|
46
|
+
GetBlockErrorType,
|
|
47
47
|
GetBlockData,
|
|
48
48
|
GetBlockQueryKey<includeTransactions, blockTag, config, chainId>
|
|
49
49
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type QueryOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
type
|
|
4
|
+
type GetBlockNumberErrorType,
|
|
5
5
|
type GetBlockNumberParameters,
|
|
6
6
|
type GetBlockNumberReturnType,
|
|
7
7
|
getBlockNumber,
|
|
@@ -32,7 +32,7 @@ export function getBlockNumberQueryOptions<
|
|
|
32
32
|
queryKey: getBlockNumberQueryKey(options),
|
|
33
33
|
} as const satisfies QueryOptions<
|
|
34
34
|
GetBlockNumberQueryFnData,
|
|
35
|
-
|
|
35
|
+
GetBlockNumberErrorType,
|
|
36
36
|
GetBlockNumberData,
|
|
37
37
|
GetBlockNumberQueryKey<config, chainId>
|
|
38
38
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type QueryOptions } from '@tanstack/query-core'
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
|
-
type
|
|
4
|
+
type GetConnectorClientErrorType,
|
|
5
5
|
type GetConnectorClientParameters,
|
|
6
6
|
type GetConnectorClientReturnType,
|
|
7
7
|
getConnectorClient,
|
|
@@ -36,7 +36,7 @@ export function getConnectorClientQueryOptions<
|
|
|
36
36
|
queryKey: getConnectorClientQueryKey(options),
|
|
37
37
|
} as const satisfies QueryOptions<
|
|
38
38
|
GetConnectorClientQueryFnData<config, chainId>,
|
|
39
|
-
|
|
39
|
+
GetConnectorClientErrorType,
|
|
40
40
|
GetConnectorClientData<config, chainId>,
|
|
41
41
|
GetConnectorClientQueryKey<config, chainId>
|
|
42
42
|
>
|