This is so that a logic function can access the nullified resources directly from the nullifier field.
Evaluator Note
When decoding a public key, private key or signature from an integer atom to a bytestring it's important to pad the bytestring to the appropriate number of bytes. For example a private key must be 64 bytes but the corresponding encoded integer may fit into 63 bytes or fewer bytes (depending on leading zeros). This PR also fixes this issue by adding a atomToByteStringLen function with also accepts the expected size of the resulting bytestring.
This PR adds support for the Anoma stdlib
sign-detached
API.This corresponds to the sign_detached libsodium API.
This is requried to support to new Anoma nullifier format:
https://github.com/anoma/anoma/commit/d6a61451ae8fd0f046c083f5ca4a4f38e7ecffb1
Previously resource nullifiers were defined using
anomaSign
:They are now defined using
anomaSignDetached
:This is so that a logic function can access the nullified resources directly from the
nullifier
field.Evaluator Note
When decoding a public key, private key or signature from an integer atom to a bytestring it's important to pad the bytestring to the appropriate number of bytes. For example a private key must be 64 bytes but the corresponding encoded integer may fit into 63 bytes or fewer bytes (depending on leading zeros). This PR also fixes this issue by adding a
atomToByteStringLen
function with also accepts the expected size of the resulting bytestring.