Module: net/common

Members

(static, constant) BAN_SCORE :Number

Ban score threshold before ban is placed in effect.

Type:
  • Number
Source:

(static, constant) BAN_TIME :Number

Amount of time to ban misbheaving peers.

Type:
  • Number
Source:

(static, constant) BLOOM_VERSION :Number

Minimum version for bip37.

Type:
  • Number
Source:

(static, constant) COMPACT_VERSION :Number

Minimum version for bip152.

Type:
  • Number
Source:

(static, constant) COMPACT_WITNESS_VERSION :Number

Minimum version for bip152+segwit.

Type:
  • Number
Source:

(static, constant) HEADERS_VERSION :Number

Minimum version for getheaders.

Type:
  • Number
Source:

(static, constant) LOCAL_SERVICES :Number

Bcoin's services (we support everything).

Type:
  • Number
Source:

(static, constant) MAX_MESSAGE :Number

Max message size (~4mb with segwit, formerly 2mb)

Type:
  • Number
Source:

(static, constant) MIN_VERSION :Number

Minimum protocol version we're willing to talk to.

Type:
  • Number
Source:

(static, constant) PONG_VERSION :Number

Minimum version for pong.

Type:
  • Number
Source:

(static, constant) PROTOCOL_VERSION :Number

Default protocol version.

Type:
  • Number
Source:

(static, constant) REQUIRED_SERVICES :Number

Required services (network and segwit).

Type:
  • Number
Source:

(static, constant) SENDHEADERS_VERSION :Number

Minimum version for bip152.

Type:
  • Number
Source:

(static) services :Number

Service bits.

Type:
  • Number
Default Value:
  • {"NETWORK":"","GETUTXO":"","BLOOM":"","WITNESS":""}
Source:

(static, constant) USER_AGENT :String

Default user agent: /bcoin:[version]/.

Type:
  • String
Source:

(static, constant) ZERO_KEY :Buffer

A compressed pubkey of all zeroes.

Type:
  • Buffer
Source:

(static, constant) ZERO_NONCE :Buffer

8 zero bytes.

Type:
  • Buffer
Source:

(static, constant) ZERO_SIG :Buffer

A 64 byte signature of all zeroes.

Type:
  • Buffer
Source:

Methods

(static) nonce() → {Buffer}

Create a nonce.

Source:
Returns:
Type
Buffer