import { Logged } from "./core.dist"; /** The default Git ref when not specified. */ export declare const HEAD = "HEAD"; /** A code hash, uniquely identifying a particular smart contract implementation. */ export type CodeHash = string; export declare abstract class Compiler extends Logged { /** Whether to enable build caching. * When set to false, this compiler will rebuild even when * binary and checksum are both present in wasm/ directory */ caching: boolean; /** Unique identifier of this compiler implementation. */ abstract id: string; /** Compile a source. * `@hackbg/fadroma` implements dockerized and non-dockerized * variants using its `build.impl.mjs` script. */ abstract build(source: string | Partial, ...args: unknown[]): Promise; /** Build multiple sources. * Default implementation of buildMany is sequential. * Compiler classes may override this to optimize. */ buildMany(inputs: Partial[]): Promise; } /** An object representing a given source code. */ export declare class SourceCode extends Logged { /** URL pointing to Git upstream containing the canonical source code. */ sourceOrigin?: string | URL; /** Pointer to the source commit. */ sourceRef?: string; /** Path to local checkout of the source code (with .git directory if sourceRef is set). */ sourcePath?: string; /** Whether the code contains uncommitted changes. */ sourceDirty?: boolean; constructor(properties?: Partial); get [Symbol.toStringTag](): string; serialize(): { sourceOrigin?: string; sourceRef?: string; sourcePath?: string; sourceDirty?: boolean; [key: string]: unknown; }; get canFetch(): boolean; get canFetchInfo(): string | undefined; get canCompile(): boolean; get canCompileInfo(): string | undefined; } export declare class RustSourceCode extends SourceCode { /** Path to the crate's Cargo.toml under sourcePath */ cargoToml?: string; /** Path to the workspace's Cargo.toml in the source tree. */ cargoWorkspace?: string; /** Name of crate. */ cargoCrate?: string; /** List of crate features to enable during build. */ cargoFeatures?: string[] | Set; constructor(properties?: Partial); get [Symbol.toStringTag](): string; serialize(): ReturnType & { cargoWorkspace?: string; cargoCrate?: string; cargoFeatures?: string[]; [key: string]: unknown; }; get canCompile(): boolean; get canCompileInfo(): string | undefined; } /** An object representing a given compiled binary. */ export declare class CompiledCode { /** Code hash uniquely identifying the compiled code. */ codeHash?: CodeHash; /** Location of the compiled code. */ codePath?: string | URL; /** The compiled code. */ codeData?: Uint8Array; constructor(properties?: Partial); get [Symbol.toStringTag](): string; serialize(): { codeHash?: CodeHash; codePath?: string; [key: string]: unknown; }; get canFetch(): boolean; get canFetchInfo(): string | undefined; get canUpload(): boolean; get canUploadInfo(): string | undefined; fetch(): Promise; protected doFetch(): Promise; /** Compute the code hash if missing; throw if different. */ computeHash(): Promise; static toCodeHash(data: Uint8Array): string; } //# sourceMappingURL=program.browser.d.ts.map