Author

Topic: can i programmatically find out whether this phone has N bitcoins on its wallet? (Read 558 times)

newbie
Activity: 12
Merit: 1
many thanks guys!

John, Kimbrough Software
staff
Activity: 3458
Merit: 6793
Just writing some code
by "sign up to" i mean the wallet developer decides at design time to implement BIP20 - this functionality is already there in some wallets.  they've signed up to implementing and responding to this kind of protocol message.
Nearly all wallets implement the BIP 21 (note not 20, 20 was replaced by 21) URI Scheme. Most (but not all) wallets support the BIP 70 Payment Protocol. However there is no such standard for a wallet to announce its balance, and nor should there be any such protocol.

For whatever you want to do, just create the BIP 21 URI and when the user clicks on the link, the wallet should open and automatically fill in the necessary send parameters as specified by your URI.
newbie
Activity: 12
Merit: 1
by "sign up to" i mean the wallet developer decides at design time to implement BIP20 - this functionality is already there in some wallets.  they've signed up to implementing and responding to this kind of protocol message.

Does anyone have any other thoughts on the matter?

thanks,
John
Kimbrough Software
staff
Activity: 3458
Merit: 6793
Just writing some code
I guess I'm asking if this exists implicitly or explicitly in the bip20 / bip 70 / a.n. other protocol which wallets sign up to? 
Wallets don't sign up to anything, that is not how it works. For the payment protocol to work you need to have the users click on a link. The person creating that payment request has no idea how much money the payer has. The amount is whatever the requester sets.

By the way, which wallets allow this kind of query? 
AFAIK, no wallet allows this.
newbie
Activity: 12
Merit: 1
I guess I'm asking if this exists implicitly or explicitly in the bip20 / bip 70 / a.n. other protocol which wallets sign up to?  By the way, which wallets allow this kind of query? 
staff
Activity: 3458
Merit: 6793
Just writing some code
It depends on the wallet if it has the functionality to make available this information to other apps.
newbie
Activity: 12
Merit: 1
the use case is: i have a bitcoin-aware app A on an andriod phone, which would then like to trigger a bitcoin payment request to be executed by an on-phone bitcoin wallet via the BIB20/bitcoin: URI mechanism. Rather than generating the payment request directly and immediately for an arbitrary amount of bitcoin, is there a way to in effect ask the bitcoin wallet if it has at least N bitcoins in it first?
Jump to: