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

Metadata

Release files for alberta-buck 0.3.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.3.0
File Size Uploaded Provenance Actions
alberta_buck-0.3.0.tar.gz 1.6 MB With provenance Details for alberta_buck-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 3.4 MB

Release files / alberta_buck-0.3.0.tar.gz

Download URL alberta_buck-0.3.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
f9932090b7b9bc2c8d34c85faabdb3b2a9e6e69f3d06b2a85a32a5c71e8a13d3
BLAKE2b-256 checksum
How to use checksums
79ae59fb80a3f6e7c2533b6e3e7bdd552759ff118808033b341021b6ca225d0a
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 / alberta_buck-0.3.0-py3-none-any.whl

Download URL alberta_buck-0.3.0-py3-none-any.whl
Size 1.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b3dc5beec72d6d06992662f41e31a4477bf0d1b888bda19276e58b581ee13194
BLAKE2b-256 checksum
How to use checksums
f212ed7d5d6a14d9cb324d433e4d36c14dadd46687a562974d0d2bbd2c63aa9f
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

Security for alberta-buck 0.3.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 alberta_buck-0.3.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 Sep 30, 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.

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