Module: bitmessage/objects

Working with objects.
NOTE: Most operations with objects in this module are asynchronous and return promises.

Source:
See:

Namespaces

broadcast
getpubkey
msg
pubkey

Methods

(static) getPayloadType(buf) → (nullable) {number}

Try to get type of the given object message payload. Note that this function doesn't do any validation because it is already provided by object.decodePayload routine. Normally you call this for each incoming object message payload and then call decode function of the appropriate object handler.

Parameters:
Name Type Description
buf Buffer

Buffer that starts with object message payload

Source:
Returns:

Object's type if any.

Type
number

(static) getType(buf) → (nullable) {number}

Try to get type of the given encoded object message. Note that this function doesn't do any validation because it is already provided by object.decode routine. Normally you call this for each incoming object message and then call decode function of the appropriate object handler.

Parameters:
Name Type Description
buf Buffer

Buffer that starts with encoded object message

Source:
Returns:

Object's type if any.

Type
number