Module

Crypto.Hash.MerkleTree

Package
purescript-merkle-tree
Repository
alpacaaa/purescript-merkle-tree

#MerkleRoot Source

newtype MerkleRoot a

Constructors

Instances

#MerkleTree Source

#MerkleNode Source

data MerkleNode a

Constructors

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

#mtHeight Source

mtHeight :: Int -> Int

Merkle tree height

#mkRootHash Source

mkRootHash :: forall a. MerkleRoot a -> MerkleRoot a -> MerkleRoot a

#mkMerkleTree Source

mkMerkleTree :: List String -> MerkleTree String

Smart constructor for 'MerkleTree'.

#ProofList Source

type ProofList a = List (ProofElem a)

#MerkleProof Source

newtype MerkleProof a

Constructors

#ProofElem Source

data ProofElem a

Constructors

#Side Source

data Side

Constructors

#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

#testMerkleProofN Source