@taquito/michelson-encoder
Version:
converts michelson data and types into convenient JS/TS objects
62 lines (61 loc) • 1.87 kB
TypeScript
import { BigMapTokenSchema } from '../schema/types';
import { ComparableToken, Semantic, SemanticEncoding, Token, TokenFactory, TokenValidationError } from './token';
/**
* @category Error
* @description Error that indicates a failure happening when parsing encoding/executing Big Map types
*/
export declare class BigMapValidationError extends TokenValidationError {
value: any;
token: BigMapToken;
name: string;
constructor(value: any, token: BigMapToken, message: string);
}
export declare class BigMapToken extends Token {
protected val: {
prim: string;
args: any[];
annots?: any[];
};
protected idx: number;
protected fac: TokenFactory;
static prim: 'big_map';
constructor(val: {
prim: string;
args: any[];
annots?: any[];
}, idx: number, fac: TokenFactory);
get ValueSchema(): Token;
get KeySchema(): ComparableToken;
/**
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
*
*/
ExtractSchema(): {
big_map: {
key: any;
value: any;
};
};
generateSchema(): BigMapTokenSchema;
/**
* @throws {@link BigMapValidationError}
*/
private validate;
private objLitToMichelsonMap;
/**
* @throws {@link BigMapValidationError}
*/
Encode(args: any[]): any;
/**
* @throws {@link BigMapValidationError}
*/
EncodeObject(args: any, semantic?: SemanticEncoding): any;
/**
* @throws {@link InvalidMapTypeError} when the argument passed to val is an array but not a valid map type
* @throws {@link BigMapValidationError} when the value is invalid
*/
Execute(val: any[] | {
int: string;
}, semantic?: Semantic): any;
findAndReturnTokens(tokenToFind: string, tokens: Token[]): Token[];
}