Namecoin API

Post Reply
virtual_master
Posts: 541
Joined: Mon May 20, 2013 12:03 pm
Contact:

Namecoin API

Post by virtual_master »

It would be fine to have a namecoin API like bitcoin has by blockchain.info to make browser based namecoin transfers from private key and may be browser based domain operations also in a similar way.
This tool could be adapted:
https://bitcointalk.org/index.php?topic=266915.0
http://namecoinia.org/
Calendars for free to print: 2014 Calendar in JPG | 2014 Calendar in PDF Protect the Environment with Namecoin: 2014 Calendar in JPG | 2014 Calendar in PDF
BTC: 15KXVQv7UGtUoTe5VNWXT1bMz46MXuePba | NMC: NABFA31b3x7CvhKMxcipUqA3TnKsNfCC7S

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

Re: Namecoin API

Post by phelix »

virtual_master wrote:It would be fine to have a namecoin API like bitcoin has by blockchain.info to make browser based namecoin transfers from private key and may be browser based domain operations also in a similar way.
This tool could be adapted:
https://bitcointalk.org/index.php?topic=266915.0
Nice but in my opinion it would be more important to be able to query for names so you can run a lite dns client. Maybe it is even possible to somehow secure it.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

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

Re: Namecoin API

Post by domob »

What about just using the ordinary JSON-RPC interface? I guess it would be the easiest to just set up a server somewhere which listens for RPC connections on a public port and uses no credentials. Since JSON-RPC calls are also just HTTP requests, I think it wouldn't be hard to write a script that communicates to it. Furthermore I agree with phelix, querying for name status and in particular name values is IMHO much more important than sending/receiving funds. Also, verify signed message is another important call to allow implementation of namecoin identity login like NameID on servers which aren't able to run a namecoind on their own. (If such an API is developed, I'll surely include support for it in the NameID code so anyone wishing to add pure namecoin login (without the detour via OpenID) can just copy my code module and enable it.)
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: Namecoin API

Post by phelix »

domob wrote:What about just using the ordinary JSON-RPC interface? I guess it would be the easiest to just set up a server somewhere which listens for RPC connections on a public port and uses no credentials. Since JSON-RPC calls are also just HTTP requests, I think it wouldn't be hard to write a script that communicates to it. Furthermore I agree with phelix, querying for name status and in particular name values is IMHO much more important than sending/receiving funds. Also, verify signed message is another important call to allow implementation of namecoin identity login like NameID on servers which aren't able to run a namecoind on their own. (If such an API is developed, I'll surely include support for it in the NameID code so anyone wishing to add pure namecoin login (without the detour via OpenID) can just copy my code module and enable it.)
Hmm... sounds slow :) But maybe via nmcontrol (might still be necessary to be restricted to simple requests).
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

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

Re: Namecoin API

Post by domob »

phelix wrote:
domob wrote:What about just using the ordinary JSON-RPC interface? I guess it would be the easiest to just set up a server somewhere which listens for RPC connections on a public port and uses no credentials. Since JSON-RPC calls are also just HTTP requests, I think it wouldn't be hard to write a script that communicates to it. Furthermore I agree with phelix, querying for name status and in particular name values is IMHO much more important than sending/receiving funds. Also, verify signed message is another important call to allow implementation of namecoin identity login like NameID on servers which aren't able to run a namecoind on their own. (If such an API is developed, I'll surely include support for it in the NameID code so anyone wishing to add pure namecoin login (without the detour via OpenID) can just copy my code module and enable it.)
Hmm... sounds slow :) But maybe via nmcontrol (might still be necessary to be restricted to simple requests).
Why would that be slower than an API similar to what blockchain.info offers? In both cases you make an HTTP request to some remote server and get a result back (even in both cases in JSON).

Of course security is important so it may be a good idea to restrict the server, at least the "backupwallet" command and others which might do harm to the system the daemon is running in. (And of course you wouldn't want to store any namecoins at that wallet, obviously.)
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: Namecoin API

Post by phelix »

domob wrote:
phelix wrote:
domob wrote:What about just using the ordinary JSON-RPC interface? I guess it would be the easiest to just set up a server somewhere which listens for RPC connections on a public port and uses no credentials. Since JSON-RPC calls are also just HTTP requests, I think it wouldn't be hard to write a script that communicates to it. Furthermore I agree with phelix, querying for name status and in particular name values is IMHO much more important than sending/receiving funds. Also, verify signed message is another important call to allow implementation of namecoin identity login like NameID on servers which aren't able to run a namecoind on their own. (If such an API is developed, I'll surely include support for it in the NameID code so anyone wishing to add pure namecoin login (without the detour via OpenID) can just copy my code module and enable it.)
Hmm... sounds slow :) But maybe via nmcontrol (might still be necessary to be restricted to simple requests).
Why would that be slower than an API similar to what blockchain.info offers? In both cases you make an HTTP request to some remote server and get a result back (even in both cases in JSON).

Of course security is important so it may be a good idea to restrict the server, at least the "backupwallet" command and others which might do harm to the system the daemon is running in. (And of course you wouldn't want to store any namecoins at that wallet, obviously.)
I understood you wanted to directly rpc bridge into the Namecoin client. It would be much faster to only used cached name data via nmcontrol. Also there might be regex name_filter or name_scan ops that could easily be abused to ddos the server. Using Nmcontrol and restrict it a little should be simple enough, though.
nx.bit - some namecoin stats
nf.bit - shortcut to this forum

Post Reply