Timeline for Which two strings I need to get from tx_json, if I want to determine whether output is mine or not?
Current License: CC BY-SA 4.0
17 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 8, 2019 at 22:25 | comment | added | jtgrassie | Size is a varint - the example is just a quick demo (I didn't bother adding varint decoding). | |
Apr 8, 2019 at 15:34 | comment | added | redacted |
@jtgrassie the example seems to break for monerohash.com/explorer/… can it be that the size is actually varint , but the example assumes the size is 1 byte?
|
|
Mar 25, 2019 at 0:24 | comment | added | jtgrassie | As per my working example, only tags 0x00 and 0x01 omit the length specifier (this is because they don't need it). All other tags are (tag)(length)(value). | |
Mar 24, 2019 at 18:38 | comment | added | ivanahepjuk | Thank you all for comments. I checked proposed links and also cryptonote_basic/tx_extra.h, please help me a bit, I am close to understanding:) So, in tx_extra field there could be two kind of fields: (tag)(value) or (tag)(length)(value). Which tags have value and which doesn't? I think I must parse all fields, even though I need only tx_pub_key. Otherwise any 0x01 could be read as a tag. | |
Mar 24, 2019 at 17:23 | vote | accept | ivanahepjuk | ||
Mar 21, 2019 at 16:16 | comment | added | jtgrassie | Here's an example getting the tx pub key R out of the extra field. This is using the extra from this tx. | |
Mar 21, 2019 at 14:02 | comment | added | knaccc | @ivanahepjuk the txhash, also known as the txid is a keccak hash that is used to uniquely identify the transaction. it is not the same as the tx public key R, which is an EC point and not a hash. A transaction can have one or more Rs too, if the TX_EXTRA_TAG_ADDITIONAL_PUBKEYS field is present in txextra. The structure has changed recently, so the C source code is really the only definitive source. I have partially documented some elements of a tx here: monero.stackexchange.com/questions/5664/… | |
Mar 21, 2019 at 13:26 | comment | added | ivanahepjuk | So, in each block, which have transactions, there are tx_hashes(R) and destination_keys(P). Each transaction has one R and could have one or more P's. I can query those numbers by searching for tx_hashes (R) or "VOUT" fields (P). I can get those informations from jsons, but also from binary form. Is there some documentation about binary structure? This would allow me to query the whole block and parse those P's and R's form binary form..? And thank you of course for your answers! | |
Mar 21, 2019 at 12:30 | history | edited | knaccc | CC BY-SA 4.0 |
deleted 208 characters in body
|
Mar 21, 2019 at 12:25 | history | edited | knaccc | CC BY-SA 4.0 |
deleted 208 characters in body
|
Mar 21, 2019 at 12:20 | comment | added | knaccc | @jtgrassie I'm not sure why you think that. I've messaged you on IRC so you can sanity check me. | |
Mar 21, 2019 at 12:19 | history | edited | knaccc | CC BY-SA 4.0 |
added 16 characters in body
|
Mar 21, 2019 at 12:14 | history | edited | knaccc | CC BY-SA 4.0 |
added 578 characters in body
|
Mar 21, 2019 at 12:07 | comment | added | ivanahepjuk | I would like to write python script, which is going through blockchain and for each output it sends P and R to hardware wallet, where I am determining if output is mine or not. So, I can get P from tx_json, but what is the best method for getting R ? How the tx_blob is structured? | |
Mar 21, 2019 at 12:05 | comment | added | knaccc | @jtgrassie Ah oops thanks, missed that P is in there. Why though would the txpubkey R be listed as "tx_hash"? | |
Mar 21, 2019 at 12:03 | history | edited | knaccc | CC BY-SA 4.0 |
deleted 21 characters in body
|
Mar 21, 2019 at 10:38 | history | answered | knaccc | CC BY-SA 4.0 |