Coder Social home page Coder Social logo

tronix.js's Introduction

tronix.js

Javascript API for the Tron Protocol via GRPC

Installation

npm install --save tronix.js

Usage

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

Full/Solidity Node REST Gateway

Find a full example of use below, It will build a full REST API of your node automatically: tronix.js-gateway

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Credits

License

LGPL-3.0

tronix.js's People

Contributors

deblanco avatar rovak avatar angelquirogam avatar zergweak avatar

Watchers

 avatar James Cloos avatar

tronix.js's Issues

Tron coin Create and send transaction issue

.I was even trying to work with tronix.js but not able createTransaction and send transaction.Getting this...
The deserializeTransaction is : 147,246,,,184,59,183,243,185,12,202,84,,,,1537516374000,,,1,type.googleapis.com/protocol.TransferContract,10,21,65,157,171,82,157,66,169,49,246,215,142,180,5,69,122,0,182,91,217,49,11,18,21,65,186,138,235,140,169,49,133,133,183,210,87,106,117,203,8,214,38,37,212,117,24,160,141,6,170,73,82,110,241,56,195,78,119,204,241,30,228,5,103,221,15,18,88,172,73,226,157,17,32,198,209,155,44,186,122,134,92,16,58,175,176,75,95,39,16,49,213,19,223,145,205,89,93,89,215,140,38,187,154,127,81,116,155,5,195,128,38,4,1,,,
this is transaction id[object Object]
My function is this ..
async function run() {
// Create and broadcast transaction
const transaction = await client.createTransaction(
'1e29bcdc573ec404b25ea5ec9f66b2f6f39c596f350dca5dfadb9f43099f578d',
'TUiAwy29KbwqbmjccHSyWHa5fUFiW8o5Xn',
'TZG7vRbLKMLV9cpKh4McsYtrWVdZ8kQAp2',
1,
);
console.log("this is transaction id isssssssssssssss :" +transaction); // result
}

run();

What wrong i am doing not getting .

This looks totally different from other coins...

transaction hash

Hello everybody. I have a question. When I make a transaction through your application, it does not return the hash of this transaction. The answer is just empty. Here is an example of an answer. http://joxi.ru/nAyG8vPCYby6Vm
I use client.createTransaction (secret, from, to, amount) .then (function (res) {...}); Although transactions are normal. How do I get a hash of a new transaction? Thanks for the answer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.