Class: VersionPacket

net/packets~VersionPacket(optionsopt)

Version Packet

Constructor

new VersionPacket(optionsopt)

Create a version packet.

Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Description
version Number <nullable>

Protocol version.

services Number <nullable>

Service bits.

time Number <nullable>

Timestamp of discovery.

remote NetAddress <nullable>

Their address.

nonce Buffer <nullable>
agent String <nullable>

User agent string.

height Number <nullable>

Chain height.

noRelay Boolean <nullable>

Whether transactions should be relayed immediately.

Properties:
Name Type Description
version Number

Protocol version.

services Number

Service bits.

time Number

Timestamp of discovery.

remote NetAddress

Their address.

nonce Buffer
agent String

User agent string.

height Number

Chain height.

noRelay Boolean

Whether transactions should be relayed immediately.

Source:

Extends

  • Packet

Members

version :Number

Type:
  • Number
Source:

Methods

fromOptions(options)

Inject properties from options.

Parameters:
Name Type Description
options Object
Source:

getSize() → {Number}

Get serialization size.

Source:
Returns:
Type
Number

read(br) → {this}

Inject properties from buffer reader.

Parameters:
Name Type Description
br bio.BufferReader
Source:
Returns:
Type
this

write(bw) → {BufioWriter}

Write version packet to buffer writer.

Parameters:
Name Type Description
bw BufioWriter
Source:
Returns:
Type
BufioWriter