sealed abstract class BloomFilter extends NetworkElement
Implements a bloom filter that abides by the semantics of BIP37
- See also
- Alphabetic
- By Inheritance
- BloomFilter
- NetworkElement
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def data: ByteVector
The bits that are set inside of the bloom filter
- abstract def filterSize: CompactSizeUInt
How large the bloom filter is, in Bytes
- abstract def flags: BloomFlag
A set of flags that control how outpoints corresponding to a matched pubkey script are added to the filter.
A set of flags that control how outpoints corresponding to a matched pubkey script are added to the filter. See the 'Comparing Transaction Elements to a Bloom Filter' section in this
- See also
- abstract def hashFuncs: UInt32
The number of hash functions used in the bloom filter
- abstract def tweak: UInt32
An arbitrary value to add to the seed value in the hash function used by the bloom filter.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def byteSize: Long
The size of the NetworkElement in bytes.
The size of the NetworkElement in bytes.
- Definition Classes
- NetworkElement
- def bytes: ByteVector
The byte representation of the NetworkElement
The byte representation of the NetworkElement
- Definition Classes
- BloomFilter → NetworkElement
- def bytesLE: ByteVector
The byte representation of the NetworkElement in little endian
The byte representation of the NetworkElement in little endian
- Definition Classes
- NetworkElement
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def contains(hash: Sha256Hash160Digest): Boolean
Checks if
data
contains a Sha256Hash160Digest - def contains(outPoint: TransactionOutPoint): Boolean
Checks if
data
contains a TransactionOutPoint - def contains(hash: DoubleSha256Digest): Boolean
Checks if
data
contains a DoubleSha256Digest - def contains(bytes: ByteVector): Boolean
Checks if the filter contains the given bytes
- def contains(pubkey: ECPublicKey): Boolean
Checks if the filter contains the given public key
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hex: String
The hexadecimal representation of the NetworkElement
The hexadecimal representation of the NetworkElement
- Definition Classes
- NetworkElement
- def hexLE: String
The hexadecimal representation of the NetworkElement in little endian
The hexadecimal representation of the NetworkElement in little endian
- Definition Classes
- NetworkElement
- def insert(pubkey: ECPublicKey): BloomFilter
Inserts a public key and it's corresponding hash into the bloom filter
Inserts a public key and it's corresponding hash into the bloom filter
- Note
The rationale for inserting both the pubkey and its hash is that in most cases where you have an "interesting pubkey" that you want to track on the P2P network what you really need to do is insert the hash of the public key, as that is what appears on the blockchain and that nodes you query with bloom filters will see.
- See also
The BitcoinJ implementation of this function
- def insert(outPoint: TransactionOutPoint): BloomFilter
Inserts a transaction outpoint into the filter
- def insert(hash: HashDigest): BloomFilter
Inserts a hash into the filter
- def insert(bytes: ByteVector): BloomFilter
Inserts a sequence of bytes into the BloomFilter
- def insertByteVectors(bytes: Seq[ByteVector]): BloomFilter
Adds a sequence of byte vectors to our bloom filter then returns that new filter
- def insertHashes(hashes: Seq[HashDigest]): BloomFilter
Inserts a sequence of hashes into the filter
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isRelevant(transaction: Transaction): Boolean
Checks if the transaction's txid, or any of the constants in it's scriptPubKeys/scriptSigs match our BloomFilter
Checks if the transaction's txid, or any of the constants in it's scriptPubKeys/scriptSigs match our BloomFilter
- See also
BIP37 for exact details on what is relevant to a bloom filter and what is not relevant
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def update(transaction: Transaction): BloomFilter
Updates this bloom filter to contain the relevant information for the given Transaction
Updates this bloom filter to contain the relevant information for the given Transaction
- See also
BIP37 for the exact details on what parts of a transaction is added to the bloom filter
- def updateP2PKOnly(scriptPubKeysWithIndex: Seq[(ScriptPubKey, Int)], txId: DoubleSha256Digest): BloomFilter
Updates a bloom filter according to the rules specified by the BloomUpdateP2PKOnly flag
Updates a bloom filter according to the rules specified by the BloomUpdateP2PKOnly flag
- See also
BIP37 for the exact rules on updating a bloom filter with this flag set
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()