import { LineInfo } from '../misc/utils'; import { IExpression } from '../typings/expression'; import { ILiteral } from '../typings/literal'; import { IType } from '../typings/type'; import { IStatement } from '../typings/statement'; import { Expression } from './expression'; import { Proxied } from '../misc/proxy'; import { MichelsonType } from './enums/type'; declare abstract class View { name: string; protected inType: IType; protected statements: IStatement[]; protected line: LineInfo; constructor(name: string, line?: LineInfo); setInputType(type: IType): this; code(callback: (arg: Proxied>) => IStatement[]): this; protected get viewArgument(): Proxied>>; } export declare class OnChainView extends View { [Symbol.toPrimitive](): string; } interface EntryPointOptions { mock?: boolean; lazy?: boolean; lazyAndCodeless?: boolean; } /** * Class that represents a contract entrypoint. * * ```typescript new EntryPoint('ep1') .setInputType(TNat()) .code((arg) => [ SetValue(ContractStorage(), arg); ]) * ``` */ export declare class EntryPoint { #private; name: string; constructor(name: string, line?: LineInfo); config(options?: EntryPointOptions): this; setInputType(type: IType): this; code(callback: (arg: Proxied>) => IStatement[]): this; private get entrypointArgument(); [Symbol.toPrimitive](): string; } /** * Class that represents a contract configuration flag. * * ```typescript * new Contract().setConfig({ flags: [new Flag('erase-comments')] }); * ``` */ export declare class Flag { flag: string; args: string[]; constructor(flag: string, ...args: string[]); [Symbol.toPrimitive](): string; } /** * Class that represents a contract. * * ```typescript * new Contract() .setStorage(Nat(1)) .addEntrypoint( new EntryPoint('ep1') .setInputType(TNat()) .code((arg) => [ SetValue(ContractStorage(), arg); ]), ) .setConfig({ flags: [new Flag('erase-comments')] }); * ``` */ export declare class Contract { #private; constructor(line?: LineInfo); setStorageType(type: IType): this; setStorage(storage: ILiteral): this; addEntrypoint(entrypoint: EntryPoint): this; removeEntrypoint(entrypointName: string): this; addView(view: View): this; removeView(viewName: string): this; setConfig(options?: { initialBalance?: ILiteral; flags?: Flag[]; }): this; get storage(): Readonly | null; get entrypoints(): Readonly; get onChainViews(): Readonly; get config(): Readonly<{ initialBalance: IExpression; flags: Flag[]; }>; [Symbol.toPrimitive](): string; } export {};