cardano-cli: Command to retrieve payer and receiver addresses of any transaction

767 Views Asked by At

I have a service that needs to poll a bunch of payment addresses using cardano-cli command and listen for any incoming payment transactions. Using CLI, I can query the UTXO of each address and see that the payment has been received, but I could not figure out a way to get the sender's address. Is there a CLI command to retrieve it?

Using the following command, I can read the list of transaction hashes and identifiers. Can I use that hash somehow to fetch the sender's address?

cardano-cli query utxo --address $ADDRESS --testnet-magic $NETWORK
1

There are 1 best solutions below

1
On BEST ANSWER

No, you would need to use a query layer over cardano-db-sync. You can either run one locally (needs resources) or use public services like https://dandelion.link or https://blockfrost.io, or use hybrid like https://koios.rest

If you're not impacted by off-chain calculations part of ledger (eg: rewards history), you can also leverage Kupo or Carp