Anoma.Node.Examples.EGRPC (Anoma v0.29.0)

I contain examples to test the GRPC endpoint of the node.

Summary

Types

t()

I am the state of a GRPC connection to the node.

Functions

I add an intent to the client.

Given an enode, I connect to its GRPC endpoint.

I list the intents over grpc on the client.

Types

@type t() :: %Anoma.Node.Examples.EGRPC{
  channel: any() | nil,
  node: Anoma.Node.Examples.ENode.t() | nil
}

I am the state of a GRPC connection to the node.

Fields

  • :channel - The channel for making grpc requests.
  • :node - The node to which the client is connected.

Functions

Link to this function

add_intent(client \\ connect_to_node())

@spec add_intent(t()) :: boolean()

I add an intent to the client.

Link to this function

connect_to_node(enode \\ nil)

@spec connect_to_node(Anoma.Node.Examples.ENode.t() | nil) :: t()

Given an enode, I connect to its GRPC endpoint.

The examples in this file are used to test against the client GRPC endpoint. The client needs a node to process incoming requests (except prove), so a node is also required to run these examples.

Link to this function

list_intents(client \\ connect_to_node())

@spec list_intents(t()) :: boolean()

I list the intents over grpc on the client.

Link to this function

list_nullifiers(client \\ connect_to_node())

@spec list_nullifiers(t()) :: term()

I list all nullifiers.

Link to this function

list_unrevealed_commits(client \\ connect_to_node())

@spec list_unrevealed_commits(t()) :: term()

I list all unrevealed commits.

Link to this function

list_unspent_resources(client \\ connect_to_node())

@spec list_unspent_resources(t()) :: term()

I list all unspent resources.