solana-resilience-kit - v1.0.0
    Preparing search index...

    Class FeeEstimator

    Index

    Constructors

    Methods

    • Full compute-budget recommendation (CU limit + price + resulting fee).

      The CU limit is the simulated consumption scaled by a safety margin (Math.round, not ceil6000 * 1.1 is 6600.000000000001 in IEEE-754, and rounding lands on the intended 6600). The price comes from the oracle at the requested level. The resulting fee is ceil(limit * price / 1e6) because the network charges priority fee on the requested limit in micro-lamports.

      Parameters

      Returns Promise<ComputeBudget>

    • Simulates the tx and returns unitsConsumed (no margin applied).

      We use replaceRecentBlockhash: true so the simulation does not fail on a stale/expired blockhash, and we never verify signatures — the only thing we care about here is the compute-unit count the program would burn.

      Parameters

      • wireTransaction: string

      Returns Promise<number>