1

I run into an issue where when submitting an RPC request to the transfer method, the tx_key (that helps prove a tx was made) is not being returned.

I explicitly mention get_tx_key so that the tx_key gets returned. According to the transfer RPC documentation.

Also made sure I set store-tx-info to 1 in the CLI.

Sample request:

array (
  'destinations' => 
  stdClass::__set_state(array(
     'amount' => '0.01314010',
     'address' => '44P8rkTRW5u1i...cEePYi4J5Vr3QLimydCX',
  )),
  'mixin' => 4,
  'get_tx_hex' => true,
  'get_tx_key' => true,
  'payment_id' => 'xxxx...xxxx',
)

What is being returned is:

stdClass::__set_state(array(
   'amount' => 1140160000,
   'fee' => 10785600000,
   'multisig_txset' => '',
   'tx_blob' => '',
   'tx_hash' => 'xxxx...xxxx',
   'tx_key' => '',
   'tx_metadata' => '',
))

As you can see the tx_key property was returned empty. This isn't the desired nor correct behavior. Any ideas?

  • While this does seem to be a bug, you probably want to use the transfer_split RPC instead, which is the one that's commonly used (and more tested). – user36303 May 13 '18 at 16:07
1

Tx keys are stored in the wallet you use to make a transaction.

Tx keys cannot, however, be recovered if you restore a wallet from seed. If you have multiple wallets, only the wallet that you used to make the transaction will have a record of the tx key for that transaction (unless you have manually exported and imported those tx keys to the additional wallet).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.