Anoma.Client.Examples.EClient (Anoma v0.25.0)

I contain functions to test the public interface of the client.

I start a new client and if necessary a node, and then connect to that node.

I test the public GRPC interface of the client to ensure it works as expected.

Summary

Types

t()

I am the state of a TCP listener.

Functions

I add an intent to the client.

I create an instance of the client and connect it to the given node.

I create an example stub to a given clients GRPC endpoint.

I create a new node in the system, and ensure that that is the only node that is running by killing all other nodes.

I kill the existing client.

I list the intents over grpc on the client.

I list all nullifiers.

I list all unrevealed commits.

I list all unspent resources.

I prove something using the client.

I prove something using the client.

I run a jammed nock program using the client.

I run a plaintext nock program using the client.

I create the setup necessary to run each example below without arguments.

Types

@type t() :: %Anoma.Client.Examples.EClient{
  channel: any() | nil,
  client: Anoma.Client.t() | nil,
  node: Anoma.Node.Examples.ENode.t() | nil,
  supervisor: pid() | nil
}

I am the state of a TCP listener.

My fields contain information to listen for TCP connection with a remote node.

Fields

  • :channel - The channel for making grpc requests.
  • :supervisor - the pid of the supervision tree.
  • :node - The node to which the client is connected.
  • :client - The client that is connected to the node.
  • :channel - The channel for making grpc requests.

Functions

Link to this function

add_intent(conn \\ setup())

I add an intent to the client.

Link to this function

create_example_client(enode \\ create_single_example_node())

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

I create an instance of the client and connect it to the given node.

If there is already a client started, I kill it and start a new one.

Link to this function

create_example_connection(eclient \\ create_example_client())

I create an example stub to a given clients GRPC endpoint.

Link to this function

create_single_example_node()

@spec create_single_example_node() :: Anoma.Node.Examples.ENode.t()

I create a new node in the system, and ensure that that is the only node that is running by killing all other nodes.

Link to this function

kill_existing_client()

@spec kill_existing_client() :: :ok

I kill the existing client.

Link to this function

list_intents(conn \\ setup())

I list the intents over grpc on the client.

Link to this function

list_nullifiers(conn \\ setup())

I list all nullifiers.

Link to this function

list_unrevealed_commits(conn \\ setup())

I list all unrevealed commits.

Link to this function

list_unspent_resources(conn \\ setup())

I list all unspent resources.

Link to this function

prove_something_jammed(conn \\ setup())

I prove something using the client.

Link to this function

prove_something_plain_text(conn \\ setup())

I prove something using the client.

Link to this function

run_something_jammed(conn \\ setup())

I run a jammed nock program using the client.

Link to this function

run_something_plain_text(conn \\ setup())

I run a plaintext nock program using the client.

I create the setup necessary to run each example below without arguments.