import { TransactionHash } from './transaction-hash.js'; import type { TransactionBCH } from '@bitauth/libauth'; /** * Transaction Primitive. */ export declare class Transaction { transaction: TransactionBCH; constructor(transaction: TransactionBCH); /** * Instantiates a transaction from either: * * 1. Transaction bytecode * 2. Transaction bytecode (in hexadecimal format) * * @param transaction The transaction in one of the above formats. * * @throws {Error} If transaction data cannot be decoded. * * @returns The created Transaction Primitive. */ static from(transaction: Uint8Array | string): Transaction; /** * Create a Transaction Primitive from the given byte data. * * @param bytes The raw byte data of the transaction. * * @throws {Error} If transaction data cannot be decoded. * * @returns {Transaction} The created Transaction Primitive. */ static fromBytes(bytes: Uint8Array): Transaction; /** * Create a Transaction Primitive from the given byte data encoded as hexadecimal string. * * @param hex The raw byte data (encoded as hexadecimal string) of the transaction. * * @throws {Error} If transaction cannot be decoded. * * @returns {Transaction} The created Transaction Primitive. */ static fromHex(hex: string): Transaction; /** * Create a Transaction Primitive from LibAuth's TransactionBCH type. * * @remarks This method is UNSAFE and should only be used where input is trusted. * * @param transaction The transaction object (as per LibAuth). * * @returns The created Transaction Primitive. */ static fromRaw(transaction: TransactionBCH): Transaction; toBytes(): Uint8Array; toHex(): string; toHash(): TransactionHash; toHashHex(): string; toHashBytes(): Uint8Array; toRaw(): TransactionBCH; isCoinbase(): boolean; getVersion(): number; getInputs(): import("@bitauth/libauth").Input[]; getOutputs(): import("@bitauth/libauth").Output[]; getLocktime(): number; }