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.
@@ -1,4 +1,4 @@
1
- import { g as Network, A as VeilixSDK } from '../VeilixSDK-CGbGpth9.cjs';
1
+ import { g as Network, A as VeilixSDK } from '../VeilixSDK-CousE3xD.cjs';
2
2
  import '@solana/web3.js';
3
3
  import 'buffer';
4
4
  import 'fixed-merkle-tree';
@@ -1,4 +1,4 @@
1
- import { g as Network, A as VeilixSDK } from '../VeilixSDK-D1hKisoi.js';
1
+ import { g as Network, A as VeilixSDK } from '../VeilixSDK-DL7hvWhB.js';
2
2
  import '@solana/web3.js';
3
3
  import 'buffer';
4
4
  import 'fixed-merkle-tree';
@@ -7380,6 +7380,13 @@ var TOKEN_DECIMALS = {
7380
7380
  Bitcoin: 8,
7381
7381
  USDC: 6
7382
7382
  };
7383
+ var INDEXER_ASSET_LABELS = {
7384
+ Solana: "SOL",
7385
+ Veilix: "VEILIX",
7386
+ Bitcoin: "WBTC",
7387
+ Ethereum: "WETH",
7388
+ USDC: "USDC"
7389
+ };
7383
7390
  function getTokenDecimals(symbol) {
7384
7391
  return TOKEN_DECIMALS[symbol];
7385
7392
  }
@@ -7394,7 +7401,7 @@ function getDepositQueueForNetwork(network) {
7394
7401
  // package.json
7395
7402
  var package_default = {
7396
7403
  name: "veilix-sdk",
7397
- version: "0.2.2"};
7404
+ version: "0.2.3"};
7398
7405
 
7399
7406
  // src/circuits/constants.ts
7400
7407
  var PACKAGE_NAME = package_default.name;
@@ -16945,14 +16952,24 @@ function decryptData(key, combined) {
16945
16952
 
16946
16953
  // src/tokenAssets.ts
16947
16954
  var WRAPPED_SOL_MINT2 = "So11111111111111111111111111111111111111112";
16955
+ var TOKEN_MINT_TABLES = [MAINNET_TOKEN_MINTS, DEVNET_TOKEN_MINTS];
16956
+ function indexerLabelForMint(mint) {
16957
+ if (mint === WRAPPED_SOL_MINT2) return INDEXER_ASSET_LABELS.Solana;
16958
+ for (const table of TOKEN_MINT_TABLES) {
16959
+ for (const symbol of Object.keys(table)) {
16960
+ if (table[symbol] && table[symbol] === mint) return INDEXER_ASSET_LABELS[symbol];
16961
+ }
16962
+ }
16963
+ return void 0;
16964
+ }
16948
16965
  function resolveIndexerAsset(indexerAsset) {
16949
- if (!indexerAsset) return "SOL";
16966
+ if (!indexerAsset) return INDEXER_ASSET_LABELS.Solana;
16950
16967
  if (typeof indexerAsset === "string") {
16951
- return indexerAsset === WRAPPED_SOL_MINT2 ? "SOL" : indexerAsset;
16968
+ return indexerLabelForMint(indexerAsset) ?? indexerAsset;
16952
16969
  }
16953
- if (indexerAsset.asset) return indexerAsset.asset;
16954
- if (indexerAsset.mint && indexerAsset.mint !== WRAPPED_SOL_MINT2) return indexerAsset.mint;
16955
- return "SOL";
16970
+ if (indexerAsset.asset) return indexerLabelForMint(indexerAsset.asset) ?? indexerAsset.asset;
16971
+ if (indexerAsset.mint) return indexerLabelForMint(indexerAsset.mint) ?? indexerAsset.mint;
16972
+ return INDEXER_ASSET_LABELS.Solana;
16956
16973
  }
16957
16974
  function indexerAssetForMint(mint) {
16958
16975
  return resolveIndexerAsset(mint ?? null);