Namespace: getpubkey

bitmessage/objects. getpubkey

getpubkey object. When a node has the hash of a public key (from an address) but not the public key itself, it must send out a request for the public key.

Source:
See:

Methods

(static) decodeAsync(buf, optsopt) → {Promise.<DecodeResult>}

Decode getpubkey object message.

Parameters:
Name Type Attributes Description
buf Buffer

Message

opts Object <optional>

Any of object.decode options

Source:
Returns:

A promise that contains decoded getpubkey structure when fulfilled.

Type
Promise.<DecodeResult>

(static) decodePayloadAsync()

Decode getpubkey object message payload. The same as decodeAsync.

Source:

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

Encode getpubkey object message.

Parameters:
Name Type Description
opts Object

getpubkey object options

Properties
Name Type Attributes Description
ttl number

Time to live in seconds

to Address

Receiver of the message

skipPow boolean <optional>

Do not compute POW (false by default)

Source:
Returns:

A promise that contains encoded message when fulfilled.

Type
Promise.<Buffer>

(static) encodePayloadAsync()

Encode getpubkey object message payload. The same as encodeAsync.

Source:

Type Definitions

DecodeResult

Type:
  • Object
Properties:
Name Type Description
nonce Buffer

A 8-byte object nonce

ttl number

Time to live in seconds

expires Date

Object expiration date

type number

Object type

version number

Object version

stream number

Object stream

headerLength number

Length of the object header

ripe Buffer

The RIPEMD hash of the requested public keys for address version <= 3

tag Buffer

...or tag derived from the address object for address version >= 4

length number

Real data length

Source: