Bloom
Constructors
new Bloom()
new Bloom(
bitvector
?):Bloom
Represents a Bloom filter.
Parameters
• bitvector?: Uint8Array
Returns
Source
packages/utils/src/Bloom.ts:16
Properties
bitvector
bitvector:
Uint8Array
Source
packages/utils/src/Bloom.ts:11
Methods
add()
add(
e
):void
Adds an element to a bit vector of a 64 byte bloom filter.
Parameters
• e: Uint8Array
The element to add
Returns
void
Source
packages/utils/src/Bloom.ts:29
check()
check(
e
):boolean
Checks if an element is in the bloom.
Parameters
• e: Uint8Array
The element to check
Returns
boolean
Source
packages/utils/src/Bloom.ts:46
multiCheck()
multiCheck(
topics
):boolean
Checks if multiple topics are in a bloom.
Parameters
• topics: Uint8Array
[]
Returns
boolean
true
if every topic is in the bloom
Source
packages/utils/src/Bloom.ts:68
or()
or(
bloom
):void
Bitwise or blooms together.
Parameters
• bloom: Bloom
Returns
void
Source
packages/utils/src/Bloom.ts:75