Skip to main content

alberta-buck

The Alberta Buck reference implementation in Python, protocol v2: the identity layer, the Notes, the receipts, and the agent simulations that run them against the real contracts.

  • alberta_buck.wallet -- the executable specification: Pointcheval-Sanders identity credentials and the A' hiding registration presentation, ElGamal account credentials, the sigma protocols, the Notes flows (A1 and A2 addressed notes, B1 bearer notes: commitments, deliveries, the folded deposit gates' witnesses), and AB-RCPT/2 payment receipts. The compiled kernels (alberta-buck-kernel, in Rust) are proven bit-identical to it.
  • alberta_buck.registry -- the identity accumulator: salted Poseidon trees, registry certificates, the aggregator, attribute proofs, the insurance regulator, and particulars certificates for details that change.
  • alberta_buck.sim -- agent simulations over the contracts, on anvil or in-process (pyrevm): the BUCK_K PID controller, the baskets, the equilibrium experiments (sim/experiments/*.toml), and the Notes privacy world.
  • alberta_buck.oracle -- Chainlink price-history readers (against a fork).

Unaudited prototype software for a monetary system. It is published so the research can be reproduced and built on -- not to hold anything of value.

Install

pip install alberta-buck               # pure Python; installs everywhere
pip install alberta-buck[kernel]       # + the compiled kernels, where a wheel exists
pip install alberta-buck[sim]          # everything: kernel, pyrevm, plots, server
extra adds
kernel the Rust kernels (same bytes, faster)
fast pyrevm, the in-process EVM backend
plots matplotlib, for the sim.plot_* renderers
server websockets, for sim.server
sim all of the above

The extras never change a result, only how fast it arrives or what it can draw: every heavy dependency is imported where it is used.

Use

from alberta_buck.wallet import backend, identity_scalar, ps_keygen, ps_sign, ps_verify

issuer = ps_keygen()                                   # a credential issuer's key pair
m = identity_scalar({"registry": "ab", "person": "0001", "birth": "1970-01-01"})
sigma = ps_sign(issuer, m)                             # the issuer certifies the identity
print(backend(), ps_verify(issuer.pk_X, issuer.pk_Y, sigma, m))   # "kernel True" / "py True"

BUCK_IDENTITY_BACKEND=py forces the pure-Python path; kernel requires the compiled one.

The Notes use a DEVELOPMENT trusted setup

The simulations deploy the contracts from alberta-buck-contracts, whose Groth16 verifiers come, until v1.0.0, from a development trusted setup whose toxic waste is public: anyone can forge a proof they accept. That is deliberate -- it lets a simulation model forged-proof attacks and the defences around them -- and it means nothing here may guard value. The real-proof fixture worlds shipped under alberta_buck/test/vectors were proven with that setup.

What needs a repository checkout

  • New proofs: the circuits and proving keys live in the repository (circuits/, make nix-snark-*), not in this package.
  • Worlds routed through Uniswap: Uniswap's contracts are not redistributed here, and those worlds load them from a checkout.
  • The papers: executable Org documents in the repository.

Status

0.2.0, prototype, protocol v2. Unaudited.

Licence

GPL-3.0-or-later. The kernels and core platform it can use are CAL-1.0; see LICENSING.md.

Repository: https://github.com/alberta-buck/alberta-buck

Release files for alberta-buck 0.2.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 alberta-buck 0.2.0
File Size Uploaded
alberta_buck-0.2.0.tar.gz 1.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for alberta-buck 0.2.0
File Interpreter ABI Platform
alberta_buck-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.9 MB

Release files / alberta_buck-0.2.0.tar.gz

Download URL alberta_buck-0.2.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
f129d2608fdd889a7a75d10254e27061a8d4a6a08d539da8b1c3ea56cda914d9
BLAKE2b-256 checksum
How to use checksums
b469239e0230bf48b3b1dfa392651b84a6616920b646c934ca4b4c4c9391c6ba
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 25, 2026.

Transparency log

Release files / alberta_buck-0.2.0-py3-none-any.whl

Download URL alberta_buck-0.2.0-py3-none-any.whl
Size 1.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4c76a9ec7b815447e3c26a5645baf5f3e777ae166441323f397ee1c24b6273a4
BLAKE2b-256 checksum
How to use checksums
455835fee02ff0a5c3edcb242fdf8fa6eef3eee93c7aff8107ef63a826c7915e
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 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

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