Bitcoin Forum
September 28, 2016, 10:16:55 AM *
News: Latest stable version of Bitcoin Core: 0.13.0 (New!) [Torrent]. Make sure you verify it.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Bitcoin Payment Request mime type (instead of bitcoin:URI)  (Read 3319 times)
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
September 17, 2010, 06:16:14 PM
 #1

The bitoin URI thread has died down, but bitcoinmarket and MtGox's spiffy "click to pay" features prompted me to think some more about payment links on web pages.

The problem with the MtGox/Bitcoinmarket solutions is that they still require you to copy&paste an address if you want to pay directly from the bitcoin client running on your machine.  My computer-phobic relatives just won't be able to do that (I can hear them saying "...BUT I DON'T HAVE A COPY BUTTON...").

But a bitcoin: URI has problems, too:
 1. It is hard to implement-- every browser has a different way of registering protocol handlers.
 2. If you don't have the protocol handler installed, clicking on the link doesn't give you any help on what to do to make it work.  (try it here)
 3. Looks like some software (like this forum) don't like bitcoin URIs: Donate to the Faucet (that URI is bitcoin:15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC, the forum software is truncating it and adding http://).

Maybe a bitcoin payment request MIME type would work better; you click on a link and the web server returns a little file of type "application/bitcoin-payment-request".  Like this. Or the links on this page.

If you're running Firefox, you get this dialog box if it doesn't know about application/bitcoin-payment-requests:


On PCs, an app can add stuff to the registry to associate itself with a mime type (anybody know if browsers other than IE pay attention to those registry settings?).

Macs are similar (although I don't know the details; gotta set the mime type in the App's Info.plist, I believe...).  Anybody know about Linux?

Teaching the Bitcoin application to read the bitcoin-payment-request file would be easy, and it shouldn't be terribly hard to get it to ask an already-running Bitcoin to popup a "Send Payment To..." dialog box with fields filled in (OR get it to start itself running and then popup the dialog box).

So: whaddya think?

How often do you get the chance to work on a potentially world-changing project?
1475057815
Hero Member
*
Offline Offline

Posts: 1475057815

View Profile Personal Message (Offline)

Ignore
1475057815
Reply with quote  #2

1475057815
Report to moderator
1475057815
Hero Member
*
Offline Offline

Posts: 1475057815

View Profile Personal Message (Offline)

Ignore
1475057815
Reply with quote  #2

1475057815
Report to moderator
1475057815
Hero Member
*
Offline Offline

Posts: 1475057815

View Profile Personal Message (Offline)

Ignore
1475057815
Reply with quote  #2

1475057815
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1475057815
Hero Member
*
Offline Offline

Posts: 1475057815

View Profile Personal Message (Offline)

Ignore
1475057815
Reply with quote  #2

1475057815
Report to moderator
1475057815
Hero Member
*
Offline Offline

Posts: 1475057815

View Profile Personal Message (Offline)

Ignore
1475057815
Reply with quote  #2

1475057815
Report to moderator
1475057815
Hero Member
*
Offline Offline

Posts: 1475057815

View Profile Personal Message (Offline)

Ignore
1475057815
Reply with quote  #2

1475057815
Report to moderator
hippich
Hero Member
*****
Offline Offline

Activity: 546


View Profile
September 17, 2010, 07:16:59 PM
 #2

good idea IMHO. Another MHO - format for this payment request file should be in XML (or JSON?) for both debugging purposes and extensibility.


nimnul
Sr. Member
****
Offline Offline

Activity: 255


View Profile WWW
September 18, 2010, 03:50:49 PM
 #3

Yet another idea is http://localhost:48321/?to=1e394893roewjrk&amount=3009.00 (it is actually used by one of WebMoney clients)

But it's hard to implement securely

mizerydearia
Hero Member
*****
Offline Offline

Activity: 574



View Profile
September 18, 2010, 05:24:26 PM
 #4

A user can manually associate an application with a mime type: http://support.mozilla.com/en-US/kb/Options+window+-+Applications+panel?style_mode=inproduct&as=u

However, I am uncertain how a linux application can pre-install mime types to be handled by firefox or other browsers such as konqueror, chromium, galeon, seamonkey, midori, opera, etc.

It will be nice when a user can click to confirm a transaction using Bitcoin as payment method and then to trigger bitcoin client to present the user with a dialog to confirm sending a specific bitcoin amount to a specific address; two clicks.
nimnul
Sr. Member
****
Offline Offline

Activity: 255


View Profile WWW
September 19, 2010, 09:05:13 PM
 #5

Yet another solution is clipboard monitoring. E.g. pop up when client copies "Send XXX bitcoins to 1e30430430843989UIURIUE".

LZ
Staff
Legendary
*
Offline Offline

Activity: 1470


Satoshi everywhere!


View Profile WWW
September 20, 2010, 03:34:59 AM
 #6

Clipboard monitoring? If a browser plugin/extension will do it - then ok, but if a client - so it is bad idea.

"Never invest unless you can afford to lose your entire investment." © S3052
mizerydearia
Hero Member
*****
Offline Offline

Activity: 574



View Profile
September 20, 2010, 11:58:11 AM
 #7

Yet another solution is clipboard monitoring. E.g. pop up when client copies "Send XXX bitcoins to 1e30430430843989UIURIUE".

That may be difficult to implement across variety of operating systems, especially if Bitcoin client were to be implemented on portable devices.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652


Chief Scientist


View Profile WWW
September 20, 2010, 12:41:33 PM
 #8

RE: hippich XML/JSON:
XML ain't gonna happen, and I think JSON is overkill for this.  Using the same format as the bitcoin.conf file is the right answer, I think (easy to implement, human-readable, comments allowed in the file, easy to extend as necessary).  That's what I mocked up at skypaint.com.

RE: nimnul http://localhost:.../
If you've never installed bitcoin, or bitcoin isn't running already, you get an unhelpful error message.  One advantage of a "payment request file" is many users will understand that you need something called "Bitcoin" to open a "Bitcoin Payment Request" file.

RE: mizerydearia Linux support:
In my research I briefly an across a reference to a KDE startup file to associate mime types with applications, so I think it would work nicely cross-platform if you've already installed bitcoin. (UPDATE: cross-desktop spec here)

RE: nimnul clipboard monitoring:
Seems to me that's a feature for geeks, because only geeks would happen to know that if you highlight a bitcoin address when bitcoin was running you could automatically launch bitcoin.  And there's no way that would be turned on by default.  And it also seems to me clipboard monitoring is perfect for a standalone, general-purpose utility ("if selection matches any of THESE regepxs, launch THAT applications with arguments "beginpayment %{address} %{amount}" ... ).

RE: mizerydearia portable devices:
I've never programmed for Android or iPhone; anybody know how they handle non-standard MIME types?  Can apps register themselves as content handlers?



Thinking about actually implementing this, the hard part is getting a running (or just launched) Bitcoin's attention in a cross-platform way.  Using the existing command-line control (which uses JSON-RPC under the covers) would be the most straightforward, but that requires that you set a rpcuser/rpcpassword in the bitcoin.conf file AND run bitcoind or bitcoin -server.  Yuck.

I suppose, as a special case, payment request JSON-RPC calls could be allowed with no rpcpassword, and -server could be made the default.  Makes me a little nervous, though.

Running  bitcoin /path/to/browser/cache/with/payment_request_file  (which is what the web browsers will do) should:
 IF bitcoin isn't running:  launch it, and wait until it is ready to receive payment request messages
 Send running bitcoin (...somehow...) "Hey, we got a payment request here for you to deal with" messgae.

How often do you get the chance to work on a potentially world-changing project?
mizerydearia
Hero Member
*****
Offline Offline

Activity: 574



View Profile
September 20, 2010, 02:40:15 PM
 #9

Quote
<necrodearia> If I want to create a new mimetype to be handled by a cross-platform application that I am writing and to work across a variety of linux desktop environments, where would be a good place to start learning?
<roxxo> necrodearia: maybe the XDG specification?
<loomsen> necrodearia: freedesktop.org maybe
Geremia
Sr. Member
****
Offline Offline

Activity: 445


View Profile WWW
April 25, 2013, 09:27:57 PM
 #10

that URI is bitcoin:15VjRaDX9zpbA8LVnbrCAFzrVzN7ixHNsC, the forum software is truncating it and adding http://
Not if you leave out quotes, so NOT this:
Code:
[url="bitcoin:<address>"]<address>[/url]
but this:
Code:
[url=bitcoin:<address>]<address>[/url]

BTC tip jar | my BTC wiki, BTC StackExchange, Twister posts, & Keybase pages | Tox ID: 65C3E8810738AD9D175234808FCB317A1103632903436203D45411AE97C03F547D390A76B3CF
Join Coinbase. | The best, free book on Bitcoin: Mastering Bitcoin
Nos cum prole pia benedicat Virgo Maria.
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!