@yodlpay/tokenlists 1.1.3 → 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 +5 -1
- package/dist/{ccip-D_Tl0Okc.js → ccip-BFX5m2j7.js} +1 -1
- package/dist/{ccip-DHHrdFRp.cjs → ccip-DvTO-hKk.cjs} +1 -1
- package/dist/{index-DexvUg55.cjs → index-BrbtgPTk.cjs} +100 -9
- package/dist/{index-DDrpnhH2.js → index-C1wvdryP.js} +99 -10
- package/dist/index.cjs +3 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +1 -1
- package/dist/tokens/stablecoin-registry.json +67 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,6 +91,8 @@ getStablecoinCurrency('usd-coin'); // 'USD'
|
|
|
91
91
|
getStablecoinCurrency('euro-coin'); // 'EUR'
|
|
92
92
|
|
|
93
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)
|
|
94
96
|
const token = getTokenBySymbol('USDC', 1);
|
|
95
97
|
const info = getStablecoinInfo(token);
|
|
96
98
|
// { isStablecoin: true, peggedTo: 'USD' }
|
|
@@ -175,7 +177,9 @@ The package maintains these data files:
|
|
|
175
177
|
- Circulating/max supply ratio (must be ≥ 0.1%)
|
|
176
178
|
5. **Remove duplicates** - Tokens with duplicate symbols on the same chain are removed
|
|
177
179
|
6. **Write to generated list** - Updates `tokenlist-generated.json`
|
|
178
|
-
7. **Update stablecoin registry** - Fetches stablecoin data from CoinGecko and updates `stablecoin-registry.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.
|
|
179
183
|
|
|
180
184
|
### Featured Token Overrides
|
|
181
185
|
|
|
@@ -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-
|
|
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 }){
|
|
@@ -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-
|
|
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
|
-
|
|
48081
|
-
if (
|
|
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:
|
|
48084
|
-
peggedTo:
|
|
48172
|
+
isStablecoin: true,
|
|
48173
|
+
peggedTo: SYMBOL_REGISTRY[symbolUpper]
|
|
48085
48174
|
};
|
|
48086
48175
|
}
|
|
48087
48176
|
return {
|
|
48088
|
-
isStablecoin:
|
|
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-
|
|
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
|
-
|
|
48081
|
-
if (
|
|
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:
|
|
48084
|
-
peggedTo:
|
|
48172
|
+
isStablecoin: true,
|
|
48173
|
+
peggedTo: SYMBOL_REGISTRY[symbolUpper]
|
|
48085
48174
|
};
|
|
48086
48175
|
}
|
|
48087
48176
|
return {
|
|
48088
|
-
isStablecoin:
|
|
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 {
|
|
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-
|
|
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 };
|
|
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 };
|
|
10857
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
|
|
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-
|
|
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
|
}
|