@gitmyabi/weird 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,1447 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RaribleUserToken = exports.RaribleUserTokenAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * RaribleUserToken ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.RaribleUserTokenAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "string",
15
+ "name": "name",
16
+ "type": "string"
17
+ },
18
+ {
19
+ "internalType": "string",
20
+ "name": "symbol",
21
+ "type": "string"
22
+ },
23
+ {
24
+ "internalType": "string",
25
+ "name": "contractURI",
26
+ "type": "string"
27
+ },
28
+ {
29
+ "internalType": "string",
30
+ "name": "tokenURIPrefix",
31
+ "type": "string"
32
+ },
33
+ {
34
+ "internalType": "address",
35
+ "name": "signer",
36
+ "type": "address"
37
+ }
38
+ ],
39
+ "payable": false,
40
+ "stateMutability": "nonpayable",
41
+ "type": "constructor"
42
+ },
43
+ {
44
+ "anonymous": false,
45
+ "inputs": [
46
+ {
47
+ "indexed": true,
48
+ "internalType": "address",
49
+ "name": "_owner",
50
+ "type": "address"
51
+ },
52
+ {
53
+ "indexed": true,
54
+ "internalType": "address",
55
+ "name": "_operator",
56
+ "type": "address"
57
+ },
58
+ {
59
+ "indexed": false,
60
+ "internalType": "bool",
61
+ "name": "_approved",
62
+ "type": "bool"
63
+ }
64
+ ],
65
+ "name": "ApprovalForAll",
66
+ "type": "event"
67
+ },
68
+ {
69
+ "anonymous": false,
70
+ "inputs": [
71
+ {
72
+ "indexed": true,
73
+ "internalType": "address",
74
+ "name": "creator",
75
+ "type": "address"
76
+ },
77
+ {
78
+ "indexed": false,
79
+ "internalType": "string",
80
+ "name": "name",
81
+ "type": "string"
82
+ },
83
+ {
84
+ "indexed": false,
85
+ "internalType": "string",
86
+ "name": "symbol",
87
+ "type": "string"
88
+ }
89
+ ],
90
+ "name": "CreateERC1155_v1",
91
+ "type": "event"
92
+ },
93
+ {
94
+ "anonymous": false,
95
+ "inputs": [
96
+ {
97
+ "indexed": true,
98
+ "internalType": "address",
99
+ "name": "previousOwner",
100
+ "type": "address"
101
+ },
102
+ {
103
+ "indexed": true,
104
+ "internalType": "address",
105
+ "name": "newOwner",
106
+ "type": "address"
107
+ }
108
+ ],
109
+ "name": "OwnershipTransferred",
110
+ "type": "event"
111
+ },
112
+ {
113
+ "anonymous": false,
114
+ "inputs": [
115
+ {
116
+ "indexed": false,
117
+ "internalType": "uint256",
118
+ "name": "tokenId",
119
+ "type": "uint256"
120
+ },
121
+ {
122
+ "indexed": false,
123
+ "internalType": "address[]",
124
+ "name": "recipients",
125
+ "type": "address[]"
126
+ },
127
+ {
128
+ "indexed": false,
129
+ "internalType": "uint256[]",
130
+ "name": "bps",
131
+ "type": "uint256[]"
132
+ }
133
+ ],
134
+ "name": "SecondarySaleFees",
135
+ "type": "event"
136
+ },
137
+ {
138
+ "anonymous": false,
139
+ "inputs": [
140
+ {
141
+ "indexed": true,
142
+ "internalType": "address",
143
+ "name": "account",
144
+ "type": "address"
145
+ }
146
+ ],
147
+ "name": "SignerAdded",
148
+ "type": "event"
149
+ },
150
+ {
151
+ "anonymous": false,
152
+ "inputs": [
153
+ {
154
+ "indexed": true,
155
+ "internalType": "address",
156
+ "name": "account",
157
+ "type": "address"
158
+ }
159
+ ],
160
+ "name": "SignerRemoved",
161
+ "type": "event"
162
+ },
163
+ {
164
+ "anonymous": false,
165
+ "inputs": [
166
+ {
167
+ "indexed": true,
168
+ "internalType": "address",
169
+ "name": "_operator",
170
+ "type": "address"
171
+ },
172
+ {
173
+ "indexed": true,
174
+ "internalType": "address",
175
+ "name": "_from",
176
+ "type": "address"
177
+ },
178
+ {
179
+ "indexed": true,
180
+ "internalType": "address",
181
+ "name": "_to",
182
+ "type": "address"
183
+ },
184
+ {
185
+ "indexed": false,
186
+ "internalType": "uint256[]",
187
+ "name": "_ids",
188
+ "type": "uint256[]"
189
+ },
190
+ {
191
+ "indexed": false,
192
+ "internalType": "uint256[]",
193
+ "name": "_values",
194
+ "type": "uint256[]"
195
+ }
196
+ ],
197
+ "name": "TransferBatch",
198
+ "type": "event"
199
+ },
200
+ {
201
+ "anonymous": false,
202
+ "inputs": [
203
+ {
204
+ "indexed": true,
205
+ "internalType": "address",
206
+ "name": "_operator",
207
+ "type": "address"
208
+ },
209
+ {
210
+ "indexed": true,
211
+ "internalType": "address",
212
+ "name": "_from",
213
+ "type": "address"
214
+ },
215
+ {
216
+ "indexed": true,
217
+ "internalType": "address",
218
+ "name": "_to",
219
+ "type": "address"
220
+ },
221
+ {
222
+ "indexed": false,
223
+ "internalType": "uint256",
224
+ "name": "_id",
225
+ "type": "uint256"
226
+ },
227
+ {
228
+ "indexed": false,
229
+ "internalType": "uint256",
230
+ "name": "_value",
231
+ "type": "uint256"
232
+ }
233
+ ],
234
+ "name": "TransferSingle",
235
+ "type": "event"
236
+ },
237
+ {
238
+ "anonymous": false,
239
+ "inputs": [
240
+ {
241
+ "indexed": false,
242
+ "internalType": "string",
243
+ "name": "_value",
244
+ "type": "string"
245
+ },
246
+ {
247
+ "indexed": true,
248
+ "internalType": "uint256",
249
+ "name": "_id",
250
+ "type": "uint256"
251
+ }
252
+ ],
253
+ "name": "URI",
254
+ "type": "event"
255
+ },
256
+ {
257
+ "constant": false,
258
+ "inputs": [
259
+ {
260
+ "internalType": "address",
261
+ "name": "account",
262
+ "type": "address"
263
+ }
264
+ ],
265
+ "name": "addSigner",
266
+ "outputs": [],
267
+ "payable": false,
268
+ "stateMutability": "nonpayable",
269
+ "type": "function"
270
+ },
271
+ {
272
+ "constant": true,
273
+ "inputs": [
274
+ {
275
+ "internalType": "address",
276
+ "name": "_owner",
277
+ "type": "address"
278
+ },
279
+ {
280
+ "internalType": "uint256",
281
+ "name": "_id",
282
+ "type": "uint256"
283
+ }
284
+ ],
285
+ "name": "balanceOf",
286
+ "outputs": [
287
+ {
288
+ "internalType": "uint256",
289
+ "name": "",
290
+ "type": "uint256"
291
+ }
292
+ ],
293
+ "payable": false,
294
+ "stateMutability": "view",
295
+ "type": "function"
296
+ },
297
+ {
298
+ "constant": true,
299
+ "inputs": [
300
+ {
301
+ "internalType": "address[]",
302
+ "name": "_owners",
303
+ "type": "address[]"
304
+ },
305
+ {
306
+ "internalType": "uint256[]",
307
+ "name": "_ids",
308
+ "type": "uint256[]"
309
+ }
310
+ ],
311
+ "name": "balanceOfBatch",
312
+ "outputs": [
313
+ {
314
+ "internalType": "uint256[]",
315
+ "name": "",
316
+ "type": "uint256[]"
317
+ }
318
+ ],
319
+ "payable": false,
320
+ "stateMutability": "view",
321
+ "type": "function"
322
+ },
323
+ {
324
+ "constant": false,
325
+ "inputs": [
326
+ {
327
+ "internalType": "address",
328
+ "name": "_owner",
329
+ "type": "address"
330
+ },
331
+ {
332
+ "internalType": "uint256",
333
+ "name": "_id",
334
+ "type": "uint256"
335
+ },
336
+ {
337
+ "internalType": "uint256",
338
+ "name": "_value",
339
+ "type": "uint256"
340
+ }
341
+ ],
342
+ "name": "burn",
343
+ "outputs": [],
344
+ "payable": false,
345
+ "stateMutability": "nonpayable",
346
+ "type": "function"
347
+ },
348
+ {
349
+ "constant": true,
350
+ "inputs": [],
351
+ "name": "contractURI",
352
+ "outputs": [
353
+ {
354
+ "internalType": "string",
355
+ "name": "",
356
+ "type": "string"
357
+ }
358
+ ],
359
+ "payable": false,
360
+ "stateMutability": "view",
361
+ "type": "function"
362
+ },
363
+ {
364
+ "constant": true,
365
+ "inputs": [
366
+ {
367
+ "internalType": "uint256",
368
+ "name": "",
369
+ "type": "uint256"
370
+ }
371
+ ],
372
+ "name": "creators",
373
+ "outputs": [
374
+ {
375
+ "internalType": "address",
376
+ "name": "",
377
+ "type": "address"
378
+ }
379
+ ],
380
+ "payable": false,
381
+ "stateMutability": "view",
382
+ "type": "function"
383
+ },
384
+ {
385
+ "constant": true,
386
+ "inputs": [
387
+ {
388
+ "internalType": "uint256",
389
+ "name": "",
390
+ "type": "uint256"
391
+ },
392
+ {
393
+ "internalType": "uint256",
394
+ "name": "",
395
+ "type": "uint256"
396
+ }
397
+ ],
398
+ "name": "fees",
399
+ "outputs": [
400
+ {
401
+ "internalType": "address payable",
402
+ "name": "recipient",
403
+ "type": "address"
404
+ },
405
+ {
406
+ "internalType": "uint256",
407
+ "name": "value",
408
+ "type": "uint256"
409
+ }
410
+ ],
411
+ "payable": false,
412
+ "stateMutability": "view",
413
+ "type": "function"
414
+ },
415
+ {
416
+ "constant": true,
417
+ "inputs": [
418
+ {
419
+ "internalType": "uint256",
420
+ "name": "id",
421
+ "type": "uint256"
422
+ }
423
+ ],
424
+ "name": "getFeeBps",
425
+ "outputs": [
426
+ {
427
+ "internalType": "uint256[]",
428
+ "name": "",
429
+ "type": "uint256[]"
430
+ }
431
+ ],
432
+ "payable": false,
433
+ "stateMutability": "view",
434
+ "type": "function"
435
+ },
436
+ {
437
+ "constant": true,
438
+ "inputs": [
439
+ {
440
+ "internalType": "uint256",
441
+ "name": "id",
442
+ "type": "uint256"
443
+ }
444
+ ],
445
+ "name": "getFeeRecipients",
446
+ "outputs": [
447
+ {
448
+ "internalType": "address payable[]",
449
+ "name": "",
450
+ "type": "address[]"
451
+ }
452
+ ],
453
+ "payable": false,
454
+ "stateMutability": "view",
455
+ "type": "function"
456
+ },
457
+ {
458
+ "constant": true,
459
+ "inputs": [
460
+ {
461
+ "internalType": "address",
462
+ "name": "_owner",
463
+ "type": "address"
464
+ },
465
+ {
466
+ "internalType": "address",
467
+ "name": "_operator",
468
+ "type": "address"
469
+ }
470
+ ],
471
+ "name": "isApprovedForAll",
472
+ "outputs": [
473
+ {
474
+ "internalType": "bool",
475
+ "name": "",
476
+ "type": "bool"
477
+ }
478
+ ],
479
+ "payable": false,
480
+ "stateMutability": "view",
481
+ "type": "function"
482
+ },
483
+ {
484
+ "constant": true,
485
+ "inputs": [],
486
+ "name": "isOwner",
487
+ "outputs": [
488
+ {
489
+ "internalType": "bool",
490
+ "name": "",
491
+ "type": "bool"
492
+ }
493
+ ],
494
+ "payable": false,
495
+ "stateMutability": "view",
496
+ "type": "function"
497
+ },
498
+ {
499
+ "constant": true,
500
+ "inputs": [
501
+ {
502
+ "internalType": "address",
503
+ "name": "account",
504
+ "type": "address"
505
+ }
506
+ ],
507
+ "name": "isSigner",
508
+ "outputs": [
509
+ {
510
+ "internalType": "bool",
511
+ "name": "",
512
+ "type": "bool"
513
+ }
514
+ ],
515
+ "payable": false,
516
+ "stateMutability": "view",
517
+ "type": "function"
518
+ },
519
+ {
520
+ "constant": false,
521
+ "inputs": [
522
+ {
523
+ "internalType": "uint256",
524
+ "name": "id",
525
+ "type": "uint256"
526
+ },
527
+ {
528
+ "internalType": "uint8",
529
+ "name": "v",
530
+ "type": "uint8"
531
+ },
532
+ {
533
+ "internalType": "bytes32",
534
+ "name": "r",
535
+ "type": "bytes32"
536
+ },
537
+ {
538
+ "internalType": "bytes32",
539
+ "name": "s",
540
+ "type": "bytes32"
541
+ },
542
+ {
543
+ "components": [
544
+ {
545
+ "internalType": "address payable",
546
+ "name": "recipient",
547
+ "type": "address"
548
+ },
549
+ {
550
+ "internalType": "uint256",
551
+ "name": "value",
552
+ "type": "uint256"
553
+ }
554
+ ],
555
+ "internalType": "struct ERC1155Base.Fee[]",
556
+ "name": "fees",
557
+ "type": "tuple[]"
558
+ },
559
+ {
560
+ "internalType": "uint256",
561
+ "name": "supply",
562
+ "type": "uint256"
563
+ },
564
+ {
565
+ "internalType": "string",
566
+ "name": "uri",
567
+ "type": "string"
568
+ }
569
+ ],
570
+ "name": "mint",
571
+ "outputs": [],
572
+ "payable": false,
573
+ "stateMutability": "nonpayable",
574
+ "type": "function"
575
+ },
576
+ {
577
+ "constant": true,
578
+ "inputs": [],
579
+ "name": "name",
580
+ "outputs": [
581
+ {
582
+ "internalType": "string",
583
+ "name": "",
584
+ "type": "string"
585
+ }
586
+ ],
587
+ "payable": false,
588
+ "stateMutability": "view",
589
+ "type": "function"
590
+ },
591
+ {
592
+ "constant": true,
593
+ "inputs": [],
594
+ "name": "owner",
595
+ "outputs": [
596
+ {
597
+ "internalType": "address",
598
+ "name": "",
599
+ "type": "address"
600
+ }
601
+ ],
602
+ "payable": false,
603
+ "stateMutability": "view",
604
+ "type": "function"
605
+ },
606
+ {
607
+ "constant": false,
608
+ "inputs": [
609
+ {
610
+ "internalType": "address",
611
+ "name": "account",
612
+ "type": "address"
613
+ }
614
+ ],
615
+ "name": "removeSigner",
616
+ "outputs": [],
617
+ "payable": false,
618
+ "stateMutability": "nonpayable",
619
+ "type": "function"
620
+ },
621
+ {
622
+ "constant": false,
623
+ "inputs": [],
624
+ "name": "renounceOwnership",
625
+ "outputs": [],
626
+ "payable": false,
627
+ "stateMutability": "nonpayable",
628
+ "type": "function"
629
+ },
630
+ {
631
+ "constant": false,
632
+ "inputs": [],
633
+ "name": "renounceSigner",
634
+ "outputs": [],
635
+ "payable": false,
636
+ "stateMutability": "nonpayable",
637
+ "type": "function"
638
+ },
639
+ {
640
+ "constant": false,
641
+ "inputs": [
642
+ {
643
+ "internalType": "address",
644
+ "name": "_from",
645
+ "type": "address"
646
+ },
647
+ {
648
+ "internalType": "address",
649
+ "name": "_to",
650
+ "type": "address"
651
+ },
652
+ {
653
+ "internalType": "uint256[]",
654
+ "name": "_ids",
655
+ "type": "uint256[]"
656
+ },
657
+ {
658
+ "internalType": "uint256[]",
659
+ "name": "_values",
660
+ "type": "uint256[]"
661
+ },
662
+ {
663
+ "internalType": "bytes",
664
+ "name": "_data",
665
+ "type": "bytes"
666
+ }
667
+ ],
668
+ "name": "safeBatchTransferFrom",
669
+ "outputs": [],
670
+ "payable": false,
671
+ "stateMutability": "nonpayable",
672
+ "type": "function"
673
+ },
674
+ {
675
+ "constant": false,
676
+ "inputs": [
677
+ {
678
+ "internalType": "address",
679
+ "name": "_from",
680
+ "type": "address"
681
+ },
682
+ {
683
+ "internalType": "address",
684
+ "name": "_to",
685
+ "type": "address"
686
+ },
687
+ {
688
+ "internalType": "uint256",
689
+ "name": "_id",
690
+ "type": "uint256"
691
+ },
692
+ {
693
+ "internalType": "uint256",
694
+ "name": "_value",
695
+ "type": "uint256"
696
+ },
697
+ {
698
+ "internalType": "bytes",
699
+ "name": "_data",
700
+ "type": "bytes"
701
+ }
702
+ ],
703
+ "name": "safeTransferFrom",
704
+ "outputs": [],
705
+ "payable": false,
706
+ "stateMutability": "nonpayable",
707
+ "type": "function"
708
+ },
709
+ {
710
+ "constant": false,
711
+ "inputs": [
712
+ {
713
+ "internalType": "address",
714
+ "name": "_operator",
715
+ "type": "address"
716
+ },
717
+ {
718
+ "internalType": "bool",
719
+ "name": "_approved",
720
+ "type": "bool"
721
+ }
722
+ ],
723
+ "name": "setApprovalForAll",
724
+ "outputs": [],
725
+ "payable": false,
726
+ "stateMutability": "nonpayable",
727
+ "type": "function"
728
+ },
729
+ {
730
+ "constant": false,
731
+ "inputs": [
732
+ {
733
+ "internalType": "string",
734
+ "name": "contractURI",
735
+ "type": "string"
736
+ }
737
+ ],
738
+ "name": "setContractURI",
739
+ "outputs": [],
740
+ "payable": false,
741
+ "stateMutability": "nonpayable",
742
+ "type": "function"
743
+ },
744
+ {
745
+ "constant": false,
746
+ "inputs": [
747
+ {
748
+ "internalType": "string",
749
+ "name": "tokenURIPrefix",
750
+ "type": "string"
751
+ }
752
+ ],
753
+ "name": "setTokenURIPrefix",
754
+ "outputs": [],
755
+ "payable": false,
756
+ "stateMutability": "nonpayable",
757
+ "type": "function"
758
+ },
759
+ {
760
+ "constant": true,
761
+ "inputs": [
762
+ {
763
+ "internalType": "bytes4",
764
+ "name": "interfaceId",
765
+ "type": "bytes4"
766
+ }
767
+ ],
768
+ "name": "supportsInterface",
769
+ "outputs": [
770
+ {
771
+ "internalType": "bool",
772
+ "name": "",
773
+ "type": "bool"
774
+ }
775
+ ],
776
+ "payable": false,
777
+ "stateMutability": "view",
778
+ "type": "function"
779
+ },
780
+ {
781
+ "constant": true,
782
+ "inputs": [],
783
+ "name": "symbol",
784
+ "outputs": [
785
+ {
786
+ "internalType": "string",
787
+ "name": "",
788
+ "type": "string"
789
+ }
790
+ ],
791
+ "payable": false,
792
+ "stateMutability": "view",
793
+ "type": "function"
794
+ },
795
+ {
796
+ "constant": true,
797
+ "inputs": [],
798
+ "name": "tokenURIPrefix",
799
+ "outputs": [
800
+ {
801
+ "internalType": "string",
802
+ "name": "",
803
+ "type": "string"
804
+ }
805
+ ],
806
+ "payable": false,
807
+ "stateMutability": "view",
808
+ "type": "function"
809
+ },
810
+ {
811
+ "constant": false,
812
+ "inputs": [
813
+ {
814
+ "internalType": "address",
815
+ "name": "newOwner",
816
+ "type": "address"
817
+ }
818
+ ],
819
+ "name": "transferOwnership",
820
+ "outputs": [],
821
+ "payable": false,
822
+ "stateMutability": "nonpayable",
823
+ "type": "function"
824
+ },
825
+ {
826
+ "constant": true,
827
+ "inputs": [
828
+ {
829
+ "internalType": "uint256",
830
+ "name": "_id",
831
+ "type": "uint256"
832
+ }
833
+ ],
834
+ "name": "uri",
835
+ "outputs": [
836
+ {
837
+ "internalType": "string",
838
+ "name": "",
839
+ "type": "string"
840
+ }
841
+ ],
842
+ "payable": false,
843
+ "stateMutability": "view",
844
+ "type": "function"
845
+ }
846
+ ];
847
+ /**
848
+ * RaribleUserToken Contract Class
849
+ *
850
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
851
+ *
852
+ * @example
853
+ * ```typescript
854
+ * import { createPublicClient, createWalletClient, http } from 'viem';
855
+ * import { mainnet } from 'viem/chains';
856
+ * import { RaribleUserToken } from 'RaribleUserToken';
857
+ *
858
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
859
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
860
+ *
861
+ * const contract = new RaribleUserToken('0x...', { publicClient, walletClient });
862
+ *
863
+ * // Read functions
864
+ * const result = await contract.balanceOf('0x...');
865
+ *
866
+ * // Write functions
867
+ * const hash = await contract.transfer('0x...', 1000n);
868
+ *
869
+ * // Simulate transactions (dry-run)
870
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
871
+ * console.log('Gas estimate:', simulation.request.gas);
872
+ *
873
+ * // Watch events
874
+ * const unwatch = contract.watch.Transfer((event) => {
875
+ * console.log('Transfer event:', event);
876
+ * });
877
+ * ```
878
+ */
879
+ class RaribleUserToken {
880
+ constructor(address, clients) {
881
+ this.contractAddress = address;
882
+ this.publicClient = clients.publicClient;
883
+ this.contract = (0, viem_1.getContract)({
884
+ address,
885
+ abi: exports.RaribleUserTokenAbi,
886
+ client: {
887
+ public: clients.publicClient,
888
+ wallet: clients.walletClient,
889
+ },
890
+ });
891
+ }
892
+ /**
893
+ * Get the contract address
894
+ */
895
+ get address() {
896
+ return this.contractAddress;
897
+ }
898
+ /**
899
+ * Get the underlying viem contract instance.
900
+ */
901
+ getContract() {
902
+ return this.contract;
903
+ }
904
+ /**
905
+ * balanceOf
906
+ * view
907
+ */
908
+ async balanceOf(_owner, _id) {
909
+ return this.contract.read.balanceOf([_owner, _id]);
910
+ }
911
+ /**
912
+ * balanceOfBatch
913
+ * view
914
+ */
915
+ async balanceOfBatch(_owners, _ids) {
916
+ return this.contract.read.balanceOfBatch([_owners, _ids]);
917
+ }
918
+ /**
919
+ * contractURI
920
+ * view
921
+ */
922
+ async contractURI() {
923
+ return this.contract.read.contractURI();
924
+ }
925
+ /**
926
+ * creators
927
+ * view
928
+ */
929
+ async creators(arg0) {
930
+ return this.contract.read.creators([arg0]);
931
+ }
932
+ /**
933
+ * fees
934
+ * view
935
+ */
936
+ async fees(arg0, arg1) {
937
+ return this.contract.read.fees([arg0, arg1]);
938
+ }
939
+ /**
940
+ * getFeeBps
941
+ * view
942
+ */
943
+ async getFeeBps(id) {
944
+ return this.contract.read.getFeeBps([id]);
945
+ }
946
+ /**
947
+ * getFeeRecipients
948
+ * view
949
+ */
950
+ async getFeeRecipients(id) {
951
+ return this.contract.read.getFeeRecipients([id]);
952
+ }
953
+ /**
954
+ * isApprovedForAll
955
+ * view
956
+ */
957
+ async isApprovedForAll(_owner, _operator) {
958
+ return this.contract.read.isApprovedForAll([_owner, _operator]);
959
+ }
960
+ /**
961
+ * isOwner
962
+ * view
963
+ */
964
+ async isOwner() {
965
+ return this.contract.read.isOwner();
966
+ }
967
+ /**
968
+ * isSigner
969
+ * view
970
+ */
971
+ async isSigner(account) {
972
+ return this.contract.read.isSigner([account]);
973
+ }
974
+ /**
975
+ * name
976
+ * view
977
+ */
978
+ async name() {
979
+ return this.contract.read.name();
980
+ }
981
+ /**
982
+ * owner
983
+ * view
984
+ */
985
+ async owner() {
986
+ return this.contract.read.owner();
987
+ }
988
+ /**
989
+ * supportsInterface
990
+ * view
991
+ */
992
+ async supportsInterface(interfaceId) {
993
+ return this.contract.read.supportsInterface([interfaceId]);
994
+ }
995
+ /**
996
+ * symbol
997
+ * view
998
+ */
999
+ async symbol() {
1000
+ return this.contract.read.symbol();
1001
+ }
1002
+ /**
1003
+ * tokenURIPrefix
1004
+ * view
1005
+ */
1006
+ async tokenURIPrefix() {
1007
+ return this.contract.read.tokenURIPrefix();
1008
+ }
1009
+ /**
1010
+ * uri
1011
+ * view
1012
+ */
1013
+ async uri(_id) {
1014
+ return this.contract.read.uri([_id]);
1015
+ }
1016
+ /**
1017
+ * addSigner
1018
+ * nonpayable
1019
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1020
+ */
1021
+ async addSigner(account, options) {
1022
+ if (!this.contract.write) {
1023
+ throw new Error('Wallet client is required for write operations');
1024
+ }
1025
+ return this.contract.write.addSigner([account], options);
1026
+ }
1027
+ /**
1028
+ * burn
1029
+ * nonpayable
1030
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1031
+ */
1032
+ async burn(_owner, _id, _value, options) {
1033
+ if (!this.contract.write) {
1034
+ throw new Error('Wallet client is required for write operations');
1035
+ }
1036
+ return this.contract.write.burn([_owner, _id, _value], options);
1037
+ }
1038
+ /**
1039
+ * mint
1040
+ * nonpayable
1041
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1042
+ */
1043
+ async mint(id, v, r, s, fees, supply, uri, options) {
1044
+ if (!this.contract.write) {
1045
+ throw new Error('Wallet client is required for write operations');
1046
+ }
1047
+ return this.contract.write.mint([id, v, r, s, fees, supply, uri], options);
1048
+ }
1049
+ /**
1050
+ * removeSigner
1051
+ * nonpayable
1052
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1053
+ */
1054
+ async removeSigner(account, options) {
1055
+ if (!this.contract.write) {
1056
+ throw new Error('Wallet client is required for write operations');
1057
+ }
1058
+ return this.contract.write.removeSigner([account], options);
1059
+ }
1060
+ /**
1061
+ * renounceOwnership
1062
+ * nonpayable
1063
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1064
+ */
1065
+ async renounceOwnership(options) {
1066
+ if (!this.contract.write) {
1067
+ throw new Error('Wallet client is required for write operations');
1068
+ }
1069
+ return this.contract.write.renounceOwnership(options);
1070
+ }
1071
+ /**
1072
+ * renounceSigner
1073
+ * nonpayable
1074
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1075
+ */
1076
+ async renounceSigner(options) {
1077
+ if (!this.contract.write) {
1078
+ throw new Error('Wallet client is required for write operations');
1079
+ }
1080
+ return this.contract.write.renounceSigner(options);
1081
+ }
1082
+ /**
1083
+ * safeBatchTransferFrom
1084
+ * nonpayable
1085
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1086
+ */
1087
+ async safeBatchTransferFrom(_from, _to, _ids, _values, _data, options) {
1088
+ if (!this.contract.write) {
1089
+ throw new Error('Wallet client is required for write operations');
1090
+ }
1091
+ return this.contract.write.safeBatchTransferFrom([_from, _to, _ids, _values, _data], options);
1092
+ }
1093
+ /**
1094
+ * safeTransferFrom
1095
+ * nonpayable
1096
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1097
+ */
1098
+ async safeTransferFrom(_from, _to, _id, _value, _data, options) {
1099
+ if (!this.contract.write) {
1100
+ throw new Error('Wallet client is required for write operations');
1101
+ }
1102
+ return this.contract.write.safeTransferFrom([_from, _to, _id, _value, _data], options);
1103
+ }
1104
+ /**
1105
+ * setApprovalForAll
1106
+ * nonpayable
1107
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1108
+ */
1109
+ async setApprovalForAll(_operator, _approved, options) {
1110
+ if (!this.contract.write) {
1111
+ throw new Error('Wallet client is required for write operations');
1112
+ }
1113
+ return this.contract.write.setApprovalForAll([_operator, _approved], options);
1114
+ }
1115
+ /**
1116
+ * setContractURI
1117
+ * nonpayable
1118
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1119
+ */
1120
+ async setContractURI(contractURI, options) {
1121
+ if (!this.contract.write) {
1122
+ throw new Error('Wallet client is required for write operations');
1123
+ }
1124
+ return this.contract.write.setContractURI([contractURI], options);
1125
+ }
1126
+ /**
1127
+ * setTokenURIPrefix
1128
+ * nonpayable
1129
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1130
+ */
1131
+ async setTokenURIPrefix(tokenURIPrefix, options) {
1132
+ if (!this.contract.write) {
1133
+ throw new Error('Wallet client is required for write operations');
1134
+ }
1135
+ return this.contract.write.setTokenURIPrefix([tokenURIPrefix], options);
1136
+ }
1137
+ /**
1138
+ * transferOwnership
1139
+ * nonpayable
1140
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1141
+ */
1142
+ async transferOwnership(newOwner, options) {
1143
+ if (!this.contract.write) {
1144
+ throw new Error('Wallet client is required for write operations');
1145
+ }
1146
+ return this.contract.write.transferOwnership([newOwner], options);
1147
+ }
1148
+ /**
1149
+ * Simulate contract write operations (dry-run without sending transaction)
1150
+ *
1151
+ * @example
1152
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1153
+ * console.log('Gas estimate:', result.request.gas);
1154
+ * console.log('Would succeed:', result.result);
1155
+ */
1156
+ get simulate() {
1157
+ const contract = this.contract;
1158
+ if (!contract.simulate) {
1159
+ throw new Error('Public client is required for simulation');
1160
+ }
1161
+ return {
1162
+ /**
1163
+ * Simulate addSigner
1164
+ * Returns gas estimate and result without sending transaction
1165
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1166
+ */
1167
+ async addSigner(account, options) {
1168
+ return contract.simulate.addSigner([account], options);
1169
+ },
1170
+ /**
1171
+ * Simulate burn
1172
+ * Returns gas estimate and result without sending transaction
1173
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1174
+ */
1175
+ async burn(_owner, _id, _value, options) {
1176
+ return contract.simulate.burn([_owner, _id, _value], options);
1177
+ },
1178
+ /**
1179
+ * Simulate mint
1180
+ * Returns gas estimate and result without sending transaction
1181
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1182
+ */
1183
+ async mint(id, v, r, s, fees, supply, uri, options) {
1184
+ return contract.simulate.mint([id, v, r, s, fees, supply, uri], options);
1185
+ },
1186
+ /**
1187
+ * Simulate removeSigner
1188
+ * Returns gas estimate and result without sending transaction
1189
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1190
+ */
1191
+ async removeSigner(account, options) {
1192
+ return contract.simulate.removeSigner([account], options);
1193
+ },
1194
+ /**
1195
+ * Simulate renounceOwnership
1196
+ * Returns gas estimate and result without sending transaction
1197
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1198
+ */
1199
+ async renounceOwnership(options) {
1200
+ return contract.simulate.renounceOwnership(options);
1201
+ },
1202
+ /**
1203
+ * Simulate renounceSigner
1204
+ * Returns gas estimate and result without sending transaction
1205
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1206
+ */
1207
+ async renounceSigner(options) {
1208
+ return contract.simulate.renounceSigner(options);
1209
+ },
1210
+ /**
1211
+ * Simulate safeBatchTransferFrom
1212
+ * Returns gas estimate and result without sending transaction
1213
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1214
+ */
1215
+ async safeBatchTransferFrom(_from, _to, _ids, _values, _data, options) {
1216
+ return contract.simulate.safeBatchTransferFrom([_from, _to, _ids, _values, _data], options);
1217
+ },
1218
+ /**
1219
+ * Simulate safeTransferFrom
1220
+ * Returns gas estimate and result without sending transaction
1221
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1222
+ */
1223
+ async safeTransferFrom(_from, _to, _id, _value, _data, options) {
1224
+ return contract.simulate.safeTransferFrom([_from, _to, _id, _value, _data], options);
1225
+ },
1226
+ /**
1227
+ * Simulate setApprovalForAll
1228
+ * Returns gas estimate and result without sending transaction
1229
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1230
+ */
1231
+ async setApprovalForAll(_operator, _approved, options) {
1232
+ return contract.simulate.setApprovalForAll([_operator, _approved], options);
1233
+ },
1234
+ /**
1235
+ * Simulate setContractURI
1236
+ * Returns gas estimate and result without sending transaction
1237
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1238
+ */
1239
+ async setContractURI(contractURI, options) {
1240
+ return contract.simulate.setContractURI([contractURI], options);
1241
+ },
1242
+ /**
1243
+ * Simulate setTokenURIPrefix
1244
+ * Returns gas estimate and result without sending transaction
1245
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1246
+ */
1247
+ async setTokenURIPrefix(tokenURIPrefix, options) {
1248
+ return contract.simulate.setTokenURIPrefix([tokenURIPrefix], options);
1249
+ },
1250
+ /**
1251
+ * Simulate transferOwnership
1252
+ * Returns gas estimate and result without sending transaction
1253
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1254
+ */
1255
+ async transferOwnership(newOwner, options) {
1256
+ return contract.simulate.transferOwnership([newOwner], options);
1257
+ }
1258
+ };
1259
+ }
1260
+ /**
1261
+ * Watch contract events
1262
+ *
1263
+ * @example
1264
+ * // Watch all Transfer events
1265
+ * const unwatch = contract.watch.Transfer((event) => {
1266
+ * console.log('Transfer:', event);
1267
+ * });
1268
+ *
1269
+ * // Stop watching
1270
+ * unwatch();
1271
+ */
1272
+ get watch() {
1273
+ return {
1274
+ /**
1275
+ * Watch ApprovalForAll events
1276
+ * @param callback Function to call when event is emitted
1277
+ * @param filter Optional filter for indexed parameters
1278
+ * @returns Unwatch function to stop listening
1279
+ */
1280
+ ApprovalForAll: (callback, filter) => {
1281
+ return this.publicClient.watchContractEvent({
1282
+ address: this.contractAddress,
1283
+ abi: exports.RaribleUserTokenAbi,
1284
+ eventName: 'ApprovalForAll',
1285
+ args: filter,
1286
+ onLogs: (logs) => {
1287
+ logs.forEach((log) => {
1288
+ callback(log.args);
1289
+ });
1290
+ },
1291
+ });
1292
+ },
1293
+ /**
1294
+ * Watch CreateERC1155_v1 events
1295
+ * @param callback Function to call when event is emitted
1296
+ * @param filter Optional filter for indexed parameters
1297
+ * @returns Unwatch function to stop listening
1298
+ */
1299
+ CreateERC1155_v1: (callback, filter) => {
1300
+ return this.publicClient.watchContractEvent({
1301
+ address: this.contractAddress,
1302
+ abi: exports.RaribleUserTokenAbi,
1303
+ eventName: 'CreateERC1155_v1',
1304
+ args: filter,
1305
+ onLogs: (logs) => {
1306
+ logs.forEach((log) => {
1307
+ callback(log.args);
1308
+ });
1309
+ },
1310
+ });
1311
+ },
1312
+ /**
1313
+ * Watch OwnershipTransferred events
1314
+ * @param callback Function to call when event is emitted
1315
+ * @param filter Optional filter for indexed parameters
1316
+ * @returns Unwatch function to stop listening
1317
+ */
1318
+ OwnershipTransferred: (callback, filter) => {
1319
+ return this.publicClient.watchContractEvent({
1320
+ address: this.contractAddress,
1321
+ abi: exports.RaribleUserTokenAbi,
1322
+ eventName: 'OwnershipTransferred',
1323
+ args: filter,
1324
+ onLogs: (logs) => {
1325
+ logs.forEach((log) => {
1326
+ callback(log.args);
1327
+ });
1328
+ },
1329
+ });
1330
+ },
1331
+ /**
1332
+ * Watch SecondarySaleFees events
1333
+ * @param callback Function to call when event is emitted
1334
+ * @param filter Optional filter for indexed parameters
1335
+ * @returns Unwatch function to stop listening
1336
+ */
1337
+ SecondarySaleFees: (callback) => {
1338
+ return this.publicClient.watchContractEvent({
1339
+ address: this.contractAddress,
1340
+ abi: exports.RaribleUserTokenAbi,
1341
+ eventName: 'SecondarySaleFees',
1342
+ onLogs: (logs) => {
1343
+ logs.forEach((log) => {
1344
+ callback(log.args);
1345
+ });
1346
+ },
1347
+ });
1348
+ },
1349
+ /**
1350
+ * Watch SignerAdded events
1351
+ * @param callback Function to call when event is emitted
1352
+ * @param filter Optional filter for indexed parameters
1353
+ * @returns Unwatch function to stop listening
1354
+ */
1355
+ SignerAdded: (callback, filter) => {
1356
+ return this.publicClient.watchContractEvent({
1357
+ address: this.contractAddress,
1358
+ abi: exports.RaribleUserTokenAbi,
1359
+ eventName: 'SignerAdded',
1360
+ args: filter,
1361
+ onLogs: (logs) => {
1362
+ logs.forEach((log) => {
1363
+ callback(log.args);
1364
+ });
1365
+ },
1366
+ });
1367
+ },
1368
+ /**
1369
+ * Watch SignerRemoved events
1370
+ * @param callback Function to call when event is emitted
1371
+ * @param filter Optional filter for indexed parameters
1372
+ * @returns Unwatch function to stop listening
1373
+ */
1374
+ SignerRemoved: (callback, filter) => {
1375
+ return this.publicClient.watchContractEvent({
1376
+ address: this.contractAddress,
1377
+ abi: exports.RaribleUserTokenAbi,
1378
+ eventName: 'SignerRemoved',
1379
+ args: filter,
1380
+ onLogs: (logs) => {
1381
+ logs.forEach((log) => {
1382
+ callback(log.args);
1383
+ });
1384
+ },
1385
+ });
1386
+ },
1387
+ /**
1388
+ * Watch TransferBatch events
1389
+ * @param callback Function to call when event is emitted
1390
+ * @param filter Optional filter for indexed parameters
1391
+ * @returns Unwatch function to stop listening
1392
+ */
1393
+ TransferBatch: (callback, filter) => {
1394
+ return this.publicClient.watchContractEvent({
1395
+ address: this.contractAddress,
1396
+ abi: exports.RaribleUserTokenAbi,
1397
+ eventName: 'TransferBatch',
1398
+ args: filter,
1399
+ onLogs: (logs) => {
1400
+ logs.forEach((log) => {
1401
+ callback(log.args);
1402
+ });
1403
+ },
1404
+ });
1405
+ },
1406
+ /**
1407
+ * Watch TransferSingle events
1408
+ * @param callback Function to call when event is emitted
1409
+ * @param filter Optional filter for indexed parameters
1410
+ * @returns Unwatch function to stop listening
1411
+ */
1412
+ TransferSingle: (callback, filter) => {
1413
+ return this.publicClient.watchContractEvent({
1414
+ address: this.contractAddress,
1415
+ abi: exports.RaribleUserTokenAbi,
1416
+ eventName: 'TransferSingle',
1417
+ args: filter,
1418
+ onLogs: (logs) => {
1419
+ logs.forEach((log) => {
1420
+ callback(log.args);
1421
+ });
1422
+ },
1423
+ });
1424
+ },
1425
+ /**
1426
+ * Watch URI events
1427
+ * @param callback Function to call when event is emitted
1428
+ * @param filter Optional filter for indexed parameters
1429
+ * @returns Unwatch function to stop listening
1430
+ */
1431
+ URI: (callback, filter) => {
1432
+ return this.publicClient.watchContractEvent({
1433
+ address: this.contractAddress,
1434
+ abi: exports.RaribleUserTokenAbi,
1435
+ eventName: 'URI',
1436
+ args: filter,
1437
+ onLogs: (logs) => {
1438
+ logs.forEach((log) => {
1439
+ callback(log.args);
1440
+ });
1441
+ },
1442
+ });
1443
+ }
1444
+ };
1445
+ }
1446
+ }
1447
+ exports.RaribleUserToken = RaribleUserToken;