/** * @import { Encodeable } from "@helios-lang/cbor" * @import { BytesLike } from "@helios-lang/codec-utils" * @import { UplcData, UplcLogger, UplcProgram } from "@helios-lang/uplc" * @import { NetworkParams, NetworkParamsHelper, Signature, Tx, TxBody, TxId, TxInput, TxOutputId, TxMetadata, TxRedeemer, TxWitnesses, Value } from "../index.js" */ /** * Internal type to make passing these options as args easier * Shouldn't be exported because it adds indirection to the Tx.validate() interface * @typedef {{ * strict?: boolean * verbose?: boolean * logOptions?: UplcLogger * }} ValidateOptions */ /** * Deserialize a CBOR encoded Cardano transaction (input is either an array of bytes, or a hex string). * @param {BytesLike} bytes * @returns {Tx} */ export function decodeTx(bytes: BytesLike): Tx; /** * Creates a new transaction; use {@link TxBuilder} to build a transaction instead. * @remarks * Use {@link decodeTx} to deserialize a transaction. * @param {TxBody} body * @param {TxWitnesses} witnesses * @param {boolean} valid * @param {TxMetadata | undefined} metadata * @returns {Tx} */ export function makeTx(body: TxBody, witnesses: TxWitnesses, valid: boolean, metadata?: TxMetadata | undefined): Tx; /** * @param {NetworkParams} params * @param {UplcData[]} datums * @param {TxRedeemer[]} redeemers * @param {Object} options * @param {boolean} [options.usesPlutusV1] * defaults to false * @param {boolean} [options.usesPlutusV2] * defaults to true * @param {boolean} [options.usesPlutusV3] * defaults to false * @returns {number[]} */ export function calcScriptDataHash(params: NetworkParams, datums: UplcData[], redeemers: TxRedeemer[], options?: { usesPlutusV1?: boolean | undefined; usesPlutusV2?: boolean | undefined; usesPlutusV3?: boolean | undefined; }): number[]; /** * @param {bigint} size * @param {number} feePerByte * @param {bigint} growthIncrement * @param {number} growthFactor * @returns {bigint} - a lovelace value */ export function calcRefScriptsFee(size: bigint, feePerByte: number, growthIncrement?: bigint, growthFactor?: number): bigint; /** * Calculates the total size of reference scripts in unique inputs * @param {TxInput[]} inputs * @param {TxInput[] | undefined} refInputs * @returns {bigint} - number of cbor bytes */ export function calcRefScriptsSize(inputs: TxInput[], refInputs: TxInput[] | undefined): bigint; /** * Internal type to make passing these options as args easier * Shouldn't be exported because it adds indirection to the Tx.validate() interface */ export type ValidateOptions = { strict?: boolean; verbose?: boolean; logOptions?: UplcLogger; }; import type { BytesLike } from "@helios-lang/codec-utils"; import type { Tx } from "../index.js"; import type { TxBody } from "../index.js"; import type { TxWitnesses } from "../index.js"; import type { TxMetadata } from "../index.js"; import type { NetworkParams } from "../index.js"; import type { UplcData } from "@helios-lang/uplc"; import type { TxRedeemer } from "../index.js"; import type { TxInput } from "../index.js"; import type { UplcLogger } from "@helios-lang/uplc"; //# sourceMappingURL=Tx.d.ts.map