Super fast C++ payment_history (not working with mempool yet)
[electrum-server.git] / backends / libbitcoin / history1 / __init__.py
1 import _history
2 from bitcoin import bind, _1, _2
3 import json
4
5 def wrap_finish(handle_finish, ec, result_json):
6     handle_finish(ec, json.loads(result_json))
7
8 def payment_history(service, chain, txpool, address, finish):
9     _history.payment_history(service.internal_ptr, chain.internal_ptr,
10                              txpool.internal_ptr, address,
11                              bind(wrap_finish, finish, _1, _2))
12