I think Namecoin is the perfect solution for aliases because it relies on no external server (no dns server, no forced external service, etc), benefits from the blockchain advantages and would be very easy to add into bitcoin.
If it were to be added to Bitcoin then it would have to go through the BIP process which doesn't seem easy to me, but I understand that you meant it would be easy from a programming standpoint. I think it would be much easier to implement it first in Namecoin as a proof of concept. Can you do this?
There is a similar feature in this release of namecoin : sendtoname.
You can send namecoins to a name owner. It first gets the address associated with a name and then send coins to this address.
But, adding name_getjson function would be a more complete proof of concept indeed.
For example, you could have this alias registered :
$ namecoind name_show a/khal
{
"email" : "
khal@dot-bit.org",
"bitcoin" : "1J3EKMfboca3SESWGrQKESsG1MA9yK6vN4", "namecoin" :
{
"Donation address": "N2pGWAh65TWpWmEFrFssRQkQubbczJSKi9",
"Generic address" : "N2pGWAh65TWpWmEFrFssRQkQubbczJSKi9"
}
"gpg" :
{
"fpr" : "0123456789abcde0123456789abcde0123456789",
"uri" : ["
http://domainA/user.key", "
http://domainB/user.key"],
}
}
And bitcoin would query it like that :
$ namecoind name_getjson khal bitcoin
{
"bitcoin" : "1J3EKMfboca3SESWGrQKESsG1MA9yK6vN4"
}
and namecoin :
$ namecoind name_getjson khal namecoin
{
"namecoin" :
{
"donation": "N2pGWAh65TWpWmEFrFssRQkQubbczJSKi9",
"default" : ["N2pGWAh65TWpWmEFrFssRQkQubbczJSKi9", "N2pGWAh65TWpWmEFrFssRQkQubbczJSKi9"],
}
}
The namecoin client can propose to select "khal donation" or "khal default". If default is selected, one is chosen randomly.
The current draft for
bitcoin/namecoin aliases says it can return several labels and several addresses. I don't know if this is really useful or not.
What do you think ?