úÎ2X/k     NoneThe type for consistency proof.The first hash tree size.The second hash tree size.!A list of digest for consistency./The type for inclusion proof (aka audit proof).The index for the target.The hash tree size.A list of digest for inclusion.vThe data type for Merkle Hash Trees. The first parameter is input data type. The second one is digest data type. Getting the log size The size of hash tree. *The position of the target element from 0. qSettings for Merkle Hash Trees. The first parameter is input data type. The second one is digest data type.To create this, use : 9defaultSettings { hash0 = ..., hash1 = ..., hash2 = ... } #A hash value for non input element.CA hash function for one input element to calculate the leaf digest.HA hash function for two input elements to calculate the internal digest.A default Settings with  and K. This can be used for CT(Certificate Transparency) defined in RFC 6962.Getting the Merkle Tree Hash.€Getting the root information of the Merkle Hash Tree. A pair of the current size and the current Merle Tree Hash is returned.Creating an empty .info $ empty defaultSettingsD(0,e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855)?Creating a Merkle Hash Tree from a list of elements. O(n log n)-info $ fromList defaultSettings ["0","1","2"]D(3,725d5230db68f557470dc35f1d8865813acd7ebb07ad152774141decbae71327)'Adding (appending) an element. O(log n)&info $ add "1" $ empty defaultSettingsD(1,2215e8ac4e2b871c2a48189e79738c956c081e23ac2f2415bf77da199dfd920c)\A simple algorithm to create a binary balanced tree. O(n log n) This is just for testing.The default value for  just to create a new value. Generating # for the target at the server side. Verifying  at the client side.let target = "3"Clet mht = fromList defaultSettings ["0","1","2",target,"4","5","6"]let treeSize = 5-let leafDigest = hash1 defaultSettings target?let Just proof = generateInclusionProof leafDigest treeSize mht)let Just rootDigest = digest treeSize mht@verifyInclusionProof defaultSettings leafDigest rootDigest proofTrueThe default value for  just to create a new value. Generating # for the target at the server side. Verifying  at the client side.5let mht0 = fromList defaultSettings ["0","1","2","3"]let (m, digestM) = info mht0+let mht1 = add "6" $ add "5" $ add "4" mht0let (n, digestN) = info mht12let Just proof = generateConsistencyProof m n mht1<verifyConsistencyProof defaultSettings digestM digestN proofTrue7 !"#$%& '( ) *+,-./012The target hash (leaf digest) The tree sizeThe target hash (leaf digest)0Merkle Tree Hash (root digest) for the tree sizeInclusionProof of the target345678% %( &' ) +# !"#$%& '( ) *+,-./012345678None  &     9      !"#$%&'() *+,-./0123456789:;<&hash-tree-0.0.0-LdHmjAx3SXSFLO4lj286U7 Data.HashTreeData.HashTree.InternalConsistencyProof firstTreeSizesecondTreeSize consistencyInclusionProof leafIndextreeSize inclusionMerkleHashTreessizeTreeSizeIndexSettingshash0hash1hash2defaultSettingsdigestinfoemptyfromListadddefaultInclusionProofgenerateInclusionProofverifyInclusionProofdefaultConsistencyProofgenerateConsistencyProofverifyConsistencyProofbytestring-0.10.8.1Data.ByteString.Internal ByteString&cryptonite-0.24-GmkW39KOIfd4lumeEmHvfRCrypto.Hash.SHA256SHA256 toHashTreeHashTreeEmptyLeafNodesettings hashtreesindicessha256 currentHeadvalueidxlidxrleaflinkbuilduppairingwidth isPowerOf2 maxPowerOf2shiftR1 untilNotSetuntilSet