Skip to main content

zycoin

Python client library for BitcoinZ and related Zcoin-family blockchain networks.

This package exposes lightweight async clients for Electrum and Bitcore-compatible APIs, plus wallet, key, and transaction helpers used to interact with BitcoinZ networks. It is designed for developers who want to query blockchain data, monitor address activity, broadcast transactions, or build wallet tooling around the BTCZ ecosystem.

Features

  • Async connection management for Electrum servers and Bitcore APIs
  • Address, transaction, balance, mempool, and UTXO queries
  • Header and address subscription support
  • Support for BitcoinZ, Zero, Zclassic, and Flux networks
  • Wallet/key primitives and mnemonic support
  • Simple client manager for registering and managing multiple coins

Installation

pip install zycoin

Quick start

import asyncio
from zycoin.manager import ClientManager

async def on_status(status):
    print("status:", status)

async def on_notification(message):
    print("notification:", message)

async def main():
    manager = ClientManager()
    manager.on_status = on_status
    manager.on_block_events = on_notification
    

    client = manager.add("btcz", "bitcore")
    await manager.connect("btcz")

    await client.subscribe_address("t1Rci9gRmkJZ22vH7dToFe2Up6TpZypgimH")
    print(await client.get_balance("t1Rci9gRmkJZ22vH7dToFe2Up6TpZypgimH"))

    await manager.disconnect("btcz")

asyncio.run(main())

Using the Electrum client directly

import asyncio
from zycoin.constants import BitcoinZ
from zycoin.clients import ElectrumClient

async def main():
    client = ElectrumClient(BitcoinZ, protocol="ssl")
    client.on_status = lambda status: print("status:", status)

    await client.connect()
    print(await client.server_version())
    print(await client.get_balance("t1Rci9gRmkJZ22vH7dToFe2Up6TpZypgimH"))
    await client.close()

asyncio.run(main())

Using the Bitcore client directly

import asyncio
from zycoin.constants import BitcoinZ
from zycoin.clients import BitcoreClient

async def main():
    client = BitcoreClient(BitcoinZ)
    client.on_status = lambda status: print("status:", status)

    await client.connect()
    print(await client.get_history("t1Rci9gRmkJZ22vH7dToFe2Up6TpZypgimH", limit=5))
    await client.close()

asyncio.run(main())

Managing several coins

import asyncio
from zycoin.manager import ClientManager

async def main():
    manager = ClientManager()
    manager.add("btcz", "bitcore")
    manager.add("zcl")
    manager.add("zer")
    manager.add("flux")

    await manager.connect_all()
    print({coin: manager[coin].coin.NAME for coin in manager.clients})

    await manager.disconnect_all()

asyncio.run(main())

Available networks

The following coin definitions are included:

  • btcz — BitcoinZ
  • flux — Flux
  • zcl — Zclassic
  • zer — Zero
  • zerc — ZeroClassic

Notes

  • The library uses async IO throughout.
  • For Electrum connections, it selects the fastest reachable server automatically.
  • For Bitcore connections, it communicates with the explorer's WebSocket and REST API.

License

MIT

Metadata

Release files for zycoin 1.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zycoin 1.0.9
File Size Uploaded
zycoin-1.0.9.tar.gz 114.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zycoin 1.0.9
File Interpreter ABI Platform
zycoin-1.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 228.0 kB

Release files / zycoin-1.0.9.tar.gz

Download URL zycoin-1.0.9.tar.gz
Size 114.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e1b9caf2dc9c232bf22a1b8a7a4365cfc90f47b34d89bbd83b70d5cb21b5b785
BLAKE2b-256 checksum
How to use checksums
83a9810e3701e429ad0eedbd6107447770ffd54286cd6a5da58cafc8c06cb03f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release files / zycoin-1.0.9-py3-none-any.whl

Download URL zycoin-1.0.9-py3-none-any.whl
Size 113.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cca0c501acc5974c6b5af402c7d45b21c4d1adf6768531a3fd16185f0ba5007
BLAKE2b-256 checksum
How to use checksums
acb11e299fad3731310b9de76d8ce50419e14e6e4ab7e03a17c93e98036a517b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.

Transparency log

Release history Release notifications | RSS feed

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

This release

1.0.9 This release

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page