Namespace: message

bitmessage/structs. message

Members

(static, constant) MAGIC :number

Bitmessage magic value.

Type:
  • number
Source:

Methods

(static) decode(buf) → {Object}

Decode message structure.
NOTE: payload is copied, rest references input buffer.

Parameters:
Name Type Description
buf Buffer

Buffer that starts with encoded message

Source:
Returns:

Decoded message structure.

Type
Object

(static) encode(command, payload) → {Buffer}

Encode message structure.

Parameters:
Name Type Description
command string

Message command

payload Bufer

Message payload

Source:
Returns:

Encoded message structure.

Type
Buffer