@zubari/sdk 0.3.8 → 0.4.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,4 +1,4 @@
1
- export { Z as ZubariWallet } from '../index-BZDwdQUe.mjs';
1
+ export { Z as ZubariWallet } from '../index-QLZi5YRN.mjs';
2
2
  export { C as ChainBalance, M as MultiChainAddresses, S as SUPPORTED_CHAINS, b as WalletManager, W as WalletManagerConfig, a as WalletState } from '../WalletManager-j0tgNIKi.mjs';
3
3
  import '../index-CTyZlHKg.mjs';
4
4
  import 'abitype';
@@ -1,4 +1,4 @@
1
- export { Z as ZubariWallet } from '../index-CTb2uJpD.js';
1
+ export { Z as ZubariWallet } from '../index-BnlkQ9B6.js';
2
2
  export { C as ChainBalance, M as MultiChainAddresses, S as SUPPORTED_CHAINS, b as WalletManager, W as WalletManagerConfig, a as WalletState } from '../WalletManager-DfvFJ-mk.js';
3
3
  import '../index-CTyZlHKg.js';
4
4
  import 'abitype';
@@ -31,7 +31,7 @@ var NETWORKS = {
31
31
  chainId: 1,
32
32
  coinType: 60,
33
33
  // m/44'/60'
34
- rpcUrl: "https://eth.llamarpc.com",
34
+ rpcUrl: "https://ethereum-rpc.publicnode.com",
35
35
  explorerUrl: "https://etherscan.io",
36
36
  nativeCurrency: {
37
37
  name: "Ether",
@@ -140,36 +140,47 @@ function getNetworkConfig(network, isTestnet = false) {
140
140
  var ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
141
141
  var ZUBARI_CONTRACTS = {
142
142
  testnet: {
143
- // Ethereum Sepolia (11155111) - Deployed 2024-12-31
143
+ // Ethereum Sepolia (11155111) - Updated 2025-01-18
144
+ // Treasury: 0xAC2e22B5a99F0123319644A9bF0DF4FD72c9b001
145
+ // Platform Fee: 10% (1000 bps)
144
146
  registry: "0xcEd503aeD6E2F6884A7eAB4226D15477d863B084",
145
147
  nft: "0xc61497530E08897CCf518cbF9DA1A327983192E1",
146
148
  // ZubariNFT ERC-721 with payment
147
149
  nft1155: "0x5e618B5bEaE1dc41369E7aa235Cc3b9245905192",
148
150
  // Zubari1155 ERC-1155 multi-edition
149
151
  marketplace: "0x64B8fC45bB669a1bD672bD5ab76f82B7EE3B2e0f",
150
- tips: "0x5ff64D0311dF0E3Fdf4e65FB878E355531f47f3F",
151
- subscriptions: "0x152a175FaC027236afC3E00f7c85af5DF30a6fe2",
152
+ tips: "0xFDc353edC63Cd3D4bba35bB43861369516a9Dc85",
153
+ // ZubariTips - 10% fee
154
+ subscriptions: "0x8C05F8aD2F295fB7f3596043a7c37C98A5F7fAB8",
155
+ // ZubariSubscription - 10% fee
152
156
  subscriptionsV2: ZERO_ADDRESS,
153
- payouts: "0x637f0fFF94baF4eD1fDcBdF69d6b0646e6B9e0bA",
157
+ subscriptionsSimple: ZERO_ADDRESS,
158
+ creatorRegistry: ZERO_ADDRESS,
159
+ payouts: "0x804Fe503936E8b8d3D5Dbb62AF4fB6Fe7265Fb2c",
160
+ // ZubariPayouts
154
161
  entryPoint: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
155
162
  paymaster: ZERO_ADDRESS,
156
163
  // Deploy with: npx hardhat run deploy/deploy.ts --network ethereum-sepolia
157
164
  accountFactory: ZERO_ADDRESS,
158
165
  // Not yet deployed
159
- usdt: "0xaA8E23Fb1079EA71e0a56F48a2aA51851D8433D0",
160
- // USDT on Sepolia
166
+ usdt: "0x7169D38820dfd117C3FA1f22a697dBA58d90BA06",
167
+ // USDT on Sepolia (mintable test token)
161
168
  weth: "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14"
162
169
  },
163
170
  mainnet: {
164
- // Ethereum Mainnet (1)
165
- registry: ZERO_ADDRESS,
166
- nft: ZERO_ADDRESS,
167
- nft1155: ZERO_ADDRESS,
168
- marketplace: ZERO_ADDRESS,
169
- tips: ZERO_ADDRESS,
170
- subscriptions: ZERO_ADDRESS,
171
- subscriptionsV2: ZERO_ADDRESS,
172
- payouts: ZERO_ADDRESS,
171
+ // Ethereum Mainnet (1) - Deployed 2025-01-22
172
+ // Owner/Treasury: Safe 0x436fE1eff6056aCc8c34d8ADe0C54B8AcF90DCAa
173
+ // Platform Fee: 10% (1000 bps)
174
+ registry: "0x1DA6880bc730e96cFA24d614D12012f9f81C3239",
175
+ nft: "0x19842D60a81bd65Bd9352A380C3b37dc2E0a5731",
176
+ nft1155: "0xDA824094c3ADdaC49e2480a699E2B21ca234BeD6",
177
+ marketplace: "0x8B0B3383644D0d374F4E047fC37e11F00f716b3A",
178
+ tips: "0x38D7Fc0592bCF094e1880c19a34f98c6A36b68D8",
179
+ subscriptions: "0xDA774d657B04Ab8744bfF09D18EeAce27E3F3DEa",
180
+ subscriptionsV2: "0x7abbaFe67941036bBF7dB7006855C55014d6012A",
181
+ subscriptionsSimple: "0xd0C07722a29D8aC7d137e59dCA114b031B4411E8",
182
+ creatorRegistry: "0xe5CE1Eb986f58BE42EEDFe5C18ee5956803b2BDC",
183
+ payouts: "0x74fc8cC0B5A92c90ae35caEB0E388Ea30424cc79",
173
184
  entryPoint: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
174
185
  paymaster: ZERO_ADDRESS,
175
186
  accountFactory: ZERO_ADDRESS,
@@ -233,7 +244,7 @@ var WdkApiClient = class {
233
244
  /**
234
245
  * Derive address for a specific chain using Tether WDK
235
246
  */
236
- async deriveAddress(seed, chain, network = "testnet") {
247
+ async deriveAddress(seed, chain, network = "mainnet") {
237
248
  try {
238
249
  const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/derive-address`, {
239
250
  method: "POST",
@@ -253,7 +264,7 @@ var WdkApiClient = class {
253
264
  /**
254
265
  * Derive addresses for all chains using Tether WDK
255
266
  */
256
- async deriveAllAddresses(seed, network = "testnet") {
267
+ async deriveAllAddresses(seed, network = "mainnet") {
257
268
  try {
258
269
  const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/derive-all`, {
259
270
  method: "POST",
@@ -273,7 +284,7 @@ var WdkApiClient = class {
273
284
  /**
274
285
  * Send a transaction on a specific chain using Tether WDK
275
286
  */
276
- async sendTransaction(seed, chain, to, amount, network = "testnet") {
287
+ async sendTransaction(seed, chain, to, amount, network = "mainnet") {
277
288
  try {
278
289
  const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/send`, {
279
290
  method: "POST",
@@ -294,7 +305,7 @@ var WdkApiClient = class {
294
305
  * Get transaction history for an address on a specific chain
295
306
  * Fetches from blockchain explorers (Etherscan, mempool.space, etc.)
296
307
  */
297
- async getTransactionHistory(seed, chain, network = "testnet", limit = 10) {
308
+ async getTransactionHistory(seed, chain, network = "mainnet", limit = 10) {
298
309
  try {
299
310
  const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/history`, {
300
311
  method: "POST",
@@ -315,7 +326,7 @@ var WdkApiClient = class {
315
326
  * Get transaction status by hash
316
327
  * Fetches from blockchain explorers to check confirmation status
317
328
  */
318
- async getTransactionStatus(txHash, chain, network = "testnet") {
329
+ async getTransactionStatus(txHash, chain, network = "mainnet") {
319
330
  try {
320
331
  const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/tx-status`, {
321
332
  method: "POST",
@@ -547,7 +558,7 @@ var ZubariWdkService = class {
547
558
  useNativeWdk = false;
548
559
  constructor(config = {}) {
549
560
  this.config = {
550
- network: config.network || "testnet",
561
+ network: config.network || "mainnet",
551
562
  apiUrl: config.apiUrl || process.env.NEXT_PUBLIC_API_URL || DEFAULT_API_URL2,
552
563
  forceApi: config.forceApi ?? false,
553
564
  timeout: config.timeout || 3e4
@@ -1835,7 +1846,7 @@ var WalletManager = class _WalletManager {
1835
1846
  const isTestnet = config.network !== "mainnet";
1836
1847
  const ethereumConfig = getNetworkConfig("ethereum", isTestnet);
1837
1848
  this.config = {
1838
- network: config.network || "testnet",
1849
+ network: config.network || "mainnet",
1839
1850
  rpcUrl: config.rpcUrl || ethereumConfig.rpcUrl,
1840
1851
  storage: config.storage || createSecureStorage(),
1841
1852
  enabledChains: config.enabledChains || SUPPORTED_CHAINS,
@@ -2101,7 +2112,7 @@ var WalletManager = class _WalletManager {
2101
2112
  *
2102
2113
  * No fallback to placeholder addresses - WDK API is required for real addresses.
2103
2114
  */
2104
- static async deriveAddressForChainAsync(seed, chain, network = "testnet", apiUrl) {
2115
+ static async deriveAddressForChainAsync(seed, chain, network = "mainnet", apiUrl) {
2105
2116
  if (chain === "ethereum") {
2106
2117
  try {
2107
2118
  const wdkService2 = getZubariWdkService({ network, apiUrl });