@taquito/michelson-encoder
Version:
Michelson encoding and decoding utilities for Taquito.
55 lines (54 loc) • 1.96 kB
TypeScript
import { Semantic, SemanticEncoding } from '../tokens/token';
import { ScriptResponse, MichelsonV1Expression } from '@taquito/rpc';
import { TokenSchema } from './types';
/**
* @remarks Our current smart contract abstraction feature is currently in preview. It's API is not final, and it may not cover every use case (yet). We will greatly appreciate any feedback on this feature.
*/
export declare class ParameterSchema {
private root;
/**
*
* Create an instance of ParameterSchema from a contract script
*
* @param val contract script obtained from the RPC
* @returns ParameterSchema
* @throws {InvalidRpcResponseError} If the RPC response is invalid
*/
static fromRPCResponse(val: {
script: ScriptResponse;
}): ParameterSchema;
/**
* Check if the Contract parameter is multiple entry point or not
*/
get isMultipleEntryPoint(): boolean;
/**
* Check if the Contract parameter has an annotation or not
*/
get hasAnnotation(): boolean;
/**
* Return the schema of the parameter of a specific entry point
* @throws InvalidTokenError
*/
constructor(val: MichelsonV1Expression);
/**
* Returns the javascript object equivalent of the Micheline value provided
*/
Execute(val: any, semantics?: Semantic): any;
/**
* Returns a micheline formatted object for the values provided
* @throws TokenValidationError
* @throws {@link ParameterEncodingError}
*/
Encode(...args: any[]): any;
/**
* Returns a micheline formatted object for the javascript object provided
* @throws TokenValidationError
* @throws {@link ParameterEncodingError}
*/
EncodeObject(value?: any, semantics?: SemanticEncoding): any;
/**
* Produce a schema grouping together all the entry points of a contract.
*/
generateSchema(): TokenSchema;
ExtractSignatures(): TokenSchema[][];
}