anoma / juvix

A language for intent-centric and declarative decentralised applications

Home Page:https://docs.juvix.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Anoma serialisation primitives as Juvix builtin axioms

paulcadman opened this issue · comments

The Anoma hoon stdlib now supports serialisation primitives:

  • jam - serialization from a noun to an atom
  • cue - deserialization from an atom to a noun, the inverse of jam.

We need to make these available as Juvix builtins, in the same way as we did for anomaGet.

Proposed builtins:

--- Encode a value
builtin anoma-encode
axiom anomaEncode : {A : Type} -> A -> Nat;

--- Decode a value
builtin anoma-decode
axiom anomaDecode : {A : Type} -> Nat -> A;