UNPKG

@dahlia-labs/token-utils

Version:

Token-related math and transaction utilities.

61 lines 1.44 kB
import type { ChainId, Network } from "@dahlia-labs/celo-contrib"; import type { Token as UToken } from "@ubeswap/token-math"; import type { TokenInfo } from "./tokenList"; /** * Token information. */ export declare class Token implements UToken<Token> { readonly info: TokenInfo; /** * The network that the Token is on. */ readonly network: Network; constructor(info: TokenInfo); /** * The Base58 string representation of the mint address. */ get address(): string; /** * The chain ID of the token. */ get chainId(): number; /** * Number of decimals of the token. */ get decimals(): number; /** * The name of the token. */ get name(): string; /** * The symbol of the token. */ get symbol(): string; /** * The token's icon to render. */ get icon(): string | undefined; equals(other: Token): boolean; toString(): string; toJSON(): unknown; /** * Returns true if the given tag is present. * @param tag The tag to check. * @returns */ hasTag(tag: string): boolean; } /** * Checks if two tokens are equal. * @param a * @param b * @returns */ export declare const tokensEqual: (a: Token | undefined, b: Token | undefined) => boolean; /** * Map of network to Token */ export type TokenMap = { [c in ChainId]: Token; }; //# sourceMappingURL=token.d.ts.map