import { DelegateParams, OriginateParams, ParamsWithKind, RegisterDelegateParams, TransferParams, RevealParams, RegisterGlobalConstantParams, TransferTicketParams, IncreasePaidStorageParams, UpdateConsensusKeyParams, UpdateCompanionKeyParams, SmartRollupAddMessagesParams, SmartRollupOriginateParams, SmartRollupExecuteOutboxMessageParams, StakeParams, UnstakeParams, FinalizeUnstakeParams } from '../operations/types'; import { Estimate } from './estimate'; import { EstimationProvider } from '../estimate/estimate-provider-interface'; import { ContractMethodObject, ContractProvider } from '../contract'; import { Provider } from '../provider'; /** * Estimates gas, storage, and fees by simulating operations against the node RPC. * * On Tezos L1, Taquito historically matched estimation with built-in fee defaults because the * fee-per-byte and fee-per-gas terms were usually close to those values. Tezos X / Tezlink keeps * the same fee formula shape, but those terms are surfaced through `mempool/filter` and may be * significantly higher or dynamic, so this provider reads them from RPC before computing fees. */ export declare class RPCEstimateProvider extends Provider implements EstimationProvider { private readonly REVEAL_LENGTH; private readonly REVEAL_LENGTH_TZ4; private readonly MILLIGAS_BUFFER; private readonly STORAGE_BUFFER; private prepare; private getKeys; private getEstimationPropertiesFromOperationContent; private calculateEstimates; /** * * Estimate gasLimit, storageLimit and fees for an origination operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation * * @param params Originate operation parameter */ originate(params: OriginateParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for an transfer operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation * * @param TransferOperation Originate operation parameter */ transfer({ fee, storageLimit, gasLimit, ...rest }: TransferParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for an stake pseudo-operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation * * @param Stake pseudo-operation parameter */ stake({ fee, storageLimit, gasLimit, ...rest }: StakeParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for an Unstake pseudo-operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation * * @param Unstake pseudo-operation parameter */ unstake({ fee, storageLimit, gasLimit, ...rest }: UnstakeParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for an finalize_unstake pseudo-operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation * * @param finalize_unstake pseudo-operation parameter */ finalizeUnstake({ fee, storageLimit, gasLimit, ...rest }: FinalizeUnstakeParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for a transferTicket operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation * * @param TransferTicketParams operation parameter */ transferTicket({ fee, storageLimit, gasLimit, ...rest }: TransferTicketParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for a delegate operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation */ setDelegate({ fee, gasLimit, storageLimit, ...rest }: DelegateParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for a each operation in the batch * * @returns An array of Estimate objects. If a reveal operation is needed, the first element of the array is the Estimate for the reveal operation. */ batch(params: ParamsWithKind[]): Promise; /** * * Estimate gasLimit, storageLimit and fees for a delegate operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation */ registerDelegate({ fee, storageLimit, gasLimit, ...rest }: RegisterDelegateParams, source?: string): Promise; /** * * Estimate gasLimit, storageLimit and fees to reveal the current account * @returns An estimation of gasLimit, storageLimit and fees for the operation or undefined if the account is already revealed * * @param params Reveal operation parameter */ reveal(params?: RevealParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for an registerGlobalConstant operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation * * @param params registerGlobalConstant operation parameter */ registerGlobalConstant({ fee, storageLimit, gasLimit, ...rest }: RegisterGlobalConstantParams): Promise; /** * * Estimate gasLimit, storageLimit, and fees for an increasePaidStorage operation * * @returns An estimation of gasLimit, storageLimit, and fees for the operation * * @param params increasePaidStorage operation parameters */ increasePaidStorage({ fee, storageLimit, gasLimit, ...rest }: IncreasePaidStorageParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for an Update Consensus Key operation * @returns An estimation of gasLimit, storageLimit and fees for the operation * @param params UpdateConsensusKey operation parameter */ updateConsensusKey(params: UpdateConsensusKeyParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for an Update Companion Key operation * @returns An estimation of gasLimit, storageLimit and fees for the operation * @param params UpdateCompanionKey operation parameter */ updateCompanionKey(params: UpdateCompanionKeyParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for a smart_rollup_add_messages operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation * * @param params SmartRollupAddMessages operation parameter */ smartRollupAddMessages(params: SmartRollupAddMessagesParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for an Smart Rollup Originate operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation * * @param params SmartRollupOriginate operation parameter */ smartRollupOriginate(params: SmartRollupOriginateParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for a smart_rollup_execute_outbox_message operation * * @returns An estimation of gasLimit, storageLimit and fees for the operation * * @param params SmartRollupExecuteOutboxMessage operation parameter */ smartRollupExecuteOutboxMessage(params: SmartRollupExecuteOutboxMessageParams): Promise; /** * * Estimate gasLimit, storageLimit and fees for contract call * * @returns An estimation of gasLimit, storageLimit and fees for the contract call * * @param contractMethod ContractMethodObject for the contract call */ contractCall(contractMethod: ContractMethodObject): Promise; }