Add Electrum SPV client and address listener
Minimal Electrum protocol client (client.py) plus a scripthash subscription listener (listener.py) that watches user deposit addresses for confirmed UTXOs, with the address->scripthash conversion helper and a manual smoke-test script against the dev bootstrap server. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f1261584ff
commit
a21e058cdd
7 files changed
+353
No files matched your search
@@ -0,0 +1,9 @@
|
||||
from app.electrum.scripthash import address_to_scripthash
|
||||
|
||||
|
||||
def test_matches_known_mainnet_vector():
|
||||
# Ground truth: scriptPubKey "0014a195473740aea3b4df1690fbdcb51243fe4e7a20" of a real
|
||||
# confirmed mainnet output to this address (txid 1ebd0219...b0d48a, vout 1), cross-checked
|
||||
# against the Electrum server's own listunspent for this scripthash.
|
||||
address = "plm1q5x25wd6q463mfhckjraaedgjg0lyu73qfcj43n"
|
||||
assert address_to_scripthash(address) == "5b7744e34b1d6ee3ae6eef7e1ce82aa4c28ff13f10d4aa905640c722c9249111"
|
||||
Reference in new issue
Block a user