RPC interface / raw transactions for safe name trading

https://www.namecoin.org/dot-bit/
domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: RPC interface / raw transactions for safe name trading

Post by domob »

phelix wrote:Especially for noobs it can be confusing that github defaults to some bleeding edge version. What about creating a release branch and make that the default branch? We can then tag the release branch with versions.
Actually, my impression from other projects is that checking out code from Github (or any other repository) just gives you the bleeding edge. If you don't want this, you should download a packaged and released source or binary version or explicitly check out a release tag. (I don't know if this is different for cryptocurrency projects.) Noobs who do not know what they are doing or how to get a tag instead of the default shouldn't be checking out the code from Github in the first place (instead using source downloads for released versions).

From a more pragmatic point of view, I just want a branch where development is going on and where I can get patches merged relatively easily and quickly after testing and review by others. (Because it only creates a lot of hassles to have lots of "private" branches with proposed changes and develop all of them in parallel without merging them together.) I also do not want this branch to be just for others to check out and test, with the responsibility to merge later to yet another "main" branch. What goes in there should be considered bleeding-edge but officially merged for inclusion in a future release. Whether the branch is "master", "namecoinq" or "bleeding-edge" and whether or not it is checked out by default, I don't care.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: RPC interface / raw transactions for safe name trading

Post by domob »

Take a look here: https://wiki.namecoin.info/?title=Atomic_Name-Trading It works when my pending pull request will be merged. Then only a UI to automate the process described in the wiki page is missing. :)
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: RPC interface / raw transactions for safe name trading

Post by phelix »

domob wrote:Take a look here: https://wiki.namecoin.info/?title=Atomic_Name-Trading It works when my pending pull request will be merged. Then only a UI to automate the process described in the wiki page is missing. :)
Check. Also: Awesome.

BTW: It should also be possible to make an offer directly by using the address the name sits on.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: RPC interface / raw transactions for safe name trading

Post by domob »

phelix wrote:BTW: It should also be possible to make an offer directly by using the address the name sits on.
Not sure what you mean here ... using the name's current address to direct a payment? I think that it would be easiest to put information about an offer to sell the domain in its value, in some kind of standard JSON format containing the price, the payment address and a contact info (email/BM). This could be done by a simple UI tool, and it could also list all names that have these offers on them and allow a buyer to initiate a trade. Everything should be possible with the RPC interface provided, so it is "just" a matter of implementing a nice UI when someone is interested in that. I think it would be a cool project, but I don't consider myself very skilled at UI development.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: RPC interface / raw transactions for safe name trading

Post by phelix »

domob wrote:
phelix wrote:BTW: It should also be possible to make an offer directly by using the address the name sits on.
Not sure what you mean here ... using the name's current address to direct a payment? I think that it would be easiest to put information about an offer to sell the domain in its value, in some kind of standard JSON format containing the price, the payment address and a contact info (email/BM). This could be done by a simple UI tool, and it could also list all names that have these offers on them and allow a buyer to initiate a trade. Everything should be possible with the RPC interface provided, so it is "just" a matter of implementing a nice UI when someone is interested in that. I think it would be a cool project, but I don't consider myself very skilled at UI development.
Yeah, I am completely with you here. Also I, too, think the GUI would be a cool project.

What I mean by "direct offer" is this: Say a d/example had only a bitmessage address as it's value. You could then directly send it the unsigned TX as an offer with the address currently holding d/example as target for the payment. And the holder of the name could sign and broadcast right away.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: RPC interface / raw transactions for safe name trading

Post by domob »

phelix wrote:
domob wrote:
phelix wrote:BTW: It should also be possible to make an offer directly by using the address the name sits on.
Not sure what you mean here ... using the name's current address to direct a payment? I think that it would be easiest to put information about an offer to sell the domain in its value, in some kind of standard JSON format containing the price, the payment address and a contact info (email/BM). This could be done by a simple UI tool, and it could also list all names that have these offers on them and allow a buyer to initiate a trade. Everything should be possible with the RPC interface provided, so it is "just" a matter of implementing a nice UI when someone is interested in that. I think it would be a cool project, but I don't consider myself very skilled at UI development.
Yeah, I am completely with you here. Also I, too, think the GUI would be a cool project.

What I mean by "direct offer" is this: Say a d/example had only a bitmessage address as it's value. You could then directly send it the unsigned TX as an offer with the address currently holding d/example as target for the payment. And the holder of the name could sign and broadcast right away.
Yes, that's right. In general, I think the work-flow for trading names with this technique should be exactly like this (and outlined in the wiki page): Buyer creates a transaction, he/she need not even be in contact to the seller before this. Seller signs it and broadcasts. Then there's only a single communication step necessary, namely Buyer -> Seller. The buyer needs to create the transaction, since one he/she knows about their own unspent outputs.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: RPC interface / raw transactions for safe name trading

Post by phelix »

Is it somehow possible to only sign from a single key with signrawtransaction? As a seller I would be hesitant to sign from all keys in my wallet. One could export the privkey for the name's address and use pybitcointools to sign only from that...
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

Re: RPC interface / raw transactions for safe name trading

Post by domob »

phelix wrote:Is it somehow possible to only sign from a single key with signrawtransaction? As a seller I would be hesitant to sign from all keys in my wallet. One could export the privkey for the name's address and use pybitcointools to sign only from that...
Yes, you can do that. Look at "help signrawtransaction".
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: RPC interface / raw transactions for safe name trading

Post by phelix »

domob wrote:
phelix wrote:Is it somehow possible to only sign from a single key with signrawtransaction? As a seller I would be hesitant to sign from all keys in my wallet. One could export the privkey for the name's address and use pybitcointools to sign only from that...
Yes, you can do that. Look at "help signrawtransaction".
RTFM :mrgreen: Thanks for the hint!

Code: Select all

> help signrawtransaction
signrawtransaction <hex string> [{"txid":txid,"vout":n,"scriptPubKey":hex},...] [<privatekey1>,...] [sighashtype="ALL"]
[...]
Third optional argument (may be null) is an array of base58-encoded private
keys that, if given, will be the only keys used to sign the transaction.
[...]
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

phelix
Posts: 1634
Joined: Thu Aug 18, 2011 6:59 am

Re: RPC interface / raw transactions for safe name trading

Post by phelix »

Antpy: Atomic Name Trading Pythonscript
http://forum.namecoin.info/viewtopic.php?p=11564#p11564

Thanks to domob for doing all the hard work. :)
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

Post Reply