@gitmyabi/layer 0.0.0-stage → 1.0.0

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.
@@ -0,0 +1,709 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * Unilayer ABI
4
+ *
5
+ * This ABI is typed using viem's type system for full type safety.
6
+ */
7
+ export declare const UnilayerAbi: readonly [{
8
+ readonly constant: true;
9
+ readonly inputs: readonly [];
10
+ readonly name: "name";
11
+ readonly outputs: readonly [{
12
+ readonly name: "";
13
+ readonly type: "string";
14
+ }];
15
+ readonly payable: false;
16
+ readonly stateMutability: "view";
17
+ readonly type: "function";
18
+ }, {
19
+ readonly constant: false;
20
+ readonly inputs: readonly [{
21
+ readonly name: "spender";
22
+ readonly type: "address";
23
+ }, {
24
+ readonly name: "value";
25
+ readonly type: "uint256";
26
+ }];
27
+ readonly name: "approve";
28
+ readonly outputs: readonly [{
29
+ readonly name: "";
30
+ readonly type: "bool";
31
+ }];
32
+ readonly payable: false;
33
+ readonly stateMutability: "nonpayable";
34
+ readonly type: "function";
35
+ }, {
36
+ readonly constant: true;
37
+ readonly inputs: readonly [];
38
+ readonly name: "totalSupply";
39
+ readonly outputs: readonly [{
40
+ readonly name: "";
41
+ readonly type: "uint256";
42
+ }];
43
+ readonly payable: false;
44
+ readonly stateMutability: "view";
45
+ readonly type: "function";
46
+ }, {
47
+ readonly constant: false;
48
+ readonly inputs: readonly [{
49
+ readonly name: "from";
50
+ readonly type: "address";
51
+ }, {
52
+ readonly name: "to";
53
+ readonly type: "address";
54
+ }, {
55
+ readonly name: "value";
56
+ readonly type: "uint256";
57
+ }];
58
+ readonly name: "transferFrom";
59
+ readonly outputs: readonly [{
60
+ readonly name: "";
61
+ readonly type: "bool";
62
+ }];
63
+ readonly payable: false;
64
+ readonly stateMutability: "nonpayable";
65
+ readonly type: "function";
66
+ }, {
67
+ readonly constant: true;
68
+ readonly inputs: readonly [];
69
+ readonly name: "decimals";
70
+ readonly outputs: readonly [{
71
+ readonly name: "";
72
+ readonly type: "uint8";
73
+ }];
74
+ readonly payable: false;
75
+ readonly stateMutability: "view";
76
+ readonly type: "function";
77
+ }, {
78
+ readonly constant: false;
79
+ readonly inputs: readonly [{
80
+ readonly name: "spender";
81
+ readonly type: "address";
82
+ }, {
83
+ readonly name: "addedValue";
84
+ readonly type: "uint256";
85
+ }];
86
+ readonly name: "increaseAllowance";
87
+ readonly outputs: readonly [{
88
+ readonly name: "";
89
+ readonly type: "bool";
90
+ }];
91
+ readonly payable: false;
92
+ readonly stateMutability: "nonpayable";
93
+ readonly type: "function";
94
+ }, {
95
+ readonly constant: false;
96
+ readonly inputs: readonly [{
97
+ readonly name: "value";
98
+ readonly type: "uint256";
99
+ }];
100
+ readonly name: "burn";
101
+ readonly outputs: readonly [];
102
+ readonly payable: false;
103
+ readonly stateMutability: "nonpayable";
104
+ readonly type: "function";
105
+ }, {
106
+ readonly constant: true;
107
+ readonly inputs: readonly [{
108
+ readonly name: "owner";
109
+ readonly type: "address";
110
+ }];
111
+ readonly name: "balanceOf";
112
+ readonly outputs: readonly [{
113
+ readonly name: "";
114
+ readonly type: "uint256";
115
+ }];
116
+ readonly payable: false;
117
+ readonly stateMutability: "view";
118
+ readonly type: "function";
119
+ }, {
120
+ readonly constant: true;
121
+ readonly inputs: readonly [];
122
+ readonly name: "symbol";
123
+ readonly outputs: readonly [{
124
+ readonly name: "";
125
+ readonly type: "string";
126
+ }];
127
+ readonly payable: false;
128
+ readonly stateMutability: "view";
129
+ readonly type: "function";
130
+ }, {
131
+ readonly constant: false;
132
+ readonly inputs: readonly [{
133
+ readonly name: "spender";
134
+ readonly type: "address";
135
+ }, {
136
+ readonly name: "subtractedValue";
137
+ readonly type: "uint256";
138
+ }];
139
+ readonly name: "decreaseAllowance";
140
+ readonly outputs: readonly [{
141
+ readonly name: "";
142
+ readonly type: "bool";
143
+ }];
144
+ readonly payable: false;
145
+ readonly stateMutability: "nonpayable";
146
+ readonly type: "function";
147
+ }, {
148
+ readonly constant: false;
149
+ readonly inputs: readonly [{
150
+ readonly name: "to";
151
+ readonly type: "address";
152
+ }, {
153
+ readonly name: "value";
154
+ readonly type: "uint256";
155
+ }];
156
+ readonly name: "transfer";
157
+ readonly outputs: readonly [{
158
+ readonly name: "";
159
+ readonly type: "bool";
160
+ }];
161
+ readonly payable: false;
162
+ readonly stateMutability: "nonpayable";
163
+ readonly type: "function";
164
+ }, {
165
+ readonly constant: true;
166
+ readonly inputs: readonly [];
167
+ readonly name: "airdropcount";
168
+ readonly outputs: readonly [{
169
+ readonly name: "";
170
+ readonly type: "uint256";
171
+ }];
172
+ readonly payable: false;
173
+ readonly stateMutability: "view";
174
+ readonly type: "function";
175
+ }, {
176
+ readonly constant: true;
177
+ readonly inputs: readonly [{
178
+ readonly name: "owner";
179
+ readonly type: "address";
180
+ }, {
181
+ readonly name: "spender";
182
+ readonly type: "address";
183
+ }];
184
+ readonly name: "allowance";
185
+ readonly outputs: readonly [{
186
+ readonly name: "";
187
+ readonly type: "uint256";
188
+ }];
189
+ readonly payable: false;
190
+ readonly stateMutability: "view";
191
+ readonly type: "function";
192
+ }, {
193
+ readonly constant: false;
194
+ readonly inputs: readonly [{
195
+ readonly name: "_addresses";
196
+ readonly type: "address[]";
197
+ }, {
198
+ readonly name: "_amount";
199
+ readonly type: "uint256[]";
200
+ }];
201
+ readonly name: "airdropByOwner";
202
+ readonly outputs: readonly [{
203
+ readonly name: "";
204
+ readonly type: "bool";
205
+ }];
206
+ readonly payable: false;
207
+ readonly stateMutability: "nonpayable";
208
+ readonly type: "function";
209
+ }, {
210
+ readonly constant: false;
211
+ readonly inputs: readonly [{
212
+ readonly name: "newOwner";
213
+ readonly type: "address";
214
+ }];
215
+ readonly name: "transferOwnership";
216
+ readonly outputs: readonly [{
217
+ readonly name: "";
218
+ readonly type: "bool";
219
+ }];
220
+ readonly payable: false;
221
+ readonly stateMutability: "nonpayable";
222
+ readonly type: "function";
223
+ }, {
224
+ readonly constant: true;
225
+ readonly inputs: readonly [];
226
+ readonly name: "getowner";
227
+ readonly outputs: readonly [{
228
+ readonly name: "";
229
+ readonly type: "address";
230
+ }];
231
+ readonly payable: false;
232
+ readonly stateMutability: "view";
233
+ readonly type: "function";
234
+ }, {
235
+ readonly inputs: readonly [{
236
+ readonly name: "name";
237
+ readonly type: "string";
238
+ }, {
239
+ readonly name: "symbol";
240
+ readonly type: "string";
241
+ }, {
242
+ readonly name: "decimals";
243
+ readonly type: "uint8";
244
+ }, {
245
+ readonly name: "totalSupply";
246
+ readonly type: "uint256";
247
+ }, {
248
+ readonly name: "owner";
249
+ readonly type: "address";
250
+ }];
251
+ readonly payable: false;
252
+ readonly stateMutability: "nonpayable";
253
+ readonly type: "constructor";
254
+ }, {
255
+ readonly anonymous: false;
256
+ readonly inputs: readonly [{
257
+ readonly indexed: true;
258
+ readonly name: "from";
259
+ readonly type: "address";
260
+ }, {
261
+ readonly indexed: true;
262
+ readonly name: "to";
263
+ readonly type: "address";
264
+ }, {
265
+ readonly indexed: false;
266
+ readonly name: "value";
267
+ readonly type: "uint256";
268
+ }];
269
+ readonly name: "Transfer";
270
+ readonly type: "event";
271
+ }, {
272
+ readonly anonymous: false;
273
+ readonly inputs: readonly [{
274
+ readonly indexed: true;
275
+ readonly name: "owner";
276
+ readonly type: "address";
277
+ }, {
278
+ readonly indexed: true;
279
+ readonly name: "spender";
280
+ readonly type: "address";
281
+ }, {
282
+ readonly indexed: false;
283
+ readonly name: "value";
284
+ readonly type: "uint256";
285
+ }];
286
+ readonly name: "Approval";
287
+ readonly type: "event";
288
+ }];
289
+ /**
290
+ * Type-safe ABI for Unilayer
291
+ */
292
+ export type UnilayerAbi = typeof UnilayerAbi;
293
+ /**
294
+ * Contract instance type for Unilayer
295
+ */
296
+ export type UnilayerContract = any;
297
+ /**
298
+ * Unilayer Contract Class
299
+ *
300
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
301
+ *
302
+ * @example
303
+ * ```typescript
304
+ * import { createPublicClient, createWalletClient, http } from 'viem';
305
+ * import { mainnet } from 'viem/chains';
306
+ * import { Unilayer } from 'Unilayer';
307
+ *
308
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
309
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
310
+ *
311
+ * const contract = new Unilayer('0x...', { publicClient, walletClient });
312
+ *
313
+ * // Read functions
314
+ * const result = await contract.balanceOf('0x...');
315
+ *
316
+ * // Write functions
317
+ * const hash = await contract.transfer('0x...', 1000n);
318
+ *
319
+ * // Simulate transactions (dry-run)
320
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
321
+ * console.log('Gas estimate:', simulation.request.gas);
322
+ *
323
+ * // Watch events
324
+ * const unwatch = contract.watch.Transfer((event) => {
325
+ * console.log('Transfer event:', event);
326
+ * });
327
+ * ```
328
+ */
329
+ export declare class Unilayer {
330
+ private contract;
331
+ private contractAddress;
332
+ private publicClient;
333
+ constructor(address: Address, clients: {
334
+ publicClient: PublicClient;
335
+ walletClient?: WalletClient;
336
+ });
337
+ /**
338
+ * Get the contract address
339
+ */
340
+ get address(): Address;
341
+ /**
342
+ * Get the underlying viem contract instance.
343
+ */
344
+ getContract(): UnilayerContract;
345
+ /**
346
+ * name
347
+ * view
348
+ */
349
+ name(): Promise<string>;
350
+ /**
351
+ * totalSupply
352
+ * view
353
+ */
354
+ totalSupply(): Promise<bigint>;
355
+ /**
356
+ * decimals
357
+ * view
358
+ */
359
+ decimals(): Promise<bigint>;
360
+ /**
361
+ * balanceOf
362
+ * view
363
+ */
364
+ balanceOf(owner: `0x${string}`): Promise<bigint>;
365
+ /**
366
+ * symbol
367
+ * view
368
+ */
369
+ symbol(): Promise<string>;
370
+ /**
371
+ * airdropcount
372
+ * view
373
+ */
374
+ airdropcount(): Promise<bigint>;
375
+ /**
376
+ * allowance
377
+ * view
378
+ */
379
+ allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint>;
380
+ /**
381
+ * getowner
382
+ * view
383
+ */
384
+ getowner(): Promise<`0x${string}`>;
385
+ /**
386
+ * approve
387
+ * nonpayable
388
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
389
+ */
390
+ approve(spender: `0x${string}`, value: bigint, options?: {
391
+ accessList?: import('viem').AccessList;
392
+ authorizationList?: import('viem').AuthorizationList;
393
+ chain?: import('viem').Chain | null;
394
+ dataSuffix?: `0x${string}`;
395
+ gas?: bigint;
396
+ gasPrice?: bigint;
397
+ maxFeePerGas?: bigint;
398
+ maxPriorityFeePerGas?: bigint;
399
+ nonce?: number;
400
+ value?: bigint;
401
+ }): Promise<`0x${string}`>;
402
+ /**
403
+ * transferFrom
404
+ * nonpayable
405
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
406
+ */
407
+ transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
408
+ accessList?: import('viem').AccessList;
409
+ authorizationList?: import('viem').AuthorizationList;
410
+ chain?: import('viem').Chain | null;
411
+ dataSuffix?: `0x${string}`;
412
+ gas?: bigint;
413
+ gasPrice?: bigint;
414
+ maxFeePerGas?: bigint;
415
+ maxPriorityFeePerGas?: bigint;
416
+ nonce?: number;
417
+ value?: bigint;
418
+ }): Promise<`0x${string}`>;
419
+ /**
420
+ * increaseAllowance
421
+ * nonpayable
422
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
423
+ */
424
+ increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
425
+ accessList?: import('viem').AccessList;
426
+ authorizationList?: import('viem').AuthorizationList;
427
+ chain?: import('viem').Chain | null;
428
+ dataSuffix?: `0x${string}`;
429
+ gas?: bigint;
430
+ gasPrice?: bigint;
431
+ maxFeePerGas?: bigint;
432
+ maxPriorityFeePerGas?: bigint;
433
+ nonce?: number;
434
+ value?: bigint;
435
+ }): Promise<`0x${string}`>;
436
+ /**
437
+ * burn
438
+ * nonpayable
439
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
440
+ */
441
+ burn(value: bigint, options?: {
442
+ accessList?: import('viem').AccessList;
443
+ authorizationList?: import('viem').AuthorizationList;
444
+ chain?: import('viem').Chain | null;
445
+ dataSuffix?: `0x${string}`;
446
+ gas?: bigint;
447
+ gasPrice?: bigint;
448
+ maxFeePerGas?: bigint;
449
+ maxPriorityFeePerGas?: bigint;
450
+ nonce?: number;
451
+ value?: bigint;
452
+ }): Promise<`0x${string}`>;
453
+ /**
454
+ * decreaseAllowance
455
+ * nonpayable
456
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
457
+ */
458
+ decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
459
+ accessList?: import('viem').AccessList;
460
+ authorizationList?: import('viem').AuthorizationList;
461
+ chain?: import('viem').Chain | null;
462
+ dataSuffix?: `0x${string}`;
463
+ gas?: bigint;
464
+ gasPrice?: bigint;
465
+ maxFeePerGas?: bigint;
466
+ maxPriorityFeePerGas?: bigint;
467
+ nonce?: number;
468
+ value?: bigint;
469
+ }): Promise<`0x${string}`>;
470
+ /**
471
+ * transfer
472
+ * nonpayable
473
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
474
+ */
475
+ transfer(to: `0x${string}`, value: bigint, options?: {
476
+ accessList?: import('viem').AccessList;
477
+ authorizationList?: import('viem').AuthorizationList;
478
+ chain?: import('viem').Chain | null;
479
+ dataSuffix?: `0x${string}`;
480
+ gas?: bigint;
481
+ gasPrice?: bigint;
482
+ maxFeePerGas?: bigint;
483
+ maxPriorityFeePerGas?: bigint;
484
+ nonce?: number;
485
+ value?: bigint;
486
+ }): Promise<`0x${string}`>;
487
+ /**
488
+ * airdropByOwner
489
+ * nonpayable
490
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
491
+ */
492
+ airdropByOwner(_addresses: `0x${string}`[], _amount: bigint[], options?: {
493
+ accessList?: import('viem').AccessList;
494
+ authorizationList?: import('viem').AuthorizationList;
495
+ chain?: import('viem').Chain | null;
496
+ dataSuffix?: `0x${string}`;
497
+ gas?: bigint;
498
+ gasPrice?: bigint;
499
+ maxFeePerGas?: bigint;
500
+ maxPriorityFeePerGas?: bigint;
501
+ nonce?: number;
502
+ value?: bigint;
503
+ }): Promise<`0x${string}`>;
504
+ /**
505
+ * transferOwnership
506
+ * nonpayable
507
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
508
+ */
509
+ transferOwnership(newOwner: `0x${string}`, options?: {
510
+ accessList?: import('viem').AccessList;
511
+ authorizationList?: import('viem').AuthorizationList;
512
+ chain?: import('viem').Chain | null;
513
+ dataSuffix?: `0x${string}`;
514
+ gas?: bigint;
515
+ gasPrice?: bigint;
516
+ maxFeePerGas?: bigint;
517
+ maxPriorityFeePerGas?: bigint;
518
+ nonce?: number;
519
+ value?: bigint;
520
+ }): Promise<`0x${string}`>;
521
+ /**
522
+ * Simulate contract write operations (dry-run without sending transaction)
523
+ *
524
+ * @example
525
+ * const result = await contract.simulate.transfer('0x...', 1000n);
526
+ * console.log('Gas estimate:', result.request.gas);
527
+ * console.log('Would succeed:', result.result);
528
+ */
529
+ get simulate(): {
530
+ /**
531
+ * Simulate approve
532
+ * Returns gas estimate and result without sending transaction
533
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
534
+ */
535
+ approve(spender: `0x${string}`, value: bigint, options?: {
536
+ accessList?: import("viem").AccessList;
537
+ authorizationList?: import("viem").AuthorizationList;
538
+ chain?: import("viem").Chain | null;
539
+ dataSuffix?: `0x${string}`;
540
+ gas?: bigint;
541
+ gasPrice?: bigint;
542
+ maxFeePerGas?: bigint;
543
+ maxPriorityFeePerGas?: bigint;
544
+ nonce?: number;
545
+ value?: bigint;
546
+ }): Promise<boolean>;
547
+ /**
548
+ * Simulate transferFrom
549
+ * Returns gas estimate and result without sending transaction
550
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
551
+ */
552
+ transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
553
+ accessList?: import("viem").AccessList;
554
+ authorizationList?: import("viem").AuthorizationList;
555
+ chain?: import("viem").Chain | null;
556
+ dataSuffix?: `0x${string}`;
557
+ gas?: bigint;
558
+ gasPrice?: bigint;
559
+ maxFeePerGas?: bigint;
560
+ maxPriorityFeePerGas?: bigint;
561
+ nonce?: number;
562
+ value?: bigint;
563
+ }): Promise<boolean>;
564
+ /**
565
+ * Simulate increaseAllowance
566
+ * Returns gas estimate and result without sending transaction
567
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
568
+ */
569
+ increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
570
+ accessList?: import("viem").AccessList;
571
+ authorizationList?: import("viem").AuthorizationList;
572
+ chain?: import("viem").Chain | null;
573
+ dataSuffix?: `0x${string}`;
574
+ gas?: bigint;
575
+ gasPrice?: bigint;
576
+ maxFeePerGas?: bigint;
577
+ maxPriorityFeePerGas?: bigint;
578
+ nonce?: number;
579
+ value?: bigint;
580
+ }): Promise<boolean>;
581
+ /**
582
+ * Simulate burn
583
+ * Returns gas estimate and result without sending transaction
584
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
585
+ */
586
+ burn(value: bigint, options?: {
587
+ accessList?: import("viem").AccessList;
588
+ authorizationList?: import("viem").AuthorizationList;
589
+ chain?: import("viem").Chain | null;
590
+ dataSuffix?: `0x${string}`;
591
+ gas?: bigint;
592
+ gasPrice?: bigint;
593
+ maxFeePerGas?: bigint;
594
+ maxPriorityFeePerGas?: bigint;
595
+ nonce?: number;
596
+ value?: bigint;
597
+ }): Promise<void>;
598
+ /**
599
+ * Simulate decreaseAllowance
600
+ * Returns gas estimate and result without sending transaction
601
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
602
+ */
603
+ decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
604
+ accessList?: import("viem").AccessList;
605
+ authorizationList?: import("viem").AuthorizationList;
606
+ chain?: import("viem").Chain | null;
607
+ dataSuffix?: `0x${string}`;
608
+ gas?: bigint;
609
+ gasPrice?: bigint;
610
+ maxFeePerGas?: bigint;
611
+ maxPriorityFeePerGas?: bigint;
612
+ nonce?: number;
613
+ value?: bigint;
614
+ }): Promise<boolean>;
615
+ /**
616
+ * Simulate transfer
617
+ * Returns gas estimate and result without sending transaction
618
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
619
+ */
620
+ transfer(to: `0x${string}`, value: bigint, options?: {
621
+ accessList?: import("viem").AccessList;
622
+ authorizationList?: import("viem").AuthorizationList;
623
+ chain?: import("viem").Chain | null;
624
+ dataSuffix?: `0x${string}`;
625
+ gas?: bigint;
626
+ gasPrice?: bigint;
627
+ maxFeePerGas?: bigint;
628
+ maxPriorityFeePerGas?: bigint;
629
+ nonce?: number;
630
+ value?: bigint;
631
+ }): Promise<boolean>;
632
+ /**
633
+ * Simulate airdropByOwner
634
+ * Returns gas estimate and result without sending transaction
635
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
636
+ */
637
+ airdropByOwner(_addresses: `0x${string}`[], _amount: bigint[], options?: {
638
+ accessList?: import("viem").AccessList;
639
+ authorizationList?: import("viem").AuthorizationList;
640
+ chain?: import("viem").Chain | null;
641
+ dataSuffix?: `0x${string}`;
642
+ gas?: bigint;
643
+ gasPrice?: bigint;
644
+ maxFeePerGas?: bigint;
645
+ maxPriorityFeePerGas?: bigint;
646
+ nonce?: number;
647
+ value?: bigint;
648
+ }): Promise<boolean>;
649
+ /**
650
+ * Simulate transferOwnership
651
+ * Returns gas estimate and result without sending transaction
652
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
653
+ */
654
+ transferOwnership(newOwner: `0x${string}`, options?: {
655
+ accessList?: import("viem").AccessList;
656
+ authorizationList?: import("viem").AuthorizationList;
657
+ chain?: import("viem").Chain | null;
658
+ dataSuffix?: `0x${string}`;
659
+ gas?: bigint;
660
+ gasPrice?: bigint;
661
+ maxFeePerGas?: bigint;
662
+ maxPriorityFeePerGas?: bigint;
663
+ nonce?: number;
664
+ value?: bigint;
665
+ }): Promise<boolean>;
666
+ };
667
+ /**
668
+ * Watch contract events
669
+ *
670
+ * @example
671
+ * // Watch all Transfer events
672
+ * const unwatch = contract.watch.Transfer((event) => {
673
+ * console.log('Transfer:', event);
674
+ * });
675
+ *
676
+ * // Stop watching
677
+ * unwatch();
678
+ */
679
+ get watch(): {
680
+ /**
681
+ * Watch Transfer events
682
+ * @param callback Function to call when event is emitted
683
+ * @param filter Optional filter for indexed parameters
684
+ * @returns Unwatch function to stop listening
685
+ */
686
+ Transfer: (callback: (event: {
687
+ from: `0x${string}`;
688
+ to: `0x${string}`;
689
+ value: bigint;
690
+ }) => void, filter?: {
691
+ from?: `0x${string}` | `0x${string}`[] | null;
692
+ to?: `0x${string}` | `0x${string}`[] | null;
693
+ }) => () => void;
694
+ /**
695
+ * Watch Approval events
696
+ * @param callback Function to call when event is emitted
697
+ * @param filter Optional filter for indexed parameters
698
+ * @returns Unwatch function to stop listening
699
+ */
700
+ Approval: (callback: (event: {
701
+ owner: `0x${string}`;
702
+ spender: `0x${string}`;
703
+ value: bigint;
704
+ }) => void, filter?: {
705
+ owner?: `0x${string}` | `0x${string}`[] | null;
706
+ spender?: `0x${string}` | `0x${string}`[] | null;
707
+ }) => () => void;
708
+ };
709
+ }