<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "utf-8" >
< title > JSDoc: Class: Bloom< / 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" > Class: Bloom< / h1 >
< section >
< header >
< h2 >
< span class = "ancestors" > < a href = "module-utils.html" > utils< / a > .< / span > Bloom< / h2 >
< / header >
< article >
< div class = "container-overview" >
< h4 class = "name" id = "Bloom" > < span class = "type-signature" > < / span > new Bloom< span class = "signature" > (size, n, tweak, update)< / span > < span class = "type-signature" > < / span > < / h4 >
< div class = "description" >
< p > Bloom Filter< / 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 > size< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Filter size in bits.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > n< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Number of hash functions.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > tweak< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Seed value.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > update< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
|
< span class = "param-type" > String< / span >
< / td >
< td class = "description last" > < p > Update type.< / p > < / td >
< / tr >
< / tbody >
< / table >
< h5 class = "subsection-title" > Properties:< / h5 >
< table class = "props" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > filter< / code > < / td >
< td class = "type" >
< span class = "param-type" > Buffer< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< tr >
< td class = "name" > < code > size< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< tr >
< td class = "name" > < code > n< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< tr >
< td class = "name" > < code > tweak< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< tr >
< td class = "name" > < code > update< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Update flag (see Bloom.flags).< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line41" > line 41< / a >
< / li > < / ul > < / dd >
< / dl >
< / div >
< h3 class = "subsection-title" > Members< / h3 >
< h4 class = "name" id = ".flags" > < span class = "type-signature" > (static) < / span > flags< span class = "type-signature" > :Number< / span > < / h4 >
< div class = "description" >
< p > Bloom filter update flags.< / p >
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > Number< / span >
< / li >
< / ul >
< h5 class = "subsection-title" > Properties:< / h5 >
< table class = "props" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > NONE< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Never update the filter with outpoints.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > ALL< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Always update the filter with outpoints.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > PUBKEY_ONLY< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Only update the filter with outpoints if it is
" asymmetric" in terms of addresses (pubkey/multisig).< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-default" > Default Value:< / dt >
< dd class = "tag-default" > < ul class = "dummy" >
< li class = "object-value" > < pre class = "prettyprint" > < code > {"NONE":0,"ALL":1,"PUBKEY_ONLY":2}< / code > < / pre > < / li >
< / ul > < / dd >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line77" > line 77< / a >
< / li > < / ul > < / dd >
< / dl >
< h4 class = "name" id = ".flagsByVal" > < span class = "type-signature" > (static, constant) < / span > flagsByVal< span class = "type-signature" > :< a href = "global.html#RevMap" > RevMap< / a > < / span > < / h4 >
< div class = "description" >
< p > Bloom filter update flags by value.< / p >
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > < a href = "global.html#RevMap" > RevMap< / a > < / span >
< / li >
< / ul >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line103" > line 103< / a >
< / li > < / ul > < / dd >
< / dl >
< h4 class = "name" id = ".MAX_BLOOM_FILTER_SIZE" > < span class = "type-signature" > (static, constant) < / span > MAX_BLOOM_FILTER_SIZE< span class = "type-signature" > :Number< / span > < / h4 >
< div class = "description" >
< p > Max bloom filter size.< / p >
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > Number< / span >
< / li >
< / ul >
< dl class = "details" >
< dt class = "tag-default" > Default Value:< / dt >
< dd class = "tag-default" > < ul class = "dummy" >
< li > 36000< / li >
< / ul > < / dd >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line61" > line 61< / a >
< / li > < / ul > < / dd >
< / dl >
< h4 class = "name" id = ".MAX_HASH_FUNCS" > < span class = "type-signature" > (static, constant) < / span > MAX_HASH_FUNCS< span class = "type-signature" > :Number< / span > < / h4 >
< div class = "description" >
< p > Max number of hash functions.< / p >
< / div >
< h5 > Type:< / h5 >
< ul >
< li >
< span class = "param-type" > Number< / span >
< / li >
< / ul >
< dl class = "details" >
< dt class = "tag-default" > Default Value:< / dt >
< dd class = "tag-default" > < ul class = "dummy" >
< li > 50< / li >
< / ul > < / dd >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line69" > line 69< / a >
< / li > < / ul > < / dd >
< / dl >
< h3 class = "subsection-title" > Methods< / h3 >
< h4 class = "name" id = ".fromOptions" > < span class = "type-signature" > (static) < / span > fromOptions< span class = "signature" > (size, n, tweak, update)< / span > < span class = "type-signature" > → {Bloom}< / span > < / h4 >
< div class = "description" >
< p > Instantiate bloom filter from options.< / 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 > size< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Filter size in bits.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > n< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Number of hash functions.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > tweak< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Seed value.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > update< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
|
< span class = "param-type" > String< / span >
< / td >
< td class = "description last" > < p > Update type.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line167" > line 167< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Bloom< / span >
< / dd >
< / dl >
< h4 class = "name" id = ".fromRate" > < span class = "type-signature" > (static) < / span > fromRate< span class = "signature" > (items, rate, update)< / span > < span class = "type-signature" > → {Boolean}< / span > < / h4 >
< div class = "description" >
< p > Create a filter from a false positive rate.< / 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 > items< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Expected number of items.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > rate< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > False positive rate (0.0-1.0).< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > update< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
|
< span class = "param-type" > String< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line265" > line 265< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Boolean< / span >
< / dd >
< / dl >
< h5 > Example< / h5 >
< pre class = "prettyprint" > < code > Bloom.fromRate(800000, 0.0001, 'none');< / code > < / pre >
< h4 class = "name" id = ".fromRaw" > < span class = "type-signature" > (static) < / span > fromRaw< span class = "signature" > (data, enc< span class = "signature-attributes" > nullable< / span > )< / span > < span class = "type-signature" > → {Bloom}< / span > < / h4 >
< div class = "description" >
< p > Instantiate bloom filter from serialized data.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Attributes< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > data< / code > < / td >
< td class = "type" >
< span class = "param-type" > Buffer< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < / td >
< / tr >
< tr >
< td class = "name" > < code > enc< / code > < / td >
< td class = "type" >
< span class = "param-type" > String< / span >
< / td >
< td class = "attributes" >
< nullable>< br >
< / td >
< td class = "description last" > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line381" > line 381< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Bloom< / span >
< / dd >
< / dl >
< h4 class = "name" id = ".fromReader" > < span class = "type-signature" > (static) < / span > fromReader< span class = "signature" > (br)< / span > < span class = "type-signature" > → {Bloom}< / span > < / h4 >
< div class = "description" >
< p > Instantiate bloom filter from buffer reader.< / 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 > br< / code > < / td >
< td class = "type" >
< span class = "param-type" > BufferReader< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line370" > line 370< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Bloom< / span >
< / dd >
< / dl >
< h4 class = "name" id = "add" > < span class = "type-signature" > < / span > add< span class = "signature" > (val, enc< span class = "signature-attributes" > nullable< / span > )< / span > < span class = "type-signature" > < / span > < / h4 >
< div class = "description" >
< p > Add data to the filter.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Attributes< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > val< / code > < / td >
< td class = "type" >
< span class = "param-type" > Buffer< / span >
|
< span class = "param-type" > String< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < / td >
< / tr >
< tr >
< td class = "name" > < code > enc< / code > < / td >
< td class = "type" >
< span class = "param-type" > String< / span >
< / td >
< td class = "attributes" >
< nullable>< br >
< / td >
< td class = "description last" > < p > Can be any of the Buffer object's encodings.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line196" > line 196< / a >
< / li > < / ul > < / dd >
< / dl >
< h4 class = "name" id = "added" > < span class = "type-signature" > < / span > added< span class = "signature" > (val, enc< span class = "signature-attributes" > nullable< / span > )< / span > < span class = "type-signature" > → {Boolean}< / span > < / h4 >
< div class = "description" >
< p > Test whether data is present in the
filter and potentially add data.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Attributes< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > val< / code > < / td >
< td class = "type" >
< span class = "param-type" > Buffer< / span >
|
< span class = "param-type" > String< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < / td >
< / tr >
< tr >
< td class = "name" > < code > enc< / code > < / td >
< td class = "type" >
< span class = "param-type" > String< / span >
< / td >
< td class = "attributes" >
< nullable>< br >
< / td >
< td class = "description last" > < p > Can be any of the Buffer object's encodings.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line238" > line 238< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< div class = "param-desc" >
< p > Whether data was added.< / p >
< / div >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Boolean< / span >
< / dd >
< / dl >
< h4 class = "name" id = "fromOptions" > < span class = "type-signature" > (private) < / span > fromOptions< span class = "signature" > (size, n, tweak, update)< / span > < span class = "type-signature" > → {Bloom}< / span > < / h4 >
< div class = "description" >
< p > Inject properties from options.< / 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 > size< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Filter size in bits.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > n< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Number of hash functions.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > tweak< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < p > Seed value.< / p > < / td >
< / tr >
< tr >
< td class = "name" > < code > update< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
|
< span class = "param-type" > String< / span >
< / td >
< td class = "description last" > < p > Update type.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line119" > line 119< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Bloom< / span >
< / dd >
< / dl >
< h4 class = "name" id = "fromRaw" > < span class = "type-signature" > (private) < / span > fromRaw< span class = "signature" > (data)< / span > < span class = "type-signature" > < / span > < / h4 >
< div class = "description" >
< p > Inject properties from serialized data.< / 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 > data< / code > < / td >
< td class = "type" >
< span class = "param-type" > Buffer< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line360" > line 360< / a >
< / li > < / ul > < / dd >
< / dl >
< h4 class = "name" id = "fromReader" > < span class = "type-signature" > (private) < / span > fromReader< span class = "signature" > (br)< / span > < span class = "type-signature" > < / span > < / h4 >
< div class = "description" >
< p > Inject properties from buffer reader.< / 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 > br< / code > < / td >
< td class = "type" >
< span class = "param-type" > BufferReader< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line345" > line 345< / a >
< / li > < / ul > < / dd >
< / dl >
< h4 class = "name" id = "getSize" > < span class = "type-signature" > < / span > getSize< span class = "signature" > ()< / span > < span class = "type-signature" > → {Number}< / span > < / h4 >
< div class = "description" >
< p > Get serialization size.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line312" > line 312< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Number< / span >
< / dd >
< / dl >
< h4 class = "name" id = "hash" > < span class = "type-signature" > < / span > hash< span class = "signature" > (val, n)< / span > < span class = "type-signature" > → {Number}< / span > < / h4 >
< div class = "description" >
< p > Perform the mumur3 hash on data.< / 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 > val< / code > < / td >
< td class = "type" >
< span class = "param-type" > Buffer< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< tr >
< td class = "name" > < code > n< / code > < / td >
< td class = "type" >
< span class = "param-type" > Number< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line178" > line 178< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Number< / span >
< / dd >
< / dl >
< h4 class = "name" id = "isWithinConstraints" > < span class = "type-signature" > < / span > isWithinConstraints< span class = "signature" > ()< / span > < span class = "type-signature" > → {Boolean}< / span > < / h4 >
< div class = "description" >
< p > Ensure the filter is within the size limits.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line297" > line 297< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Boolean< / span >
< / dd >
< / dl >
< h4 class = "name" id = "reset" > < span class = "type-signature" > < / span > reset< span class = "signature" > ()< / span > < span class = "type-signature" > < / span > < / h4 >
< div class = "description" >
< p > Reset the filter.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line186" > line 186< / a >
< / li > < / ul > < / dd >
< / dl >
< h4 class = "name" id = "test" > < span class = "type-signature" > < / span > test< span class = "signature" > (val, enc< span class = "signature-attributes" > nullable< / span > )< / span > < span class = "type-signature" > → {Boolean}< / span > < / h4 >
< div class = "description" >
< p > Test whether data is present in the filter.< / p >
< / div >
< h5 > Parameters:< / h5 >
< table class = "params" >
< thead >
< tr >
< th > Name< / th >
< th > Type< / th >
< th > Attributes< / th >
< th class = "last" > Description< / th >
< / tr >
< / thead >
< tbody >
< tr >
< td class = "name" > < code > val< / code > < / td >
< td class = "type" >
< span class = "param-type" > Buffer< / span >
|
< span class = "param-type" > String< / span >
< / td >
< td class = "attributes" >
< / td >
< td class = "description last" > < / td >
< / tr >
< tr >
< td class = "name" > < code > enc< / code > < / td >
< td class = "type" >
< span class = "param-type" > String< / span >
< / td >
< td class = "attributes" >
< nullable>< br >
< / td >
< td class = "description last" > < p > Can be any of the Buffer object's encodings.< / p > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line215" > line 215< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Boolean< / span >
< / dd >
< / dl >
< h4 class = "name" id = "toRaw" > < span class = "type-signature" > < / span > toRaw< span class = "signature" > ()< / span > < span class = "type-signature" > → {Buffer}< / span > < / h4 >
< div class = "description" >
< p > Serialize bloom filter.< / p >
< / div >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line334" > line 334< / a >
< / li > < / ul > < / dd >
< / dl >
< h5 > Returns:< / h5 >
< dl >
< dt >
Type
< / dt >
< dd >
< span class = "param-type" > Buffer< / span >
< / dd >
< / dl >
< h4 class = "name" id = "toWriter" > < span class = "type-signature" > < / span > toWriter< span class = "signature" > (bw)< / span > < span class = "type-signature" > < / span > < / h4 >
< div class = "description" >
< p > Write filter to buffer writer.< / 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 > bw< / code > < / td >
< td class = "type" >
< span class = "param-type" > BufferWriter< / span >
< / td >
< td class = "description last" > < / td >
< / tr >
< / tbody >
< / table >
< dl class = "details" >
< dt class = "tag-source" > Source:< / dt >
< dd class = "tag-source" > < ul class = "dummy" > < li >
< a href = "utils_bloom.js.html" > utils/bloom.js< / a > , < a href = "utils_bloom.js.html#line321" > line 321< / a >
< / li > < / ul > < / dd >
< / dl >
< / 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.UndoCoi
< / 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:27 GMT-0800 (PST)
< / footer >
< script > prettyPrint ( ) ; < / script >
< script src = "scripts/linenumber.js" > < / script >
< / body >
< / html >