Packages

sealed abstract class BloomFilter extends NetworkElement

Implements a bloom filter that abides by the semantics of BIP37

See also

BIP37.

Bitcoin Core bloom.h

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BloomFilter
  2. NetworkElement
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def data: ByteVector

    The bits that are set inside of the bloom filter

  2. abstract def filterSize: CompactSizeUInt

    How large the bloom filter is, in Bytes

  3. 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

    link

  4. abstract def hashFuncs: UInt32

    The number of hash functions used in the bloom filter

  5. 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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def byteSize: Long

    The size of the NetworkElement in bytes.

    The size of the NetworkElement in bytes.

    Definition Classes
    NetworkElement
  6. def bytes: ByteVector

    The byte representation of the NetworkElement

    The byte representation of the NetworkElement

    Definition Classes
    BloomFilterNetworkElement
  7. def bytesLE: ByteVector

    The byte representation of the NetworkElement in little endian

    The byte representation of the NetworkElement in little endian

    Definition Classes
    NetworkElement
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. def contains(hash: Sha256Hash160Digest): Boolean

    Checks if data contains a Sha256Hash160Digest

  10. def contains(outPoint: TransactionOutPoint): Boolean

    Checks if data contains a TransactionOutPoint

  11. def contains(hash: DoubleSha256Digest): Boolean

    Checks if data contains a DoubleSha256Digest

  12. def contains(bytes: ByteVector): Boolean

    Checks if the filter contains the given bytes

  13. def contains(pubkey: ECPublicKey): Boolean

    Checks if the filter contains the given public key

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def hex: String

    The hexadecimal representation of the NetworkElement

    The hexadecimal representation of the NetworkElement

    Definition Classes
    NetworkElement
  20. def hexLE: String

    The hexadecimal representation of the NetworkElement in little endian

    The hexadecimal representation of the NetworkElement in little endian

    Definition Classes
    NetworkElement
  21. 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

  22. def insert(outPoint: TransactionOutPoint): BloomFilter

    Inserts a transaction outpoint into the filter

  23. def insert(hash: HashDigest): BloomFilter

    Inserts a hash into the filter

  24. def insert(bytes: ByteVector): BloomFilter

    Inserts a sequence of bytes into the BloomFilter

  25. def insertByteVectors(bytes: Seq[ByteVector]): BloomFilter

    Adds a sequence of byte vectors to our bloom filter then returns that new filter

  26. def insertHashes(hashes: Seq[HashDigest]): BloomFilter

    Inserts a sequence of hashes into the filter

  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. 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

  29. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  33. def toString(): String
    Definition Classes
    AnyRef → Any
  34. 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

  35. 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

  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from NetworkElement

Inherited from AnyRef

Inherited from Any

Ungrouped