@yodlpay/tokenlists 0.9.6 → 1.0.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.
Files changed (40) hide show
  1. package/README.md +210 -14
  2. package/dist/ccip-CTW8a_vN.js +184 -0
  3. package/dist/index-Cso5F8p5.js +33269 -0
  4. package/dist/index.js +31 -6
  5. package/dist/tokens/tokenlist-featured.json +905 -0
  6. package/dist/tokens/tokenlist-generated.json +4635 -0
  7. package/package.json +30 -17
  8. package/dist/abis-ts/YodlRouterV0.1.abi.d.ts +0 -131
  9. package/dist/abis-ts/YodlRouterV0.2.abi.d.ts +0 -417
  10. package/dist/abis-ts/YodlRouterV0.3.abi.d.ts +0 -447
  11. package/dist/abis-ts/YodlRouterV0.4.abi.d.ts +0 -459
  12. package/dist/abis-ts/YodlRouterV0.5.abi.d.ts +0 -458
  13. package/dist/abis-ts/YodlRouterV0.6.abi.d.ts +0 -796
  14. package/dist/abis-ts/YodlRouterV0.7.abi.d.ts +0 -695
  15. package/dist/abis-ts/YodlRouterV0.8.abi.d.ts +0 -986
  16. package/dist/abis-ts/YodlRouterV0.9.abi.d.ts +0 -978
  17. package/dist/abis.d.ts +0 -67
  18. package/dist/chainlist-v1.json +0 -193
  19. package/dist/curve.json +0 -30
  20. package/dist/diffTokenLists.d.ts +0 -30
  21. package/dist/fiatCurrencies.json +0 -158
  22. package/dist/getVersionUpgrade.d.ts +0 -17
  23. package/dist/index.d.ts +0 -5576
  24. package/dist/isVersionUpdate.d.ts +0 -5
  25. package/dist/minVersionBump.d.ts +0 -8
  26. package/dist/nextVersion.d.ts +0 -8
  27. package/dist/pricefeeds.json +0 -16669
  28. package/dist/routerlist-v1.d.ts +0 -14
  29. package/dist/schema.tokenlist-v1.json +0 -329
  30. package/dist/tokenlist-featured.json +0 -1549
  31. package/dist/tokenlist-generated.json +0 -3404
  32. package/dist/tokenlists.cjs.development.js +0 -28584
  33. package/dist/tokenlists.cjs.development.js.map +0 -1
  34. package/dist/tokenlists.cjs.production.min.js +0 -2
  35. package/dist/tokenlists.cjs.production.min.js.map +0 -1
  36. package/dist/tokenlists.esm.js +0 -28552
  37. package/dist/tokenlists.esm.js.map +0 -1
  38. package/dist/types.d.ts +0 -98
  39. package/dist/update.d.ts +0 -77
  40. package/dist/versionComparator.d.ts +0 -8
package/dist/types.d.ts DELETED
@@ -1,98 +0,0 @@
1
- import { AbiVersion } from 'abis';
2
- import { Address } from 'viem';
3
- declare type ExtensionValue = string | number | boolean | null | undefined;
4
- export declare type TokenListTagNames = 'Mainnet' | 'Optimism' | 'Arbitrum' | 'Avalanche' | 'Base' | 'Gnosis' | 'TESTNET' | 'Stablecoin' | 'USD' | 'EUR' | 'Top10' | 'Native Token' | 'Wrapped' | 'Featured';
5
- export interface CurveRouterInfo {
6
- readonly chainId: number;
7
- readonly address: string;
8
- }
9
- export interface RouterInfo {
10
- readonly chainId: number;
11
- readonly address: Address;
12
- readonly timestamp: string;
13
- readonly version: AbiVersion;
14
- readonly fee: string;
15
- }
16
- export interface TestnetFaucetInfo {
17
- readonly chainId: number;
18
- readonly address: string;
19
- readonly token: string;
20
- }
21
- export interface ChainInfo {
22
- readonly chainId: number;
23
- readonly chainName: string;
24
- readonly shortName: string;
25
- readonly logoUri: string;
26
- readonly explorerUrl: string;
27
- readonly timestamp: string;
28
- readonly rpcUrls: string[];
29
- readonly wrappedNativeToken: string;
30
- readonly nativeTokenName: string;
31
- readonly feeTreasury?: string;
32
- readonly testnet: boolean;
33
- readonly priceFeeds?: {
34
- readonly [key: string]: string | undefined;
35
- };
36
- readonly tokenFeeds?: {
37
- readonly [key: string]: string | undefined;
38
- };
39
- readonly curveRouterAddress?: string;
40
- readonly dexes?: string[];
41
- }
42
- export interface TokenInfo {
43
- readonly chainId: number;
44
- readonly address: Address;
45
- readonly name: string;
46
- readonly decimals: number;
47
- readonly symbol: string;
48
- readonly coinGeckoId?: string;
49
- readonly currency?: string;
50
- readonly logoUri?: string;
51
- readonly tags?: TokenListTagNames[];
52
- readonly extensions?: {
53
- readonly [key: string]: {
54
- [key: string]: {
55
- [key: string]: ExtensionValue;
56
- } | ExtensionValue;
57
- } | ExtensionValue;
58
- };
59
- readonly displayDecimals: number;
60
- }
61
- export declare type TokenListSimple = {
62
- timestamp: string;
63
- tokens: TokenInfo[];
64
- };
65
- export interface Version {
66
- readonly major: number;
67
- readonly minor: number;
68
- readonly patch: number;
69
- }
70
- export interface TokenList {
71
- readonly name: string;
72
- readonly timestamp: string;
73
- readonly version: Version;
74
- readonly tokens: TokenInfo[];
75
- readonly keywords?: string[];
76
- readonly tags?: any;
77
- readonly logoUri?: string;
78
- }
79
- export interface PriceFeed {
80
- readonly address: string;
81
- readonly name: string;
82
- readonly assetName: string;
83
- readonly type: string;
84
- readonly path: string;
85
- readonly input: string;
86
- readonly output: string;
87
- readonly deviation: number;
88
- readonly decimals: number;
89
- readonly updateInterval: number;
90
- readonly chainId: number;
91
- }
92
- export interface FiatCurrency {
93
- readonly name: string;
94
- readonly symbol: string;
95
- readonly code: string;
96
- readonly decimals: number;
97
- }
98
- export {};
package/dist/update.d.ts DELETED
@@ -1,77 +0,0 @@
1
- import { TokenInfo } from './types';
2
- export declare const deepCopy: (obj: any) => any;
3
- export declare const CHAIN_MAPPINGS: ({
4
- name: string;
5
- chainLink: string;
6
- coinGecko: string;
7
- chainId: number;
8
- nativeTokenSymbol: string;
9
- } | {
10
- name: string;
11
- chainLink: string;
12
- coinGecko: null;
13
- chainId: number;
14
- nativeTokenSymbol?: undefined;
15
- } | {
16
- name: string;
17
- chainLink: string;
18
- coinGecko: string;
19
- chainId: number;
20
- nativeTokenSymbol?: undefined;
21
- })[];
22
- export declare const CONFLICT_OVERRIDES: {
23
- 1: {
24
- USDE: string;
25
- LUSD: string;
26
- BNB: string;
27
- USDC: string;
28
- USDT: string;
29
- APE: string;
30
- FRAX: string;
31
- TRUMP: string;
32
- NEIRO: string;
33
- SHIB: string;
34
- RAI: string;
35
- UNI: string;
36
- };
37
- 10: {
38
- USDC: string;
39
- };
40
- 137: {
41
- USDC: string;
42
- WBTC: string;
43
- BAT: string;
44
- FRAX: string;
45
- QUICK: string;
46
- };
47
- 42161: {
48
- USDC: string;
49
- FRAX: string;
50
- USDS: string;
51
- AI: string;
52
- MAGIC: string;
53
- };
54
- 56: {
55
- AVAX: string;
56
- FRAX: string;
57
- SHIB: string;
58
- TUSD: string;
59
- SOL: string;
60
- GMT: string;
61
- };
62
- 8453: {
63
- USDC: string;
64
- PEPE: string;
65
- ANON: string;
66
- DOGE: string;
67
- };
68
- };
69
- export declare const setTimestamp: () => void;
70
- export declare const getTimestamp: () => any;
71
- export declare const fetchChainLinkFeed: (chainName: string) => Promise<any>;
72
- export declare const splitFeeds: (feeds: any, chainId: number) => any[];
73
- export declare const resolveChainData: (chainId: number, fetchFeed?: any, fetchCoinGecko?: any) => Promise<any[]>;
74
- export declare const fetchTokenData: (chainName: string) => Promise<any>;
75
- export declare const resolveTokens: (chainId: number, tokenSymbolList: string[], fetchTokensFunc?: any, coinGeckoIdMap?: Map<string, string> | undefined) => Promise<TokenInfo[]>;
76
- export declare const hydrateFiatCurrencies: (fiatSymbols: string[]) => Promise<any>;
77
- export declare const fetchCoinGeckoIds: () => Promise<any>;
@@ -1,8 +0,0 @@
1
- import { Version } from './types';
2
- /**
3
- * Comparator function that allows sorting version from lowest to highest
4
- * @param versionA version A to compare
5
- * @param versionB version B to compare
6
- * @returns -1 if versionA comes before versionB, 0 if versionA is equal to version B, and 1 if version A comes after version B
7
- */
8
- export declare function versionComparator(versionA: Version, versionB: Version): -1 | 0 | 1;