Global

Methods

(private) DoubleMap()

DoubleMap

Source:

(private) StatEntry()

StatEntry

Source:

Type Definitions

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
Source:

Amount

A satoshi 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
Source:

Base58Address

Base58 address.

Type:
  • String
Source:

Base58String

Base58 string.

Type:
  • String
Source:

BN

A big number (bn.js)

Type:
  • Object
Source:

Hash

Buffer or hex-string hash.

Type:
  • Buffer | String
Source:

InvType

One of module:constants.inv.

Type:
  • Number | String
Source:

LockFlags

A bitfield containing locktime flags.

Type:
  • Number
Source:

Milliseconds

Unix time (milliseconds).

Type:
  • Number
Source:

NakedBlock

Type:
  • Object
Properties:
Name Type Attributes Description
version Number

Transaction version. Note that BCoin reads versions as unsigned even though they are signed at the protocol level. This value will never be negative.

prevBlock Hash
merkleRoot Hash
ts Number
bits Number
nonce Number
height Number
totalTX Number
txs Array:.<NakedTX:> <nullable>

Only present on blocks.

hashes Array:.<Hash:> <nullable>

Only present on merkleblocks.

flags Buffer <nullable>

Only present on merkleblocks.

Source:

NakedCoin

Type:
  • Object
Properties:
Name Type Description
version Number

Transaction version.

height Number

Transaction height (-1 if unconfirmed).

value Amount

Output value in satoshis.

script Script

Output script.

coinbase Boolean

Whether the containing transaction is a coinbase.

hash Hash

Transaction hash.

index Number

Output index.

Source:

NakedInput

Type:
  • Object
Properties:
Name Type Description
prevout Outpoint
script NakedScript

Input script.

sequence Number

nSequence.

witness NakedWitness

Witness.

Source:

NakedOutput

Type:
  • Object
Properties:
Name Type Description
value Amount

Value in satoshis.

script NakedScript

Output script.

Source:

NakedScript

Type:
  • Object
Properties:
Name Type Description
raw Buffer

Raw code.

code Array

Parsed code.

Source:

NakedTX

Type:
  • Object
Properties:
Name Type Description
version Number
flag Number
inputs Array:.<NakedInput:>
outputs Array:.<NakedOutput:>
locktime Number
Source:

NakedWitness

Type:
  • Object
Properties:
Name Type Description
items Array:.<Buffer:>

Stack items.

Source:

NetworkType

One of main, testnet, regtest, segnet3, segnet4.

Type:
  • String
Source:
See:
  • {module:network.types:}

Rate

Rate of satoshis per kB.

Type:
Source:

ReversedHash

Reversed hex-string hash (uint256le).

Type:
  • String
Source:

RevMap

An inverse enum. Retrieves key by value.

Type:
  • Object
Source:

ScriptType

An output script type.

Type:
  • Number | String
Source:
See:
  • {module:constants.scriptTypes} May sometimes be a string if specified.

Seconds

Unix time (seconds).

Type:
  • Number
Source:

SighashType

Signature hash type. One of all, single, none, or one of constants.hashType.

Type:
  • String | Number
Source:

VerifyFlags

A bitfield containing script verify flags.

Type:
  • Number
Source:

WalletID

Wallet ID

Type:
  • String
Source: