@wagmi/connectors 1.0.0-next.3 → 1.0.0-next.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.
@@ -1,873 +1 @@
1
- import * as abitype_dist_abi_7aa1f183 from 'abitype/dist/abi-7aa1f183';
2
- import * as viem_dist_types_types_eip1193 from 'viem/dist/types/types/eip1193';
3
- import * as viem_dist_types_types from 'viem/dist/types/types';
4
- import * as viem from 'viem';
5
- import { Chain } from '@wagmi/chains';
6
- import WalletConnectProvider from '@walletconnect/ethereum-provider';
7
- import { EthereumProviderOptions } from '@walletconnect/ethereum-provider/dist/types/EthereumProvider';
8
- import { C as Connector } from './base-335f54fd.js';
9
- import 'abitype';
10
- import 'eventemitter3';
11
-
12
- type WalletConnectOptions = {
13
- /**
14
- * WalletConnect Cloud Project ID.
15
- * @link https://cloud.walletconnect.com/sign-in.
16
- */
17
- projectId: EthereumProviderOptions['projectId'];
18
- /**
19
- * If a new chain is added to a previously existing configured connector `chains`, this flag
20
- * will determine if that chain should be considered as stale. A stale chain is a chain that
21
- * WalletConnect has yet to establish a relationship with (ie. the user has not approved or
22
- * rejected the chain).
23
- *
24
- * Preface: Whereas WalletConnect v1 supported dynamic chain switching, WalletConnect v2 requires
25
- * the user to pre-approve a set of chains up-front. This comes with consequent UX nuances (see below) when
26
- * a user tries to switch to a chain that they have not approved.
27
- *
28
- * This flag mainly affects the behavior when a wallet does not support dynamic chain authorization
29
- * with WalletConnect v2.
30
- *
31
- * If `true` (default), the new chain will be treated as a stale chain. If the user
32
- * has yet to establish a relationship (approved/rejected) with this chain in their WalletConnect
33
- * session, the connector will disconnect upon the dapp auto-connecting, and the user will have to
34
- * reconnect to the dapp (revalidate the chain) in order to approve the newly added chain.
35
- * This is the default behavior to avoid an unexpected error upon switching chains which may
36
- * be a confusing user experience (ie. the user will not know they have to reconnect
37
- * unless the dapp handles these types of errors).
38
- *
39
- * If `false`, the new chain will be treated as a validated chain. This means that if the user
40
- * has yet to establish a relationship with the chain in their WalletConnect session, wagmi will successfully
41
- * auto-connect the user. This comes with the trade-off that the connector will throw an error
42
- * when attempting to switch to the unapproved chain. This may be useful in cases where a dapp constantly
43
- * modifies their configured chains, and they do not want to disconnect the user upon
44
- * auto-connecting. If the user decides to switch to the unapproved chain, it is important that the
45
- * dapp handles this error and prompts the user to reconnect to the dapp in order to approve
46
- * the newly added chain.
47
- *
48
- * @default true
49
- */
50
- isNewChainsStale?: boolean;
51
- /**
52
- * Metadata for your app.
53
- * @link https://docs.walletconnect.com/2.0/javascript/providers/ethereum#initialization
54
- */
55
- metadata?: EthereumProviderOptions['metadata'];
56
- /**
57
- * Whether or not to show the QR code modal.
58
- * @default true
59
- * @link https://docs.walletconnect.com/2.0/javascript/providers/ethereum#initialization
60
- */
61
- showQrModal?: EthereumProviderOptions['showQrModal'];
62
- /**
63
- * Options of QR code modal.
64
- * @link https://docs.walletconnect.com/2.0/web3modal/options
65
- */
66
- qrModalOptions?: EthereumProviderOptions['qrModalOptions'];
67
- };
68
- type ConnectConfig = {
69
- /** Target chain to connect to. */
70
- chainId?: number;
71
- /** If provided, will attempt to connect to an existing pairing. */
72
- pairingTopic?: string;
73
- };
74
- declare class WalletConnectConnector extends Connector<WalletConnectProvider, WalletConnectOptions> {
75
- #private;
76
- readonly id = "walletConnect";
77
- readonly name = "WalletConnect";
78
- readonly ready = true;
79
- constructor(config: {
80
- chains?: Chain[];
81
- options: WalletConnectOptions;
82
- });
83
- connect({ chainId, pairingTopic }?: ConnectConfig): Promise<{
84
- account: `0x${string}`;
85
- chain: {
86
- id: number;
87
- unsupported: boolean;
88
- };
89
- }>;
90
- disconnect(): Promise<void>;
91
- getAccount(): Promise<`0x${string}`>;
92
- getChainId(): Promise<number>;
93
- getProvider({ chainId }?: {
94
- chainId?: number;
95
- }): Promise<WalletConnectProvider>;
96
- getWalletClient({ chainId }?: {
97
- chainId?: number;
98
- }): Promise<{
99
- chain: Chain;
100
- key: string;
101
- name: string;
102
- pollingInterval: number;
103
- request: {
104
- (args: {
105
- method: "web3_clientVersion";
106
- params?: undefined;
107
- }): Promise<string>;
108
- (args: {
109
- method: "web3_sha3";
110
- params: [data: `0x${string}`];
111
- }): Promise<string>;
112
- (args: {
113
- method: "net_listening";
114
- params?: undefined;
115
- }): Promise<boolean>;
116
- (args: {
117
- method: "net_peerCount";
118
- params?: undefined;
119
- }): Promise<`0x${string}`>;
120
- (args: {
121
- method: "net_version";
122
- params?: undefined;
123
- }): Promise<`0x${string}`>;
124
- (args: {
125
- method: "eth_blockNumber";
126
- params?: undefined;
127
- }): Promise<`0x${string}`>;
128
- (args: {
129
- method: "eth_call";
130
- params: [request: Partial<viem.RpcTransactionRequest>, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
131
- }): Promise<`0x${string}`>;
132
- (args: {
133
- method: "eth_chainId";
134
- params?: undefined;
135
- }): Promise<`0x${string}`>;
136
- (args: {
137
- method: "eth_coinbase";
138
- params?: undefined;
139
- }): Promise<`0x${string}`>;
140
- (args: {
141
- method: "eth_estimateGas";
142
- params: [parameters: viem.RpcTransactionRequest, block: `0x${string}` | viem.BlockTag];
143
- }): Promise<`0x${string}`>;
144
- (args: {
145
- method: "eth_feeHistory";
146
- params: [blockCount: `0x${string}`, newestBlock: `0x${string}` | viem.BlockTag, rewardPercentiles: number[] | undefined];
147
- }): Promise<viem.RpcFeeHistory>;
148
- (args: {
149
- method: "eth_gasPrice";
150
- params?: undefined;
151
- }): Promise<`0x${string}`>;
152
- (args: {
153
- method: "eth_getBalance";
154
- params: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
155
- }): Promise<`0x${string}`>;
156
- (args: {
157
- method: "eth_getBlockByHash";
158
- params: [hash: `0x${string}`, includeTransactionObjects: boolean];
159
- }): Promise<viem.RpcBlock | null>;
160
- (args: {
161
- method: "eth_getBlockByNumber";
162
- params: [block: `0x${string}` | viem.BlockTag, includeTransactionObjects: boolean];
163
- }): Promise<viem.RpcBlock | null>;
164
- (args: {
165
- method: "eth_getBlockTransactionCountByHash";
166
- params: [hash: `0x${string}`];
167
- }): Promise<`0x${string}`>;
168
- (args: {
169
- method: "eth_getBlockTransactionCountByNumber";
170
- params: [block: `0x${string}` | viem.BlockTag];
171
- }): Promise<`0x${string}`>;
172
- (args: {
173
- method: "eth_getCode";
174
- params: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
175
- }): Promise<`0x${string}`>;
176
- (args: {
177
- method: "eth_getFilterChanges";
178
- params: [filterId: `0x${string}`];
179
- }): Promise<{
180
- address: `0x${string}`;
181
- blockHash: `0x${string}` | null;
182
- blockNumber: `0x${string}` | null;
183
- data: `0x${string}`;
184
- logIndex: `0x${string}` | null;
185
- transactionHash: `0x${string}` | null;
186
- transactionIndex: `0x${string}` | null;
187
- topics: [] | [`0x${string}`, ...`0x${string}`[]];
188
- removed: boolean;
189
- }[] | `0x${string}`[]>;
190
- (args: {
191
- method: "eth_getFilterLogs";
192
- params: [filterId: `0x${string}`];
193
- }): Promise<{
194
- address: `0x${string}`;
195
- blockHash: `0x${string}` | null;
196
- blockNumber: `0x${string}` | null;
197
- data: `0x${string}`;
198
- logIndex: `0x${string}` | null;
199
- transactionHash: `0x${string}` | null;
200
- transactionIndex: `0x${string}` | null;
201
- topics: [] | [`0x${string}`, ...`0x${string}`[]];
202
- removed: boolean;
203
- }[]>;
204
- (args: {
205
- method: "eth_getLogs";
206
- params: [parameters: {
207
- address?: `0x${string}` | `0x${string}`[] | undefined;
208
- topics?: viem_dist_types_types.LogTopic[] | undefined;
209
- } & ({
210
- fromBlock?: `0x${string}` | viem.BlockTag | undefined;
211
- toBlock?: `0x${string}` | viem.BlockTag | undefined;
212
- blockHash?: undefined;
213
- } | {
214
- fromBlock?: undefined;
215
- toBlock?: undefined;
216
- blockHash?: `0x${string}` | undefined;
217
- })];
218
- }): Promise<{
219
- address: `0x${string}`;
220
- blockHash: `0x${string}` | null;
221
- blockNumber: `0x${string}` | null;
222
- data: `0x${string}`;
223
- logIndex: `0x${string}` | null;
224
- transactionHash: `0x${string}` | null;
225
- transactionIndex: `0x${string}` | null;
226
- topics: [] | [`0x${string}`, ...`0x${string}`[]];
227
- removed: boolean;
228
- }[]>;
229
- (args: {
230
- method: "eth_getStorageAt";
231
- params: [address: `0x${string}`, index: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
232
- }): Promise<`0x${string}`>;
233
- (args: {
234
- method: "eth_getTransactionByBlockHashAndIndex";
235
- params: [hash: `0x${string}`, index: `0x${string}`];
236
- }): Promise<viem.RpcTransaction | null>;
237
- (args: {
238
- method: "eth_getTransactionByBlockNumberAndIndex";
239
- params: [block: `0x${string}` | viem.BlockTag, index: `0x${string}`];
240
- }): Promise<viem.RpcTransaction | null>;
241
- (args: {
242
- method: "eth_getTransactionByHash";
243
- params: [hash: `0x${string}`];
244
- }): Promise<viem.RpcTransaction | null>;
245
- (args: {
246
- method: "eth_getTransactionCount";
247
- params: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
248
- }): Promise<`0x${string}`>;
249
- (args: {
250
- method: "eth_getTransactionReceipt";
251
- params: [hash: `0x${string}`];
252
- }): Promise<viem.RpcTransactionReceipt | null>;
253
- (args: {
254
- method: "eth_getUncleByBlockHashAndIndex";
255
- params: [hash: `0x${string}`, index: `0x${string}`];
256
- }): Promise<viem.RpcUncle | null>;
257
- (args: {
258
- method: "eth_getUncleByBlockNumberAndIndex";
259
- params: [block: `0x${string}` | viem.BlockTag, index: `0x${string}`];
260
- }): Promise<viem.RpcUncle | null>;
261
- (args: {
262
- method: "eth_getUncleCountByBlockHash";
263
- params: [hash: `0x${string}`];
264
- }): Promise<`0x${string}`>;
265
- (args: {
266
- method: "eth_getUncleCountByBlockNumber";
267
- params: [block: `0x${string}` | viem.BlockTag];
268
- }): Promise<`0x${string}`>;
269
- (args: {
270
- method: "eth_newBlockFilter";
271
- params?: undefined;
272
- }): Promise<`0x${string}`>;
273
- (args: {
274
- method: "eth_newFilter";
275
- params: [filter: {
276
- fromBlock?: `0x${string}` | viem.BlockTag | undefined;
277
- toBlock?: `0x${string}` | viem.BlockTag | undefined;
278
- address?: `0x${string}` | `0x${string}`[] | undefined;
279
- topics?: viem_dist_types_types.LogTopic[] | undefined;
280
- }];
281
- }): Promise<`0x${string}`>;
282
- (args: {
283
- method: "eth_newPendingTransactionFilter";
284
- params?: undefined;
285
- }): Promise<`0x${string}`>;
286
- (args: {
287
- method: "eth_protocolVersion";
288
- params?: undefined;
289
- }): Promise<string>;
290
- (args: {
291
- method: "eth_sendRawTransaction";
292
- params: [signedTransaction: `0x${string}`];
293
- }): Promise<`0x${string}`>;
294
- (args: {
295
- method: "eth_uninstallFilter";
296
- params: [filterId: `0x${string}`];
297
- }): Promise<boolean>;
298
- } & {
299
- (args: {
300
- method: "eth_sendTransaction";
301
- params: [request: viem.RpcTransactionRequest];
302
- }): Promise<`0x${string}`>;
303
- (args: {
304
- method: "eth_sign";
305
- params: [address: `0x${string}`, data: `0x${string}`];
306
- }): Promise<`0x${string}`>;
307
- (args: {
308
- method: "eth_signTransaction";
309
- params: [request: viem.RpcTransactionRequest];
310
- }): Promise<`0x${string}`>;
311
- (args: {
312
- method: "eth_signTypedData_v4";
313
- params: [address: `0x${string}`, message: string];
314
- }): Promise<`0x${string}`>;
315
- (args: {
316
- method: "eth_syncing";
317
- params?: undefined;
318
- }): Promise<false | viem_dist_types_types_eip1193.NetworkSync>;
319
- (args: {
320
- method: "personal_sign";
321
- params: [data: `0x${string}`, address: `0x${string}`];
322
- }): Promise<`0x${string}`>;
323
- } & {
324
- (args: {
325
- method: "eth_accounts";
326
- params?: undefined;
327
- }): Promise<`0x${string}`[]>;
328
- (args: {
329
- method: "eth_chainId";
330
- params?: undefined;
331
- }): Promise<`0x${string}`>;
332
- (args: {
333
- method: "eth_requestAccounts";
334
- params?: undefined;
335
- }): Promise<`0x${string}`[]>;
336
- (args: {
337
- method: "wallet_requestPermissions";
338
- params: [permissions: {
339
- eth_accounts: Record<string, any>;
340
- }];
341
- }): Promise<viem_dist_types_types_eip1193.WalletPermission[]>;
342
- (args: {
343
- method: "wallet_getPermissions";
344
- params?: undefined;
345
- }): Promise<viem_dist_types_types_eip1193.WalletPermission[]>;
346
- (args: {
347
- method: "wallet_addEthereumChain";
348
- params: [chain: viem_dist_types_types_eip1193.Chain];
349
- }): Promise<null>;
350
- (args: {
351
- method: "wallet_switchEthereumChain";
352
- params: [chain: {
353
- chainId: string;
354
- }];
355
- }): Promise<null>;
356
- (args: {
357
- method: "wallet_watchAsset";
358
- params: viem_dist_types_types_eip1193.WatchAssetParams;
359
- }): Promise<boolean>;
360
- };
361
- transport: viem.TransportConfig<"custom", {
362
- (args: {
363
- method: "web3_clientVersion";
364
- params?: undefined;
365
- }): Promise<string>;
366
- (args: {
367
- method: "web3_sha3";
368
- params: [data: `0x${string}`];
369
- }): Promise<string>;
370
- (args: {
371
- method: "net_listening";
372
- params?: undefined;
373
- }): Promise<boolean>;
374
- (args: {
375
- method: "net_peerCount";
376
- params?: undefined;
377
- }): Promise<`0x${string}`>;
378
- (args: {
379
- method: "net_version";
380
- params?: undefined;
381
- }): Promise<`0x${string}`>;
382
- (args: {
383
- method: "eth_blockNumber";
384
- params?: undefined;
385
- }): Promise<`0x${string}`>;
386
- (args: {
387
- method: "eth_call";
388
- params: [request: Partial<viem.RpcTransactionRequest>, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
389
- }): Promise<`0x${string}`>;
390
- (args: {
391
- method: "eth_chainId";
392
- params?: undefined;
393
- }): Promise<`0x${string}`>;
394
- (args: {
395
- method: "eth_coinbase";
396
- params?: undefined;
397
- }): Promise<`0x${string}`>;
398
- (args: {
399
- method: "eth_estimateGas";
400
- params: [parameters: viem.RpcTransactionRequest, block: `0x${string}` | viem.BlockTag];
401
- }): Promise<`0x${string}`>;
402
- (args: {
403
- method: "eth_feeHistory";
404
- params: [blockCount: `0x${string}`, newestBlock: `0x${string}` | viem.BlockTag, rewardPercentiles: number[] | undefined];
405
- }): Promise<viem.RpcFeeHistory>;
406
- (args: {
407
- method: "eth_gasPrice";
408
- params?: undefined;
409
- }): Promise<`0x${string}`>;
410
- (args: {
411
- method: "eth_getBalance";
412
- params: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
413
- }): Promise<`0x${string}`>;
414
- (args: {
415
- method: "eth_getBlockByHash";
416
- params: [hash: `0x${string}`, includeTransactionObjects: boolean];
417
- }): Promise<viem.RpcBlock | null>;
418
- (args: {
419
- method: "eth_getBlockByNumber";
420
- params: [block: `0x${string}` | viem.BlockTag, includeTransactionObjects: boolean];
421
- }): Promise<viem.RpcBlock | null>;
422
- (args: {
423
- method: "eth_getBlockTransactionCountByHash";
424
- params: [hash: `0x${string}`];
425
- }): Promise<`0x${string}`>;
426
- (args: {
427
- method: "eth_getBlockTransactionCountByNumber";
428
- params: [block: `0x${string}` | viem.BlockTag];
429
- }): Promise<`0x${string}`>;
430
- (args: {
431
- method: "eth_getCode";
432
- params: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
433
- }): Promise<`0x${string}`>;
434
- (args: {
435
- method: "eth_getFilterChanges";
436
- params: [filterId: `0x${string}`];
437
- }): Promise<{
438
- address: `0x${string}`;
439
- blockHash: `0x${string}` | null;
440
- blockNumber: `0x${string}` | null;
441
- data: `0x${string}`;
442
- logIndex: `0x${string}` | null;
443
- transactionHash: `0x${string}` | null;
444
- transactionIndex: `0x${string}` | null;
445
- topics: [] | [`0x${string}`, ...`0x${string}`[]];
446
- removed: boolean;
447
- }[] | `0x${string}`[]>;
448
- (args: {
449
- method: "eth_getFilterLogs";
450
- params: [filterId: `0x${string}`];
451
- }): Promise<{
452
- address: `0x${string}`;
453
- blockHash: `0x${string}` | null;
454
- blockNumber: `0x${string}` | null;
455
- data: `0x${string}`;
456
- logIndex: `0x${string}` | null;
457
- transactionHash: `0x${string}` | null;
458
- transactionIndex: `0x${string}` | null;
459
- topics: [] | [`0x${string}`, ...`0x${string}`[]];
460
- removed: boolean;
461
- }[]>;
462
- (args: {
463
- method: "eth_getLogs";
464
- params: [parameters: {
465
- address?: `0x${string}` | `0x${string}`[] | undefined;
466
- topics?: viem_dist_types_types.LogTopic[] | undefined;
467
- } & ({
468
- fromBlock?: `0x${string}` | viem.BlockTag | undefined;
469
- toBlock?: `0x${string}` | viem.BlockTag | undefined;
470
- blockHash?: undefined;
471
- } | {
472
- fromBlock?: undefined;
473
- toBlock?: undefined;
474
- blockHash?: `0x${string}` | undefined;
475
- })];
476
- }): Promise<{
477
- address: `0x${string}`;
478
- blockHash: `0x${string}` | null;
479
- blockNumber: `0x${string}` | null;
480
- data: `0x${string}`;
481
- logIndex: `0x${string}` | null;
482
- transactionHash: `0x${string}` | null;
483
- transactionIndex: `0x${string}` | null;
484
- topics: [] | [`0x${string}`, ...`0x${string}`[]];
485
- removed: boolean;
486
- }[]>;
487
- (args: {
488
- method: "eth_getStorageAt";
489
- params: [address: `0x${string}`, index: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
490
- }): Promise<`0x${string}`>;
491
- (args: {
492
- method: "eth_getTransactionByBlockHashAndIndex";
493
- params: [hash: `0x${string}`, index: `0x${string}`];
494
- }): Promise<viem.RpcTransaction | null>;
495
- (args: {
496
- method: "eth_getTransactionByBlockNumberAndIndex";
497
- params: [block: `0x${string}` | viem.BlockTag, index: `0x${string}`];
498
- }): Promise<viem.RpcTransaction | null>;
499
- (args: {
500
- method: "eth_getTransactionByHash";
501
- params: [hash: `0x${string}`];
502
- }): Promise<viem.RpcTransaction | null>;
503
- (args: {
504
- method: "eth_getTransactionCount";
505
- params: [address: `0x${string}`, block: `0x${string}` | viem.BlockTag | viem.RpcBlockIdentifier];
506
- }): Promise<`0x${string}`>;
507
- (args: {
508
- method: "eth_getTransactionReceipt";
509
- params: [hash: `0x${string}`];
510
- }): Promise<viem.RpcTransactionReceipt | null>;
511
- (args: {
512
- method: "eth_getUncleByBlockHashAndIndex";
513
- params: [hash: `0x${string}`, index: `0x${string}`];
514
- }): Promise<viem.RpcUncle | null>;
515
- (args: {
516
- method: "eth_getUncleByBlockNumberAndIndex";
517
- params: [block: `0x${string}` | viem.BlockTag, index: `0x${string}`];
518
- }): Promise<viem.RpcUncle | null>;
519
- (args: {
520
- method: "eth_getUncleCountByBlockHash";
521
- params: [hash: `0x${string}`];
522
- }): Promise<`0x${string}`>;
523
- (args: {
524
- method: "eth_getUncleCountByBlockNumber";
525
- params: [block: `0x${string}` | viem.BlockTag];
526
- }): Promise<`0x${string}`>;
527
- (args: {
528
- method: "eth_newBlockFilter";
529
- params?: undefined;
530
- }): Promise<`0x${string}`>;
531
- (args: {
532
- method: "eth_newFilter";
533
- params: [filter: {
534
- fromBlock?: `0x${string}` | viem.BlockTag | undefined;
535
- toBlock?: `0x${string}` | viem.BlockTag | undefined;
536
- address?: `0x${string}` | `0x${string}`[] | undefined;
537
- topics?: viem_dist_types_types.LogTopic[] | undefined;
538
- }];
539
- }): Promise<`0x${string}`>;
540
- (args: {
541
- method: "eth_newPendingTransactionFilter";
542
- params?: undefined;
543
- }): Promise<`0x${string}`>;
544
- (args: {
545
- method: "eth_protocolVersion";
546
- params?: undefined;
547
- }): Promise<string>;
548
- (args: {
549
- method: "eth_sendRawTransaction";
550
- params: [signedTransaction: `0x${string}`];
551
- }): Promise<`0x${string}`>;
552
- (args: {
553
- method: "eth_uninstallFilter";
554
- params: [filterId: `0x${string}`];
555
- }): Promise<boolean>;
556
- } & {
557
- (args: {
558
- method: "eth_sendTransaction";
559
- params: [request: viem.RpcTransactionRequest];
560
- }): Promise<`0x${string}`>;
561
- (args: {
562
- method: "eth_sign";
563
- params: [address: `0x${string}`, data: `0x${string}`];
564
- }): Promise<`0x${string}`>;
565
- (args: {
566
- method: "eth_signTransaction";
567
- params: [request: viem.RpcTransactionRequest];
568
- }): Promise<`0x${string}`>;
569
- (args: {
570
- method: "eth_signTypedData_v4";
571
- params: [address: `0x${string}`, message: string];
572
- }): Promise<`0x${string}`>;
573
- (args: {
574
- method: "eth_syncing";
575
- params?: undefined;
576
- }): Promise<false | viem_dist_types_types_eip1193.NetworkSync>;
577
- (args: {
578
- method: "personal_sign";
579
- params: [data: `0x${string}`, address: `0x${string}`];
580
- }): Promise<`0x${string}`>;
581
- } & {
582
- (args: {
583
- method: "eth_accounts";
584
- params?: undefined;
585
- }): Promise<`0x${string}`[]>;
586
- (args: {
587
- method: "eth_chainId";
588
- params?: undefined;
589
- }): Promise<`0x${string}`>;
590
- (args: {
591
- method: "eth_requestAccounts";
592
- params?: undefined;
593
- }): Promise<`0x${string}`[]>;
594
- (args: {
595
- method: "wallet_requestPermissions";
596
- params: [permissions: {
597
- eth_accounts: Record<string, any>;
598
- }];
599
- }): Promise<viem_dist_types_types_eip1193.WalletPermission[]>;
600
- (args: {
601
- method: "wallet_getPermissions";
602
- params?: undefined;
603
- }): Promise<viem_dist_types_types_eip1193.WalletPermission[]>;
604
- (args: {
605
- method: "wallet_addEthereumChain";
606
- params: [chain: viem_dist_types_types_eip1193.Chain];
607
- }): Promise<null>;
608
- (args: {
609
- method: "wallet_switchEthereumChain";
610
- params: [chain: {
611
- chainId: string;
612
- }];
613
- }): Promise<null>;
614
- (args: {
615
- method: "wallet_watchAsset";
616
- params: viem_dist_types_types_eip1193.WatchAssetParams;
617
- }): Promise<boolean>;
618
- }> & ((...args: any) => Promise<any>);
619
- type: string;
620
- uid: string;
621
- addChain: (args: viem.AddChainParameters) => Promise<void>;
622
- deployContract: <TAbi extends readonly unknown[] | abitype_dist_abi_7aa1f183.l, TChainOverride extends viem.Chain<viem_dist_types_types.Formatters> | undefined>(args: viem.DeployContractParameters<TAbi, Chain, {
623
- address: `0x${string}`;
624
- type: "json-rpc";
625
- }, TChainOverride>) => Promise<`0x${string}`>;
626
- getAddresses: () => Promise<viem.GetAddressesReturnType>;
627
- getChainId: () => Promise<number>;
628
- getPermissions: () => Promise<viem.GetPermissionsReturnType>;
629
- requestAddresses: () => Promise<viem.RequestAddressesReturnType>;
630
- requestPermissions: (args: {
631
- [x: string]: Record<string, any>;
632
- eth_accounts: Record<string, any>;
633
- }) => Promise<viem.RequestPermissionsReturnType>;
634
- sendTransaction: <TChainOverride_1 extends viem.Chain<viem_dist_types_types.Formatters> | undefined>(args: viem.SendTransactionParameters<Chain, {
635
- address: `0x${string}`;
636
- type: "json-rpc";
637
- }, TChainOverride_1>) => Promise<`0x${string}`>;
638
- signMessage: (args: viem.SignMessageParameters<{
639
- address: `0x${string}`;
640
- type: "json-rpc";
641
- }>) => Promise<`0x${string}`>;
642
- signTypedData: <TTypedData extends {
643
- [x: string]: readonly abitype_dist_abi_7aa1f183.o[];
644
- [x: `string[${string}]`]: undefined;
645
- [x: `function[${string}]`]: undefined;
646
- [x: `address[${string}]`]: undefined;
647
- [x: `bool[${string}]`]: undefined;
648
- [x: `bytes[${string}]`]: undefined;
649
- [x: `bytes2[${string}]`]: undefined;
650
- [x: `bytes1[${string}]`]: undefined;
651
- [x: `bytes3[${string}]`]: undefined;
652
- [x: `bytes4[${string}]`]: undefined;
653
- [x: `bytes5[${string}]`]: undefined;
654
- [x: `bytes6[${string}]`]: undefined;
655
- [x: `bytes7[${string}]`]: undefined;
656
- [x: `bytes8[${string}]`]: undefined;
657
- [x: `bytes9[${string}]`]: undefined;
658
- [x: `bytes10[${string}]`]: undefined;
659
- [x: `bytes11[${string}]`]: undefined;
660
- [x: `bytes12[${string}]`]: undefined;
661
- [x: `bytes13[${string}]`]: undefined;
662
- [x: `bytes14[${string}]`]: undefined;
663
- [x: `bytes15[${string}]`]: undefined;
664
- [x: `bytes16[${string}]`]: undefined;
665
- [x: `bytes17[${string}]`]: undefined;
666
- [x: `bytes18[${string}]`]: undefined;
667
- [x: `bytes19[${string}]`]: undefined;
668
- [x: `bytes20[${string}]`]: undefined;
669
- [x: `bytes21[${string}]`]: undefined;
670
- [x: `bytes22[${string}]`]: undefined;
671
- [x: `bytes23[${string}]`]: undefined;
672
- [x: `bytes24[${string}]`]: undefined;
673
- [x: `bytes25[${string}]`]: undefined;
674
- [x: `bytes26[${string}]`]: undefined;
675
- [x: `bytes27[${string}]`]: undefined;
676
- [x: `bytes28[${string}]`]: undefined;
677
- [x: `bytes29[${string}]`]: undefined;
678
- [x: `bytes30[${string}]`]: undefined;
679
- [x: `bytes31[${string}]`]: undefined;
680
- [x: `bytes32[${string}]`]: undefined;
681
- [x: `int[${string}]`]: undefined;
682
- [x: `int8[${string}]`]: undefined;
683
- [x: `int16[${string}]`]: undefined;
684
- [x: `int24[${string}]`]: undefined;
685
- [x: `int32[${string}]`]: undefined;
686
- [x: `int40[${string}]`]: undefined;
687
- [x: `int48[${string}]`]: undefined;
688
- [x: `int56[${string}]`]: undefined;
689
- [x: `int64[${string}]`]: undefined;
690
- [x: `int72[${string}]`]: undefined;
691
- [x: `int80[${string}]`]: undefined;
692
- [x: `int88[${string}]`]: undefined;
693
- [x: `int96[${string}]`]: undefined;
694
- [x: `int104[${string}]`]: undefined;
695
- [x: `int112[${string}]`]: undefined;
696
- [x: `int120[${string}]`]: undefined;
697
- [x: `int128[${string}]`]: undefined;
698
- [x: `int136[${string}]`]: undefined;
699
- [x: `int144[${string}]`]: undefined;
700
- [x: `int152[${string}]`]: undefined;
701
- [x: `int160[${string}]`]: undefined;
702
- [x: `int168[${string}]`]: undefined;
703
- [x: `int176[${string}]`]: undefined;
704
- [x: `int184[${string}]`]: undefined;
705
- [x: `int192[${string}]`]: undefined;
706
- [x: `int200[${string}]`]: undefined;
707
- [x: `int208[${string}]`]: undefined;
708
- [x: `int216[${string}]`]: undefined;
709
- [x: `int224[${string}]`]: undefined;
710
- [x: `int232[${string}]`]: undefined;
711
- [x: `int240[${string}]`]: undefined;
712
- [x: `int248[${string}]`]: undefined;
713
- [x: `int256[${string}]`]: undefined;
714
- [x: `uint[${string}]`]: undefined;
715
- [x: `uint8[${string}]`]: undefined;
716
- [x: `uint16[${string}]`]: undefined;
717
- [x: `uint24[${string}]`]: undefined;
718
- [x: `uint32[${string}]`]: undefined;
719
- [x: `uint40[${string}]`]: undefined;
720
- [x: `uint48[${string}]`]: undefined;
721
- [x: `uint56[${string}]`]: undefined;
722
- [x: `uint64[${string}]`]: undefined;
723
- [x: `uint72[${string}]`]: undefined;
724
- [x: `uint80[${string}]`]: undefined;
725
- [x: `uint88[${string}]`]: undefined;
726
- [x: `uint96[${string}]`]: undefined;
727
- [x: `uint104[${string}]`]: undefined;
728
- [x: `uint112[${string}]`]: undefined;
729
- [x: `uint120[${string}]`]: undefined;
730
- [x: `uint128[${string}]`]: undefined;
731
- [x: `uint136[${string}]`]: undefined;
732
- [x: `uint144[${string}]`]: undefined;
733
- [x: `uint152[${string}]`]: undefined;
734
- [x: `uint160[${string}]`]: undefined;
735
- [x: `uint168[${string}]`]: undefined;
736
- [x: `uint176[${string}]`]: undefined;
737
- [x: `uint184[${string}]`]: undefined;
738
- [x: `uint192[${string}]`]: undefined;
739
- [x: `uint200[${string}]`]: undefined;
740
- [x: `uint208[${string}]`]: undefined;
741
- [x: `uint216[${string}]`]: undefined;
742
- [x: `uint224[${string}]`]: undefined;
743
- [x: `uint232[${string}]`]: undefined;
744
- [x: `uint240[${string}]`]: undefined;
745
- [x: `uint248[${string}]`]: undefined;
746
- [x: `uint256[${string}]`]: undefined;
747
- string?: undefined;
748
- address?: undefined;
749
- bool?: undefined;
750
- bytes?: undefined;
751
- bytes2?: undefined;
752
- bytes1?: undefined;
753
- bytes3?: undefined;
754
- bytes4?: undefined;
755
- bytes5?: undefined;
756
- bytes6?: undefined;
757
- bytes7?: undefined;
758
- bytes8?: undefined;
759
- bytes9?: undefined;
760
- bytes10?: undefined;
761
- bytes11?: undefined;
762
- bytes12?: undefined;
763
- bytes13?: undefined;
764
- bytes14?: undefined;
765
- bytes15?: undefined;
766
- bytes16?: undefined;
767
- bytes17?: undefined;
768
- bytes18?: undefined;
769
- bytes19?: undefined;
770
- bytes20?: undefined;
771
- bytes21?: undefined;
772
- bytes22?: undefined;
773
- bytes23?: undefined;
774
- bytes24?: undefined;
775
- bytes25?: undefined;
776
- bytes26?: undefined;
777
- bytes27?: undefined;
778
- bytes28?: undefined;
779
- bytes29?: undefined;
780
- bytes30?: undefined;
781
- bytes31?: undefined;
782
- bytes32?: undefined;
783
- int8?: undefined;
784
- int16?: undefined;
785
- int24?: undefined;
786
- int32?: undefined;
787
- int40?: undefined;
788
- int48?: undefined;
789
- int56?: undefined;
790
- int64?: undefined;
791
- int72?: undefined;
792
- int80?: undefined;
793
- int88?: undefined;
794
- int96?: undefined;
795
- int104?: undefined;
796
- int112?: undefined;
797
- int120?: undefined;
798
- int128?: undefined;
799
- int136?: undefined;
800
- int144?: undefined;
801
- int152?: undefined;
802
- int160?: undefined;
803
- int168?: undefined;
804
- int176?: undefined;
805
- int184?: undefined;
806
- int192?: undefined;
807
- int200?: undefined;
808
- int208?: undefined;
809
- int216?: undefined;
810
- int224?: undefined;
811
- int232?: undefined;
812
- int240?: undefined;
813
- int248?: undefined;
814
- int256?: undefined;
815
- uint8?: undefined;
816
- uint16?: undefined;
817
- uint24?: undefined;
818
- uint32?: undefined;
819
- uint40?: undefined;
820
- uint48?: undefined;
821
- uint56?: undefined;
822
- uint64?: undefined;
823
- uint72?: undefined;
824
- uint80?: undefined;
825
- uint88?: undefined;
826
- uint96?: undefined;
827
- uint104?: undefined;
828
- uint112?: undefined;
829
- uint120?: undefined;
830
- uint128?: undefined;
831
- uint136?: undefined;
832
- uint144?: undefined;
833
- uint152?: undefined;
834
- uint160?: undefined;
835
- uint168?: undefined;
836
- uint176?: undefined;
837
- uint184?: undefined;
838
- uint192?: undefined;
839
- uint200?: undefined;
840
- uint208?: undefined;
841
- uint216?: undefined;
842
- uint224?: undefined;
843
- uint232?: undefined;
844
- uint240?: undefined;
845
- uint248?: undefined;
846
- uint256?: undefined;
847
- } | {
848
- [key: string]: unknown;
849
- }, TPrimaryType extends string>(args: viem.SignTypedDataParameters<TTypedData, TPrimaryType, {
850
- address: `0x${string}`;
851
- type: "json-rpc";
852
- }>) => Promise<`0x${string}`>;
853
- switchChain: (args: viem.SwitchChainParameters) => Promise<void>;
854
- watchAsset: (args: viem_dist_types_types_eip1193.WatchAssetParams) => Promise<boolean>;
855
- writeContract: <TAbi_1 extends readonly unknown[] | abitype_dist_abi_7aa1f183.l, TFunctionName extends string, TChainOverride_2 extends viem.Chain<viem_dist_types_types.Formatters> | undefined>(args: viem.WriteContractParameters<TAbi_1, TFunctionName, Chain, {
856
- address: `0x${string}`;
857
- type: "json-rpc";
858
- }, TChainOverride_2>) => Promise<`0x${string}`>;
859
- account: {
860
- address: `0x${string}`;
861
- type: "json-rpc";
862
- };
863
- }>;
864
- isAuthorized(): Promise<boolean>;
865
- switchChain(chainId: number): Promise<Chain>;
866
- protected onAccountsChanged: (accounts: string[]) => void;
867
- protected onChainChanged: (chainId: number | string) => void;
868
- protected onDisconnect: () => void;
869
- protected onDisplayUri: (uri: string) => void;
870
- protected onConnect: () => void;
871
- }
872
-
873
- export { WalletConnectConnector };
1
+ export * from '../src/walletConnect'