1

How to get the transaction ID for a given output (from the transaction I am looking for)?

jtgrassie
  • 19,111
  • 4
  • 14
  • 51

1 Answers1

2

You can use the RPC method get_outs with the input parameter get_txid set to true.

A concrete example:

$ curl -X POST http://127.0.0.1:18081/get_outs \
    -d '{"get_txid":true,"outputs":[{"index":5164903},{"index":7719180}]}' \
    -H 'Content-Type: application/json'
{
  "credits": 0,
  "outs": [{
    "height": 1545783,
    "key": "6dcc42839619ea4e1b1cb1b28d45659916207a445ec00e06ece45a7b7bfc1264",
    "mask": "449ce062721cbde5f282eeb292eb27636539b29c81a396fddeede73c72d0a66e",
    "txid": "124f70eb30ace64d577d82f193e0057b07fc4bdb053bf228dfc00b4e1099b1f1",
    "unlocked": true
  },{
    "height": 1694891,
    "key": "1089839b83fd45f7ab87a64398aad45176be4e6ee44872cf37c544358904d61c",
    "mask": "3f22409779524a01dc998e58fbccb58a02ca37e6e6be784f11d7b67dbdaf87e3",
    "txid": "4b1580e241b5499dd19faebc6c3c2dbf9bbb8a6c8144f538863fb3e71db10bd1",
    "unlocked": true
  }],
  "status": "OK",
  "top_hash": "",
  "untrusted": false
}
jtgrassie
  • 19,111
  • 4
  • 14
  • 51