mirror of
https://github.com/fluencelabs/js-peer-id
synced 2025-04-25 00:32:31 +00:00
290 lines
6.1 KiB
HTML
290 lines
6.1 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset='utf-8'>
|
|
<title>peer-id 0.14.2 | Documentation</title>
|
|
<meta name='description' content='IPFS Peer Id implementation in Node.js'>
|
|
<meta name='viewport' content='width=device-width,initial-scale=1'>
|
|
<link href='assets/bass.css' rel='stylesheet'>
|
|
<link href='assets/style.css' rel='stylesheet'>
|
|
<link href='assets/github.css' rel='stylesheet'>
|
|
<link href='assets/split.css' rel='stylesheet'>
|
|
</head>
|
|
<body class='documentation m0'>
|
|
<div class='flex'>
|
|
<div id='split-left' class='overflow-auto fs0 height-viewport-100'>
|
|
<div class='py1 px2'>
|
|
<h3 class='mb0 no-anchor'>peer-id</h3>
|
|
<div class='mb1'><code>0.14.2</code></div>
|
|
<input
|
|
placeholder='Filter'
|
|
id='filter-input'
|
|
class='col12 block input'
|
|
spellcheck='false'
|
|
autocapitalize='off'
|
|
autocorrect='off'
|
|
type='text' />
|
|
<div id='toc'>
|
|
<ul class='list-reset h5 py1-ul'>
|
|
|
|
|
|
<li><a
|
|
href='#equals'
|
|
class="">
|
|
equals
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
<li><a
|
|
href='#isequal'
|
|
class="">
|
|
isEqual
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
|
|
<li><a
|
|
href='#hasinlinepublickey'
|
|
class="">
|
|
hasInlinePublicKey
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
<div class='mt1 h6 quiet'>
|
|
<a href='https://documentation.js.org/reading-documentation.html'>Need help reading this?</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id='split-right' class='relative overflow-auto height-viewport-100'>
|
|
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='equals'>
|
|
equals
|
|
</h3>
|
|
|
|
|
|
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-peer-id/blob/10ead07dd976d83df2c377724009e7d3296a50f3/src/index.js#L150-L158'>
|
|
<span>src/index.js</span>
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
<p>Checks the equality of <code>this</code> peer against a given PeerId.</p>
|
|
|
|
<div class='pre p1 fill-light mt0'>equals(id: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array">Uint8Array</a> | PeerId)): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
<div class='prose'>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>id</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array">Uint8Array</a> | PeerId))</code>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code>:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='isequal'>
|
|
isEqual
|
|
</h3>
|
|
|
|
|
|
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-peer-id/blob/10ead07dd976d83df2c377724009e7d3296a50f3/src/index.js#L166-L168'>
|
|
<span>src/index.js</span>
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
<p>Checks the equality of <code>this</code> peer against a given PeerId.</p>
|
|
|
|
<div class='pre p1 fill-light mt0'>isEqual(id: (<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array">Uint8Array</a> | PeerId)): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div>
|
|
|
|
|
|
|
|
<div>Deprecated: Use
|
|
<code>.equals</code>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Parameters</div>
|
|
<div class='prose'>
|
|
|
|
<div class='space-bottom0'>
|
|
<div>
|
|
<span class='code bold'>id</span> <code class='quiet'>((<a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array">Uint8Array</a> | PeerId))</code>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code>:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
<section class='p2 mb2 clearfix bg-white minishadow'>
|
|
|
|
|
|
<div class='clearfix'>
|
|
|
|
<h3 class='fl m0' id='hasinlinepublickey'>
|
|
hasInlinePublicKey
|
|
</h3>
|
|
|
|
|
|
<a class='fr fill-darken0 round round pad1x quiet h5' href='https://github.com/libp2p/js-peer-id/blob/10ead07dd976d83df2c377724009e7d3296a50f3/src/index.js#L186-L197'>
|
|
<span>src/index.js</span>
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
<p>Check if the PeerId has an inline public key.</p>
|
|
|
|
<div class='pre p1 fill-light mt0'>hasInlinePublicKey(): <a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class='py1 quiet mt1 prose-big'>Returns</div>
|
|
<code><a href="https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean">boolean</a></code>:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</section>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<script src='assets/anchor.js'></script>
|
|
<script src='assets/split.js'></script>
|
|
<script src='assets/site.js'></script>
|
|
</body>
|
|
</html>
|