@zubari/sdk 0.3.8 → 0.4.0

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.
@@ -9,6 +9,8 @@ interface ContractAddresses {
9
9
  tips: string;
10
10
  subscriptions: string;
11
11
  subscriptionsV2: string;
12
+ subscriptionsSimple: string;
13
+ creatorRegistry: string;
12
14
  payouts: string;
13
15
  entryPoint: string;
14
16
  paymaster: string;
@@ -9,6 +9,8 @@ interface ContractAddresses {
9
9
  tips: string;
10
10
  subscriptions: string;
11
11
  subscriptionsV2: string;
12
+ subscriptionsSimple: string;
13
+ creatorRegistry: string;
12
14
  payouts: string;
13
15
  entryPoint: string;
14
16
  paymaster: string;
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
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-BZDwdQUe.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-QLZi5YRN.mjs';
2
2
  export { D as DERIVATION_PATHS, N as NETWORKS, T as TESTNET_NETWORKS, b as WalletManager, W as WalletManagerConfig, a as WalletState, g as getNetworkConfig } from './WalletManager-j0tgNIKi.mjs';
3
3
  export { M as MemoryStorageAdapter, S as SecureStorageAdapter, W as WebEncryptedStorageAdapter, c as createSecureStorage } from './SecureStorage-jO783AhC.mjs';
4
4
  export { a as ZubariMarketProtocol, Z as ZubariNFTProtocol, d as ZubariPayoutsProtocol, c as ZubariSubscriptionProtocol, b as ZubariTipsProtocol } from './PayoutsProtocol-CLiMFe54.mjs';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
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-CTb2uJpD.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-BnlkQ9B6.js';
2
2
  export { D as DERIVATION_PATHS, N as NETWORKS, T as TESTNET_NETWORKS, b as WalletManager, W as WalletManagerConfig, a as WalletState, g as getNetworkConfig } from './WalletManager-DfvFJ-mk.js';
3
3
  export { M as MemoryStorageAdapter, S as SecureStorageAdapter, W as WebEncryptedStorageAdapter, c as createSecureStorage } from './SecureStorage-jO783AhC.js';
4
4
  export { a as ZubariMarketProtocol, Z as ZubariNFTProtocol, d as ZubariPayoutsProtocol, c as ZubariSubscriptionProtocol, b as ZubariTipsProtocol } from './PayoutsProtocol-B5z8SEA-.js';
package/dist/index.js CHANGED
@@ -37,7 +37,7 @@ var NETWORKS = {
37
37
  chainId: 1,
38
38
  coinType: 60,
39
39
  // m/44'/60'
40
- rpcUrl: "https://eth.llamarpc.com",
40
+ rpcUrl: "https://ethereum-rpc.publicnode.com",
41
41
  explorerUrl: "https://etherscan.io",
42
42
  nativeCurrency: {
43
43
  name: "Ether",
@@ -146,36 +146,47 @@ function getNetworkConfig(network, isTestnet = false) {
146
146
  var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
147
147
  var ZUBARI_CONTRACTS = {
148
148
  testnet: {
149
- // Ethereum Sepolia (11155111) - Deployed 2024-12-31
149
+ // Ethereum Sepolia (11155111) - Updated 2025-01-18
150
+ // Treasury: 0xAC2e22B5a99F0123319644A9bF0DF4FD72c9b001
151
+ // Platform Fee: 10% (1000 bps)
150
152
  registry: "0xcEd503aeD6E2F6884A7eAB4226D15477d863B084",
151
153
  nft: "0xc61497530E08897CCf518cbF9DA1A327983192E1",
152
154
  // ZubariNFT ERC-721 with payment
153
155
  nft1155: "0x5e618B5bEaE1dc41369E7aa235Cc3b9245905192",
154
156
  // Zubari1155 ERC-1155 multi-edition
155
157
  marketplace: "0x64B8fC45bB669a1bD672bD5ab76f82B7EE3B2e0f",
156
- tips: "0x5ff64D0311dF0E3Fdf4e65FB878E355531f47f3F",
157
- subscriptions: "0x152a175FaC027236afC3E00f7c85af5DF30a6fe2",
158
+ tips: "0xFDc353edC63Cd3D4bba35bB43861369516a9Dc85",
159
+ // ZubariTips - 10% fee
160
+ subscriptions: "0x8C05F8aD2F295fB7f3596043a7c37C98A5F7fAB8",
161
+ // ZubariSubscription - 10% fee
158
162
  subscriptionsV2: ZERO_ADDRESS,
159
- payouts: "0x637f0fFF94baF4eD1fDcBdF69d6b0646e6B9e0bA",
163
+ subscriptionsSimple: ZERO_ADDRESS,
164
+ creatorRegistry: ZERO_ADDRESS,
165
+ payouts: "0x804Fe503936E8b8d3D5Dbb62AF4fB6Fe7265Fb2c",
166
+ // ZubariPayouts
160
167
  entryPoint: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
161
168
  paymaster: ZERO_ADDRESS,
162
169
  // Deploy with: npx hardhat run deploy/deploy.ts --network ethereum-sepolia
163
170
  accountFactory: ZERO_ADDRESS,
164
171
  // Not yet deployed
165
- usdt: "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0",
166
- // USDT on Sepolia
172
+ usdt: "0x7169D38820dfd117C3FA1f22a697dBA58d90BA06",
173
+ // USDT on Sepolia (mintable test token)
167
174
  weth: "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14"
168
175
  },
169
176
  mainnet: {
170
- // Ethereum Mainnet (1)
171
- registry: ZERO_ADDRESS,
172
- nft: ZERO_ADDRESS,
173
- nft1155: ZERO_ADDRESS,
174
- marketplace: ZERO_ADDRESS,
175
- tips: ZERO_ADDRESS,
176
- subscriptions: ZERO_ADDRESS,
177
- subscriptionsV2: ZERO_ADDRESS,
178
- payouts: ZERO_ADDRESS,
177
+ // Ethereum Mainnet (1) - Deployed 2025-01-22
178
+ // Owner/Treasury: Safe 0x436fE1eff6056aCc8c34d8ADe0C54B8AcF90DCAa
179
+ // Platform Fee: 10% (1000 bps)
180
+ registry: "0x1DA6880bc730e96cFA24d614D12012f9f81C3239",
181
+ nft: "0x19842D60a81bd65Bd9352A380C3b37dc2E0a5731",
182
+ nft1155: "0xDA824094c3ADdaC49e2480a699E2B21ca234BeD6",
183
+ marketplace: "0x8B0B3383644D0d374F4E047fC37e11F00f716b3A",
184
+ tips: "0x38D7Fc0592bCF094e1880c19a34f98c6A36b68D8",
185
+ subscriptions: "0xDA774d657B04Ab8744bfF09D18EeAce27E3F3DEa",
186
+ subscriptionsV2: "0x7abbaFe67941036bBF7dB7006855C55014d6012A",
187
+ subscriptionsSimple: "0xd0C07722a29D8aC7d137e59dCA114b031B4411E8",
188
+ creatorRegistry: "0xe5CE1Eb986f58BE42EEDFe5C18ee5956803b2BDC",
189
+ payouts: "0x74fc8cC0B5A92c90ae35caEB0E388Ea30424cc79",
179
190
  entryPoint: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
180
191
  paymaster: ZERO_ADDRESS,
181
192
  accountFactory: ZERO_ADDRESS,
@@ -288,7 +299,7 @@ var WdkApiClient = class {
288
299
  /**
289
300
  * Derive address for a specific chain using Tether WDK
290
301
  */
291
- async deriveAddress(seed, chain, network = "testnet") {
302
+ async deriveAddress(seed, chain, network = "mainnet") {
292
303
  try {
293
304
  const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/derive-address`, {
294
305
  method: "POST",
@@ -308,7 +319,7 @@ var WdkApiClient = class {
308
319
  /**
309
320
  * Derive addresses for all chains using Tether WDK
310
321
  */
311
- async deriveAllAddresses(seed, network = "testnet") {
322
+ async deriveAllAddresses(seed, network = "mainnet") {
312
323
  try {
313
324
  const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/derive-all`, {
314
325
  method: "POST",
@@ -328,7 +339,7 @@ var WdkApiClient = class {
328
339
  /**
329
340
  * Send a transaction on a specific chain using Tether WDK
330
341
  */
331
- async sendTransaction(seed, chain, to, amount, network = "testnet") {
342
+ async sendTransaction(seed, chain, to, amount, network = "mainnet") {
332
343
  try {
333
344
  const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/send`, {
334
345
  method: "POST",
@@ -349,7 +360,7 @@ var WdkApiClient = class {
349
360
  * Get transaction history for an address on a specific chain
350
361
  * Fetches from blockchain explorers (Etherscan, mempool.space, etc.)
351
362
  */
352
- async getTransactionHistory(seed, chain, network = "testnet", limit = 10) {
363
+ async getTransactionHistory(seed, chain, network = "mainnet", limit = 10) {
353
364
  try {
354
365
  const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/history`, {
355
366
  method: "POST",
@@ -370,7 +381,7 @@ var WdkApiClient = class {
370
381
  * Get transaction status by hash
371
382
  * Fetches from blockchain explorers to check confirmation status
372
383
  */
373
- async getTransactionStatus(txHash, chain, network = "testnet") {
384
+ async getTransactionStatus(txHash, chain, network = "mainnet") {
374
385
  try {
375
386
  const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/tx-status`, {
376
387
  method: "POST",
@@ -616,7 +627,7 @@ var ZubariWdkService = class {
616
627
  useNativeWdk = false;
617
628
  constructor(config = {}) {
618
629
  this.config = {
619
- network: config.network || "testnet",
630
+ network: config.network || "mainnet",
620
631
  apiUrl: config.apiUrl || process.env.NEXT_PUBLIC_API_URL || DEFAULT_API_URL2,
621
632
  forceApi: config.forceApi ?? false,
622
633
  timeout: config.timeout || 3e4
@@ -1907,7 +1918,7 @@ var WalletManager = class _WalletManager {
1907
1918
  const isTestnet = config.network !== "mainnet";
1908
1919
  const ethereumConfig = getNetworkConfig("ethereum", isTestnet);
1909
1920
  this.config = {
1910
- network: config.network || "testnet",
1921
+ network: config.network || "mainnet",
1911
1922
  rpcUrl: config.rpcUrl || ethereumConfig.rpcUrl,
1912
1923
  storage: config.storage || createSecureStorage(),
1913
1924
  enabledChains: config.enabledChains || SUPPORTED_CHAINS,
@@ -5293,7 +5304,7 @@ var ZubariTipsProtocol = class {
5293
5304
  const decoded = iface.decodeFunctionResult("platformFeeBps", result);
5294
5305
  return Number(decoded[0]);
5295
5306
  } catch {
5296
- return 300;
5307
+ return 1e3;
5297
5308
  }
5298
5309
  }
5299
5310
  /**
@@ -6533,7 +6544,7 @@ var ZubariSubscriptionProtocol = class {
6533
6544
  const decoded = iface.decodeFunctionResult("platformFeeBps", result);
6534
6545
  return Number(decoded[0]);
6535
6546
  } catch {
6536
- return 300;
6547
+ return 1e3;
6537
6548
  }
6538
6549
  }
6539
6550
  /**