Skip to main content

Fidemark Protocol, Python SDK

Project description

fidemark

Prove it's real. Prove it's AI. Prove it on-chain.

Official Python SDK for Fidemark, a permissionless, tokenless content-provenance protocol built on Ethereum Attestation Service on Base (L2). Use it to attest human authorship or AI-generated output, verify those attestations on chain, and walk provenance chains.

  • Two complementary attestation flows on one EAS foundation: Human Proof and AI Proof.
  • Permissionless, no allowlist, no consortium, no protocol token.
  • Verifiable without trust: every attestation is a public on-chain record.
  • Deployed network addresses + schema UIDs ship inside the wheel, so get_network("base-sepolia") just works.

Install

pip install fidemark

Requires Python 3.11 or newer. Server-side only.

Quickstart

import os
from fidemark import AttestHumanInput, Fidemark, get_network, hash_content

fidemark = Fidemark(
    network=get_network("base-sepolia"),     # or "base"
    private_key=os.environ["PRIVATE_KEY"],
)

# 1. Attest authored content
result = fidemark.attest_human(AttestHumanInput(
    content="An essay I wrote myself.",
    content_type="text/article",
))
print(result.verify_url)                     # https://verify.fidemark.dev/0x...

# 2. Verify any attestation by UID, no signer required
att = fidemark.verify(result.uid)
print(att.attester, att.content_hash)

# 3. Find every attestation on a piece of content
matches = fidemark.verify_by_hash(hash_content(my_article))

A standalone read-only client (no private_key) is enough for verification:

reader = Fidemark(network=get_network("base"))
att = reader.verify(uid)

What you can do

Capability Method
Attest authored content attest_human(AttestHumanInput(...))
Attest AI output (model + prompt hash) attest_ai(AttestAIInput(...))
ENS-verified Human Proof attest_human_with_ens(AttestHumanInput(...))
Multi-party (N-of-N) co-attestation attest_multi_party(AttestMultiPartyInput(...))
Verified-human (Worldcoin PoP) attest_human_with_pop(AttestHumanWithPoPInput(...))
Off-chain EIP-712 envelopes (zero gas) attest_human_offchain, attest_ai_offchain, verify_offchain
Bring an off-chain envelope on-chain publish_offchain(envelope) (anyone with funds can publish)
Verify a UID verify(uid)
Find every attestation on a content hash verify_by_hash(content_hash)
Walk a provenance chain verify_chain(uid)
Revoke (only the original attester) revoke(uid)
Inspect without raising inspect(uid) returns {"ok": True, "attestation"} or {"ok": False, "reason"}

Trust layers (proof_method) supported today: wallet-signed (L0), ens-verified (L1), multi-party (L2), pop-verified-worldid (L4). See Trust layers for the full design.

Networks

Network Argument Notes
Base Sepolia get_network("base-sepolia") testnet (chainId 84532)
Base mainnet get_network("base") (chainId 8453)

The published wheel bundles each network's deployment artifact (resolver address + schema UIDs) inside fidemark/deployments/. If you call get_network(name) against a network this version of fidemark predates, the call raises NETWORK_NOT_DEPLOYED. Upgrade the package or wait for the next release.

Errors

Every failure surfaces a FidemarkError with a stable code string so you can branch on it without parsing messages:

from fidemark import FidemarkError

try:
    fidemark.revoke(uid)
except FidemarkError as err:
    if err.code == "VALIDATION_REJECTED":
        # Only the original attester can revoke.
        ...

Codes: INVALID_INPUT, NETWORK_NOT_DEPLOYED, ATTESTATION_NOT_FOUND, ATTESTATION_REVOKED, UNKNOWN_SCHEMA, INSUFFICIENT_FUNDS, VALIDATION_REJECTED, USER_REJECTED, RPC_ERROR, NOT_YET_IMPLEMENTED, UNKNOWN.

Configuration

Fidemark(
    network,                # required: NetworkConfig
    private_key=...,        # for write ops
    provider_url=...,       # override the default Base RPC
    ens_provider_url=...,   # Ethereum mainnet RPC for ENS-verified attestations
    verify_url_base=...,    # override the verify-URL host (default: https://verify.fidemark.dev)
    indexer=...,            # "events" (default), "graphql", or "auto"
    indexer_url=...,        # EAS GraphQL endpoint for verify_by_hash on busy mainnet RPCs
)

See docs.fidemark.dev/sdk/configuration for the full surface.

Documentation

Versioning

Semantic versioning. The bundled deployment artifacts are versioned alongside the package: pinning to a specific fidemark version pins to a specific snapshot of resolver addresses + schema UIDs, so you can audit exactly which contracts an installed version routes to.

Issues

This repository is a published mirror of the Fidemark monorepo. Source lives privately, but issues and feature requests are tracked here, please open one if you hit a bug or want to propose an addition.

License

Apache License 2.0. See LICENSE and NOTICE.

This SDK is the open-source client library for the Fidemark Protocol. The protocol contracts and all related apps and services live in a private repository and are licensed separately under proprietary terms; the deployed contract bytecode is independently verifiable on-chain at the addresses bundled in this package.

© 2026 Vincent Cibelli (VinciDev). The "Fidemark" name, logo, and brand are reserved by Vincent Cibelli (VinciDev) and are not granted by Apache 2.0. Forks of this SDK are welcome under the License, but please rename them so users can tell them apart from the official Fidemark project.

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

fidemark-0.1.0.tar.gz (34.8 kB view details)

Uploaded Source

Built Distribution

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

fidemark-0.1.0-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fidemark-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3efbe4461bf20e0cd71f843061cb28340192f39eee86dffd95c8dc2562592886
MD5 df6ca403a43efe547b4855cee1e8d2bc
BLAKE2b-256 e844277e14551c96c49ea3243abc1b44a41f300892fe98a2f7493aea6ee21a41

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fidemark-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0491111cbc6f33436ac4fec81d309a71657c5592b0d8dce16ed36a0df143e319
MD5 4d1fc90ba11e1e8873b5ccb7f14ad5e6
BLAKE2b-256 f8b363a207f3360846fa1c0321166343062e0523f1f7dfecfa7a189317142b5e

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