Transformers main network API

in #crypto6 months ago

This document is an RPC interface document for transformers chain. The document is applicable to transformers version v0.22.2. The document introduces some commonly used information acquisition interfaces, transaction interfaces and callback interfaces.

Enable RPC interface (important)
Before starting the program, first open the configuration file config.json, refer to the following configuration

Screenshot 2023-12-10 at 8.18.45 PM.png

If you need to enable rpc power supply, please modify the config.json file and set rpc to true

Screenshot 2023-12-10 at 8.19.06 PM.png

Query class interface
The following interfaces are the default APIs of the mainnet node and can be called directly.
1.get_height(Get height)

Screenshot 2023-12-10 at 8.19.25 PM.png

2.get_balance(Get address balance)

Screenshot 2023-12-10 at 8.19.46 PM.png

3.get_tx_info(Get transaction information interface)

4.get_block interface
This interface is an RPC interface, and the request parameters are as follows:
1.parameter top(start from what height) num(The number of traversal heights starting from top)
2.Call example
http://IP:port/get_block?top=10&num=20
return as follows:

Screenshot 2023-12-10 at 8.20.04 PM.png

5.info interface(return data in non-json format)

Screenshot 2023-12-10 at 8.22.35 PM.png

Coin Marketplace

STEEM 0.20
TRX 0.12
JST 0.028
BTC 63707.69
ETH 3433.34
USDT 1.00
SBD 2.53