v.1 by Sergey Chernov
2018-05-20 19:05

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.