Class: ScriptEndpointInNode
Allows fetching script history and UTXOs.
Constructors
constructor
• new ScriptEndpointInNode(proxyInterface
, scriptType
, scriptPayload
): ScriptEndpointInNode
Parameters
Name | Type |
---|---|
proxyInterface | FailoverProxy |
scriptType | string |
scriptPayload | string |
Returns
Defined in
Methods
history
▸ history(page?
, pageSize?
): Promise
<TxHistoryPage_InNode
>
Fetches the tx history of this script, in anti-chronological order. This means it's ordered by first-seen first, i.e. TxHistoryPage_InNode.txs[0] will be the most recent tx. If the tx hasn't been seen by the indexer before, it's ordered by the block timestamp.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
page | number | 0 | Page index of the tx history. |
pageSize | number | 25 | Number of txs per page. |
Returns
Promise
<TxHistoryPage_InNode
>
Defined in
utxos
▸ utxos(): Promise
<ScriptUtxos_InNode
>
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_InNode
>