mirror of
https://github.com/logos-storage/nim-poseidon2.git
synced 2026-01-02 13:43:08 +00:00
Do not expose isBottomLayer parameter on API
This commit is contained in:
parent
4bd56bb839
commit
a311828b9e
@ -10,7 +10,7 @@ const KeyBottomLayer = F.fromHex("0x1")
|
||||
const KeyOdd = F.fromHex("0x2")
|
||||
const KeyOddAndBottomLayer = F.fromhex("0x3")
|
||||
|
||||
func merkleRoot*(xs: openArray[F], isBottomLayer: static bool = true) : F =
|
||||
func merkleRoot(xs: openArray[F], isBottomLayer: static bool) : F =
|
||||
let a = low(xs)
|
||||
let b = high(xs)
|
||||
let m = b-a+1
|
||||
@ -38,5 +38,8 @@ func merkleRoot*(xs: openArray[F], isBottomLayer: static bool = true) : F =
|
||||
|
||||
return merkleRoot(ys, isBottomLayer = false)
|
||||
|
||||
func merkleRoot*(xs: openArray[F]) : F =
|
||||
merkleRoot(xs, isBottomLayer = true)
|
||||
|
||||
func merkleRoot*(bytes: openArray[byte]): F =
|
||||
merkleRoot(toSeq bytes.elements(F))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user