import { Address, Instruction, PrivKey, PubKey, Serializable } from './internal.js'; /** * Aldea Transaction * * A transaction is simply a list of instructions. When a transaction is * processed, the instructions are executed in the order they appear in the * transaction. * * This class is primarily for working with the underlying data structure of * a transaction. To build a transaction, use the TxBuilder class instaed. */ export declare class Tx { version: number; instructions: Instruction[]; constructor(version?: number, instructions?: Instruction[]); /** * Transaction ID */ get id(): string; /** * Transaction hash */ get hash(): Uint8Array; /** * Returns a Transaction from the given bytes. */ static fromBytes(bytes: Uint8Array): Tx; /** * Returns a Transaction from the given hex-encoded string. */ static fromHex(str: string): Tx; /** * Pushes an Instruction onto the transaction. */ push(instruction: Instruction): Tx; /** * Returns the sighash of the current transaction. Can optionally be passed * an index to return the sighash upto a given instruction. */ sighash(to?: number): Uint8Array; /** * Returns a valid signature for the current tx using the given key. */ createSignature(privKey: PrivKey, to?: number): Uint8Array; isSignedBy(addr: Address, index: number): boolean; /** * Returns the Transaction as bytes. */ toBytes(): Uint8Array; /** * Returns the Transaction as hex-encoded string. */ toHex(): string; signers(): PubKey[]; /** * Verifies any signatures in the transaction and returns a boolean. * * Not that this only verifies the signatures. It does not otherwise verify * the transaction is valid. That is done at execution time. */ verify(): boolean; } /** * Tx Serializer object - implements the Serializable interface. */ export declare const TxSerializer: Serializable; //# sourceMappingURL=tx.d.ts.map