import { Blockhash, CompiledInstruction, Connection, Finality, Message, MessageHeader, Transaction, TransactionInstruction, TransactionResponse, VersionedTransaction, VersionedTransactionResponse } from '@solana/web3.js'; import { Maybe, Overwrite } from '@tensor-hq/ts-utils'; import { Buffer } from 'buffer'; export type TransactionMessageJSON = { header: MessageHeader; accountKeys: string[]; recentBlockhash: Blockhash; instructions: CompiledInstruction[]; }; export type TransactionJSON = Overwrite; export type TransactionResponseJSON = Overwrite; export type TransactionResponseLoadedAddresses = { v0LoadedAddresses?: { numWritableAccounts: number; numReadonlyAccounts: number; }; }; export type TransactionResponseAugmented = TransactionResponse & TransactionResponseLoadedAddresses; export type TransactionResponseAugmentedJSON = Overwrite; export declare const castTxResponseJSON: (tx: T) => Overwrite; export declare const castTxResponse: (tx: T) => Overwrite; export declare const castMessageJSON: (msg: Message) => TransactionMessageJSON; export declare const getAccountKeys: (tx: VersionedTransactionResponse) => import("@solana/web3.js").PublicKey[]; /** converts the new v0 tx type to legacy so that our downstream parser works as expected */ export declare const convertTxToLegacy: (tx: VersionedTransactionResponse & TransactionResponseLoadedAddresses) => TransactionResponseAugmented; /** gets new v0 and legacy transactions with the old TransactionResponse format */ export declare const getTransactionConvertedToLegacy: (conn: Connection, sig: string, commitment?: Finality) => Promise; export declare const MAX_COMPUTE_UNITS = 1400000; /** Adds (1) increase compute + (2) priority fees */ export declare const prependComputeIxs: (ixs: TransactionInstruction[], compute?: Maybe, priorityMicroLamports?: Maybe) => TransactionInstruction[]; export declare const serializeAnyVersionTx: (tx: Transaction | VersionedTransaction, verifySignatures?: boolean) => number[]; export declare const legacyToV0Tx: (legacy: Buffer | Uint8Array | Array) => VersionedTransaction; //# sourceMappingURL=transaction.d.ts.map