@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.
- package/dist/{index-CTb2uJpD.d.ts → index-BnlkQ9B6.d.ts} +2 -0
- package/dist/{index-BZDwdQUe.d.mts → index-QLZi5YRN.d.mts} +2 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +38 -27
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -27
- package/dist/index.mjs.map +1 -1
- package/dist/protocols/index.js +20 -2
- package/dist/protocols/index.js.map +1 -1
- package/dist/protocols/index.mjs +20 -2
- package/dist/protocols/index.mjs.map +1 -1
- package/dist/react/index.js +9 -9
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +9 -9
- package/dist/react/index.mjs.map +1 -1
- package/dist/services/index.js +7 -7
- package/dist/services/index.js.map +1 -1
- package/dist/services/index.mjs +7 -7
- package/dist/services/index.mjs.map +1 -1
- package/dist/wallet/index.d.mts +1 -1
- package/dist/wallet/index.d.ts +1 -1
- package/dist/wallet/index.js +35 -24
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/index.mjs +35 -24
- package/dist/wallet/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/wallet/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Z as ZubariWallet } from '../index-
|
|
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';
|
package/dist/wallet/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Z as ZubariWallet } from '../index-
|
|
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';
|
package/dist/wallet/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var NETWORKS = {
|
|
|
31
31
|
chainId: 1,
|
|
32
32
|
coinType: 60,
|
|
33
33
|
// m/44'/60'
|
|
34
|
-
rpcUrl: "https://
|
|
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) -
|
|
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: "
|
|
151
|
-
|
|
152
|
+
tips: "0xFDc353edC63Cd3D4bba35bB43861369516a9Dc85",
|
|
153
|
+
// ZubariTips - 10% fee
|
|
154
|
+
subscriptions: "0x8C05F8aD2F295fB7f3596043a7c37C98A5F7fAB8",
|
|
155
|
+
// ZubariSubscription - 10% fee
|
|
152
156
|
subscriptionsV2: ZERO_ADDRESS,
|
|
153
|
-
|
|
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: "
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
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 = "
|
|
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 = "
|
|
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 = "
|
|
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 = "
|
|
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 = "
|
|
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 || "
|
|
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 || "
|
|
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 = "
|
|
2115
|
+
static async deriveAddressForChainAsync(seed, chain, network = "mainnet", apiUrl) {
|
|
2105
2116
|
if (chain === "ethereum") {
|
|
2106
2117
|
try {
|
|
2107
2118
|
const wdkService2 = getZubariWdkService({ network, apiUrl });
|