Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a handshake payload

Hierarchy

  • Handshake

Implements

Index

Constructors

constructor

Properties

Private m_current_height

m_current_height: number = 0

Private m_local_peerlist

m_local_peerlist: PeerEntry[] = ...

Private m_local_time

m_local_time: Date = ...

Private m_my_port

m_my_port: number = 0

Private m_network_id

m_network_id: string = ...

Private m_peer_id

m_peer_id: string = ...

Private m_top_id

m_top_id: string = ...

Private m_version

m_version: number = 0

Accessors

current_height

  • get current_height(): number
  • set current_height(value: number): void
  • Our current blockchain height

    Returns number

  • Our current blockchain height

    Parameters

    • value: number

    Returns void

local_peerlist

  • Our list of locally known peers

    Returns PeerEntry[]

  • Our list of locally known peers

    Parameters

    Returns void

local_time

  • get local_time(): Date
  • set local_time(value: Date): void
  • The current date and time

    Returns Date

  • The current date and time

    Parameters

    • value: Date

    Returns void

my_port

  • get my_port(): number
  • set my_port(value: number): void
  • Our port number for p2p traffic

    Returns number

  • Our port number for p2p traffic

    Parameters

    • value: number

    Returns void

network_id

  • get network_id(): string
  • set network_id(value: string): void
  • The network ID

    Returns string

  • The network ID

    Parameters

    • value: string

    Returns void

peer_id

  • get peer_id(): string
  • set peer_id(value: string): void
  • Our peer ID

    Returns string

  • Our peer ID

    Parameters

    • value: string

    Returns void

top_id

  • get top_id(): string
  • set top_id(value: string): void
  • The top block hash that we know about

    Returns string

  • The top block hash that we know about

    Parameters

    • value: string

    Returns void

version

  • get version(): number
  • set version(value: number): void
  • The protocol version supported

    Returns number

  • The protocol version supported

    Parameters

    • value: number

    Returns void

Methods

toBuffer

  • toBuffer(): Buffer
  • Provides the Buffer representation of the object

    Returns Buffer

    the buffer representation of the object

toString

  • toString(): string
  • Provides the hexadecimal (blob) representation of the object

    Returns string

    the hexadecimal (blob) representation of the object

Static from

  • from(data: string | Buffer | Reader): Handshake
  • Creates a new instance of the object using the supplied data found in the levin packet

    Parameters

    • data: string | Buffer | Reader

      the data contained for the payload in the levin packet

    Returns Handshake

    a new instance of the object

Generated using TypeDoc