import { Connection, Transaction, TransactionInstruction, PublicKey, VersionedTransaction } from '@solana/web3.js'; import type { Provider } from './provider'; import type { Wallet } from './wallet'; import type { LoggerPlaceholder } from '@marinade.finance/ts-common'; import type { VersionedTransactionResponse, SimulatedTransactionResponse, Keypair, Signer, TransactionResponse, SendOptions, Finality, TransactionSignature } from '@solana/web3.js'; export declare const TRANSACTION_SAFE_SIZE: number; export declare function transaction(connection: Connection | Provider, feePayer?: PublicKey | Wallet | Keypair | Signer): Promise; export type ExecuteTxParams = { connection: Connection | Provider; transaction: Transaction; signers?: (Wallet | Keypair | Signer)[]; errMessage: string; simulate?: boolean; printOnly?: boolean; logger?: LoggerPlaceholder; feePayer?: PublicKey; sendOpts?: SendOptions; confirmOpts?: Finality; computeUnitPrice?: number; computeUnitLimit?: number; confirmWaitTime?: number; }; export type ExecuteTxReturnSimulated = { response: SimulatedTransactionResponse; }; export type ExecuteTxReturnExecuted = { signature: string; response: VersionedTransactionResponse; }; export type ExecuteTxReturn = ExecuteTxReturnSimulated | ExecuteTxReturnExecuted | undefined; export declare function isExecuteTxReturn(data: unknown): data is ExecuteTxReturn; export declare function partialSign(transaction: Transaction | VersionedTransaction, signers: (Wallet | Keypair | Signer)[]): Promise; export declare function unhandledRejection(err: Error, promise: Promise, logger?: LoggerPlaceholder): void; export declare function executeTx(args: Omit & { simulate: true; }): Promise; export declare function executeTx(args: Omit & { simulate?: false; printOnly?: false; }): Promise; export declare function executeTx(args: Omit & { simulate?: false; printOnly: true; }): Promise; export declare function executeTx(args: ExecuteTxParams): Promise; export declare function executeTx({ connection, transaction, signers, errMessage, printOnly, logger, feePayer, sendOpts, confirmOpts, computeUnitLimit, computeUnitPrice, confirmWaitTime, }: ExecuteTxParams): Promise; export declare function updateTransactionBlockhash(transaction: T, connection: Connection, currentBlockhash?: Readonly<{ blockhash: string; lastValidBlockHeight: number; }>): Promise; export declare function confirmTransaction(connection: Connection, txSig: TransactionSignature, confirmOpts?: Finality, logger?: LoggerPlaceholder, confirmWaitTime?: number): Promise; export declare function executeTxSimple(connection: Connection, transaction: Transaction, signers?: (Wallet | Keypair | Signer)[], sendOpts?: SendOptions, confirmOpts?: Finality): Promise; export declare function executeTxWithExceededBlockhashRetry(args: Omit & { simulate: true; }): Promise; export declare function executeTxWithExceededBlockhashRetry(args: Omit & { simulate?: false; printOnly?: false; }): Promise; export declare function executeTxWithExceededBlockhashRetry(args: Omit & { simulate?: false; printOnly: true; }): Promise; export declare function executeTxWithExceededBlockhashRetry(args: ExecuteTxParams): Promise; export declare function isSimulatedTransactionResponse(response: TransactionResponse | VersionedTransactionResponse | SimulatedTransactionResponse | undefined): response is SimulatedTransactionResponse; export declare function isVersionedTransaction(transaction: Transaction | VersionedTransaction): transaction is VersionedTransaction; export declare function filterSignersForInstruction(instructions: TransactionInstruction[], signers: (Wallet | Keypair | Signer)[], feePayer?: PublicKey): (Wallet | Keypair | Signer)[]; export declare function addComputeBudgetIxes({ transaction, computeUnitLimit, computeUnitPrice, }: { transaction: Transaction; computeUnitLimit?: number; computeUnitPrice?: number; }): void; export declare function setComputeUnitLimitIx(units: number): TransactionInstruction; export declare function setComputeUnitPriceIx(microLamports: number): TransactionInstruction; export type TransactionData = { transaction: T; instructions: TransactionInstruction[]; signers: (Wallet | Keypair | Signer)[]; }; export declare class TransactionInstructionSplitMarkerStart extends TransactionInstruction { constructor(); } export declare class TransactionInstructionSplitMarkerEnd extends TransactionInstruction { constructor(); } export declare const SPLIT_MARKER_START_INSTANCE: TransactionInstructionSplitMarkerStart; export declare const SPLIT_MARKER_END_INSTANCE: TransactionInstructionSplitMarkerEnd; export type SplitAndExecuteTxData = TransactionData; export declare function splitAndExecuteTx(args: Omit & { simulate: true; }): Promise<(ExecuteTxReturnSimulated & SplitAndExecuteTxData)[]>; export declare function splitAndExecuteTx(args: Omit & { simulate?: false; printOnly?: false; }): Promise<(ExecuteTxReturnExecuted & SplitAndExecuteTxData)[]>; export declare function splitAndExecuteTx(args: Omit & { simulate?: false; printOnly: true; }): Promise<[]>; export declare function splitAndExecuteTx(args: ExecuteTxParams): Promise<(ExecuteTxReturnExecuted & SplitAndExecuteTxData)[]>; export declare function debugStr(transaction: Transaction): string; //# sourceMappingURL=tx.d.ts.map