Module: bitmessage/objects

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

Source:
See:

Namespaces

broadcast
getpubkey
msg
pubkey

Methods

(static) getPayloadType()

Try to get type of the given object message payload. The same as getType.

Source:

(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