Skip to content
Juvix imports

module node_architecture.types.basics;

import prelude open public;

Juvix Prelude of the Anoma Node Architecture

This document describes the basic types and functions used in the node architecture prelude. For a more general prelude, please refer to Juvix Base Prelude. (1)

  1. 🙋‍♀️ If you are unfamiliar with Juvix, please refer to the Juvix documentation.

Basic types

Hash

Natural numbers are used (for now) to represent hash values, bytes sizes, and other non-negative integers.

syntax alias Hash := Nat;

RelTime

Relative time. In seconds from now.

syntax alias RelTime := Nat;

AbsTime

Absolute time. In minutes since epoch (2024-01-01 00:00).

syntax alias AbsTime := Nat;

Time

Either absolute or relative time.

Time : Type := Either RelTime AbsTime;

Version

Semantic version number (major.minor.patch).

type Version : Type :=
mkVersion {
major : Nat;
minor : Nat;
patch : Nat
};