There are update messages from both sides. UPDATE is a reserved command value for updates.
A special command is PING and PONG. The payload for request and reply is empty. These are sent every 30 seconds.
command:1 = PING
command:1 = PONG
After 2 minutes with no reply, the endpoint is considered offline. A PING or PONG command is a keep alive and resets the clock.
Request reply messages take this form:
command:1 request_id payload
command:1 response_id payload
NOTE: we may later add a checksum.
This is the initial discovery service. Clients are preconfigured with a root public key. Adam gives us a signed message establishing service keys.
params... service 1 IP/Domain service 1 public key ... signature of entire message
The titan service performs this simple process:
- Get message
- Save to disk
- Increment index
- Publish index + message
These are the commands Titan accepts:
- get_batch START_INDEX
Also when Titan publishes updates, it will push out notifications:
The format for each slab is:
index:4 (increments 0, 1, 2, 3, ...) command:1 payload_data
The command is an enum consisting of:
TRANSACTION SIGNATURE CASHOUT
The format for TRANSACTION is:
ephemeral key encrypted data
The format for SIGNATURE is:
service ID:1 signature
The format for CASHOUT is:
service ID:1 BTC address:20 amount service_signature
Bank services interact with clients through Titan. They listen for TRANSACTION commands and publish SIGNATURE or CASHOUT.