UNPKG

@photonswap/sdk

Version:

🛠 An example SDK for building applications on top of Photonswap.

46 lines (45 loc) • 1.36 kB
import { ChainId } from '../constants'; import { Currency } from './currency'; /** * Represents an ERC20 token with a unique address and some metadata. */ export declare class Token extends Currency { readonly chainId: ChainId; readonly address: string; constructor(chainId: ChainId, address: string, decimals: number, symbol?: string, name?: string); /** * Returns true if the two tokens are equivalent, i.e. have the same chainId and address. * @param other other token to compare */ equals(other: Token): boolean; /** * Returns true if the address of this token sorts before the address of the other token * @param other other token to compare * @throws if the tokens have the same address * @throws if the tokens are on different chains */ sortsBefore(other: Token): boolean; } /** * Compares two currencies for equality */ export declare function currencyEquals(currencyA: Currency, currencyB: Currency): boolean; export declare const WETH: { 25: Token; 338: Token; 97: Token; 339: Token; 80001: Token; 9000: Token; 2221: Token; 2222: Token; 5001: Token; 8080: Token; 9001: Token; 53211: Token; 3333: Token; 24734: Token; 1402: Token; 906090: Token; 11155111: Token; };