913 lines
11 KiB
HTML
913 lines
11 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html lang="en">
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<title>JSDoc: Module: bitmessage/user-agent</title>
|
||
|
|
||
|
<script src="scripts/prettify/prettify.js"> </script>
|
||
|
<script src="scripts/prettify/lang-css.js"> </script>
|
||
|
<!--[if lt IE 9]>
|
||
|
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||
|
<![endif]-->
|
||
|
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
||
|
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
|
||
|
<div id="main">
|
||
|
|
||
|
<h1 class="page-title">Module: bitmessage/user-agent</h1>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<section>
|
||
|
|
||
|
<header>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</header>
|
||
|
|
||
|
<article>
|
||
|
<div class="container-overview">
|
||
|
|
||
|
|
||
|
<div class="description"><p>Working with Bitmessage user agents.</p></div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dl class="details">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dt class="tag-source">Source:</dt>
|
||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||
|
<a href="user-agent.js.html">user-agent.js</a>, <a href="user-agent.js.html#line1">line 1</a>
|
||
|
</li></ul></dd>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dt class="tag-see">See:</dt>
|
||
|
<dd class="tag-see">
|
||
|
<ul>
|
||
|
<li><a href="https://bitmessage.org/wiki/User_Agent">https://bitmessage.org/wiki/User_Agent</a></li>
|
||
|
</ul>
|
||
|
</dd>
|
||
|
|
||
|
|
||
|
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h3 class="subsection-title">Members</h3>
|
||
|
|
||
|
|
||
|
|
||
|
<h4 class="name" id=".SELF"><span class="type-signature">(static, constant) </span>SELF<span class="type-signature"> :Array.<Object></span></h4>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div class="description">
|
||
|
<p>User agent of the bitmessage library itself.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<h5>Type:</h5>
|
||
|
<ul>
|
||
|
<li>
|
||
|
|
||
|
<span class="param-type">Array.<Object></span>
|
||
|
|
||
|
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dl class="details">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dt class="tag-source">Source:</dt>
|
||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||
|
<a href="user-agent.js.html">user-agent.js</a>, <a href="user-agent.js.html#line18">line 18</a>
|
||
|
</li></ul></dd>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h3 class="subsection-title">Methods</h3>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h4 class="name" id=".decode"><span class="type-signature">(static) </span>decode<span class="signature">()</span><span class="type-signature"></span></h4>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div class="description">
|
||
|
<p>Decode user agent's <code>var_str</code>. Just an alias for
|
||
|
<a href="module-bitmessage_structs.var_str.html#.decode">var_str.decode</a>.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dl class="details">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dt class="tag-source">Source:</dt>
|
||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||
|
<a href="user-agent.js.html">user-agent.js</a>, <a href="user-agent.js.html#line25">line 25</a>
|
||
|
</li></ul></dd>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h4 class="name" id=".encode"><span class="type-signature">(static) </span>encode<span class="signature">(software)</span><span class="type-signature"> → {Buffer}</span></h4>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div class="description">
|
||
|
<p>Encode user agent into <code>var_str</code> Buffer. Most underlying software
|
||
|
comes first.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h5>Parameters:</h5>
|
||
|
|
||
|
|
||
|
<table class="params">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
|
||
|
<th>Name</th>
|
||
|
|
||
|
|
||
|
<th>Type</th>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<th class="last">Description</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
|
||
|
<tbody>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td class="name"><code>software</code></td>
|
||
|
|
||
|
|
||
|
<td class="type">
|
||
|
|
||
|
|
||
|
<span class="param-type">Array.<Object></span>
|
||
|
|
|
||
|
|
||
|
<span class="param-type">Array.<string></span>
|
||
|
|
|
||
|
|
||
|
<span class="param-type">string</span>
|
||
|
|
||
|
|
||
|
|
||
|
</td>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<td class="description last"><p>List of software to
|
||
|
encode or just raw user agent string</p></td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dl class="details">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dt class="tag-source">Source:</dt>
|
||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||
|
<a href="user-agent.js.html">user-agent.js</a>, <a href="user-agent.js.html#line71">line 71</a>
|
||
|
</li></ul></dd>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h5>Returns:</h5>
|
||
|
|
||
|
|
||
|
<div class="param-desc">
|
||
|
<p>Encoded user agent.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<dl>
|
||
|
<dt>
|
||
|
Type
|
||
|
</dt>
|
||
|
<dd>
|
||
|
|
||
|
<span class="param-type">Buffer</span>
|
||
|
|
||
|
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h4 class="name" id=".encodeSelf"><span class="type-signature">(static) </span>encodeSelf<span class="signature">()</span><span class="type-signature"> → {Buffer}</span></h4>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div class="description">
|
||
|
<p>Encode bitmessage's user agent.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dl class="details">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dt class="tag-source">Source:</dt>
|
||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||
|
<a href="user-agent.js.html">user-agent.js</a>, <a href="user-agent.js.html#line96">line 96</a>
|
||
|
</li></ul></dd>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h5>Returns:</h5>
|
||
|
|
||
|
|
||
|
<div class="param-desc">
|
||
|
<p>Encoded user agent.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<dl>
|
||
|
<dt>
|
||
|
Type
|
||
|
</dt>
|
||
|
<dd>
|
||
|
|
||
|
<span class="param-type">Buffer</span>
|
||
|
|
||
|
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h4 class="name" id=".encodeSelfWith"><span class="type-signature">(static) </span>encodeSelfWith<span class="signature">(software)</span><span class="type-signature"> → {Buffer}</span></h4>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div class="description">
|
||
|
<p>Encode user agent with bitmessage's user agent underneath. Most
|
||
|
underlying software comes first.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h5>Parameters:</h5>
|
||
|
|
||
|
|
||
|
<table class="params">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
|
||
|
<th>Name</th>
|
||
|
|
||
|
|
||
|
<th>Type</th>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<th class="last">Description</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
|
||
|
<tbody>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td class="name"><code>software</code></td>
|
||
|
|
||
|
|
||
|
<td class="type">
|
||
|
|
||
|
|
||
|
<span class="param-type">Array.<Object></span>
|
||
|
|
|
||
|
|
||
|
<span class="param-type">Array.<string></span>
|
||
|
|
|
||
|
|
||
|
<span class="param-type">Object</span>
|
||
|
|
|
||
|
|
||
|
<span class="param-type">string</span>
|
||
|
|
||
|
|
||
|
|
||
|
</td>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<td class="description last"><p>List of
|
||
|
software to encode</p></td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dl class="details">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dt class="tag-source">Source:</dt>
|
||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||
|
<a href="user-agent.js.html">user-agent.js</a>, <a href="user-agent.js.html#line107">line 107</a>
|
||
|
</li></ul></dd>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h5>Returns:</h5>
|
||
|
|
||
|
|
||
|
<div class="param-desc">
|
||
|
<p>Encoded user agent.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<dl>
|
||
|
<dt>
|
||
|
Type
|
||
|
</dt>
|
||
|
<dd>
|
||
|
|
||
|
<span class="param-type">Buffer</span>
|
||
|
|
||
|
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h4 class="name" id=".parse"><span class="type-signature">(static) </span>parse<span class="signature">(str)</span><span class="type-signature"> → {Array.<Object>}</span></h4>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div class="description">
|
||
|
<p>Parse raw user agent into software stack list. Most underlying
|
||
|
software comes first.<br>NOTE: Decoding is rather loose, it won't fail on bad user agent
|
||
|
format because it's not that important.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h5>Parameters:</h5>
|
||
|
|
||
|
|
||
|
<table class="params">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
|
||
|
<th>Name</th>
|
||
|
|
||
|
|
||
|
<th>Type</th>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<th class="last">Description</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
|
||
|
<tbody>
|
||
|
|
||
|
|
||
|
<tr>
|
||
|
|
||
|
<td class="name"><code>str</code></td>
|
||
|
|
||
|
|
||
|
<td class="type">
|
||
|
|
||
|
|
||
|
<span class="param-type">string</span>
|
||
|
|
||
|
|
||
|
|
||
|
</td>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<td class="description last"><p>Raw user agent string</p></td>
|
||
|
</tr>
|
||
|
|
||
|
|
||
|
</tbody>
|
||
|
</table>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dl class="details">
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<dt class="tag-source">Source:</dt>
|
||
|
<dd class="tag-source"><ul class="dummy"><li>
|
||
|
<a href="user-agent.js.html">user-agent.js</a>, <a href="user-agent.js.html#line35">line 35</a>
|
||
|
</li></ul></dd>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<h5>Returns:</h5>
|
||
|
|
||
|
|
||
|
<div class="param-desc">
|
||
|
<p>Parsed user agent.</p>
|
||
|
</div>
|
||
|
|
||
|
|
||
|
|
||
|
<dl>
|
||
|
<dt>
|
||
|
Type
|
||
|
</dt>
|
||
|
<dd>
|
||
|
|
||
|
<span class="param-type">Array.<Object></span>
|
||
|
|
||
|
|
||
|
</dd>
|
||
|
</dl>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</article>
|
||
|
|
||
|
</section>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</div>
|
||
|
|
||
|
<nav>
|
||
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-bitmessage.html">bitmessage</a></li><li><a href="module-bitmessage_address.html">bitmessage/address</a></li><li><a href="module-bitmessage_crypto.html">bitmessage/crypto</a></li><li><a href="module-bitmessage_messages.html">bitmessage/messages</a></li><li><a href="module-bitmessage_objects.html">bitmessage/objects</a></li><li><a href="module-bitmessage_pow.html">bitmessage/pow</a></li><li><a href="module-bitmessage_structs.html">bitmessage/structs</a></li><li><a href="module-bitmessage_user-agent.html">bitmessage/user-agent</a></li><li><a href="module-bitmessage_wif.html">bitmessage/wif</a></li></ul><h3>Classes</h3><ul><li><a href="module-bitmessage_address.Address.html">Address</a></li></ul><h3>Namespaces</h3><ul><li><a href="module-bitmessage_messages.addr.html">addr</a></li><li><a href="module-bitmessage_messages.error.html">error</a></li><li><a href="module-bitmessage_messages.getdata.html">getdata</a></li><li><a href="module-bitmessage_messages.inv.html">inv</a></li><li><a href="module-bitmessage_messages.version.html">version</a></li><li><a href="module-bitmessage_objects.broadcast.html">broadcast</a></li><li><a href="module-bitmessage_objects.getpubkey.html">getpubkey</a></li><li><a href="module-bitmessage_objects.msg.html">msg</a></li><li><a href="module-bitmessage_objects.pubkey.html">pubkey</a></li><li><a href="module-bitmessage_structs.encrypted.html">encrypted</a></li><li><a href="module-bitmessage_structs.inv_vect.html">inv_vect</a></li><li><a href="module-bitmessage_structs.message.html">message</a></li><li><a href="module-bitmessage_structs.net_addr.html">net_addr</a></li><li><a href="module-bitmessage_structs.object.html">object</a></li><li><a href="module-bitmessage_structs.PubkeyBitfield.html">PubkeyBitfield</a></li><li><a href="module-bitmessage_structs.ServicesBitfield.html">ServicesBitfield</a></li><li><a href="module-bitmessage_structs.var_int.html">var_int</a></li><li><a href="module-bitmessage_structs.var_int_list.html">var_int_list</a></li><li><a href="module-bitmessage_structs.var_str.html">var_str</a></li></ul>
|
||
|
</nav>
|
||
|
|
||
|
<br class="clear">
|
||
|
|
||
|
<footer>
|
||
|
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-beta1</a> on Sat Jan 31 2015 14:53:22 GMT+0300 (MSK)
|
||
|
</footer>
|
||
|
|
||
|
<script> prettyPrint(); </script>
|
||
|
<script src="scripts/linenumber.js"> </script>
|
||
|
</body>
|
||
|
</html>
|