@taquito/michelson-encoder
Version:
Michelson encoding and decoding utilities for Taquito.
56 lines (55 loc) • 1.53 kB
TypeScript
import { ComparableToken, SemanticEncoding, Token, TokenFactory, TokenValidationError } from './token';
import { BaseTokenSchema } from '../schema/types';
/**
* @category Error
* Error that indicates a failure happening when parsing encoding/executing a Key
*/
export declare class KeyValidationError extends TokenValidationError {
value: any;
token: KeyToken;
name: string;
constructor(value: any, token: KeyToken, message: string);
}
export declare class KeyToken extends ComparableToken {
protected val: {
prim: string;
args: any[];
annots: any[];
};
protected idx: number;
protected fac: TokenFactory;
static prim: 'key';
constructor(val: {
prim: string;
args: any[];
annots: any[];
}, idx: number, fac: TokenFactory);
Execute(val: {
bytes: string;
string: string;
}): string;
/**
* @throws {@link KeyValidationError}
*/
private validate;
/**
* @throws {@link KeyValidationError}
*/
Encode(args: any[]): any;
/**
* @throws {@link KeyValidationError}
*/
EncodeObject(val: any, semantic?: SemanticEncoding): any;
generateSchema(): BaseTokenSchema;
ToKey(val: any): string;
ToBigMapKey(val: string): {
key: {
string: string;
};
type: {
prim: "key";
};
};
compare(key1: string, key2: string): number;
findAndReturnTokens(tokenToFind: string, tokens: Token[]): Token[];
}