Javascript API for the Tron Protocol via GRPC
npm install --save tronix.js
const { GrpcClient, SolidityGrpcClient } = require('tronix.js');
const client = new GrpcClient({
hostname: '99.99.99.99',
port: 50051,
});
const solidityClient = new SolidityGrpcClient({
hostname: '88.88.88.88',
port: 50051,
});
async function run() {
const blcknumber = await client.getBlockByNumber(1234);
const blck = await client.getNowBlock();
const assets = await solidityClient.getAssetIssueList();
}
run();
You can check a public list of TRON nodes here: Official_Public_Node.md
Find a full example of use below, It will build a full REST API of your node automatically: tronix.js-gateway
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
- Daniel Blanco
- AngelMQ
- Rovak (Original project)
LGPL-3.0