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 src.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 src.constants import BitcoinZ
from src.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 src.constants import BitcoinZ
from src.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 src.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.0

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.0
File Size Uploaded
zycoin-1.0.0.tar.gz 106.8 kB Details

Built distribution (wheel)

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

Total release size: 210.3 kB

Release files / zycoin-1.0.0.tar.gz

Download URL zycoin-1.0.0.tar.gz
Size 106.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ed8d139e67b73f4e5af551776fcd522c2d763cad99767e6c4ef3158958340c49
BLAKE2b-256 checksum
How to use checksums
f08fd0f6d7b9eb0a92c8a77dbb7e04ec7d4492fd6278f6d3016a2d49442804d5
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.0-py3-none-any.whl

Download URL zycoin-1.0.0-py3-none-any.whl
Size 103.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c6a4228e5b692c5c3dc24ed4465bf63ae54fd145bc94a2c494ea98257e14c7a
BLAKE2b-256 checksum
How to use checksums
93f557414a6bf43b65cfde755bf6654773de2a973e74a75ff71e9189ab7c6960
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

1.0.1

2 release files

This release

1.0.0 This release

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