This PR adds support for the anoma{encode, decode, sign, verify, signDetached, verifyDetached} functions to the Core evaluator.
Encoding / Decoding
The serialization of values to ByteString for anomaEncode reuses the Stored Core serialization.
Anoma expects encoding of bytes as little-endian integers. In general ByteString -> Integer is ambiguous because two ByteStrings that differ only by zero padding will map to the same integer. So we must encode the length of the ByteString in the encoded integer alongside the ByteString data so when it is decoded we can pad appropriately. We use the same length encoding scheme that is used by Nockma jam.
Verify
The Core evaluator implementation of anomaVerify crashes if the verification fails. This matches the behaviour of Anoma node.
jvc Support
You can now use anoma-* functions within .jvc core files.
This PR adds support for the
anoma{encode, decode, sign, verify, signDetached, verifyDetached}
functions to the Core evaluator.Encoding / Decoding
The serialization of values to
ByteString
foranomaEncode
reuses the Stored Core serialization.Anoma expects encoding of bytes as little-endian integers. In general
ByteString -> Integer
is ambiguous because twoByteString
s that differ only by zero padding will map to the same integer. So we must encode the length of the ByteString in the encoded integer alongside the ByteString data so when it is decoded we can pad appropriately. We use the same length encoding scheme that is used by Nockma jam.Verify
The Core evaluator implementation of
anomaVerify
crashes if the verification fails. This matches the behaviour of Anoma node.jvc
SupportYou can now use
anoma-*
functions within.jvc
core files.