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
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
add_intent(conn \\ setup())
@spec add_intent(Anoma.Client.Examples.EClient.EConnection.t()) :: Anoma.Client.Examples.EClient.EConnection.t()
I add an intent to the client.
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.
create_example_connection(eclient \\ create_example_client())
I create an example stub to a given clients GRPC endpoint.
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.
kill_existing_client()
@spec kill_existing_client() :: :ok
I kill the existing client.
list_intents(conn \\ setup())
@spec list_intents(Anoma.Client.Examples.EClient.EConnection.t()) :: Anoma.Client.Examples.EClient.EConnection.t()
I list the intents over grpc on the client.
list_nullifiers(conn \\ setup())
@spec list_nullifiers(Anoma.Client.Examples.EClient.EConnection.t()) :: Anoma.Client.Examples.EClient.EConnection.t()
I list all nullifiers.
list_unrevealed_commits(conn \\ setup())
@spec list_unrevealed_commits(Anoma.Client.Examples.EClient.EConnection.t()) :: Anoma.Client.Examples.EClient.EConnection.t()
I list all unrevealed commits.
list_unspent_resources(conn \\ setup())
@spec list_unspent_resources(Anoma.Client.Examples.EClient.EConnection.t()) :: Anoma.Client.Examples.EClient.EConnection.t()
I list all unspent resources.
prove_something_jammed(conn \\ setup())
I prove something using the client.
prove_something_plain_text(conn \\ setup())
I prove something using the client.
run_something_jammed(conn \\ setup())
I run a jammed nock program using the client.
run_something_plain_text(conn \\ setup())
I run a plaintext nock program using the client.
setup()
I create the setup necessary to run each example below without arguments.