feat: new pointToHash as per EIP-6800
This commit is contained in:
parent
b5812e6ab5
commit
837427902f
|
@ -84,4 +84,9 @@ func serializePoint*(point: Point): Bytes32 =
|
|||
assert result.serialize(point) == CttCodecEccStatus.cttCodecEcc_Success
|
||||
|
||||
func zeroField*(): Field =
|
||||
result.setZero()
|
||||
result.setZero()
|
||||
|
||||
func hashPointToBytes*(point: Point): Bytes32 =
|
||||
var hashedPoint: Field
|
||||
hashedPoint.mapToScalarField(point)
|
||||
assert result.marshal(hashedPoint, littleEndian)
|
Loading…
Reference in New Issue