@yodlpay/tokenlists 1.0.2 → 1.1.1

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.cjs CHANGED
@@ -1,13 +1,11 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
- var index = require('./index-BxN39P-j.cjs');
3
+ var index = require('./index-Cy6vXO61.cjs');
4
4
 
5
5
 
6
6
 
7
7
  exports.COINGECKO_PLATFORM_TO_CHAIN_ID = index.COINGECKO_PLATFORM_TO_CHAIN_ID;
8
- exports.FEATURED_TOKENLIST_PATH = index.FEATURED_TOKENLIST_PATH;
9
8
  exports.FEATURED_TOKEN_OVERRIDES = index.FEATURED_TOKEN_OVERRIDES;
10
- exports.GENERATED_TOKENLIST_PATH = index.GENERATED_TOKENLIST_PATH;
11
9
  exports.NATIVE_TOKEN_ADDRESS = index.NATIVE_TOKEN_ADDRESS;
12
10
  exports.YODL_ROUTER_ABIS = index.YODL_ROUTER_ABIS;
13
11
  exports.chains = index.chains;
@@ -23,11 +21,12 @@ exports.getRouter = index.getRouter;
23
21
  exports.getRouterAbi = index.getRouterAbi;
24
22
  exports.getRouterByAddress = index.getRouterByAddress;
25
23
  exports.getShortNames = index.getShortNames;
24
+ exports.getStablecoinCurrency = index.getStablecoinCurrency;
25
+ exports.getStablecoinInfo = index.getStablecoinInfo;
26
+ exports.getStablecoinsByPeg = index.getStablecoinsByPeg;
26
27
  exports.getTokenByAddress = index.getTokenByAddress;
27
28
  exports.getTokenBySymbol = index.getTokenBySymbol;
28
29
  exports.getTokens = index.getTokens;
29
30
  exports.isNativeToken = index.isNativeToken;
30
- exports.readFeaturedTokenlist = index.readFeaturedTokenlist;
31
+ exports.isStablecoin = index.isStablecoin;
31
32
  exports.tokenlist = index.tokenlist;
32
- exports.writeFeaturedTokenlist = index.writeFeaturedTokenlist;
33
- exports.writeGeneratedTokenlist = index.writeGeneratedTokenlist;
package/dist/index.d.ts CHANGED
@@ -5393,6 +5393,33 @@ declare const YODL_ROUTER_ABIS: {
5393
5393
  [K in AbiVersion]: RouterAbiMap[K];
5394
5394
  };
5395
5395
 
5396
+ type FiatCurrency = 'USD' | 'EUR' | 'CHF' | 'BRL' | 'IDR' | 'GBP' | 'JPY' | 'KRW' | 'SGD' | 'AUD' | 'MXN' | 'CNY' | 'TRY' | 'RUB';
5397
+ interface StablecoinInfo {
5398
+ isStablecoin: true;
5399
+ peggedTo: FiatCurrency;
5400
+ }
5401
+ interface NotStablecoinInfo {
5402
+ isStablecoin: false;
5403
+ peggedTo: null;
5404
+ }
5405
+ type StablecoinCheckResult = StablecoinInfo | NotStablecoinInfo;
5406
+ /**
5407
+ * Check if a token is a stablecoin by its CoinGecko ID.
5408
+ */
5409
+ declare function isStablecoin(coinGeckoId: string | undefined): boolean;
5410
+ /**
5411
+ * Get the currency that a stablecoin is pegged to.
5412
+ */
5413
+ declare function getStablecoinCurrency(coinGeckoId: string | undefined): FiatCurrency | null;
5414
+ /**
5415
+ * Get detailed information about a stablecoin.
5416
+ */
5417
+ declare function getStablecoinInfo(token: TokenInfo): StablecoinCheckResult;
5418
+ /**
5419
+ * Get all stablecoin coinGeckoIds pegged to a specific currency.
5420
+ */
5421
+ declare function getStablecoinsByPeg(currency: FiatCurrency): string[];
5422
+
5396
5423
  interface TokenInfo {
5397
5424
  readonly chainId: number;
5398
5425
  readonly address: string;
@@ -5417,27 +5444,10 @@ declare const FEATURED_TOKEN_OVERRIDES: Array<{
5417
5444
  primary: string;
5418
5445
  addresses: string[];
5419
5446
  }>;
5420
- declare const FEATURED_TOKENLIST_PATH: string;
5421
- declare const GENERATED_TOKENLIST_PATH: string;
5422
5447
  /**
5423
5448
  * Compute display decimals based on token characteristics
5424
5449
  */
5425
- declare function computeDisplayDecimals(symbol: string, decimals: number): number;
5426
- /**
5427
- * Read featured tokenlist from disk
5428
- */
5429
- declare function readFeaturedTokenlist(): {
5430
- timestamp: string;
5431
- tokens: TokenInfo[];
5432
- };
5433
- /**
5434
- * Write featured tokenlist to disk
5435
- */
5436
- declare function writeFeaturedTokenlist(tokens: TokenInfo[]): void;
5437
- /**
5438
- * Write generated tokenlist to disk
5439
- */
5440
- declare function writeGeneratedTokenlist(tokens: TokenInfo[]): void;
5450
+ declare function computeDisplayDecimals(symbol: string, decimals: number, coinGeckoId?: string): number;
5441
5451
  declare const tokenlist: TokenInfo[];
5442
5452
  declare function getTokenByAddress(tokenAddress: string, chainId?: number): TokenInfo | undefined;
5443
5453
  declare function getFeaturedTokenBySymbol(tokenSymbol: string, chainId?: number): TokenInfo | undefined;
@@ -10845,5 +10855,5 @@ declare function getRouterAbi(version: AbiVersion): readonly [{
10845
10855
  readonly type: "receive";
10846
10856
  }];
10847
10857
 
10848
- export { COINGECKO_PLATFORM_TO_CHAIN_ID, FEATURED_TOKENLIST_PATH, FEATURED_TOKEN_OVERRIDES, GENERATED_TOKENLIST_PATH, NATIVE_TOKEN_ADDRESS, YODL_ROUTER_ABIS, chains, computeDisplayDecimals, getChain, getChainById, getChains, getFeaturedTokenBySymbol, getNativeToken, getNativeWrappedToken, getPublicClient, getRouter, getRouterAbi, getRouterByAddress, getShortNames, getTokenByAddress, getTokenBySymbol, getTokens, isNativeToken, readFeaturedTokenlist, tokenlist, writeFeaturedTokenlist, writeGeneratedTokenlist };
10849
- export type { AbiVersion, RouterAbiMap, TokenInfo, YodlChain };
10858
+ export { COINGECKO_PLATFORM_TO_CHAIN_ID, FEATURED_TOKEN_OVERRIDES, NATIVE_TOKEN_ADDRESS, YODL_ROUTER_ABIS, chains, computeDisplayDecimals, getChain, getChainById, getChains, getFeaturedTokenBySymbol, getNativeToken, getNativeWrappedToken, getPublicClient, getRouter, getRouterAbi, getRouterByAddress, getShortNames, getStablecoinCurrency, getStablecoinInfo, getStablecoinsByPeg, getTokenByAddress, getTokenBySymbol, getTokens, isNativeToken, isStablecoin, tokenlist };
10859
+ export type { AbiVersion, FiatCurrency, NotStablecoinInfo, RouterAbiMap, StablecoinCheckResult, StablecoinInfo, TokenInfo, YodlChain };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { C as COINGECKO_PLATFORM_TO_CHAIN_ID, F as FEATURED_TOKENLIST_PATH, h as FEATURED_TOKEN_OVERRIDES, G as GENERATED_TOKENLIST_PATH, N as NATIVE_TOKEN_ADDRESS, Y as YODL_ROUTER_ABIS, j as chains, k as computeDisplayDecimals, m as getChain, n as getChainById, o as getChains, p as getFeaturedTokenBySymbol, q as getNativeToken, r as getNativeWrappedToken, t as getPublicClient, u as getRouter, v as getRouterAbi, w as getRouterByAddress, x as getShortNames, y as getTokenByAddress, z as getTokenBySymbol, A as getTokens, D as isNativeToken, E as readFeaturedTokenlist, I as tokenlist, J as writeFeaturedTokenlist, K as writeGeneratedTokenlist } from './index-QILtCArq.js';
1
+ export { C as COINGECKO_PLATFORM_TO_CHAIN_ID, F as FEATURED_TOKEN_OVERRIDES, N as NATIVE_TOKEN_ADDRESS, Y as YODL_ROUTER_ABIS, h as chains, j as computeDisplayDecimals, k as getChain, m as getChainById, n as getChains, o as getFeaturedTokenBySymbol, p as getNativeToken, q as getNativeWrappedToken, r as getPublicClient, t as getRouter, u as getRouterAbi, v as getRouterByAddress, w as getShortNames, x as getStablecoinCurrency, y as getStablecoinInfo, z as getStablecoinsByPeg, A as getTokenByAddress, D as getTokenBySymbol, E as getTokens, G as isNativeToken, I as isStablecoin, J as tokenlist } from './index-BJWL_ASb.js';
@@ -0,0 +1,38 @@
1
+ {
2
+ "timestamp": "2026-01-27T16:08:06.492Z",
3
+ "stablecoins": {
4
+ "ageur": "EUR",
5
+ "agora-dollar": "USD",
6
+ "alchemix-usd": "USD",
7
+ "binance-peg-busd": "USD",
8
+ "crvusd": "USD",
9
+ "dai": "USD",
10
+ "dola-usd": "USD",
11
+ "dollar-on-chain": "USD",
12
+ "electronic-usd": "USD",
13
+ "euro-coin": "EUR",
14
+ "frax-usd": "USD",
15
+ "gho": "USD",
16
+ "idrx": "IDR",
17
+ "jpycoin": "JPY",
18
+ "krwt": "KRW",
19
+ "liquity-bold-2": "USD",
20
+ "liquity-usd": "USD",
21
+ "monerium-eur-money": "EUR",
22
+ "nusd": "USD",
23
+ "parallel-usdp": "USD",
24
+ "quantoz-usdq": "USD",
25
+ "satoshi-stablecoin": "USD",
26
+ "schuman-europ": "EUR",
27
+ "sigma-bnb-usd": "USD",
28
+ "sperax-usd": "USD",
29
+ "stablr-euro": "EUR",
30
+ "tether": "USD",
31
+ "usd-coin": "USD",
32
+ "usd-coinvertible": "USD",
33
+ "usd1-wlfi": "USD",
34
+ "vnx-euro": "EUR",
35
+ "xdai": "USD",
36
+ "xsgd": "SGD"
37
+ }
38
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "timestamp": "2026-01-27T11:39:37.636Z",
2
+ "timestamp": "2026-01-27T16:05:18.239Z",
3
3
  "tokens": [
4
4
  {
5
5
  "chainId": 1,