import { IAddress } from './IAddress'; import { IChainInfo } from './IChainInfo'; import { IPrintable } from './IPrintable'; import { z } from 'zod'; /** * @name IToken * @description Represents an token in a Chain, typically used to represent ERC-20 tokens */ export interface IToken extends ITokenData, IPrintable { /** Chain where the token is deployed */ readonly chainInfo: IChainInfo; /** Token address */ readonly address: IAddress; /** Token symbol, usually a short representation of name and used in tickers */ readonly symbol: string; /** Full token name */ readonly name: string; /** Number of decimals for the token */ readonly decimals: number; /** * @name equals * @description Checks if two tokens are equal * @param token The token to compare * @returns true if the tokens are equal * * Equality is determined by the address and chain information */ equals(token: IToken): boolean; } /** * @description Zod schema for IToken */ export declare const TokenDataSchema: z.ZodObject<{ chainInfo: z.ZodObject<{ chainId: z.ZodNumber; name: z.ZodString; }, "strip", z.ZodTypeAny, { chainId: number; name: string; }, { chainId: number; name: string; }>; address: z.ZodObject<{ value: z.ZodType<`0x${string}`, z.ZodTypeDef, `0x${string}`>; type: z.ZodNativeEnum; }, "strip", z.ZodTypeAny, { type: import("..").AddressType; value: `0x${string}`; }, { type: import("..").AddressType; value: `0x${string}`; }>; symbol: z.ZodString; name: z.ZodString; decimals: z.ZodNumber; }, "strip", z.ZodTypeAny, { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("..").AddressType; value: `0x${string}`; }; decimals: number; }, { symbol: string; name: string; chainInfo: { chainId: number; name: string; }; address: { type: import("..").AddressType; value: `0x${string}`; }; decimals: number; }>; /** * Type for the data part of the IToken interface */ export type ITokenData = Readonly>; /** * @description Type guard for IToken * @param maybeTokenData * @returns true if the object is an IToken */ export declare function isToken(maybeTokenData: unknown): maybeTokenData is IToken; /** * @description Type guard for ITokenData * @param maybeTokenData * @returns true if the object is an ITokenData */ export declare function isTokenData(maybeTokenData: unknown): maybeTokenData is ITokenData; //# sourceMappingURL=IToken.d.ts.map