Page: Node client protocol
v.4 by Sergey Chernov
2019-11-21 11:11
2019-11-21 11:11
The protocol between universa client and universa node is HTTP-based and implements own layout of authentication (based on client and node certificates) and session encryption. The protocol implements RPC from client to server.
Each command has a name and set of named, typed arguments. Allowed argument types are
- Integers (
int
,long
) - ZonedDateTime
Java client
use com.icodici.universa.node2.network.Client
class, for example, its constructor
public Client(String rootUrlString, PrivateKey clientPrivateKey,
PublicKey nodePublicKey, BasicHttpClientSession session)
throws IOException;
There are some javadocs in it. With the constructed 'client' instance you can execute any command, like:
client.command("approve", "packedItem", contract.packedTransaction).getOrThrow<ItemResult>("itemResult");
See node commands for what you can do with it.