UNPKG

@massalabs/massa-sc-utils

Version:
20 lines (19 loc) 1.17 kB
/// <reference types="node" /> import * as fs from "fs"; import { ICompiledSmartContract } from "../interfaces/ICompiledSmartContract"; import { IWasmConfig } from "../interfaces/IWasmConfig"; /** Smart Contracts Client which enables compilation, deployment and streaming of events */ export declare class SmartContractUtils { private isWebAssemblyCliInitialized; constructor(); /** initializes the webassembly cli under the hood */ private initWebAssemblyCli; /** compile smart contract on the fly using the assemblyscript smart contract code as a string */ compileSmartContractFromString(smartContractContent: string): Promise<ICompiledSmartContract>; /** compile smart contract from a physical assemblyscript (.ts) file */ compileSmartContractFromSourceFile(config: IWasmConfig): Promise<ICompiledSmartContract>; /** compile smart contract from a physical assemblyscript file */ compileSmartContractFromWasmFile(wasmFilePath: fs.PathLike): Promise<ICompiledSmartContract>; /** compile smart contract from a physical assemblyscript (.ts) file */ compileSmartContractOnTheFly(smartContractContent: string): Promise<any>; }