UNPKG

@taquito/michelson-encoder

Version:

converts michelson data and types into convenient JS/TS objects

57 lines (56 loc) 1.62 kB
import { Token, TokenFactory, ComparableToken, TokenValidationError, SemanticEncoding } from './token'; import { BaseTokenSchema } from '../schema/types'; /** * @category Error * @description Error that indicates a failure happening when parsing encoding/executing a ChainID */ export declare class ChainIDValidationError extends TokenValidationError { value: any; token: ChainIDToken; name: string; constructor(value: any, token: ChainIDToken, message: string); } export declare class ChainIDToken extends ComparableToken { protected val: { prim: string; args: any[]; annots: any[]; }; protected idx: number; protected fac: TokenFactory; static prim: 'chain_id'; constructor(val: { prim: string; args: any[]; annots: any[]; }, idx: number, fac: TokenFactory); /** * @throws {@link ChainIDValidationError} */ private validate; Execute(val: any): string; /** * @deprecated ExtractSchema has been deprecated in favor of generateSchema * */ ExtractSchema(): "chain_id"; generateSchema(): BaseTokenSchema; /** * @throws {@link ChainIDValidationError} */ Encode(args: any[]): any; /** * @throws {@link ChainIDValidationError} */ EncodeObject(val: any, semantic?: SemanticEncoding): any; ToKey({ string }: any): any; ToBigMapKey(val: string): { key: { string: string; }; type: { prim: "chain_id"; }; }; findAndReturnTokens(tokenToFind: string, tokens: Token[]): Token[]; }