ScopeLift / kaspa-wallet

👝 A web wallet for the Kaspa blockchain network
4 stars 2 forks source link

wallet should store utxo reference set #9

Closed wildmolasses closed 4 years ago

wildmolasses commented 4 years ago

c.f. the bitcoin book:

When we say that a user’s wallet has "received" bitcoin, what we mean is that the wallet has detected an UTXO that can be spent with one of the keys controlled by that wallet. Thus, a user’s bitcoin "balance" is the sum of all UTXO that user’s wallet can spend and which may be scattered among hundreds of transactions and hundreds of blocks. The concept of a balance is created by the wallet application. The wallet calculates the user’s balance by scanning the blockchain and aggregating the value of any UTXO the wallet can spend with the keys it controls. Most wallets maintain a database or use a database service to store a quick reference set of all the UTXO they can spend with the keys they control.