Namespace: msg

bitmessage/objects. msg

Members

(static, constant) IGNORE :number

Any data with this number may be ignored. The sending node might simply be sharing its public key with you.

Type:
  • number
Source:

(static, constant) SIMPLE :number

UTF-8. Uses 'Subject' and 'Body' sections. No MIME is used.

Type:
  • number
Source:

(static, constant) TRIVIAL :number

UTF-8. No 'Subject' or 'Body' sections. Useful for simple strings of data, like URIs or magnet links.

Type:
  • number
Source:

Methods

(static) decodeAsync(buf, opts) → {Promise.<Object>}

Decode msg object message.

Parameters:
Name Type Description
buf Buffer

Message

opts Object

Decoding options

Source:
Returns:

A promise that contains decoded msg object structure when fulfilled.

Type
Promise.<Object>

(static) decodePayloadAsync(buf, opts) → {Promise.<Object>}

Decode msg object message payload.

Parameters:
Name Type Description
buf Buffer

Message payload

opts Object

Decoding options

Source:
Returns:

A promise that contains decoded msg object structure when fulfilled.

Type
Promise.<Object>

(static) encodeAsync(opts) → {Promise.<Buffer>}

Encode msg object message.

Parameters:
Name Type Description
opts Object

msg object options

Source:
Returns:

A promise that contains encoded message when fulfilled.

Type
Promise.<Buffer>

(static) encodePayloadAsync(opts) → {Promise.<Buffer>}

Encode msg object message payload.

Parameters:
Name Type Description
opts Object

msg object options

Source:
Returns:

A promise that contains encoded message payload when fulfilled.

Type
Promise.<Buffer>