Anoma.CairoResource.Transaction (Anoma v0.32.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

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

Functions

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

Gets the Cairo Poseidon commitment tree specification.

Link to this function

commitments(transaction)

@spec commitments(t()) :: [binary()]
Link to this function

compose(tx1, tx2)

@spec compose(t(), t()) :: t()
Link to this function

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.

Link to this function

from_noun(list)

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

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

Link to this function

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).
Link to this function

nullifiers(transaction)

@spec nullifiers(t()) :: [binary()]
Link to this function

prove_delta(tx)

@spec prove_delta(t()) :: t()
Link to this function

verify(transaction)

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