Packetizer

Using WebFinger to Simplify Bitcoin Payments

September 28, 2013

For a number of years, users of Bitcoin have expressed a desire to use email addresses as a means of sending Bitcoin payments. The reason is that the typical bitcoin address looks like this: 17XoqvUCrf12H7Vc7c7uDxib8FDMXFx2p6. Trying to accurately convey that string of characters to somebody so they can enter it in manually is error prone. It's far simpler to request them to just send money to an address like paulej@packetizer.com.

Making bitcoin friendlier for the average person involves the use of WebFinger. WebFinger is a very light-weight protocol published by the IETF September 27, 2013 that allows one to map a URI (like an email-type address) to a set of other URIs. As a very simple example, this is a subset of what you get if you query my WebFinger server for paulej@packetizer.com:

$ curl https://packetizer.com/.well-known/webfinger?resource=acct:paulej@packetizer.com

{
  "subject" : "acct:paulej@packetizer.com",
  "aliases" :
  [
    "h323:paulej@packetizer.com"
  ],
  "properties" :
  {
    "http://packetizer.com/ns/name" : "Paul E. Jones",
    "http://packetizer.com/ns/name#zh-CN" : "保罗‧琼斯",
    "http://packetizer.com/ns/activated" : "2000-02-17T03:00:00Z"
  },
  "links" :
  [
    {
      "rel" : "http://webfinger.net/rel/avatar",
      "type" : "image/jpeg",
      "href" : "http://www.packetizer.com/people/paulej/images/paulej.jpg"
    },
    {
      "rel" : "http://webfinger.net/rel/profile-page",
      "type" : "text/html",
      "href" : "http://www.packetizer.com/people/paulej/"
    },
    {
      "rel" : "http://packetizer.com/rel/blog",
      "type" : "text/html",
      "href" : "http://www.packetizer.com/people/paulej/blog/",
      "titles" :
      {
        "en-us" : "Paul E. Jones' Blog"
      }
    },
    {
      "rel" : "http://schemas.google.com/g/2010#updates-from",
      "type" : "application/atom+xml",
      "href" : "http://www.packetizer.com/people/paulej/blog/blog.xml"
    },
    {
      "rel" : "http://bitcoin.org/rel/address",
      "href" : "bitcoin:17XoqvUCrf12H7Vc7c7uDxib8FDMXFx2p6"
    }
  ]
}

What you see in the output is a set of link relation types and links. The last one on the page is a bitcoin address. Bitcoin wallet software could issue a query to my WebFinger server and receive this address and use it. It’s that simple.

What's presently shown in my example is static, but it would not have to be. For example, if I used blockchain.info as my wallet, I might put something like this into WebFinger:

{
  "rel" : "http://bitcoin.org/rel/payments",
  "href" : "bitcoin:17XoqvUCrf12H7Vc7c7uDxib8FDMXFx2p6?
           request=https%3A%2F%2Fblockchain.info%2Fr%3Fid%3Dpaulej"
}

Now, when the user enters my email address, they basically get back a payment API address. I would assume the subsequent query the wallet makes to blockchain.info would contain the actual PaymentRequest message as per BIP70 (versus the static 17XoqvUCrf12H7Vc7c7uDxib8FDMXFx2p6).

To make things even simpler, we just do this:

{
  "rel" : "http://bitcoin.org/rel/payments",
  "href" : "https://secure.packetizer.com/bitcoin_address/?account=paulej"
}

Note that if you do a GET on that URI on my server as of this writing, you get get a bitcoin address. I have not actually implemented BIP70.

None of these procedures have been adopted by the Bitcoin community, yet, but it does highlight simple and secure ways of conveying addresses that are less prone to error and use the familiar e-mail address.

Click here to view the main blog page.

Paul E. Jones

About Me
My Blog ATOM Feed

Contact

Email Me
Telegram
XMPP

Social Media

LinkedIn
𝕏