Members
(constant) migrationLayout
This entry needs to be part of all dbs that support migrations. V -> DB Version M -> migration state
- Source:
(constant) oldLayout
Previous layout used M[id]-s to list of executed migrations
- Source:
(constant) opCache :Array.<Opcode>
Type:
- Array.<Opcode>
- Source:
ownership :Ownership
Type:
- 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
fromU32(num) → {Buffer}
Parameters:
Name | Type | Description |
---|---|---|
num |
Number |
- Source:
Returns:
- Type
- Buffer
fromU32(num) → {Buffer}
Parameters:
Name | Type | Description |
---|---|---|
num |
Number |
- Source:
Returns:
- Type
- Buffer
groupKey(addr) → {Buffer}
Parameters:
Name | Type | Description |
---|---|---|
addr |
NetAddress |
- Source:
Returns:
- Type
- Buffer
insert(items, item, compare, uniqopt) → {Number}
Perform a binary insert on a sorted array.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
items |
Array | |||
item |
Object | |||
compare |
function | |||
uniq |
Boolean |
<optional> |
false |
- 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
search(items, key, compare, insertopt) → {Number}
Perform a binary search on a sorted array.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
items |
Array | |||
key |
Object | |||
compare |
function | |||
insert |
Boolean |
<optional> |
false |
- Source:
Returns:
Index.
- Type
- Number
splice(list, i)
Parameters:
Name | Type | Description |
---|---|---|
list |
Array | |
i |
Number |
- Source:
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
toString(buf) → {String}
Parameters:
Name | Type | Description |
---|---|---|
buf |
Buffer |
- Source:
Returns:
- Type
- String
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:
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:
Returns:
- Type
- Boolean
Type Definitions
ActionAbort
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
type |
exports.scanActions | ABORT |
- Source:
ActionNext
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
type |
exports.scanActions | NEXT |
- Source:
ActionRepeat
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
type |
exports.ScanAction | REPEAT |
- Source:
ActionRepeatAdd
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
type |
exports.scanActions | REPEAT_ADD |
chunks |
Array.<Buffer> |
- Source:
ActionRepeatSet
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
type |
exports.scanActions | REPEAT_SET |
filter |
BloomFilter |
- Source:
AddBlockResult
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
txs |
Number | Number of transactions added on this add. |
filterUpdated |
Boolean | Whether the bloom filter was updated. |
- Source:
AddressOptions
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
hash |
Hash | |
version |
Number |
- Source:
AddressString
Serialized address.
Type:
AddressType
A subset of ScriptType, including pubkeyhash, scripthash, witnesspubkeyhash, and witnessscripthash. This value specifically refers to the address prefix. It is a network-agnostic way of representing prefixes. May sometimes be a string if specified.
Type:
- Number | String
AddResult
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
details |
Details | |
derived |
Array.<WalletKey> |
- Source:
AddTXResult
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
wids |
Number | Wallet IDs affected. |
filterUpdated |
Boolean | Whether the bloom filter was updated. /** WalletDB |
- Source:
Amount
A dollarydoo amount. This is technically a JS double float, but it is regularly enforced to be less than 53 bits and less than MAX_MONEY in various functions.
Type:
- Number
AmountUnitType
One of doo
, uhns
, mhns
, hns
, handshake
.
Type:
- 'doo' | 'uhns' | 'mhns' | 'hns' | 'handshake'
Base58String
Base58 string.
Type:
- String
Bech32String
Bech32 string.
Type:
- String
BlockExtraInfo
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
medianTime |
Number | |
txIndex |
Number |
- Source:
BN
A big number (bn.js)
Type:
- Object
BufioWriter
Type:
- StaticWriter | BufferWriter
Hash
32 byte buffer.
Type:
- Buffer
HDPrivateKeyOptions
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
depth |
Number | |
parentFingerPrint |
Number | |
childIndex |
Number | |
chainCode |
Buffer | |
privateKey |
Buffer |
- Source:
HDPublicKeyID
Type:
- String
- Source:
HDPublicKeyOptions
Properties:
Name | Type | Description |
---|---|---|
depth |
Number | |
parentFingerPrint |
Number | |
childIndex |
Number | |
chainCode |
Buffer | |
publicKey |
Buffer |
- Source:
HexHash
Hex-string hash.
Type:
- String
InvType
One of module:constants.inv.
Type:
- Number | String
LockFlags
A bitfield containing locktime flags.
Type:
- Number
MnemonicOptions
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
bits |
Number |
<optional> <nullable> |
|
entropy |
Buffer |
<optional> <nullable> |
|
phrase |
String |
<optional> <nullable> |
|
language |
String |
<optional> <nullable> |
- Source:
NameFlags
A bitfield containing name flags.
Type:
- Number
NetworkType
One of main
, testnet
, regtest
, simnet
.
Type:
- 'main' | 'testnet' | 'regtest' | 'simnet'
OutpointJSON
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
hash |
HexHash | |
index |
Number |
- Source:
OutputJSON
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
value |
AmountValue | |
address |
String | |
covenant |
CovenantJSON |
- Source:
Rate
Rate of dollarydoos per kB.
Type:
RawBlock
Raw block data.
Type:
- Buffer
ScanAction
Type:
- Source:
ScanBlockResult
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
entry |
ChainEntry | |
txs |
Array.<TX> |
- Source:
ScanInteractiveIterCB(entry, txs) → {Promise.<ScanAction>}
Parameters:
Name | Type | Description |
---|---|---|
entry |
ChainEntry | |
txs |
Array.<TX> |
- Source:
Returns:
- Type
- Promise.<ScanAction>
ScriptType
An output script type.
Type:
- Number | String
- Source:
- See:
-
- {module:constants.scriptTypes} May sometimes be a string if specified.
SighashType
Signature hash type. One of all
, single
, none
, or
one of constants.hashType.
Type:
- Number
URIOptions
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
address |
Address | ||
amount |
AmountValue |
<optional> <nullable> |
|
label |
String |
<optional> <nullable> |
|
message |
String |
<optional> <nullable> |
|
request |
String |
<optional> <nullable> |
VerifyFlags
A bitfield containing script verify flags.
Type:
- Number
WitnessOptions
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
items |
Array.<Buffer> | ||
redeem |
Script |
<nullable> |
|
length |
Number |
- Source: