import { FlatEncoder } from "../_internal/flat.js"; import { UPLCProgram, UPLCVersion } from "../UPLCProgram/index.js"; import { UPLCTermObj } from "../UPLCTerm/index.js"; import { ConstType, IBuiltin, IUPLCConst } from "../UPLCTerms/index.js"; export declare function compileUPLC(program: UPLCProgram): Uint8Array; /** * alias for `compileUPLC` */ export declare const encodeUPLC: typeof compileUPLC; export declare class UPLCEncoder extends FlatEncoder { static compile(program: UPLCProgram): Uint8Array; compile(program: UPLCProgram): Uint8Array; encodeVersion(version: UPLCVersion): void; encodeTerm(term: UPLCTermObj): void; encodeList(items: T[], encode: (t: T) => void): void; encodeNatural(n: number): void; /** * Encodes a natural number (non-negative integer). * @param n - The natural number to encode. */ encodeNaturalBig(n: bigint): void; encodeBuiltin(builtin: IBuiltin): void; encodeConst(con: IUPLCConst): void; encodeConstValue(type: ConstType, value: unknown): void; /** * Encodes an integer (positive or negative). * @param i - The integer to encode. */ encodeInteger(i: bigint): void; /** * Encodes a byte string. * @param bytes - The byte string to encode as a Uint8Array. */ encodeByteString(bytes: Uint8Array): void; /** * Encodes a boolean value. * @param value - The boolean value to encode. */ encodeBool(value: boolean): void; }