GithubHelp home page GithubHelp logo

Api not working about tron-api HOT 7 CLOSED

iexbase avatar iexbase commented on July 17, 2024
Api not working

from tron-api.

Comments (7)

serderovsh avatar serderovsh commented on July 17, 2024

Check the default node: http://13.125.210.234:8090

$fullNode = new HttpProvider('http://13.125.210.234:8090');

from tron-api.

serderovsh avatar serderovsh commented on July 17, 2024

The last release was 7 days ago.
Update the package to v1.3.2

> composer.phar update iexbase/tron-api

from tron-api.

shweta037 avatar shweta037 commented on July 17, 2024

Thanks for your reply @serderovsh do you have working example for node js as well for tron coin.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...

from tron-api.

serderovsh avatar serderovsh commented on July 17, 2024
$fullNode = new HttpProvider('http://13.125.210.234:8090');

$tron = new \IEXBase\TronAPI\Tron($fullNode);
$tron->setAddress('authTronAddress');
$tron->setPrivateKey('privateKey');

try {
    $transfer = $tron->sendTransaction('authTronAddress', 'ToAddress', 1);
} catch (\IEXBase\TronAPI\Exceptions\TronException $e) {
    die($e->getMessage());
}

var_dump($transfer); // success result

Tested 2 minutes ago

from tron-api.

shweta037 avatar shweta037 commented on July 17, 2024

getting this error...
Notice: Undefined index: signature in /opt/lampp/htdocs/tron/tron-api/vendor/iexbase/tron-api/src/Tron.php on line 479

from tron-api.

serderovsh avatar serderovsh commented on July 17, 2024

It seems to me that you are specifying a private key incorrectly

$tron->generateAddress();

Generate a new address, and try through it.

from tron-api.

shweta037 avatar shweta037 commented on July 17, 2024

How could i identify if the private key of mine is correct or not as using that private key i could get my public address as well..TUiAwy29KbwqbmjccHSyWHa5fUFiW8o5Xn this is my public key..

from tron-api.

Related Issues (20)

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.