Unable to broadcast transactions
Hi, I am currently getting the following error back when performing a broadcast:
"code" => -32000
"message" => "unknown key:unknown key: "
"data" => array:4 [
"code" => 13
"name" => "N5boost10wrapexceptISt12out_of_rangeEE"
"message" => "unknown key"
"stack" => array:4 [
0 => array:3 [
"context" => array:6 [
"level" => "warn"
"file" => "transaction_util.cpp"
"line" => 107
"method" => "verify_authority"
"hostname" => ""
"timestamp" => "2023-04-28T08:14:34"
]
"format" => "${what}: "
"data" => array:2 [
"sigs" => array:1 [
0 => "STM7cvbEbqmAWjbKyzeVTfMsi5zutoBLwJ9PxCnLGbZQ6qZkLZHgC"
]
"what" => "unknown key"
]
]
I first got it when trying to configure custom_json to work but also get it for the vote example as a means to test if my params are just wrong.
My current code for the vote example is below:
$vote = new stdClass;
$vote->voter = env('HIVE_USERNAME');
$vote->author = 'mahdiyari';
$vote->permlink = 'dhf-proposal-hive-related-development';
$vote->weight = 5000;
$op = array("vote", $vote);
$hive = new Hive();
// transaction built
$trx = $hive->createTransaction([$op]);
$privateKey = $hive->privateKeyFrom(env('HIVE_KEY'));
// transaction signed
$signed = $hive->signTransaction($trx, $privateKey);
$broadcast = $hive->broadcastTransaction($signed);
The return public key is correct and I have tested that I am using the right key via a quick transaction on JsonDoctor. I have also tried the inline method with the same error result.
Any ideas are welcome.
Edited by Kieth