nim-dagger/dagger/merkledag.nim

11 lines
187 B
Nim

import pkg/libp2p/multihash
export multihash
type
MerkleDag* = object
data*: seq[byte]
proc rootHash*(dag: MerkleDag): MultiHash =
MultiHash.digest("sha2-256", dag.data).get()