@zubari/sdk 0.4.0 → 0.4.2
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.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/protocols/index.js +1 -1
- package/dist/protocols/index.js.map +1 -1
- package/dist/protocols/index.mjs +1 -1
- package/dist/protocols/index.mjs.map +1 -1
- package/dist/react/index.js +4 -4
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +4 -4
- package/dist/react/index.mjs.map +1 -1
- package/dist/services/index.js +4 -4
- package/dist/services/index.js.map +1 -1
- package/dist/services/index.mjs +4 -4
- package/dist/services/index.mjs.map +1 -1
- package/dist/wallet/index.js +4 -4
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/index.mjs +4 -4
- package/dist/wallet/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -307,7 +307,7 @@ function deriveEthereumAddress(seed) {
|
|
|
307
307
|
const hdNode = ethers.HDNodeWallet.fromPhrase(seed, void 0, DERIVATION_PATHS2.ethereum);
|
|
308
308
|
return hdNode.address;
|
|
309
309
|
}
|
|
310
|
-
function deriveBitcoinAddress(seed, network = "
|
|
310
|
+
function deriveBitcoinAddress(seed, network = "mainnet") {
|
|
311
311
|
try {
|
|
312
312
|
const seedBytes = bip39.mnemonicToSeedSync(seed);
|
|
313
313
|
const hdKey = bip32.HDKey.fromMasterSeed(seedBytes);
|
|
@@ -401,7 +401,7 @@ function deriveTronAddress(seed) {
|
|
|
401
401
|
throw error;
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
function deriveSparkAddress(seed, network = "
|
|
404
|
+
function deriveSparkAddress(seed, network = "mainnet") {
|
|
405
405
|
try {
|
|
406
406
|
const seedBytes = bip39.mnemonicToSeedSync(seed);
|
|
407
407
|
const hdKey = bip32.HDKey.fromMasterSeed(seedBytes);
|
|
@@ -421,7 +421,7 @@ function deriveSparkAddress(seed, network = "testnet") {
|
|
|
421
421
|
throw error;
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
async function deriveAllAddresses(seed, network = "
|
|
424
|
+
async function deriveAllAddresses(seed, network = "mainnet") {
|
|
425
425
|
const addresses = {
|
|
426
426
|
ethereum: null,
|
|
427
427
|
bitcoin: null,
|
|
@@ -1551,7 +1551,7 @@ var WalletManager = class _WalletManager {
|
|
|
1551
1551
|
*
|
|
1552
1552
|
* No fallback to placeholder addresses - WDK API is required for real addresses.
|
|
1553
1553
|
*/
|
|
1554
|
-
static async deriveAddressForChainAsync(seed, chain, network = "
|
|
1554
|
+
static async deriveAddressForChainAsync(seed, chain, network = "mainnet", apiUrl) {
|
|
1555
1555
|
if (chain === "ethereum") {
|
|
1556
1556
|
try {
|
|
1557
1557
|
const wdkService2 = getZubariWdkService({ network, apiUrl });
|