Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CkbIndexer

CkbIndexer.collector will not get cell with blockHash by default, please use OtherQueryOptions.withBlockHash and OtherQueryOptions.CKBRpcUrl to get blockHash if you need.

Hierarchy

  • CkbIndexer

Implements

Index

Constructors

constructor

  • new CkbIndexer(ckbRpcUrl: string): CkbIndexer
  • new CkbIndexer(ckbIndexerUrl: string, ckbRpcUrl: string): CkbIndexer
  • Parameters

    • ckbRpcUrl: string

    Returns CkbIndexer

  • Parameters

    • ckbIndexerUrl: string
    • ckbRpcUrl: string

    Returns CkbIndexer

Properties

ckbIndexerUri

ckbIndexerUri: string

ckbIndexerUrl

ckbIndexerUrl: string

Optional ckbRpcUrl

ckbRpcUrl: undefined | string

emitters

emitters: IndexerEmitter[] = []

isSubscribeRunning

isSubscribeRunning: boolean = false

medianTimeEmitters

medianTimeEmitters: EventEmitter[] = []

uri

uri: string

Static version

version: string = "0.4.1"

Methods

asyncSleep

  • asyncSleep(timeout: number): Promise<void>
  • Parameters

    • timeout: number

    Returns Promise<void>

collector

  • collector cells without blockHash by default.if you need blockHash, please add OtherQueryOptions.withBlockHash and OtherQueryOptions.ckbRpcUrl. don't use OtherQueryOption if you don't need blockHash,cause it will slowly your collect.

    Parameters

    Returns CellCollector

getCells

getTransactions

running

  • running(): boolean
  • Returns boolean

start

  • start(): void
  • Returns void

startForever

  • startForever(): void
  • Returns void

stop

  • stop(): void
  • Returns void

subscribe

  • Parameters

    Returns EventEmitter

subscribeMedianTime

  • subscribeMedianTime(): EventEmitter
  • Returns EventEmitter

tip

  • tip(): Promise<IndexerType.Tip>
  • Returns Promise<IndexerType.Tip>

waitForSync

  • waitForSync(blockDifference?: number): Promise<void>
  • Parameters

    • Default value blockDifference: number = 0

    Returns Promise<void>

Generated using TypeDoc