Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data BlockFilter
- blockFilter :: BlockFilter -> [Word64]
- data BlockFilterHeader
- blockFilterHeader :: BlockFilterHeader -> BlockFilter -> BlockFilterHeader
- filterHeaderToHex :: BlockFilterHeader -> Text
- filterHeaderFromHex :: Text -> Either String BlockFilterHeader
- genesisHeader :: BlockFilterHeader
- filterContents :: [ByteString] -> Block -> [ByteString]
- encodeFilter :: [ByteString] -> Block -> BlockFilter
- isMember :: BlockHash -> [ByteString] -> BlockFilter -> Bool
Documentation
data BlockFilter Source #
Hashes of scripts in the block
Instances
Eq BlockFilter Source # | |
Defined in Bitcoin.CompactFilter (==) :: BlockFilter -> BlockFilter -> Bool # (/=) :: BlockFilter -> BlockFilter -> Bool # | |
Show BlockFilter Source # | |
Defined in Bitcoin.CompactFilter showsPrec :: Int -> BlockFilter -> ShowS # show :: BlockFilter -> String # showList :: [BlockFilter] -> ShowS # | |
Serialize BlockFilter Source # | |
Defined in Bitcoin.CompactFilter put :: Putter BlockFilter # get :: Get BlockFilter # |
blockFilter :: BlockFilter -> [Word64] Source #
Get the list of hashes in increasing order
data BlockFilterHeader Source #
Instances
Eq BlockFilterHeader Source # | |
Defined in Bitcoin.CompactFilter (==) :: BlockFilterHeader -> BlockFilterHeader -> Bool # (/=) :: BlockFilterHeader -> BlockFilterHeader -> Bool # | |
Ord BlockFilterHeader Source # | |
Defined in Bitcoin.CompactFilter compare :: BlockFilterHeader -> BlockFilterHeader -> Ordering # (<) :: BlockFilterHeader -> BlockFilterHeader -> Bool # (<=) :: BlockFilterHeader -> BlockFilterHeader -> Bool # (>) :: BlockFilterHeader -> BlockFilterHeader -> Bool # (>=) :: BlockFilterHeader -> BlockFilterHeader -> Bool # max :: BlockFilterHeader -> BlockFilterHeader -> BlockFilterHeader # min :: BlockFilterHeader -> BlockFilterHeader -> BlockFilterHeader # | |
Show BlockFilterHeader Source # | |
Defined in Bitcoin.CompactFilter showsPrec :: Int -> BlockFilterHeader -> ShowS # show :: BlockFilterHeader -> String # showList :: [BlockFilterHeader] -> ShowS # | |
Serialize BlockFilterHeader Source # | |
Defined in Bitcoin.CompactFilter |
:: BlockFilterHeader | previous header |
-> BlockFilter | current filter |
-> BlockFilterHeader |
Calculate the header for the block filter
:: [ByteString] | previous output scripts spent in this block |
-> Block | |
-> [ByteString] |
Calculate the list of scripts which belong in the BIP158 block filter
:: [ByteString] | output scripts spent in this block |
-> Block | |
-> BlockFilter |
Construct a BIP158 filter from a block
:: BlockHash | |
-> [ByteString] | Scripts we want to match against the filter |
-> BlockFilter | |
-> Bool |
Test membership. The test succeeds if any of the scripts matches the block filter.