import { SendPrivateTransactionOptions } from '../types/types'; import { TransactionReceipt, TransactionResponse } from '@ethersproject/abstract-provider'; /** * The Transact namespace contains methods used for sending transactions and * checking on the state of submitted transactions. * * Do not call this constructor directly. Instead, instantiate an Alchemy object * with `const alchemy = new Alchemy(config)` and then access the core namespace * via `alchemy.transact`. */ export declare class TransactNamespace { private readonly config; /** * Used to send a single transaction to Flashbots. Flashbots will attempt to * send the transaction to miners for the next 25 blocks. * * Returns the transaction hash of the submitted transaction. * * @param signedTransaction The raw, signed transaction as a hash. * @param maxBlockNumber Optional highest block number in which the * transaction should be included. * @param options Options to configure the request. */ sendPrivateTransaction(signedTransaction: string, maxBlockNumber?: number, options?: SendPrivateTransactionOptions): Promise; /** * Stops the provided private transaction from being submitted for future * blocks. A transaction can only be cancelled if the request is signed by the * same key as the {@link sendPrivateTransaction} call submitting the * transaction in first place. * * Please note that fast mode transactions cannot be cancelled using this method. * * Returns a boolean indicating whether the cancellation was successful. * * @param transactionHash Transaction hash of private tx to be cancelled */ cancelPrivateTransaction(transactionHash: string): Promise; /** * Returns the transaction with hash or null if the transaction is unknown. * * If a transaction has not been mined, this method will search the * transaction pool. Various backends may have more restrictive transaction * pool access (e.g. if the gas price is too low or the transaction was only * recently sent and not yet indexed) in which case this method may also return null. * * NOTE: This is an alias for {@link CoreNamespace.getTransaction}. * * @param transactionHash The hash of the transaction to get. * @public */ getTransaction(transactionHash: string | Promise): Promise; /** * Submits transaction to the network to be mined. The transaction must be * signed, and be valid (i.e. the nonce is correct and the account has * sufficient balance to pay for the transaction). * * NOTE: This is an alias for {@link CoreNamespace.sendTransaction}. * * @param signedTransaction The signed transaction to send. * @public */ sendTransaction(signedTransaction: string | Promise): Promise; /** * Returns a promise which will not resolve until specified transaction hash is mined. * * If {@link confirmations} is 0, this method is non-blocking and if the * transaction has not been mined returns null. Otherwise, this method will * block until the transaction has confirmed blocks mined on top of the block * in which it was mined. * * NOTE: This is an alias for {@link CoreNamespace.waitForTransaction}. * * @param transactionHash The hash of the transaction to wait for. * @param confirmations The number of blocks to wait for. * @param timeout The maximum time to wait for the transaction to confirm. * @public */ waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise; }