I would like to query the bitcoin node via json-rpc to get the UTXO and then create a raw transaction programatically. The issue is that the RPC call which returns the UTXO doesn’t return the transaction Index for UTXO(s) and I can’t create raw transactions without the transaction index. Thus the question: How can I get the transaction index for each UTXO?
type ListUnspentResult struct { TxID string `json:"txid"` Vout uint32 `json:"vout"` Address string `json:"address"` Account string `json:"account"` ScriptPubKey string `json:"scriptPubKey"` RedeemScript string `json:"redeemScript,omitempty"` Amount float64 `json:"amount"` Confirmations int64 `json:"confirmations"` Spendable bool `json:"spendable"` }