@proton/wrap-constants 0.2.189 → 0.2.191
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.d.mts +75 -75
- package/dist/index.d.ts +75 -75
- package/dist/index.js +21 -2
- package/dist/index.mjs +21 -2
- package/package.json +9 -9
- package/src/coins.ts +24 -8
package/dist/index.js
CHANGED
|
@@ -1504,7 +1504,7 @@ var initializeCoins = (protonChain) => {
|
|
|
1504
1504
|
},
|
|
1505
1505
|
{
|
|
1506
1506
|
allowSwap: false,
|
|
1507
|
-
allowBridge:
|
|
1507
|
+
allowBridge: IS_TESTNET,
|
|
1508
1508
|
allowLend: false,
|
|
1509
1509
|
allowBorrow: false,
|
|
1510
1510
|
name: "Ripple USD",
|
|
@@ -1543,7 +1543,7 @@ var initializeCoins = (protonChain) => {
|
|
|
1543
1543
|
},
|
|
1544
1544
|
{
|
|
1545
1545
|
allowSwap: false,
|
|
1546
|
-
allowBridge:
|
|
1546
|
+
allowBridge: false,
|
|
1547
1547
|
allowLend: false,
|
|
1548
1548
|
allowBorrow: false,
|
|
1549
1549
|
name: "Fidelity Digital Dollar",
|
|
@@ -1568,6 +1568,22 @@ var initializeCoins = (protonChain) => {
|
|
|
1568
1568
|
image: "https://app.metalx.com/img/tokens/fidd.png",
|
|
1569
1569
|
coingeckoId: "fidelity-digital-dollar",
|
|
1570
1570
|
unifiedCryptoassetId: "39549"
|
|
1571
|
+
},
|
|
1572
|
+
// Important! This coin is not being used on MetalX. It is intended only for XMD-ETH purposes.
|
|
1573
|
+
{
|
|
1574
|
+
allowSwap: false,
|
|
1575
|
+
allowBridge: false,
|
|
1576
|
+
allowLend: false,
|
|
1577
|
+
allowBorrow: false,
|
|
1578
|
+
name: "Pax Dollar",
|
|
1579
|
+
coin: "USDP",
|
|
1580
|
+
xtokenSymbol: "XUSDP",
|
|
1581
|
+
xtokenPrecision: 6,
|
|
1582
|
+
xtokenContract: "xtokens",
|
|
1583
|
+
wallets: [],
|
|
1584
|
+
image: "https://app.metalx.com/img/tokens/usdp.png",
|
|
1585
|
+
coingeckoId: "pax-dollar",
|
|
1586
|
+
unifiedCryptoassetId: "3330"
|
|
1571
1587
|
}
|
|
1572
1588
|
];
|
|
1573
1589
|
const walletWithDuplicateChains = coins.find((coin) => {
|
|
@@ -2618,6 +2634,7 @@ var INode = class {
|
|
|
2618
2634
|
this.data = data;
|
|
2619
2635
|
}
|
|
2620
2636
|
}
|
|
2637
|
+
key;
|
|
2621
2638
|
data = {};
|
|
2622
2639
|
};
|
|
2623
2640
|
var ILink = class {
|
|
@@ -2628,6 +2645,8 @@ var ILink = class {
|
|
|
2628
2645
|
this.data = data;
|
|
2629
2646
|
}
|
|
2630
2647
|
}
|
|
2648
|
+
from;
|
|
2649
|
+
to;
|
|
2631
2650
|
data = {};
|
|
2632
2651
|
};
|
|
2633
2652
|
var Graph = class {
|
package/dist/index.mjs
CHANGED
|
@@ -1349,7 +1349,7 @@ var initializeCoins = (protonChain) => {
|
|
|
1349
1349
|
},
|
|
1350
1350
|
{
|
|
1351
1351
|
allowSwap: false,
|
|
1352
|
-
allowBridge:
|
|
1352
|
+
allowBridge: IS_TESTNET,
|
|
1353
1353
|
allowLend: false,
|
|
1354
1354
|
allowBorrow: false,
|
|
1355
1355
|
name: "Ripple USD",
|
|
@@ -1388,7 +1388,7 @@ var initializeCoins = (protonChain) => {
|
|
|
1388
1388
|
},
|
|
1389
1389
|
{
|
|
1390
1390
|
allowSwap: false,
|
|
1391
|
-
allowBridge:
|
|
1391
|
+
allowBridge: false,
|
|
1392
1392
|
allowLend: false,
|
|
1393
1393
|
allowBorrow: false,
|
|
1394
1394
|
name: "Fidelity Digital Dollar",
|
|
@@ -1413,6 +1413,22 @@ var initializeCoins = (protonChain) => {
|
|
|
1413
1413
|
image: "https://app.metalx.com/img/tokens/fidd.png",
|
|
1414
1414
|
coingeckoId: "fidelity-digital-dollar",
|
|
1415
1415
|
unifiedCryptoassetId: "39549"
|
|
1416
|
+
},
|
|
1417
|
+
// Important! This coin is not being used on MetalX. It is intended only for XMD-ETH purposes.
|
|
1418
|
+
{
|
|
1419
|
+
allowSwap: false,
|
|
1420
|
+
allowBridge: false,
|
|
1421
|
+
allowLend: false,
|
|
1422
|
+
allowBorrow: false,
|
|
1423
|
+
name: "Pax Dollar",
|
|
1424
|
+
coin: "USDP",
|
|
1425
|
+
xtokenSymbol: "XUSDP",
|
|
1426
|
+
xtokenPrecision: 6,
|
|
1427
|
+
xtokenContract: "xtokens",
|
|
1428
|
+
wallets: [],
|
|
1429
|
+
image: "https://app.metalx.com/img/tokens/usdp.png",
|
|
1430
|
+
coingeckoId: "pax-dollar",
|
|
1431
|
+
unifiedCryptoassetId: "3330"
|
|
1416
1432
|
}
|
|
1417
1433
|
];
|
|
1418
1434
|
const walletWithDuplicateChains = coins.find((coin) => {
|
|
@@ -2463,6 +2479,7 @@ var INode = class {
|
|
|
2463
2479
|
this.data = data;
|
|
2464
2480
|
}
|
|
2465
2481
|
}
|
|
2482
|
+
key;
|
|
2466
2483
|
data = {};
|
|
2467
2484
|
};
|
|
2468
2485
|
var ILink = class {
|
|
@@ -2473,6 +2490,8 @@ var ILink = class {
|
|
|
2473
2490
|
this.data = data;
|
|
2474
2491
|
}
|
|
2475
2492
|
}
|
|
2493
|
+
from;
|
|
2494
|
+
to;
|
|
2476
2495
|
data = {};
|
|
2477
2496
|
};
|
|
2478
2497
|
var Graph = class {
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.2.
|
|
8
|
+
"version": "0.2.191",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"typings": "dist/index.d.ts",
|
|
@@ -16,13 +16,6 @@
|
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=10"
|
|
18
18
|
},
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
21
|
-
"dev": "tsup src/index.ts --watch",
|
|
22
|
-
"prepare": "tsup src/index.ts --format cjs,esm --dts",
|
|
23
|
-
"size": "size-limit",
|
|
24
|
-
"analyze": "size-limit --why"
|
|
25
|
-
},
|
|
26
19
|
"devDependencies": {
|
|
27
20
|
"@bloks/numbers": "^27.0.0",
|
|
28
21
|
"@size-limit/preset-small-lib": "^11.2.0",
|
|
@@ -31,11 +24,18 @@
|
|
|
31
24
|
"@typescript-eslint/parser": "^8.36.0",
|
|
32
25
|
"eslint": "^9.30.1",
|
|
33
26
|
"size-limit": "^11.2.0",
|
|
34
|
-
"tsup": "^8.5.0"
|
|
27
|
+
"tsup": "^8.5.0",
|
|
28
|
+
"typescript": "^4.8.4"
|
|
35
29
|
},
|
|
36
30
|
"dependencies": {
|
|
37
31
|
"bignumber.js": "^9.3.1",
|
|
38
32
|
"lodash.clonedeep": "^4.5.0",
|
|
39
33
|
"zod": "^3.19.1"
|
|
34
|
+
},
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
37
|
+
"dev": "tsup src/index.ts --watch",
|
|
38
|
+
"size": "size-limit",
|
|
39
|
+
"analyze": "size-limit --why"
|
|
40
40
|
}
|
|
41
41
|
}
|
package/src/coins.ts
CHANGED
|
@@ -159,7 +159,7 @@ export const explorerLinkByChain = {
|
|
|
159
159
|
export const protonExplorerTxUrl = (
|
|
160
160
|
chain: string,
|
|
161
161
|
txId: string,
|
|
162
|
-
traces?: boolean
|
|
162
|
+
traces?: boolean,
|
|
163
163
|
) =>
|
|
164
164
|
chain === "proton"
|
|
165
165
|
? explorerLinkByChain[Chains.ProtonMainnet](txId, traces)
|
|
@@ -167,7 +167,7 @@ export const protonExplorerTxUrl = (
|
|
|
167
167
|
|
|
168
168
|
// Initialize.
|
|
169
169
|
export const initializeCoins = (
|
|
170
|
-
protonChain: string
|
|
170
|
+
protonChain: string,
|
|
171
171
|
): {
|
|
172
172
|
allCoins: Coin[];
|
|
173
173
|
swapCoins: Coin[];
|
|
@@ -1519,7 +1519,7 @@ export const initializeCoins = (
|
|
|
1519
1519
|
|
|
1520
1520
|
{
|
|
1521
1521
|
allowSwap: false,
|
|
1522
|
-
allowBridge:
|
|
1522
|
+
allowBridge: IS_TESTNET,
|
|
1523
1523
|
allowLend: false,
|
|
1524
1524
|
allowBorrow: false,
|
|
1525
1525
|
name: "Ripple USD",
|
|
@@ -1536,7 +1536,7 @@ export const initializeCoins = (
|
|
|
1536
1536
|
chain: Chains.EthereumMainnet,
|
|
1537
1537
|
network: Networks.ERC20,
|
|
1538
1538
|
precision: 18,
|
|
1539
|
-
contract:
|
|
1539
|
+
contract: "0x8292bb45bf1ee4d140127049757c2e0ff06317ed",
|
|
1540
1540
|
provider: Providers.FIREBLOCKS,
|
|
1541
1541
|
hasWithdrawMemo: false,
|
|
1542
1542
|
},
|
|
@@ -1548,7 +1548,7 @@ export const initializeCoins = (
|
|
|
1548
1548
|
chain: Chains.EthereumSepolia,
|
|
1549
1549
|
network: Networks.ERC20,
|
|
1550
1550
|
precision: 18,
|
|
1551
|
-
contract:
|
|
1551
|
+
contract: "0xe101FB315a64cDa9944E570a7bFfaFE60b994b1D",
|
|
1552
1552
|
provider: Providers.FIREBLOCKS,
|
|
1553
1553
|
hasWithdrawMemo: false,
|
|
1554
1554
|
},
|
|
@@ -1560,7 +1560,7 @@ export const initializeCoins = (
|
|
|
1560
1560
|
},
|
|
1561
1561
|
{
|
|
1562
1562
|
allowSwap: false,
|
|
1563
|
-
allowBridge:
|
|
1563
|
+
allowBridge: false,
|
|
1564
1564
|
allowLend: false,
|
|
1565
1565
|
allowBorrow: false,
|
|
1566
1566
|
name: "Fidelity Digital Dollar",
|
|
@@ -1588,6 +1588,22 @@ export const initializeCoins = (
|
|
|
1588
1588
|
coingeckoId: "fidelity-digital-dollar",
|
|
1589
1589
|
unifiedCryptoassetId: "39549",
|
|
1590
1590
|
},
|
|
1591
|
+
// Important! This coin is not being used on MetalX. It is intended only for XMD-ETH purposes.
|
|
1592
|
+
{
|
|
1593
|
+
allowSwap: false,
|
|
1594
|
+
allowBridge: false,
|
|
1595
|
+
allowLend: false,
|
|
1596
|
+
allowBorrow: false,
|
|
1597
|
+
name: "Pax Dollar",
|
|
1598
|
+
coin: "USDP",
|
|
1599
|
+
xtokenSymbol: "XUSDP",
|
|
1600
|
+
xtokenPrecision: 6,
|
|
1601
|
+
xtokenContract: "xtokens",
|
|
1602
|
+
wallets: [],
|
|
1603
|
+
image: "https://app.metalx.com/img/tokens/usdp.png",
|
|
1604
|
+
coingeckoId: "pax-dollar",
|
|
1605
|
+
unifiedCryptoassetId: "3330",
|
|
1606
|
+
},
|
|
1591
1607
|
];
|
|
1592
1608
|
|
|
1593
1609
|
// Validation
|
|
@@ -1597,7 +1613,7 @@ export const initializeCoins = (
|
|
|
1597
1613
|
});
|
|
1598
1614
|
if (walletWithDuplicateChains) {
|
|
1599
1615
|
throw new Error(
|
|
1600
|
-
`Coin ${walletWithDuplicateChains.coin} has duplicate chains in wallet
|
|
1616
|
+
`Coin ${walletWithDuplicateChains.coin} has duplicate chains in wallet`,
|
|
1601
1617
|
);
|
|
1602
1618
|
}
|
|
1603
1619
|
|
|
@@ -1610,7 +1626,7 @@ export const initializeCoins = (
|
|
|
1610
1626
|
loanCoins: coins.filter((coin) => coin.allowLend || coin.allowBorrow),
|
|
1611
1627
|
allEnabledCoins: coins.filter(
|
|
1612
1628
|
(coin) =>
|
|
1613
|
-
coin.allowSwap || coin.allowBridge || coin.xtokenSymbol === "XMD"
|
|
1629
|
+
coin.allowSwap || coin.allowBridge || coin.xtokenSymbol === "XMD",
|
|
1614
1630
|
),
|
|
1615
1631
|
};
|
|
1616
1632
|
};
|