Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ScriptEndpoint

Allows fetching script history and UTXOs.

Hierarchy

  • ScriptEndpoint

Index

Constructors

Methods

Constructors

  • new ScriptEndpoint(url: string, scriptType: string, scriptPayload: string): ScriptEndpoint

Methods

  • history(page?: number, pageSize?: number): Promise<TxHistoryPage>
  • Fetches the tx history of this script, in anti-chronological order. This means it's ordered by first-seen first. If the tx hasn't been seen by the indexer before, it's ordered by the block timestamp.

    Parameters

    • Optional page: number

      Page index of the tx history.

    • Optional pageSize: number

      Number of txs per page.

    Returns Promise<TxHistoryPage>

  • Fetches the current UTXO set for this script. It is grouped by output script, in case a script type can match multiple different output scripts (e.g. Taproot on Lotus).

    Returns Promise<ScriptUtxos[]>

Generated using TypeDoc