@yodlpay/tokenlists 1.1.2 → 1.1.4

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/README.md CHANGED
@@ -17,21 +17,20 @@ yarn add @yodlpay/tokenlists
17
17
  ```typescript
18
18
  import {
19
19
  chains,
20
- getChain,
21
20
  getChainById,
22
- getChains,
23
21
  getShortNames,
24
22
  getNativeToken,
25
23
  getRouter,
26
24
  getRouterByAddress,
27
- type YodlChain
25
+ type YodlChain,
26
+ type RouterConfig,
27
+ type YodlChainExtension
28
28
  } from '@yodlpay/tokenlists';
29
29
 
30
30
  // Get all supported chains
31
- const allChains = getChains();
31
+ const allChains = chains;
32
32
 
33
33
  // Get chain by ID
34
- const ethereum = getChain(1);
35
34
  const arbitrum = getChainById(42161);
36
35
 
37
36
  // Get router config for a chain
@@ -92,6 +91,8 @@ getStablecoinCurrency('usd-coin'); // 'USD'
92
91
  getStablecoinCurrency('euro-coin'); // 'EUR'
93
92
 
94
93
  // Get detailed stablecoin info for a token
94
+ // Checks coinGeckoId first, falls back to symbol if not in registry
95
+ // (handles bridged stablecoins like l2-standard-bridged-usdt-base)
95
96
  const token = getTokenBySymbol('USDC', 1);
96
97
  const info = getStablecoinInfo(token);
97
98
  // { isStablecoin: true, peggedTo: 'USD' }
@@ -124,6 +125,7 @@ const router = getContract({
124
125
 
125
126
  ## Supported Chains
126
127
 
128
+ ### Mainnets
127
129
  - Ethereum (1)
128
130
  - Arbitrum (42161)
129
131
  - Optimism (10)
@@ -132,6 +134,10 @@ const router = getContract({
132
134
  - Gnosis (100)
133
135
  - BSC (56)
134
136
 
137
+ ### Testnets
138
+ - Arbitrum Sepolia (421614)
139
+ - BSC Testnet (97)
140
+
135
141
  ## Development
136
142
 
137
143
  ```bash
@@ -145,7 +151,7 @@ yarn test
145
151
  yarn build
146
152
 
147
153
  # Update token lists
148
- yarn update
154
+ yarn update:tokens
149
155
 
150
156
  # Type check
151
157
  yarn typecheck
@@ -153,29 +159,13 @@ yarn typecheck
153
159
 
154
160
  ## Token List Update Process
155
161
 
156
- The package maintains two token lists:
162
+ The package maintains these data files:
157
163
 
158
164
  - **Featured** (`tokenlist-featured.json`) - Manually curated tokens with metadata updated from on-chain data
159
165
  - **Generated** (`tokenlist-generated.json`) - Auto-fetched tokens from external sources (cross-checked with other services as they are added)
166
+ - **Stablecoin Registry** (`stablecoin-registry.json`) - Mapping of CoinGecko IDs to fiat currencies (USD, EUR, etc.) for stablecoin detection
160
167
 
161
- ### Updating Stablecoin Registry
162
-
163
- ```bash
164
- yarn update:stablecoins
165
- ```
166
-
167
- Fetches stablecoin data from CoinGecko category APIs and updates `stablecoin-registry.json`. The script:
168
-
169
- 1. Fetches tokens from CoinGecko stablecoin categories (USD, EUR, GBP, JPY, etc.)
170
- 2. Filters to only include tokens present in the tokenlists (by coinGeckoId)
171
- 3. Outputs a simple mapping of `coinGeckoId → peggedTo` currency
172
-
173
- To update everything at once:
174
- ```bash
175
- yarn update:all # Runs update:stablecoins then update
176
- ```
177
-
178
- ### How `yarn update` Works
168
+ ### How `yarn update:tokens` Works
179
169
 
180
170
  1. **Fetch tokens from Relay Link API** - Discovers tokens across all supported chains
181
171
  2. **Enrich with on-chain data** - Verifies name, symbol, and decimals directly from contracts
@@ -187,6 +177,9 @@ yarn update:all # Runs update:stablecoins then update
187
177
  - Circulating/max supply ratio (must be ≥ 0.1%)
188
178
  5. **Remove duplicates** - Tokens with duplicate symbols on the same chain are removed
189
179
  6. **Write to generated list** - Updates `tokenlist-generated.json`
180
+ 7. **Update stablecoin registry** - Fetches stablecoin data from CoinGecko Pro API and updates `stablecoin-registry.json`
181
+
182
+ > **Note:** Steps 3, 4, and 7 use the CoinGecko Pro API and require a `COINGECKO_API_KEY` environment variable with a valid Pro API key.
190
183
 
191
184
  ### Featured Token Overrides
192
185
 
@@ -205,29 +198,13 @@ When querying by symbol, the `primary` address is returned. Use `getTokenByAddre
205
198
 
206
199
  ### Token Logo Management
207
200
 
208
- Token logos are stored in Vercel Blob storage and managed with two scripts:
201
+ Token logos are stored in Vercel Blob storage. Run:
209
202
 
210
- **Download logos locally:**
211
203
  ```bash
212
- yarn download-logos
204
+ yarn update:logos
213
205
  ```
214
- - Downloads logos from external URLs in token lists
215
- - Converts all images to optimized WebP format (512px max, 85% quality)
216
- - Upscales small images with [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN) if available
217
- - Saves to `logos/tokens/` directory
218
- - Updates token lists to point to Vercel Blob URLs
219
206
 
220
- **Upload logos to Vercel Blob:**
221
- ```bash
222
- # Upload new logos (skip existing)
223
- yarn upload-logos
224
-
225
- # Force re-upload all logos
226
- yarn upload-logos --force
227
-
228
- # Preview without uploading
229
- yarn upload-logos --dry-run
230
- ```
207
+ This downloads logos from external URLs, converts them to optimized WebP format, and uploads them to Vercel Blob storage.
231
208
 
232
209
  Requires `BLOB_READ_WRITE_TOKEN` environment variable (set in `.env` or export).
233
210
 
@@ -1,4 +1,4 @@
1
- import { B as BaseError, g as getUrl, s as stringify, d as decodeErrorResult, i as isAddressEqual, l as localBatchGatewayUrl, a as localBatchGatewayRequest, c as call, b as concat, e as encodeAbiParameters, H as HttpRequestError, f as isHex } from './index-DDrpnhH2.js';
1
+ import { B as BaseError, g as getUrl, s as stringify, d as decodeErrorResult, i as isAddressEqual, l as localBatchGatewayUrl, a as localBatchGatewayRequest, c as call, b as concat, e as encodeAbiParameters, H as HttpRequestError, f as isHex } from './index-C1wvdryP.js';
2
2
 
3
3
  class OffchainLookupError extends BaseError {
4
4
  constructor({ callbackSelector, cause, data, extraData, sender, urls }){
@@ -1,4 +1,4 @@
1
- var index = require('./index-DexvUg55.cjs');
1
+ var index = require('./index-BrbtgPTk.cjs');
2
2
 
3
3
  class OffchainLookupError extends index.BaseError {
4
4
  constructor({ callbackSelector, cause, data, extraData, sender, urls }){
@@ -16672,7 +16672,7 @@ const schedulerCache = /*#__PURE__*/ new Map();
16672
16672
  } catch (err) {
16673
16673
  const data = getRevertErrorData(err);
16674
16674
  // Check for CCIP-Read offchain lookup signature.
16675
- const { offchainLookup, offchainLookupSignature } = await Promise.resolve().then(function () { return require('./ccip-DHHrdFRp.cjs'); });
16675
+ const { offchainLookup, offchainLookupSignature } = await Promise.resolve().then(function () { return require('./ccip-DvTO-hKk.cjs'); });
16676
16676
  if (client.ccipRead !== false && data?.slice(0, 10) === offchainLookupSignature && to) return {
16677
16677
  data: await offchainLookup(client, {
16678
16678
  data,
@@ -47997,7 +47997,6 @@ var stablecoins = {
47997
47997
  ageur: "EUR",
47998
47998
  "agora-dollar": "USD",
47999
47999
  "alchemix-usd": "USD",
48000
- "binance-peg-busd": "USD",
48001
48000
  "bitcoin-usd-btcfi": "USD",
48002
48001
  crvusd: "USD",
48003
48002
  dai: "USD",
@@ -48056,18 +48055,97 @@ var stablecoins = {
48056
48055
  xdai: "USD",
48057
48056
  xsgd: "SGD"
48058
48057
  };
48058
+ var symbols = {
48059
+ AGEUR: "EUR",
48060
+ ALUSD: "USD",
48061
+ AUSD: "USD",
48062
+ BNBUSD: "USD",
48063
+ BOLD: "USD",
48064
+ BTCUSD: "USD",
48065
+ CRVUSD: "USD",
48066
+ DAI: "USD",
48067
+ DOC: "USD",
48068
+ DOLA: "USD",
48069
+ DUSD: "USD",
48070
+ EURC: "EUR",
48071
+ "EURC.E": "EUR",
48072
+ EURCV: "EUR",
48073
+ EURE: "EUR",
48074
+ EUROC: "EUR",
48075
+ EUROP: "EUR",
48076
+ EURQ: "EUR",
48077
+ EURR: "EUR",
48078
+ EURS: "EUR",
48079
+ EUSD: "USD",
48080
+ FDUSD: "USD",
48081
+ FRAX: "USD",
48082
+ FRXUSD: "USD",
48083
+ FXUSD: "USD",
48084
+ GHO: "USD",
48085
+ GUSD: "USD",
48086
+ IDRX: "IDR",
48087
+ JPYC: "JPY",
48088
+ KRWQ: "KRW",
48089
+ LUAUSD: "USD",
48090
+ LUSD: "USD",
48091
+ OUSD: "USD",
48092
+ OUSDT: "USD",
48093
+ PYUSD: "USD",
48094
+ RLUSD: "USD",
48095
+ SUSD: "USD",
48096
+ TUSD: "USD",
48097
+ "USD+": "USD",
48098
+ "USD₮0": "USD",
48099
+ USD0: "USD",
48100
+ USD1: "USD",
48101
+ USD3: "USD",
48102
+ USDA: "USD",
48103
+ USDC: "USD",
48104
+ USDCV: "USD",
48105
+ USDD: "USD",
48106
+ USDE: "USD",
48107
+ USDF: "USD",
48108
+ USDG: "USD",
48109
+ USDKG: "USD",
48110
+ USDP: "USD",
48111
+ USDQ: "USD",
48112
+ USDR: "USD",
48113
+ USDS: "USD",
48114
+ USDT: "USD",
48115
+ USDT0: "USD",
48116
+ USDTB: "USD",
48117
+ VAI: "USD",
48118
+ VEUR: "EUR",
48119
+ WXDAI: "USD",
48120
+ XDAI: "USD",
48121
+ XSGD: "SGD",
48122
+ YUSD: "USD"
48123
+ };
48059
48124
  var registryData = {
48060
- stablecoins: stablecoins
48125
+ stablecoins: stablecoins,
48126
+ symbols: symbols
48061
48127
  };
48062
48128
 
48063
48129
  // Lookup by coinGeckoId -> peggedTo currency
48064
48130
  const REGISTRY = registryData.stablecoins;
48131
+ // Lookup by symbol -> peggedTo currency (fallback for tokens without coinGeckoId)
48132
+ const SYMBOL_REGISTRY = registryData.symbols ?? {};
48065
48133
  /**
48066
48134
  * Check if a token is a stablecoin by its CoinGecko ID.
48067
48135
  */ function isStablecoin(coinGeckoId) {
48068
48136
  if (!coinGeckoId) return false;
48069
48137
  return coinGeckoId in REGISTRY;
48070
48138
  }
48139
+ /**
48140
+ * Check if a symbol is a known stablecoin symbol.
48141
+ */ function isStablecoinBySymbol(symbol) {
48142
+ return symbol.toUpperCase() in SYMBOL_REGISTRY;
48143
+ }
48144
+ /**
48145
+ * Get the currency that a stablecoin symbol is pegged to.
48146
+ */ function getStablecoinCurrencyBySymbol(symbol) {
48147
+ return SYMBOL_REGISTRY[symbol.toUpperCase()] ?? null;
48148
+ }
48071
48149
  /**
48072
48150
  * Get the currency that a stablecoin is pegged to.
48073
48151
  */ function getStablecoinCurrency(coinGeckoId) {
@@ -48076,17 +48154,28 @@ const REGISTRY = registryData.stablecoins;
48076
48154
  }
48077
48155
  /**
48078
48156
  * Get detailed information about a stablecoin.
48157
+ * Checks by CoinGecko ID first, then falls back to symbol-based detection
48158
+ * when coinGeckoId is absent OR not in the stablecoin registry.
48079
48159
  */ function getStablecoinInfo(token) {
48080
- const peggedTo = token.coinGeckoId ? REGISTRY[token.coinGeckoId] : undefined;
48081
- if (!peggedTo) {
48160
+ // Primary: check by CoinGecko ID
48161
+ if (token.coinGeckoId && token.coinGeckoId in REGISTRY) {
48162
+ return {
48163
+ isStablecoin: true,
48164
+ peggedTo: REGISTRY[token.coinGeckoId]
48165
+ };
48166
+ }
48167
+ // Fallback: check by symbol (case-insensitive)
48168
+ // Used when coinGeckoId is absent OR not in stablecoin registry
48169
+ const symbolUpper = token.symbol.toUpperCase();
48170
+ if (symbolUpper in SYMBOL_REGISTRY) {
48082
48171
  return {
48083
- isStablecoin: false,
48084
- peggedTo: null
48172
+ isStablecoin: true,
48173
+ peggedTo: SYMBOL_REGISTRY[symbolUpper]
48085
48174
  };
48086
48175
  }
48087
48176
  return {
48088
- isStablecoin: true,
48089
- peggedTo
48177
+ isStablecoin: false,
48178
+ peggedTo: null
48090
48179
  };
48091
48180
  }
48092
48181
  /**
@@ -48233,6 +48322,7 @@ exports.getRouterAbi = getRouterAbi;
48233
48322
  exports.getRouterByAddress = getRouterByAddress;
48234
48323
  exports.getShortNames = getShortNames;
48235
48324
  exports.getStablecoinCurrency = getStablecoinCurrency;
48325
+ exports.getStablecoinCurrencyBySymbol = getStablecoinCurrencyBySymbol;
48236
48326
  exports.getStablecoinInfo = getStablecoinInfo;
48237
48327
  exports.getStablecoinsByPeg = getStablecoinsByPeg;
48238
48328
  exports.getTokenByAddress = getTokenByAddress;
@@ -48243,6 +48333,7 @@ exports.isAddressEqual = isAddressEqual;
48243
48333
  exports.isHex = isHex;
48244
48334
  exports.isNativeToken = isNativeToken;
48245
48335
  exports.isStablecoin = isStablecoin;
48336
+ exports.isStablecoinBySymbol = isStablecoinBySymbol;
48246
48337
  exports.localBatchGatewayRequest = localBatchGatewayRequest;
48247
48338
  exports.localBatchGatewayUrl = localBatchGatewayUrl;
48248
48339
  exports.stringify = stringify$1;
@@ -16672,7 +16672,7 @@ const schedulerCache = /*#__PURE__*/ new Map();
16672
16672
  } catch (err) {
16673
16673
  const data = getRevertErrorData(err);
16674
16674
  // Check for CCIP-Read offchain lookup signature.
16675
- const { offchainLookup, offchainLookupSignature } = await import('./ccip-D_Tl0Okc.js');
16675
+ const { offchainLookup, offchainLookupSignature } = await import('./ccip-BFX5m2j7.js');
16676
16676
  if (client.ccipRead !== false && data?.slice(0, 10) === offchainLookupSignature && to) return {
16677
16677
  data: await offchainLookup(client, {
16678
16678
  data,
@@ -47997,7 +47997,6 @@ var stablecoins = {
47997
47997
  ageur: "EUR",
47998
47998
  "agora-dollar": "USD",
47999
47999
  "alchemix-usd": "USD",
48000
- "binance-peg-busd": "USD",
48001
48000
  "bitcoin-usd-btcfi": "USD",
48002
48001
  crvusd: "USD",
48003
48002
  dai: "USD",
@@ -48056,18 +48055,97 @@ var stablecoins = {
48056
48055
  xdai: "USD",
48057
48056
  xsgd: "SGD"
48058
48057
  };
48058
+ var symbols = {
48059
+ AGEUR: "EUR",
48060
+ ALUSD: "USD",
48061
+ AUSD: "USD",
48062
+ BNBUSD: "USD",
48063
+ BOLD: "USD",
48064
+ BTCUSD: "USD",
48065
+ CRVUSD: "USD",
48066
+ DAI: "USD",
48067
+ DOC: "USD",
48068
+ DOLA: "USD",
48069
+ DUSD: "USD",
48070
+ EURC: "EUR",
48071
+ "EURC.E": "EUR",
48072
+ EURCV: "EUR",
48073
+ EURE: "EUR",
48074
+ EUROC: "EUR",
48075
+ EUROP: "EUR",
48076
+ EURQ: "EUR",
48077
+ EURR: "EUR",
48078
+ EURS: "EUR",
48079
+ EUSD: "USD",
48080
+ FDUSD: "USD",
48081
+ FRAX: "USD",
48082
+ FRXUSD: "USD",
48083
+ FXUSD: "USD",
48084
+ GHO: "USD",
48085
+ GUSD: "USD",
48086
+ IDRX: "IDR",
48087
+ JPYC: "JPY",
48088
+ KRWQ: "KRW",
48089
+ LUAUSD: "USD",
48090
+ LUSD: "USD",
48091
+ OUSD: "USD",
48092
+ OUSDT: "USD",
48093
+ PYUSD: "USD",
48094
+ RLUSD: "USD",
48095
+ SUSD: "USD",
48096
+ TUSD: "USD",
48097
+ "USD+": "USD",
48098
+ "USD₮0": "USD",
48099
+ USD0: "USD",
48100
+ USD1: "USD",
48101
+ USD3: "USD",
48102
+ USDA: "USD",
48103
+ USDC: "USD",
48104
+ USDCV: "USD",
48105
+ USDD: "USD",
48106
+ USDE: "USD",
48107
+ USDF: "USD",
48108
+ USDG: "USD",
48109
+ USDKG: "USD",
48110
+ USDP: "USD",
48111
+ USDQ: "USD",
48112
+ USDR: "USD",
48113
+ USDS: "USD",
48114
+ USDT: "USD",
48115
+ USDT0: "USD",
48116
+ USDTB: "USD",
48117
+ VAI: "USD",
48118
+ VEUR: "EUR",
48119
+ WXDAI: "USD",
48120
+ XDAI: "USD",
48121
+ XSGD: "SGD",
48122
+ YUSD: "USD"
48123
+ };
48059
48124
  var registryData = {
48060
- stablecoins: stablecoins
48125
+ stablecoins: stablecoins,
48126
+ symbols: symbols
48061
48127
  };
48062
48128
 
48063
48129
  // Lookup by coinGeckoId -> peggedTo currency
48064
48130
  const REGISTRY = registryData.stablecoins;
48131
+ // Lookup by symbol -> peggedTo currency (fallback for tokens without coinGeckoId)
48132
+ const SYMBOL_REGISTRY = registryData.symbols ?? {};
48065
48133
  /**
48066
48134
  * Check if a token is a stablecoin by its CoinGecko ID.
48067
48135
  */ function isStablecoin(coinGeckoId) {
48068
48136
  if (!coinGeckoId) return false;
48069
48137
  return coinGeckoId in REGISTRY;
48070
48138
  }
48139
+ /**
48140
+ * Check if a symbol is a known stablecoin symbol.
48141
+ */ function isStablecoinBySymbol(symbol) {
48142
+ return symbol.toUpperCase() in SYMBOL_REGISTRY;
48143
+ }
48144
+ /**
48145
+ * Get the currency that a stablecoin symbol is pegged to.
48146
+ */ function getStablecoinCurrencyBySymbol(symbol) {
48147
+ return SYMBOL_REGISTRY[symbol.toUpperCase()] ?? null;
48148
+ }
48071
48149
  /**
48072
48150
  * Get the currency that a stablecoin is pegged to.
48073
48151
  */ function getStablecoinCurrency(coinGeckoId) {
@@ -48076,17 +48154,28 @@ const REGISTRY = registryData.stablecoins;
48076
48154
  }
48077
48155
  /**
48078
48156
  * Get detailed information about a stablecoin.
48157
+ * Checks by CoinGecko ID first, then falls back to symbol-based detection
48158
+ * when coinGeckoId is absent OR not in the stablecoin registry.
48079
48159
  */ function getStablecoinInfo(token) {
48080
- const peggedTo = token.coinGeckoId ? REGISTRY[token.coinGeckoId] : undefined;
48081
- if (!peggedTo) {
48160
+ // Primary: check by CoinGecko ID
48161
+ if (token.coinGeckoId && token.coinGeckoId in REGISTRY) {
48162
+ return {
48163
+ isStablecoin: true,
48164
+ peggedTo: REGISTRY[token.coinGeckoId]
48165
+ };
48166
+ }
48167
+ // Fallback: check by symbol (case-insensitive)
48168
+ // Used when coinGeckoId is absent OR not in stablecoin registry
48169
+ const symbolUpper = token.symbol.toUpperCase();
48170
+ if (symbolUpper in SYMBOL_REGISTRY) {
48082
48171
  return {
48083
- isStablecoin: false,
48084
- peggedTo: null
48172
+ isStablecoin: true,
48173
+ peggedTo: SYMBOL_REGISTRY[symbolUpper]
48085
48174
  };
48086
48175
  }
48087
48176
  return {
48088
- isStablecoin: true,
48089
- peggedTo
48177
+ isStablecoin: false,
48178
+ peggedTo: null
48090
48179
  };
48091
48180
  }
48092
48181
  /**
@@ -48212,4 +48301,4 @@ function getNativeWrappedToken(chainId) {
48212
48301
  return token;
48213
48302
  }
48214
48303
 
48215
- export { getTokens as A, BaseError$1 as B, isNativeToken as C, isStablecoin as D, tokenlist as E, FEATURED_TOKEN_OVERRIDES as F, HttpRequestError as H, NATIVE_TOKEN_ADDRESS as N, YODL_ROUTER_ABIS as Y, localBatchGatewayRequest as a, concat$1 as b, call as c, decodeErrorResult as d, encodeAbiParameters as e, isHex as f, getUrl as g, chains as h, isAddressEqual as i, computeDisplayDecimals as j, getChainById as k, localBatchGatewayUrl as l, getFeaturedTokenBySymbol as m, getNativeToken as n, getNativeWrappedToken as o, getPublicClient as p, getRouter as q, getRouterAbi as r, stringify$1 as s, getRouterByAddress as t, getShortNames as u, getStablecoinCurrency as v, getStablecoinInfo as w, getStablecoinsByPeg as x, getTokenByAddress as y, getTokenBySymbol as z };
48304
+ export { getTokenBySymbol as A, BaseError$1 as B, getTokens as C, isNativeToken as D, isStablecoin as E, FEATURED_TOKEN_OVERRIDES as F, isStablecoinBySymbol as G, HttpRequestError as H, tokenlist as I, NATIVE_TOKEN_ADDRESS as N, YODL_ROUTER_ABIS as Y, localBatchGatewayRequest as a, concat$1 as b, call as c, decodeErrorResult as d, encodeAbiParameters as e, isHex as f, getUrl as g, chains as h, isAddressEqual as i, computeDisplayDecimals as j, getChainById as k, localBatchGatewayUrl as l, getFeaturedTokenBySymbol as m, getNativeToken as n, getNativeWrappedToken as o, getPublicClient as p, getRouter as q, getRouterAbi as r, stringify$1 as s, getRouterByAddress as t, getShortNames as u, getStablecoinCurrency as v, getStablecoinCurrencyBySymbol as w, getStablecoinInfo as x, getStablecoinsByPeg as y, getTokenByAddress as z };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
 
3
- var index = require('./index-DexvUg55.cjs');
3
+ var index = require('./index-BrbtgPTk.cjs');
4
4
 
5
5
 
6
6
 
@@ -19,6 +19,7 @@ exports.getRouterAbi = index.getRouterAbi;
19
19
  exports.getRouterByAddress = index.getRouterByAddress;
20
20
  exports.getShortNames = index.getShortNames;
21
21
  exports.getStablecoinCurrency = index.getStablecoinCurrency;
22
+ exports.getStablecoinCurrencyBySymbol = index.getStablecoinCurrencyBySymbol;
22
23
  exports.getStablecoinInfo = index.getStablecoinInfo;
23
24
  exports.getStablecoinsByPeg = index.getStablecoinsByPeg;
24
25
  exports.getTokenByAddress = index.getTokenByAddress;
@@ -26,4 +27,5 @@ exports.getTokenBySymbol = index.getTokenBySymbol;
26
27
  exports.getTokens = index.getTokens;
27
28
  exports.isNativeToken = index.isNativeToken;
28
29
  exports.isStablecoin = index.isStablecoin;
30
+ exports.isStablecoinBySymbol = index.isStablecoinBySymbol;
29
31
  exports.tokenlist = index.tokenlist;
package/dist/index.d.ts CHANGED
@@ -5407,12 +5407,22 @@ type StablecoinCheckResult = StablecoinInfo | NotStablecoinInfo;
5407
5407
  * Check if a token is a stablecoin by its CoinGecko ID.
5408
5408
  */
5409
5409
  declare function isStablecoin(coinGeckoId: string | undefined): boolean;
5410
+ /**
5411
+ * Check if a symbol is a known stablecoin symbol.
5412
+ */
5413
+ declare function isStablecoinBySymbol(symbol: string): boolean;
5414
+ /**
5415
+ * Get the currency that a stablecoin symbol is pegged to.
5416
+ */
5417
+ declare function getStablecoinCurrencyBySymbol(symbol: string): FiatCurrency | null;
5410
5418
  /**
5411
5419
  * Get the currency that a stablecoin is pegged to.
5412
5420
  */
5413
5421
  declare function getStablecoinCurrency(coinGeckoId: string | undefined): FiatCurrency | null;
5414
5422
  /**
5415
5423
  * Get detailed information about a stablecoin.
5424
+ * Checks by CoinGecko ID first, then falls back to symbol-based detection
5425
+ * when coinGeckoId is absent OR not in the stablecoin registry.
5416
5426
  */
5417
5427
  declare function getStablecoinInfo(token: TokenInfo): StablecoinCheckResult;
5418
5428
  /**
@@ -10853,5 +10863,5 @@ declare function getRouterAbi(version: AbiVersion): readonly [{
10853
10863
  readonly type: "receive";
10854
10864
  }];
10855
10865
 
10856
- export { FEATURED_TOKEN_OVERRIDES, NATIVE_TOKEN_ADDRESS, YODL_ROUTER_ABIS, chains, computeDisplayDecimals, getChainById, getFeaturedTokenBySymbol, getNativeToken, getNativeWrappedToken, getPublicClient, getRouter, getRouterAbi, getRouterByAddress, getShortNames, getStablecoinCurrency, getStablecoinInfo, getStablecoinsByPeg, getTokenByAddress, getTokenBySymbol, getTokens, isNativeToken, isStablecoin, tokenlist };
10857
- export type { AbiVersion, FiatCurrency, NotStablecoinInfo, RouterAbiMap, StablecoinCheckResult, StablecoinInfo, TokenInfo, YodlChain };
10866
+ export { FEATURED_TOKEN_OVERRIDES, NATIVE_TOKEN_ADDRESS, YODL_ROUTER_ABIS, chains, computeDisplayDecimals, getChainById, getFeaturedTokenBySymbol, getNativeToken, getNativeWrappedToken, getPublicClient, getRouter, getRouterAbi, getRouterByAddress, getShortNames, getStablecoinCurrency, getStablecoinCurrencyBySymbol, getStablecoinInfo, getStablecoinsByPeg, getTokenByAddress, getTokenBySymbol, getTokens, isNativeToken, isStablecoin, isStablecoinBySymbol, tokenlist };
10867
+ export type { AbiVersion, FiatCurrency, NotStablecoinInfo, RouterAbiMap, RouterConfig, StablecoinCheckResult, StablecoinInfo, TokenInfo, YodlChain, YodlChainExtension };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { F as FEATURED_TOKEN_OVERRIDES, N as NATIVE_TOKEN_ADDRESS, Y as YODL_ROUTER_ABIS, h as chains, j as computeDisplayDecimals, k as getChainById, m as getFeaturedTokenBySymbol, n as getNativeToken, o as getNativeWrappedToken, p as getPublicClient, q as getRouter, r as getRouterAbi, t as getRouterByAddress, u as getShortNames, v as getStablecoinCurrency, w as getStablecoinInfo, x as getStablecoinsByPeg, y as getTokenByAddress, z as getTokenBySymbol, A as getTokens, C as isNativeToken, D as isStablecoin, E as tokenlist } from './index-DDrpnhH2.js';
1
+ export { F as FEATURED_TOKEN_OVERRIDES, N as NATIVE_TOKEN_ADDRESS, Y as YODL_ROUTER_ABIS, h as chains, j as computeDisplayDecimals, k as getChainById, m as getFeaturedTokenBySymbol, n as getNativeToken, o as getNativeWrappedToken, p as getPublicClient, q as getRouter, r as getRouterAbi, t as getRouterByAddress, u as getShortNames, v as getStablecoinCurrency, w as getStablecoinCurrencyBySymbol, x as getStablecoinInfo, y as getStablecoinsByPeg, z as getTokenByAddress, A as getTokenBySymbol, C as getTokens, D as isNativeToken, E as isStablecoin, G as isStablecoinBySymbol, I as tokenlist } from './index-C1wvdryP.js';
@@ -1,11 +1,10 @@
1
1
  {
2
- "timestamp": "2026-01-27T17:51:16.448Z",
2
+ "timestamp": "2026-01-29T19:46:56.637Z",
3
3
  "stablecoins": {
4
4
  "aegis-yusd": "USD",
5
5
  "ageur": "EUR",
6
6
  "agora-dollar": "USD",
7
7
  "alchemix-usd": "USD",
8
- "binance-peg-busd": "USD",
9
8
  "bitcoin-usd-btcfi": "USD",
10
9
  "crvusd": "USD",
11
10
  "dai": "USD",
@@ -63,5 +62,71 @@
63
62
  "web-3-dollar": "USD",
64
63
  "xdai": "USD",
65
64
  "xsgd": "SGD"
65
+ },
66
+ "symbols": {
67
+ "AGEUR": "EUR",
68
+ "ALUSD": "USD",
69
+ "AUSD": "USD",
70
+ "BNBUSD": "USD",
71
+ "BOLD": "USD",
72
+ "BTCUSD": "USD",
73
+ "CRVUSD": "USD",
74
+ "DAI": "USD",
75
+ "DOC": "USD",
76
+ "DOLA": "USD",
77
+ "DUSD": "USD",
78
+ "EURC": "EUR",
79
+ "EURC.E": "EUR",
80
+ "EURCV": "EUR",
81
+ "EURE": "EUR",
82
+ "EUROC": "EUR",
83
+ "EUROP": "EUR",
84
+ "EURQ": "EUR",
85
+ "EURR": "EUR",
86
+ "EURS": "EUR",
87
+ "EUSD": "USD",
88
+ "FDUSD": "USD",
89
+ "FRAX": "USD",
90
+ "FRXUSD": "USD",
91
+ "FXUSD": "USD",
92
+ "GHO": "USD",
93
+ "GUSD": "USD",
94
+ "IDRX": "IDR",
95
+ "JPYC": "JPY",
96
+ "KRWQ": "KRW",
97
+ "LUAUSD": "USD",
98
+ "LUSD": "USD",
99
+ "OUSD": "USD",
100
+ "OUSDT": "USD",
101
+ "PYUSD": "USD",
102
+ "RLUSD": "USD",
103
+ "SUSD": "USD",
104
+ "TUSD": "USD",
105
+ "USD+": "USD",
106
+ "USD₮0": "USD",
107
+ "USD0": "USD",
108
+ "USD1": "USD",
109
+ "USD3": "USD",
110
+ "USDA": "USD",
111
+ "USDC": "USD",
112
+ "USDCV": "USD",
113
+ "USDD": "USD",
114
+ "USDE": "USD",
115
+ "USDF": "USD",
116
+ "USDG": "USD",
117
+ "USDKG": "USD",
118
+ "USDP": "USD",
119
+ "USDQ": "USD",
120
+ "USDR": "USD",
121
+ "USDS": "USD",
122
+ "USDT": "USD",
123
+ "USDT0": "USD",
124
+ "USDTB": "USD",
125
+ "VAI": "USD",
126
+ "VEUR": "EUR",
127
+ "WXDAI": "USD",
128
+ "XDAI": "USD",
129
+ "XSGD": "SGD",
130
+ "YUSD": "USD"
66
131
  }
67
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yodlpay/tokenlists",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "Tokenlist typings, schema and lists.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",