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

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.5
File Size Uploaded
zycoin-1.0.5.tar.gz 114.5 kB Details

Built distribution (wheel)

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

Total release size: 227.6 kB

Release files / zycoin-1.0.5.tar.gz

Download URL zycoin-1.0.5.tar.gz
Size 114.5 kB
Tags Source
SHA-256 checksum
How to use checksums
56d708c4bbc49193fa054fd783d2c53f37a017a9e295d23e4659f4bb0120bd31
BLAKE2b-256 checksum
How to use checksums
a1120bbc637ab7dc9c0527ac427092cc2301210d8d2904bde22e3375a9708a5b
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 30, 2026.

Transparency log

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

Download URL zycoin-1.0.5-py3-none-any.whl
Size 113.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a07292f1c55cd4c6b40be47fd798f2519f3b80904f1be21a4a2c5b2e9873a37
BLAKE2b-256 checksum
How to use checksums
7c0fb44be66811f003250ee0a004d6521894749fadcdfdc6a453beeb6287774b
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 30, 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

This release

1.0.5 This release

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