Anoma.CairoResource.Transaction (Anoma v0.34.0)

I am a shielded resource machine transaction.

Summary

Functions

Gets the Cairo Poseidon commitment tree specification.

The arguments are JSON strings of compliance units, input logics, input witnesses, output logics, and output witnesses.

Callback implementation for Noun.Nounable.Kind.from_noun/1.

Retrieves the cipher texts from the given transaction.

Types

t()

@type t() :: %Anoma.CairoResource.Transaction{
  actions: MapSet.t(Anoma.CairoResource.Action.t()),
  delta_proof: binary(),
  roots: MapSet.t(binary())
}

Functions

cm_tree()

@spec cm_tree() :: CommitmentTree.t()

Gets the Cairo Poseidon commitment tree specification.

commitments(transaction)

@spec commitments(t()) :: [binary()]

compose(tx1, tx2)

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

create_from_compliance_units(compliance_units, input_logics, input_witnesses, output_logics, output_witnesses)

@spec create_from_compliance_units(
  [Jason.OrderedObject.t()],
  [binary()],
  [Jason.OrderedObject.t()],
  [binary()],
  [Jason.OrderedObject.t()]
) :: {:ok, t()} | {:error, term()}

The arguments are JSON strings of compliance units, input logics, input witnesses, output logics, and output witnesses.

from_noun(list)

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

Callback implementation for Noun.Nounable.Kind.from_noun/1.

get_cipher_texts(tx)

@spec get_cipher_texts(t()) :: [%{tag: binary(), cipher: [binary()]}]

Retrieves the cipher texts from the given transaction.

Returns

  • A list of tuples where each tuple contains a binary tag(commitment) and a cipher text(a list of binary).

nullifiers(transaction)

@spec nullifiers(t()) :: [binary()]

prove_delta(tx)

@spec prove_delta(t()) :: t()

verify(transaction)

@spec verify(t()) :: true | {:error, String.t()}