/** * @overload * @param {UplcTerm} root * @returns {UplcProgramV1} */ export function makeUplcProgramV1(root: UplcTerm): UplcProgramV1; /** * @overload * @param {UplcTerm} root * @param {UplcProgramV1Options} options * @returns {UplcProgramV1} */ export function makeUplcProgramV1(root: UplcTerm, options: UplcProgramV1Options): UplcProgramV1; /** * @overload * @param {{ * root: UplcTerm * options?: UplcProgramV1Options * }} props * @returns {UplcProgramV1} */ export function makeUplcProgramV1(props: { root: UplcTerm; options?: UplcProgramV1Options; }): UplcProgramV1; /** * @param {BytesLike} bytes * @param {UplcProgramV1Options} options * @returns {UplcProgramV1} */ export function decodeUplcProgramV1FromCbor(bytes: BytesLike, options?: UplcProgramV1Options): UplcProgramV1; /** * @param {number[]} bytes * @param {UplcProgramV1Options} options * @returns {UplcProgramV1} */ export function decodeUplcProgramV1FromFlat(bytes: number[], options?: UplcProgramV1Options): UplcProgramV1; /** * @param {string} src * @param {UplcProgramV1Options} options * @returns {UplcProgramV1Impl} */ export function parseUplcProgramV1(src: string, options?: UplcProgramV1Options): UplcProgramV1Impl; export type PlutusVersionV1 = typeof PLUTUS_VERSION; import type { UplcTerm } from "../index.js"; import type { UplcProgramV1 } from "../index.js"; import type { UplcProgramV1Options } from "../index.js"; import type { BytesLike } from "@helios-lang/codec-utils"; /** * @implements {UplcProgramV1} */ declare class UplcProgramV1Impl { /** * @param {UplcTerm} root * @param {UplcProgramV1Options} options */ constructor(root: UplcTerm, options?: UplcProgramV1Options); /** * @readonly * @type {UplcTerm} */ readonly root: UplcTerm; /** * @readonly * @type {UplcProgramV1 | undefined} */ readonly alt: UplcProgramV1 | undefined; /** * @private * @readonly * @type {((() => string) | string) | undefined} */ private readonly _ir; /** * Cached hash * @private * @type {number[] | undefined} */ private _hash; /** * @type {string | undefined} */ get ir(): string | undefined; /** * Script version, determines the available builtins and the shape of the ScriptContext * @type {PlutusVersionV1} */ get plutusVersion(): "PlutusScriptV1"; /** * Script version tag, shorthand for the plutus version, used in (de)serialization * @type {typeof PLUTUS_VERSION_TAG} */ get plutusVersionTag(): 1; /** * UPLC version, determines UPLC semantics and term types * Note: though it makes sense for the team maintaining the Plutus repo * for this to be distinct version, each HFC combines a potentially * new uplcVersion with a new script version, so from a client perspective * it only makes sense to track a single version change * (ie. Plutus V1 vs Plutus V2 vs Plutus V3) * @type {typeof UPLC_VERSION} */ get uplcVersion(): "1.0.0"; /** * Wrap the top-level term with consecutive UplcCall (not exported) terms. * * Returns a new UplcProgramV1 instance, leaving the original untouched. * @param {UplcValue[]} args * @returns {UplcProgramV1Impl} - a new UplcProgram instance */ apply(args: UplcValue[]): UplcProgramV1Impl; /** * @param {UplcValue[] | undefined} args - if None, eval the root term without any applications, if empy: apply a force to the root term * @param {object} [options] * @param {UplcLogger} [options.logOptions] * @param {number[]} [options.costModelParams] * @returns {CekResult} */ eval(args: UplcValue[] | undefined, options?: { logOptions?: UplcLogger | undefined; costModelParams?: number[] | undefined; } | undefined): CekResult; /** * @returns {number[]} - 28 byte hash */ hash(): number[]; /** * Returns the Cbor encoding of a script (flat bytes wrapped twice in Cbor bytearray). * @returns {number[]} */ toCbor(): number[]; /** * @returns {number[]} */ toFlat(): number[]; /** * @returns {string} */ toString(): string; /** * @param {UplcProgramV1} alt * @returns {UplcProgramV1} */ withAlt(alt: UplcProgramV1): UplcProgramV1; } /** * @import { BytesLike } from "@helios-lang/codec-utils" * @import { CekResult, UplcLogger, UplcProgramV1, UplcProgramV1Options, UplcSourceMapJsonSafe, UplcTerm, UplcValue } from "../index.js" */ declare const PLUTUS_VERSION: "PlutusScriptV1"; import type { UplcValue } from "../index.js"; import type { UplcLogger } from "../index.js"; import type { CekResult } from "../index.js"; export {}; //# sourceMappingURL=UplcProgramV1.d.ts.map