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

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.1.0.tar.gz (11.9 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.1.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for adp_agent_anchor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6172b1755e28ba1bd14e0caffb1200bff8c864ab08630fd8a0b813b20988306e
MD5 bff2bdbee3f7b56ee974d8335c0e92e9
BLAKE2b-256 c618187b58ffa846e5c11ef825049270b70f31a5d2c72af5d2a40ff64225425a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for adp_agent_anchor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c162a6f62f6b1df753b94c2db492cf9de02b63caa44685f6e2437e8e478821ae
MD5 482408838d4edd5be91c7aea0ac44a8b
BLAKE2b-256 2043744aaf0c6615dc4c0ab9a74742aa0e4531ffb173e10158aaff5d101fd93a

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