Merkle tree and cryptographic proof primitives for the Arkava Trust Chain
Project description
trustchain-core
Merkle tree and cryptographic proof primitives for the Arkava® Trust Chain.
trustchain-core provides the foundational cryptographic building blocks for the
Arkava Trust Chain — an append-only, cryptographically verifiable accountability
substrate. It implements Merkle trees, batch accumulators, inclusion and consistency
proofs, Ed25519 signature verification, and canonical JSON encoding for witness
manifests.
Installation
pip install trustchain-core
Requires Python 3.11+.
Quick Start
from trustchain_core import MerkleTree, BatchAccumulator, compute_batch_root
# Build a Merkle tree
tree = MerkleTree()
tree.add_leaf(b"event 1")
tree.add_leaf(b"event 2")
root = tree.get_root()
# Verify an inclusion proof
proof = tree.prove_inclusion(0)
assert tree.verify_inclusion_proof(proof)
# Batch accumulator for daily manifests
accumulator = BatchAccumulator()
batch_root = compute_batch_root([b"event 1", b"event 2"])
Features
- Merkle trees — SHA3-512 leaf hashing, RFC 6962-compatible inclusion and consistency proofs
- Batch accumulator — deterministic batch root computation with algorithm ID headers
- Ed25519 verification — signature verification with public key registry
- Canonical encoding — RFC 8785 (JCS) canonical JSON for reproducible manifest hashing
- Witness manifests — daily commit-signed manifest generation and verification
- Algorithm dispatch — extensible crypto algorithm registry with future-compatibility
- Ethereum compatibility — hash encoding compatible with Ethereum smart contracts
- Typed — PEP 561
py.typedmarker for type checker support
Documentation
- Architecture:
Arkava_TrustChain_Technical_Architecture_v0.2.md - ADR-0007: Witness anchoring
- ADR-0019: Manifest canonical encoding and v1 field lock
Licence
Apache-2.0. Arkava® Trust Chain is a registered trademark of Arkava Ltd.
© 2026 Arkava® / All rights reserved.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trustchain_core-0.1.0.tar.gz.
File metadata
- Download URL: trustchain_core-0.1.0.tar.gz
- Upload date:
- Size: 80.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3b0f82a6dce9ca0eefaa2a1e4e9fa3572b833d15d990347cc63fe1751bf645d
|
|
| MD5 |
4bee13d46f4c4f771a1b089a73a679b7
|
|
| BLAKE2b-256 |
54660607604e1e8c09374096a515f0476cfefa733cdf89e82bbf520ecae4385d
|
Provenance
The following attestation bundles were made for trustchain_core-0.1.0.tar.gz:
Publisher:
publish-trustchain-core.yml on Arkava-AI/arkava-trustchain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustchain_core-0.1.0.tar.gz -
Subject digest:
c3b0f82a6dce9ca0eefaa2a1e4e9fa3572b833d15d990347cc63fe1751bf645d - Sigstore transparency entry: 1997079171
- Sigstore integration time:
-
Permalink:
Arkava-AI/arkava-trustchain@f4d99f32042fde6ffad42083368357b17e31bf2b -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/Arkava-AI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-trustchain-core.yml@f4d99f32042fde6ffad42083368357b17e31bf2b -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file trustchain_core-0.1.0-py3-none-any.whl.
File metadata
- Download URL: trustchain_core-0.1.0-py3-none-any.whl
- Upload date:
- Size: 40.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55aacfefe0dd22307259024c0f94d25924b3efbbe874e4558d70ec01932747e4
|
|
| MD5 |
71fc86fc821817fb07bf4ff67dc4f9c4
|
|
| BLAKE2b-256 |
11b7a76e14f06ee53411470ea918705d893ce854591af1c5bd4e8e0f9c8f5a49
|
Provenance
The following attestation bundles were made for trustchain_core-0.1.0-py3-none-any.whl:
Publisher:
publish-trustchain-core.yml on Arkava-AI/arkava-trustchain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
trustchain_core-0.1.0-py3-none-any.whl -
Subject digest:
55aacfefe0dd22307259024c0f94d25924b3efbbe874e4558d70ec01932747e4 - Sigstore transparency entry: 1997079280
- Sigstore integration time:
-
Permalink:
Arkava-AI/arkava-trustchain@f4d99f32042fde6ffad42083368357b17e31bf2b -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/Arkava-AI
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-trustchain-core.yml@f4d99f32042fde6ffad42083368357b17e31bf2b -
Trigger Event:
workflow_dispatch
-
Statement type: