@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/react/index.mjs
CHANGED
|
@@ -32,7 +32,7 @@ var NETWORKS = {
|
|
|
32
32
|
chainId: 1,
|
|
33
33
|
coinType: 60,
|
|
34
34
|
// m/44'/60'
|
|
35
|
-
rpcUrl: "https://
|
|
35
|
+
rpcUrl: "https://ethereum-rpc.publicnode.com",
|
|
36
36
|
explorerUrl: "https://etherscan.io",
|
|
37
37
|
nativeCurrency: {
|
|
38
38
|
name: "Ether",
|
|
@@ -182,7 +182,7 @@ var WdkApiClient = class {
|
|
|
182
182
|
/**
|
|
183
183
|
* Derive address for a specific chain using Tether WDK
|
|
184
184
|
*/
|
|
185
|
-
async deriveAddress(seed, chain, network = "
|
|
185
|
+
async deriveAddress(seed, chain, network = "mainnet") {
|
|
186
186
|
try {
|
|
187
187
|
const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/derive-address`, {
|
|
188
188
|
method: "POST",
|
|
@@ -202,7 +202,7 @@ var WdkApiClient = class {
|
|
|
202
202
|
/**
|
|
203
203
|
* Derive addresses for all chains using Tether WDK
|
|
204
204
|
*/
|
|
205
|
-
async deriveAllAddresses(seed, network = "
|
|
205
|
+
async deriveAllAddresses(seed, network = "mainnet") {
|
|
206
206
|
try {
|
|
207
207
|
const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/derive-all`, {
|
|
208
208
|
method: "POST",
|
|
@@ -222,7 +222,7 @@ var WdkApiClient = class {
|
|
|
222
222
|
/**
|
|
223
223
|
* Send a transaction on a specific chain using Tether WDK
|
|
224
224
|
*/
|
|
225
|
-
async sendTransaction(seed, chain, to, amount, network = "
|
|
225
|
+
async sendTransaction(seed, chain, to, amount, network = "mainnet") {
|
|
226
226
|
try {
|
|
227
227
|
const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/send`, {
|
|
228
228
|
method: "POST",
|
|
@@ -243,7 +243,7 @@ var WdkApiClient = class {
|
|
|
243
243
|
* Get transaction history for an address on a specific chain
|
|
244
244
|
* Fetches from blockchain explorers (Etherscan, mempool.space, etc.)
|
|
245
245
|
*/
|
|
246
|
-
async getTransactionHistory(seed, chain, network = "
|
|
246
|
+
async getTransactionHistory(seed, chain, network = "mainnet", limit = 10) {
|
|
247
247
|
try {
|
|
248
248
|
const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/history`, {
|
|
249
249
|
method: "POST",
|
|
@@ -264,7 +264,7 @@ var WdkApiClient = class {
|
|
|
264
264
|
* Get transaction status by hash
|
|
265
265
|
* Fetches from blockchain explorers to check confirmation status
|
|
266
266
|
*/
|
|
267
|
-
async getTransactionStatus(txHash, chain, network = "
|
|
267
|
+
async getTransactionStatus(txHash, chain, network = "mainnet") {
|
|
268
268
|
try {
|
|
269
269
|
const response = await fetch(`${this.config.baseUrl}/api/wallets/wdk/tx-status`, {
|
|
270
270
|
method: "POST",
|
|
@@ -496,7 +496,7 @@ var ZubariWdkService = class {
|
|
|
496
496
|
useNativeWdk = false;
|
|
497
497
|
constructor(config = {}) {
|
|
498
498
|
this.config = {
|
|
499
|
-
network: config.network || "
|
|
499
|
+
network: config.network || "mainnet",
|
|
500
500
|
apiUrl: config.apiUrl || process.env.NEXT_PUBLIC_API_URL || DEFAULT_API_URL2,
|
|
501
501
|
forceApi: config.forceApi ?? false,
|
|
502
502
|
timeout: config.timeout || 3e4
|
|
@@ -1283,7 +1283,7 @@ var WalletManager = class _WalletManager {
|
|
|
1283
1283
|
const isTestnet = config.network !== "mainnet";
|
|
1284
1284
|
const ethereumConfig = getNetworkConfig("ethereum", isTestnet);
|
|
1285
1285
|
this.config = {
|
|
1286
|
-
network: config.network || "
|
|
1286
|
+
network: config.network || "mainnet",
|
|
1287
1287
|
rpcUrl: config.rpcUrl || ethereumConfig.rpcUrl,
|
|
1288
1288
|
storage: config.storage || createSecureStorage(),
|
|
1289
1289
|
enabledChains: config.enabledChains || SUPPORTED_CHAINS,
|
|
@@ -1549,7 +1549,7 @@ var WalletManager = class _WalletManager {
|
|
|
1549
1549
|
*
|
|
1550
1550
|
* No fallback to placeholder addresses - WDK API is required for real addresses.
|
|
1551
1551
|
*/
|
|
1552
|
-
static async deriveAddressForChainAsync(seed, chain, network = "
|
|
1552
|
+
static async deriveAddressForChainAsync(seed, chain, network = "mainnet", apiUrl) {
|
|
1553
1553
|
if (chain === "ethereum") {
|
|
1554
1554
|
try {
|
|
1555
1555
|
const wdkService2 = getZubariWdkService({ network, apiUrl });
|