Anoma.Node.Examples.EGRPC (Anoma v0.32.0)
I contain examples to test the GRPC endpoint of the node.
Summary
Functions
I add an intent to the client.
I make a request to add an intent, but without an intent.
I add a transaction to the client.
Given an enode, I connect to its GRPC endpoint.
I list the intents over grpc on the client.
I list the intents over grpc on the client and expect a failure by not providing a node id.
I list the intents over grpc on the client, but I provide a wrong node id.
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
add_intent(client \\ connect_to_node())
I add an intent to the client.
add_intent_fail_no_intent(client \\ connect_to_node())
I make a request to add an intent, but without an intent.
I expect an error to occur.
add_transaction(client \\ connect_to_node())
I add a transaction to the client.
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.
list_intents(client \\ connect_to_node())
I list the intents over grpc on the client.
list_intents_fail(client \\ connect_to_node())
I list the intents over grpc on the client and expect a failure by not providing a node id.
list_intents_invalid_node(client \\ connect_to_node())
I list the intents over grpc on the client, but I provide a wrong node id.