[ANN] Namecoin RPC interface in C++

Forum rules
Warning !
Avoid using binary softwares from untrusted users.
Prefer compiling it yourself and verify sources.
domob
Posts: 1129
Joined: Mon Jun 24, 2013 11:27 am
Contact:

[ANN] Namecoin RPC interface in C++

Post by domob »

Let me announce libnmcrpc: https://gitorious.org/libnmcrpc This is a C++ library (using cURL and JsonCpp, see the README file, internally) that implements JSON-RPC specifically to talk to Namecoin from C++ code. At the moment it has the general RPC interface working, but it is planned to add "high-level" Namecoin functions on top of that in the future (like querying for a name's data as JSON, signing/verifying messages and even registering names, possibly with semi-automatic name_new/name_firstupdate). This follows the tradition of me implementing JSON-RPC interfaces in a growing number of languages.... ;)

This is part of my work on the "Holy Grail" Namecoin part ... it will be the base layer of the work there but I plan to keep it a separate and generally useful library. Note that it can also be used to connect to Bitcoin (and other coins as well I guess) when only the general RPC interface is used and none of the (planned) high-level functions.

Current status:

Arbitrary RPC commands can be issued (also for other coins than Namecoin), and a high-level interface to Namecoin works that can be used to query for names, check their status (existing / expired / value) and also register names including semi-automatic name_new and name_firstupdate. It can also use GNU libidn to convert non-ASCII names to IDN encoding before registering, and to decode those back to the user's locale.

Furthermore, command-line tools are included to manage bulk registration of names as well as updates.
Last edited by domob on Sun Jan 26, 2014 6:27 pm, edited 1 time in total.
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: [ANN] Namecoin RPC interface in C++

Post by phelix »

Great. Your strategy sounds good.

I'm looking forward to moneychanger though I am still a little skeptic.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

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

Re: [ANN] Namecoin RPC interface in C++

Post by domob »

phelix wrote:Great. Your strategy sounds good.

I'm looking forward to moneychanger though I am still a little skeptic.
Me too, but at least their Namecoin part seems sound and that is what is most important for me right now. ;)
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

moa
Posts: 255
Joined: Mon May 23, 2011 6:13 am

Re: [ANN] Namecoin RPC interface in C++

Post by moa »

Should be useful.

Does something similar exist for bitcoin?

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

Re: [ANN] Namecoin RPC interface in C++

Post by domob »

moa wrote:Should be useful.

Does something similar exist for bitcoin?
I don't know. (But I think there are libraries in development that implement the protocol directly rather than just communicating to bitcoind.) As mentioned, it should be possible to use libnmcrpc for all those things which Bitcoin and Namecoin have in common, though.
BTC: 1domobKsPZ5cWk2kXssD8p8ES1qffGUCm | NMC: NCdomobcmcmVdxC5yxMitojQ4tvAtv99pY
BM-GtQnWM3vcdorfqpKXsmfHQ4rVYPG5pKS
Use your Namecoin identity as OpenID: https://nameid.org/

biolizard89
Posts: 2001
Joined: Tue Jun 05, 2012 6:25 am
os: linux

Re: [ANN] Namecoin RPC interface in C++

Post by biolizard89 »

domob wrote:Let me announce libnmcrpc: https://gitorious.org/libnmcrpc This is a C++ library (using cURL and JsonCpp, see the README file, internally) that implements JSON-RPC specifically to talk to Namecoin from C++ code. At the moment it has the general RPC interface working, but it is planned to add "high-level" Namecoin functions on top of that in the future (like querying for a name's data as JSON, signing/verifying messages and even registering names, possibly with semi-automatic name_new/name_firstupdate). This follows the tradition of me implementing JSON-RPC interfaces in a growing number of languages.... ;)

This is part of my work on the "Holy Grail" Namecoin part ... it will be the base layer of the work there but I plan to keep it a separate and generally useful library. Note that it can also be used to connect to Bitcoin (and other coins as well I guess) when only the general RPC interface is used and none of the (planned) high-level functions.
Nice work domob. Unfortunately I don't trust my C++ skills enough to use C++ for anything that handles money... but I'm sure the more competent coders will find a use for it.
Jeremy Rand, Lead Namecoin Application Engineer
NameID: id/jeremy
DyName: Dynamic DNS update client for .bit domains.

Donations: BTC 1EcUWRa9H6ZuWPkF3BDj6k4k1vCgv41ab8 ; NMC NFqbaS7ReiQ9MBmsowwcDSmp4iDznjmEh5

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

Re: [ANN] Namecoin RPC interface in C++

Post by domob »

Update: The code now fully supports name registration, including saving all the necessary "state" information to perform name_new and name_firstupdate "automatically", and also for a bunch of names together (that may be in different stages of the name registration process).

It also includes a quick front-end utility (on the command-line) for this functionality, that can be used to register names. I'm planning on using it myself in the future, when I want to register new names. Use at your own risk, of course - it works so far for my tests, but of course it is still very much in 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: [ANN] Namecoin RPC interface in C++

Post by phelix »

I guess this would work for Bitcoin, too?
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

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

Re: [ANN] Namecoin RPC interface in C++

Post by domob »

phelix wrote:I guess this would work for Bitcoin, too?
Yes, the JSON-RPC part should work also with Bitcoin, as well as querying / verifying addresses and message signing. Obviously all the other stuff (names, name registration, name update) not. Do you have a particular application in mind?

Currently there's no support of transactions and balances in there because I don't (or didn't so far) need that for Moneychanger (which is actual top priority). But if you have a particular need, I can add it of course.
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: [ANN] Namecoin RPC interface in C++

Post by phelix »

domob wrote:
phelix wrote:I guess this would work for Bitcoin, too?
Yes, the JSON-RPC part should work also with Bitcoin, as well as querying / verifying addresses and message signing. Obviously all the other stuff (names, name registration, name update) not. Do you have a particular application in mind?

Currently there's no support of transactions and balances in there because I don't (or didn't so far) need that for Moneychanger (which is actual top priority). But if you have a particular need, I can add it of course.
I suggested it to Anu for ZeroReserve: https://bitcointalk.org/index.php?topic=295930.0

He certainly would need transactions and even raw transactions. But seems to prefer including a full node inside ZeroReserve atm so don't rush.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

Post Reply