@syncswap/sdk
Version:
SyncSwap TypeScript SDK for building DeFi applications
40 lines • 2.2 kB
TypeScript
import { ethers } from "ethers";
import { CaseInsensitiveMap } from "../utils/caseInsensitiveMap";
import { Token } from "./token";
export { Token };
export declare const ZKSYNC_TESTNET = "zkSyncTestnet";
export declare const ZKSYNC_MAINNET = "zkSyncMainnet";
export declare const SCROLL_MAINNET = "scrollMainnet";
export declare const SOPHON_MAINNET = "sophonMainnet";
export declare const SOPHON_TESTNET = "sophonTestnet";
export declare const ZKCANDY_MAINNET = "zkcandyMainnet";
export declare const ZKSYNC_SEPOLIA_TESTNET = "zkSyncSepoliaTestnet";
export declare const LINEA_MAINNET = "lineaMainnet";
export declare const ETH_MAINNET = "ethereumMainnet";
export declare function getWETHAddress(targetNetwork?: string): string;
export declare function getRouteTokens(targetNetwork?: string): string[];
export declare const globalSharedTokenMap: CaseInsensitiveMap<string, Token>;
export declare abstract class TokenRegistry {
static allTokens: Token[];
static tokenByAddressMap: CaseInsensitiveMap<string, Token>;
static tokenBySymbolMap: CaseInsensitiveMap<string, Token>;
static indexedTokenMap: CaseInsensitiveMap<string, Token>;
static verifiedTokenMap: CaseInsensitiveMap<string, Token>;
static hiddenListedTokenMap: CaseInsensitiveMap<string, Token>;
static registerToken(token: Token, indexed: boolean): void;
private static resetTokens;
private static cacheCrossChainTokens;
static initialize(targetNetwork?: string): Promise<void>;
static getTokenByAddress(address: string): Token | null;
static getTokenBySymbol(symbol: string): Token | null;
static lookupTokenByAddress(provider: ethers.providers.Provider, address: string, shouldRegister: boolean, isIndexed: boolean): Promise<[Token | null, boolean]>;
static isTokenIndexed(address: string): boolean;
static isTokenVerified(address: string): boolean;
static getIndexedTokens(): Token[];
static getVerifiedTokens(): Token[];
static getHiddenListedTokens(): Token[];
static getToken(address: string): Token;
static getAllTokens(): Token[];
}
export declare function ensureTokenRegistered(tokenData: any): void;
//# sourceMappingURL=tokenRegistry.d.ts.map