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.2.0.tar.gz (37.6 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.2.0-py3-none-any.whl (41.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fidemark-0.2.0.tar.gz
Algorithm Hash digest
SHA256 294f77cb00450cde5fd68c1de1358cd1eef59953507d5f8bdf9fb2c3d937bb03
MD5 9e403b53921b5cec5a36df372c14195d
BLAKE2b-256 69ce67eef7f88e8f2b60d4f9fbef9ba574ab4ad68f7839f8e46e45272f317349

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fidemark-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 41.1 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b3b196e60025eee658134883c910871f46d5be5eddd612b8e0654cf62cc1c42
MD5 6a4323df3c72cfa0f6b3cbf60ad985e2
BLAKE2b-256 1581a1da549d737474845397a1ad9a108f26c3fbfd1ae0524d21b555255a2f3b

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