moneroexamples / onion-monero-blockchain-explorer

Onion Monero Blockchain Explorer
https://xmrchain.net
BSD 3-Clause "New" or "Revised" License
362 stars 269 forks source link

key_offsets for JSON API? #221

Closed blockchainOSINT closed 3 years ago

blockchainOSINT commented 3 years ago

I'm trying to get the "key_offsets" as displayed in the the "Show JSON representation of tx" in the browser version:

 "version": 2, 
  "unlock_time": 0, 
  "vin": [ {
      "key": {
        "amount": 0, 
        "key_offsets": [ 20739869, 384373, 159131, 127204, 87355, 14305, 9920, 19983, 19203, 3231, 5571
        ], 
        "k_image": "bc90ca976aff791a35de1c60f4f297a51a9fa4f873a6aef0ad540e131b01971c"
      }
    }, {
      "key": {
        "amount": 0, 
        "key_offsets": [ 21092205, 321967, 22658, 98708, 17439, 276, 2468, 5544, 8575, 1358, 472
        ], 
        "k_image": "3d30a7c0c8377eb735a96289988a9f00c001e145a6dbf2719027601cd4ea4ac9"
      }
    }
  ], 
  "vout":  
 .... }

Is it possible to get that transaction json with a request to the json API? The api/transaction/{hash} request does not include key_offsets

blockchainOSINT commented 3 years ago

Found answer: api/rawtransaction/<tx_hash> lists the key_offsets