I was scanning the incoming transactions of a cardano-wallet and a transaction's input body did not contain an address. The other transactions had an address. Is this a normal occurence? If so, how do I work around it to find the sending address?
2 Answers
It depends on what you're exploring. If you're exploring forged coins
in Cardano, look at this page of Blockchain Explorer, for example – as you can see there's no inputs in Tx. And this is also possible through constructing a raw transaction via cardano-cli – the only question is what will you achieve with such a transaction.
By the way, in Bitcoin network there's a coinbase transaction
that creates coins from nothing. In other words, it's a reward that miner gets for a successfully mined block.
If I understood your question correctly you are looking for the address used to send the ADA.
Your first image shows an array of inputs used in the transaction and each input points to the transaction with the output index.
So to find out the sending address, you can copy the id(transaction id) and search on testnet.cardanoscan.io OR you click on the below link which takes you to the transaction
There the UTXOs section "TO ADDRESSES (OUTPUTS)" show the list of addresses with balance and the 0th index address is the address which was used as sending address and you can find that address details with below link
-
So, if I cant find the address in the input object, I should look at the output object and derive from the utxo's?– TomySep 28, 2021 at 8:58
-
Input should never have an address it will always contain transaction-id and index which point to the UTXO that will be used in the transaction Sep 28, 2021 at 11:09