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