Skip to main content

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

watchtower-cash-py-0.1.7.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

watchtower_cash_py-0.1.7-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file watchtower-cash-py-0.1.7.tar.gz.

File metadata

  • Download URL: watchtower-cash-py-0.1.7.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for watchtower-cash-py-0.1.7.tar.gz
Algorithm Hash digest
SHA256 0105c502d975cbfb8b8202f017b62791da5266956726be46f6caed4a9b088c96
MD5 c7ae406f838ce8c7e2a2d7d8c2ee95ae
BLAKE2b-256 e86b4cd891f6e897a271f5a08716b5aac5f7dcddb4f3abe00ab7620973708659

See more details on using hashes here.

File details

Details for the file watchtower_cash_py-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: watchtower_cash_py-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for watchtower_cash_py-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 75cc02e4bb5996c876bca917825277a3b1354ddf0b869e83013d193bb08a68fa
MD5 7090294e40ed0fb128448056f465f583
BLAKE2b-256 217459746decede422ec44b97c3a57d6ba275abb39f875d8ded9a5b4469782ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page