0
I would like to find out the immediate last transaction of addressA.
But so far, I can only do this, bit-li gettransaction <txid> then bit-cli decoderawtransaction <hex>
But I want to do something like this:
bit-cli lasttransactionto <addressA>
How can I do that, without knowing the tx id??
Thank you, I think, I will download libbitcoin but right now, I am doing it like this, but I am not sure if it is good approach or not,
curl https://localhost/api/addr/<AddressA> | python -m json.tool | grep -A1 transactions | grep -v transactions | tr -d ',\" 'then, as usual like before
bit-cli gettransaction <lastoutput>then,
bit-cli decoderawtransaction <hex> | grep -A1 addresses | grep -v addresses | tr -d '" -' | grep -v AddressB | tail -1– Rakib Fiha – 2019-02-04T18:26:22.870You can also import the address as watch-only into the wallet (using
importaddress) in Bitcoin Core, and have the wallet rescan the chain for relevant transactions. – Pieter Wuille – 2019-02-06T05:42:37.997@PieterWuille Ah yes, as chris belchers electrum personal server does... – James C. – 2019-02-06T07:48:46.443
Rescanning the entire chain takes a long time, doesn't it? The problem I am having with my approach is that, if my address (to addr) gets exposed then spammer may flood my address with thousands of small amount of tx. Then, my code will be unable to pick up the right address(from addr). I know there are solutions out there but I dont know how to do it. haha – Rakib Fiha – 2019-02-11T07:17:34.630