@zubari/sdk 0.1.21 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/PayoutsProtocol-BFrXok86.d.ts +181 -0
  2. package/dist/PayoutsProtocol-Q3wZHcaf.d.mts +181 -0
  3. package/dist/{WalletManager-wRV8RrnE.d.ts → WalletManager-9bC646Ax.d.ts} +49 -141
  4. package/dist/{WalletManager-bdFpa_yr.d.mts → WalletManager-B4Ag188W.d.mts} +49 -141
  5. package/dist/{index-C4wdFOtM.d.mts → index-C4SuAZP4.d.ts} +3 -2
  6. package/dist/{index-DhluuR9H.d.mts → index-D9vwxETQ.d.mts} +17 -1
  7. package/dist/{index-DhluuR9H.d.ts → index-D9vwxETQ.d.ts} +17 -1
  8. package/dist/{index-Cq024jR8.d.ts → index-DkB0ouBN.d.mts} +3 -2
  9. package/dist/index.d.mts +5 -6
  10. package/dist/index.d.ts +5 -6
  11. package/dist/index.js +36 -63
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +30 -57
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/protocols/index.d.mts +149 -171
  16. package/dist/protocols/index.d.ts +149 -171
  17. package/dist/protocols/index.js +889 -0
  18. package/dist/protocols/index.js.map +1 -1
  19. package/dist/protocols/index.mjs +889 -1
  20. package/dist/protocols/index.mjs.map +1 -1
  21. package/dist/react/index.d.mts +4 -5
  22. package/dist/react/index.d.ts +4 -5
  23. package/dist/react/index.js +29 -60
  24. package/dist/react/index.js.map +1 -1
  25. package/dist/react/index.mjs +23 -54
  26. package/dist/react/index.mjs.map +1 -1
  27. package/dist/services/index.d.mts +1 -1
  28. package/dist/services/index.d.ts +1 -1
  29. package/dist/services/index.js +30 -18
  30. package/dist/services/index.js.map +1 -1
  31. package/dist/services/index.mjs +24 -12
  32. package/dist/services/index.mjs.map +1 -1
  33. package/dist/wallet/index.d.mts +4 -5
  34. package/dist/wallet/index.d.ts +4 -5
  35. package/dist/wallet/index.js +36 -63
  36. package/dist/wallet/index.js.map +1 -1
  37. package/dist/wallet/index.mjs +30 -57
  38. package/dist/wallet/index.mjs.map +1 -1
  39. package/package.json +17 -19
@@ -120,6 +120,894 @@ var ZubariNFTProtocol = class {
120
120
  }
121
121
  };
122
122
 
123
+ // src/abi/ZubariMarket.json
124
+ var ZubariMarket_default = [
125
+ {
126
+ inputs: [
127
+ {
128
+ internalType: "address",
129
+ name: "_treasury",
130
+ type: "address"
131
+ },
132
+ {
133
+ internalType: "uint256",
134
+ name: "_platformFeeBps",
135
+ type: "uint256"
136
+ }
137
+ ],
138
+ stateMutability: "nonpayable",
139
+ type: "constructor"
140
+ },
141
+ {
142
+ inputs: [],
143
+ name: "EnforcedPause",
144
+ type: "error"
145
+ },
146
+ {
147
+ inputs: [],
148
+ name: "ExpectedPause",
149
+ type: "error"
150
+ },
151
+ {
152
+ inputs: [],
153
+ name: "InsufficientPayment",
154
+ type: "error"
155
+ },
156
+ {
157
+ inputs: [],
158
+ name: "InvalidAddress",
159
+ type: "error"
160
+ },
161
+ {
162
+ inputs: [],
163
+ name: "InvalidDuration",
164
+ type: "error"
165
+ },
166
+ {
167
+ inputs: [],
168
+ name: "InvalidFee",
169
+ type: "error"
170
+ },
171
+ {
172
+ inputs: [],
173
+ name: "InvalidPrice",
174
+ type: "error"
175
+ },
176
+ {
177
+ inputs: [],
178
+ name: "ListingExpired",
179
+ type: "error"
180
+ },
181
+ {
182
+ inputs: [],
183
+ name: "ListingNotActive",
184
+ type: "error"
185
+ },
186
+ {
187
+ inputs: [],
188
+ name: "NotApproved",
189
+ type: "error"
190
+ },
191
+ {
192
+ inputs: [],
193
+ name: "NotSeller",
194
+ type: "error"
195
+ },
196
+ {
197
+ inputs: [],
198
+ name: "NotTokenOwner",
199
+ type: "error"
200
+ },
201
+ {
202
+ inputs: [
203
+ {
204
+ internalType: "address",
205
+ name: "owner",
206
+ type: "address"
207
+ }
208
+ ],
209
+ name: "OwnableInvalidOwner",
210
+ type: "error"
211
+ },
212
+ {
213
+ inputs: [
214
+ {
215
+ internalType: "address",
216
+ name: "account",
217
+ type: "address"
218
+ }
219
+ ],
220
+ name: "OwnableUnauthorizedAccount",
221
+ type: "error"
222
+ },
223
+ {
224
+ inputs: [],
225
+ name: "ReentrancyGuardReentrantCall",
226
+ type: "error"
227
+ },
228
+ {
229
+ inputs: [
230
+ {
231
+ internalType: "address",
232
+ name: "token",
233
+ type: "address"
234
+ }
235
+ ],
236
+ name: "SafeERC20FailedOperation",
237
+ type: "error"
238
+ },
239
+ {
240
+ inputs: [],
241
+ name: "TransferFailed",
242
+ type: "error"
243
+ },
244
+ {
245
+ inputs: [],
246
+ name: "UnsupportedPaymentToken",
247
+ type: "error"
248
+ },
249
+ {
250
+ anonymous: false,
251
+ inputs: [
252
+ {
253
+ indexed: true,
254
+ internalType: "uint256",
255
+ name: "listingId",
256
+ type: "uint256"
257
+ },
258
+ {
259
+ indexed: true,
260
+ internalType: "address",
261
+ name: "nftContract",
262
+ type: "address"
263
+ },
264
+ {
265
+ indexed: true,
266
+ internalType: "uint256",
267
+ name: "tokenId",
268
+ type: "uint256"
269
+ },
270
+ {
271
+ indexed: false,
272
+ internalType: "address",
273
+ name: "seller",
274
+ type: "address"
275
+ },
276
+ {
277
+ indexed: false,
278
+ internalType: "uint256",
279
+ name: "price",
280
+ type: "uint256"
281
+ },
282
+ {
283
+ indexed: false,
284
+ internalType: "address",
285
+ name: "paymentToken",
286
+ type: "address"
287
+ },
288
+ {
289
+ indexed: false,
290
+ internalType: "uint256",
291
+ name: "expiresAt",
292
+ type: "uint256"
293
+ }
294
+ ],
295
+ name: "Listed",
296
+ type: "event"
297
+ },
298
+ {
299
+ anonymous: false,
300
+ inputs: [
301
+ {
302
+ indexed: true,
303
+ internalType: "uint256",
304
+ name: "listingId",
305
+ type: "uint256"
306
+ }
307
+ ],
308
+ name: "ListingCancelled",
309
+ type: "event"
310
+ },
311
+ {
312
+ anonymous: false,
313
+ inputs: [
314
+ {
315
+ indexed: true,
316
+ internalType: "uint256",
317
+ name: "listingId",
318
+ type: "uint256"
319
+ },
320
+ {
321
+ indexed: false,
322
+ internalType: "uint256",
323
+ name: "newPrice",
324
+ type: "uint256"
325
+ }
326
+ ],
327
+ name: "ListingUpdated",
328
+ type: "event"
329
+ },
330
+ {
331
+ anonymous: false,
332
+ inputs: [
333
+ {
334
+ indexed: true,
335
+ internalType: "address",
336
+ name: "previousOwner",
337
+ type: "address"
338
+ },
339
+ {
340
+ indexed: true,
341
+ internalType: "address",
342
+ name: "newOwner",
343
+ type: "address"
344
+ }
345
+ ],
346
+ name: "OwnershipTransferred",
347
+ type: "event"
348
+ },
349
+ {
350
+ anonymous: false,
351
+ inputs: [
352
+ {
353
+ indexed: false,
354
+ internalType: "address",
355
+ name: "account",
356
+ type: "address"
357
+ }
358
+ ],
359
+ name: "Paused",
360
+ type: "event"
361
+ },
362
+ {
363
+ anonymous: false,
364
+ inputs: [
365
+ {
366
+ indexed: true,
367
+ internalType: "address",
368
+ name: "token",
369
+ type: "address"
370
+ },
371
+ {
372
+ indexed: false,
373
+ internalType: "bool",
374
+ name: "supported",
375
+ type: "bool"
376
+ }
377
+ ],
378
+ name: "PaymentTokenUpdated",
379
+ type: "event"
380
+ },
381
+ {
382
+ anonymous: false,
383
+ inputs: [
384
+ {
385
+ indexed: true,
386
+ internalType: "uint256",
387
+ name: "listingId",
388
+ type: "uint256"
389
+ },
390
+ {
391
+ indexed: true,
392
+ internalType: "address",
393
+ name: "buyer",
394
+ type: "address"
395
+ },
396
+ {
397
+ indexed: false,
398
+ internalType: "uint256",
399
+ name: "price",
400
+ type: "uint256"
401
+ },
402
+ {
403
+ indexed: false,
404
+ internalType: "uint256",
405
+ name: "royaltyAmount",
406
+ type: "uint256"
407
+ },
408
+ {
409
+ indexed: false,
410
+ internalType: "uint256",
411
+ name: "platformFee",
412
+ type: "uint256"
413
+ }
414
+ ],
415
+ name: "Sale",
416
+ type: "event"
417
+ },
418
+ {
419
+ anonymous: false,
420
+ inputs: [
421
+ {
422
+ indexed: false,
423
+ internalType: "address",
424
+ name: "account",
425
+ type: "address"
426
+ }
427
+ ],
428
+ name: "Unpaused",
429
+ type: "event"
430
+ },
431
+ {
432
+ inputs: [
433
+ {
434
+ internalType: "uint256",
435
+ name: "listingId",
436
+ type: "uint256"
437
+ }
438
+ ],
439
+ name: "buyItem",
440
+ outputs: [],
441
+ stateMutability: "payable",
442
+ type: "function"
443
+ },
444
+ {
445
+ inputs: [
446
+ {
447
+ internalType: "uint256",
448
+ name: "listingId",
449
+ type: "uint256"
450
+ }
451
+ ],
452
+ name: "cancelListing",
453
+ outputs: [],
454
+ stateMutability: "nonpayable",
455
+ type: "function"
456
+ },
457
+ {
458
+ inputs: [
459
+ {
460
+ internalType: "uint256",
461
+ name: "listingId",
462
+ type: "uint256"
463
+ }
464
+ ],
465
+ name: "getListing",
466
+ outputs: [
467
+ {
468
+ components: [
469
+ {
470
+ internalType: "uint256",
471
+ name: "listingId",
472
+ type: "uint256"
473
+ },
474
+ {
475
+ internalType: "address",
476
+ name: "nftContract",
477
+ type: "address"
478
+ },
479
+ {
480
+ internalType: "uint256",
481
+ name: "tokenId",
482
+ type: "uint256"
483
+ },
484
+ {
485
+ internalType: "address",
486
+ name: "seller",
487
+ type: "address"
488
+ },
489
+ {
490
+ internalType: "uint256",
491
+ name: "price",
492
+ type: "uint256"
493
+ },
494
+ {
495
+ internalType: "address",
496
+ name: "paymentToken",
497
+ type: "address"
498
+ },
499
+ {
500
+ internalType: "uint256",
501
+ name: "expiresAt",
502
+ type: "uint256"
503
+ },
504
+ {
505
+ internalType: "bool",
506
+ name: "isActive",
507
+ type: "bool"
508
+ }
509
+ ],
510
+ internalType: "struct ZubariMarket.Listing",
511
+ name: "",
512
+ type: "tuple"
513
+ }
514
+ ],
515
+ stateMutability: "view",
516
+ type: "function"
517
+ },
518
+ {
519
+ inputs: [
520
+ {
521
+ internalType: "uint256",
522
+ name: "listingId",
523
+ type: "uint256"
524
+ }
525
+ ],
526
+ name: "isListingValid",
527
+ outputs: [
528
+ {
529
+ internalType: "bool",
530
+ name: "",
531
+ type: "bool"
532
+ }
533
+ ],
534
+ stateMutability: "view",
535
+ type: "function"
536
+ },
537
+ {
538
+ inputs: [
539
+ {
540
+ internalType: "address",
541
+ name: "nftContract",
542
+ type: "address"
543
+ },
544
+ {
545
+ internalType: "uint256",
546
+ name: "tokenId",
547
+ type: "uint256"
548
+ },
549
+ {
550
+ internalType: "uint256",
551
+ name: "price",
552
+ type: "uint256"
553
+ },
554
+ {
555
+ internalType: "address",
556
+ name: "paymentToken",
557
+ type: "address"
558
+ },
559
+ {
560
+ internalType: "uint256",
561
+ name: "duration",
562
+ type: "uint256"
563
+ }
564
+ ],
565
+ name: "listItem",
566
+ outputs: [
567
+ {
568
+ internalType: "uint256",
569
+ name: "",
570
+ type: "uint256"
571
+ }
572
+ ],
573
+ stateMutability: "nonpayable",
574
+ type: "function"
575
+ },
576
+ {
577
+ inputs: [],
578
+ name: "listingCounter",
579
+ outputs: [
580
+ {
581
+ internalType: "uint256",
582
+ name: "",
583
+ type: "uint256"
584
+ }
585
+ ],
586
+ stateMutability: "view",
587
+ type: "function"
588
+ },
589
+ {
590
+ inputs: [
591
+ {
592
+ internalType: "uint256",
593
+ name: "",
594
+ type: "uint256"
595
+ }
596
+ ],
597
+ name: "listings",
598
+ outputs: [
599
+ {
600
+ internalType: "uint256",
601
+ name: "listingId",
602
+ type: "uint256"
603
+ },
604
+ {
605
+ internalType: "address",
606
+ name: "nftContract",
607
+ type: "address"
608
+ },
609
+ {
610
+ internalType: "uint256",
611
+ name: "tokenId",
612
+ type: "uint256"
613
+ },
614
+ {
615
+ internalType: "address",
616
+ name: "seller",
617
+ type: "address"
618
+ },
619
+ {
620
+ internalType: "uint256",
621
+ name: "price",
622
+ type: "uint256"
623
+ },
624
+ {
625
+ internalType: "address",
626
+ name: "paymentToken",
627
+ type: "address"
628
+ },
629
+ {
630
+ internalType: "uint256",
631
+ name: "expiresAt",
632
+ type: "uint256"
633
+ },
634
+ {
635
+ internalType: "bool",
636
+ name: "isActive",
637
+ type: "bool"
638
+ }
639
+ ],
640
+ stateMutability: "view",
641
+ type: "function"
642
+ },
643
+ {
644
+ inputs: [],
645
+ name: "owner",
646
+ outputs: [
647
+ {
648
+ internalType: "address",
649
+ name: "",
650
+ type: "address"
651
+ }
652
+ ],
653
+ stateMutability: "view",
654
+ type: "function"
655
+ },
656
+ {
657
+ inputs: [],
658
+ name: "pause",
659
+ outputs: [],
660
+ stateMutability: "nonpayable",
661
+ type: "function"
662
+ },
663
+ {
664
+ inputs: [],
665
+ name: "paused",
666
+ outputs: [
667
+ {
668
+ internalType: "bool",
669
+ name: "",
670
+ type: "bool"
671
+ }
672
+ ],
673
+ stateMutability: "view",
674
+ type: "function"
675
+ },
676
+ {
677
+ inputs: [],
678
+ name: "platformFeeBps",
679
+ outputs: [
680
+ {
681
+ internalType: "uint256",
682
+ name: "",
683
+ type: "uint256"
684
+ }
685
+ ],
686
+ stateMutability: "view",
687
+ type: "function"
688
+ },
689
+ {
690
+ inputs: [],
691
+ name: "renounceOwnership",
692
+ outputs: [],
693
+ stateMutability: "nonpayable",
694
+ type: "function"
695
+ },
696
+ {
697
+ inputs: [
698
+ {
699
+ internalType: "uint256",
700
+ name: "_feeBps",
701
+ type: "uint256"
702
+ }
703
+ ],
704
+ name: "setPlatformFee",
705
+ outputs: [],
706
+ stateMutability: "nonpayable",
707
+ type: "function"
708
+ },
709
+ {
710
+ inputs: [
711
+ {
712
+ internalType: "address",
713
+ name: "token",
714
+ type: "address"
715
+ },
716
+ {
717
+ internalType: "bool",
718
+ name: "supported",
719
+ type: "bool"
720
+ }
721
+ ],
722
+ name: "setSupportedToken",
723
+ outputs: [],
724
+ stateMutability: "nonpayable",
725
+ type: "function"
726
+ },
727
+ {
728
+ inputs: [
729
+ {
730
+ internalType: "address",
731
+ name: "_treasury",
732
+ type: "address"
733
+ }
734
+ ],
735
+ name: "setTreasury",
736
+ outputs: [],
737
+ stateMutability: "nonpayable",
738
+ type: "function"
739
+ },
740
+ {
741
+ inputs: [
742
+ {
743
+ internalType: "address",
744
+ name: "",
745
+ type: "address"
746
+ }
747
+ ],
748
+ name: "supportedTokens",
749
+ outputs: [
750
+ {
751
+ internalType: "bool",
752
+ name: "",
753
+ type: "bool"
754
+ }
755
+ ],
756
+ stateMutability: "view",
757
+ type: "function"
758
+ },
759
+ {
760
+ inputs: [
761
+ {
762
+ internalType: "address",
763
+ name: "",
764
+ type: "address"
765
+ },
766
+ {
767
+ internalType: "uint256",
768
+ name: "",
769
+ type: "uint256"
770
+ }
771
+ ],
772
+ name: "tokenListings",
773
+ outputs: [
774
+ {
775
+ internalType: "uint256",
776
+ name: "",
777
+ type: "uint256"
778
+ }
779
+ ],
780
+ stateMutability: "view",
781
+ type: "function"
782
+ },
783
+ {
784
+ inputs: [
785
+ {
786
+ internalType: "address",
787
+ name: "newOwner",
788
+ type: "address"
789
+ }
790
+ ],
791
+ name: "transferOwnership",
792
+ outputs: [],
793
+ stateMutability: "nonpayable",
794
+ type: "function"
795
+ },
796
+ {
797
+ inputs: [],
798
+ name: "treasury",
799
+ outputs: [
800
+ {
801
+ internalType: "address",
802
+ name: "",
803
+ type: "address"
804
+ }
805
+ ],
806
+ stateMutability: "view",
807
+ type: "function"
808
+ },
809
+ {
810
+ inputs: [],
811
+ name: "unpause",
812
+ outputs: [],
813
+ stateMutability: "nonpayable",
814
+ type: "function"
815
+ },
816
+ {
817
+ inputs: [
818
+ {
819
+ internalType: "uint256",
820
+ name: "listingId",
821
+ type: "uint256"
822
+ },
823
+ {
824
+ internalType: "uint256",
825
+ name: "newPrice",
826
+ type: "uint256"
827
+ }
828
+ ],
829
+ name: "updatePrice",
830
+ outputs: [],
831
+ stateMutability: "nonpayable",
832
+ type: "function"
833
+ }
834
+ ];
835
+
836
+ // src/protocols/MarketProtocol.ts
837
+ var ZubariMarketProtocol = class {
838
+ contractAddress;
839
+ chainId;
840
+ abi = ZubariMarket_default;
841
+ constructor(contractAddress, chainId) {
842
+ this.contractAddress = contractAddress;
843
+ this.chainId = chainId;
844
+ }
845
+ /**
846
+ * Get the contract ABI
847
+ */
848
+ getAbi() {
849
+ return this.abi;
850
+ }
851
+ /**
852
+ * Get the contract address
853
+ */
854
+ getAddress() {
855
+ return this.contractAddress;
856
+ }
857
+ /**
858
+ * List an NFT for sale
859
+ * @param params Listing parameters
860
+ * @param signer Wallet signer with sendTransaction method
861
+ */
862
+ async listItem(params, signer) {
863
+ if (params.price <= 0n) {
864
+ throw new Error("Price must be greater than 0");
865
+ }
866
+ if (params.duration <= 0) {
867
+ throw new Error("Duration must be greater than 0");
868
+ }
869
+ const iface = new (await import('ethers')).Interface(this.abi);
870
+ const data = iface.encodeFunctionData("listItem", [
871
+ params.nftContract,
872
+ params.tokenId,
873
+ params.price,
874
+ params.paymentToken,
875
+ params.duration
876
+ ]);
877
+ const result = await signer.sendTransaction({
878
+ to: this.contractAddress,
879
+ value: 0n,
880
+ data
881
+ });
882
+ return {
883
+ hash: result.hash,
884
+ network: "ethereum",
885
+ status: "pending"
886
+ };
887
+ }
888
+ /**
889
+ * Buy an NFT from a listing
890
+ * @param params Buy parameters
891
+ * @param signer Wallet signer
892
+ */
893
+ async buyItem(params, signer) {
894
+ const iface = new (await import('ethers')).Interface(this.abi);
895
+ const data = iface.encodeFunctionData("buyItem", [params.listingId]);
896
+ const isEthPayment = params.paymentToken === "0x0000000000000000000000000000000000000000";
897
+ const result = await signer.sendTransaction({
898
+ to: this.contractAddress,
899
+ value: isEthPayment ? params.price : 0n,
900
+ data
901
+ });
902
+ return {
903
+ hash: result.hash,
904
+ network: "ethereum",
905
+ status: "pending"
906
+ };
907
+ }
908
+ /**
909
+ * Cancel a listing
910
+ * @param listingId The listing ID to cancel
911
+ * @param signer Wallet signer
912
+ */
913
+ async cancelListing(listingId, signer) {
914
+ const iface = new (await import('ethers')).Interface(this.abi);
915
+ const data = iface.encodeFunctionData("cancelListing", [listingId]);
916
+ const result = await signer.sendTransaction({
917
+ to: this.contractAddress,
918
+ value: 0n,
919
+ data
920
+ });
921
+ return {
922
+ hash: result.hash,
923
+ network: "ethereum",
924
+ status: "pending"
925
+ };
926
+ }
927
+ /**
928
+ * Update listing price
929
+ * @param listingId The listing ID
930
+ * @param newPrice New price
931
+ * @param signer Wallet signer
932
+ */
933
+ async updatePrice(listingId, newPrice, signer) {
934
+ if (newPrice <= 0n) {
935
+ throw new Error("Price must be greater than 0");
936
+ }
937
+ const iface = new (await import('ethers')).Interface(this.abi);
938
+ const data = iface.encodeFunctionData("updatePrice", [listingId, newPrice]);
939
+ const result = await signer.sendTransaction({
940
+ to: this.contractAddress,
941
+ value: 0n,
942
+ data
943
+ });
944
+ return {
945
+ hash: result.hash,
946
+ network: "ethereum",
947
+ status: "pending"
948
+ };
949
+ }
950
+ /**
951
+ * Get listing details
952
+ * @param listingId The listing ID
953
+ * @param provider JSON-RPC provider
954
+ */
955
+ async getListing(listingId, provider) {
956
+ const iface = new (await import('ethers')).Interface(this.abi);
957
+ const data = iface.encodeFunctionData("getListing", [listingId]);
958
+ try {
959
+ const result = await provider.call({
960
+ to: this.contractAddress,
961
+ data
962
+ });
963
+ const decoded = iface.decodeFunctionResult("getListing", result);
964
+ const listing = decoded[0];
965
+ return {
966
+ listingId,
967
+ nftContract: listing.nftContract,
968
+ tokenId: listing.tokenId.toString(),
969
+ seller: listing.seller,
970
+ price: listing.price,
971
+ paymentToken: listing.paymentToken,
972
+ expiresAt: Number(listing.expiresAt),
973
+ isActive: listing.isActive
974
+ };
975
+ } catch {
976
+ return null;
977
+ }
978
+ }
979
+ /**
980
+ * Check if a payment token is supported
981
+ * @param token Token address
982
+ * @param provider JSON-RPC provider
983
+ */
984
+ async isTokenSupported(token, provider) {
985
+ const iface = new (await import('ethers')).Interface(this.abi);
986
+ const data = iface.encodeFunctionData("supportedTokens", [token]);
987
+ try {
988
+ const result = await provider.call({
989
+ to: this.contractAddress,
990
+ data
991
+ });
992
+ const decoded = iface.decodeFunctionResult("supportedTokens", result);
993
+ return decoded[0];
994
+ } catch {
995
+ return false;
996
+ }
997
+ }
998
+ /**
999
+ * Calculate platform fee for a given price
1000
+ * @param price The sale price
1001
+ */
1002
+ calculateFee(price) {
1003
+ const fee = price * BigInt(PLATFORM_CONFIG.tipFeeBps) / 10000n;
1004
+ return {
1005
+ fee,
1006
+ sellerAmount: price - fee
1007
+ };
1008
+ }
1009
+ };
1010
+
123
1011
  // src/protocols/TipsProtocol.ts
124
1012
  var ZubariTipsProtocol = class {
125
1013
  contractAddress;
@@ -407,6 +1295,7 @@ var ZubariPayoutsProtocol = class {
407
1295
  }
408
1296
  };
409
1297
 
1298
+ exports.ZubariMarketProtocol = ZubariMarketProtocol;
410
1299
  exports.ZubariNFTProtocol = ZubariNFTProtocol;
411
1300
  exports.ZubariPayoutsProtocol = ZubariPayoutsProtocol;
412
1301
  exports.ZubariSubscriptionProtocol = ZubariSubscriptionProtocol;