Published 15 August 2018

API

API

The API provides communication between the core Credits platform and third-party services based on Apache technology. Thrift is an interface description language that is used to define and create services for different programming languages. It is a framework for remote procedure calls (RPCs) and is used as a scalable cross-language development service. It combines a software pipeline with a code generation engine to develop services that are more or less efficient and easy to use between languages ​​such as C #, C ++, Delphi, Java, Perl, PHP, Python and JavaScript, etc. In other words, Thrift is a binary communication protocol.

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:

Methods

  • 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.
Votes 0, average rating 0

Contents