getnewaddress vs. getrawchangeaddress 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 sendfrom/sendmany/sendtoaddress RPC?)
What's the difference between getnewaddress and getrawchangeaddress at 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 getnewaddress key or a getrawchangeaddress key?


Thank you,
Alin
The rawtransaction interface accepts and returns "raw" hex encoded p2p compatible transactions. Using the non-rawtransaction methods (like sendtoaddres, will not give you the possibility to inspect or alter the created bytearray.
The getrawchangeaddress method will retrieve a key from the keypool and return its pubkey (encoded into an p2pkh address). Unlike getrawchangeaddress, gewnewaddress will create an address book entry that will allow you better ways to inspect/distinct what funds you have received with that address and therefore increases the chance of a reused address.
You should use getrawchangeaddress if you like to use the given address as a change output for your rawtransaction.