Skip to main content

Identity Anchor Protocol SDK for signing requests and offline certificate verification

Project description

iap-sdk

Python SDK for Identity Anchor Protocol (IAP) request signing and offline certificate verification.

Install

Published package:

python -m pip install -U pip
python -m pip install iap-agent
iap-agent version

Local editable development install:

python -m pip install -e ".[dev]"

What this package provides

  • Deterministic agent_id derivation from Ed25519 public keys
  • Canonical request builders and signers for continuity, lineage, key rotation
  • Registry API client helpers
  • Offline certificate verification (including identity-anchor checks)
  • Liveness and transparency helper utilities

Quick example

from iap_sdk import build_continuity_request, sign_continuity_request

payload = build_continuity_request(
    agent_public_key_b64="...",
    agent_id="ed25519:...",
    memory_root="a" * 64,
    sequence=1,
    manifest_version="IAM-1",
    manifest_hash="b" * 64,
)
signed = sign_continuity_request(payload, private_key_bytes=b"...")

Run tests

pytest

Reproducible install

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install -e ".[dev]"
iap-agent version

For a clean-room install smoke test, run:

./scripts/smoke_install.sh

Validate CLI snippets in docs:

python scripts/validate_doc_commands.py

CLI (beta)

Install editable and run:

python -m pip install -e ".[dev]"
iap-agent version
iap-agent version --json
iap-agent init
iap-agent init --show-public --json
iap-agent amcs root --amcs-db ./amcs.db --agent-id ed25519:...
iap-agent anchor issue --registry-base https://registry.ia-protocol.com --agent-name "Atlas"
iap-agent continuity request --registry-base https://registry.ia-protocol.com --json
iap-agent continuity pay --request-id <request-id> --open-browser
iap-agent continuity wait --request-id <request-id> --json
iap-agent continuity cert --request-id <request-id> --json
iap-agent verify ./certificate.json --registry-public-key-b64 <key>
iap-agent flow run --registry-base https://registry.ia-protocol.com --output-dir ./artifacts

CLI exit codes

  • 0: success
  • 1: validation/config/user input error
  • 2: network/registry unavailable
  • 3: timeout waiting for certification
  • 4: verification failure

Version compatibility

See /COMPATIBILITY.md for pinned SDK/protocol/registry API assumptions.

Docs

  • /docs/quickstart-first-certificate.md
  • /docs/e2e-user-walkthrough.md
  • /docs/e2e-dev-local-walkthrough.md
  • /docs/operator-runbook-payments.md
  • /docs/local-amcs-privacy-model.md
  • /docs/lnbits-vs-stripe-flow.md
  • /docs/troubleshooting.md
  • /docs/migration-cli-first.md

Beta mode config

Default config path:

~/.iap_agent/config.toml

Example:

beta_mode = true
maturity_level = "beta"
registry_base = "https://registry.ia-protocol.com"
amcs_db_path = "./amcs.db"

Environment override:

export IAP_REGISTRY_BASE="https://registry.ia-protocol.com"

Local development override example:

registry_base = "http://localhost:8080"

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

iap_agent-0.1.1.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

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

iap_agent-0.1.1-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file iap_agent-0.1.1.tar.gz.

File metadata

  • Download URL: iap_agent-0.1.1.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for iap_agent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8e05eeb8c19160d38680c673d51c68503d759f8acb6842863fcb63bc77c422e5
MD5 aa56aa6b8f1e9beb4a3785199b7ce61e
BLAKE2b-256 f3b409e9b0214073be030a60c20b534ed8d8fcdcb815f552baa897ee2595b471

See more details on using hashes here.

Provenance

The following attestation bundles were made for iap_agent-0.1.1.tar.gz:

Publisher: release.yml on identity-anchor-protocol/iap_sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iap_agent-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: iap_agent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for iap_agent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13760392ba3baa89a6c60d0db21e4b77dcf807382966a9c2f55a6bbc5b48fa00
MD5 ee61fb7740705684ab812ac6e6bb1b86
BLAKE2b-256 fb6c35cbb8210b72c68c322ad7e6ff0c42249799eeafd27e785300327f229236

See more details on using hashes here.

Provenance

The following attestation bundles were made for iap_agent-0.1.1-py3-none-any.whl:

Publisher: release.yml on identity-anchor-protocol/iap_sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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