@zubari/sdk 0.2.0 → 0.2.1

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.mjs CHANGED
@@ -2383,7 +2383,8 @@ var ZubariNFTProtocol = class {
2383
2383
  */
2384
2384
  async createLazyMintVoucher(params, signer) {
2385
2385
  const { metadata, creatorAddress, price, currency, nonce, watermarking } = params;
2386
- if (metadata.royaltyBps > PLATFORM_CONFIG.maxRoyaltyBps) {
2386
+ const royaltyBps = metadata.royaltyBps ?? 500;
2387
+ if (royaltyBps > PLATFORM_CONFIG.maxRoyaltyBps) {
2387
2388
  throw new Error(`Royalty cannot exceed ${PLATFORM_CONFIG.maxRoyaltyBps / 100}%`);
2388
2389
  }
2389
2390
  if (!price || parseFloat(price) <= 0) {
@@ -2403,7 +2404,8 @@ var ZubariNFTProtocol = class {
2403
2404
  uri: metadata.image,
2404
2405
  // Will be IPFS URI
2405
2406
  creator: creatorAddress,
2406
- royaltyBps: metadata.royaltyBps,
2407
+ royaltyBps,
2408
+ // Use the validated/defaulted value
2407
2409
  deadline,
2408
2410
  price: priceInWei,
2409
2411
  currency: currencyAddress,
@@ -2423,7 +2425,8 @@ var ZubariNFTProtocol = class {
2423
2425
  tokenId,
2424
2426
  uri: metadata.image,
2425
2427
  creator: creatorAddress,
2426
- royaltyBps: metadata.royaltyBps,
2428
+ royaltyBps,
2429
+ // Use the validated/defaulted value
2427
2430
  deadline,
2428
2431
  signature,
2429
2432
  price: priceInWei,