import { Signature, SignatureType } from "./Signature.js";
import { ABIDef } from "./Abi.js";
import { Action, ActionType, AnyAction } from "./Action.js";
import { Bytes, BytesType } from "./Bytes.js";
import { Checksum256, Checksum256Type } from "./Checksum.js";
import { UInt16, UInt16Type, UInt32, UInt32Type, UInt8, UInt8Type, VarUInt, VarUIntType } from "./Integer.js";
import { KeyType } from "./KeyType.js";
import { NameType } from "./Name.js";
import { PublicKeyType } from "./PublicKey.js";
import { Struct } from "./Struct.js";
import { TimePointSec, TimePointType } from "./Time.js";
export declare class TransactionExtension extends Struct {
    type: UInt16;
    data: Bytes;
}
export declare enum TransactionExtensionType {
    PubKey = 32768
}
export interface TransactionHeaderFields {
    /** The time at which a transaction expires. */
    expiration: TimePointType;
    /** *Specifies a block num in the last 2^16 blocks. */
    ref_block_num: UInt16Type;
    /** Specifies the lower 32 bits of the block id. */
    ref_block_prefix: UInt32Type;
    /** Upper limit on total network bandwidth (in 8 byte words) billed for this transaction. */
    max_net_usage_words?: VarUIntType;
    /** Upper limit on the total CPU time billed for this transaction. */
    max_cpu_usage_ms?: UInt8Type;
    /** Number of seconds to delay this transaction for during which it may be canceled. */
    delay_sec?: VarUIntType;
}
export type TransactionHeaderType = TransactionHeader | TransactionHeaderFields;
export declare class TransactionHeader extends Struct {
    /** The time at which a transaction expires. */
    expiration: TimePointSec;
    /** *Specifies a block num in the last 2^16 blocks. */
    ref_block_num: UInt16;
    /** Specifies the lower 32 bits of the block id. */
    ref_block_prefix: UInt32;
    /** Upper limit on total network bandwidth (in 8 byte words) billed for this transaction. */
    max_net_usage_words: VarUInt;
    /** Upper limit on the total CPU time billed for this transaction. */
    max_cpu_usage_ms: UInt8;
    /** Number of seconds to delay this transaction for during which it may be canceled. */
    delay_sec: VarUInt;
    static from(object: TransactionHeaderType): TransactionHeader;
}
export interface TransactionFields extends TransactionHeaderFields {
    /** The context free actions in the transaction. */
    context_free_actions?: ActionType[];
    /** The actions in the transaction. */
    actions?: ActionType[];
    /** Transaction extensions. */
    transaction_extensions?: {
        type: UInt16Type;
        data: BytesType;
    }[];
}
export interface AnyTransaction extends TransactionHeaderFields {
    /** The context free actions in the transaction. */
    context_free_actions?: AnyAction[];
    /** The actions in the transaction. */
    actions?: AnyAction[];
    /** Transaction extensions. */
    transaction_extensions?: {
        type: UInt16Type;
        data: BytesType;
    }[];
}
export type TransactionType = Transaction | TransactionFields;
export interface SigningDigest {
    msgDigest: Checksum256;
    msgBytes: Uint8Array;
}
export declare class Transaction extends TransactionHeader {
    /** The context free actions in the transaction. */
    context_free_actions: Action[];
    /** The actions in the transaction. */
    actions: Action[];
    /** Transaction extensions. */
    transaction_extensions: TransactionExtension[];
    static from(object: TransactionType | AnyTransaction, abis?: ABIDef | {
        contract: NameType;
        abi: ABIDef;
    }[]): Transaction;
    /** Return true if this transaction is equal to given transaction. */
    equals(other: TransactionType): boolean;
    get id(): Checksum256;
    /**
     * Computes the signing digest and message bytes for this transaction.
     *
     * @param chainId - The chain ID to use for the signing digest.
     * @param keyType - (Optional) The key type of the signer. If provided, the message bytes (`msgBytes`)
     *   are formatted according to the expected format for the given key type.
     *   - For `KeyType.EM`, the digest is prefixed with `0x` and arrayified.
     *   - For `KeyType.ED`, the digest's hex string is encoded as UTF-8 bytes.
     *   - If not provided, the default digest bytes are used.
     * @returns An object containing the signing digest (`msgDigest`) and the formatted message bytes (`msgBytes`).
     */
    signingDigest(chainId: Checksum256Type, keyType?: KeyType): SigningDigest;
    signingData(chainId: Checksum256Type): Bytes;
    extPubKey(pubKeys: PublicKeyType | PublicKeyType[]): void;
}
export interface SignedTransactionFields extends TransactionFields {
    /** List of signatures. */
    signatures?: SignatureType[];
    /** Context-free action data, for each context-free action, there is an entry here. */
    context_free_data?: BytesType[];
}
export type SignedTransactionType = SignedTransaction | SignedTransactionFields;
export declare class SignedTransaction extends Transaction {
    /** List of signatures. */
    signatures: Signature[];
    /** Context-free action data, for each context-free action, there is an entry here. */
    context_free_data: Bytes[];
    /** The transaction without the signatures. */
    get transaction(): Transaction;
    get id(): Checksum256;
    static from(object: SignedTransactionType): SignedTransaction;
}
export type PackedTransactionType = PackedTransaction | {
    signatures?: SignatureType[];
    compression?: UInt8Type;
    packed_context_free_data?: BytesType;
    packed_trx: BytesType;
};
export declare enum CompressionType {
    none = 0,
    zlib = 1
}
export declare class PackedTransaction extends Struct {
    signatures: Signature[];
    compression: UInt8;
    packed_context_free_data: Bytes;
    packed_trx: Bytes;
    static from(object: PackedTransactionType): PackedTransaction;
    static fromSigned(signed: SignedTransaction, compression?: CompressionType): PackedTransaction;
    getTransaction(): Transaction;
    getSignedTransaction(): SignedTransaction;
}
export declare class TransactionReceipt extends Struct {
    status: string;
    cpu_usage_us: UInt32;
    net_usage_words: UInt32;
}
//# sourceMappingURL=Transaction.d.ts.map