Esempio n. 1
0
async def f():
    try:
        sh = bitcoin.address_to_scripthash(addr)
        hist = await network.get_history_for_scripthash(sh)
        print_msg(json_encode(hist))
    finally:
        stopping_fut.set_result(1)
Esempio n. 2
0
async def f():
    try:
        sh = bitcoin.address_to_scripthash(addr)
        hist = await network.get_history_for_scripthash(sh)
        print_msg(json_encode(hist))
    finally:
        stopping_fut.set_result(1)
Esempio n. 3
0
 def test_address_to_scripthash(self):
     for priv_details in self.priv_pub_addr:
         sh = address_to_scripthash(priv_details['address'])
         self.assertEqual(priv_details['scripthash'], sh)
Esempio n. 4
0
 def test_address_to_scripthash(self):
     for priv_details in self.priv_pub_addr:
         sh = address_to_scripthash(priv_details['address'])
         self.assertEqual(priv_details['scripthash'], sh)
Esempio n. 5
0
#!/usr/bin/env python3

import sys
from .. import Network
from electrum_ltc.util import json_encode, print_msg
from electrum_ltc import bitcoin

try:
    addr = sys.argv[1]
except Exception:
    print("usage: get_history <litecoin_address>")
    sys.exit(1)

n = Network()
n.start()
_hash = bitcoin.address_to_scripthash(addr)
h = n.get_history_for_scripthash(_hash)
print_msg(json_encode(h))