import { NodeProvider } from '../api'; import { node } from '../api'; import { SignDeployContractTxParams, SignExecuteScriptTxParams, SignerWithNodeProvider } from '../signer'; export declare abstract class Common { readonly sourceCodeSha256: string; readonly functions: node.FunctionSig[]; static readonly importRegex: RegExp; static readonly contractRegex: RegExp; static readonly interfaceRegex: RegExp; static readonly scriptRegex: RegExp; private static _artifactCache; static artifactCacheCapacity: number; protected static _getArtifactFromCache(codeHash: string): Contract | Script | undefined; protected static _putArtifactToCache(contract: Contract): void; constructor(sourceCodeSha256: string, functions: node.FunctionSig[]); protected static _contractPath(fileName: string): string; protected static _artifactPath(fileName: string): string; protected static _artifactsFolder(): string; protected static _handleImports(contractStr: string, importsCache: string[]): Promise; protected static _loadContractStr(fileName: string, importsCache: string[], validate: (fileName: string) => void): Promise; static checkFileNameExtension(fileName: string): void; protected static _from(provider: NodeProvider, fileName: string, loadContractStr: (fileName: string, importsCache: string[]) => Promise, compile: (provider: NodeProvider, fileName: string, contractStr: string, contractHash: string) => Promise): Promise; protected _saveToFile(fileName: string): Promise; abstract buildByteCodeToDeploy(initialFields?: Fields): string; } export declare class Contract extends Common { readonly bytecode: string; readonly codeHash: string; readonly fieldsSig: node.FieldsSig; readonly eventsSig: node.EventSig[]; constructor(sourceCodeSha256: string, bytecode: string, codeHash: string, fieldsSig: node.FieldsSig, eventsSig: node.EventSig[], functions: node.FunctionSig[]); static checkCodeType(fileName: string, contractStr: string): void; private static loadContractStr; static fromSource(provider: NodeProvider, fileName: string): Promise; private static compile; static fromJson(artifact: any): Contract; static fromArtifactFile(fileName: string): Promise; toString(): string; toState(fields: Fields, asset: Asset, address?: string): ContractState; static randomAddress(): string; private _test; testPublicMethod(provider: NodeProvider, funcName: string, params: TestContractParams): Promise; testPrivateMethod(provider: NodeProvider, funcName: string, params: TestContractParams): Promise; toApiFields(fields?: Fields): node.Val[]; toApiArgs(funcName: string, args?: Arguments): node.Val[]; getMethodIndex(funcName: string): number; toApiContractStates(states?: ContractState[]): node.ContractState[] | undefined; toTestContract(funcName: string, params: TestContractParams): node.TestContract; static fromCodeHash(codeHash: string): Promise; static getFieldsSig(state: node.ContractState): Promise; fromApiContractState(state: node.ContractState): Promise; static ContractCreatedEvent: node.EventSig; static ContractDestroyedEvent: node.EventSig; static fromApiEvent(event: node.ContractEventByTxId, codeHash: string | undefined): Promise; fromTestContractResult(methodIndex: number, result: node.TestContractResult): Promise; paramsForDeployment(params: BuildDeployContractTx): Promise; transactionForDeployment(signer: SignerWithNodeProvider, params: Omit): Promise; buildByteCodeToDeploy(initialFields: Fields): string; } export declare class Script extends Common { readonly bytecodeTemplate: string; readonly fieldsSig: node.FieldsSig; constructor(sourceCodeSha256: string, bytecodeTemplate: string, fieldsSig: node.FieldsSig, functions: node.FunctionSig[]); static checkCodeType(fileName: string, contractStr: string): void; private static loadContractStr; static fromSource(provider: NodeProvider, fileName: string): Promise