Thrift includes a ready-made software pipeline, consisting of six levels, for working with the client and server part. The upper level is the generated Thrift description code. Services generate client and server code from it. Unlike the built-in types, the created data structure is returned as a result in the generated code. The protocol and transport levels are part of the runtime library. In Thrift, it is possible to select services and change the protocol and transport without recompiling the code. In addition to the client side, Thrift includes a server infrastructure for protocol and transport communication in blocking, non-blocking and multi-threaded servers. The basis of the I / O level is differently implemented for different languages.
The API includes the following methods to implement the connection of third-party services to the core of the platform. They are divided into 2 types of get-request and result-responses:
- BalanceGetResult, BalanceGet - the balance of a particular wallet.
- TransactionGetResult, TransactionGet - hash of one particular transaction.
- TransactionsGetResult, TransactionsGet - the list of transactions for a specific purse.
- TransactionFlowResult, TransactionFlow - transaction.
- PoolListGetResult, PoolListGet - a pool of transactions.
- PoolInfoGetResult, PoolInfoGet - block information (block number, block creation date, number of transactions in the block).
- PoolTransactionsGetResult, PoolTransactionsGet - the transactions contained in the block.
- StatsGetResult, StatsGet - statistics for the last 10 blocks, statistics for the time periods. Monitor.
- NodesInfoGetResult, NodesInfoGet - information on the currently active nodes (Node) (IP address, client type). Signaling server.
- SmartContractGetResult, SmartContractGet - extracting smart contracts from the database and checking the results of the execution.