Library for building Python applications that integrate with Watchtower.cash
Project description
watchtower-cash-py
Library for building Python applications that integrate with Watchtower.cash
Install
pip install watchtower-cash-py
Subscribe an Address
For Watchtower to keep watch of the transactions of an address, it needs to be subscribed. A convenient function is included here to subscribe an address.
import watchtower
# Subscribe function accepts either BCH or SLP address
address_index = 0
data = {
'addresses': {
'receiving': 'simpleledger:qqz95enwd6qdcy5wnf05hp590sjjknwfuq8sjhpv6x', # Receiving addresses generated from 0/address_index
'change': 'simpleledger:qr0rfdmntpdxn6le5ua7pc8v256n8vtj0u65c929le' # Change addresses generated from 1/address_index
},
'project_id': '0000-0000-0000', # <-- Generate this ID by creating a project at Watchtower.cash
'wallet_hash': 'abcd0123456', # <-- (Optional) You generate this to track which HD wallet the address belongs to
'address_index': address_index, # <-- (Optional) The index used to generate the addresses from HD wallet
'webhook_url': 'https://xxx.com/webhook-call-receiver' # <-- (Optional) Your webhook receiver URL
}
result = watchtower.subscribe(**data)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for watchtower_cash_py-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 325c800719e3eee0b5f70df420ed970787d8cb828763efe0de9f97463a8e240f |
|
MD5 | 3c5ec17af0a61c335091f1ced76f1fd9 |
|
BLAKE2b-256 | 8b9482ab0525656a10c24ebd34fba23c5b11be07ee63285622295c7355447584 |