@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.
@@ -1,5 +1,5 @@
1
1
  import { Z as ZubariWalletConfig, N as NetworkType, A as Account, a as NetworkBalance, S as SendParams, b as TxResult } from './index-Be7yLGAO.js';
2
- import './WalletManager-DrI2lvOM.js';
2
+ import './WalletManager-IOHFgvpT.js';
3
3
 
4
4
  interface ContractAddresses {
5
5
  registry: string;
@@ -1,5 +1,5 @@
1
1
  import { Z as ZubariWalletConfig, N as NetworkType, A as Account, a as NetworkBalance, S as SendParams, b as TxResult } from './index-Be7yLGAO.mjs';
2
- import './WalletManager-BuZgAr-D.mjs';
2
+ import './WalletManager-DKPzfA74.mjs';
3
3
 
4
4
  interface ContractAddresses {
5
5
  registry: string;
package/dist/index.d.mts CHANGED
@@ -1,12 +1,11 @@
1
- export { C as CURRENCY_ADDRESSES, N as NFT_VOUCHER_DOMAIN, c as NFT_VOUCHER_TYPES, P as PLATFORM_CONFIG, b as ZERO_ADDRESS, a as ZUBARI_CONTRACTS, Z as ZubariWallet, g as getContractAddresses } from './index-sHlchAWr.mjs';
2
- export { D as DERIVATION_PATHS, N as NETWORKS, T as TESTNET_NETWORKS, W as WalletManager, b as WalletManagerConfig, a as WalletState, g as getNetworkConfig } from './WalletManager-BuZgAr-D.mjs';
1
+ export { C as CURRENCY_ADDRESSES, N as NFT_VOUCHER_DOMAIN, c as NFT_VOUCHER_TYPES, P as PLATFORM_CONFIG, b as ZERO_ADDRESS, a as ZUBARI_CONTRACTS, Z as ZubariWallet, g as getContractAddresses } from './index-BrLMTY29.mjs';
2
+ export { D as DERIVATION_PATHS, N as NETWORKS, T as TESTNET_NETWORKS, W as WalletManager, b as WalletManagerConfig, a as WalletState, g as getNetworkConfig } from './WalletManager-DKPzfA74.mjs';
3
3
  export { M as MemoryStorageAdapter, S as SecureStorageAdapter, W as WebEncryptedStorageAdapter, c as createSecureStorage } from './SecureStorage-jO783AhC.mjs';
4
4
  export { ZubariMarketProtocol, ZubariNFTProtocol, ZubariPayoutsProtocol, ZubariSubscriptionProtocol, ZubariTipsProtocol } from './protocols/index.mjs';
5
5
  export { BrowserAddressDerivation, ChainAddress, ChainBalance, FeeEstimate, FeeRates, MultiChainAddresses, SupportedChain, SwapService, TransactionHistoryItem, TransactionParams, TransactionResult, TransactionService, TransactionServiceConfig, WdkApiClient, ZubariWdkService, ZubariWdkServiceConfig, createTransactionService, createZubariWdkService, getTransactionService, getWdkApiClient, getZubariWdkService, isBrowser } from './services/index.mjs';
6
6
  export { A as Account, B as BuyParams, C as CreateVoucherParams, E as EarningsBreakdown, L as LazyMintVoucher, h as Listing, g as ListingParams, f as NFT, d as NFTAttribute, c as NFTCurrency, e as NFTMetadata, a as NetworkBalance, N as NetworkType, R as RevenueSplit, S as SendParams, n as Subscription, m as SubscriptionPlan, p as SwapParams, o as SwapQuote, l as Tip, i as TipData, j as TipResult, k as TipStats, T as TokenBalance, b as TxResult, W as WatermarkingData, r as ZubariError, q as ZubariErrorCode, Z as ZubariWalletConfig } from './index-Be7yLGAO.mjs';
7
7
  export { FeeEstimateResult, SendTransactionResult, UseWalletManagerOptions, UseWalletManagerReturn, useWalletManager } from './react/index.mjs';
8
- import 'node_modules/viem/_types/actions/siwe/verifySiweMessage';
9
- import 'node_modules/viem/_types/utils/ccip';
8
+ import 'abitype';
10
9
  import 'viem';
11
10
  import 'ethers';
12
11
 
package/dist/index.d.ts CHANGED
@@ -1,12 +1,11 @@
1
- export { C as CURRENCY_ADDRESSES, N as NFT_VOUCHER_DOMAIN, c as NFT_VOUCHER_TYPES, P as PLATFORM_CONFIG, b as ZERO_ADDRESS, a as ZUBARI_CONTRACTS, Z as ZubariWallet, g as getContractAddresses } from './index-DTygRRZD.js';
2
- export { D as DERIVATION_PATHS, N as NETWORKS, T as TESTNET_NETWORKS, W as WalletManager, b as WalletManagerConfig, a as WalletState, g as getNetworkConfig } from './WalletManager-DrI2lvOM.js';
1
+ export { C as CURRENCY_ADDRESSES, N as NFT_VOUCHER_DOMAIN, c as NFT_VOUCHER_TYPES, P as PLATFORM_CONFIG, b as ZERO_ADDRESS, a as ZUBARI_CONTRACTS, Z as ZubariWallet, g as getContractAddresses } from './index-BCX8EYxv.js';
2
+ export { D as DERIVATION_PATHS, N as NETWORKS, T as TESTNET_NETWORKS, W as WalletManager, b as WalletManagerConfig, a as WalletState, g as getNetworkConfig } from './WalletManager-IOHFgvpT.js';
3
3
  export { M as MemoryStorageAdapter, S as SecureStorageAdapter, W as WebEncryptedStorageAdapter, c as createSecureStorage } from './SecureStorage-jO783AhC.js';
4
4
  export { ZubariMarketProtocol, ZubariNFTProtocol, ZubariPayoutsProtocol, ZubariSubscriptionProtocol, ZubariTipsProtocol } from './protocols/index.js';
5
5
  export { BrowserAddressDerivation, ChainAddress, ChainBalance, FeeEstimate, FeeRates, MultiChainAddresses, SupportedChain, SwapService, TransactionHistoryItem, TransactionParams, TransactionResult, TransactionService, TransactionServiceConfig, WdkApiClient, ZubariWdkService, ZubariWdkServiceConfig, createTransactionService, createZubariWdkService, getTransactionService, getWdkApiClient, getZubariWdkService, isBrowser } from './services/index.js';
6
6
  export { A as Account, B as BuyParams, C as CreateVoucherParams, E as EarningsBreakdown, L as LazyMintVoucher, h as Listing, g as ListingParams, f as NFT, d as NFTAttribute, c as NFTCurrency, e as NFTMetadata, a as NetworkBalance, N as NetworkType, R as RevenueSplit, S as SendParams, n as Subscription, m as SubscriptionPlan, p as SwapParams, o as SwapQuote, l as Tip, i as TipData, j as TipResult, k as TipStats, T as TokenBalance, b as TxResult, W as WatermarkingData, r as ZubariError, q as ZubariErrorCode, Z as ZubariWalletConfig } from './index-Be7yLGAO.js';
7
7
  export { FeeEstimateResult, SendTransactionResult, UseWalletManagerOptions, UseWalletManagerReturn, useWalletManager } from './react/index.js';
8
- import 'node_modules/viem/_types/actions/siwe/verifySiweMessage';
9
- import 'node_modules/viem/_types/utils/ccip';
8
+ import 'abitype';
10
9
  import 'viem';
11
10
  import 'ethers';
12
11
 
package/dist/index.js CHANGED
@@ -2385,7 +2385,8 @@ var ZubariNFTProtocol = class {
2385
2385
  */
2386
2386
  async createLazyMintVoucher(params, signer) {
2387
2387
  const { metadata, creatorAddress, price, currency, nonce, watermarking } = params;
2388
- if (metadata.royaltyBps > PLATFORM_CONFIG.maxRoyaltyBps) {
2388
+ const royaltyBps = metadata.royaltyBps ?? 500;
2389
+ if (royaltyBps > PLATFORM_CONFIG.maxRoyaltyBps) {
2389
2390
  throw new Error(`Royalty cannot exceed ${PLATFORM_CONFIG.maxRoyaltyBps / 100}%`);
2390
2391
  }
2391
2392
  if (!price || parseFloat(price) <= 0) {
@@ -2405,7 +2406,8 @@ var ZubariNFTProtocol = class {
2405
2406
  uri: metadata.image,
2406
2407
  // Will be IPFS URI
2407
2408
  creator: creatorAddress,
2408
- royaltyBps: metadata.royaltyBps,
2409
+ royaltyBps,
2410
+ // Use the validated/defaulted value
2409
2411
  deadline,
2410
2412
  price: priceInWei,
2411
2413
  currency: currencyAddress,
@@ -2425,7 +2427,8 @@ var ZubariNFTProtocol = class {
2425
2427
  tokenId,
2426
2428
  uri: metadata.image,
2427
2429
  creator: creatorAddress,
2428
- royaltyBps: metadata.royaltyBps,
2430
+ royaltyBps,
2431
+ // Use the validated/defaulted value
2429
2432
  deadline,
2430
2433
  signature,
2431
2434
  price: priceInWei,