Skip to main content

Cinchor SDK — accountability for autonomous agents on Omne (capability + attestation)

Project description

Cinchor Python SDK (cinchor)

Accountability for autonomous agents on Omne — the capability + attestation layer over the Omne base SDK (omne-sdk). Two verbs:

  • enforce(action) — authorize-or-refuse a consequential action. The substrate is the Policy Enforcement Point: an out-of-scope action commits no state change.
  • attest(decision) — commit a tamper-evident, independently-verifiable record of a decision and its context.

Plus the capability lifecycle (mint / revoke / update / allow-counterparty) and audit reads. Parity-matched with the TS @cinchor/sdk: capability ids, counterparty keys, context hashes, and addresses derive identically across SDKs.

Proprietary — © DoneUp, Inc. All rights reserved. Not open source.

Install

Distributed via git (no public registry — Cinchor is proprietary). Both repos are private, so this needs git access to OmneDAO/omne-sdks + cinchor-hq/cinchor. Install the Omne base SDK first, then Cinchor:

# 1) Omne base SDK (dependency)
pip install "git+ssh://git@github.com/OmneDAO/omne-sdks.git@python/v0.1.0#subdirectory=python"
# 2) Cinchor
pip install "git+ssh://git@github.com/cinchor-hq/cinchor.git@sdk-py/v0.1.0#subdirectory=sdk-py"

(Use git+https://… instead of git+ssh://… if your git auth is HTTPS-based.)

Local development:

pip install -e ../../omne/sdk/python   # the Omne base SDK
pip install -e .                       # from sdk-py/

Quickstart

from omne_sdk import Wallet
from cinchor import CinchorClient, CinchorConfig, NetworkConfig, ContractConfig

principal = Wallet.from_mnemonic("…").get_account(0)
agent     = Wallet.from_mnemonic("…").get_account(0)

cinchor = CinchorClient.connect(CinchorConfig(
    network=NetworkConfig("ignis", 3, "http://127.0.0.1:26657"),
    contract=ContractConfig(name="cinchor_permissions", address="om1z…"),
))

cap = cinchor.mint_capability(principal=principal, agent=agent.address,
                              max_spend=100, ttl_seconds=3600)["capability_id"]
out = cinchor.enforce(capability=cap, agent=agent, amount=40)   # out.allowed / out.reason
att = cinchor.attest(capability=cap, agent=agent, context={"decision": "…"})
ok  = cinchor.verify_attestation({"decision": "…"}, att["attestation_id"])["ok"]

Layout

Module Responsibility
config.py network/contract config, export_prefix_for, BURN_SENTINEL
types.py CapabilityStatus / EnforcementCode / Verdict + state dataclasses
ids.py derive_capability_id, counterparty_key (om1z, on the base SDK)
attestation.py canonical-JSON context hashing, derive_attestation_id, verify
registry.py CapabilityRegistry — typed contract calls on OmneClient
client.py CinchorClient — the two verbs + lifecycle + audit reads

Validate

examples/full_flow.py drives the full lifecycle against a live node: python full_flow.py <rpc> <contract> <wallets.json> — mint → enforce (in-bounds ×2, over-budget refused) → attest + verify (tamper-evident) → revoke → refused.

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

cinchor-0.1.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

cinchor-0.1.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cinchor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 896019758022b334ae93d1f8c86f13aca190511231cc1d7002c8c7edfa54bf75
MD5 1850b5c5f51ec84af64f5a905d9c8be5
BLAKE2b-256 1f01101a045ba8f78d1e2c9e48d04302d364ef41c9c9150a55cc826e0ec147ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cinchor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for cinchor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 792efabd9348597e1f0efb898c9c6f169cabfdc158f429bc958cf46e0059460a
MD5 a0fbaaed03d91d57bd8617f0c5e28e09
BLAKE2b-256 6b350a58bf58261d7de9cc575216b87a55158fbbca0d5dae96e5aa5587eea4ab

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