Author

Topic: Is there a simple app to scan a QR and return a balance? (Read 3506 times)

legendary
Activity: 2506
Merit: 1010
wondering if there's a simple Android app that will scan a QR of the address and return the balance?

Here's a new one:

Bitcoin Balance Scanner
by Beyondem Inc.
 - https://play.google.com/store/apps/details?id=com.beyondem.bitcoinbalance
 - http://www.reddit.com/r/Bitcoin/comments/1k3ws2
member
Activity: 139
Merit: 37
casascius,

Here is your suggestion:
https://gist.github.com/3178816
/([1][123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{27,34})/

I have tried it with several strangely formulated QR codes and it seems to work well.  When a QR is not matched to the match expression, the app will just exit.

I'm uploading to Android Market (Google Play) now and it should be available within an hour.

Thanks again,
rasengan

edit: Hope this is what you meant. Wink
member
Activity: 139
Merit: 37
If using regex, then why not just use regex to snip out the first contiguous group of say 28-34 characters starting with '1' and the rest matching the base58 alphabet?  This would make it highly universal without adding any complexity.

Brilliant!  I will get on it in a few moments.  I have an appointment for a haircut real quick, and then I will change it as per your suggestion thereafter.

Thanks again, you always have the brightest ideas casascius.
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
If using regex, then why not just use regex to snip out the first contiguous group of say 28-34 characters starting with '1' and the rest matching the base58 alphabet?  This would make it highly universal without adding any complexity.
member
Activity: 139
Merit: 37
I haven't tested any of these apps, but wanted to make sure the apps were coded in such a way that they will resist a malicious QR code that contained a fully qualified URL that led to a fake website.

Example: I am an attacker, and I print a QR code on a note that encodes the following URL: http://my-nifty-attack-site.tk/address/128jxLBCaS1MZpCtXEzN8TmwcetBHibP9L

When browsed, the attack site shows a mockup of blockexplorer / blockchain.info that shows a big balance that is not really there, which allows me to deceive someone into thinking I paid them when I really haven't.

The app should never send the smartphone browser there, but instead be smart enough to strip the bitcoin address out, and formulate the correct complete URL on its own: e.g. http://blockchain.info/address/128jxLBCaS1MZpCtXEzN8TmwcetBHibP9L

Hi Mike

Hope you are doing well!  I am loving my casascius coins!

As of now, the way it works is as follows:
http://blockexplorer.com/address/(unescape(e.result).match(/([^\?]*)/)[1].replace("bitcoin:",""))

What this means is:
1. It is safe from the malicious attack that you have provided above in terms of http://my-nifty-attack...
2. However, it will only accept QR codes that have the following form:
128jxLBCaS1MZpCtXEzN8TmwcetBHibP9L
bitcoin:128jxLBCaS1MZpCtXEzN8TmwcetBHibP9L

As per Winterfrost:
I tested Bitcoin Balance on a random URL. It takes whatever you put and tacks it onto https://blockexplorer.com/address/. So if I read a QR code for http://google.com, then the app sends me to https://blockexplorer.com/address/http://google.com.

They will simply get some kind of 404 or Address not found I presume.  Please checkout that tiny snippet on GIST -- that is the entirety of what this is as I simply made this quickly in an effort to give back to the bitcoin community which I have really come to value greatly.  As Erik Voorhees had once mentioned, you guys (bitcoin community) are truly amazing.

With that said, if you think the reader needs to be able to read other types of addresses aside from the "#2" listed above, please let me know.

Cheers,
rasengan

full member
Activity: 727
Merit: 146
I haven't tested any of these apps, but wanted to make sure the apps were coded in such a way that they will resist a malicious QR code that contained a fully qualified URL that led to a fake website.

Example: I am an attacker, and I print a QR code on a note that encodes the following URL: http://my-nifty-attack-site.tk/address/128jxLBCaS1MZpCtXEzN8TmwcetBHibP9L

When browsed, the attack site shows a mockup of blockexplorer / blockchain.info that shows a big balance that is not really there, which allows me to deceive someone into thinking I paid them when I really haven't.

The app should never send the smartphone browser there, but instead be smart enough to strip the bitcoin address out, and formulate the correct complete URL on its own: e.g. http://blockchain.info/address/128jxLBCaS1MZpCtXEzN8TmwcetBHibP9L

I tested Bitcoin Balance on a random URL. It takes whatever you put and tacks it onto https://blockexplorer.com/address/. So if I read a QR code for http://google.com, then the app sends me to https://blockexplorer.com/address/http://google.com.
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
I haven't tested any of these apps, but wanted to make sure the apps were coded in such a way that they will resist a malicious QR code that contained a fully qualified URL that led to a fake website.

Example: I am an attacker, and I print a QR code on a note that encodes the following URL: http://my-nifty-attack-site.tk/address/128jxLBCaS1MZpCtXEzN8TmwcetBHibP9L

When browsed, the attack site shows a mockup of blockexplorer / blockchain.info that shows a big balance that is not really there, which allows me to deceive someone into thinking I paid them when I really haven't.

The app should never send the smartphone browser there, but instead be smart enough to strip the bitcoin address out, and formulate the correct complete URL on its own: e.g. http://blockchain.info/address/128jxLBCaS1MZpCtXEzN8TmwcetBHibP9L
member
Activity: 139
Merit: 37
Too cool for school, yo!

The name "Bitcoin Balance Checker" is ok I guess, but if asked I would have suggested:

"The Magic Computer Money Fancy Anonymous Cryptographic Coin Balance-Checker-Outer"


Haha - you can definitely rebuild/repackage the app and post it on the Google Play store with this name as well if you would like -- I like the name! :-)

sr. member
Activity: 364
Merit: 250
firstbits 1LoCBS
As per LoweryCBS and casascius requirements,

Here is a simple Bitcoin Balance checker which simply does as follows:
1. Scan QR Code - Must be of form bitcoin:
or

2. Forward to http://blockexplorer.com/address/


Google Play
https://play.google.com/store/apps/details?id=com.londontrustmedia.bitcoinbalance


It was built using Titanium Appcelerator for quickness and ease, and the snippet of code is available via GIST(github) at:
https://gist.github.com/3174001

You can also use this on iOS by building it yourself.  Please enjoy.

Too cool for school, yo!

The name "Bitcoin Balance Checker" is ok I guess, but if asked I would have suggested:

"The Magic Computer Money Fancy Anonymous Cryptographic Coin Balance-Checker-Outer"
member
Activity: 139
Merit: 37
legendary
Activity: 1372
Merit: 1008
1davout
member
Activity: 139
Merit: 37
As per LoweryCBS and casascius requirements,

Here is a simple Bitcoin Balance checker which simply does as follows:
1. Scan QR Code - Must be of form bitcoin:
or

2. Forward to http://blockexplorer.com/address/


Google Play
https://play.google.com/store/apps/details?id=com.londontrustmedia.bitcoinbalance


It was built using Titanium Appcelerator for quickness and ease, and the snippet of code is available via GIST(github) at:
https://gist.github.com/3174001

You can also use this on iOS by building it yourself.  Please enjoy.
donator
Activity: 1466
Merit: 1048
I outlived my lifetime membership:)
I have my addresses in an iOS app I wrote...it's simple, but it works for me. More info in my signature.
member
Activity: 98
Merit: 10
(:firstbits => "1mantis")
I have a bookmark in my blackberry that points to my cold storage address and gives me my balance in Satoshi. Yes. I am geeky like that and besides it makes me look like i have a 100 million more than I really do!
legendary
Activity: 2506
Merit: 1010
Napkin-backing some point-of-sale ideas, and wondering if there's a simple Android app that will scan a QR of the address and return the balance?

I asked essentially the same question and nobody had a solution so it probably doesn't yet exist.  But there is definitely a need for it.
 - http://bitcoin.stackexchange.com/q/4107/153
vip
Activity: 1386
Merit: 1140
The Casascius 1oz 10BTC Silver Round (w/ Gold B)
No, but such a thing should be simple to create and somebody should create it.  It could be created for iPhone without being a "bitcoin app", and would merely do the following:

1. scan QR code
2. extract bitcoin address out of it, removing any other URL components
3. direct the web browser to http://blockchain.info/address/ADDRESSGOESHERE

Any open-source QR code scanner could be modified to do such a thing and it would work great.
sr. member
Activity: 364
Merit: 250
firstbits 1LoCBS
Napkin-backing some point-of-sale ideas, and wondering if there's a simple Android app that will scan a QR of the address and return the balance?

Jump to: