Class: VersionPacket

net/packets~VersionPacket(optionsnullable)

Version Packet

Constructor

new VersionPacket(optionsnullable)

Create a version packet.

Parameters:
Name Type Attributes Description
options Object <nullable>
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.

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

Methods

(private) fromOptions(options)

Inject properties from options.

Parameters:
Name Type Description
options Object
Source:

getSize() → {Number}

Get serialization size.

Source:
Returns:
Type
Number

(private) read(br)

Inject properties from buffer reader.

Parameters:
Name Type Description
br BufferReader
Source:

write(bw)

Write version packet to buffer writer.

Parameters:
Name Type Description
bw BufferWriter
Source: