Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Luke-Jr on October 05, 2011, 04:03:18 PM



Title: Bitcoin-Qt handling of non-BTC bitcoin: URIs
Post by: Luke-Jr on October 05, 2011, 04:03:18 PM
Per the old bitcoin: URI scheme (https://en.bitcoin.it/wiki/URI_Scheme), amounts should specify a unit. The current implementation of bitcoin-qt, however, only correctly handles amounts as BTC without a unit. What would be the ideal behaviour, in the community consensus, when encountering a URI that does specify a unit? (recall that the user opening these URIs is not the same person who created them)

Example URIs with units:
  • bitcoin:13zwAvAdFWC9hPPKPbuSRo3AQDSDpvQZVr?amount=5x8 (5 BTC)
  • bitcoin:13zwAvAdFWC9hPPKPbuSRo3AQDSDpvQZVr?amount=5x5 (5 mBTC)
  • bitcoin:13zwAvAdFWC9hPPKPbuSRo3AQDSDpvQZVr?amount=5x2 (5 μBTC)
  • bitcoin:13zwAvAdFWC9hPPKPbuSRo3AQDSDpvQZVr?amount=x8x4 (8 TBC)
  • bitcoin:13zwAvAdFWC9hPPKPbuSRo3AQDSDpvQZVr?amount=x8x8 (8 ᵇTBC)


Title: Re: Bitcoin-Qt handling of non-BTC bitcoin: URIs
Post by: Stephen Gornick on October 05, 2011, 05:50:19 PM
Per the old bitcoin: URI scheme (https://en.bitcoin.it/wiki/URI_Scheme), amounts should specify a unit. The current implementation of bitcoin-qt, however, only correctly handles amounts as BTC without a unit. What would be the ideal behaviour, in the community consensus, when encountering a URI that does specify a unit?

Previously I had suggested a units=  (e.g., units=mbtc), but there were reasonable arguments as to why that was not a good solution:
 - http://bitcointalk.org/index.php?topic=6206.msg91910#msg91910


Title: Re: Bitcoin-Qt handling of non-BTC bitcoin: URIs
Post by: Luke-Jr on October 05, 2011, 06:02:02 PM
Per the old bitcoin: URI scheme (https://en.bitcoin.it/wiki/URI_Scheme), amounts should specify a unit. The current implementation of bitcoin-qt, however, only correctly handles amounts as BTC without a unit. What would be the ideal behaviour, in the community consensus, when encountering a URI that does specify a unit?

Previously I had suggested a units=  (e.g., units=mbtc), but there were reasonable arguments as to why that was not a good solution:
 - http://bitcointalk.org/index.php?topic=6206.msg91910#msg91910
Yes, that's why the URIs specify the units in a descriptive form rather than symbolic. ;)