import { ethers } from "ethers"; import { Connection, Keypair, Transaction } from "@solana/web3.js"; import { WalletContextState } from "@solana/wallet-adapter-react"; import { TransactionCallbacks, TransactionResult } from "../base/BasePreMarket"; /** * Blockchain type enum */ export declare enum BlockchainType { EVM = "evm", SOLANA = "solana" } /** * Parameters for EVM transaction */ export interface EVMTransactionParams { tx: ethers.PopulatedTransaction; wallet: ethers.Wallet | ethers.Signer; getRandomProvider: () => ethers.providers.Provider; contract?: ethers.BaseContract; } /** * Parameters for Solana transaction */ export interface SolanaTransactionParams { tx: Transaction; signer: Keypair | WalletContextState; connection: Connection; } /** * Union type for transaction parameters */ export type TransactionParams = { type: BlockchainType.EVM; params: EVMTransactionParams; } | { type: BlockchainType.SOLANA; params: SolanaTransactionParams; }; /** * Universal function to sign and send a transaction on either EVM or Solana * @param transactionParams The transaction parameters specific to the blockchain * @param callbacks Optional callbacks for transaction events * @returns Transaction result with status */ export declare function signAndSendTransaction(transactionParams: TransactionParams, callbacks?: TransactionCallbacks): Promise; /** * Helper function to create EVM transaction parameters */ export declare function createEVMTransactionParams(tx: ethers.PopulatedTransaction, wallet: ethers.Wallet | ethers.Signer, getRandomProvider: () => ethers.providers.Provider, contract?: ethers.BaseContract): TransactionParams; /** * Helper function to create Solana transaction parameters */ export declare function createSolanaTransactionParams(tx: Transaction, signer: Keypair | WalletContextState, connection: Connection): TransactionParams; //# sourceMappingURL=transactionWrapper.d.ts.map