Class: Program

script~Program(version, data)

Witness Program

Constructor

new Program(version, data)

Create a witness program.

Parameters:
Name Type Description
version Number
data Buffer
Properties:
Name Type Description
version Number

Ranges from 0 to 16.

type String | null

Null if malformed.

data Buffer

The hash (for now).

Source:

Methods

getType() → {ScriptType}

Get the witness program type.

Source:
Returns:
Type
ScriptType

inspectSymbol() → {String}

Inspect the program.

Source:
Returns:
Type
String

isMalformed() → {Boolean}

Test whether the program is malformed.

Source:
Returns:
Type
Boolean

isUnknown() → {Boolean}

Test whether the program is either an unknown version or malformed.

Source:
Returns:
Type
Boolean