Pages:
Author

Topic: Request: Let's support "bitcoin:" URLs! (Read 3938 times)

legendary
Activity: 1102
Merit: 1014
May 03, 2012, 10:55:04 AM
#26
@ Weex

Armory is choking on the URLs on CoinDL, because of the colon in the the label field:

bitcoin:16xPh78TNANC6YB1XZksWyCGqhcMFnDXZ9?amount=1.959&label=CoinDL:Alco

I don't know if Armory should be able to handle it, but ':' is on the "reserved characters" list,  So you should replace it with %3A.  

The only important feature of the percent-encoding scheme is that the following characters are reserved "%!*'();:@&=+$,/?#[] ", and should simply be replaced with their ASCII code in hex.  


@etotheipi,

The colon is now %3A and the rest of the item name is escaped. I also made the link open in a new tab. In testing while logged into Blockchain.info, it actually didn't do what I wanted but I suppose that's due to some quirk in how their handler works on gnu/linux or in expecting something specific in the URL. You may need to do a Ctrl-F5 to refresh the javascript if you want to test it now.

-weex
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
@ Weex

Armory is choking on the URLs on CoinDL, because of the colon in the the label field:

bitcoin:16xPh78TNANC6YB1XZksWyCGqhcMFnDXZ9?amount=1.959&label=CoinDL:Alco

I don't know if Armory should be able to handle it, but ':' is on the "reserved characters" list,  So you should replace it with %3A.  

The only important feature of the percent-encoding scheme is that the following characters are reserved "%!*'();:@&=+$,/?#[] ", and should simply be replaced with their ASCII code in hex.  
hero member
Activity: 742
Merit: 500
none of the clients, really? Electrum and Multibit have been supporting bitcoin: URIs for months...

Thanks for letting me know, the URI will be added to our invoice page with our next site update.

We took it off because it would open a new browser tab with an error for 95% of the users, and it caused more confusion than anything.  But it is a great tool to have once the clients support it!

legendary
Activity: 1428
Merit: 1093
Core Armory Developer
@etotheipi

Re: label v message

At the moment MultiBit parses both the label and message but only puts the label on the display and in the address book. I could not quite see the distinction between the two so did not want to put two fields in the Send/ Request forms one label and the other message as it would be confusing.

I have not seen the message field being used yet.

So I have been putting the "label" next to the address i.e. "1ArmoryXcfqj3f9dsjfkslWjZej  (Armory Donation Address)" and the message in the transaction comment field i.e. "Donation to receive Encryption Seminar".  But it sounds like I'm going to have to forego that in Armory...  instead put the label into the tx-comment field, and append the message to it if there is one.

Gah.  I don't like it.  But life could be worse Smiley
legendary
Activity: 1708
Merit: 1066
@etotheipi

Re: label v message

At the moment MultiBit parses both the label and message but only puts the label on the display and in the address book. I could not quite see the distinction between the two so did not want to put two fields in the Send/ Request forms one label and the other message as it would be confusing.

I have not seen the message field being used yet.
legendary
Activity: 1400
Merit: 1005
Awesome - I'm all for it!

I think websites will initially need to clarify what the link is for, and how it needs to be utilized.  On a computer without Armory installed, clicking on a bitcoin URL just opens a blank tab.  This would confuse anyone who didn't realize what it was or was supposed to do.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
On the issue of label vs label+message I think I'll stick with the label for now. It's a pretty minor aspect as far as ux goes but adjustments can be made later if users can benefit from some additional messaging.

I'll pester the devs on the mailing list about it.  I think it definitely makes sense to have both, but I'm guessing they didn't do it that way. 

The label-only thing sounds good -- I would prefix the labels with "CoinDL%3A%20" ("CoinDL: ") and then put the purchase after it.  It'll show up fine in Armory like that, just a slightly sub-optimal Smiley

I guess I should also pester them about URL-registration, in general. 
legendary
Activity: 1102
Merit: 1014
On the issue of label vs label+message I think I'll stick with the label for now. It's a pretty minor aspect as far as ux goes but adjustments can be made later if users can benefit from some additional messaging.
legendary
Activity: 1190
Merit: 1000
www.bitcointrading.com
That is awesome, bitcoin totally deserves it's own link type.  With tools like these, future newbies to the currency will be able to use bitcoin just as easy as learning email! Smiley
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
etotheipi,

From https://en.bitcoin.it/wiki/URI_Scheme
Quote
Query Keys

    label: Label for that address (e.g. name of receiver)
    address: bitcoin address
    message: message that shown to the user after scanning the QR code
    size: amount of base bitcoin units (see below)
    send: used to send bitcoin, rather than to request them
    (others): optional, for future extensions

I take this to mean the label: should be "CoinDL" and the message: should be something like "Purchase of Alco (https://www.coindl.com/page/item/127)". Does this interpretation seem correct? Is there another more definitive standard document on this?

-weex


That's actually the wrong document (that's BIP 20), which was ultimately replaced by BIP 21.  But BIP 21 doesn't say much else beyond that.  

The issue is that Bitcoin-Qt only uses labels.  The above suggests that "Message" is only for showing when the user clicks/reads the URL, but that Bitcoin-Qt may not save that information anywhere in the wallet.  It might be better just to put all of it into the label.  This is frustrating, because it makes more sense (to me) to use it as I described it and implemented it in Armory, but it may not achieve the desired result with Bitcoin-Qt.  

How does Multibit and Electrum deal with "label=" and "message=" fields?
legendary
Activity: 1102
Merit: 1014
etotheipi,

From https://en.bitcoin.it/wiki/URI_Scheme
Quote
Query Keys

    label: Label for that address (e.g. name of receiver)
    address: bitcoin address
    message: message that shown to the user after scanning the QR code
    size: amount of base bitcoin units (see below)
    send: used to send bitcoin, rather than to request them
    (others): optional, for future extensions

I take this to mean the label: should be "CoinDL" and the message: should be something like "Purchase of Alco (https://www.coindl.com/page/item/127)". Does this interpretation seem correct? Is there another more definitive standard document on this?

-weex

legendary
Activity: 1428
Merit: 1093
Core Armory Developer
I've updated CoinDL QR codes and added a Buy Now button that points to the URI. Looking forward to seeing many more sites accepting these links!

Hey Weex,

That's great.  Just one recommendation.  I believe that we should use the "Label" field to mark the address, and "Message" to mark the transaction.  At least that's how I do it in Armory:  The "label=" is what shows up when you're looking through your address book, but the "message=" is what shows up when looking at your transaction history.  For the case that every tx uses a different address, I don't think it matters too much.  But it's a distinction that might be worth mentioning (notice my original example where I use both), or at least someone can correct me if they think I have it wrong.

Also, you can put spaces and other special chars in the URL using percent encoding.  Use %20 for spaces, %28 and %29 for left and right parentheses, etc.  I'll add that link to the original post.  And add a link in the Technical forums for the Registry settings I mentioned above.
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
Does Bitcoin-Qt support the URLs?  I thought they did, but I haven't seen any evidence of it.  I think we should encourage the devs to step up support for it because Bitcoin-Qt is still used by most users and it's really not hard.

I recently figured out how to do it reliably and responsibly through non-admin-modifications of user-registry settings.  Much the same way that Firefox/IE/Chrome check and modify on load for "http://" links.    It seems that all they would have to do is check the registry settings for it on load and request to change it if some other app is currently set.  

Well, that's all I did in Armory, but of course everything is always easy in python Smiley  ("import _winreg")  
legendary
Activity: 1102
Merit: 1014
I've updated CoinDL QR codes and added a Buy Now button that points to the URI. Looking forward to seeing many more sites accepting these links!
donator
Activity: 640
Merit: 500
I have tried to implement this the best way I could think of into Laybit as a form of fallback if the user doesn't have JavaScript enabled.

http://bitcoinmedia.com/laybit-donation-buttons/

It is in fact a most awesome way for payment "links"
Jan
legendary
Activity: 1043
Merit: 1002
...
Here is the Bitcoin URI Spec and below is a simple example of how you would include it (using my donation address, of course!)

Code:

Just do it!
...
+1
This is an important part of making payment easy.
On a side note, the Blockchain app for iPhone uses this format "bitcoin://....". I am considering to let BitcoinSpinner accept it, but I'd prefer if we can just use the standatd. Piuk, please fix this.
hero member
Activity: 523
Merit: 500
I'm totally into doing this for CoinDL. I've just done a little survey of mobile apps and it appears almost all have Bitcoin URI support. So expect the QR code to be updated and a link as well.

Thanks etotheipi for the initiative and for highlighting an opportunity to again move toward the goal of making Bitcoin easy!

Great one problem with using your site from a mobile is that the QR code, does not center on the screen and becomes very tiny.
legendary
Activity: 1896
Merit: 1353
We did have a clickable link as well, but none of the clients supported it, so we took it off.  Now that Armory does, we will make sure this gets added back to the site with the next update.

none of the clients, really? Electrum and Multibit have been supporting bitcoin: URIs for months...
legendary
Activity: 1102
Merit: 1014
I'm totally into doing this for CoinDL. I've just done a little survey of mobile apps and it appears almost all have Bitcoin URI support. So expect the QR code to be updated and a link as well.

Thanks etotheipi for the initiative and for highlighting an opportunity to again move toward the goal of making Bitcoin easy!
legendary
Activity: 1428
Merit: 1093
Core Armory Developer
one small issue i see is that having the full bitcoin address as clickable, will make it harder to copy+paste if that's what is needed.

better to have the address in plain text, and then a link next to it.


Agreed.  It's not necessary to have it as one/only object.  But there's plenty of space on these forms/windows/boxes to add a link for convenience for us users that do have supporting clients.
Pages:
Jump to: