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

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.8
File Size Uploaded
zycoin-1.0.8.tar.gz 114.6 kB Details

Built distribution (wheel)

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

Total release size: 227.8 kB

Release files / zycoin-1.0.8.tar.gz

Download URL zycoin-1.0.8.tar.gz
Size 114.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8572ad1f27ea2787c130b4a47bff9374293bd445d6e3aa8b9243f58182f12418
BLAKE2b-256 checksum
How to use checksums
ad17713718b909321a971ba868c5b57587f7c22d7c4694f6715ea39a96c61165
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 4, 2026.

Transparency log

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

Download URL zycoin-1.0.8-py3-none-any.whl
Size 113.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba99166fb095dc02a1212d7c56f3c1881eb3c7541d7cbeb76b9e98423565ba4a
BLAKE2b-256 checksum
How to use checksums
36d4a06eed6c313e5745b57db929303e102e7a3b8535777ce38f8e0457fe51ee
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 4, 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

This release

1.0.8 This release

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