@taquito/michelson-encoder
Version:
converts michelson data and types into convenient JS/TS objects
54 lines (53 loc) • 1.54 kB
TypeScript
import { ContractTokenSchema } from '../schema/types';
import { SemanticEncoding, Token, TokenFactory, TokenValidationError } from './token';
/**
* @category Error
* @description Error that indicates a failure happening when parsing encoding/executing a Contract
*/
export declare class ContractValidationError extends TokenValidationError {
value: any;
token: ContractToken;
name: string;
constructor(value: any, token: ContractToken, message: string);
}
export declare class ContractToken extends Token {
protected val: {
prim: string;
args: any[];
annots: any[];
};
protected idx: number;
protected fac: TokenFactory;
static prim: 'contract';
constructor(val: {
prim: string;
args: any[];
annots: any[];
}, idx: number, fac: TokenFactory);
/**
* @throws {@link ContractValidationError}
*/
private validate;
/**
* @throws {@link ContractValidationError}
*/
Execute(val: {
bytes: string;
string: string;
}): string;
/**
* @throws {@link ContractValidationError}
*/
Encode(args: any[]): any;
/**
* @throws {@link ContractValidationError}
*/
EncodeObject(val: any, semantic?: SemanticEncoding): any;
/**
* @deprecated ExtractSchema has been deprecated in favor of generateSchema
*
*/
ExtractSchema(): "contract";
generateSchema(): ContractTokenSchema;
findAndReturnTokens(tokenToFind: string, tokens: Token[]): Token[];
}