You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
502 lines
26 KiB
502 lines
26 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>JSDoc: Source: crypto/crypto.js</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">Source: crypto/crypto.js</h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<section>
|
|
<article>
|
|
<pre class="prettyprint source linenums"><code>/*!
|
|
* crypto.js - crypto for bcoin
|
|
* Copyright (c) 2014-2015, Fedor Indutny (MIT License)
|
|
* Copyright (c) 2014-2017, Christopher Jeffrey (MIT License).
|
|
* https://github.com/bcoin-org/bcoin
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
var backend = require('./backend');
|
|
var native = require('../utils/native').binding;
|
|
var scrypt = require('./scrypt');
|
|
|
|
/**
|
|
* @exports crypto/crypto
|
|
* @ignore
|
|
*/
|
|
|
|
var crypto = exports;
|
|
|
|
/**
|
|
* Hash with chosen algorithm.
|
|
* @function
|
|
* @param {String} alg
|
|
* @param {Buffer} data
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.hash = backend.hash;
|
|
|
|
/**
|
|
* Hash with ripemd160.
|
|
* @function
|
|
* @param {Buffer} data
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.ripemd160 = backend.ripemd160;
|
|
|
|
/**
|
|
* Hash with sha1.
|
|
* @function
|
|
* @param {Buffer} data
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.sha1 = backend.sha1;
|
|
|
|
/**
|
|
* Hash with sha256.
|
|
* @function
|
|
* @param {Buffer} data
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.sha256 = backend.sha256;
|
|
|
|
/**
|
|
* Hash with sha256 and ripemd160 (OP_HASH160).
|
|
* @function
|
|
* @param {Buffer} data
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.hash160 = backend.hash160;
|
|
|
|
/**
|
|
* Hash with sha256 twice (OP_HASH256).
|
|
* @function
|
|
* @param {Buffer} data
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.hash256 = backend.hash256;
|
|
|
|
/**
|
|
* Create an HMAC.
|
|
* @function
|
|
* @param {String} alg
|
|
* @param {Buffer} data
|
|
* @param {Buffer} key
|
|
* @returns {Buffer} HMAC
|
|
*/
|
|
|
|
crypto.hmac = backend.hmac;
|
|
|
|
/**
|
|
* Perform key derivation using PBKDF2.
|
|
* @function
|
|
* @param {Buffer} key
|
|
* @param {Buffer} salt
|
|
* @param {Number} iter
|
|
* @param {Number} len
|
|
* @param {String} alg
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.pbkdf2 = backend.pbkdf2;
|
|
|
|
/**
|
|
* Execute pbkdf2 asynchronously.
|
|
* @function
|
|
* @param {Buffer} key
|
|
* @param {Buffer} salt
|
|
* @param {Number} iter
|
|
* @param {Number} len
|
|
* @param {String} alg
|
|
* @returns {Promise}
|
|
*/
|
|
|
|
crypto.pbkdf2Async = backend.pbkdf2Async;
|
|
|
|
/**
|
|
* Perform key derivation using scrypt.
|
|
* @function
|
|
* @param {Buffer} passwd
|
|
* @param {Buffer} salt
|
|
* @param {Number} N
|
|
* @param {Number} r
|
|
* @param {Number} p
|
|
* @param {Number} len
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.scrypt = scrypt.scrypt;
|
|
|
|
/**
|
|
* Execute scrypt asynchronously.
|
|
* @function
|
|
* @param {Buffer} passwd
|
|
* @param {Buffer} salt
|
|
* @param {Number} N
|
|
* @param {Number} r
|
|
* @param {Number} p
|
|
* @param {Number} len
|
|
* @returns {Promise}
|
|
*/
|
|
|
|
crypto.scryptAsync = scrypt.scryptAsync;
|
|
|
|
/**
|
|
* Perform hkdf extraction.
|
|
* @param {Buffer} ikm
|
|
* @param {Buffer} key
|
|
* @param {String} alg
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.hkdfExtract = function hkdfExtract(ikm, key, alg) {
|
|
return crypto.hmac(alg, ikm, key);
|
|
};
|
|
|
|
/**
|
|
* Perform hkdf expansion.
|
|
* @param {Buffer} prk
|
|
* @param {Buffer} info
|
|
* @param {Number} len
|
|
* @param {String} alg
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.hkdfExpand = function hkdfExpand(prk, info, len, alg) {
|
|
var size = crypto.hash(alg, new Buffer(0)).length;
|
|
var blocks = Math.ceil(len / size);
|
|
var i, okm, buf, out;
|
|
|
|
if (blocks > 255)
|
|
throw new Error('Too many blocks.');
|
|
|
|
okm = new Buffer(len);
|
|
|
|
if (blocks === 0)
|
|
return okm;
|
|
|
|
buf = new Buffer(size + info.length + 1);
|
|
|
|
// First round:
|
|
info.copy(buf, size);
|
|
buf[buf.length - 1] = 1;
|
|
out = crypto.hmac(alg, buf.slice(size), prk);
|
|
out.copy(okm, 0);
|
|
|
|
for (i = 1; i < blocks; i++) {
|
|
out.copy(buf, 0);
|
|
buf[buf.length - 1]++;
|
|
out = crypto.hmac(alg, buf, prk);
|
|
out.copy(okm, i * size);
|
|
}
|
|
|
|
return okm;
|
|
};
|
|
|
|
/**
|
|
* Build a merkle tree from leaves.
|
|
* Note that this will mutate the `leaves` array!
|
|
* @param {Buffer[]} leaves
|
|
* @returns {MerkleTree}
|
|
*/
|
|
|
|
crypto.createMerkleTree = function createMerkleTree(leaves) {
|
|
var nodes = leaves;
|
|
var size = leaves.length;
|
|
var malleated = false;
|
|
var i, j, k, hash, left, right, lr;
|
|
|
|
if (size === 0) {
|
|
hash = new Buffer(32);
|
|
hash.fill(0);
|
|
nodes.push(hash);
|
|
return new MerkleTree(nodes, malleated);
|
|
}
|
|
|
|
lr = new Buffer(64);
|
|
|
|
for (j = 0; size > 1; size = ((size + 1) / 2) | 0) {
|
|
for (i = 0; i < size; i += 2) {
|
|
k = Math.min(i + 1, size - 1);
|
|
left = nodes[j + i];
|
|
right = nodes[j + k];
|
|
|
|
if (k === i + 1 && k + 1 === size
|
|
&& left.compare(right) === 0) {
|
|
malleated = true;
|
|
}
|
|
|
|
left.copy(lr, 0);
|
|
right.copy(lr, 32);
|
|
|
|
hash = crypto.hash256(lr);
|
|
|
|
nodes.push(hash);
|
|
}
|
|
j += size;
|
|
}
|
|
|
|
return new MerkleTree(nodes, malleated);
|
|
};
|
|
|
|
if (native)
|
|
crypto.createMerkleTree = native.createMerkleTree;
|
|
|
|
/**
|
|
* Calculate merkle root from leaves.
|
|
* @param {Buffer[]} leaves
|
|
* @returns {MerkleRoot}
|
|
*/
|
|
|
|
crypto.createMerkleRoot = function createMerkleRoot(leaves) {
|
|
var tree = crypto.createMerkleTree(leaves);
|
|
var hash = tree.nodes[tree.nodes.length - 1];
|
|
var malleated = tree.malleated;
|
|
return new MerkleRoot(hash, malleated);
|
|
};
|
|
|
|
/**
|
|
* Collect a merkle branch at vector index.
|
|
* @param {Number} index
|
|
* @param {Buffer[]} leaves
|
|
* @returns {Buffer[]} branch
|
|
*/
|
|
|
|
crypto.createMerkleBranch = function createMerkleBranch(index, leaves) {
|
|
var size = leaves.length;
|
|
var tree = crypto.createMerkleTree(leaves);
|
|
var branch = [];
|
|
var j = 0;
|
|
var i;
|
|
|
|
for (; size > 1; size = (size + 1) / 2 | 0) {
|
|
i = Math.min(index ^ 1, size - 1);
|
|
branch.push(tree.nodes[j + i]);
|
|
index >>>= 1;
|
|
j += size;
|
|
}
|
|
|
|
return branch;
|
|
};
|
|
|
|
/**
|
|
* Check a merkle branch at vector index.
|
|
* @param {Buffer} hash
|
|
* @param {Buffer[]} branch
|
|
* @param {Number} index
|
|
* @returns {Buffer} Hash.
|
|
*/
|
|
|
|
crypto.verifyMerkleBranch = function verifyMerkleBranch(hash, branch, index) {
|
|
var i, otherside, lr;
|
|
|
|
if (branch.length === 0)
|
|
return hash;
|
|
|
|
lr = new Buffer(64);
|
|
|
|
for (i = 0; i < branch.length; i++) {
|
|
otherside = branch[i];
|
|
|
|
if (index & 1) {
|
|
otherside.copy(lr, 0);
|
|
hash.copy(lr, 32);
|
|
} else {
|
|
hash.copy(lr, 0);
|
|
otherside.copy(lr, 32);
|
|
}
|
|
|
|
hash = crypto.hash256(lr);
|
|
index >>>= 1;
|
|
}
|
|
|
|
return hash;
|
|
};
|
|
|
|
if (native)
|
|
crypto.verifyMerkleBranch = native.verifyMerkleBranch;
|
|
|
|
/**
|
|
* Encrypt with aes-256-cbc.
|
|
* @function
|
|
* @param {Buffer} data
|
|
* @param {Buffer} key - 256 bit key.
|
|
* @param {Buffer} iv - 128 bit initialization vector.
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.encipher = backend.encipher;
|
|
|
|
/**
|
|
* Decrypt with aes-256-cbc.
|
|
* @function
|
|
* @param {Buffer} data
|
|
* @param {Buffer} key - 256 bit key.
|
|
* @param {Buffer} iv - 128 bit initialization vector.
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.decipher = backend.decipher;
|
|
|
|
/**
|
|
* memcmp in constant time (can only return true or false).
|
|
* This protects us against timing attacks when
|
|
* comparing an input against a secret string.
|
|
* @see https://cryptocoding.net/index.php/Coding_rules
|
|
* @see `$ man 3 memcmp` (NetBSD's consttime_memequal)
|
|
* @param {Buffer} a
|
|
* @param {Buffer} b
|
|
* @returns {Boolean}
|
|
*/
|
|
|
|
crypto.ccmp = function ccmp(a, b) {
|
|
var i, res;
|
|
|
|
if (!Buffer.isBuffer(a))
|
|
return false;
|
|
|
|
if (!Buffer.isBuffer(b))
|
|
return false;
|
|
|
|
if (b.length === 0)
|
|
return a.length === 0;
|
|
|
|
res = a.length ^ b.length;
|
|
|
|
for (i = 0; i < a.length; i++)
|
|
res |= a[i] ^ b[i % b.length];
|
|
|
|
return res === 0;
|
|
};
|
|
|
|
/**
|
|
* A maybe-secure memzero.
|
|
* @param {Buffer} data
|
|
*/
|
|
|
|
crypto.cleanse = function cleanse(data) {
|
|
var ctr = crypto._counter;
|
|
var i;
|
|
|
|
for (i = 0; i < data.length; i++) {
|
|
data[i] = ctr & 0xff;
|
|
ctr += i;
|
|
}
|
|
|
|
crypto._counter = ctr >>> 0;
|
|
};
|
|
|
|
crypto._counter = 0;
|
|
|
|
if (native)
|
|
crypto.cleanse = native.cleanse;
|
|
|
|
/**
|
|
* Generate some random bytes.
|
|
* @function
|
|
* @param {Number} size
|
|
* @returns {Buffer}
|
|
*/
|
|
|
|
crypto.randomBytes = backend.randomBytes;
|
|
|
|
/**
|
|
* Generate a random uint32.
|
|
* Probably more cryptographically sound than
|
|
* `Math.random()`.
|
|
* @function
|
|
* @returns {Number}
|
|
*/
|
|
|
|
crypto.randomInt = function randomInt() {
|
|
return crypto.randomBytes(4).readUInt32LE(0, true);
|
|
};
|
|
|
|
/**
|
|
* Generate a random number within a range.
|
|
* Probably more cryptographically sound than
|
|
* `Math.random()`.
|
|
* @function
|
|
* @param {Number} min - Inclusive.
|
|
* @param {Number} max - Exclusive.
|
|
* @returns {Number}
|
|
*/
|
|
|
|
crypto.randomRange = function randomRange(min, max) {
|
|
var num = crypto.randomInt();
|
|
return Math.floor((num / 0x100000000) * (max - min) + min);
|
|
};
|
|
|
|
/**
|
|
* Merkle Tree
|
|
* @constructor
|
|
* @ignore
|
|
* @param {Buffer[]} nodes
|
|
* @param {Boolean} malleated
|
|
*/
|
|
|
|
function MerkleTree(nodes, malleated) {
|
|
this.nodes = nodes;
|
|
this.malleated = malleated;
|
|
}
|
|
|
|
/**
|
|
* Merkle Root
|
|
* @constructor
|
|
* @ignore
|
|
* @param {Buffer} hash
|
|
* @param {Boolean} malleated
|
|
*/
|
|
|
|
function MerkleRoot(hash, malleated) {
|
|
this.hash = hash;
|
|
this.malleated = malleated;
|
|
}
|
|
</code></pre>
|
|
</article>
|
|
</section>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<nav>
|
|
<h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-bcoin.html">bcoin</a></li><li><a href="module-bip70.html">bip70</a></li><li><a href="module-bip70_pk.html">bip70/pk</a></li><li><a href="module-bip70_x509.html">bip70/x509</a></li><li><a href="module-blockchain.html">blockchain</a></li><li><a href="module-blockchain_common.html">blockchain/common</a></li><li><a href="module-btc.html">btc</a></li><li><a href="module-coins.html">coins</a></li><li><a href="module-crypto.html">crypto</a></li><li><a href="module-crypto_chachapoly.html">crypto/chachapoly</a></li><li><a href="module-crypto_ec.html">crypto/ec</a></li><li><a href="module-crypto_pk.html">crypto/pk</a></li><li><a href="module-crypto_schnorr.html">crypto/schnorr</a></li><li><a href="module-crypto_siphash.html">crypto/siphash</a></li><li><a href="module-db.html">db</a></li><li><a href="module-hd.html">hd</a></li><li><a href="module-http.html">http</a></li><li><a href="module-mempool.html">mempool</a></li><li><a href="module-mining.html">mining</a></li><li><a href="module-net.html">net</a></li><li><a href="module-net_bip152.html">net/bip152</a></li><li><a href="module-net_common.html">net/common</a></li><li><a href="module-net_dns.html">net/dns</a></li><li><a href="module-net_packets.html">net/packets</a></li><li><a href="module-net_socks.html">net/socks</a></li><li><a href="module-net_tcp.html">net/tcp</a></li><li><a href="module-node.html">node</a></li><li><a href="module-node_config.html">node/config</a></li><li><a href="module-primitives.html">primitives</a></li><li><a href="module-protocol.html">protocol</a></li><li><a href="module-protocol_consensus.html">protocol/consensus</a></li><li><a href="module-protocol_errors.html">protocol/errors</a></li><li><a href="module-protocol_networks.html">protocol/networks</a></li><li><a href="module-protocol_policy.html">protocol/policy</a></li><li><a href="module-script.html">script</a></li><li><a href="module-script_common.html">script/common</a></li><li><a href="module-utils.html">utils</a></li><li><a href="module-utils_asn1.html">utils/asn1</a></li><li><a href="module-utils_base32.html">utils/base32</a></li><li><a href="module-utils_base58.html">utils/base58</a></li><li><a href="module-utils_co.html">utils/co</a></li><li><a href="module-utils_encoding.html">utils/encoding</a></li><li><a href="module-utils_ip.html">utils/ip</a></li><li><a href="module-utils_pem.html">utils/pem</a></li><li><a href="module-utils_protobuf.html">utils/protobuf</a></li><li><a href="module-utils_util.html">utils/util</a></li><li><a href="module-wallet.html">wallet</a></li><li><a href="module-wallet_common.html">wallet/common</a></li><li><a href="module-wallet_records.html">wallet/records</a></li><li><a href="module-workers.html">workers</a></li><li><a href="module-workers_jobs.html">workers/jobs</a></li><li><a href="module-workers_packets.html">workers/packets</a></li></ul><h3>Classes</h3><ul><li><a href="Environment.html">Environment</a></li><li><a href="module-bip70.Payment.html">Payment</a></li><li><a href="module-bip70.PaymentACK.html">PaymentACK</a></li><li><a href="module-bip70.PaymentDetails.html">PaymentDetails</a></li><li><a href="module-bip70.PaymentRequest.html">PaymentRequest</a></li><li><a href="module-blockchain.Chain.html">Chain</a></li><li><a href="module-blockchain.ChainDB.html">ChainDB</a></li><li><a href="module-blockchain.ChainEntry.html">ChainEntry</a></li><li><a href="module-blockchain.ChainFlags.html">ChainFlags</a></li><li><a href="module-blockchain.ChainOptions.html">ChainOptions</a></li><li><a href="module-blockchain.ChainState.html">ChainState</a></li><li><a href="module-blockchain.DeploymentState.html">DeploymentState</a></li><li><a href="module-blockchain.StateCache.html">StateCache</a></li><li><a href="module-btc.Amount.html">Amount</a></li><li><a href="module-btc.URI.html">URI</a></li><li><a href="module-coins.CoinEntry.html">CoinEntry</a></li><li><a href="module-coins.Coins.html">Coins</a></li><li><a href="module-coins.CoinView.html">CoinView</a></li><li><a href="module-coins.UndoCoin.html">UndoCoin</a></li><li><a href="module-coins.UndoCoins.html">UndoCoins</a></li><li><a href="module-crypto_aes.AESCipher.html">AESCipher</a></li><li><a href="module-crypto_aes.AESDecipher.html">AESDecipher</a></li><li><a href="module-crypto_aes.AESKey.html">AESKey</a></li><li><a href="module-crypto_chachapoly.AEAD.html">AEAD</a></li><li><a href="module-crypto_chachapoly.ChaCha20.html">ChaCha20</a></li><li><a href="module-crypto_chachapoly.Poly1305.html">Poly1305</a></li><li><a href="module-crypto_sha256.SHA256.html">SHA256</a></li><li><a href="module-crypto_sha256.SHA256Hmac.html">SHA256Hmac</a></li><li><a href="module-db.LowlevelUp.html">LowlevelUp</a></li><li><a href="module-db.RBT.html">RBT</a></li><li><a href="module-hd.Mnemonic.html">Mnemonic</a></li><li><a href="module-hd.PrivateKey.html">PrivateKey</a></li><li><a href="module-hd.PublicKey.html">PublicKey</a></li><li><a href="module-http.Base.html">Base</a></li><li><a href="module-http.Client.html">Client</a></li><li><a href="module-http.HTTPBaseOptions.html">HTTPBaseOptions</a></li><li><a href="module-http.HTTPOptions.html">HTTPOptions</a></li><li><a href="module-http.Request.html">Request</a></li><li><a href="module-http.RPC.html">RPC</a></li><li><a href="module-http.RPCClient.html">RPCClient</a></li><li><a href="module-http.Server.html">Server</a></li><li><a href="module-http.Wallet.html">Wallet</a></li><li><a href="module-mempool.ConfirmStats.html">ConfirmStats</a></li><li><a href="module-mempool.Mempool.html">Mempool</a></li><li><a href="module-mempool.MempoolEntry.html">MempoolEntry</a></li><li><a href="module-mempool.MempoolOptions.html">MempoolOptions</a></li><li><a href="module-mempool.PolicyEstimator.html">PolicyEstimator</a></li><li><a href="module-mining.BlockEntry.html">BlockEntry</a></li><li><a href="module-mining.Miner.html">Miner</a></li><li><a href="module-mining.MinerBlock.html">MinerBlock</a></li><li><a href="module-mining.MinerOptions.html">MinerOptions</a></li><li><a href="module-net.AuthDB.html">AuthDB</a></li><li><a href="module-net.BIP150.html">BIP150</a></li><li><a href="module-net.BIP151.html">BIP151</a></li><li><a href="module-net.BIP151Stream.html">BIP151Stream</a></li><li><a href="module-net.BroadcastItem.html">BroadcastItem</a></li><li><a href="module-net.Framer.html">Framer</a></li><li><a href="module-net.HostEntry.html">HostEntry</a></li><li><a href="module-net.HostList.html">HostList</a></li><li><a href="module-net.Parser.html">Parser</a></li><li><a href="module-net.Peer.html">Peer</a></li><li><a href="module-net.PeerList.html">PeerList</a></li><li><a href="module-net.PeerOptions.html">PeerOptions</a></li><li><a href="module-net.Pool.html">Pool</a></li><li><a href="module-net.PoolOptions.html">PoolOptions</a></li><li><a href="module-net_bip152-CompactBlock.html">CompactBlock</a></li><li><a href="module-net_bip152-PrefilledTX.html">PrefilledTX</a></li><li><a href="module-net_bip152-TXRequest.html">TXRequest</a></li><li><a href="module-net_bip152-TXResponse.html">TXResponse</a></li><li><a href="module-net_packets-AddrPacket.html">AddrPacket</a></li><li><a href="module-net_packets-AuthChallengePacket.html">AuthChallengePacket</a></li><li><a href="module-net_packets-AuthProposePacket.html">AuthProposePacket</a></li><li><a href="module-net_packets-AuthReplyPacket.html">AuthReplyPacket</a></li><li><a href="module-net_packets-BlockPacket.html">BlockPacket</a></li><li><a href="module-net_packets-BlockTxnPacket.html">BlockTxnPacket</a></li><li><a href="module-net_packets-CmpctBlockPacket.html">CmpctBlockPacket</a></li><li><a href="module-net_packets-EncackPacket.html">EncackPacket</a></li><li><a href="module-net_packets-EncinitPacket.html">EncinitPacket</a></li><li><a href="module-net_packets-FeeFilterPacket.html">FeeFilterPacket</a></li><li><a href="module-net_packets-FilterAddPacket.html">FilterAddPacket</a></li><li><a href="module-net_packets-FilterClearPacket.html">FilterClearPacket</a></li><li><a href="module-net_packets-FilterLoadPacket.html">FilterLoadPacket</a></li><li><a href="module-net_packets-GetAddrPacket.html">GetAddrPacket</a></li><li><a href="module-net_packets-GetBlocksPacket.html">GetBlocksPacket</a></li><li><a href="module-net_packets-GetBlockTxnPacket.html">GetBlockTxnPacket</a></li><li><a href="module-net_packets-GetDataPacket.html">GetDataPacket</a></li><li><a href="module-net_packets-GetHeadersPacket.html">GetHeadersPacket</a></li><li><a href="module-net_packets-HeadersPacket.html">HeadersPacket</a></li><li><a href="module-net_packets-InvPacket.html">InvPacket</a></li><li><a href="module-net_packets-MempoolPacket.html">MempoolPacket</a></li><li><a href="module-net_packets-MerkleBlockPacket.html">MerkleBlockPacket</a></li><li><a href="module-net_packets-NotFoundPacket.html">NotFoundPacket</a></li><li><a href="module-net_packets-Packet.html">Packet</a></li><li><a href="module-net_packets-PingPacket.html">PingPacket</a></li><li><a href="module-net_packets-PongPacket.html">PongPacket</a></li><li><a href="module-net_packets-RejectPacket.html">RejectPacket</a></li><li><a href="module-net_packets-SendCmpctPacket.html">SendCmpctPacket</a></li><li><a href="module-net_packets-SendHeadersPacket.html">SendHeadersPacket</a></li><li><a href="module-net_packets-TXPacket.html">TXPacket</a></li><li><a href="module-net_packets-UnknownPacket.html">UnknownPacket</a></li><li><a href="module-net_packets-VerackPacket.html">VerackPacket</a></li><li><a href="module-net_packets-VersionPacket.html">VersionPacket</a></li><li><a href="module-net_socks-Proxy.html">Proxy</a></li><li><a href="module-net_socks-SOCKS.html">SOCKS</a></li><li><a href="module-node.FullNode.html">FullNode</a></li><li><a href="module-node.Logger.html">Logger</a></li><li><a href="module-node.Node.html">Node</a></li><li><a href="module-node.NodeClient.html">NodeClient</a></li><li><a href="module-node.SPVNode.html">SPVNode</a></li><li><a href="module-primitives.AbstractBlock.html">AbstractBlock</a></li><li><a href="module-primitives.Address.html">Address</a></li><li><a href="module-primitives.Block.html">Block</a></li><li><a href="module-primitives.Coin.html">Coin</a></li><li><a href="module-primitives.CoinSelector.html">CoinSelector</a></li><li><a href="module-primitives.Headers.html">Headers</a></li><li><a href="module-primitives.Input.html">Input</a></li><li><a href="module-primitives.InvItem.html">InvItem</a></li><li><a href="module-primitives.KeyRing.html">KeyRing</a></li><li><a href="module-primitives.MemBlock.html">MemBlock</a></li><li><a href="module-primitives.MerkleBlock.html">MerkleBlock</a></li><li><a href="module-primitives.MTX.html">MTX</a></li><li><a href="module-primitives.NetAddress.html">NetAddress</a></li><li><a href="module-primitives.Outpoint.html">Outpoint</a></li><li><a href="module-primitives.Output.html">Output</a></li><li><a href="module-primitives.TX.html">TX</a></li><li><a href="module-primitives.TXMeta.html">TXMeta</a></li><li><a href="module-protocol.Network.html">Network</a></li><li><a href="module-protocol.TimeData.html">TimeData</a></li><li><a href="module-protocol_errors-VerifyError.html">VerifyError</a></li><li><a href="module-protocol_errors-VerifyResult.html">VerifyResult</a></li><li><a href="module-script.Opcode.html">Opcode</a></li><li><a href="module-script.Program.html">Program</a></li><li><a href="module-script.Script.html">Script</a></li><li><a href="module-script.ScriptError.html">ScriptError</a></li><li><a href="module-script.SigCache.html">SigCache</a></li><li><a href="module-script.Stack.html">Stack</a></li><li><a href="module-script.Witness.html">Witness</a></li><li><a href="module-utils.AsyncEmitter.html">AsyncEmitter</a></li><li><a href="module-utils.AsyncObject.html">AsyncObject</a></li><li><a href="module-utils.Bloom.html">Bloom</a></li><li><a href="module-utils.BufferReader.html">BufferReader</a></li><li><a href="module-utils.BufferWriter.html">BufferWriter</a></li><li><a href="module-utils.List.html">List</a></li><li><a href="module-utils.ListItem.html">ListItem</a></li><li><a href="module-utils.Lock.html">Lock</a></li><li><a href="module-utils.LRU.html">LRU</a></li><li><a href="module-utils.LRUBatch.html">LRUBatch</a></li><li><a href="module-utils.LRUItem.html">LRUItem</a></li><li><a href="module-utils.LRUOp.html">LRUOp</a></li><li><a href="module-utils.Map.html">Map</a></li><li><a href="module-utils.MappedLock.html">MappedLock</a></li><li><a href="module-utils.RollingFilter.html">RollingFilter</a></li><li><a href="module-utils.StaticWriter.html">StaticWriter</a></li><li><a href="module-utils_ip.Address.html">Address</a></li><li><a href="module-utils_protobuf-ProtoReader.html">ProtoReader</a></li><li><a href="module-utils_protobuf-ProtoWriter.html">ProtoWriter</a></li><li><a href="module-wallet.Account.html">Account</a></li><li><a href="module-wallet.Balance.html">Balance</a></li><li><a href="module-wallet.BlockRecord.html">BlockRecord</a></li><li><a href="module-wallet.ChainState.html">ChainState</a></li><li><a href="module-wallet.Credit.html">Credit</a></li><li><a href="module-wallet.Details.html">Details</a></li><li><a href="module-wallet.DetailsMember.html">DetailsMember</a></li><li><a href="module-wallet.MasterKey.html">MasterKey</a></li><li><a href="module-wallet.Path.html">Path</a></li><li><a href="module-wallet.TXDB.html">TXDB</a></li><li><a href="module-wallet.Wallet.html">Wallet</a></li><li><a href="module-wallet.WalletClient.html">WalletClient</a></li><li><a href="module-wallet.WalletDB.html">WalletDB</a></li><li><a href="module-wallet.WalletKey.html">WalletKey</a></li><li><a href="module-wallet.WalletOptions.html">WalletOptions</a></li><li><a href="module-wallet_records-BlockMapRecord.html">BlockMapRecord</a></li><li><a href="module-wallet_records-BlockMeta.html">BlockMeta</a></li><li><a href="module-wallet_records-ChainState.html">ChainState</a></li><li><a href="module-wallet_records-OutpointMapRecord.html">OutpointMapRecord</a></li><li><a href="module-wallet_records-PathMapRecord.html">PathMapRecord</a></li><li><a href="module-wallet_records-TXMapRecord.html">TXMapRecord</a></li><li><a href="module-wallet_records-TXRecord.html">TXRecord</a></li><li><a href="module-workers.Framer.html">Framer</a></li><li><a href="module-workers.Master.html">Master</a></li><li><a href="module-workers.Parser.html">Parser</a></li><li><a href="module-workers.ParserClient.html">ParserClient</a></li><li><a href="module-workers.Worker.html">Worker</a></li><li><a href="module-workers.WorkerPool.html">WorkerPool</a></li><li><a href="module-workers_packets-ECSignPacket.html">ECSignPacket</a></li><li><a href="module-workers_packets-ECSignResultPacket.html">ECSignResultPacket</a></li><li><a href="module-workers_packets-ECVerifyPacket.html">ECVerifyPacket</a></li><li><a href="module-workers_packets-ECVerifyResultPacket.html">ECVerifyResultPacket</a></li><li><a href="module-workers_packets-ErrorPacket.html">ErrorPacket</a></li><li><a href="module-workers_packets-ErrorResultPacket.html">ErrorResultPacket</a></li><li><a href="module-workers_packets-EventPacket.html">EventPacket</a></li><li><a href="module-workers_packets-LogPacket.html">LogPacket</a></li><li><a href="module-workers_packets-MinePacket.html">MinePacket</a></li><li><a href="module-workers_packets-MineResultPacket.html">MineResultPacket</a></li><li><a href="module-workers_packets-Packet.html">Packet</a></li><li><a href="module-workers_packets-ScryptPacket.html">ScryptPacket</a></li><li><a href="module-workers_packets-ScryptResultPacket.html">ScryptResultPacket</a></li><li><a href="module-workers_packets-SignInputPacket.html">SignInputPacket</a></li><li><a href="module-workers_packets-SignInputResultPacket.html">SignInputResultPacket</a></li><li><a href="module-workers_packets-SignPacket.html">SignPacket</a></li><li><a href="module-workers_packets-SignResultPacket.html">SignResultPacket</a></li><li><a href="module-workers_packets-VerifyInputPacket.html">VerifyInputPacket</a></li><li><a href="module-workers_packets-VerifyInputResultPacket.html">VerifyInputResultPacket</a></li><li><a href="module-workers_packets-VerifyPacket.html">VerifyPacket</a></li><li><a href="module-workers_packets-VerifyResultPacket.html">VerifyResultPacket</a></li></ul><h3>Namespaces</h3><ul><li><a href="module-crypto_pk.ecdsa.html">ecdsa</a></li><li><a href="module-crypto_pk.rsa.html">rsa</a></li></ul><h3>Global</h3><ul><li><a href="global.html"></a></li><li><a href="global.html#DoubleMap">DoubleMap</a></li><li><a href="global.html#StatEntry">StatEntry</a></li></ul>
|
|
</nav>
|
|
|
|
<br class="clear">
|
|
|
|
<footer>
|
|
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Fri Feb 10 2017 09:40:23 GMT-0800 (PST)
|
|
</footer>
|
|
|
|
<script> prettyPrint(); </script>
|
|
<script src="scripts/linenumber.js"> </script>
|
|
</body>
|
|
</html>
|
|
|