@zubari/sdk 0.3.2 → 0.3.4

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.
@@ -228,6 +228,7 @@ declare class ZubariMarketProtocol {
228
228
  }): Promise<boolean>;
229
229
  /**
230
230
  * Calculate platform fee for a given price
231
+ * Platform keeps 10%, Creator/Seller receives 90%
231
232
  * @param price The sale price
232
233
  */
233
234
  calculateFee(price: bigint): {
@@ -402,7 +403,8 @@ declare class ZubariTipsProtocol {
402
403
  /**
403
404
  * Calculate platform fee for a given amount
404
405
  * @param amount The tip amount
405
- * @param feeBps Fee in basis points (default: 300 = 3%)
406
+ * @param feeBps Fee in basis points (default: 1000 = 10%)
407
+ * Platform keeps 10%, Creator receives 90%
406
408
  */
407
409
  calculateFee(amount: bigint, feeBps?: number): {
408
410
  fee: bigint;
@@ -617,7 +619,8 @@ declare class ZubariSubscriptionProtocol {
617
619
  /**
618
620
  * Calculate platform fee for a given amount
619
621
  * @param amount The amount
620
- * @param feeBps Fee in basis points
622
+ * @param feeBps Fee in basis points (default: 1000 = 10%)
623
+ * Platform keeps 10%, Creator receives 90%
621
624
  */
622
625
  calculateFee(amount: bigint, feeBps?: number): {
623
626
  fee: bigint;
@@ -228,6 +228,7 @@ declare class ZubariMarketProtocol {
228
228
  }): Promise<boolean>;
229
229
  /**
230
230
  * Calculate platform fee for a given price
231
+ * Platform keeps 10%, Creator/Seller receives 90%
231
232
  * @param price The sale price
232
233
  */
233
234
  calculateFee(price: bigint): {
@@ -402,7 +403,8 @@ declare class ZubariTipsProtocol {
402
403
  /**
403
404
  * Calculate platform fee for a given amount
404
405
  * @param amount The tip amount
405
- * @param feeBps Fee in basis points (default: 300 = 3%)
406
+ * @param feeBps Fee in basis points (default: 1000 = 10%)
407
+ * Platform keeps 10%, Creator receives 90%
406
408
  */
407
409
  calculateFee(amount: bigint, feeBps?: number): {
408
410
  fee: bigint;
@@ -617,7 +619,8 @@ declare class ZubariSubscriptionProtocol {
617
619
  /**
618
620
  * Calculate platform fee for a given amount
619
621
  * @param amount The amount
620
- * @param feeBps Fee in basis points
622
+ * @param feeBps Fee in basis points (default: 1000 = 10%)
623
+ * Platform keeps 10%, Creator receives 90%
621
624
  */
622
625
  calculateFee(amount: bigint, feeBps?: number): {
623
626
  fee: bigint;
@@ -3,8 +3,10 @@
3
3
  // src/config/contracts.ts
4
4
  var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
5
5
  var PLATFORM_CONFIG = {
6
- // Platform fee in basis points (300 = 3%)
7
- tipFeeBps: 300,
6
+ // Platform fee in basis points (1000 = 10%)
7
+ // Zubari keeps 10%, Creator receives 90%
8
+ platformFeeBps: 1e3,
9
+ // Alias for backward compatibility
8
10
  // Maximum royalty in basis points (1000 = 10%)
9
11
  maxRoyaltyBps: 1e3,
10
12
  // Voucher validity in seconds (30 days)
@@ -1891,10 +1893,11 @@ var ZubariMarketProtocol = class {
1891
1893
  }
1892
1894
  /**
1893
1895
  * Calculate platform fee for a given price
1896
+ * Platform keeps 10%, Creator/Seller receives 90%
1894
1897
  * @param price The sale price
1895
1898
  */
1896
1899
  calculateFee(price) {
1897
- const fee = price * BigInt(PLATFORM_CONFIG.tipFeeBps) / 10000n;
1900
+ const fee = price * BigInt(PLATFORM_CONFIG.platformFeeBps) / 10000n;
1898
1901
  return {
1899
1902
  fee,
1900
1903
  sellerAmount: price - fee
@@ -2698,9 +2701,10 @@ var ZubariTipsProtocol = class {
2698
2701
  /**
2699
2702
  * Calculate platform fee for a given amount
2700
2703
  * @param amount The tip amount
2701
- * @param feeBps Fee in basis points (default: 300 = 3%)
2704
+ * @param feeBps Fee in basis points (default: 1000 = 10%)
2705
+ * Platform keeps 10%, Creator receives 90%
2702
2706
  */
2703
- calculateFee(amount, feeBps = 300) {
2707
+ calculateFee(amount, feeBps = 1e3) {
2704
2708
  const fee = amount * BigInt(feeBps) / 10000n;
2705
2709
  return {
2706
2710
  fee,
@@ -3909,9 +3913,10 @@ var ZubariSubscriptionProtocol = class {
3909
3913
  /**
3910
3914
  * Calculate platform fee for a given amount
3911
3915
  * @param amount The amount
3912
- * @param feeBps Fee in basis points
3916
+ * @param feeBps Fee in basis points (default: 1000 = 10%)
3917
+ * Platform keeps 10%, Creator receives 90%
3913
3918
  */
3914
- calculateFee(amount, feeBps = 300) {
3919
+ calculateFee(amount, feeBps = 1e3) {
3915
3920
  const fee = amount * BigInt(feeBps) / 10000n;
3916
3921
  return {
3917
3922
  fee,