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.1.tar.gz (37.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.2.1-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fidemark-0.2.1.tar.gz
  • Upload date:
  • Size: 37.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.2.1.tar.gz
Algorithm Hash digest
SHA256 9e6a7f24f2baf983430c1ac83fb941f4d7b43b3905480438349a70e9e2c63d0d
MD5 86efd4231a09ba1e232db1900f849a79
BLAKE2b-256 b6815e0c4c027224341464f0172e94ff8d9312bbd41bb2d217a0290f30769e3b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fidemark-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 41.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6af4c4a9023a822a87393def8500c5309db51933206134e9c7e2e5edb59c38c3
MD5 f0131bdb9c15a98076175c53a30055a1
BLAKE2b-256 638cb76cd5963140c2cba80e75a87c9975fb032a5645dfb377edac88ba206eb3

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