@yodlpay/tokenlists 1.0.2 → 1.1.0

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,6 +1,6 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
- var index = require('./index-BxN39P-j.cjs');
3
+ var index = require('./index-DPv0KZek.cjs');
4
4
 
5
5
 
6
6
 
@@ -23,10 +23,14 @@ exports.getRouter = index.getRouter;
23
23
  exports.getRouterAbi = index.getRouterAbi;
24
24
  exports.getRouterByAddress = index.getRouterByAddress;
25
25
  exports.getShortNames = index.getShortNames;
26
+ exports.getStablecoinCurrency = index.getStablecoinCurrency;
27
+ exports.getStablecoinInfo = index.getStablecoinInfo;
28
+ exports.getStablecoinsByPeg = index.getStablecoinsByPeg;
26
29
  exports.getTokenByAddress = index.getTokenByAddress;
27
30
  exports.getTokenBySymbol = index.getTokenBySymbol;
28
31
  exports.getTokens = index.getTokens;
29
32
  exports.isNativeToken = index.isNativeToken;
33
+ exports.isStablecoin = index.isStablecoin;
30
34
  exports.readFeaturedTokenlist = index.readFeaturedTokenlist;
31
35
  exports.tokenlist = index.tokenlist;
32
36
  exports.writeFeaturedTokenlist = index.writeFeaturedTokenlist;
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;
@@ -5422,7 +5449,7 @@ declare const GENERATED_TOKENLIST_PATH: string;
5422
5449
  /**
5423
5450
  * Compute display decimals based on token characteristics
5424
5451
  */
5425
- declare function computeDisplayDecimals(symbol: string, decimals: number): number;
5452
+ declare function computeDisplayDecimals(symbol: string, decimals: number, coinGeckoId?: string): number;
5426
5453
  /**
5427
5454
  * Read featured tokenlist from disk
5428
5455
  */
@@ -10845,5 +10872,5 @@ declare function getRouterAbi(version: AbiVersion): readonly [{
10845
10872
  readonly type: "receive";
10846
10873
  }];
10847
10874
 
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 };
10875
+ 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, getStablecoinCurrency, getStablecoinInfo, getStablecoinsByPeg, getTokenByAddress, getTokenBySymbol, getTokens, isNativeToken, isStablecoin, readFeaturedTokenlist, tokenlist, writeFeaturedTokenlist, writeGeneratedTokenlist };
10876
+ 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_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 getStablecoinCurrency, z as getStablecoinInfo, A as getStablecoinsByPeg, D as getTokenByAddress, E as getTokenBySymbol, I as getTokens, J as isNativeToken, K as isStablecoin, L as readFeaturedTokenlist, M as tokenlist, O as writeFeaturedTokenlist, P as writeGeneratedTokenlist } from './index-C75unsqB.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,