@dynamic-labs/multi-wallet 0.16.12-viem.1 → 0.16.13

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +13 -3
  2. package/package.json +4 -4
  3. package/src/errors.cjs +2 -1
  4. package/src/errors.d.ts +6 -2
  5. package/src/errors.js +2 -1
  6. package/src/multi-wallet.cjs +4 -3
  7. package/src/multi-wallet.js +4 -3
  8. package/src/rpcProviders.cjs +2 -6
  9. package/src/rpcProviders.js +2 -6
  10. package/src/types.d.ts +8 -16
  11. package/src/utils/assignConfirmationScreenToProvider/assignConfirmationScreenToProvider.cjs +54 -0
  12. package/src/utils/assignConfirmationScreenToProvider/assignConfirmationScreenToProvider.d.ts +3 -0
  13. package/src/utils/assignConfirmationScreenToProvider/assignConfirmationScreenToProvider.js +50 -0
  14. package/src/utils/assignConfirmationScreenToProvider/index.d.ts +1 -0
  15. package/src/utils/isFunction/isFunction.cjs +8 -0
  16. package/src/utils/isFunction/isFunction.js +4 -0
  17. package/src/utils/message.cjs +2 -2
  18. package/src/utils/message.js +1 -1
  19. package/src/wallets/algorand/myalgo.d.ts +2 -1
  20. package/src/wallets/clients/coinbase/coinbase.cjs +2 -2
  21. package/src/wallets/clients/coinbase/coinbase.js +2 -2
  22. package/src/wallets/clients/walletConnect/walletConnect.cjs +5 -9
  23. package/src/wallets/clients/walletConnect/walletConnect.d.ts +2 -2
  24. package/src/wallets/clients/walletConnect/walletConnect.js +5 -9
  25. package/src/wallets/ethereum/BloctoEvm.cjs +140 -0
  26. package/src/wallets/ethereum/BloctoEvm.d.ts +2 -4
  27. package/src/wallets/ethereum/BloctoEvm.js +134 -0
  28. package/src/wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.cjs +37 -5
  29. package/src/wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.d.ts +3 -0
  30. package/src/wallets/ethereum/MagicConnector/MagicClientNetworkHandler/MagicClientNetworkHandler.js +37 -5
  31. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.cjs +14 -35
  32. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.d.ts +4 -4
  33. package/src/wallets/ethereum/MagicConnector/MagicWalletConnector/MagicWalletConnector.js +14 -35
  34. package/src/wallets/ethereum/coinbase.cjs +7 -18
  35. package/src/wallets/ethereum/coinbase.d.ts +2 -750
  36. package/src/wallets/ethereum/coinbase.js +7 -18
  37. package/src/wallets/ethereum/ethProvider.cjs +29 -13
  38. package/src/wallets/ethereum/ethProvider.d.ts +7 -7
  39. package/src/wallets/ethereum/ethProvider.js +29 -13
  40. package/src/wallets/ethereum/ethProviderHelper.cjs +34 -52
  41. package/src/wallets/ethereum/ethProviderHelper.d.ts +20 -20
  42. package/src/wallets/ethereum/ethProviderHelper.js +34 -52
  43. package/src/wallets/ethereum/fortmatic.cjs +7 -15
  44. package/src/wallets/ethereum/fortmatic.d.ts +3 -5
  45. package/src/wallets/ethereum/fortmatic.js +7 -15
  46. package/src/wallets/ethereum/meta-mask.cjs +2 -13
  47. package/src/wallets/ethereum/meta-mask.d.ts +3 -752
  48. package/src/wallets/ethereum/meta-mask.js +2 -13
  49. package/src/wallets/walletConnect/walletConnect.cjs +6 -8
  50. package/src/wallets/walletConnect/walletConnect.d.ts +4 -751
  51. package/src/wallets/walletConnect/walletConnect.js +6 -8
  52. package/src/wallets/walletConnect/walletConnectV2.cjs +7 -11
  53. package/src/wallets/walletConnect/walletConnectV2.d.ts +4 -751
  54. package/src/wallets/walletConnect/walletConnectV2.js +7 -11
  55. package/src/wallets/window.d.ts +1 -3
  56. package/src/getOrMapViemChain.cjs +0 -77
  57. package/src/getOrMapViemChain.d.ts +0 -11
  58. package/src/getOrMapViemChain.js +0 -51
@@ -1,11 +1,9 @@
1
- import { WalletClient } from 'viem';
1
+ import { ethers } from 'ethers';
2
2
  import { Chain, WalletConnector, WalletEventListeners } from '@dynamic-labs/wallet-connector-core';
3
3
  import { EthProviderHelper } from './ethProviderHelper';
4
4
  import { EthProvider } from './ethProvider';
5
5
  import { EvmNetwork } from './evm-network';
6
6
  declare class MetaMask extends EthProvider implements WalletConnector {
7
- providerResources: string[] | undefined;
8
- switchNetworkOnlyFromWallet: boolean | undefined;
9
7
  name: string;
10
8
  supportedChains: Chain[];
11
9
  connectedChain: Chain;
@@ -17,754 +15,7 @@ declare class MetaMask extends EthProvider implements WalletConnector {
17
15
  get key(): string;
18
16
  setupEventListeners(listeners: WalletEventListeners): () => void;
19
17
  teardownEventListeners(): void;
20
- getWeb3Provider(): {
21
- chain: undefined;
22
- key: string;
23
- name: string;
24
- pollingInterval: number;
25
- request: {
26
- (args: {
27
- method: "web3_clientVersion";
28
- params?: undefined;
29
- }): Promise<string>;
30
- (args: {
31
- method: "web3_sha3";
32
- params: [data: `0x${string}`];
33
- }): Promise<string>;
34
- (args: {
35
- method: "net_listening";
36
- params?: undefined;
37
- }): Promise<boolean>;
38
- (args: {
39
- method: "net_peerCount";
40
- params?: undefined;
41
- }): Promise<`0x${string}`>;
42
- (args: {
43
- method: "net_version";
44
- params?: undefined;
45
- }): Promise<`0x${string}`>;
46
- (args: {
47
- method: "eth_blockNumber";
48
- params?: undefined;
49
- }): Promise<`0x${string}`>;
50
- (args: {
51
- method: "eth_call";
52
- params: [request: Partial<import("viem").RpcTransactionRequest>, block?: `0x${string}` | import("viem").BlockTag | import("viem").RpcBlockIdentifier | undefined];
53
- }): Promise<`0x${string}`>;
54
- (args: {
55
- method: "eth_chainId";
56
- params?: undefined;
57
- }): Promise<`0x${string}`>;
58
- (args: {
59
- method: "eth_coinbase";
60
- params?: undefined;
61
- }): Promise<`0x${string}`>;
62
- (args: {
63
- method: "eth_estimateGas";
64
- params: [parameters: import("viem").RpcTransactionRequest, block?: `0x${string}` | import("viem").BlockTag | undefined];
65
- }): Promise<`0x${string}`>;
66
- (args: {
67
- method: "eth_feeHistory";
68
- params: [blockCount: `0x${string}`, newestBlock: `0x${string}` | import("viem").BlockTag, rewardPercentiles: number[] | undefined];
69
- }): Promise<import("viem").RpcFeeHistory>;
70
- (args: {
71
- method: "eth_gasPrice";
72
- params?: undefined;
73
- }): Promise<`0x${string}`>;
74
- (args: {
75
- method: "eth_getBalance";
76
- params: [address: `0x${string}`, block: `0x${string}` | import("viem").BlockTag | import("viem").RpcBlockIdentifier];
77
- }): Promise<`0x${string}`>;
78
- (args: {
79
- method: "eth_getBlockByHash";
80
- params: [hash: `0x${string}`, includeTransactionObjects: boolean];
81
- }): Promise<import("viem").RpcBlock | null>;
82
- (args: {
83
- method: "eth_getBlockByNumber";
84
- params: [block: `0x${string}` | import("viem").BlockTag, includeTransactionObjects: boolean];
85
- }): Promise<import("viem").RpcBlock | null>;
86
- (args: {
87
- method: "eth_getBlockTransactionCountByHash";
88
- params: [hash: `0x${string}`];
89
- }): Promise<`0x${string}`>;
90
- (args: {
91
- method: "eth_getBlockTransactionCountByNumber";
92
- params: [block: `0x${string}` | import("viem").BlockTag];
93
- }): Promise<`0x${string}`>;
94
- (args: {
95
- method: "eth_getCode";
96
- params: [address: `0x${string}`, block: `0x${string}` | import("viem").BlockTag | import("viem").RpcBlockIdentifier];
97
- }): Promise<`0x${string}`>;
98
- (args: {
99
- method: "eth_getFilterChanges";
100
- params: [filterId: `0x${string}`];
101
- }): Promise<{
102
- address: `0x${string}`;
103
- blockHash: `0x${string}` | null;
104
- blockNumber: `0x${string}` | null;
105
- data: `0x${string}`;
106
- logIndex: `0x${string}` | null;
107
- transactionHash: `0x${string}` | null;
108
- transactionIndex: `0x${string}` | null;
109
- topics: [`0x${string}`, ...`0x${string}`[]] | [];
110
- removed: boolean;
111
- }[] | `0x${string}`[]>;
112
- (args: {
113
- method: "eth_getFilterLogs";
114
- params: [filterId: `0x${string}`];
115
- }): Promise<{
116
- address: `0x${string}`;
117
- blockHash: `0x${string}` | null;
118
- blockNumber: `0x${string}` | null;
119
- data: `0x${string}`;
120
- logIndex: `0x${string}` | null;
121
- transactionHash: `0x${string}` | null;
122
- transactionIndex: `0x${string}` | null;
123
- topics: [`0x${string}`, ...`0x${string}`[]] | [];
124
- removed: boolean;
125
- }[]>;
126
- (args: {
127
- method: "eth_getLogs";
128
- params: [parameters: {
129
- address?: `0x${string}` | `0x${string}`[] | undefined;
130
- topics?: import("viem/dist/types/types").LogTopic[] | undefined;
131
- } & ({
132
- fromBlock?: `0x${string}` | import("viem").BlockTag | undefined;
133
- toBlock?: `0x${string}` | import("viem").BlockTag | undefined;
134
- blockHash?: undefined;
135
- } | {
136
- fromBlock?: undefined;
137
- toBlock?: undefined;
138
- blockHash?: `0x${string}` | undefined;
139
- })];
140
- }): Promise<{
141
- address: `0x${string}`;
142
- blockHash: `0x${string}` | null;
143
- blockNumber: `0x${string}` | null;
144
- data: `0x${string}`;
145
- logIndex: `0x${string}` | null;
146
- transactionHash: `0x${string}` | null;
147
- transactionIndex: `0x${string}` | null;
148
- topics: [`0x${string}`, ...`0x${string}`[]] | [];
149
- removed: boolean;
150
- }[]>;
151
- (args: {
152
- method: "eth_getStorageAt";
153
- params: [address: `0x${string}`, index: `0x${string}`, block: `0x${string}` | import("viem").BlockTag | import("viem").RpcBlockIdentifier];
154
- }): Promise<`0x${string}`>;
155
- (args: {
156
- method: "eth_getTransactionByBlockHashAndIndex";
157
- params: [hash: `0x${string}`, index: `0x${string}`];
158
- }): Promise<import("viem").RpcTransaction | null>;
159
- (args: {
160
- method: "eth_getTransactionByBlockNumberAndIndex";
161
- params: [block: `0x${string}` | import("viem").BlockTag, index: `0x${string}`];
162
- }): Promise<import("viem").RpcTransaction | null>;
163
- (args: {
164
- method: "eth_getTransactionByHash";
165
- params: [hash: `0x${string}`];
166
- }): Promise<import("viem").RpcTransaction | null>;
167
- (args: {
168
- method: "eth_getTransactionCount";
169
- params: [address: `0x${string}`, block: `0x${string}` | import("viem").BlockTag | import("viem").RpcBlockIdentifier];
170
- }): Promise<`0x${string}`>;
171
- (args: {
172
- method: "eth_getTransactionReceipt";
173
- params: [hash: `0x${string}`];
174
- }): Promise<import("viem").RpcTransactionReceipt | null>;
175
- (args: {
176
- method: "eth_getUncleByBlockHashAndIndex";
177
- params: [hash: `0x${string}`, index: `0x${string}`];
178
- }): Promise<import("viem").RpcUncle | null>;
179
- (args: {
180
- method: "eth_getUncleByBlockNumberAndIndex";
181
- params: [block: `0x${string}` | import("viem").BlockTag, index: `0x${string}`];
182
- }): Promise<import("viem").RpcUncle | null>;
183
- (args: {
184
- method: "eth_getUncleCountByBlockHash";
185
- params: [hash: `0x${string}`];
186
- }): Promise<`0x${string}`>;
187
- (args: {
188
- method: "eth_getUncleCountByBlockNumber";
189
- params: [block: `0x${string}` | import("viem").BlockTag];
190
- }): Promise<`0x${string}`>;
191
- (args: {
192
- method: "eth_newBlockFilter";
193
- params?: undefined;
194
- }): Promise<`0x${string}`>;
195
- (args: {
196
- method: "eth_newFilter";
197
- params: [filter: {
198
- fromBlock?: `0x${string}` | import("viem").BlockTag | undefined;
199
- toBlock?: `0x${string}` | import("viem").BlockTag | undefined;
200
- address?: `0x${string}` | `0x${string}`[] | undefined;
201
- topics?: import("viem/dist/types/types").LogTopic[] | undefined;
202
- }];
203
- }): Promise<`0x${string}`>;
204
- (args: {
205
- method: "eth_newPendingTransactionFilter";
206
- params?: undefined;
207
- }): Promise<`0x${string}`>;
208
- (args: {
209
- method: "eth_protocolVersion";
210
- params?: undefined;
211
- }): Promise<string>;
212
- (args: {
213
- method: "eth_sendRawTransaction";
214
- params: [signedTransaction: `0x${string}`];
215
- }): Promise<`0x${string}`>;
216
- (args: {
217
- method: "eth_uninstallFilter";
218
- params: [filterId: `0x${string}`];
219
- }): Promise<boolean>;
220
- } & {
221
- (args: {
222
- method: "eth_sendTransaction";
223
- params: [request: import("viem").RpcTransactionRequest];
224
- }): Promise<`0x${string}`>;
225
- (args: {
226
- method: "eth_sign";
227
- params: [address: `0x${string}`, data: `0x${string}`];
228
- }): Promise<`0x${string}`>;
229
- (args: {
230
- method: "eth_signTransaction";
231
- params: [request: import("viem").RpcTransactionRequest];
232
- }): Promise<`0x${string}`>;
233
- (args: {
234
- method: "eth_signTypedData_v4";
235
- params: [address: `0x${string}`, message: string];
236
- }): Promise<`0x${string}`>;
237
- (args: {
238
- method: "eth_syncing";
239
- params?: undefined;
240
- }): Promise<false | import("viem/dist/types/types/eip1193").NetworkSync>;
241
- (args: {
242
- method: "personal_sign";
243
- params: [data: `0x${string}`, address: `0x${string}`];
244
- }): Promise<`0x${string}`>;
245
- } & {
246
- (args: {
247
- method: "eth_accounts";
248
- params?: undefined;
249
- }): Promise<`0x${string}`[]>;
250
- (args: {
251
- method: "eth_chainId";
252
- params?: undefined;
253
- }): Promise<`0x${string}`>;
254
- (args: {
255
- method: "eth_requestAccounts";
256
- params?: undefined;
257
- }): Promise<`0x${string}`[]>;
258
- (args: {
259
- method: "wallet_requestPermissions";
260
- params: [permissions: {
261
- eth_accounts: Record<string, any>;
262
- }];
263
- }): Promise<import("viem/dist/types/types/eip1193").WalletPermission[]>;
264
- (args: {
265
- method: "wallet_getPermissions";
266
- params?: undefined;
267
- }): Promise<import("viem/dist/types/types/eip1193").WalletPermission[]>;
268
- (args: {
269
- method: "wallet_addEthereumChain";
270
- params: [chain: import("viem/dist/types/types/eip1193").Chain];
271
- }): Promise<null>;
272
- (args: {
273
- method: "wallet_switchEthereumChain";
274
- params: [chain: {
275
- chainId: string;
276
- }];
277
- }): Promise<null>;
278
- (args: {
279
- method: "wallet_watchAsset";
280
- params: import("viem/dist/types/types/eip1193").WatchAssetParams;
281
- }): Promise<boolean>;
282
- };
283
- transport: import("viem").TransportConfig<"custom", {
284
- (args: {
285
- method: "web3_clientVersion";
286
- params?: undefined;
287
- }): Promise<string>;
288
- (args: {
289
- method: "web3_sha3";
290
- params: [data: `0x${string}`];
291
- }): Promise<string>;
292
- (args: {
293
- method: "net_listening";
294
- params?: undefined;
295
- }): Promise<boolean>;
296
- (args: {
297
- method: "net_peerCount";
298
- params?: undefined;
299
- }): Promise<`0x${string}`>;
300
- (args: {
301
- method: "net_version";
302
- params?: undefined;
303
- }): Promise<`0x${string}`>;
304
- (args: {
305
- method: "eth_blockNumber";
306
- params?: undefined;
307
- }): Promise<`0x${string}`>;
308
- (args: {
309
- method: "eth_call";
310
- params: [request: Partial<import("viem").RpcTransactionRequest>, block?: `0x${string}` | import("viem").BlockTag | import("viem").RpcBlockIdentifier | undefined];
311
- }): Promise<`0x${string}`>;
312
- (args: {
313
- method: "eth_chainId";
314
- params?: undefined;
315
- }): Promise<`0x${string}`>;
316
- (args: {
317
- method: "eth_coinbase";
318
- params?: undefined;
319
- }): Promise<`0x${string}`>;
320
- (args: {
321
- method: "eth_estimateGas";
322
- params: [parameters: import("viem").RpcTransactionRequest, block?: `0x${string}` | import("viem").BlockTag | undefined];
323
- }): Promise<`0x${string}`>;
324
- (args: {
325
- method: "eth_feeHistory";
326
- params: [blockCount: `0x${string}`, newestBlock: `0x${string}` | import("viem").BlockTag, rewardPercentiles: number[] | undefined];
327
- }): Promise<import("viem").RpcFeeHistory>;
328
- (args: {
329
- method: "eth_gasPrice";
330
- params?: undefined;
331
- }): Promise<`0x${string}`>;
332
- (args: {
333
- method: "eth_getBalance";
334
- params: [address: `0x${string}`, block: `0x${string}` | import("viem").BlockTag | import("viem").RpcBlockIdentifier];
335
- }): Promise<`0x${string}`>;
336
- (args: {
337
- method: "eth_getBlockByHash";
338
- params: [hash: `0x${string}`, includeTransactionObjects: boolean];
339
- }): Promise<import("viem").RpcBlock | null>;
340
- (args: {
341
- method: "eth_getBlockByNumber";
342
- params: [block: `0x${string}` | import("viem").BlockTag, includeTransactionObjects: boolean];
343
- }): Promise<import("viem").RpcBlock | null>;
344
- (args: {
345
- method: "eth_getBlockTransactionCountByHash";
346
- params: [hash: `0x${string}`];
347
- }): Promise<`0x${string}`>;
348
- (args: {
349
- method: "eth_getBlockTransactionCountByNumber";
350
- params: [block: `0x${string}` | import("viem").BlockTag];
351
- }): Promise<`0x${string}`>;
352
- (args: {
353
- method: "eth_getCode";
354
- params: [address: `0x${string}`, block: `0x${string}` | import("viem").BlockTag | import("viem").RpcBlockIdentifier];
355
- }): Promise<`0x${string}`>;
356
- (args: {
357
- method: "eth_getFilterChanges";
358
- params: [filterId: `0x${string}`];
359
- }): Promise<{
360
- address: `0x${string}`;
361
- blockHash: `0x${string}` | null;
362
- blockNumber: `0x${string}` | null;
363
- data: `0x${string}`;
364
- logIndex: `0x${string}` | null;
365
- transactionHash: `0x${string}` | null;
366
- transactionIndex: `0x${string}` | null;
367
- topics: [`0x${string}`, ...`0x${string}`[]] | [];
368
- removed: boolean;
369
- }[] | `0x${string}`[]>;
370
- (args: {
371
- method: "eth_getFilterLogs";
372
- params: [filterId: `0x${string}`];
373
- }): Promise<{
374
- address: `0x${string}`;
375
- blockHash: `0x${string}` | null;
376
- blockNumber: `0x${string}` | null;
377
- data: `0x${string}`;
378
- logIndex: `0x${string}` | null;
379
- transactionHash: `0x${string}` | null;
380
- transactionIndex: `0x${string}` | null;
381
- topics: [`0x${string}`, ...`0x${string}`[]] | [];
382
- removed: boolean;
383
- }[]>;
384
- (args: {
385
- method: "eth_getLogs";
386
- params: [parameters: {
387
- address?: `0x${string}` | `0x${string}`[] | undefined;
388
- topics?: import("viem/dist/types/types").LogTopic[] | undefined;
389
- } & ({
390
- fromBlock?: `0x${string}` | import("viem").BlockTag | undefined;
391
- toBlock?: `0x${string}` | import("viem").BlockTag | undefined;
392
- blockHash?: undefined;
393
- } | {
394
- fromBlock?: undefined;
395
- toBlock?: undefined;
396
- blockHash?: `0x${string}` | undefined;
397
- })];
398
- }): Promise<{
399
- address: `0x${string}`;
400
- blockHash: `0x${string}` | null;
401
- blockNumber: `0x${string}` | null;
402
- data: `0x${string}`;
403
- logIndex: `0x${string}` | null;
404
- transactionHash: `0x${string}` | null;
405
- transactionIndex: `0x${string}` | null;
406
- topics: [`0x${string}`, ...`0x${string}`[]] | [];
407
- removed: boolean;
408
- }[]>;
409
- (args: {
410
- method: "eth_getStorageAt";
411
- params: [address: `0x${string}`, index: `0x${string}`, block: `0x${string}` | import("viem").BlockTag | import("viem").RpcBlockIdentifier];
412
- }): Promise<`0x${string}`>;
413
- (args: {
414
- method: "eth_getTransactionByBlockHashAndIndex";
415
- params: [hash: `0x${string}`, index: `0x${string}`];
416
- }): Promise<import("viem").RpcTransaction | null>;
417
- (args: {
418
- method: "eth_getTransactionByBlockNumberAndIndex";
419
- params: [block: `0x${string}` | import("viem").BlockTag, index: `0x${string}`];
420
- }): Promise<import("viem").RpcTransaction | null>;
421
- (args: {
422
- method: "eth_getTransactionByHash";
423
- params: [hash: `0x${string}`];
424
- }): Promise<import("viem").RpcTransaction | null>;
425
- (args: {
426
- method: "eth_getTransactionCount";
427
- params: [address: `0x${string}`, block: `0x${string}` | import("viem").BlockTag | import("viem").RpcBlockIdentifier];
428
- }): Promise<`0x${string}`>;
429
- (args: {
430
- method: "eth_getTransactionReceipt";
431
- params: [hash: `0x${string}`];
432
- }): Promise<import("viem").RpcTransactionReceipt | null>;
433
- (args: {
434
- method: "eth_getUncleByBlockHashAndIndex";
435
- params: [hash: `0x${string}`, index: `0x${string}`];
436
- }): Promise<import("viem").RpcUncle | null>;
437
- (args: {
438
- method: "eth_getUncleByBlockNumberAndIndex";
439
- params: [block: `0x${string}` | import("viem").BlockTag, index: `0x${string}`];
440
- }): Promise<import("viem").RpcUncle | null>;
441
- (args: {
442
- method: "eth_getUncleCountByBlockHash";
443
- params: [hash: `0x${string}`];
444
- }): Promise<`0x${string}`>;
445
- (args: {
446
- method: "eth_getUncleCountByBlockNumber";
447
- params: [block: `0x${string}` | import("viem").BlockTag];
448
- }): Promise<`0x${string}`>;
449
- (args: {
450
- method: "eth_newBlockFilter";
451
- params?: undefined;
452
- }): Promise<`0x${string}`>;
453
- (args: {
454
- method: "eth_newFilter";
455
- params: [filter: {
456
- fromBlock?: `0x${string}` | import("viem").BlockTag | undefined;
457
- toBlock?: `0x${string}` | import("viem").BlockTag | undefined;
458
- address?: `0x${string}` | `0x${string}`[] | undefined;
459
- topics?: import("viem/dist/types/types").LogTopic[] | undefined;
460
- }];
461
- }): Promise<`0x${string}`>;
462
- (args: {
463
- method: "eth_newPendingTransactionFilter";
464
- params?: undefined;
465
- }): Promise<`0x${string}`>;
466
- (args: {
467
- method: "eth_protocolVersion";
468
- params?: undefined;
469
- }): Promise<string>;
470
- (args: {
471
- method: "eth_sendRawTransaction";
472
- params: [signedTransaction: `0x${string}`];
473
- }): Promise<`0x${string}`>;
474
- (args: {
475
- method: "eth_uninstallFilter";
476
- params: [filterId: `0x${string}`];
477
- }): Promise<boolean>;
478
- } & {
479
- (args: {
480
- method: "eth_sendTransaction";
481
- params: [request: import("viem").RpcTransactionRequest];
482
- }): Promise<`0x${string}`>;
483
- (args: {
484
- method: "eth_sign";
485
- params: [address: `0x${string}`, data: `0x${string}`];
486
- }): Promise<`0x${string}`>;
487
- (args: {
488
- method: "eth_signTransaction";
489
- params: [request: import("viem").RpcTransactionRequest];
490
- }): Promise<`0x${string}`>;
491
- (args: {
492
- method: "eth_signTypedData_v4";
493
- params: [address: `0x${string}`, message: string];
494
- }): Promise<`0x${string}`>;
495
- (args: {
496
- method: "eth_syncing";
497
- params?: undefined;
498
- }): Promise<false | import("viem/dist/types/types/eip1193").NetworkSync>;
499
- (args: {
500
- method: "personal_sign";
501
- params: [data: `0x${string}`, address: `0x${string}`];
502
- }): Promise<`0x${string}`>;
503
- } & {
504
- (args: {
505
- method: "eth_accounts";
506
- params?: undefined;
507
- }): Promise<`0x${string}`[]>;
508
- (args: {
509
- method: "eth_chainId";
510
- params?: undefined;
511
- }): Promise<`0x${string}`>;
512
- (args: {
513
- method: "eth_requestAccounts";
514
- params?: undefined;
515
- }): Promise<`0x${string}`[]>;
516
- (args: {
517
- method: "wallet_requestPermissions";
518
- params: [permissions: {
519
- eth_accounts: Record<string, any>;
520
- }];
521
- }): Promise<import("viem/dist/types/types/eip1193").WalletPermission[]>;
522
- (args: {
523
- method: "wallet_getPermissions";
524
- params?: undefined;
525
- }): Promise<import("viem/dist/types/types/eip1193").WalletPermission[]>;
526
- (args: {
527
- method: "wallet_addEthereumChain";
528
- params: [chain: import("viem/dist/types/types/eip1193").Chain];
529
- }): Promise<null>;
530
- (args: {
531
- method: "wallet_switchEthereumChain";
532
- params: [chain: {
533
- chainId: string;
534
- }];
535
- }): Promise<null>;
536
- (args: {
537
- method: "wallet_watchAsset";
538
- params: import("viem/dist/types/types/eip1193").WatchAssetParams;
539
- }): Promise<boolean>;
540
- }> & ((...args: any) => Promise<any>);
541
- type: string;
542
- uid: string;
543
- addChain: (args: import("viem").AddChainParameters) => Promise<void>;
544
- deployContract: <TAbi extends import("abitype/dist/abi-7aa1f183").l | readonly unknown[], TChainOverride extends import("viem").Chain<import("viem/dist/types/types").Formatters> | undefined>(args: import("viem").DeployContractParameters<TAbi, undefined, undefined, TChainOverride>) => Promise<`0x${string}`>;
545
- getAddresses: () => Promise<import("viem").GetAddressesReturnType>;
546
- getChainId: () => Promise<number>;
547
- getPermissions: () => Promise<import("viem").GetPermissionsReturnType>;
548
- requestAddresses: () => Promise<import("viem").RequestAddressesReturnType>;
549
- requestPermissions: (args: {
550
- [x: string]: Record<string, any>;
551
- eth_accounts: Record<string, any>;
552
- }) => Promise<import("viem").RequestPermissionsReturnType>;
553
- sendTransaction: <TChainOverride_1 extends import("viem").Chain<import("viem/dist/types/types").Formatters> | undefined>(args: import("viem").SendTransactionParameters<undefined, undefined, TChainOverride_1>) => Promise<`0x${string}`>;
554
- signMessage: (args: import("viem").SignMessageParameters<undefined>) => Promise<`0x${string}`>;
555
- signTypedData: <TTypedData extends {
556
- [x: string]: readonly import("abitype/dist/abi-7aa1f183").o[];
557
- [x: `string[${string}]`]: undefined;
558
- [x: `function[${string}]`]: undefined;
559
- [x: `address[${string}]`]: undefined;
560
- [x: `bool[${string}]`]: undefined;
561
- [x: `bytes[${string}]`]: undefined;
562
- [x: `bytes1[${string}]`]: undefined;
563
- [x: `bytes2[${string}]`]: undefined;
564
- [x: `bytes3[${string}]`]: undefined;
565
- [x: `bytes4[${string}]`]: undefined;
566
- [x: `bytes5[${string}]`]: undefined;
567
- [x: `bytes6[${string}]`]: undefined;
568
- [x: `bytes7[${string}]`]: undefined;
569
- [x: `bytes8[${string}]`]: undefined;
570
- [x: `bytes9[${string}]`]: undefined;
571
- [x: `bytes10[${string}]`]: undefined;
572
- [x: `bytes11[${string}]`]: undefined;
573
- [x: `bytes12[${string}]`]: undefined;
574
- [x: `bytes13[${string}]`]: undefined;
575
- [x: `bytes14[${string}]`]: undefined;
576
- [x: `bytes15[${string}]`]: undefined;
577
- [x: `bytes16[${string}]`]: undefined;
578
- [x: `bytes17[${string}]`]: undefined;
579
- [x: `bytes18[${string}]`]: undefined;
580
- [x: `bytes19[${string}]`]: undefined;
581
- [x: `bytes20[${string}]`]: undefined;
582
- [x: `bytes21[${string}]`]: undefined;
583
- [x: `bytes22[${string}]`]: undefined;
584
- [x: `bytes23[${string}]`]: undefined;
585
- [x: `bytes24[${string}]`]: undefined;
586
- [x: `bytes25[${string}]`]: undefined;
587
- [x: `bytes26[${string}]`]: undefined;
588
- [x: `bytes27[${string}]`]: undefined;
589
- [x: `bytes28[${string}]`]: undefined;
590
- [x: `bytes29[${string}]`]: undefined;
591
- [x: `bytes30[${string}]`]: undefined;
592
- [x: `bytes31[${string}]`]: undefined;
593
- [x: `bytes32[${string}]`]: undefined;
594
- [x: `int[${string}]`]: undefined;
595
- [x: `int8[${string}]`]: undefined;
596
- [x: `int16[${string}]`]: undefined;
597
- [x: `int24[${string}]`]: undefined;
598
- [x: `int32[${string}]`]: undefined;
599
- [x: `int40[${string}]`]: undefined;
600
- [x: `int48[${string}]`]: undefined;
601
- [x: `int56[${string}]`]: undefined;
602
- [x: `int64[${string}]`]: undefined;
603
- [x: `int72[${string}]`]: undefined;
604
- [x: `int80[${string}]`]: undefined;
605
- [x: `int88[${string}]`]: undefined;
606
- [x: `int96[${string}]`]: undefined;
607
- [x: `int104[${string}]`]: undefined;
608
- [x: `int112[${string}]`]: undefined;
609
- [x: `int120[${string}]`]: undefined;
610
- [x: `int128[${string}]`]: undefined;
611
- [x: `int136[${string}]`]: undefined;
612
- [x: `int144[${string}]`]: undefined;
613
- [x: `int152[${string}]`]: undefined;
614
- [x: `int160[${string}]`]: undefined;
615
- [x: `int168[${string}]`]: undefined;
616
- [x: `int176[${string}]`]: undefined;
617
- [x: `int184[${string}]`]: undefined;
618
- [x: `int192[${string}]`]: undefined;
619
- [x: `int200[${string}]`]: undefined;
620
- [x: `int208[${string}]`]: undefined;
621
- [x: `int216[${string}]`]: undefined;
622
- [x: `int224[${string}]`]: undefined;
623
- [x: `int232[${string}]`]: undefined;
624
- [x: `int240[${string}]`]: undefined;
625
- [x: `int248[${string}]`]: undefined;
626
- [x: `int256[${string}]`]: undefined;
627
- [x: `uint[${string}]`]: undefined;
628
- [x: `uint8[${string}]`]: undefined;
629
- [x: `uint16[${string}]`]: undefined;
630
- [x: `uint24[${string}]`]: undefined;
631
- [x: `uint32[${string}]`]: undefined;
632
- [x: `uint40[${string}]`]: undefined;
633
- [x: `uint48[${string}]`]: undefined;
634
- [x: `uint56[${string}]`]: undefined;
635
- [x: `uint64[${string}]`]: undefined;
636
- [x: `uint72[${string}]`]: undefined;
637
- [x: `uint80[${string}]`]: undefined;
638
- [x: `uint88[${string}]`]: undefined;
639
- [x: `uint96[${string}]`]: undefined;
640
- [x: `uint104[${string}]`]: undefined;
641
- [x: `uint112[${string}]`]: undefined;
642
- [x: `uint120[${string}]`]: undefined;
643
- [x: `uint128[${string}]`]: undefined;
644
- [x: `uint136[${string}]`]: undefined;
645
- [x: `uint144[${string}]`]: undefined;
646
- [x: `uint152[${string}]`]: undefined;
647
- [x: `uint160[${string}]`]: undefined;
648
- [x: `uint168[${string}]`]: undefined;
649
- [x: `uint176[${string}]`]: undefined;
650
- [x: `uint184[${string}]`]: undefined;
651
- [x: `uint192[${string}]`]: undefined;
652
- [x: `uint200[${string}]`]: undefined;
653
- [x: `uint208[${string}]`]: undefined;
654
- [x: `uint216[${string}]`]: undefined;
655
- [x: `uint224[${string}]`]: undefined;
656
- [x: `uint232[${string}]`]: undefined;
657
- [x: `uint240[${string}]`]: undefined;
658
- [x: `uint248[${string}]`]: undefined;
659
- [x: `uint256[${string}]`]: undefined;
660
- string?: undefined;
661
- address?: undefined;
662
- bool?: undefined;
663
- bytes?: undefined;
664
- bytes1?: undefined;
665
- bytes2?: undefined;
666
- bytes3?: undefined;
667
- bytes4?: undefined;
668
- bytes5?: undefined;
669
- bytes6?: undefined;
670
- bytes7?: undefined;
671
- bytes8?: undefined;
672
- bytes9?: undefined;
673
- bytes10?: undefined;
674
- bytes11?: undefined;
675
- bytes12?: undefined;
676
- bytes13?: undefined;
677
- bytes14?: undefined;
678
- bytes15?: undefined;
679
- bytes16?: undefined;
680
- bytes17?: undefined;
681
- bytes18?: undefined;
682
- bytes19?: undefined;
683
- bytes20?: undefined;
684
- bytes21?: undefined;
685
- bytes22?: undefined;
686
- bytes23?: undefined;
687
- bytes24?: undefined;
688
- bytes25?: undefined;
689
- bytes26?: undefined;
690
- bytes27?: undefined;
691
- bytes28?: undefined;
692
- bytes29?: undefined;
693
- bytes30?: undefined;
694
- bytes31?: undefined;
695
- bytes32?: undefined;
696
- int8?: undefined;
697
- int16?: undefined;
698
- int24?: undefined;
699
- int32?: undefined;
700
- int40?: undefined;
701
- int48?: undefined;
702
- int56?: undefined;
703
- int64?: undefined;
704
- int72?: undefined;
705
- int80?: undefined;
706
- int88?: undefined;
707
- int96?: undefined;
708
- int104?: undefined;
709
- int112?: undefined;
710
- int120?: undefined;
711
- int128?: undefined;
712
- int136?: undefined;
713
- int144?: undefined;
714
- int152?: undefined;
715
- int160?: undefined;
716
- int168?: undefined;
717
- int176?: undefined;
718
- int184?: undefined;
719
- int192?: undefined;
720
- int200?: undefined;
721
- int208?: undefined;
722
- int216?: undefined;
723
- int224?: undefined;
724
- int232?: undefined;
725
- int240?: undefined;
726
- int248?: undefined;
727
- int256?: undefined;
728
- uint8?: undefined;
729
- uint16?: undefined;
730
- uint24?: undefined;
731
- uint32?: undefined;
732
- uint40?: undefined;
733
- uint48?: undefined;
734
- uint56?: undefined;
735
- uint64?: undefined;
736
- uint72?: undefined;
737
- uint80?: undefined;
738
- uint88?: undefined;
739
- uint96?: undefined;
740
- uint104?: undefined;
741
- uint112?: undefined;
742
- uint120?: undefined;
743
- uint128?: undefined;
744
- uint136?: undefined;
745
- uint144?: undefined;
746
- uint152?: undefined;
747
- uint160?: undefined;
748
- uint168?: undefined;
749
- uint176?: undefined;
750
- uint184?: undefined;
751
- uint192?: undefined;
752
- uint200?: undefined;
753
- uint208?: undefined;
754
- uint216?: undefined;
755
- uint224?: undefined;
756
- uint232?: undefined;
757
- uint240?: undefined;
758
- uint248?: undefined;
759
- uint256?: undefined;
760
- } | {
761
- [key: string]: unknown;
762
- }, TPrimaryType extends string>(args: import("viem").SignTypedDataParameters<TTypedData, TPrimaryType, undefined>) => Promise<`0x${string}`>;
763
- switchChain: (args: import("viem").SwitchChainParameters) => Promise<void>;
764
- watchAsset: (args: import("viem/dist/types/types/eip1193").WatchAssetParams) => Promise<boolean>;
765
- writeContract: <TAbi_1 extends import("abitype/dist/abi-7aa1f183").l | readonly unknown[], TFunctionName extends string, TChainOverride_2 extends import("viem").Chain<import("viem/dist/types/types").Formatters> | undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, undefined, undefined, TChainOverride_2>) => Promise<`0x${string}`>;
766
- account: undefined;
767
- } | undefined;
18
+ getWeb3Provider(): ethers.providers.Web3Provider | undefined;
768
19
  isInstalledOnBrowser(): boolean;
769
20
  connect(): Promise<void>;
770
21
  fetchPublicAddress(): Promise<string | undefined>;
@@ -773,7 +24,7 @@ declare class MetaMask extends EthProvider implements WalletConnector {
773
24
  endSession(): Promise<void>;
774
25
  providerSwitchNetwork({ network, provider, }: {
775
26
  network: EvmNetwork;
776
- provider: WalletClient;
27
+ provider: ethers.providers.Web3Provider;
777
28
  }): Promise<void>;
778
29
  }
779
30
  export default MetaMask;