Bitcoin Forum
May 30, 2024, 07:51:26 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How do wallet balances handle scripts?  (Read 607 times)
Qwedcxza1 (OP)
Newbie
*
Offline Offline

Activity: 43
Merit: 0


View Profile
June 19, 2013, 10:17:39 AM
 #1

If you send a transaction with a script that restricts how it is spent then how do wallet balances handle this?

 If I am required to sign with the private key (which I have) but there is a requirement for some further information which the wallet has no way of knowing whether I have or not then will it show up as available to spend? Then later when I come to spend it I find out I can't if I don't have the information.
 Or will it not show up and I won't know I received it?

 Or am I not understanding something about how scripts work?

 Also I was looking for a good description of the mechanics of how wallets calculate and update the balances as I don't fully understand it. Is all the information from the database of UTXO's?
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
June 19, 2013, 01:12:03 PM
 #2

The real answer to your question is this:

Code:
if(isStandard() and isMine())
   balance += value

If the script does not match very simple (and small) set of standard scripts with known "unlock" conditions, then it's considered rogue and ignored by the wallet. 

If someone wants you to have money, they use a standard script.  If someone wants to play game, or you want to experiment with scripts, you'll have to write your own software to experiment with them, because all the existing software will just ignore it.

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!