Module
Crypto.Hash.MerkleTree
- Package
- purescript-merkle-tree
- Repository
- alpacaaa/purescript-merkle-tree
#MerkleNode Source
data MerkleNode a
Constructors
MerkleBranch { mLeft :: MerkleNode a, mRight :: MerkleNode a, mRoot :: MerkleRoot a }
MerkleLeaf { mRoot :: MerkleRoot a, mVal :: a }
Instances
#mtRoot Source
mtRoot :: forall a. MerkleTree a -> MerkleRoot a
Returns root of merkle tree.
#mtHash Source
mtHash :: forall a. MerkleTree a -> String
Returns root of merkle tree root hashed.
#mtSize Source
mtSize :: forall a. MerkleTree a -> Int
#emptyHash Source
emptyHash :: forall a. MerkleRoot a
#mkLeafRootHash Source
mkLeafRootHash :: String -> MerkleRoot String
#mkRootHash Source
mkRootHash :: forall a. MerkleRoot a -> MerkleRoot a -> MerkleRoot a
#mkMerkleTree Source
mkMerkleTree :: List String -> MerkleTree String
Smart constructor for 'MerkleTree'.
#ProofElem Source
data ProofElem a
Constructors
ProofElem { nodeRoot :: MerkleRoot a, nodeSide :: Side, siblingRoot :: MerkleRoot a }
#merkleProof Source
merkleProof :: forall a. MerkleTree a -> MerkleRoot a -> MerkleProof a
Construct a merkle tree proof of inclusion
#validateMerkleProof Source
validateMerkleProof :: forall a. MerkleProof a -> MerkleRoot a -> MerkleRoot a -> Boolean
Validate a merkle tree proof of inclusion
- Modules
- Crypto.
Hash. MerkleTree