Skip to main content

chaincraft

Reference implementation of the Chaincraft wire protocol and object semantics. Release 1.12.0 on PyPI. 1.12.0 adds chain.transfer and node.preset. 53 of 53 registry features are implemented in Python.

Open-source toolkit for peer-to-peer protocols like blockchains, chat rooms, BitTorrent swarms, and content-addressed stores.

Install

pip install chaincraft

Ed25519 is optional: pip install "chaincraft[ed25519]". The node is python3 -m chaincraft.node. Default listen is 0.0.0.0:9735.

Hello World

Two TCP nodes in one process. A listens on 9735, B on 9736, B dials A and gossips app.hello.

import time
from chaincraft.mesh import Mesh
from chaincraft.object import SharedObject


class Hello(SharedObject):
    def receive(self, message):
        print("Received:", message["message"])


hello = Hello()
a = Mesh(on_app=lambda t, d: hello.receive(d) if t == "app.hello" else None)
b = Mesh()
print("listening", a.start("127.0.0.1", 9735))
print("listening", b.start("127.0.0.1", 9736))
b.connect(a.listen_addr)
digest = b.broadcast("app.hello", {"message": "Hello, Chaincraft!"})
time.sleep(0.4)
print(digest)
a.close()
b.close()

CLI, three languages on one loopback mesh:

python3 -m chaincraft.node
chaincraft-node 127.0.0.1:9736
chaincraft-ts-node 127.0.0.1:9737

Then {"cmd":"connect","addr":"127.0.0.1:9735"} on the last two, and {"cmd":"send","type":"app.hello","data":{"message":"Hello, Chaincraft!"}} on Python.

Further local nodes take unused ports and connect. Remote hosts dial this machine's unicast IPv4 or DNS name on 9735. connect allows loopback, RFC1918, public unicast IPv4, localhost, .local, and ordinary DNS names. One mesh process keeps at most 256 live peers.

Specification and the Rust and TypeScript implementations live in the monorepo.

Metadata

Release files for chaincraft 1.12.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 chaincraft 1.12.0
File Size Uploaded Provenance Actions
chaincraft-1.12.0.tar.gz 79.1 kB With provenance Details for chaincraft-1.12.0.tar.gz

Built distribution (wheel)

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

Total release size: 160.3 kB

Release files / chaincraft-1.12.0.tar.gz

Download URL chaincraft-1.12.0.tar.gz
Size 79.1 kB
Tags Source
SHA-256 checksum
How to use checksums
71dafc11a40e3d1ed379a1898a1b2783f80cb6bcc07e38cd5d83524e7df21813
BLAKE2b-256 checksum
How to use checksums
218d4ea0459dedbad1e446d174358647e0864c53ee1e4e989939cad7b9a6f93e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Release files / chaincraft-1.12.0-py3-none-any.whl

Download URL chaincraft-1.12.0-py3-none-any.whl
Size 81.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3960629e7182e14f3273ae4e24dfcd75181412b2945489b94c276e115e3e4176
BLAKE2b-256 checksum
How to use checksums
6c6a1f18a29821140ecbf97e1d008655b9e08fd96f26fae6c7a85dfde6659886
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Security for chaincraft 1.12.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for chaincraft-1.12.0.tar.gz

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 Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.12.0 This release

2 release files Full provenance

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