Bitcoin Forum

Bitcoin => Electrum => Topic started by: trepidant on April 29, 2015, 08:26:00 PM



Title: watch_address - response
Post by: trepidant on April 29, 2015, 08:26:00 PM
Hello it seems that the scripts have not been updated in a while as the ones I tested return errors.

Anyway, the script I want to use is the watch_address one , so I start it up and on an update it returns a 64-length string. I looked up the string on block explorers and found nothing also tried to decode it in various ways.

What does this string mean?
ex - 4952fff4bfec7ff92ac25218d467edfb4e1915e80c6ab962276a5395c1a2f8b6
How can I properly decode this into a txid or something I can use.

I tried to look into the electrum-server source code to find the answer but honestly got a little lost in the code.


Title: Re: watch_address - response
Post by: btchris on April 29, 2015, 10:50:01 PM
What does this string mean?
ex - 4952fff4bfec7ff92ac25218d467edfb4e1915e80c6ab962276a5395c1a2f8b6
How can I properly decode this into a txid or something I can use.

When an update occurs, the result is a hash of the entire tx history.

To determine what changed, you need to do a get_history.

The idea is that wallet software can cache the result from watch_address, and only issue a get_history when the hash changes.