Module: bitmessage/user-agent

Working with Bitmessage user agents.

Source:
See:

Members

(static, constant) SELF :Array.<Object>

User agent of the bitmessage library itself.

Type:
  • Array.<Object>
Source:

Methods

(static) decode()

Decode user agent's var_str. Just an alias for var_str.decode.

Source:

(static) encode(software) → {Buffer}

Encode user agent into var_str Buffer. Most underlying software comes first.

Parameters:
Name Type Description
software Array.<Object> | Array.<string> | string | Buffer

List of software to encode or just raw user agent string/Buffer

Source:
Returns:

Encoded user agent.

Type
Buffer

(static) encodeSelf() → {Buffer}

Encode bitmessage's library user agent.

Source:
Returns:

Encoded user agent.

Type
Buffer

(static) encodeSelfWith(software) → {Buffer}

Encode user agent with bitmessage's library user agent underneath. Most underlying software comes first.

Parameters:
Name Type Description
software Array.<Object> | Array.<string> | Object | string

List of software to encode

Source:
Returns:

Encoded user agent.

Type
Buffer

(static) parse(str) → {Array.<Object>}

Parse raw user agent into software stack list. Most underlying software comes first.
NOTE: Decoding is rather loose, it won't fail on bad user agent format because it's not that important.

Parameters:
Name Type Description
str string

Raw user agent string

Source:
Returns:

Parsed user agent.

Type
Array.<Object>