Skip to content

parseSubstateUtxo

parseSubstateUtxo(substate, substateId): ParsedUtxo | null

Defined in: ootle/src/stealth/substate-parse.ts:98

Parse a fetched substate into a ParsedUtxo, or null when it is not a live, spendable stealth UTXO.

Returns null when:

  • the substate is not the Utxo arm of SubstateValue (e.g. a component/vault),
  • the UTXO has been spent (output === null),
  • the UTXO is frozen (is_frozen === true),
  • or the substate id does not yield a valid 32-byte commitment.

IndexerGetSubstateResponse

The fetched substate response.

string

The substate id the response was fetched by (source of the commitment).

ParsedUtxo | null