• Parse the witness type from the first 4 bytes.

    If the first 4 bytes as a little-endian uint32 is greater than or equal to MinWitnessLayoutTag, it will be parsed as WitnessLayout. Otherwise it is considered as WitnessArgs.

    Parameters

    • witness: undefined | null | Uint8Array

    Returns "WitnessArgs" | WitnessLayoutTagNames

    "WitnessArgs" for WitnessArgs, or a variant name of WitnessLayout.

    Throws

    Error if the witness is neither WitnessArgs nor WitnessLayout buffer.

    See

    tryParseWitness

Generated using TypeDoc