pubkey
object.
Methods
(static) decodeAsync(buf, optsopt) → {Promise.<DecodeResult>}
Decode pubkey
object message.
Parameters:
Name | Type | Attributes | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
buf |
Buffer | Message |
|||||||
opts |
Object |
<optional> |
Any of object.decode options and: Properties
|
- Source:
Returns:
A promise that contains
decoded pubkey
structure
when fulfilled.
- Type
- Promise.<DecodeResult>
(static) decodePayloadAsync()
Decode pubkey
object message payload.
The same as decodeAsync.
- Source:
(static) encodeAsync(opts) → {Promise.<Buffer>}
Encode pubkey
object message.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
Object |
Properties
|
- Source:
Returns:
A promise that contains encoded message when fulfilled.
- Type
- Promise.<Buffer>
(static) encodePayloadAsync()
Encode pubkey
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 |
tag |
Buffer | Tag derived from the address object (present only if object version is 4) |
behavior |
Object | Pubkey features that can be expected from the node |
signPublicKey |
Buffer | Signing public key |
encPublicKey |
Buffer | Encryption public key |
nonceTrialsPerByte |
number | Difficulty parameter of the
node (present only for |
payloadLengthExtraBytes |
number | Difficulty parameter
of the node (present only for |
signature |
Buffer | Signature of the message (present
only for |
length |
number | Real data length |
- Source: