Hi, I've been working on improving my computer skills and thought bitcoin would be a good avenue to learn.
After a long battle, I finally managed to achieve synchronization of my node and have been trying some commands. I tried sending the simplest transaction I could, and much to my amazement, it worked:
bitcoin-cli createrawtransaction "[{\"txid\":\"5894211487d94fs5484a0f64cb56edf8a4fea5a82s1848782e7d55b45cd12472\",\"vout\":0}]" "[{\"1KNt61bXLPTvs5PhL3m4fp71ndqJWBSQ14\":0.0002}]"
The transaction above was easy because it was a single input and required no change. However, I am trying to spice things up first by including a transaction with change, and then one involving multiple inputs. However, I've run into some minor issues when I tried to make things more interesting.
However when I tried to add a change address and value into a similar transaction.
bitcoin-cli createrawtransaction "[{\"txid\":\"37d53f65g0568e3fd1e4auu7f30b4i0758e69o257f649de62b352931e402g7654\",\"vout\":0}]" "[{\"1EmGo9SAoYpoXmYH3Hm4LX8mMsyDxyDCkH \":0.0003, \"3L4kHNBgRPf5u875UhTd6N57sw4gc7vLa \":0.00005}]"
This returned an error:
error code: -8
error message:
Invalid parameter, key-value pair must contain exactly one key
Not sure where I am going wrong because it doesn't seem like a substantial leap from the first transaction to the second...? If anyone can see where I might be going wrong here I would appreciate the input! Also can anyone recommend where I might find some examples of some raw transactions? Doesn't seem to be too many around that I can find :-/
Thanks in advance everyone. I appreciate the community's help as always!