Hi, can I send transactions with 0 value and no assets as a form of messaging?
I tried to create such a transaction:
createrawtransaction '[{"txid":"dff5d4f237d38f9fc61f21b306186463b8d4ced58c0b5e109070dbb2cda95284","vout":0}]' '{"1GsPTng4yMsLQ3thF71jrYCUaxdZVDKvScgPdg":0,"12DmW3z4iHj4uCEMmeZLkQmTkrbmwQAzbto2f7":0}'
then append the message:
appendrawmetadata 01000000018452a9cdb2db7090105e0b8cd5ced4b863641806b3211fc69f8fd337f2d4f5df0000000000ffffffff0200000000000000001976a9147569637dc6eaceeabd35db9b8f07ef6d7627530688ac00000000000000001976a914090711c967626febefbf7c8ff3fdcced4f08a9f488ac00000000 344d56516737565172344539484b544e7a6e62715a4a4848316f37706369626e56374d716472
which resulted in the following transaction:
{
"txid" : "27f4d6a0d109e43811971caba936324ac54d2ab972fd5a2db6d745c4482cf416",
"version" : 1,
"locktime" : 0,
"vin" : [
{
"txid" : "dff5d4f237d38f9fc61f21b306186463b8d4ced58c0b5e109070dbb2cda95284",
"vout" : 0,
"scriptSig" : {
"asm" : "",
"hex" : ""
},
"sequence" : 4294967295
}
],
"vout" : [
{
"value" : 0.00000000,
"n" : 0,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 7569637dc6eaceeabd35db9b8f07ef6d76275306 OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a9147569637dc6eaceeabd35db9b8f07ef6d7627530688ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"1GsPTng4yMsLQ3thF71jrYCUaxdZVDKvScgPdg"
]
},
"assets" : [
],
"permissions" : [
]
},
{
"value" : 0.00000000,
"n" : 1,
"scriptPubKey" : {
"asm" : "OP_DUP OP_HASH160 090711c967626febefbf7c8ff3fdcced4f08a9f4 OP_EQUALVERIFY OP_CHECKSIG",
"hex" : "76a914090711c967626febefbf7c8ff3fdcced4f08a9f488ac",
"reqSigs" : 1,
"type" : "pubkeyhash",
"addresses" : [
"12DmW3z4iHj4uCEMmeZLkQmTkrbmwQAzbto2f7"
]
},
"assets" : [
],
"permissions" : [
]
},
{
"value" : 0.00000000,
"n" : 2,
"scriptPubKey" : {
"asm" : "OP_RETURN 344d56516737565172344539484b544e7a6e62715a4a4848316f37706369626e56374d716472",
"hex" : "6a26344d56516737565172344539484b544e7a6e62715a4a4848316f37706369626e56374d716472",
"type" : "nulldata"
},
"assets" : [
],
"permissions" : [
]
}
],
"data" : [
"344d56516737565172344539484b544e7a6e62715a4a4848316f37706369626e56374d716472"
]
}
which is cool, but when I tried to sign it I received the following response:
{
"hex" : "01000000018452a9cdb2db7090105e0b8cd5ced4b863641806b3211fc69f8fd337f2d4f5df0000000000ffffffff0300000000000000001976a9147569637dc6eaceeabd35db9b8f07ef6d7627530688ac00000000000000001976a914090711c967626febefbf7c8ff3fdcced4f08a9f488ac0000000000000000286a26344d56516737565172344539484b544e7a6e62715a4a4848316f37706369626e56374d71647200000000",
"complete" : false
}
Multichain marked the txn as incomplete and when I tried to publish the txn I received the error:
error: {"code":-26,"message":"64: Tx with metadata should have at least one SIGHASH_ALL output"}
Can you help me how to do this? Thanks a lot