import { BaseProvider } from '../providers/base'; import { EncodeObject } from '@cosmjs/proto-signing'; import { BatchResult } from '../types/results'; /** * Individual operation in a batch */ export interface BatchOperation { type: string; msg: EncodeObject; } /** * Builder pattern for constructing batch operations */ export declare class BatchBuilder { private operations; private manager; constructor(manager: BatchManager); /** * Add a deployment creation to the batch */ addDeployment(sdl: string): BatchBuilder; /** * Add a lease creation to the batch */ addLease(dseq: string, provider: string): BatchBuilder; /** * Add a certificate creation to the batch */ addCertificate(cert: string): BatchBuilder; /** * Add a custom message to the batch */ addCustomMessage(msg: EncodeObject): BatchBuilder; /** * Get the number of operations in the batch */ getOperationCount(): number; /** * Get all operations in the batch */ getOperations(): EncodeObject[]; /** * Clear all operations from the batch */ clear(): BatchBuilder; /** * Execute all operations in the batch as a single transaction * * @returns Batch execution result with transaction hash */ execute(): Promise; } /** * Configuration options for BatchManager */ export interface BatchManagerConfig { gasPrice?: string; gasAdjustment?: number; } /** * Manager for batch operations on the Akash Network * Allows bundling multiple blockchain operations into a single transaction */ export declare class BatchManager { private provider; private wallet; private gasPrice; private gasAdjustment; constructor(provider: BaseProvider, wallet?: any, config?: BatchManagerConfig); /** * Set the wallet to use for batch operations */ setWallet(wallet: any): void; /** * Set gas price for transactions */ setGasPrice(gasPrice: string): void; /** * Set gas adjustment multiplier */ setGasAdjustment(adjustment: number): void; /** * Create a new batch builder */ createBatch(): Promise; /** * Execute a batch of operations on the blockchain * Uses SigningStargateClient to broadcast transactions in a single batch */ executeBatch(operations: EncodeObject[]): Promise; /** * Simulate a batch to estimate gas using real chain simulation * Uses SigningStargateClient.simulate() to get accurate gas estimates */ simulateBatch(operations: EncodeObject[]): Promise<{ gasEstimate: number; fee: { denom: string; amount: string; }; }>; /** * Validate a batch of operations without executing */ validateBatch(operations: EncodeObject[]): { valid: boolean; errors: string[]; }; /** * Get transaction details from the blockchain * Queries the actual transaction data using StargateClient */ getTransactionDetails(txHash: string): Promise<{ hash: string; height: number; success: boolean; timestamp: string; } | null>; /** * Wait for transaction confirmation with polling * Polls the blockchain until the transaction is confirmed or timeout is reached */ waitForConfirmation(txHash: string, timeoutMs?: number, pollIntervalMs?: number): Promise<{ hash: string; height: number; success: boolean; confirmed: boolean; }>; } export type { BatchResult }; //# sourceMappingURL=batch.d.ts.map