Adding namecoin "id/" namespace support into bitmessage

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

Re: Adding namecoin "id/" namespace support into bitmessage

Post by domob »

Current update: See https://bitmessage.org/forum/index.php/ ... 563.0.html. For short, I have already some code pushed to a public repository, which is able to connect to namecoind. Not yet nmcontrol and there's not yet a UI for the connection settings, but you can configure them manually in keys.dat. Furthermore, the defaults should be fine (localhost:8336 with the default user/password read from .namecoin/bitcoin.conf).

Feel free to test it if you have time, I would be in particular interested whether the code correctly locates the namecoin config file on Windows and OS X since I wasn't able to test that. I'll be away now until Sunday, but then I'll try to get the missing parts done. I'm really excited it works already somewhat! :) You can try it out with "daniel" or "id/daniel" if you want.
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: Adding namecoin "id/" namespace support into bitmessage

Post by phelix »

domob wrote:
phelix wrote:Nice and simple rpc example...

https://github.com/bitcoin/bitcoin/blob ... /bitrpc.py
Is it ok if I use that package (jsonrpc)? Apparently it is not installed by default with Python on my system, and I also wasn't able to locate the right Debian package right-away (if there even exists one). So I'm not sure how easy it would be for potential users to install it as additional dependency...? Or is this easier with Windows, and only Debian's "fault"?

EDIT: Don't mind, I'm rolling my own implementation based on rpcClient.py in nmcontrol directly with sockets. I wasn't able to figure out how to tell jsonrpc not to block and ask for user/password on the console when the authentication info is wrong, which is unacceptable behaviour in my case.
You can always simply distribute the necessary files with the project.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

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

Re: Adding namecoin "id/" namespace support into bitmessage

Post by domob »

Update: The code I just pushed to the repository (see link above for the Bitmessage forum thread or use https://github.com/domob1812/PyBitmessa ... amecoin-id to view it directly) has a UI for editing the connection settings, plus implements nmcontrol support as additional backend. Please try it out and let me know what you think! Do you have any more suggestions on what the patch should do additionally? IMHO, these are all the basic features necessary - and also according to the bounty criteria. (But if there are good suggestions, I'll be happy to implement them!)

After some others have tested the code, too, I'll try to get it into the official bitmessage code.

@khal: Do you plan to support id/ directly in nmcontrol? I now just use "nmcontrol data getValue" to fetch the value and then parse it myself (as with namecoind) to check whether there is a "bitmessage" field. That seems straight-forward, but I'm curious whether or not you want to implement identities in nmcontrol in the future directly. (Possibly if some more advanced stuff gets added, or for things like the "get signed bitcoin address for each customer" example in the wiki.)
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

khal
Site Admin
Posts: 708
Joined: Mon May 09, 2011 5:09 pm
os: linux

Re: Adding namecoin "id/" namespace support into bitmessage

Post by khal »

domob wrote:Update: The code I just pushed to the repository (see link above for the Bitmessage forum thread or use https://github.com/domob1812/PyBitmessa ... amecoin-id to view it directly) has a UI for editing the connection settings, plus implements nmcontrol support as additional backend. Please try it out and let me know what you think! Do you have any more suggestions on what the patch should do additionally? IMHO, these are all the basic features necessary - and also according to the bounty criteria. (But if there are good suggestions, I'll be happy to implement them!)

After some others have tested the code, too, I'll try to get it into the official bitmessage code.
Good job :p
I hope it will be integrated in bitmessage directly.

domob wrote:@khal: Do you plan to support id/ directly in nmcontrol? I now just use "nmcontrol data getValue" to fetch the value and then parse it myself (as with namecoind) to check whether there is a "bitmessage" field. That seems straight-forward, but I'm curious whether or not you want to implement identities in nmcontrol in the future directly. (Possibly if some more advanced stuff gets added, or for things like the "get signed bitcoin address for each customer" example in the wiki.)
Yes and no :p
As the id namespace has no special feature, for now, I'll only add a json fetcher in the data plugin :

Code: Select all

nmcontrol data getJson bitmessage
In case of no "bitmessage" record, it'll return False I guess (with current code for fetching). Should it return something else that is a valid json string ?
NamecoinID: id/khal
GPG : 9CC5B92E965D69A9
NMC: N1KHAL5C1CRzy58NdJwp1tbLze3XrkFxx9
BTC: 1KHAL8bUjnkMRMg9yd2dNrYnJgZGH8Nj6T

Register Namecoin domains with BTC
My bitcoin Identity - Send messages to bitcoin users
Charity Ad - Make a good deed without paying a cent

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

Re: Adding namecoin "id/" namespace support into bitmessage

Post by domob »

khal wrote:
domob wrote:@khal: Do you plan to support id/ directly in nmcontrol? I now just use "nmcontrol data getValue" to fetch the value and then parse it myself (as with namecoind) to check whether there is a "bitmessage" field. That seems straight-forward, but I'm curious whether or not you want to implement identities in nmcontrol in the future directly. (Possibly if some more advanced stuff gets added, or for things like the "get signed bitcoin address for each customer" example in the wiki.)
Yes and no :p
As the id namespace has no special feature, for now, I'll only add a json fetcher in the data plugin :

Code: Select all

nmcontrol data getJson bitmessage
In case of no "bitmessage" record, it'll return False I guess (with current code for fetching). Should it return something else that is a valid json string ?
Well, my question was mainly out of curiosity. I'm just fine with the "data getValue" query, as you mention it is pretty trivial to get the bitmessage address out of it if there is one. Furthermore, since I also support namecoind directly, I have the code to handle the "raw" value anyway. So actually I'm not planning on switching for my bitmessage patch.
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: Adding namecoin "id/" namespace support into bitmessage

Post by phelix »

domob wrote:Update: The code I just pushed to the repository (see link above for the Bitmessage forum thread or use https://github.com/domob1812/PyBitmessa ... amecoin-id to view it directly) has a UI for editing the connection settings, plus implements nmcontrol support as additional backend. Please try it out and let me know what you think! Do you have any more suggestions on what the patch should do additionally? IMHO, these are all the basic features necessary - and also according to the bounty criteria. (But if there are good suggestions, I'll be happy to implement them!)

After some others have tested the code, too, I'll try to get it into the official bitmessage code.
I took a glance at the code on Sunday and it looked very good. Hopefully I will be able to test tomorrow.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

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

Re: Adding namecoin "id/" namespace support into bitmessage

Post by domob »

phelix wrote:I took a glance at the code on Sunday and it looked very good. Hopefully I will be able to test tomorrow.
Thanks! I'm looking forward to "independent input". ;) As soon as I get some (and it is positive) I'll apply for merging into stock Bitmessage.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

snailbrain
Posts: 309
Joined: Tue Jul 19, 2011 9:33 pm

Re: Adding namecoin "id/" namespace support into bitmessage

Post by snailbrain »

excellent work .. we can add bitmessage field to configure names part of qt (to make it very easy)

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

Re: Adding namecoin "id/" namespace support into bitmessage

Post by domob »

snailbrain wrote:excellent work .. we can add bitmessage field to configure names part of qt (to make it very easy)
That would be great! What about even adding a whole set of possible options for identities (as described on the wiki)? Like real name, email address, bitmessage, bitcoin address, namecoin address, PGP fingerprint?
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

snailbrain
Posts: 309
Joined: Tue Jul 19, 2011 9:33 pm

Re: Adding namecoin "id/" namespace support into bitmessage

Post by snailbrain »

domob wrote:
snailbrain wrote:excellent work .. we can add bitmessage field to configure names part of qt (to make it very easy)
That would be great! What about even adding a whole set of possible options for identities (as described on the wiki)? Like real name, email address, bitmessage, bitcoin address, namecoin address, PGP fingerprint?
was waiting for any bug reports and minor fixes before doing anything else on it.. but we could have ID Tab, with all that too

Post Reply