Anoma.RM.Transparent.ComplianceUnit (Anoma v0.34.0)

I am the Compliance Unit module for the TRM.

I provide the interface to interact with the compliance units in the resource machine.

Public API

Summary

Functions

I am the consumed function for the compliance unit in TRM.

I am the creation API for the compliance unit of the TRM.

I am the created function for a compliance unit in TRM.

I am the delta function for a compliance unit in the TRM.

I am the function to get roots for a TRM compliance unit.

I am the compliance unit verification function.

Types

t()

@type t() :: %Anoma.RM.Transparent.ComplianceUnit{
  instance: Anoma.RM.Transparent.ProvingSystem.CPS.Instance.t(),
  proof: <<_::0>>,
  vk: binary()
}

Functions

consumed(t)

@spec consumed(t()) :: MapSet.t(integer())

I am the consumed function for the compliance unit in TRM.

I access the consumed field in a given instance of the unit and collect the result in a set.

create(key, instance, proof)

I am the creation API for the compliance unit of the TRM.

Given a key, instance, and proof for the unit, I put them as appropriate arguments to the unit.

created(t)

@spec created(t()) :: MapSet.t(integer())

I am the created function for a compliance unit in TRM.

I access the created field in a given instance of the unit and collect the result in a set.

delta(t)

@spec delta(t()) :: integer()

I am the delta function for a compliance unit in the TRM.

I simply access the unit delta field in the compliance unit.

from_noun(list)

@spec from_noun(Noun.t()) :: {:ok, t()} | :error

roots(t)

@spec roots(t()) :: MapSet.t(integer())

I am the function to get roots for a TRM compliance unit.

I go thtough the consumed field and get the provided roots for non-ephemeral consumed resources.

verify(t)

@spec verify(t()) :: boolean()

I am the compliance unit verification function.

I simply call the compliance proving system verification function.