Skip to main content

oris-kya-verify

Standalone Know-Your-Agent verifier. Reads on-chain EAS attestations and verifies EIP-712 signatures with zero Oris API dependency. Drop into any payment gateway, wallet provider, or compliance pipeline to verify the agent on the other side of a transaction.

The package implements the public KYABundle schema published at docs.useoris.xyz/spec/kya-bundle-v1.json. Any KYA attestation issued by Oris on Base, Ethereum, Arbitrum, or Optimism mainnet can be verified by this library without ever hitting an Oris service.

Why this exists

Oris issues two parallel attestations for every Know-Your-Agent state transition (promote, demote, suspend):

  1. An off-chain EIP-712 signed message recoverable to the Oris MPC key.
  2. An on-chain EAS attestation on Base + Ethereum (with optional replication to Arbitrum / Optimism).

A third party can verify either independently. This library wraps both checks behind a single KYAVerifier.verify() call.

Install

pip install oris-kya-verify

Dependencies: httpx, coincurve, eth-abi. No web3.py, no Postgres, no Oris SDK.

Usage

import asyncio
from oris_kya import KYAVerifier

async def main():
    verifier = KYAVerifier(chain="base")
    bundle = await verifier.verify("did:ethr:8453:0x7f3a9c2d1b4e5f6a7b8c9d0e1f2a3b4c5d6e7c2d")

    print(f"KYA level: {bundle.kya_level}")
    print(f"Risk score: {bundle.risk_score}/100")
    print(f"Status: {bundle.kya_status}")
    print(f"Attestation UID: {bundle.attestation_uid}")
    print(f"Signed by: {bundle.signer_address}")  # Should match the Oris MPC key
    print(f"Issued at: {bundle.issued_at}")
    print(f"Expires at: {bundle.expires_at}")
    print(f"Expired? {bundle.is_expired}")

    if bundle.kya_level >= 3 and not bundle.is_expired:
        # Authorize the payment.
        pass

asyncio.run(main())

Supported chains

Chain EAS contract Default RPC
base 0x4200000000000000000000000000000000000021 https://mainnet.base.org
ethereum 0xA1207F3BBa224E2c9c3c6D5aF63D0eb1582Ce587 https://eth.llamarpc.com
arbitrum 0xbD75f629A22Dc1ceD33dDA0b68c546A1c035c458 https://arb1.arbitrum.io/rpc
optimism 0x4200000000000000000000000000000000000021 https://mainnet.optimism.io

Override rpc_url in the KYAVerifier constructor to point at your own RPC (recommended for production: Alchemy, Infura, Helius, etc.).

Error handling

The library raises typed exceptions you can catch by category:

  • KYANotAttestedError — no on-chain attestation exists for this agent.
  • KYAExpiredError — the latest attestation has passed its expires_at.
  • KYAInvalidSignatureError — the EIP-712 signature does not recover to the expected Oris MPC signer.
  • KYAVerificationError — base class for any of the above.

Network failures bubble up as httpx.HTTPError. The library never silently fails: every "yes" answer is cryptographically grounded.

Schema

The KYABundle returned by verify() is a frozen dataclass that mirrors the public JSON schema at docs.useoris.xyz/spec/kya-bundle-v1.json. Use the schema directly if you are implementing your own verifier in a different language.

License

Apache-2.0. See LICENSE.

Metadata

Release files for oris-kya-verify 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oris-kya-verify 0.3.0
File Size Uploaded
oris_kya_verify-0.3.0.tar.gz 25.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oris-kya-verify 0.3.0
File Interpreter ABI Platform
oris_kya_verify-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 46.6 kB

Release files / oris_kya_verify-0.3.0.tar.gz

Download URL oris_kya_verify-0.3.0.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7768aa39fdf8a4c9a4ea572ec3ef2e49406adacabe4e218da0722f6cab81d9c0
BLAKE2b-256 checksum
How to use checksums
b3c3dc764bbb923b6d3231cb998bc39bd08ee59950adf6f605e00e5bc7790e86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / oris_kya_verify-0.3.0-py3-none-any.whl

Download URL oris_kya_verify-0.3.0-py3-none-any.whl
Size 21.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b896ad05ddcb9303f6bb5cf24edeeb57aa5463a5d2ae1f0b17b84888d530d1c6
BLAKE2b-256 checksum
How to use checksums
1db15b6629752306880b693231fd55c668d3025af168bfce85431295f97cb7e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page