@zubari/sdk 0.1.27 → 0.1.29

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.
package/dist/index.js CHANGED
@@ -2406,6 +2406,894 @@ var ZubariNFTProtocol = class {
2406
2406
  }
2407
2407
  };
2408
2408
 
2409
+ // src/abi/ZubariMarket.json
2410
+ var ZubariMarket_default = [
2411
+ {
2412
+ inputs: [
2413
+ {
2414
+ internalType: "address",
2415
+ name: "_treasury",
2416
+ type: "address"
2417
+ },
2418
+ {
2419
+ internalType: "uint256",
2420
+ name: "_platformFeeBps",
2421
+ type: "uint256"
2422
+ }
2423
+ ],
2424
+ stateMutability: "nonpayable",
2425
+ type: "constructor"
2426
+ },
2427
+ {
2428
+ inputs: [],
2429
+ name: "EnforcedPause",
2430
+ type: "error"
2431
+ },
2432
+ {
2433
+ inputs: [],
2434
+ name: "ExpectedPause",
2435
+ type: "error"
2436
+ },
2437
+ {
2438
+ inputs: [],
2439
+ name: "InsufficientPayment",
2440
+ type: "error"
2441
+ },
2442
+ {
2443
+ inputs: [],
2444
+ name: "InvalidAddress",
2445
+ type: "error"
2446
+ },
2447
+ {
2448
+ inputs: [],
2449
+ name: "InvalidDuration",
2450
+ type: "error"
2451
+ },
2452
+ {
2453
+ inputs: [],
2454
+ name: "InvalidFee",
2455
+ type: "error"
2456
+ },
2457
+ {
2458
+ inputs: [],
2459
+ name: "InvalidPrice",
2460
+ type: "error"
2461
+ },
2462
+ {
2463
+ inputs: [],
2464
+ name: "ListingExpired",
2465
+ type: "error"
2466
+ },
2467
+ {
2468
+ inputs: [],
2469
+ name: "ListingNotActive",
2470
+ type: "error"
2471
+ },
2472
+ {
2473
+ inputs: [],
2474
+ name: "NotApproved",
2475
+ type: "error"
2476
+ },
2477
+ {
2478
+ inputs: [],
2479
+ name: "NotSeller",
2480
+ type: "error"
2481
+ },
2482
+ {
2483
+ inputs: [],
2484
+ name: "NotTokenOwner",
2485
+ type: "error"
2486
+ },
2487
+ {
2488
+ inputs: [
2489
+ {
2490
+ internalType: "address",
2491
+ name: "owner",
2492
+ type: "address"
2493
+ }
2494
+ ],
2495
+ name: "OwnableInvalidOwner",
2496
+ type: "error"
2497
+ },
2498
+ {
2499
+ inputs: [
2500
+ {
2501
+ internalType: "address",
2502
+ name: "account",
2503
+ type: "address"
2504
+ }
2505
+ ],
2506
+ name: "OwnableUnauthorizedAccount",
2507
+ type: "error"
2508
+ },
2509
+ {
2510
+ inputs: [],
2511
+ name: "ReentrancyGuardReentrantCall",
2512
+ type: "error"
2513
+ },
2514
+ {
2515
+ inputs: [
2516
+ {
2517
+ internalType: "address",
2518
+ name: "token",
2519
+ type: "address"
2520
+ }
2521
+ ],
2522
+ name: "SafeERC20FailedOperation",
2523
+ type: "error"
2524
+ },
2525
+ {
2526
+ inputs: [],
2527
+ name: "TransferFailed",
2528
+ type: "error"
2529
+ },
2530
+ {
2531
+ inputs: [],
2532
+ name: "UnsupportedPaymentToken",
2533
+ type: "error"
2534
+ },
2535
+ {
2536
+ anonymous: false,
2537
+ inputs: [
2538
+ {
2539
+ indexed: true,
2540
+ internalType: "uint256",
2541
+ name: "listingId",
2542
+ type: "uint256"
2543
+ },
2544
+ {
2545
+ indexed: true,
2546
+ internalType: "address",
2547
+ name: "nftContract",
2548
+ type: "address"
2549
+ },
2550
+ {
2551
+ indexed: true,
2552
+ internalType: "uint256",
2553
+ name: "tokenId",
2554
+ type: "uint256"
2555
+ },
2556
+ {
2557
+ indexed: false,
2558
+ internalType: "address",
2559
+ name: "seller",
2560
+ type: "address"
2561
+ },
2562
+ {
2563
+ indexed: false,
2564
+ internalType: "uint256",
2565
+ name: "price",
2566
+ type: "uint256"
2567
+ },
2568
+ {
2569
+ indexed: false,
2570
+ internalType: "address",
2571
+ name: "paymentToken",
2572
+ type: "address"
2573
+ },
2574
+ {
2575
+ indexed: false,
2576
+ internalType: "uint256",
2577
+ name: "expiresAt",
2578
+ type: "uint256"
2579
+ }
2580
+ ],
2581
+ name: "Listed",
2582
+ type: "event"
2583
+ },
2584
+ {
2585
+ anonymous: false,
2586
+ inputs: [
2587
+ {
2588
+ indexed: true,
2589
+ internalType: "uint256",
2590
+ name: "listingId",
2591
+ type: "uint256"
2592
+ }
2593
+ ],
2594
+ name: "ListingCancelled",
2595
+ type: "event"
2596
+ },
2597
+ {
2598
+ anonymous: false,
2599
+ inputs: [
2600
+ {
2601
+ indexed: true,
2602
+ internalType: "uint256",
2603
+ name: "listingId",
2604
+ type: "uint256"
2605
+ },
2606
+ {
2607
+ indexed: false,
2608
+ internalType: "uint256",
2609
+ name: "newPrice",
2610
+ type: "uint256"
2611
+ }
2612
+ ],
2613
+ name: "ListingUpdated",
2614
+ type: "event"
2615
+ },
2616
+ {
2617
+ anonymous: false,
2618
+ inputs: [
2619
+ {
2620
+ indexed: true,
2621
+ internalType: "address",
2622
+ name: "previousOwner",
2623
+ type: "address"
2624
+ },
2625
+ {
2626
+ indexed: true,
2627
+ internalType: "address",
2628
+ name: "newOwner",
2629
+ type: "address"
2630
+ }
2631
+ ],
2632
+ name: "OwnershipTransferred",
2633
+ type: "event"
2634
+ },
2635
+ {
2636
+ anonymous: false,
2637
+ inputs: [
2638
+ {
2639
+ indexed: false,
2640
+ internalType: "address",
2641
+ name: "account",
2642
+ type: "address"
2643
+ }
2644
+ ],
2645
+ name: "Paused",
2646
+ type: "event"
2647
+ },
2648
+ {
2649
+ anonymous: false,
2650
+ inputs: [
2651
+ {
2652
+ indexed: true,
2653
+ internalType: "address",
2654
+ name: "token",
2655
+ type: "address"
2656
+ },
2657
+ {
2658
+ indexed: false,
2659
+ internalType: "bool",
2660
+ name: "supported",
2661
+ type: "bool"
2662
+ }
2663
+ ],
2664
+ name: "PaymentTokenUpdated",
2665
+ type: "event"
2666
+ },
2667
+ {
2668
+ anonymous: false,
2669
+ inputs: [
2670
+ {
2671
+ indexed: true,
2672
+ internalType: "uint256",
2673
+ name: "listingId",
2674
+ type: "uint256"
2675
+ },
2676
+ {
2677
+ indexed: true,
2678
+ internalType: "address",
2679
+ name: "buyer",
2680
+ type: "address"
2681
+ },
2682
+ {
2683
+ indexed: false,
2684
+ internalType: "uint256",
2685
+ name: "price",
2686
+ type: "uint256"
2687
+ },
2688
+ {
2689
+ indexed: false,
2690
+ internalType: "uint256",
2691
+ name: "royaltyAmount",
2692
+ type: "uint256"
2693
+ },
2694
+ {
2695
+ indexed: false,
2696
+ internalType: "uint256",
2697
+ name: "platformFee",
2698
+ type: "uint256"
2699
+ }
2700
+ ],
2701
+ name: "Sale",
2702
+ type: "event"
2703
+ },
2704
+ {
2705
+ anonymous: false,
2706
+ inputs: [
2707
+ {
2708
+ indexed: false,
2709
+ internalType: "address",
2710
+ name: "account",
2711
+ type: "address"
2712
+ }
2713
+ ],
2714
+ name: "Unpaused",
2715
+ type: "event"
2716
+ },
2717
+ {
2718
+ inputs: [
2719
+ {
2720
+ internalType: "uint256",
2721
+ name: "listingId",
2722
+ type: "uint256"
2723
+ }
2724
+ ],
2725
+ name: "buyItem",
2726
+ outputs: [],
2727
+ stateMutability: "payable",
2728
+ type: "function"
2729
+ },
2730
+ {
2731
+ inputs: [
2732
+ {
2733
+ internalType: "uint256",
2734
+ name: "listingId",
2735
+ type: "uint256"
2736
+ }
2737
+ ],
2738
+ name: "cancelListing",
2739
+ outputs: [],
2740
+ stateMutability: "nonpayable",
2741
+ type: "function"
2742
+ },
2743
+ {
2744
+ inputs: [
2745
+ {
2746
+ internalType: "uint256",
2747
+ name: "listingId",
2748
+ type: "uint256"
2749
+ }
2750
+ ],
2751
+ name: "getListing",
2752
+ outputs: [
2753
+ {
2754
+ components: [
2755
+ {
2756
+ internalType: "uint256",
2757
+ name: "listingId",
2758
+ type: "uint256"
2759
+ },
2760
+ {
2761
+ internalType: "address",
2762
+ name: "nftContract",
2763
+ type: "address"
2764
+ },
2765
+ {
2766
+ internalType: "uint256",
2767
+ name: "tokenId",
2768
+ type: "uint256"
2769
+ },
2770
+ {
2771
+ internalType: "address",
2772
+ name: "seller",
2773
+ type: "address"
2774
+ },
2775
+ {
2776
+ internalType: "uint256",
2777
+ name: "price",
2778
+ type: "uint256"
2779
+ },
2780
+ {
2781
+ internalType: "address",
2782
+ name: "paymentToken",
2783
+ type: "address"
2784
+ },
2785
+ {
2786
+ internalType: "uint256",
2787
+ name: "expiresAt",
2788
+ type: "uint256"
2789
+ },
2790
+ {
2791
+ internalType: "bool",
2792
+ name: "isActive",
2793
+ type: "bool"
2794
+ }
2795
+ ],
2796
+ internalType: "struct ZubariMarket.Listing",
2797
+ name: "",
2798
+ type: "tuple"
2799
+ }
2800
+ ],
2801
+ stateMutability: "view",
2802
+ type: "function"
2803
+ },
2804
+ {
2805
+ inputs: [
2806
+ {
2807
+ internalType: "uint256",
2808
+ name: "listingId",
2809
+ type: "uint256"
2810
+ }
2811
+ ],
2812
+ name: "isListingValid",
2813
+ outputs: [
2814
+ {
2815
+ internalType: "bool",
2816
+ name: "",
2817
+ type: "bool"
2818
+ }
2819
+ ],
2820
+ stateMutability: "view",
2821
+ type: "function"
2822
+ },
2823
+ {
2824
+ inputs: [
2825
+ {
2826
+ internalType: "address",
2827
+ name: "nftContract",
2828
+ type: "address"
2829
+ },
2830
+ {
2831
+ internalType: "uint256",
2832
+ name: "tokenId",
2833
+ type: "uint256"
2834
+ },
2835
+ {
2836
+ internalType: "uint256",
2837
+ name: "price",
2838
+ type: "uint256"
2839
+ },
2840
+ {
2841
+ internalType: "address",
2842
+ name: "paymentToken",
2843
+ type: "address"
2844
+ },
2845
+ {
2846
+ internalType: "uint256",
2847
+ name: "duration",
2848
+ type: "uint256"
2849
+ }
2850
+ ],
2851
+ name: "listItem",
2852
+ outputs: [
2853
+ {
2854
+ internalType: "uint256",
2855
+ name: "",
2856
+ type: "uint256"
2857
+ }
2858
+ ],
2859
+ stateMutability: "nonpayable",
2860
+ type: "function"
2861
+ },
2862
+ {
2863
+ inputs: [],
2864
+ name: "listingCounter",
2865
+ outputs: [
2866
+ {
2867
+ internalType: "uint256",
2868
+ name: "",
2869
+ type: "uint256"
2870
+ }
2871
+ ],
2872
+ stateMutability: "view",
2873
+ type: "function"
2874
+ },
2875
+ {
2876
+ inputs: [
2877
+ {
2878
+ internalType: "uint256",
2879
+ name: "",
2880
+ type: "uint256"
2881
+ }
2882
+ ],
2883
+ name: "listings",
2884
+ outputs: [
2885
+ {
2886
+ internalType: "uint256",
2887
+ name: "listingId",
2888
+ type: "uint256"
2889
+ },
2890
+ {
2891
+ internalType: "address",
2892
+ name: "nftContract",
2893
+ type: "address"
2894
+ },
2895
+ {
2896
+ internalType: "uint256",
2897
+ name: "tokenId",
2898
+ type: "uint256"
2899
+ },
2900
+ {
2901
+ internalType: "address",
2902
+ name: "seller",
2903
+ type: "address"
2904
+ },
2905
+ {
2906
+ internalType: "uint256",
2907
+ name: "price",
2908
+ type: "uint256"
2909
+ },
2910
+ {
2911
+ internalType: "address",
2912
+ name: "paymentToken",
2913
+ type: "address"
2914
+ },
2915
+ {
2916
+ internalType: "uint256",
2917
+ name: "expiresAt",
2918
+ type: "uint256"
2919
+ },
2920
+ {
2921
+ internalType: "bool",
2922
+ name: "isActive",
2923
+ type: "bool"
2924
+ }
2925
+ ],
2926
+ stateMutability: "view",
2927
+ type: "function"
2928
+ },
2929
+ {
2930
+ inputs: [],
2931
+ name: "owner",
2932
+ outputs: [
2933
+ {
2934
+ internalType: "address",
2935
+ name: "",
2936
+ type: "address"
2937
+ }
2938
+ ],
2939
+ stateMutability: "view",
2940
+ type: "function"
2941
+ },
2942
+ {
2943
+ inputs: [],
2944
+ name: "pause",
2945
+ outputs: [],
2946
+ stateMutability: "nonpayable",
2947
+ type: "function"
2948
+ },
2949
+ {
2950
+ inputs: [],
2951
+ name: "paused",
2952
+ outputs: [
2953
+ {
2954
+ internalType: "bool",
2955
+ name: "",
2956
+ type: "bool"
2957
+ }
2958
+ ],
2959
+ stateMutability: "view",
2960
+ type: "function"
2961
+ },
2962
+ {
2963
+ inputs: [],
2964
+ name: "platformFeeBps",
2965
+ outputs: [
2966
+ {
2967
+ internalType: "uint256",
2968
+ name: "",
2969
+ type: "uint256"
2970
+ }
2971
+ ],
2972
+ stateMutability: "view",
2973
+ type: "function"
2974
+ },
2975
+ {
2976
+ inputs: [],
2977
+ name: "renounceOwnership",
2978
+ outputs: [],
2979
+ stateMutability: "nonpayable",
2980
+ type: "function"
2981
+ },
2982
+ {
2983
+ inputs: [
2984
+ {
2985
+ internalType: "uint256",
2986
+ name: "_feeBps",
2987
+ type: "uint256"
2988
+ }
2989
+ ],
2990
+ name: "setPlatformFee",
2991
+ outputs: [],
2992
+ stateMutability: "nonpayable",
2993
+ type: "function"
2994
+ },
2995
+ {
2996
+ inputs: [
2997
+ {
2998
+ internalType: "address",
2999
+ name: "token",
3000
+ type: "address"
3001
+ },
3002
+ {
3003
+ internalType: "bool",
3004
+ name: "supported",
3005
+ type: "bool"
3006
+ }
3007
+ ],
3008
+ name: "setSupportedToken",
3009
+ outputs: [],
3010
+ stateMutability: "nonpayable",
3011
+ type: "function"
3012
+ },
3013
+ {
3014
+ inputs: [
3015
+ {
3016
+ internalType: "address",
3017
+ name: "_treasury",
3018
+ type: "address"
3019
+ }
3020
+ ],
3021
+ name: "setTreasury",
3022
+ outputs: [],
3023
+ stateMutability: "nonpayable",
3024
+ type: "function"
3025
+ },
3026
+ {
3027
+ inputs: [
3028
+ {
3029
+ internalType: "address",
3030
+ name: "",
3031
+ type: "address"
3032
+ }
3033
+ ],
3034
+ name: "supportedTokens",
3035
+ outputs: [
3036
+ {
3037
+ internalType: "bool",
3038
+ name: "",
3039
+ type: "bool"
3040
+ }
3041
+ ],
3042
+ stateMutability: "view",
3043
+ type: "function"
3044
+ },
3045
+ {
3046
+ inputs: [
3047
+ {
3048
+ internalType: "address",
3049
+ name: "",
3050
+ type: "address"
3051
+ },
3052
+ {
3053
+ internalType: "uint256",
3054
+ name: "",
3055
+ type: "uint256"
3056
+ }
3057
+ ],
3058
+ name: "tokenListings",
3059
+ outputs: [
3060
+ {
3061
+ internalType: "uint256",
3062
+ name: "",
3063
+ type: "uint256"
3064
+ }
3065
+ ],
3066
+ stateMutability: "view",
3067
+ type: "function"
3068
+ },
3069
+ {
3070
+ inputs: [
3071
+ {
3072
+ internalType: "address",
3073
+ name: "newOwner",
3074
+ type: "address"
3075
+ }
3076
+ ],
3077
+ name: "transferOwnership",
3078
+ outputs: [],
3079
+ stateMutability: "nonpayable",
3080
+ type: "function"
3081
+ },
3082
+ {
3083
+ inputs: [],
3084
+ name: "treasury",
3085
+ outputs: [
3086
+ {
3087
+ internalType: "address",
3088
+ name: "",
3089
+ type: "address"
3090
+ }
3091
+ ],
3092
+ stateMutability: "view",
3093
+ type: "function"
3094
+ },
3095
+ {
3096
+ inputs: [],
3097
+ name: "unpause",
3098
+ outputs: [],
3099
+ stateMutability: "nonpayable",
3100
+ type: "function"
3101
+ },
3102
+ {
3103
+ inputs: [
3104
+ {
3105
+ internalType: "uint256",
3106
+ name: "listingId",
3107
+ type: "uint256"
3108
+ },
3109
+ {
3110
+ internalType: "uint256",
3111
+ name: "newPrice",
3112
+ type: "uint256"
3113
+ }
3114
+ ],
3115
+ name: "updatePrice",
3116
+ outputs: [],
3117
+ stateMutability: "nonpayable",
3118
+ type: "function"
3119
+ }
3120
+ ];
3121
+
3122
+ // src/protocols/MarketProtocol.ts
3123
+ var ZubariMarketProtocol = class {
3124
+ contractAddress;
3125
+ chainId;
3126
+ abi = ZubariMarket_default;
3127
+ constructor(contractAddress, chainId) {
3128
+ this.contractAddress = contractAddress;
3129
+ this.chainId = chainId;
3130
+ }
3131
+ /**
3132
+ * Get the contract ABI
3133
+ */
3134
+ getAbi() {
3135
+ return this.abi;
3136
+ }
3137
+ /**
3138
+ * Get the contract address
3139
+ */
3140
+ getAddress() {
3141
+ return this.contractAddress;
3142
+ }
3143
+ /**
3144
+ * List an NFT for sale
3145
+ * @param params Listing parameters
3146
+ * @param signer Wallet signer with sendTransaction method
3147
+ */
3148
+ async listItem(params, signer) {
3149
+ if (params.price <= 0n) {
3150
+ throw new Error("Price must be greater than 0");
3151
+ }
3152
+ if (params.duration <= 0) {
3153
+ throw new Error("Duration must be greater than 0");
3154
+ }
3155
+ const iface = new (await import('ethers')).Interface(this.abi);
3156
+ const data = iface.encodeFunctionData("listItem", [
3157
+ params.nftContract,
3158
+ params.tokenId,
3159
+ params.price,
3160
+ params.paymentToken,
3161
+ params.duration
3162
+ ]);
3163
+ const result = await signer.sendTransaction({
3164
+ to: this.contractAddress,
3165
+ value: 0n,
3166
+ data
3167
+ });
3168
+ return {
3169
+ hash: result.hash,
3170
+ network: "ethereum",
3171
+ status: "pending"
3172
+ };
3173
+ }
3174
+ /**
3175
+ * Buy an NFT from a listing
3176
+ * @param params Buy parameters
3177
+ * @param signer Wallet signer
3178
+ */
3179
+ async buyItem(params, signer) {
3180
+ const iface = new (await import('ethers')).Interface(this.abi);
3181
+ const data = iface.encodeFunctionData("buyItem", [params.listingId]);
3182
+ const isEthPayment = params.paymentToken === "0x0000000000000000000000000000000000000000";
3183
+ const result = await signer.sendTransaction({
3184
+ to: this.contractAddress,
3185
+ value: isEthPayment ? params.price : 0n,
3186
+ data
3187
+ });
3188
+ return {
3189
+ hash: result.hash,
3190
+ network: "ethereum",
3191
+ status: "pending"
3192
+ };
3193
+ }
3194
+ /**
3195
+ * Cancel a listing
3196
+ * @param listingId The listing ID to cancel
3197
+ * @param signer Wallet signer
3198
+ */
3199
+ async cancelListing(listingId, signer) {
3200
+ const iface = new (await import('ethers')).Interface(this.abi);
3201
+ const data = iface.encodeFunctionData("cancelListing", [listingId]);
3202
+ const result = await signer.sendTransaction({
3203
+ to: this.contractAddress,
3204
+ value: 0n,
3205
+ data
3206
+ });
3207
+ return {
3208
+ hash: result.hash,
3209
+ network: "ethereum",
3210
+ status: "pending"
3211
+ };
3212
+ }
3213
+ /**
3214
+ * Update listing price
3215
+ * @param listingId The listing ID
3216
+ * @param newPrice New price
3217
+ * @param signer Wallet signer
3218
+ */
3219
+ async updatePrice(listingId, newPrice, signer) {
3220
+ if (newPrice <= 0n) {
3221
+ throw new Error("Price must be greater than 0");
3222
+ }
3223
+ const iface = new (await import('ethers')).Interface(this.abi);
3224
+ const data = iface.encodeFunctionData("updatePrice", [listingId, newPrice]);
3225
+ const result = await signer.sendTransaction({
3226
+ to: this.contractAddress,
3227
+ value: 0n,
3228
+ data
3229
+ });
3230
+ return {
3231
+ hash: result.hash,
3232
+ network: "ethereum",
3233
+ status: "pending"
3234
+ };
3235
+ }
3236
+ /**
3237
+ * Get listing details
3238
+ * @param listingId The listing ID
3239
+ * @param provider JSON-RPC provider
3240
+ */
3241
+ async getListing(listingId, provider) {
3242
+ const iface = new (await import('ethers')).Interface(this.abi);
3243
+ const data = iface.encodeFunctionData("getListing", [listingId]);
3244
+ try {
3245
+ const result = await provider.call({
3246
+ to: this.contractAddress,
3247
+ data
3248
+ });
3249
+ const decoded = iface.decodeFunctionResult("getListing", result);
3250
+ const listing = decoded[0];
3251
+ return {
3252
+ listingId,
3253
+ nftContract: listing.nftContract,
3254
+ tokenId: listing.tokenId.toString(),
3255
+ seller: listing.seller,
3256
+ price: listing.price,
3257
+ paymentToken: listing.paymentToken,
3258
+ expiresAt: Number(listing.expiresAt),
3259
+ isActive: listing.isActive
3260
+ };
3261
+ } catch {
3262
+ return null;
3263
+ }
3264
+ }
3265
+ /**
3266
+ * Check if a payment token is supported
3267
+ * @param token Token address
3268
+ * @param provider JSON-RPC provider
3269
+ */
3270
+ async isTokenSupported(token, provider) {
3271
+ const iface = new (await import('ethers')).Interface(this.abi);
3272
+ const data = iface.encodeFunctionData("supportedTokens", [token]);
3273
+ try {
3274
+ const result = await provider.call({
3275
+ to: this.contractAddress,
3276
+ data
3277
+ });
3278
+ const decoded = iface.decodeFunctionResult("supportedTokens", result);
3279
+ return decoded[0];
3280
+ } catch {
3281
+ return false;
3282
+ }
3283
+ }
3284
+ /**
3285
+ * Calculate platform fee for a given price
3286
+ * @param price The sale price
3287
+ */
3288
+ calculateFee(price) {
3289
+ const fee = price * BigInt(PLATFORM_CONFIG.tipFeeBps) / 10000n;
3290
+ return {
3291
+ fee,
3292
+ sellerAmount: price - fee
3293
+ };
3294
+ }
3295
+ };
3296
+
2409
3297
  // src/protocols/TipsProtocol.ts
2410
3298
  var ZubariTipsProtocol = class {
2411
3299
  contractAddress;
@@ -3503,6 +4391,7 @@ exports.WdkApiClient = WdkApiClient;
3503
4391
  exports.WebEncryptedStorageAdapter = WebEncryptedStorageAdapter;
3504
4392
  exports.ZUBARI_CONTRACTS = ZUBARI_CONTRACTS;
3505
4393
  exports.ZubariError = ZubariError;
4394
+ exports.ZubariMarketProtocol = ZubariMarketProtocol;
3506
4395
  exports.ZubariNFTProtocol = ZubariNFTProtocol;
3507
4396
  exports.ZubariPayoutsProtocol = ZubariPayoutsProtocol;
3508
4397
  exports.ZubariSubscriptionProtocol = ZubariSubscriptionProtocol;