1

Can someone tell me how I can get list of public keys of the transactions, which are currently in the txpool and has not yet been mined? That is, I am interested in how to get this information out of the data returned, for example, by this rpc request:
https://ww.getmonero.org/resources/developer-guides/daemon-rpc.html#get_transaction_pool

1

The transaction public key is contained in the txextra part of the get_transaction_pool response.

The format of txextra is documented here: https://cryptonote.org/cns/cns005.txt

You therefore want to parse txextra and look for subfield 0x01.

Please could you leave a comment and let us know how you made the tx private key deterministic? What are you hashing together to determine your tx private keys?

  • I've got one more question. I found in the code an example of a function that retrieves a public key from a transaction blob. The comments say that because of the previous bug tx may contain more than one public key. Do I understand correctly that this bug has been fixed, and in order to look for the key in new transactions I don’t need to check if there may be several keys? Could you please clarify whether it is guaranteed that two_found will always be true in all new transactions? – Oroffe Apr 26 at 10:18
  • @Parean I don't know much about that bug, perhaps you can post another question about that. One important thing to point out is that when you send funds to multiple subaddresses, there needs to be a tx public key for each recipient. You'll see in the codebase that there is an additional_pubkeys tag for those extra ones. This is due to the way that subaddresses require the tx public key to be differently constructed than for transactions to regular addresses – knaccc Apr 26 at 13:00
  • additional_pubkeys are needed only in cases when I send money to several addresses at once, and one of these addresses is necessarily a subaddress? That is, if I send a transaction to only one subaddress, the public key can be obtained from tx_extra_pub_key field, not additional_pubkeys, right? – Oroffe Apr 26 at 13:43
  • @Parean yes. Also note that when you send to any subaddress (even if it's the only destination), the txpubkey is calculated as r*publicspendkey instead of r*basepointG, because sending to subaddresses works differently than regular addresses. – knaccc Apr 27 at 12:10
  • Yes, I know that. Thank you very much! – Oroffe Apr 27 at 16:16

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.