Caravan Documentation
    Preparing search index...

    Function parseWitnessUtxoValue

    • Parses the value of a witness UTXO.

      Witness UTXOs are expected to have their value encoded in the first 8 bytes of the hex string in little-endian byte order. This function extracts and converts that value to a BigNumber.

      Parameters

      • utxo: null | string

        The hex string representing the witness UTXO.

      • index: number

        The index of the UTXO in the PSBT input list.

      Returns BigNumber

      The parsed value as a BigNumber.