本文整理汇总了Python中electrum_ltc.Wallet.create_watching_only_wallet方法的典型用法代码示例。如果您正苦于以下问题:Python Wallet.create_watching_only_wallet方法的具体用法?Python Wallet.create_watching_only_wallet怎么用?Python Wallet.create_watching_only_wallet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类electrum_ltc.Wallet
的用法示例。
在下文中一共展示了Wallet.create_watching_only_wallet方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: check_create_table
# 需要导入模块: from electrum_ltc import Wallet [as 别名]
# 或者: from electrum_ltc.Wallet import create_watching_only_wallet [as 别名]
conn = sqlite3.connect(database);
# create table if needed
check_create_table(conn)
# init network
config = SimpleConfig({'wallet_path':wallet_path})
network = Network(config)
network.start(wait=True)
# create watching_only wallet
storage = WalletStorage(config)
wallet = Wallet(storage)
if not storage.file_exists:
wallet.seed = ''
wallet.create_watching_only_wallet(master_public_key,master_chain)
wallet.synchronize = lambda: None # prevent address creation by the wallet
wallet.start_threads(network)
network.register_callback('updated', on_wallet_update)
out_queue = Queue.Queue()
thread.start_new_thread(server_thread, (conn,))
while not stopping:
cur = conn.cursor()
# read pending requests from table
cur.execute("SELECT address, amount, confirmations FROM electrum_payments WHERE paid IS NULL;")
data = cur.fetchall()