@zubari/sdk 0.1.21 → 0.1.22

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