I'm using the Golang btcsuite/btcd library to write a Bitcoin app that creates custom
OP_RETURN TXs in the blockchain.
I understand Bitcoin at a high-level (proof-of-work consensus, Merkle trees, membership, signatures, etc.), but I'm getting lost in the (unnecessarily?) complicated details of its RPC interface.
I was writing code in Go for creating a custom transaction with 1 input and 2 outputs (an OP_RETURN output and a change output). Here are my questions:
- Is this considered a raw transaction? (If so, what exactly constitutes a raw transaction? Is it all transactions that don't get created via the
- What's the difference between
getrawchangeaddressat a semantic level? It seems that both generate a key-pair, but why is there a need for two different calls?
- If I'm creating a raw transaction as described above, should I send the change to a
getnewaddresskey or a