@vleap/warps-adapter-fastset 0.1.0-beta.50 → 0.1.0-beta.52
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 +22 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1484,7 +1484,10 @@ var FastsetTokens = [
|
|
|
1484
1484
|
name: "Ethereum",
|
|
1485
1485
|
symbol: "ETH",
|
|
1486
1486
|
decimals: 18,
|
|
1487
|
-
logoUrl:
|
|
1487
|
+
logoUrl: {
|
|
1488
|
+
light: "https://joai.ai/images/tokens/eth-white.svg",
|
|
1489
|
+
dark: "https://joai.ai/images/tokens/eth-black.svg"
|
|
1490
|
+
},
|
|
1488
1491
|
amount: 0n
|
|
1489
1492
|
},
|
|
1490
1493
|
{
|
|
@@ -1502,7 +1505,7 @@ var FastsetTokens = [
|
|
|
1502
1505
|
name: "Solana",
|
|
1503
1506
|
symbol: "SOL",
|
|
1504
1507
|
decimals: 9,
|
|
1505
|
-
logoUrl: "https://
|
|
1508
|
+
logoUrl: "https://joai.ai/images/tokens/sol.svg",
|
|
1506
1509
|
amount: 0n
|
|
1507
1510
|
},
|
|
1508
1511
|
{
|
|
@@ -1520,7 +1523,10 @@ var FastsetTokens = [
|
|
|
1520
1523
|
name: "Wrapped SET",
|
|
1521
1524
|
symbol: "WSET",
|
|
1522
1525
|
decimals: 18,
|
|
1523
|
-
logoUrl:
|
|
1526
|
+
logoUrl: {
|
|
1527
|
+
light: "https://joai.ai/images/tokens/set-white.svg",
|
|
1528
|
+
dark: "https://joai.ai/images/tokens/set-black.svg"
|
|
1529
|
+
},
|
|
1524
1530
|
amount: 0n
|
|
1525
1531
|
}
|
|
1526
1532
|
];
|
|
@@ -1571,7 +1577,7 @@ var WarpFastsetDataLoader = class {
|
|
|
1571
1577
|
symbol: assetInfo.symbol,
|
|
1572
1578
|
name: assetInfo.name,
|
|
1573
1579
|
decimals: assetInfo.decimals,
|
|
1574
|
-
logoUrl: assetInfo.logoUrl
|
|
1580
|
+
logoUrl: assetInfo.logoUrl,
|
|
1575
1581
|
amount
|
|
1576
1582
|
});
|
|
1577
1583
|
}
|
|
@@ -1592,7 +1598,7 @@ var WarpFastsetDataLoader = class {
|
|
|
1592
1598
|
symbol: assetInfo.symbol,
|
|
1593
1599
|
name: assetInfo.name,
|
|
1594
1600
|
decimals: assetInfo.decimals,
|
|
1595
|
-
logoUrl: assetInfo.logoUrl
|
|
1601
|
+
logoUrl: assetInfo.logoUrl,
|
|
1596
1602
|
amount: 0n
|
|
1597
1603
|
};
|
|
1598
1604
|
}
|
|
@@ -2434,6 +2440,7 @@ var MnemonicWalletProvider = _MnemonicWalletProvider;
|
|
|
2434
2440
|
|
|
2435
2441
|
// src/providers/PrivateKeyWalletProvider.ts
|
|
2436
2442
|
import { getWarpWalletPrivateKeyFromConfig } from "@vleap/warps";
|
|
2443
|
+
import * as bip392 from "@scure/bip39";
|
|
2437
2444
|
var _PrivateKeyWalletProvider = class _PrivateKeyWalletProvider {
|
|
2438
2445
|
constructor(config, chain2) {
|
|
2439
2446
|
this.config = config;
|
|
@@ -2476,7 +2483,16 @@ var _PrivateKeyWalletProvider = class _PrivateKeyWalletProvider {
|
|
|
2476
2483
|
return uint8ArrayToHex(signature);
|
|
2477
2484
|
}
|
|
2478
2485
|
create(mnemonic) {
|
|
2479
|
-
|
|
2486
|
+
const seed = bip392.mnemonicToSeedSync(mnemonic);
|
|
2487
|
+
const privateKey = seed.slice(0, 32);
|
|
2488
|
+
const publicKey = ed.getPublicKey(privateKey);
|
|
2489
|
+
const address = FastsetClient.encodeBech32Address(publicKey);
|
|
2490
|
+
return {
|
|
2491
|
+
provider: _PrivateKeyWalletProvider.PROVIDER_NAME,
|
|
2492
|
+
address,
|
|
2493
|
+
privateKey: uint8ArrayToHex(privateKey),
|
|
2494
|
+
mnemonic: null
|
|
2495
|
+
};
|
|
2480
2496
|
}
|
|
2481
2497
|
generate() {
|
|
2482
2498
|
const privateKey = ed.utils.randomSecretKey();
|