Skip to main content

Neo3 blockchain anchor for ADP calibration snapshots. Optional extension to adp-agent (Python runtime) that periodically commits signed calibration snapshots to a Neo3-compatible chain.

Project description

adp-agent-anchor

PyPI Downloads Python License Spec

Optional Neo3 blockchain anchor for adp-agent (Python runtime). Commits signed calibration snapshots to a Neo3-compatible chain on a schedule for third-party tamper evidence.

pip install adp-agent adp-agent-anchor

Why it's optional

The always-on signed calibration snapshot at /.well-known/adp-calibration.json (ADJ §7.4) is the primary trust mechanism — peers and registries verify against it with one HTTPS fetch plus a signature check, no chain required. The chain anchor is a strictly optional overlay that adds:

  1. Third-party verification without routing through the registry
  2. Evidence that survives agent disappearance — the anchored record stays on-chain even if the agent's HTTPS endpoint goes offline
  3. Anti-rewrite defense — on-chain records are mechanically detectable if an agent later rewrites its journal

Supported targets

All four targets use the same Neo3BlockchainStore client and the same CalibrationStore.cs smart contract — only the RPC URL, contract hash, and signing wallet change.

Target Use case
mock Unit tests (in-memory, no network)
neo-express Local dev chain
neo-custom Operator's existing private Neo3 chain
neo-testnet Public Neo N3 testnet
neo-mainnet Public Neo N3 mainnet

Usage

from adp_agent import AdpAgentHost
from adp_agent_anchor import BlockchainStoreFactory, CalibrationAnchorScheduler

host = AdpAgentHost(config)

if config.calibration_anchor and config.calibration_anchor.enabled:
    store = BlockchainStoreFactory.create(config.calibration_anchor)
    if store:
        scheduler = CalibrationAnchorScheduler(config, host.journal, store)
        host.after_start(scheduler.start)
        host.before_stop(scheduler.stop)

await host.run()

Status

v0.1.0: Neo3BlockchainStore is stubbed. The interface is defined and MockBlockchainStore + CalibrationAnchorScheduler are fully functional, but the actual Neo3 RPC client wiring is deferred to v0.2.0. Adopters who need Neo3 anchoring today should use the TypeScript runtime's @ai-manifests/adp-agent-anchor package, which has a working implementation built on @cityofzion/neon-js.

License

Apache-2.0 — see LICENSE for the full license text and NOTICE for attribution.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adp_agent_anchor-0.6.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adp_agent_anchor-0.6.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file adp_agent_anchor-0.6.0.tar.gz.

File metadata

  • Download URL: adp_agent_anchor-0.6.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.3

File hashes

Hashes for adp_agent_anchor-0.6.0.tar.gz
Algorithm Hash digest
SHA256 65a28e41357fde7414e62e1ff51ae5821204ec3e95c4c7777e63abc8ecab766b
MD5 438c83ca8b4d4fe42d33752575c9f02b
BLAKE2b-256 64c26912eae35d3afb3f8e1d9199751cb8c485fcfb3e7fced0dca604db0d4222

See more details on using hashes here.

File details

Details for the file adp_agent_anchor-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for adp_agent_anchor-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d0d0ce4ea35ab53f4c28b9aac900cbf0bbb44c15a52a06ae3724b876444c508
MD5 ec837367e2fce633db5612b721390513
BLAKE2b-256 920243df72737b62512e4d445ed12fc684cfe0ee158fc41a20370cad854b7be0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page