tron-api
tron-api copied to clipboard
signTransaction method has bug with the second param "message"
As the example of transactionbuilder shows, I set the second param "message" to something. Finally, sendRawTransaction returning sigerror with
validate signature error xxxxxx is signed by xxxxxx but it is not contained of permission.
https://github.com/iexbase/tron-api/blob/fafeab39c4a7344aee8e8d222ce8f796c74d1df4/src/Tron.php#L711
here is the partial of my code:
$transaction = $tron->getTransactionBuilder()->sendTrx($dest_address, 300.0);
$signedtxs = $tron->signTransaction($transaction, $msg);
//die(print_r($signedtxs));
try {
$response = $tron->sendRawTransaction($signedtxs);
}catch (\IEXBase\TronAPI\Exception\TronException $e) {
exit($e->getMessage());
}
if (isset($response['code']) && $response['code'] === 'SIGERROR') {
exit(hex2bin($response['message']));
}
die(print_r($response));
It worked online, I need to fix it for offline signature mode
It worked online, I need to fix it for offline signature mode
can this lib support trc20-usdt transaction?
It worked online, I need to fix it for offline signature mode
can this lib support trc20-usdt transaction?
hi i have made up an article about how to send with trc20 token with use of this library, kindly refer to here https://www.btcschools.net/tron/tron_create_trc20_tx.php
Atlas Chiew btcschools.net
I got same error, when public key generated from private has 63 bytes length
Has anyone else encountered this problem and know how to solve it?
I got same error, when public key generated from private has 63 bytes length
My private has 64 bytes length, so ...
Need to request for update the transaction,and got a new $transaction['txID']
if (!is_null($message)) {
$transaction['raw_data']['data'] = $this->stringUtf8toHex($message);
//更新数据
$response = $this->manager->request(
'wallet/getsignweight',
$transaction
);
$transaction = $response['transaction']['transaction'];
}