Class GasAPI

Represents a class for managing gas in transactions.

Hierarchy

  • BaseAPI
    • GasAPI

Constructors

Properties

Methods

Constructors

  • Construct a new BaseAPI object.

    Parameters

    • premia: Premia

      An instance of the Premia SDK.

    Returns GasAPI

Properties

premia: Premia

The Premia SDK instance.

streamIndex: number = 0

The current index of quote streams. Used to cancel stale streams.

Methods

  • Cancels all ongoing streams.

    Returns Promise<void>

  • Returns a promise containing the gas price.

    Parameters

    • Optional provider: JsonRpcProvider

    Returns Promise<bigint>

    Promise containing the gas price.

Generated using TypeDoc