@taquito/michelson-encoder
Version:
converts michelson data and types into convenient JS/TS objects
19 lines (18 loc) • 805 B
TypeScript
import { Token } from './token';
import { TaquitoError } from '@taquito/core';
/**
* @category Error
* @description Error that indicates a script having an invalid type or it being unsupported by the Michelson Encoder. Note some protocol changes might affect this, we encourage users to open an issue so we can look into implementing support for said types.
*/
export declare class InvalidTokenError extends TaquitoError {
message: string;
data: any;
name: string;
constructor(message: string, data: any);
}
/**
*
* @description Create a token from a value
* @throws {@link InvalidTokenError} If the value passed is not supported by the Michelson Encoder
*/
export declare function createToken(val: any, idx: number, parentTokenType?: 'Or' | 'Pair' | 'Other' | undefined): Token;