• Obtain current height of the chain

    Parameters

    • options: { cached?: boolean; onNode: Node } & {
          _expectedMineRate?: number;
          _microBlockCycle?: number;
          onNode: Node;
      }

      Options

      • Optionalcached?: boolean

        Get height from the cache. The lag behind the actual height shouldn't be more than 1 block. Use if needed to reduce requests count, and approximate value can be used. For example, for timeout check in transaction status polling.

      • onNode: Node
      • Optional_expectedMineRate?: number
      • Optional_microBlockCycle?: number
      • onNode: Node

    Returns Promise<number>

    Current chain height