actproof 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- actproof-0.2.0/.gitignore +110 -0
- actproof-0.2.0/CHANGELOG.md +268 -0
- actproof-0.2.0/LICENSE +21 -0
- actproof-0.2.0/PKG-INFO +295 -0
- actproof-0.2.0/README.md +223 -0
- actproof-0.2.0/actproof/__init__.py +234 -0
- actproof-0.2.0/actproof/anchor.py +586 -0
- actproof-0.2.0/actproof/canonical.py +369 -0
- actproof-0.2.0/actproof/catalogue.py +1031 -0
- actproof-0.2.0/actproof/cli.py +593 -0
- actproof-0.2.0/actproof/manifest.py +728 -0
- actproof-0.2.0/actproof/receipt.py +678 -0
- actproof-0.2.0/actproof/signers/__init__.py +89 -0
- actproof-0.2.0/actproof/signers/google_kms.py +392 -0
- actproof-0.2.0/actproof/signers/interface.py +298 -0
- actproof-0.2.0/actproof/signers/mnemonic.py +153 -0
- actproof-0.2.0/actproof/timestamp.py +527 -0
- actproof-0.2.0/actproof/verify.py +683 -0
- actproof-0.2.0/docs/STS-STANDARDS-APPLICATION.md +107 -0
- actproof-0.2.0/pyproject.toml +143 -0
- actproof-0.2.0/tests/__init__.py +60 -0
- actproof-0.2.0/tests/test_anchor.py +584 -0
- actproof-0.2.0/tests/test_canonical.py +471 -0
- actproof-0.2.0/tests/test_catalogue.py +850 -0
- actproof-0.2.0/tests/test_catalogue_v3.py +802 -0
- actproof-0.2.0/tests/test_cli.py +510 -0
- actproof-0.2.0/tests/test_manifest.py +848 -0
- actproof-0.2.0/tests/test_receipt.py +728 -0
- actproof-0.2.0/tests/test_signers_google_kms.py +347 -0
- actproof-0.2.0/tests/test_signers_interface.py +273 -0
- actproof-0.2.0/tests/test_signers_mnemonic.py +253 -0
- actproof-0.2.0/tests/test_timestamp.py +495 -0
- actproof-0.2.0/tests/test_verify.py +602 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
*.egg
|
|
7
|
+
*.egg-info/
|
|
8
|
+
.eggs/
|
|
9
|
+
.Python
|
|
10
|
+
build/
|
|
11
|
+
dist/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
downloads/
|
|
14
|
+
eggs/
|
|
15
|
+
lib/
|
|
16
|
+
lib64/
|
|
17
|
+
parts/
|
|
18
|
+
sdist/
|
|
19
|
+
var/
|
|
20
|
+
wheels/
|
|
21
|
+
share/python-wheels/
|
|
22
|
+
MANIFEST
|
|
23
|
+
|
|
24
|
+
# PyInstaller
|
|
25
|
+
*.manifest
|
|
26
|
+
*.spec
|
|
27
|
+
|
|
28
|
+
# Installer logs
|
|
29
|
+
pip-log.txt
|
|
30
|
+
pip-delete-this-directory.txt
|
|
31
|
+
|
|
32
|
+
# Unit test / coverage reports
|
|
33
|
+
htmlcov/
|
|
34
|
+
.tox/
|
|
35
|
+
.nox/
|
|
36
|
+
.coverage
|
|
37
|
+
.coverage.*
|
|
38
|
+
.cache
|
|
39
|
+
nosetests.xml
|
|
40
|
+
coverage.xml
|
|
41
|
+
*.cover
|
|
42
|
+
*.py,cover
|
|
43
|
+
.hypothesis/
|
|
44
|
+
.pytest_cache/
|
|
45
|
+
|
|
46
|
+
# Type checking
|
|
47
|
+
.mypy_cache/
|
|
48
|
+
.dmypy.json
|
|
49
|
+
dmypy.json
|
|
50
|
+
.pyre/
|
|
51
|
+
.pytype/
|
|
52
|
+
|
|
53
|
+
# Linting
|
|
54
|
+
.ruff_cache/
|
|
55
|
+
|
|
56
|
+
# Translations
|
|
57
|
+
*.mo
|
|
58
|
+
*.pot
|
|
59
|
+
|
|
60
|
+
# Environments
|
|
61
|
+
.env
|
|
62
|
+
.env.*
|
|
63
|
+
.venv
|
|
64
|
+
env/
|
|
65
|
+
venv/
|
|
66
|
+
ENV/
|
|
67
|
+
env.bak/
|
|
68
|
+
venv.bak/
|
|
69
|
+
|
|
70
|
+
# IDEs and editors
|
|
71
|
+
.idea/
|
|
72
|
+
.vscode/
|
|
73
|
+
*.swp
|
|
74
|
+
*.swo
|
|
75
|
+
*~
|
|
76
|
+
.DS_Store
|
|
77
|
+
*.sublime-project
|
|
78
|
+
*.sublime-workspace
|
|
79
|
+
|
|
80
|
+
# Jupyter
|
|
81
|
+
.ipynb_checkpoints
|
|
82
|
+
|
|
83
|
+
# Documentation builds
|
|
84
|
+
docs/_build/
|
|
85
|
+
docs/.cache/
|
|
86
|
+
site/
|
|
87
|
+
|
|
88
|
+
# Secrets and credentials (never commit)
|
|
89
|
+
*.key
|
|
90
|
+
*.pem
|
|
91
|
+
*.p12
|
|
92
|
+
*.pfx
|
|
93
|
+
*.crt
|
|
94
|
+
.secrets/
|
|
95
|
+
secrets.json
|
|
96
|
+
credentials.json
|
|
97
|
+
*.kms-key.json
|
|
98
|
+
algorand-mnemonic.txt
|
|
99
|
+
|
|
100
|
+
# Local development overrides
|
|
101
|
+
local_settings.py
|
|
102
|
+
local_config.py
|
|
103
|
+
*.local.toml
|
|
104
|
+
*.local.yaml
|
|
105
|
+
|
|
106
|
+
# Project-specific
|
|
107
|
+
# Working scratch directory for experiments
|
|
108
|
+
scratch/
|
|
109
|
+
# Local test receipts (these should be in tests/fixtures/ if intended to persist)
|
|
110
|
+
*.receipt.local.json
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
While the major version is 0, breaking changes may occur in any minor or patch
|
|
9
|
+
release. Once 1.0.0 ships, semantic versioning will be strictly followed.
|
|
10
|
+
|
|
11
|
+
## [Unreleased]
|
|
12
|
+
|
|
13
|
+
### Planned
|
|
14
|
+
|
|
15
|
+
- **v0.2.0** — `docs/` complete with three worked examples (NIS2 / EUDR / software release), GitHub Action wrapper `release-anchor.yml`, EU Trusted List chain validation for RFC 3161 tokens, stricter verifier semantics (PARTIAL state distinct from PASS), disclosure CLI subcommands (`actproof verify-disclosure`, `actproof issue-disclosure`).
|
|
16
|
+
- **v0.3.0** — Cross-implementation conformance test suite landing.
|
|
17
|
+
- **v1.0.0** — API frozen.
|
|
18
|
+
- **v2.0.0** — COSE_Sign1 + SCITT Transparent Statement bridge, once RFC 9943 publishes.
|
|
19
|
+
|
|
20
|
+
## [0.2.0] — 2026-05-17
|
|
21
|
+
|
|
22
|
+
**First PyPI release of `actproof`.** This is the inaugural published version of the substrate library under its canonical name. The library is installable via `pip install actproof`.
|
|
23
|
+
|
|
24
|
+
### Project history
|
|
25
|
+
|
|
26
|
+
The code in this release was developed under the working name `openproof` on GitHub. The repository at `github.com/deyan-paroushev/openproof-py` was renamed to `github.com/deyan-paroushev/actproof-py` on 2026-05-17; the old URL auto-redirects to the new one. GitHub tags `v0.1.0` (initial public-API surface) and `v0.1.1` (additive schema v3 support) under the previous repository name are the development history of this code; this `v0.2.0` on PyPI is the first published release under the canonical name and supersedes both working-name tags.
|
|
27
|
+
|
|
28
|
+
The PyPI namespace under `openproof` is unrelated to this project.
|
|
29
|
+
|
|
30
|
+
### Public contract
|
|
31
|
+
|
|
32
|
+
- **PyPI distribution name:** `actproof`
|
|
33
|
+
- **Python import:** `actproof`
|
|
34
|
+
- **CLI command:** `actproof`
|
|
35
|
+
- **Receipt profile identifier:** `actproof-jcs-v1`
|
|
36
|
+
- **ARC-2 dApp name on Algorand notes:** `actproof`
|
|
37
|
+
- **Catalogue schema discriminators:** `actproof.act_catalogue_entry.v2` and `actproof.act_catalogue_entry.v3`
|
|
38
|
+
- **Catalogue act-type ID prefix:** `op:` (preserved as historical opaque identifier; migration deferred to v1.6)
|
|
39
|
+
- **Environment variables:** `ACTPROOF_CATALOGUE_PATH`, `ACTPROOF_MNEMONIC`
|
|
40
|
+
|
|
41
|
+
### Functional scope
|
|
42
|
+
|
|
43
|
+
This release ships the same functional API as the `openproof` working-name `v0.1.1` GitHub tag. 443 tests pass. No code path differs from the renamed source.
|
|
44
|
+
|
|
45
|
+
- **`actproof/canonical.py`** — JSON Canonicalization Scheme (RFC 8785) implementation. `canonicalize`, `canonicalize_str`, `canonicalize_from_json`, `hash_canonical`, `hash_canonical_hex`.
|
|
46
|
+
- **`actproof/manifest.py`** — Manifest construction and hashing. `build_manifest`, `manifest_to_dict`, `manifest_from_dict`, `hash_manifest`, `hash_manifest_hex`. Receipt profile constant `RECEIPT_PROFILE_V1 = "actproof-jcs-v1"`. Manifest validation surface (`validate_manifest_shape`, `ManifestValidationError`).
|
|
47
|
+
- **`actproof/catalogue.py`** — Catalogue loader supporting schema v2 (legacy) and schema v3 (current, with four optional sub-objects: `RegulatedContextProfile`, `PriorReceiptsProfile`, `RelianceContext`, `DisclosureProfile`). `load_catalogue`, `validate_manifest`, `hash_entry_file`, `hash_schema_file`.
|
|
48
|
+
- **`actproof/receipt.py`** — Receipt envelope, anchor record, timestamp token, issuer evidence (the holder receipt with salts retained). `ARC2_DAPP_NAME = "actproof"`. Receipt I/O (`read_receipt`, `write_receipt`, `read_issuer_evidence`, `write_issuer_evidence`).
|
|
49
|
+
- **`actproof/timestamp.py`** — RFC 3161 trusted-timestamp acquisition with multi-TSA failover. `acquire_timestamp_token`, `TimestampAuthority`, `TSAAttempt`, `AcquisitionResult`. Default TSA chain pre-configured with three EU qualified TSAs.
|
|
50
|
+
- **`actproof/anchor.py`** — Algorand ARC-2 anchoring. `anchor_manifest` (the high-level entry point), `build_note_payload`, `build_note_bytes`, `build_transaction`. Mainnet/testnet/betanet support.
|
|
51
|
+
- **`actproof/signers/`** — `AlgorandSigner` interface plus two implementations: `MnemonicSigner` (env-var-fed mnemonic) and `GoogleKMSSigner` (GCP Cloud KMS Ed25519-backed signer).
|
|
52
|
+
- **`actproof/verify.py`** — Six-check verification: profile, manifest hash, note payload, catalogue, anchor (ledger round-trip), timestamp. `verify_receipt`, `CheckResult`, `CheckStatus`, `VerificationResult`. `SUPPORTED_RECEIPT_PROFILES = ("actproof-jcs-v1",)`.
|
|
53
|
+
- **`actproof/cli.py`** — `actproof verify`, `actproof issue`, `actproof inspect`. Reads `ACTPROOF_MNEMONIC` env var; mnemonic NEVER from command-line argument.
|
|
54
|
+
|
|
55
|
+
### Added in this release (beyond the renamed source)
|
|
56
|
+
|
|
57
|
+
- **`SECURITY.md`** at the repo root. Vulnerability reporting policy. Scope statement (what is and is not protected by the substrate). Coordinated-disclosure timeline. Out-of-scope items explicitly enumerated (legal sufficiency, regulatory acceptance, source-document truthfulness, blockchain finality, issuer key management, TSA qualification status, catalogue semantics).
|
|
58
|
+
- **`.github/workflows/release.yml`** — GitHub Actions workflow for PyPI Trusted Publishing. Triggered by `release.published` event only (not tag push). Uses the `pypi` GitHub Environment with required-reviewer protection. Builds wheel + sdist, runs `twine check`, publishes via `pypa/gh-action-pypi-publish@release/v1`. PEP 740 Sigstore attestations enabled by default.
|
|
59
|
+
|
|
60
|
+
### Changed (the rename itself)
|
|
61
|
+
|
|
62
|
+
- **Package name:** `openproof` → `actproof` across all 26 Python files, 6 documentation files, and pyproject.toml. 311 source references and 133 documentation references updated. Directory `openproof/` renamed to `actproof/`. Imports `from openproof.X` become `from actproof.X`. CLI entry-point `openproof` becomes `actproof`. Environment variables `OPENPROOF_*` become `ACTPROOF_*`.
|
|
63
|
+
- **Receipt profile identifier:** `openproof-jcs-v1` → `actproof-jcs-v1`. This is a wire-protocol change visible in every receipt issued from v0.1.0 onward. Since the openproof working-name code never issued public production receipts (only mock/demo samples), no legacy alias is preserved.
|
|
64
|
+
- **ARC-2 dApp name:** `openproof` → `actproof`. The on-chain note prefix is `actproof:j` for JSON notes. The internal constant `_OPENPROOF_NOTE_PREFIX` is now `_ACTPROOF_NOTE_PREFIX = b"actproof:j"`.
|
|
65
|
+
- **Catalogue schema discriminator:** `openproof.act_catalogue_entry.v2` → `actproof.act_catalogue_entry.v2` (and v3). Since no public catalogues exist under the openproof working name beyond development snapshots, both discriminator strings are renamed. The matching change in `actproof-events` v1.5-rc1 lands in the same release window.
|
|
66
|
+
- **Environment variable names:** `OPENPROOF_CATALOGUE_PATH` → `ACTPROOF_CATALOGUE_PATH`. `OPENPROOF_MNEMONIC` → `ACTPROOF_MNEMONIC`. The `cli.py` references and the catalogue loader's env-var lookup are updated together.
|
|
67
|
+
- **pyproject.toml metadata:** description rewritten as "Verifiable receipts of regulated acts. Canonical JSON (RFC 8785), RFC 3161 trusted timestamps, Algorand ARC-2 anchoring, independent verification." Author/maintainer email added (`deyan@advisa.tech`). Keywords extended with `governance`, `evidence`, `transparency`. Classifiers extended with `Intended Audience :: Government`. Development Status remains `3 - Alpha` (API stability not yet promised across minor versions).
|
|
68
|
+
- **Project URLs:** updated to the new `actproof-py` repository URLs throughout, with `Security` added pointing to `SECURITY.md`.
|
|
69
|
+
|
|
70
|
+
### Notes for consumers
|
|
71
|
+
|
|
72
|
+
If you depended on the `openproof` working-name code via the git+https URL (`openproof @ git+https://github.com/deyan-paroushev/openproof-py.git@v0.1.1`), the upgrade path is:
|
|
73
|
+
|
|
74
|
+
1. Replace the requirement line with `actproof==0.1.0`.
|
|
75
|
+
2. Update imports: `from openproof.X import Y` → `from actproof.X import Y`.
|
|
76
|
+
3. Update CLI invocations: `openproof verify ...` → `actproof verify ...`.
|
|
77
|
+
4. Update environment variables: `OPENPROOF_CATALOGUE_PATH` → `ACTPROOF_CATALOGUE_PATH`, etc.
|
|
78
|
+
5. If you issued any receipts under the working name with `receipt_profile = "openproof-jcs-v1"`, those receipts will not verify against this release. Reissue with the new profile. (In practice, only demo receipts existed under the working name.)
|
|
79
|
+
6. Catalogue files using `"schema": "openproof.act_catalogue_entry.v3"` must update to `"schema": "actproof.act_catalogue_entry.v3"`. The matching catalogue release (`actproof-events` v1.5-rc1) ships with the renamed discriminator.
|
|
80
|
+
|
|
81
|
+
## Historical: working-name development under `openproof`
|
|
82
|
+
|
|
83
|
+
The entries below describe the development history under the working name `openproof`. They are preserved for transparency. Tags `v0.1.0` and `v0.1.1` exist in the git history of this repository; both were superseded by the canonical `v0.1.0` PyPI release described above.
|
|
84
|
+
|
|
85
|
+
### [openproof v0.1.1] — 2026-05-16
|
|
86
|
+
|
|
87
|
+
#### actproof-events schema v3 support
|
|
88
|
+
|
|
89
|
+
Additive support for actproof-events catalogue schema v3. v3 is a strict superset of v2: existing v2 catalogues load unchanged, v3 catalogues parse the four new optional sub-objects on each entry. Backward-compatible: no breaking changes to the public API. Consumers pinned to v0.1.0 reading v2 entries continue to work without modification.
|
|
90
|
+
|
|
91
|
+
The companion schema file `act_catalogue_entry.v3.json` lives in actproof-events. This release of actproof-py is what reads and validates entries against it.
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
|
|
95
|
+
- **`actproof/catalogue.py`** — Four new frozen dataclasses for the v3 optional sub-objects:
|
|
96
|
+
- `RegulatedContextProfile` — constrains the receipt envelope `regulated_context` shape (allowed context types, allowed submission stages, default context type).
|
|
97
|
+
- `PriorReceiptsProfile` — declares bilateral lifecycle expectations (required and optional `prior_receipts` roles).
|
|
98
|
+
- `RelianceContext` — names the issuer role, counterparty action, later verifiers, and optional reliance statement.
|
|
99
|
+
- `DisclosureProfile` — declares per-field disclosure tiers (`public_fields`, `commitment_fields`, `private_fields`) and `back_propagation_scope` mapping prior-receipt roles to field references visible in the automatic disclosure receipt generated at settlement.
|
|
100
|
+
- **`actproof/catalogue.py`** — Four new constants:
|
|
101
|
+
- `SCHEMA_DISCRIMINATOR_V2` (= `"actproof.act_catalogue_entry.v2"`).
|
|
102
|
+
- `SCHEMA_DISCRIMINATOR_V3` (= `"actproof.act_catalogue_entry.v3"`).
|
|
103
|
+
- `SCHEMA_DISCRIMINATORS` (frozenset of the above two).
|
|
104
|
+
- `SCHEMA_DISCRIMINATOR` retained as a backward-compatible alias for `SCHEMA_DISCRIMINATOR_V2`.
|
|
105
|
+
- **`actproof/catalogue.py`** — `CatalogueEntry` gains four optional fields (`regulated_context_profile`, `prior_receipts_profile`, `reliance_context`, `disclosure_profile`) defaulting to `None`. Fields are placed after the derived `source_path` and `entry_hash` fields so positional construction with the v2 field order continues to work.
|
|
106
|
+
- **`tests/test_catalogue_v3.py`** — 42 new tests in eight groups covering: v3 dataclass construction and immutability, discriminator constants, full and partial v3 entry parsing, missing-required-field error paths, schema file resolution preference (v3 > v2), mixed v2/v3 catalogues, backward compatibility (v2-only catalogues load identically, v3 blocks on v2 entries are ignored), and a regression check against the real actproof-events v1.4-rc1 catalogue. Existing `tests/test_catalogue.py` is unchanged; its 40 tests continue to pass.
|
|
107
|
+
|
|
108
|
+
### Changed
|
|
109
|
+
|
|
110
|
+
- **`actproof/catalogue.py`** — `_parse_entry` accepts either v2 or v3 discriminators. v3 entries with present optional blocks populate the corresponding `CatalogueEntry` fields; absent blocks leave them at `None`. v2 entries always yield `None` for all four v3 fields, even if the JSON happens to carry v3 keys (extras are tolerated, mirroring v0.1.0 permissiveness for unknown dict keys; the JSON schema file enforces strict `additionalProperties: false` for consumers that validate at the schema-file level).
|
|
111
|
+
- **`actproof/catalogue.py`** — `_scan_acts_directory` filter uses membership in `SCHEMA_DISCRIMINATORS` instead of equality with the single old discriminator. Files whose `schema` is unrecognised are silently skipped (unchanged behaviour for unrelated JSON files in the tree).
|
|
112
|
+
- **`actproof/catalogue.py`** — `_resolve_schema_path` tries `act_catalogue_entry.v3.json` first, falls back to `act_catalogue_entry.v2.json`. `Catalogue.schema_hash` reflects whichever file was found. Catalogues that ship the v3 schema file (actproof-events v1.5-rc1 and later) get the v3 hash; catalogues with only the v2 file (actproof-events v1.4-rc1 and earlier) get the v2 hash unchanged.
|
|
113
|
+
- **`actproof/catalogue.py`** — Error message for unrecognised discriminators in `_parse_entry` now names both accepted discriminators rather than just v2. Reachable only via direct `_parse_entry` calls; the directory walker silently skips unknown-discriminator files.
|
|
114
|
+
- **`actproof/__init__.py`**: version bumped to 0.1.1. Re-exports the four new dataclasses and three new constants at the package level (`from actproof import DisclosureProfile` works).
|
|
115
|
+
- **`pyproject.toml`**: version bumped to 0.1.1.
|
|
116
|
+
|
|
117
|
+
### Design notes
|
|
118
|
+
|
|
119
|
+
**Why v3 and not a relaxation of v2.** The four new sub-objects on each entry are not just new optional leaf fields; they introduce a structural concept (per-field disclosure tiers, multilateral bilateral propagation scope). Mutating what `"actproof.act_catalogue_entry.v2"` means while keeping the discriminator string the same would be cheap versioning: consumers that pinned to v2 would silently get a different contract. Clean v3 bump preserves the property that a discriminator string identifies a stable schema shape. v2-aware consumers continue to read v2 entries; v3-aware consumers read either.
|
|
120
|
+
|
|
121
|
+
**Why the v2 schema file stays in the repository.** Receipts issued against v1.4-rc1 entries are pinned to the v2 `schema_hash`. Verifying those receipts years later requires the v2 schema file at that hash. Removing it would break the receipt-binding chain. v2 and v3 schema files coexist; each receipt verifies against whichever was current at issue time.
|
|
122
|
+
|
|
123
|
+
**Why `SCHEMA_DISCRIMINATOR` is kept as an alias.** It was the only discriminator name exported by actproof v0.1.0. Renaming or removing it would break any external consumer that imported it. The alias makes the rename non-breaking. New code is encouraged to use `SCHEMA_DISCRIMINATOR_V2` and `SCHEMA_DISCRIMINATOR_V3` directly, and `SCHEMA_DISCRIMINATORS` for membership checks.
|
|
124
|
+
|
|
125
|
+
**Why the four new `CatalogueEntry` fields come after the derived fields.** Dataclass field order determines positional-construction order. Inserting the four new optional fields between the fifteen v2 wire-schema fields and the two derived fields would have shifted `source_path` and `entry_hash` positions, breaking any caller using positional construction of `CatalogueEntry` with the v2 layout. Putting the new fields at the end is semantically odd (wire-schema fields after derived fields) but kindlier to backward compatibility. `_parse_entry` uses keyword arguments throughout, so this is invisible to the loader.
|
|
126
|
+
|
|
127
|
+
**Type-level permissiveness is consistent across v2 and v3.** Wrong-type values inside present sub-objects (for instance, `public_fields: "not-a-list"` where a list is expected) do not raise in the Python loader. `tuple("not-a-list")` yields a tuple of characters, which is valid Python though semantically nonsense. This matches the existing v2 parser's permissiveness. Strict type validation is the JSON schema file's job, applied by external tooling such as `ajv` or `jsonschema`. The Python loader catches structural errors (missing required keys, wrong dict shape, non-iterable where iteration is needed) but not type-level errors. A separate hardening pass could tighten this uniformly across v2 and v3 in a future release if desired.
|
|
128
|
+
|
|
129
|
+
### Status: 485 tests across eleven modules
|
|
130
|
+
|
|
131
|
+
`tests/test_catalogue.py` (40 tests) + `tests/test_catalogue_v3.py` (42 tests) + all other test modules unchanged. Total actproof-py test count: 485 (up from 443 at v0.1.0).
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
### First usable release
|
|
136
|
+
|
|
137
|
+
The complete `actproof` library plus a working CLI. Every planned v0.0.x module has landed and is exercised by 423+ tests. v0.1.0 wires those modules into the `actproof` command-line tool, making the library usable end-to-end from a shell.
|
|
138
|
+
|
|
139
|
+
This is the version pushed to `main` on https://github.com/deyan-paroushev/actproof-py for the STS Standards Network application.
|
|
140
|
+
|
|
141
|
+
### Added
|
|
142
|
+
|
|
143
|
+
- **`actproof/cli.py`** — Click-based command-line interface, replacing the v0.0.1 placeholder. Three subcommands:
|
|
144
|
+
- **`actproof anchor MANIFEST_PATH`** - read a manifest JSON file, optionally acquire an RFC 3161 timestamp, anchor to Algorand in the requested mode, write the resulting receipt.
|
|
145
|
+
- `--mode {draft,demo,production}` (required, no default).
|
|
146
|
+
- `--output PATH` (required) - where to write the receipt.
|
|
147
|
+
- `--kms-resource PATH` - GCP KMS Ed25519 key version path for production signing. Mutually exclusive with the `ACTPROOF_MNEMONIC` env var.
|
|
148
|
+
- `--skip-timestamp` - skip RFC 3161 acquisition (offline testing only).
|
|
149
|
+
- `--wait/--no-wait` - poll algod until confirmation (default: wait).
|
|
150
|
+
- `--evidence-output PATH` - optional path to write the issuer evidence JSON (private addendum).
|
|
151
|
+
- **`actproof verify RECEIPT_PATH`** - read a receipt and run the six checks from `actproof.verify`. Exits 1 on any failure.
|
|
152
|
+
- `--catalogue PATH` - optional actproof-events catalogue path.
|
|
153
|
+
- `--git-commit SHA` - required when `--catalogue` is provided.
|
|
154
|
+
- `--source-uri URI` - required when `--catalogue` is provided.
|
|
155
|
+
- `--skip-anchor`, `--skip-timestamp` - skip the respective checks.
|
|
156
|
+
- `--json` - JSON output for scripting.
|
|
157
|
+
- **`actproof validate MANIFEST_PATH`** - validate a manifest against an actproof-events catalogue.
|
|
158
|
+
- `--catalogue PATH`, `--git-commit SHA`, `--source-uri URI` (all required).
|
|
159
|
+
- `--json` - JSON output for scripting.
|
|
160
|
+
- Each command supports `--help` (Click default) and exits with conventional codes: 0 on success, 1 on operational failure, 2 on usage error.
|
|
161
|
+
- Top-level `--verbose` flag enables DEBUG logging to stderr.
|
|
162
|
+
- `--version` flag prints the actproof version.
|
|
163
|
+
|
|
164
|
+
- **`tests/test_cli.py`** — 19 tests across six groups using Click's `CliRunner`. Covers `--version` and `--help`, validate happy path / JSON / catches unknown act / missing file, verify honest / tampered / skip-catalogue / JSON / requires-git-commit, anchor DRAFT-with-mnemonic / mode-required, anchor signer selection error paths (no source / both sources), exit codes. All tests offline; no real algod or TSA calls.
|
|
165
|
+
|
|
166
|
+
### Changed
|
|
167
|
+
|
|
168
|
+
- **`pyproject.toml`**: version bumped to 0.1.0. Development Status classifier moves from "2 - Pre-Alpha" to "3 - Alpha" reflecting feature completeness.
|
|
169
|
+
- **`actproof/__init__.py`**: version bumped to 0.1.0. No new public Python API (CLI is invoked via the `actproof` binary, not via import).
|
|
170
|
+
- **`README.md`**: rewritten to reflect that actproof is now a usable tool. Architecture diagram, install instructions, Quick Start sections for both CLI and Python API, honest scope statement of what v0.1.0 does NOT include.
|
|
171
|
+
|
|
172
|
+
### Design notes
|
|
173
|
+
|
|
174
|
+
**Mnemonic via env var only.** The CLI does NOT accept mnemonics as command-line arguments. Command-line args leak to shell history (`~/.bash_history`, `~/.zsh_history`), to the kernel's process table (visible via `ps aux` to other users on shared systems), to docker layer metadata, and to log aggregation systems. The env var path (`ACTPROOF_MNEMONIC`) is the lower-risk channel; the env var lives only in the shell session that invoked the command and is dropped when the process exits. Production users avoid mnemonics entirely and use `--kms-resource` for GCP KMS signing.
|
|
175
|
+
|
|
176
|
+
**Mode is required on `actproof anchor`.** No silent default. A user who runs `actproof anchor manifest.json --output receipt.json` gets a Click usage error pointing at the `--mode` flag, not a quiet submission to mainnet because someone changed the default. This is the same principle as the `anchor_manifest()` Python API: explicit choice is the only valid choice.
|
|
177
|
+
|
|
178
|
+
**No "anchor and verify" combined command.** Some early designs had a `commit` subcommand that anchored and then immediately verified. Removed: separating anchor from verify keeps the security model clean (the verifier is independent of the issuer), keeps the failure modes legible (verify failures after anchor are someone else's job to detect, not the issuer's job to silently retry), and matches the actual workflow (anchor at issuance time, verify at audit time, possibly years later).
|
|
179
|
+
|
|
180
|
+
**JSON output is opt-in via `--json`.** Default is human-readable colorised output (ANSI colors for terminals, plain text when stdout is redirected). Scripts wanting structured output pass `--json` and parse the result. This split keeps the human path obvious and the machine path explicit.
|
|
181
|
+
|
|
182
|
+
**Click chosen over argparse.** Click's group/command/option model maps cleanly to subcommands. Click's automatic help generation, automatic env-var binding (`envvar=`), automatic file-exists validation (`click.Path(exists=True)`), and `CliRunner` for testing each save substantial boilerplate over argparse equivalent. The added dependency cost (one pure-Python library) is modest.
|
|
183
|
+
|
|
184
|
+
### Status: v0.0.x → v0.1.0 milestone reached
|
|
185
|
+
|
|
186
|
+
This release closes the v0.0.x build phase. Every module in the architecture is implemented, tested, and exposed:
|
|
187
|
+
|
|
188
|
+
- `canonical.py` (v0.0.2) - RFC 8785 JCS wrapper.
|
|
189
|
+
- `manifest.py` (v0.0.3) - the canonical envelope schema.
|
|
190
|
+
- `catalogue.py` (v0.0.4) - actproof-events catalogue loader and validator.
|
|
191
|
+
- `receipt.py` (v0.0.5) - the artifact, public + private split.
|
|
192
|
+
- `timestamp.py` (v0.0.6) - RFC 3161 acquisition with QTSP failover.
|
|
193
|
+
- `anchor.py` (v0.0.7) - ARC-2 disclosed-mode Algorand submission.
|
|
194
|
+
- `signers/` (v0.0.8) - the AlgorandSigner ABC, MnemonicSigner, GoogleKMSSigner.
|
|
195
|
+
- `verify.py` (v0.0.9) - the six-check audit-facing verifier.
|
|
196
|
+
- `cli.py` (v0.1.0) - the Click-based command-line tool.
|
|
197
|
+
|
|
198
|
+
Total: 442 tests across ten modules, all passing offline. Next: v0.2.0 adds docs, worked examples, and the GitHub Action wrapper.
|
|
199
|
+
|
|
200
|
+
## [0.0.9] — 2026-05-14
|
|
201
|
+
|
|
202
|
+
### Added
|
|
203
|
+
|
|
204
|
+
- **`actproof/verify.py`**: six-check audit-facing verifier. Per-check status (PASS/FAIL/SKIP/ERROR), never short-circuits, structured `VerificationResult` output.
|
|
205
|
+
- **`tests/test_verify.py`**: 33 tests across 16 groups.
|
|
206
|
+
|
|
207
|
+
### Changed
|
|
208
|
+
|
|
209
|
+
- **`pyproject.toml`**: version bumped to 0.0.9.
|
|
210
|
+
|
|
211
|
+
## [0.0.8] — 2026-05-14
|
|
212
|
+
|
|
213
|
+
### Added
|
|
214
|
+
|
|
215
|
+
- **`actproof/signers/` package**: AlgorandSigner ABC with `__init_subclass__` enforcement, MnemonicSigner for testing, GoogleKMSSigner for production GCP users.
|
|
216
|
+
- **`tests/test_signers_*.py`**: 65 tests across three modules.
|
|
217
|
+
|
|
218
|
+
### Changed
|
|
219
|
+
|
|
220
|
+
- **`pyproject.toml`**: version bumped to 0.0.8. Added `[gcp]` optional dependency group.
|
|
221
|
+
|
|
222
|
+
## [0.0.7] — 2026-05-14
|
|
223
|
+
|
|
224
|
+
### Added
|
|
225
|
+
|
|
226
|
+
- **`actproof/anchor.py`**: three-mode anchoring (DRAFT/DEMO/PRODUCTION), Signer Protocol, ARC-2 disclosed-mode note construction.
|
|
227
|
+
- **`tests/test_anchor.py`**: 45 tests across 12 groups.
|
|
228
|
+
|
|
229
|
+
## [0.0.6] — 2026-05-14
|
|
230
|
+
|
|
231
|
+
### Added
|
|
232
|
+
|
|
233
|
+
- **`actproof/timestamp.py`**: RFC 3161 timestamp acquisition with six-TSA QTSP failover chain.
|
|
234
|
+
- **`tests/test_timestamp.py`**: 41 tests across 12 groups.
|
|
235
|
+
|
|
236
|
+
## [0.0.5] — 2026-05-14
|
|
237
|
+
|
|
238
|
+
### Added
|
|
239
|
+
|
|
240
|
+
- **`actproof/receipt.py`**: public Receipt + private IssuerEvidence, reserved COSE_Sign1 forward-compat slot.
|
|
241
|
+
- **`tests/test_receipt.py`**: 51 tests across 11 groups.
|
|
242
|
+
|
|
243
|
+
## [0.0.4] — 2026-05-14
|
|
244
|
+
|
|
245
|
+
### Added
|
|
246
|
+
|
|
247
|
+
- **`actproof/catalogue.py`**: actproof-events catalogue loader and manifest validator.
|
|
248
|
+
- **`tests/test_catalogue.py`**: 44 tests against synthetic + real v1.4-rc1 fixtures.
|
|
249
|
+
|
|
250
|
+
## [0.0.3] — 2026-05-14
|
|
251
|
+
|
|
252
|
+
### Added
|
|
253
|
+
|
|
254
|
+
- **`actproof/manifest.py`**: canonical envelope schema with label-bound evidence.
|
|
255
|
+
- **`tests/test_manifest.py`**: 68 tests across 11 groups.
|
|
256
|
+
|
|
257
|
+
## [0.0.2] — 2026-05-14
|
|
258
|
+
|
|
259
|
+
### Added
|
|
260
|
+
|
|
261
|
+
- **`actproof/canonical.py`**: RFC 8785 JCS wrapping the `rfc8785` library from Trail of Bits.
|
|
262
|
+
- **`tests/test_canonical.py`**: 76 tests.
|
|
263
|
+
|
|
264
|
+
## [0.0.1] — 2026-05-14
|
|
265
|
+
|
|
266
|
+
### Added
|
|
267
|
+
|
|
268
|
+
- Project skeleton: pyproject.toml, LICENSE (MIT), README.md, package layout, Hatchling build, Ruff/mypy/pytest configuration.
|
actproof-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Deyan Paroushev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|