UNPKG

@taquito/michelson-encoder

Version:

converts michelson data and types into convenient JS/TS objects

53 lines (52 loc) 1.7 kB
import { BaseTokenSchema } from '../schema/types'; import { SemanticEncoding, Token, TokenFactory, TokenValidationError } from './token'; /** * @category Error * @description Error that indicates a failure happening when parsing encoding/executing a Chest Key */ export declare class ChestKeyValidationError extends TokenValidationError { value: any; token: ChestKeyToken; name: string; constructor(value: any, token: ChestKeyToken, message: string); } export declare class ChestKeyToken extends Token { protected val: { prim: string; args: any[]; annots: any[]; }; protected idx: number; protected fac: TokenFactory; static prim: 'chest_key'; constructor(val: { prim: string; args: any[]; annots: any[]; }, idx: number, fac: TokenFactory); /** * @throws {@link ChestKeyValidationError} */ private validate; private convertUint8ArrayToHexString; /** * @throws {@link ChestKeyValidationError} */ Encode(args: any[]): { bytes: any; }; /** * @throws {@link ChestKeyValidationError} */ EncodeObject(val: string | Uint8Array, semantic?: SemanticEncoding): import("@taquito/rpc").MichelsonV1ExpressionExtended | import("@taquito/rpc").MichelsonV1ExpressionBase | import("@taquito/rpc").MichelsonV1Expression[] | { bytes: string | Uint8Array; }; Execute(val: any): string; /** * @deprecated ExtractSchema has been deprecated in favor of generateSchema * */ ExtractSchema(): "chest_key"; generateSchema(): BaseTokenSchema; findAndReturnTokens(tokenToFind: string, tokens: Token[]): Token[]; }