Hello, I am trying to get a transaction’s sender address using the full node RPC.
I understand you can get coin records for an address using the get_coin_records_by_puzzle_hash. How can I use the below response to figure out the sender address? The only useful info I can spot Is the parent_coin_info attribute (maybe I’m not using the correct endpoint at all).
{
"coin":{
"amount":32899100000000,
"parent_coin_info":"0x0c038eaeeae1df........e481be43b952887124237b52619ba82a",
"puzzle_hash":"0x42435e2bc2c7b4.......f1da04c847c0e3d34a6a65a35413fcc54"
},
"coinbase":false,
"confirmed_block_index":31629370,
"spent":false,
"spent_block_index":0,
"timestamp":1618427359
}
But if I use the parent_coin_info with the get_coin_records_by_parent_ids endpoint, I get:
{
"coin_records": [
{
"coin": {
"amount": 32899100000000,
"parent_coin_info": "0x0c038eaeeae1dfb4cccf47cc4ac113ba....be43b952887124237b52619ba82a",
"puzzle_hash": "0x42435e2bc2c7b4c55c26adac1d2691ff1....c847c0e3d34a6a65a35413fcc54"
},
"coinbase": false,
"confirmed_block_index": 3827370,
"spent": false,
"spent_block_index": 0,
"timestamp": 1678716759
},
{
"coin": {
"amount": 26944798,
"parent_coin_info": "0x0c038eaeeae1dfb4cccf47cc4ac113b....1be43b952887124237b52619ba82a",
"puzzle_hash": "0x7d0eecbf113862ca5ca45167007e590....36ed6da5fd90a9dcb6071992ebd9f"
},
"coinbase": false,
"confirmed_block_index": 3827370,
"spent": false,
"spent_block_index": 0,
"timestamp": 1679829759
}
],
"success": true
}
Neither of these puzzle hashes resolve to the correct sender address.
I feel like I’m missing something fundamental here & I’ve been stumped for a while trying to figure this out. I’m hoping to get all transaction details within 2 requests.
Any help would be really appreciated
Thanks