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:
(constant) types :Number
Migration types.
Type:
- Number
Properties:
Name | Type | Description |
---|---|---|
MIGRATE |
Number | |
SKIP |
Number | |
FAKE_MIGRATE |
Number |
- Default Value:
{"MIGRATE":0,"SKIP":1,"FAKE_MIGRATE":2}
- 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
fromString(str) → {Buffer}
Parameters:
Name | Type | Description |
---|---|---|
str |
String |
- Source:
Returns:
- Type
- Buffer
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
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:
readKey(br) → {HDPublicKey}
Parameters:
Name | Type | Description |
---|---|---|
br |
bio.BufferReader |
- Source:
Returns:
- Type
- HDPublicKey
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
shuffle(coins) → {Array.<Coin>}
Parameters:
Name | Type | Description |
---|---|---|
coins |
Array.<Coin> |
- Source:
Returns:
- Type
- Array.<Coin>
sortAge(a, b) → {Number}
Parameters:
Name | Type | Description |
---|---|---|
a |
Coin | |
b |
Coin |
- Source:
Returns:
- Type
- Number
sortInputs(a, b) → {Number}
Parameters:
Name | Type | Description |
---|---|---|
a |
Input | |
b |
Input |
- Source:
Returns:
- Type
- Number
sortOutputs(a, b) → {Number}
Parameters:
Name | Type | Description |
---|---|---|
a |
Output | |
b |
Output |
- Source:
Returns:
- Type
- Number
sortValue(a, b) → {Number}
Parameters:
Name | Type | Description |
---|---|---|
a |
Coin | |
b |
Coin |
- Source:
Returns:
- 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
writeKey(key, bw) → {void}
Parameters:
Name | Type | Description |
---|---|---|
key |
HDPublicKey | |
bw |
BufioWriter |
- Source:
Returns:
- Type
- void
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 |
Set.<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
CoinSelectorOptions
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
changeAddress |
Address |
<optional> |
Change address. |
subtractFee |
Boolean |
<optional> |
Subtract fee from output. |
subtractIndex |
Number |
<optional> |
Index of output to subtract fee from. |
height |
Number |
<optional> |
Current chain height. |
depth |
Number |
<optional> |
Minimum confirmation depth of coins to spend. |
confirmations |
Number |
<optional> |
depth alias. |
coinbaseMaturity |
Number |
<optional> |
When do CBs become spendable. |
hardFee |
Number |
<optional> |
Fixed fee. |
rate |
Number |
<optional> |
Rate of dollarydoo per kB. |
maxFee |
Number |
<optional> |
Maximum fee we are willing to pay. |
round |
Boolean |
<optional> |
Round to the nearest kilobyte. |
estimate |
function |
<optional> <nullable> |
Input script size estimator. |
selectAll |
Boolean |
<optional> |
Select all coins. |
inputs |
Array.<InputOption> |
<optional> |
Inputs to use for funding. |
- Source:
CoinSourceOptions
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
selection |
MemSelectionType |
<optional> |
Selection type. |
coins |
Array.<Coin> |
<optional> |
Coins to select from. |
- Source:
CreateAuctionResults
Type:
- Object
- Source:
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
InputOption
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
hash |
Hash | |
index |
Number |
- Source:
InvType
One of module:constants.inv.
Type:
- Number | String
Linked
Type:
- Array
Properties:
Name | Type | Description |
---|---|---|
0 |
Input | |
1 |
Output |
- Source:
LockFlags
A bitfield containing locktime flags.
Type:
- Number
MemSelectionType
Type:
- 'all' | 'random' | 'age' | 'value'
- Source:
MigrationContext
Type:
- migrator.MigrationContext
- Source:
MigrationType
Type:
- migrator.types
- Source:
MigrationType
Type:
- migrator.types
- Source:
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'
Node
Type:
- FullNode | SPVNode
- Source:
Node
Type:
- FullNode | SPVNode
- Source:
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: