UNPKG

@taquito/michelson-encoder

Version:

Michelson encoding and decoding utilities for Taquito.

57 lines (56 loc) 1.57 kB
import { Token, TokenFactory, ComparableToken, TokenValidationError, SemanticEncoding } from '../token'; import { BaseTokenSchema } from '../../schema/types'; /** * @category Error * Error that indicates a failure happening when parsing encoding/executing Int */ export declare class IntValidationError extends TokenValidationError { value: any; token: IntToken; name: string; constructor(value: any, token: IntToken, message: string); } export declare class IntToken extends ComparableToken { protected val: { prim: string; args: any[]; annots: any[]; }; protected idx: number; protected fac: TokenFactory; static prim: 'int'; constructor(val: { prim: string; args: any[]; annots: any[]; }, idx: number, fac: TokenFactory); Execute(val: { [key: string]: string; }): { [key: string]: any; }; generateSchema(): BaseTokenSchema; /** * @throws {@link IntValidationError} */ private validate; /** * @throws {@link IntValidationError} */ Encode(args: any[]): any; /** * @throws {@link IntValidationError} */ EncodeObject(val: any, semantic?: SemanticEncoding): any; ToBigMapKey(val: string | number): { key: { int: string; }; type: { prim: "int"; }; }; ToKey({ int }: any): any; compare(int1: string | number, int2: string | number): 0 | 1 | -1; findAndReturnTokens(tokenToFind: string, tokens: Token[]): Token[]; }