Chapters1. Description
2. Technical explanation
3. Usages examples
4. How to add this to your website
5. You have an email and don't own the domain
Pull request on git :
http://github.com/bitcoin/bitcoin/pull/1741. DescriptionThis patch allows you to send payments to email address, domain names and url from the bitcoin GUI.
Valid examples of inputs :
2. Technical explanationInput url/address is translated to an http request sent to the corresponding domain (ip addresses are not translated for backward compatilibty).
A valid response is a text formatted in json, containing a bitcoin address with an optional label :
{
"error" : "",
"label" : "Bitcoin Contact",
"address" : "1NMxHnpAE38P9HN9pzRSqAFMCv1WcXZC1N"
}
GUI will propose you to add the returned address in your address book.
KISS !3. Usages examplesI've taken my own domain (bitcoin-contact.org) for the examples, because i need some working examples. To see how to add this in your website, see next part.
"Pay To" is the user input written in the "Pay To" field of the "Send Coins" GUI.
Domain name :Pay To : bitcoin-contact.org
Request :
http://bitcoin-contact.org/bitcoin-address.txtRequest result :
{
"error" : "",
"label" : "Bitcoin Contact",
"address" : "1NMxHnpAE38P9HN9pzRSqAFMCv1WcXZC1N"
}
Payment sent to : 1NMxHnpAE38P9HN9pzRSqAFMCv1WcXZC1N
Domain root url :Pay To :
http://bitcoin-contact.orgRequest :
http://bitcoin-contact.org/bitcoin-address.txtRequest result :
{
"error" : "",
"label" : "Bitcoin Contact",
"address" : "1NMxHnpAE38P9HN9pzRSqAFMCv1WcXZC1N"
}
Payment sent to : 1NMxHnpAE38P9HN9pzRSqAFMCv1WcXZC1N
Email :Pay To :
[email protected]Request :
http://bitcoin-contact.org/bitcoin-address-khal.txtRequest result :
{
"error" : "",
"label" : "Khalahan",
"address" : "1L5zqFahc8Ahu9wtgJqCeJMendvD174xsG"
}
Payment sent to : 1L5zqFahc8Ahu9wtgJqCeJMendvD174xsG
Pay To :
[email protected]Request :
http://bitcoin-contact.org/bitcoin-address-user.txtRequest result :
{
"error" : "Not a public address."
}
Payment sent to : If error field is not empty, bitcoin displays standard error "Invalid address".
Any other URL :Pay To :
http://bitcoin-contact.org/q/getaddress/[email protected]Request :
http://bitcoin-contact.org/q/getaddress/[email protected]Request result :
{
"error" : "",
"label" : "Khalahan",
"address" : "1L5zqFahc8Ahu9wtgJqCeJMendvD174xsG"
}
Payment sent to : 1L5zqFahc8Ahu9wtgJqCeJMendvD174xsG
You can give any url as long as it returns those json lines.4. How to add this to your websiteDefault address for your own domainCreate a file named "bitcoin-address.txt" at the root of your domain and remplace 111... chars with your address :
{
"error" : "",
"label" : "Label of your website, or email address for example",
"address" : "1111111111111111111111111111111111"
}
Email address for your own domainExample :
[email protected]Create a file named "bitcoin-address-mymail1.txt" at the root of your domain and remplace 111... chars with your bitcoin address :
{
"error" : "",
"label" : "Your email address or a label",
"address" : "1111111111111111111111111111111111"
}
Example :
[email protected]Create a file named "bitcoin-address-mymail2.txt" at the root of your domain and remplace 222... chars with your bitcoin address :
{
"error" : "",
"label" : "[email protected]",
"address" : "2222222222222222222222222222222222"
}
5. You have an email and don't own the domainExample :
[email protected] & address 11111111111111111111111111111
Register your email and bitcoin addresses to
http://bitcoin-contact.org/?account and set them public.
Then, give this url to your contacts :
http://bitcoin-contact.org/q/getaddress/[email protected]You can also register a pseudo on bitcoin-contact and use this directly :
[email protected]Note : you can also set the label to "
[email protected]" and people who use "
[email protected]" will receive a contact like that :
- label :
[email protected]- address : 11111111111111111111111111111