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_notification = 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
  • zer — Zero
  • zcl — Zclassic
  • flux — Flux

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.1

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.1
File Size Uploaded
zycoin-1.0.1.tar.gz 38.3 kB Details

Built distribution (wheel)

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

Total release size: 77.7 kB

Release files / zycoin-1.0.1.tar.gz

Download URL zycoin-1.0.1.tar.gz
Size 38.3 kB
Tags Source
SHA-256 checksum
How to use checksums
88594b1f92a00f7f4de7ddfead3bf284cfcd64d7475fb5563f27df75fac0c531
BLAKE2b-256 checksum
How to use checksums
c359ba36d722404e103fe9c1c0752ed0e039f11d877ab9a21a0ac0066ffc39ca
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 Sep 27, 2026.

Transparency log

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

Download URL zycoin-1.0.1-py3-none-any.whl
Size 39.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5f8096c1b99e913a07864907d41fb06e78b870eec7aae627962e5d67c54e836
BLAKE2b-256 checksum
How to use checksums
dfc454d13d273daa35eade8625e665e8fcccf710d71f4a738d9868aa06b3e866
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 Sep 27, 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

1.0.9

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

This release

1.0.1 This release

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