Anoma.Node.Intents.IntentPool (Anoma v0.25.0)

I am the intent pool for the Anoma node. m1dnight still has to write these docs.

Summary

Types

t()

I am the state of the intent pool.

Functions

Returns a specification to start this module under a supervisor.

I return the list of current intents.

I add a new intent to the intent pool.

I remove an intent from the intent pool. If the intent does not exist nothing happens.

Types

@type t() :: %Anoma.Node.Intents.IntentPool{
  intents: MapSet.t(Anoma.RM.Intent.t()),
  node_id: String.t() | nil
}

I am the state of the intent pool.

Fields

  • :intents - The intents in the pool.
  • :node_id - The ID of the Node.

Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

intents(node_id)

@spec intents(String.t()) :: MapSet.t()

I return the list of current intents.

Link to this function

new_intent(node_id, intent)

@spec new_intent(String.t(), any()) :: :ok

I add a new intent to the intent pool.

Link to this function

remove_intent(node_id, intent)

@spec remove_intent(String.t(), any()) :: :ok

I remove an intent from the intent pool. If the intent does not exist nothing happens.

Link to this function

start_link(args)

@spec start_link(any()) :: :ignore | {:error, any()} | {:ok, pid()}