how does bitcoinjs-lib grab utxo So, Let's say I want to create a transaction by using bitcoinjs-lib.
As far as I can see, this library doesn't provide the help so that it can automatically figure out/grab unpent transactions for inputs and create a transaction magically.
My question is: Am I the one who has to know unspent transactions that I want to use for the inputs in advance ?
If the answer is no, then can you point me to the bitcoinjs-lib file that does this ?
If the answer is yes, how do I get unspent transactions ? By looking at my transaction list on blockchain and getting each one of them's txid and vouts seem not reasonable. Any idea ?
Yes you need to provide the UTXO details when building a transaction in bitcoinjs. One should not have to trust a library to provide blockchain data, the library works like a calculator and processes the data that it is given. It's not unreasonable at all, these details are easy to get from your node or an explorer.