The good news: The test network is running smoothly and I mined a ton of worthless coins.
The bad news: I am so far unable to add extra data to a transaction.
According to
https://wiki.bytecoin.org/wiki/Send_transaction_-_Bytecoin_RPC_Wallet_API, this should work:
curl -X POST -i -H "Accept: application/json" -d '
{
"params":
{
"anonymity":0,
"fee":1000000,
"unlockTime":0,
"paymentId":"",
"addresses":
[
"iz4Z1u39PLbg3djCXo9CBGdXRLrBtf7ceTfmZAsvhaANUBQixShfRXV8eyaoAQJmqhZYuZyar6ptbXUBNufDi6c51yxiqr8wJ"
],
"transfers":
[
{
"amount":10,
"address":"iz5NJ4B5Rc6AmtoiVFoJy2jWGDvKPMGuoGCmNxL2t9sXZ2LUXUJPZLrX3pLau4P9tjY4M2VyoYGPWjn6mETrNsqJ2T21YtMtx"
}
],
"changeAddress":""
},
"extra":"HELLOWORLD",
"jsonrpc":"2.0",
"id":"test",
"method":"sendTransaction"}
' http://127.0.0.1:8070/json_rpc
This is the output I get from walletd:
HTTP/1.1 200 OK
Content-Length: 773
Server: CryptoNote-based HTTP server
{"id":"test","jsonrpc":"2.0","result":{"transaction":{"amount":-1000010,"blockIndex":4294967295,"extra":"016d7bb13f30dffd6e62361abbf0eb64b1d946455bd5d2d4bf37f63c11fbece5f0","fee":1000000,"isBase":false,"paymentId":"","state":0,"timestamp":0,"transactionHash":"23dabee38c0354bc8dbd4c800e19d9df1295c5a2fc237969cf8fb3e67c45793a","transfers":[{"address":"iz5NJ4B5Rc6AmtoiVFoJy2jWGDvKPMGuoGCmNxL2t9sXZ2LUXUJPZLrX3pLau4P9tjY4M2VyoYGPWjn6mETrNsqJ2T21YtMtx","amount":10,"type":0},{"address":"iz4Z1u39PLbg3djCXo9CBGdXRLrBtf7ceTfmZAsvhaANUBQixShfRXV8eyaoAQJmqhZYuZyar6ptbXUBNufDi6c51yxiqr8wJ","amount":8999052258,"type":2},{"address":"iz4Z1u39PLbg3djCXo9CBGdXRLrBtf7ceTfmZAsvhaANUBQixShfRXV8eyaoAQJmqhZYuZyar6ptbXUBNufDi6c51yxiqr8wJ","amount":-9000052268,"type":0}],"unlockTime":0}}}
As you can see, the extra field contains no "HELLOWORLD"...
When I put the extra field above the transaction, like this:
curl -X POST -i -H "Accept: application/json" -d '
{
"params":
{
"extra":"HELLOWORLD",
"anonymity":0,
"fee":1000000,
"unlockTime":0,
"paymentId":"",
"addresses":
[
"iz4Z1u39PLbg3djCXo9CBGdXRLrBtf7ceTfmZAsvhaANUBQixShfRXV8eyaoAQJmqhZYuZyar6ptbXUBNufDi6c51yxiqr8wJ"
],
"transfers":
[
{
"amount":10,
"address":"iz5NJ4B5Rc6AmtoiVFoJy2jWGDvKPMGuoGCmNxL2t9sXZ2LUXUJPZLrX3pLau4P9tjY4M2VyoYGPWjn6mETrNsqJ2T21YtMtx"
}
],
"changeAddress":""
},
"jsonrpc":"2.0",
"id":"test",
"method":"sendTransaction"}
' http://127.0.0.1:8070/json_rpc
I get:
{"error":{"code":-32600,"message":"Invalid Request"},"id":"test","jsonrpc":"2.0"}
If somebody could tell me what tag to use, I would be forever grateful. I tried a lot, like extra_padding, tx_extra_tag_padding, basically all variations of the tags seen in:
https://github.com/euleausberlin/infocoin/blob/master/src/CryptoNoteCore/TransactionExtra.h I could think of.
Unfortunately, while there is some information on why and how tx-extra is supposed to be used, there is very little information on how to actually do it. A little push in the right direction from someone who actually knows Cryptonote would be much appreciated.
TODO: Insert data into transactions
Fix evil Cryptonote bug from a few months ago (already have the commit with the necessary changes thanks to moneromoo, but no need to do that until data can be inserted)
Windows wallet