As a first step towards that goal, I suggest we implement a way to do safe name trading transactions using the RPC interface for raw transactions. Then we can demonstrate it works, and work on the UI later. In particular, what I propose to do:
- Extend "decoderawtransaction" to actually print meaningful and understandable interpretations of name scripts (and possibly also more information about the inputs), so that checking of transactions can be done. What I currently see for my last transaction updating d/domob (txid
e9903bf33ab5c7aadd1f99f2fabab3313b97d61ecdd9b0c339ee2de914c40184):While this makes partially sense to me, it is far from anything where I (as experienced user) could look at it and decide whether or not to sign it if I got this transaction from a trading partner. What I think we need is: Inputs that are names need to be shown as such, and other inputs need to show the amount and possibly also the address, ideally in new JSON fields. Output scripts should be decoded even more; ideally again, for currency, they should show the address (in case of OP_CHECKSIG), and for names, they should show something like "name_update: d/domob, new value, address". At least for name updates this is needed; name_firstupdate and name_new would be nice, too, but not necessary for name trading specifically.Code: Select all
{ "txid" : "e9903bf33ab5c7aadd1f99f2fabab3313b97d61ecdd9b0c339ee2de914c40184", "version" : 28928, "locktime" : 0, "vin" : [ { "txid" : "61623985dc8fbf003eeaf1f597b4f2d5da8c46ab25dac4c388b3068696a8b425", "vout" : 0, "scriptSig" : { "asm" : "30450221008706aff65986393f6df9ff0531a403d94ad9e8e2abc32271f36ee5c05e671b340220073a42971f1ef51bca744a6066fd63c1b8bffcc4896487c4bd609ea9314c628101 049d2cebbc692db1f3862d5c76a8c80a7df61cd0e0b257ebb93b9a6d41874ccf6b8e66eeb397da10434aff2577e3fa70f59b8ee1f6211831a321284986d4cdc9af", "hex" : "4830450221008706aff65986393f6df9ff0531a403d94ad9e8e2abc32271f36ee5c05e671b340220073a42971f1ef51bca744a6066fd63c1b8bffcc4896487c4bd609ea9314c62810141049d2cebbc692db1f3862d5c76a8c80a7df61cd0e0b257ebb93b9a6d41874ccf6b8e66eeb397da10434aff2577e3fa70f59b8ee1f6211831a321284986d4cdc9af" }, "sequence" : 4294967295 }, { "txid" : "ecd9c5f3fd7387a8dc358aedf54ec542d4a2f1ad79f50e0c964893cdc97c26da", "vout" : 1, "scriptSig" : { "asm" : "3046022100bbb41321fdc2cf7adc033073931a3d80eda94759ce980173f4205b751bce9b7a022100fb49858725f872924487a6e32ece6e3b5ba32d9148630ba453b174b6972df50701 04be4e09b25d8e3d8b6b8f9b5a5276aab63ee258679124c8bc19627adadfd253d00a25ff71558deb2de05f504171fdaedb70669ae4948f3f1fe441da56d379be34", "hex" : "493046022100bbb41321fdc2cf7adc033073931a3d80eda94759ce980173f4205b751bce9b7a022100fb49858725f872924487a6e32ece6e3b5ba32d9148630ba453b174b6972df507014104be4e09b25d8e3d8b6b8f9b5a5276aab63ee258679124c8bc19627adadfd253d00a25ff71558deb2de05f504171fdaedb70669ae4948f3f1fe441da56d379be34" }, "sequence" : 4294967295 } ], "vout" : [ { "value" : 5.43500000, "n" : 0, "scriptPubKey" : { "asm" : "04067a9140ea7c02bd9f02e459f76b28dcd2fce66d86f35c42362fa01f63141e6b377f9aaae166f33291f63f669cb644a4486cc724d432e00ea33f9a57025d80b3 OP_CHECKSIG", "hex" : "4104067a9140ea7c02bd9f02e459f76b28dcd2fce66d86f35c42362fa01f63141e6b377f9aaae166f33291f63f669cb644a4486cc724d432e00ea33f9a57025d80b3ac", "type" : "nonstandard" } }, { "value" : 0.01000000, "n" : 1, "scriptPubKey" : { "asm" : "3 642f646f6d6f62 7b22696d706f7274223a2264642f646f6d6f62227d OP_2DROP OP_DROP OP_DUP OP_HASH160 15407044c6364192a5af060d249bf038904a66f8 OP_EQUALVERIFY OP_CHECKSIG", "hex" : "5307642f646f6d6f62157b22696d706f7274223a2264642f646f6d6f62227d6d7576a91415407044c6364192a5af060d249bf038904a66f888ac", "type" : "nonstandard" } } ] }
- Extend createrawtransaction to allow to add name operations (again, at least updates). This could be done with an optional third argument, which could be like this:
This would allow to support other name operations in the future, too. Alternatively, it could be
Code: Select all
{ "update": {"name": "d/domob", "value": "new value", "address": "target address"}, ... }
if that is preferred for some reason.Code: Select all
{ "d/domob": {"value": "new value", "address": "target address"} }