import { MichelsonV1Expression, MichelsonV1ExpressionExtended, ScriptResponse } from '@taquito/rpc';
import { Semantic } from '../tokens/token';
export declare class ViewSchema {
    readonly viewName: string;
    readonly viewArgsType: MichelsonV1ExpressionExtended;
    readonly viewReturnType: MichelsonV1ExpressionExtended;
    readonly instructions: MichelsonV1ExpressionExtended[];
    private rootArgsType;
    private rootReturnType;
    /**
     *
     * Create an instance of ViewSchema for each view in a script
     *
     * @param val contract script obtained from the RPC
     * @returns array of ViewSchema or empty array if there is no view in the contract
     * @throws {@link InvalidScriptError}
     */
    static fromRPCResponse(val: {
        script: ScriptResponse;
    }): ViewSchema[];
    /**
     * @throws {@link InvalidScriptError}
     */
    constructor(viewArgs: MichelsonV1Expression[] | undefined);
    /**
     *
     * Transform the view parameter into Michelson
     *
     * @param args parameter of the view in js format
     * @returns parameter of the view in Michelson
     * @throws {@link ParameterEncodingError}
     */
    encodeViewArgs(args: any): any;
    /**
     *
     * Transform the view result from Michelson to readable data
     *
     * @param val result of the view in JSON Michelson
     * @param semantics optional semantics to override the default decoding behavior
     * @returns result of the view in a readable format
     */
    decodeViewResult(val: any, semantics?: Semantic): any;
    /**
     *
     * Return the signature of the view parameter
     */
    extractArgsSchema(): import("./types").TokenSchema;
    /**
     *
     * Return the format of the view result
     */
    extractResultSchema(): import("./types").TokenSchema;
}
