namecoin / nmcontrol

Namecoin Control. This repo is deprecated in favor of https://github.com/namecoin/ncdns
136 stars 39 forks source link

NMControl URI Scheme #35

Open phelixbtc opened 10 years ago

phelixbtc commented 10 years ago

nmc:id/satoshi

Display value data in browser.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/3035288-nmcontrol-uri-scheme?utm_campaign=plugin&utm_content=tracker%2F435873&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F435873&utm_medium=issues&utm_source=github).
JeremyRand commented 10 years ago

Is there a reason to use a URI scheme and not a TLD if we just want to display it in a browser? Presumably all we're doing under the hood is redirecting to the NMControl HTTP server on localhost, right?

phelixbtc commented 10 years ago

Actually I thought about the TLD, too, but the URI scheme seemed a cleaner solution to me.

http://satoshi.idbrowse --> http://127.0.0.1:123234/id/browse NMControl page displaying the ID data http://nmcbrowse/id/satoshi http://nmc?id/satoshi http://n#id/satoshi

JeremyRand commented 10 years ago

I'm not opposed to a URI scheme per se, I'm just trying to figure out which system works better. I guess maybe from a security point of view, a URI scheme is a bit safer, since an incorrect DNS configuration wouldn't be able to cause a name to be hijacked. (TLS might solve that issue too, but that might violate the KISS Principle.)

Whatever we come up with, I'd like it to be able to operate on individual fields rather than just entire names. What would be a good syntax for this?

nmc:id/satoshi/bitmessage could be used to send a Bitmessage to the user satoshi.

Maybe also appending ?raw=true would force it to show in a browser rather than launching Bitmessage.

I think this is complicated enough that a full spec should be written and reviewed before any of this is implemented. Anyone want to write a spec on the wiki?

samurai321 commented 10 years ago

hi, to access nmcontrol via browser, should be http://localhost:port/browse/id/name/value

to make it user friendly, first assign nmc:// to namecontrol and namecoin:// to namecoin-qt the reason behind this, is using a TLD to basically access namecontrol may interfere with future namespaces/TLD, the namecoin domain for http:// is .bit and we cannot expect any dns to add any more TLD people come up overnight.

The key functionality of namecontrol may as well be handle nmc:// to browse the blockchain, and when nmc://name.id or nmc://name.bit is called then that would open nmcontrol and it returns http://localhost:port/browse/id/name or http://localhost:port/browse/d/name to be opened by the browser, then this website would show a few tabs with options, like, curated data, raw data and block explorer data. etc. It will be just like browsing https://nameid.org/?name=domob but with extra-options, and from that to add an icon with a link, so the user can click to bitmessage://address it's trivial.

about the syntax, i imagine for example that nmc://bitmessage@domob.id would return http://localhost:port/browse/id/domob/bitmessage and show or return that data specifically, ( i don't understand the difference between doing a RPC call to nmc and passing some information, so i'm unsure if the @ would interfere with authentication, if any, but we all agree that storing usernames/passwords on urls is deffinitely not secure)

as i was writing on the forum, there should be a way to convert a name to an address!, this will be very usefull for not typing address on ATM, giving addresses to friends, etc. at the minimum it wil be an html page with the values.

[heavily edited]

JeremyRand commented 9 years ago

I would propose the URI scheme as follows:

nmcname://id/satoshi?action=bitmessage This would launch Bitmessage to send a message to satoshi

nmcname://id/satoshi?display=bitmessage This would launch a web browser to display the Bitmessage address of satoshi

This seems a bit more in line with existing URI schemes. "nmcname" seems better than "nmc", as it's unambiguous that it is for the naming system rather than the currency system.

Thoughts?

samurai321 commented 9 years ago

Yes, that could be also.

Action will launch a link, and display would just display the data, maybe giving you a link to click on it. nmcname://id/satoshi?display=bitcoin namecontrol:id/satoshi?display=bitcoin This will show the bitcoin address of satoshi. etc etc Very usefull, just need standarization. I think by default it should just display it for safety. ie: namecontrol:id/satoshi?bitcoin should just display it.