veilix-sdk 0.2.2 → 0.2.3
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/{VeilixSDK-CGbGpth9.d.cts → VeilixSDK-CousE3xD.d.cts} +1 -1
- package/dist/{VeilixSDK-D1hKisoi.d.ts → VeilixSDK-DL7hvWhB.d.ts} +1 -1
- package/dist/circuits/paths.cjs.map +1 -1
- package/dist/circuits/paths.js.map +1 -1
- package/dist/index.cjs +23 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +23 -6
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +23 -6
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +23 -6
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.cjs
CHANGED
|
@@ -7407,6 +7407,13 @@ var TOKEN_DECIMALS = {
|
|
|
7407
7407
|
Bitcoin: 8,
|
|
7408
7408
|
USDC: 6
|
|
7409
7409
|
};
|
|
7410
|
+
var INDEXER_ASSET_LABELS = {
|
|
7411
|
+
Solana: "SOL",
|
|
7412
|
+
Veilix: "VEILIX",
|
|
7413
|
+
Bitcoin: "WBTC",
|
|
7414
|
+
Ethereum: "WETH",
|
|
7415
|
+
USDC: "USDC"
|
|
7416
|
+
};
|
|
7410
7417
|
function getTokenDecimals(symbol) {
|
|
7411
7418
|
return TOKEN_DECIMALS[symbol];
|
|
7412
7419
|
}
|
|
@@ -7421,7 +7428,7 @@ function getDepositQueueForNetwork(network) {
|
|
|
7421
7428
|
// package.json
|
|
7422
7429
|
var package_default = {
|
|
7423
7430
|
name: "veilix-sdk",
|
|
7424
|
-
version: "0.2.
|
|
7431
|
+
version: "0.2.3"};
|
|
7425
7432
|
|
|
7426
7433
|
// src/circuits/constants.ts
|
|
7427
7434
|
var PACKAGE_NAME = package_default.name;
|
|
@@ -16972,14 +16979,24 @@ function decryptData(key, combined) {
|
|
|
16972
16979
|
|
|
16973
16980
|
// src/tokenAssets.ts
|
|
16974
16981
|
var WRAPPED_SOL_MINT2 = "So11111111111111111111111111111111111111112";
|
|
16982
|
+
var TOKEN_MINT_TABLES = [MAINNET_TOKEN_MINTS, DEVNET_TOKEN_MINTS];
|
|
16983
|
+
function indexerLabelForMint(mint) {
|
|
16984
|
+
if (mint === WRAPPED_SOL_MINT2) return INDEXER_ASSET_LABELS.Solana;
|
|
16985
|
+
for (const table of TOKEN_MINT_TABLES) {
|
|
16986
|
+
for (const symbol of Object.keys(table)) {
|
|
16987
|
+
if (table[symbol] && table[symbol] === mint) return INDEXER_ASSET_LABELS[symbol];
|
|
16988
|
+
}
|
|
16989
|
+
}
|
|
16990
|
+
return void 0;
|
|
16991
|
+
}
|
|
16975
16992
|
function resolveIndexerAsset(indexerAsset) {
|
|
16976
|
-
if (!indexerAsset) return
|
|
16993
|
+
if (!indexerAsset) return INDEXER_ASSET_LABELS.Solana;
|
|
16977
16994
|
if (typeof indexerAsset === "string") {
|
|
16978
|
-
return indexerAsset
|
|
16995
|
+
return indexerLabelForMint(indexerAsset) ?? indexerAsset;
|
|
16979
16996
|
}
|
|
16980
|
-
if (indexerAsset.asset) return indexerAsset.asset;
|
|
16981
|
-
if (indexerAsset.mint
|
|
16982
|
-
return
|
|
16997
|
+
if (indexerAsset.asset) return indexerLabelForMint(indexerAsset.asset) ?? indexerAsset.asset;
|
|
16998
|
+
if (indexerAsset.mint) return indexerLabelForMint(indexerAsset.mint) ?? indexerAsset.mint;
|
|
16999
|
+
return INDEXER_ASSET_LABELS.Solana;
|
|
16983
17000
|
}
|
|
16984
17001
|
function indexerAssetForMint(mint) {
|
|
16985
17002
|
return resolveIndexerAsset(mint ?? null);
|