{"_id":"bloom-filter","_rev":"10-2643d3fc89b3cc2ac7aba70bf719c2ab","name":"bloom-filter","description":"A bloom filter suitable for use in Bitcoin Connection Bloom Filtering as part of [BIP37](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki).","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"bloom-filter","main":"lib/index.js","version":"0.1.0","scripts":{"test":"gulp test","coverage":"gulp coverage"},"devDependencies":{"chai":"=1.10.0","gulp":"=3.8.10","gulp-coveralls":"=0.1.3","gulp-mocha":"^2.0.0","gulp-shell":"=0.2.11","istanbul":"^0.3.5","mocha":"^2.1.0","run-sequence":"=1.0.2"},"gitHead":"88265e7b3c6ae33e37a9734973f145457420895c","description":"bloom-filter ========","_id":"bloom-filter@0.1.0","_shasum":"3dfd4ceef8a42066ed6bb73d555c56a7f5f3dec4","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"braydonf","email":"braydon@bitpay.com"},"maintainers":[{"name":"braydonf","email":"braydon@bitpay.com"}],"dist":{"shasum":"3dfd4ceef8a42066ed6bb73d555c56a7f5f3dec4","tarball":"https://registry.npmjs.org/bloom-filter/-/bloom-filter-0.1.0.tgz","integrity":"sha512-2ISoa8LEd0C5GrhVSb5snbFC1qCGtNH239ZtmDFLkrR+ywwmwmU+a8vQBDjVxsf+k6hV5JtJRUwp7hstodIfsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHpawTw+1c0iuO+HzHcz7MWYidwfiEGNnD/4y2lD5No8AiEArufk65GinsQ+F5p7JfYheQf04O3Y+UdJGS2BgRElZz8="}]},"directories":{}},"0.1.1":{"name":"bloom-filter","main":"lib/index.js","version":"0.1.1","scripts":{"test":"gulp test","coverage":"gulp coverage"},"repository":{"type":"git","url":"http://github.com/bitpay/bloom-filter.git"},"devDependencies":{"chai":"=1.10.0","gulp":"=3.8.10","gulp-coveralls":"=0.1.3","gulp-mocha":"^2.0.0","gulp-shell":"=0.2.11","istanbul":"^0.3.5","mocha":"^2.1.0","run-sequence":"=1.0.2"},"gitHead":"29c50378d4cdff5d4128a04cb0f40f17263f46a3","description":"A bloom filter suitable for use in Bitcoin Connection Bloom Filtering as part of [BIP37](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki).","bugs":{"url":"https://github.com/bitpay/bloom-filter/issues"},"homepage":"https://github.com/bitpay/bloom-filter","_id":"bloom-filter@0.1.1","_shasum":"ebd084e5ee757b47b950c65f56d0a3c99f061336","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"braydonf","email":"braydon@bitpay.com"},"maintainers":[{"name":"braydonf","email":"braydon@bitpay.com"}],"dist":{"shasum":"ebd084e5ee757b47b950c65f56d0a3c99f061336","tarball":"https://registry.npmjs.org/bloom-filter/-/bloom-filter-0.1.1.tgz","integrity":"sha512-u1Y/NcMgYuYmLSRLaCYf4sqQ7vhhY1gfm1N5aK9r4Djr+S1SlTglIlWeQlCbPZG5vGgJGLHZcaC9J0Hnq5GG5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIETGhHyxk0gYOBgO1fpBvdYEZFOfak5ztEPP20hW7I5jAiAyuZKJ1mT4ObIYG63OfuI6qaSP3LmENRVc9TUrxklwqg=="}]},"directories":{}},"0.2.0":{"name":"bloom-filter","main":"lib/index.js","version":"0.2.0","scripts":{"test":"gulp test","coverage":"gulp coverage"},"repository":{"type":"git","url":"http://github.com/bitpay/bloom-filter.git"},"devDependencies":{"chai":"=1.10.0","gulp":"=3.8.10","gulp-coveralls":"=0.1.3","gulp-mocha":"^2.0.0","gulp-shell":"=0.2.11","istanbul":"^0.3.5","mocha":"^2.1.0","run-sequence":"=1.0.2"},"gitHead":"60c266757039d76f7df9b661d91b93a860363bbd","description":"A bloom filter suitable for use in Bitcoin Connection Bloom Filtering as part of [BIP37](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki).","bugs":{"url":"https://github.com/bitpay/bloom-filter/issues"},"homepage":"https://github.com/bitpay/bloom-filter","_id":"bloom-filter@0.2.0","_shasum":"84d63bbf9172d8303e64c1ff16eb9dbf33a981a3","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"braydonf","email":"braydon@bitpay.com"},"maintainers":[{"name":"braydonf","email":"braydon@bitpay.com"}],"dist":{"shasum":"84d63bbf9172d8303e64c1ff16eb9dbf33a981a3","tarball":"https://registry.npmjs.org/bloom-filter/-/bloom-filter-0.2.0.tgz","integrity":"sha512-RMG2RpnKczVzRsEYSPaT5rKsyj0w5/wpQRjaW4vOMe1WyUDQpoqxjNc10uROEjdhu63ytRt6aFRPXFePi/Rd7A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDbh65+BZ6w0O34+nhmryOL2Hfw5PnRiCfntfCio6XvWAiEA1C503DW2T3eOuZG+wVWPS55E5hAC3iF23Z1o66976sw="}]},"directories":{}}},"readme":"# bloom-filter\n\nA bloom filter suitable for use in Bitcoin Connection Bloom Filtering as part of [BIP37](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki).\n\n## Get Started\n\n```bash\nnpm install bloom-filter\n```\n\n```javascript\n\nvar BloomFilter = require('bloom-filter');\n\n// convenient method to initialize the filter\nvar numberOfElements = 3;\nvar falsePositiveRate = 0.01;\nvar filter = BloomFilter.create(numberofElements, falsePositiveRate);\n\n// elements\nvar a = new Buffer('99108ad8ed9bb6274d3980bab5a85c048f0950c8', 'hex');\nvar b = new Buffer('19108ad8ed9bb6274d3980bab5a85c048f0950c8', 'hex');\nvar c = new Buffer('b5a2c786d9ef4658287ced5914b37a1b4aa32eee', 'hex');\n\n// insert elements\nfilter.insert(a);\nfilter.insert(b);\n\n// check if elements match\nassert(!filter.contains(c));\nassert(filter.contains(a));\n\n// reinstantiate from an object\nvar serialized = filter.toObject();\nvar filter = new BloomFilter(serialized);\n\n// initialize directly\nvar filter = new BloomFilter({\n  vData: [], // the data of the filter\n  nHashFucs: 3, // the number of hash functions to use\n  nTweak: 2147483649, // the seed used for the hash fuctions\n  nFlags: 0 // flags used to update the filter when matched\n});\n\n\n```\n## License\n\nCode released under [the MIT license](https://github.com/bitpay/bloom-filter/blob/master/LICENSE).\n\nCopyright 2015 BitPay, Inc.","maintainers":[{"email":"gabegattis@gmail.com","name":"gabegattis"}],"time":{"modified":"2022-06-13T04:50:12.943Z","created":"2015-01-19T18:41:06.201Z","0.1.0":"2015-01-19T18:41:06.201Z","0.1.1":"2015-01-19T18:56:30.954Z","0.2.0":"2015-03-16T21:38:11.960Z"},"readmeFilename":"README.md","homepage":"https://github.com/bitpay/bloom-filter","repository":{"type":"git","url":"http://github.com/bitpay/bloom-filter.git"},"bugs":{"url":"https://github.com/bitpay/bloom-filter/issues"}}