@taquito/taquito
Version:
High level functionality that builds upon the other packages in the Tezos Typescript Library Suite.
171 lines (170 loc) • 7.28 kB
TypeScript
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';
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;
/**
*
* @description Estimate gasLimit, storageLimit and fees for an origination operation
*
* @returns An estimation of gasLimit, storageLimit and fees for the operation
*
* @param OriginationOperation Originate operation parameter
*/
originate(params: OriginateParams): Promise<Estimate>;
/**
*
* @description 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>;
/**
*
* @description 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>;
/**
*
* @description 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>;
/**
*
* @description 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>;
/**
*
* @description 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>;
/**
*
* @description Estimate gasLimit, storageLimit and fees for a delegate operation
*
* @returns An estimation of gasLimit, storageLimit and fees for the operation
*
* @param Estimate
*/
setDelegate({ fee, gasLimit, storageLimit, ...rest }: DelegateParams): Promise<Estimate>;
/**
*
* @description 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[]>;
/**
*
* @description Estimate gasLimit, storageLimit and fees for a delegate operation
*
* @returns An estimation of gasLimit, storageLimit and fees for the operation
*
* @param Estimate
*/
registerDelegate({ fee, storageLimit, gasLimit, ...rest }: RegisterDelegateParams, source?: string): Promise<Estimate>;
/**
*
* @description 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 Estimate
*/
reveal(params?: RevealParams): Promise<Estimate | undefined>;
/**
*
* @description 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>;
/**
*
* @description 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>;
/**
*
* @description Estimate gasLimit, storageLimit and fees for an Update Consensus Key operation
* @returns An estimation of gasLimit, storageLimit and fees for the operation
* @param Estimate
*/
updateConsensusKey(params: UpdateConsensusKeyParams): Promise<Estimate>;
/**
*
* @description Estimate gasLimit, storageLimit and fees for an Update Companion Key operation
* @returns An estimation of gasLimit, storageLimit and fees for the operation
* @param Estimate
*/
updateCompanionKey(params: UpdateCompanionKeyParams): Promise<Estimate>;
/**
*
* @description Estimate gasLimit, storageLimit and fees for a smart_rollup_add_messages operation
*
* @returns An estimation of gasLimit, storageLimit and fees for the operation
*
* @param Estimate
*/
smartRollupAddMessages(params: SmartRollupAddMessagesParams): Promise<Estimate>;
/**
*
* @description Estimate gasLimit, storageLimit and fees for an Smart Rollup Originate operation
*
* @returns An estimation of gasLimit, storageLimit and fees for the operation
*
* @param SmartRollupOriginateParams
*/
smartRollupOriginate(params: SmartRollupOriginateParams): Promise<Estimate>;
/**
*
* @description 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 Estimate
*/
smartRollupExecuteOutboxMessage(params: SmartRollupExecuteOutboxMessageParams): Promise<Estimate>;
/**
*
* @description Estimate gasLimit, storageLimit and fees for contract call
*
* @returns An estimation of gasLimit, storageLimit and fees for the contract call
*
* @param Estimate
*/
contractCall(contractMethod: ContractMethodObject<ContractProvider>): Promise<Estimate>;
}