How to get both confirmed and unconfirmed transaction details of foreign(non-wallet) addresses from bitcoin-node server? Actually i have generated the addresses using third party library and sent some btc on it. Now i want to know confirmed and unconfirmed transaction details using my own local bitcoin-core node server. Can Somebody help me? Thanks in advance.
If I understand correctly you can use this command
getrawtransaction to get a transaction that is in your node's mempool i.e. an unconfirmed transaction.
However, if you are looking for a transaction that has been confirmed, you'll need to know the blockhash of the block in which that transaction resides.
> bitcoin-cli getrawtransaction "mytxid" false "myblockhash"
Or if you have enabled
-txindex option on your client then you can use
getrawtransaction and you don't need to supply the blockhash. Check out this question for details on this option.
Refer to this site for a more detailed explanation of the
You can use
scantxoutset command which was introduced in Bitcoin Core 0.17. It scans the UTXO set for any UTXOs for the address (or output script) provided. It is faster than the rescan when you import a private key.
help scantxoutset to see the help.