Anoma.CairoResource.Resource (Anoma v0.29.0)

I am a shielded resource.

Summary

Functions

A commitment to the given resource.

Generate the nullifier key commitment from the nulliffier key.

The nullifier of the given resource.

Randomizes the rseed of a resource.

Set the nonce of a resource, the nonce of output resource comes from the nullifer of input recource in the compliance proof.

Types

@type t() :: %Anoma.CairoResource.Resource{
  data: <<_::256>>,
  eph: bool(),
  label: <<_::256>>,
  logic: <<_::256>>,
  nk_commitment: <<_::256>>,
  nonce: <<_::256>>,
  quantity: <<_::256>>,
  rseed: <<_::256>>
}

Functions

Link to this function

commitment(resource)

@spec commitment(t()) :: binary()

A commitment to the given resource.

Link to this function

from_json_object(mp)

@spec from_json_object(Jason.OrderedObject.t()) :: {:ok, t()} | {:error, term()}
Link to this function

get_nk_commitment(nk)

@spec get_nk_commitment(binary()) :: binary()

Generate the nullifier key commitment from the nulliffier key.

Link to this function

nullifier(resource, nk)

@spec nullifier(t(), binary()) :: binary()

The nullifier of the given resource.

@spec random(t()) :: t()

Randomizes the rseed of a resource.

Link to this function

set_nonce(r, nonce)

@spec set_nonce(t(), binary()) :: t()

Set the nonce of a resource, the nonce of output resource comes from the nullifer of input recource in the compliance proof.

Link to this function

to_bytes(resource)

@spec to_bytes(t()) :: [byte()]
Link to this function

to_json_object(resource)

@spec to_json_object(t()) :: Jason.OrderedObject.t()