logo

Flowee the Hub API Reference


Overview

All communication between the Hub and other Flowee components happens over a network-enabled API. This Application Programmer Interface (API) is designed specifically for the Hub and you should understand several basic concepts that it is based on in order to get the most out of them.

Using APIs works by connecting to an endpoint of your peer. Connections happen over TCP/IP bi-directional sockets and the server doesn’t normally disconnect. Which is to say, the API is not RESTful. This is a bit different, but definitely worth it.

API requests are encapsulated in individual messages. One message for a request, and typically one message for a reply.

A message is comprised of a list of tagged-fields. Each tagged-field is a triplet of name, format and value. (specification).

Each message will have a message-id as well as a service-id. Those two make up the structure of the API. You can imagine a list of methods to call is mapped to a list of message-ids. A unique service allows for a list of methods, much like methods on a class.

Example message.

Services

Each and every message has a service-id which maps to a unique service provided by the server. Clients send a request message and receive an answer with the same service-id.

For more details, look at the independent services.

Control Service
0) A service that handles requests like ‘stop’ to shut down the hub.
Login Service
1) A service that runs in the Hub and takes a login-token in order to allow a remote connection to ask other services a question.
UtilService
2) Generic utilities provided by the hub. For instance ‘CreateAddress’
MiningService
3) Miners would use this service.
RawTransactionService
4) Retrieve or send raw transaction data.
BlockChainService
5) Query the blockchain-database.
AddressMonitorService
40) Remove can subscribe to bitcoin-address usage notifications