Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ChronikClient

Client to access a Chronik instance.Plain object, without any connections.

Hierarchy

  • ChronikClient

Index

Constructors

Methods

  • block(hashOrHeight: string | number): Promise<Block>
  • Fetch the block given hash or height.

    Parameters

    • hashOrHeight: string | number

    Returns Promise<Block>

  • blocks(startHeight: number, endHeight: number): Promise<BlockInfo[]>
  • Fetch block info of a range of blocks. startHeight and endHeight are inclusive ranges.

    Parameters

    • startHeight: number
    • endHeight: number

    Returns Promise<BlockInfo[]>

  • broadcastTx(rawTx: string | Uint8Array, skipSlpCheck?: boolean): Promise<{ txid: string }>
  • Broadcasts the rawTx on the network. If skipSlpCheck is false, it will be checked that the tx doesn't burn any SLP tokens before broadcasting.

    Parameters

    • rawTx: string | Uint8Array
    • skipSlpCheck: boolean = false

    Returns Promise<{ txid: string }>

  • broadcastTxs(rawTxs: (string | Uint8Array)[], skipSlpCheck?: boolean): Promise<{ txids: string[] }>
  • Broadcasts the rawTxs on the network, only if all of them are valid. If skipSlpCheck is false, it will be checked that the txs don't burn any SLP tokens before broadcasting.

    Parameters

    • rawTxs: (string | Uint8Array)[]
    • skipSlpCheck: boolean = false

    Returns Promise<{ txids: string[] }>

  • token(tokenId: string): Promise<Token>
  • Fetch token info and stats given the tokenId.

    Parameters

    • tokenId: string

    Returns Promise<Token>

  • tx(txid: string): Promise<Tx>
  • Fetch tx details given the txid.

    Parameters

    • txid: string

    Returns Promise<Tx>

  • Validate the given outpoints: whether they are unspent, spent or never existed.

    Parameters

    Returns Promise<UtxoState[]>

Generated using TypeDoc