Anoma.RM.Transparent.Transaction (Anoma v0.32.0)

I am the Transaction module for the TRM.

I provide access to the interfaces needed to interact with the transparent transaction structure.

Public API

I provide the following public functionality

Summary

Functions

I am the action precis function for the transparent transaction.

I am the actions check for the transparent transaction.

I am a function for getting the app data out of a transparent transaction.

I am a function for getting the commitments out of a transparent transaction

I am the compose interface for transparent transaction.

I am the transparent transaction creation interface.

I am the transparent transaction delta.

I am the disjointness verification function for the transparent transaction.

I am a function for getting the nullifiers out of a transparent transaction

I am the root function for the transparent transaction.

I am the transparent transaction verification function.

Types

@type t() :: %Anoma.RM.Transparent.Transaction{
  actions: MapSet.t(Anoma.RM.Transparent.Action.t()),
  delta_proof: <<_::0>>,
  roots: MapSet.t(integer())
}

Functions

Link to this function

action_precis(t)

@spec action_precis(t()) ::
  {:ok, %{created: MapSet.t(integer()), consumed: MapSet.t(integer())}}
  | {:error, String.t()}

I am the action precis function for the transparent transaction.

Given a transaction, I go through the actions contained therein gathering all consumed and created resource hashes. If any action has an intersection, I error.

Link to this function

actions_check(t)

@spec actions_check(t()) :: bool()

I am the actions check for the transparent transaction.

I verify each action in the approprite field using the provided interface.

@spec app_data(t()) :: [{binary(), bool()}]

I am a function for getting the app data out of a transparent transaction.

I go through the list of actions inside the transaction and gather their app data

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

I am a function for getting the commitments out of a transparent transaction

Link to this function

compose(t1, t2)

@spec compose(t(), t()) :: t()

I am the compose interface for transparent transaction.

I take unions of the provided roots and actions.

Link to this function

create(roots, actions)

I am the transparent transaction creation interface.

Given roots and actions, I create an appropriate transaction.

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

I am the transparent transaction delta.

Given a transaction, I simply sum over the contained actions.

Link to this function

disjointness_verification(t)

@spec disjointness_verification(t()) :: bool()

I am the disjointness verification function for the transparent transaction.

I check whether all actions are disjoint in terms of created and consumed resources.

Link to this function

from_noun(list)

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

I am a function for getting the nullifiers out of a transparent transaction

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

I am the root function for the transparent transaction.

I collect the roots for non-ephemeral consumed resources that are kept in the underlying actions.

@spec verify(t()) :: bool()

I am the transparent transaction verification function.

I provide all the specified checks for the transaction to be considered valid.