Global

Members

(constant) url :String

Repository URL.

Type:
  • String
Source:

(constant) version :String

Current version string.

Type:
  • String
Source:

Methods

(private) bindExit()

Cleanup all child processes.

Source:

checksig(msg, sig, key) → {Boolean}

Verify a signature, taking into account sighash type.

Parameters:
Name Type Description
msg Buffer

Signature hash.

sig Buffer
key Buffer
Source:
Returns:
Type
Boolean

decode(str, exp) → {Number}

Parse a fixed number string and multiply by a power of ten (uses no floating point arithmetic).

Parameters:
Name Type Description
str String
exp Number

Number of decimal places.

Source:
Returns:

Integer.

Type
Number

encode(num, exp) → {String}

Convert int to fixed number string and reduce by a power of ten (uses no floating point arithmetic).

Parameters:
Name Type Description
num Number
exp Number

Number of decimal places.

Source:
Returns:

Fixed number string.

Type
String

fromFloat(num, exp) → {Number}

Parse a double float number and multiply by a power of ten (uses no floating point arithmetic).

Parameters:
Name Type Description
num Number
exp Number

Number of decimal places.

Source:
Returns:

Integer.

Type
Number

insert(items, item, compare) → {Number}

Perform a binary insert on a sorted array.

Parameters:
Name Type Description
items Array
item Object
compare function
Source:
Returns:

index

Type
Number

(private) listenExit(handler)

Listen for exit.

Parameters:
Name Type Description
handler function
Source:

remove(items, item, compare) → {Boolean}

Perform a binary removal on a sorted array.

Parameters:
Name Type Description
items Array
item Object
compare function
Source:
Returns:
Type
Boolean

Perform a binary search on a sorted array.

Parameters:
Name Type Attributes Description
items Array
key Object
compare function
insert Boolean <nullable>
Source:
Returns:

Index.

Type
Number

toFloat(num, exp) → {Number}

Convert int to float and reduce by a power of ten (uses no floating point arithmetic).

Parameters:
Name Type Description
num Number
exp Number

Number of decimal places.

Source:
Returns:

Double float.

Type
Number

validateKey(key, flagsnullable) → {Boolean}

Test whether the data element is a valid key if VERIFY_STRICTENC is enabled.

Parameters:
Name Type Attributes Description
key Buffer
flags VerifyFlags <nullable>
Source:
Throws:
ScriptError
Returns:
Type
Boolean

validateSignature(sig, flagsnullable) → {Boolean}

Test whether the data element is a valid signature based on the encoding, S value, and sighash type. Requires VERIFY_DERSIG|VERIFY_LOW_S|VERIFY_STRICTENC, VERIFY_LOW_S and VERIFY_STRING_ENC to be enabled respectively. Note that this will allow zero-length signatures.

Parameters:
Name Type Attributes Description
sig Buffer
flags VerifyFlags <nullable>
Source:
Throws:
ScriptError
Returns:
Type
Boolean