Skip to main content

mintid-proof-core

Python bindings of the MintID proof core: the anonymous-credential core, written in Rust and compiled into this package, with the headless holder library (proof_core.holder) and the issuance side that an issuer service uses. A holder obtains a credential blind (the issuer never sees it in the clear), keeps its witnesses current, and answers a verifier's challenge with a zero-knowledge presentation that proves predicates such as "over 18", "grade at least A3" or "still active", and nothing else. The holder can also revoke its own credential without revealing which one it is (holder self-revocation, the holder's kill switch).

Where it fits

MintID is a network for verifiable, human-backed identity. Accepted issuers verify people and issue the credentials; the chain publishes their status roots, their bonds and the registries; each verifier decides on its own service. MintID itself issues nothing, certifies nothing and verifies nobody.

The holder library is headless: it runs in the holder's own infrastructure, next to the keys the holder already custodies. The Python agent client (mintid-agent) builds on it. Verification is not in this package: it is in the verifier SDK (mintid-verifier-sdk), on the relying party's own service.

Install

pip install mintid-proof-core   # Python 3.12 or later

The Rust core is compiled in; where no wheel matches your platform, pip builds it from the source distribution, which needs a Rust toolchain. Version 0.5.2, published from the main repository, https://gitlab.com/mintid/mintid (identity-proof-core/python); its Rust core is proof-core 0.5.0 (CORE_PIN), unchanged.

New in 0.5.2. No change in behaviour: the source distribution now carries the credential library the engine is built on (credx 0.2.1, vendored with its numeric claims typed i64, byte-identical on 64-bit platforms), so a build from source and the browser check compile the same code.

New in 0.5.1. Network profiles (proof_core.networks): the package carries the MintID network registry, network("testnet") (or MINTID_NETWORK=testnet) names the endpoints of a deployment, and submit_self_revocation(None, revocation, network="testnet") takes the relay and the node from it. MINTID_TESTNET_* and the per-service overrides win; an unknown profile fails naming the valid ones. python -m proof_core.networks testnet --shell prints the shell variables the documentation's commands read. Additive: without a profile nothing changes.

New in 0.5. The agent profile v2 (AGENT_V2_PROFILE, MINT-479): an agent credential that also carries its principal's age floor, so the agent proves age_over N without any date of birth. Holder.present_for_mint takes an optional age_over (read from the issuer's mint challenge when not given) and the mint outcome reports it; the issuance side gets the v2 key set (profile=AGENT_V2_PROFILE). Agent v1 and identity are unchanged.

Upgrading from 0.3. Holder.present now checks the verifier's challenge signature before it builds anything (SPEC-1 §10.5): it needs the verifier's {request, signature_hex} unmodified and a source of verifiers' request keys, given as verifiers= to Holder.issue, Holder.from_storage or present itself (ProvenVerifierKeys over a proven chain read, or StaticVerifierKeys of records you pinned). A bare or unsigned request, a holder without a source, an unknown or retired key and a bad signature are refused with ChallengeRefused (its reason names which). Only against a devnet verifier started with --insecure-unsigned-challenges, present(..., insecure_skip_challenge_signature=True) skips the check, and warns every time.

Example

import proof_core
from proof_core.holder import Holder, StaticVerifierKeys

print(proof_core.core_version())       # the Rust core compiled into this package

# Where the holder reads verifiers' request keys: a proven chain read
# (ProvenVerifierKeys) or the records you pinned (StaticVerifierKeys).
holder = Holder.issue(offer, verifiers=StaticVerifierKeys(pinned_records))
holder.refresh_witness()               # right before presenting; material that does not verify is refused
envelope = holder.present(challenge)   # the verifier's {request, signature_hex}: the signature is
                                       # checked first (ChallengeRefused otherwise), then one bound,
                                       # 10-second presentation, or nothing is sent
custody = holder.storage_bytes()       # holds the link secret: encrypt it under your own key

There is no export: the custody encoding is the only serialisation, and a lost key is recoverable by nobody (you verify again and get a fresh credential, unlinkable to the old one).

Status

Built and in production on the single-node production chain. An independent audit of the implementation is scheduled as a milestone; its findings will be published, and it gates nothing.

Where to test

On the public testnet and its KYC sandbox, and only there: check the status line of its page first. Nothing issued on it carries weight. The single-node production chain is not for third parties and is never a place to test.

Licence

Apache License 2.0. Author: Marc Molas.

Metadata

Release files for mintid-proof-core 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mintid-proof-core 0.5.2
File Size Uploaded Provenance Actions
mintid_proof_core-0.5.2.tar.gz 413.6 kB Without provenance Details for mintid_proof_core-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mintid-proof-core 0.5.2
File Interpreter ABI Platform Actions
mintid_proof_core-0.5.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details for mintid_proof_core-0.5.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Total release size: 1.5 MB

Release files / mintid_proof_core-0.5.2.tar.gz

Download URL mintid_proof_core-0.5.2.tar.gz
Size 413.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a7ba9c5ec752281f975b22896c4a2b6459eb8e44a4b462459f4a11d621f5a6ce
BLAKE2b-256 checksum
How to use checksums
c13686e0eb82ca0c3026831316caba30f7f5fd8e1ae2945c08e69ab8655f6bd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / mintid_proof_core-0.5.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL mintid_proof_core-0.5.2-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.1 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
e644fc34bb131ed39c0dd92036d1a65befdfd42e01706f3b7423172a927bafa1
BLAKE2b-256 checksum
How to use checksums
cca0b8d7b892bbeaa839152ebfe43bacfdbc4c617b660b123391a304002189d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Security for mintid-proof-core 0.5.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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