Taquito TypeDocs
    Preparing search index...

    Class RPCEstimateProvider

    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.

    Hierarchy

    • Provider
      • RPCEstimateProvider

    Implements

    Index

    Constructors

    Properties

    context: Context

    Accessors

    Methods

    • Type Parameters

      • T extends { fee?: number; gasLimit?: number; storageLimit?: number }

      Parameters

      • __namedParameters: T
      • estimator: (param: T) => Promise<Estimate>

      Returns Promise<
          {
              fee: number
              | undefined;
              gasLimit: number | undefined;
              storageLimit: number | undefined;
          },
      >

    • Parameters

      Returns Promise<
          {
              counter: number;
              opbytes: string;
              opOb: { branch: string; contents: OperationContents[]; protocol: string };
          },
      >

    • Parameters

      • publicKeyHash: string

      Returns Promise<boolean>

    • Parameters

      Returns Promise<
          {
              context: Context;
              forgedBytes: ForgedBytes;
              hash: string;
              opResponse: OperationContentsAndResult[];
          },
      >

    • Parameters

      Returns Promise<
          {
              context: Context;
              op: RPCSimulateOperationParam;
              opResponse: PreapplyResponse;
          },
      >