Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Head

Endpoints for fetching the indexer Head. For more information see the Head API documentation on tzKT.

Head represents the current state of the Tezos blockchain.

Hierarchy

  • Head

Index

Constructors

constructor

  • new Head(cycle: number, level: number, hash: null | string, protocol: null | string, timestamp: Date, votingEpoch: number, votingPeriod: number, knownLevel: number, lastSync: Date, synced: boolean, quoteLevel: number, quoteBtc: number, quoteEur: number, quoteUsd: number, quoteCny: number, quoteJpy: number, quoteKrw: number, quoteEth: number): Head
  • internal

    Parameters

    • cycle: number
    • level: number
    • hash: null | string
    • protocol: null | string
    • timestamp: Date
    • votingEpoch: number
    • votingPeriod: number
    • knownLevel: number
    • lastSync: Date
    • synced: boolean
    • quoteLevel: number
    • quoteBtc: number
    • quoteEur: number
    • quoteUsd: number
    • quoteCny: number
    • quoteJpy: number
    • quoteKrw: number
    • quoteEth: number

    Returns Head

Properties

Readonly cycle

cycle: number

Readonly hash

hash: null | string

Readonly knownLevel

knownLevel: number

Readonly lastSync

lastSync: Date

Readonly level

level: number

Readonly protocol

protocol: null | string

Readonly quoteBtc

quoteBtc: number

Readonly quoteCny

quoteCny: number

Readonly quoteEth

quoteEth: number

Readonly quoteEur

quoteEur: number

Readonly quoteJpy

quoteJpy: number

Readonly quoteKrw

quoteKrw: number

Readonly quoteLevel

quoteLevel: number

Readonly quoteUsd

quoteUsd: number

Readonly synced

synced: boolean

Readonly timestamp

timestamp: Date

Readonly votingEpoch

votingEpoch: number

Readonly votingPeriod

votingPeriod: number

Methods

Static fromAPI

  • fromAPI(data: any): Head

Static get

  • get(domain?: string): Promise<Head>
  • Fetches indexer head from tzKT.

    see

    get indexer head.

    example

    Fetch current Head

    Usage

    let head: Head = await Head.get();
    

    Parameters

    • domain: string = 'https://api.tzkt.io'

    Returns Promise<Head>

    Returns indexer head and synchronization status.

Generated using TypeDoc