@massalabs/massa-sc-utils
Version:
Massa smart contract utils
20 lines (19 loc) • 1.17 kB
TypeScript
/// <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>;
}