anoma / juvix

A language for intent-centric and declarative decentralised applications
https://docs.juvix.org
GNU General Public License v3.0
442 stars 54 forks source link

Support Anoma stdlib API `verifyDetached` #2785

Closed paulcadman closed 1 month ago

paulcadman commented 1 month ago

This PR adds support foranomaVerifyDetached stdlib API via a Juvix builtin.

It has signature:

builtin anoma-verify-detached
axiom anomaVerifyDetached : {A : Type}
   --- signature
  -> Nat 
   --- message
  -> A
   --- public key
  -> Nat
 -> Bool;

The ed25519 library is used in the evaluator becuase Anoma uses ed25519 signatures (https://hexdocs.pm/enacl/enacl.html).