Installation and usage of the platform

gRPC: handling transactions

Use the TransactionPublicService gRPC service to handle transactions.

The TransactionPublicService service has the following methods, described in the transaction_public_service.proto protobuf file:

  • Broadcast;

  • UtxInfo;

  • TransactionInfo;

  • UnconfirmedTransactionInfo.

Important

The field data types for the request and response are specified in the protobuf files.

Sending transactions into the blockchain

Use the Broadcast method to send transactions to the blockchain. The method requires the following parameters:

  • version – transaction version;

  • transaction – the name of a transaction along with the set of parameters intended for it.

For each transaction, there is a separate protobuf file describing the request and response fields. These fields are universal for gRPC and REST API queries and are given in the article Transactions of the blockchain platform.

Retrieving data from a transaction that is in the UTX pool

Use the UnconfirmedTransactionInfo method to retrieve data of the transaction held in the UTX pool. The method response contains transaction data similar to the Broadcast method response.

See also