Skip to content

Getting started

This guide takes you from install to a verified attestation on Base, in TypeScript, Python, or Go.

Terminal window
npm install @fidemark/sdk ethers
import { Fidemark, getNetwork } from "@fidemark/sdk";
import { JsonRpcProvider, Wallet, NonceManager } from "ethers";
const network = getNetwork("base-sepolia"); // or "base" for mainnet
const provider = new JsonRpcProvider(network.rpcUrl);
const signer = new NonceManager(new Wallet(process.env.PRIVATE_KEY!, provider));
const fidemark = new Fidemark({ network, signer });
const { uid, verifyUrl } = await fidemark.attestHuman({
content: "An essay I wrote myself.",
contentType: "text/article",
});
console.log(uid);
console.log(verifyUrl);

The SDK hashed your content client-side, encoded the EAS payload, signed the transaction, and broadcast it. The original content never left your machine; only the SHA-256 digest went on chain.

const att = await fidemark.verify(uid);

All three return the same shape: type, attester, contentHash, decoded type-specific fields (human, ai, …), and revoked. Or open verifyUrl in any browser, verification is a read-only on-chain query, no wallet required.

const result = await fidemark.attestAI({
content: aiResponseText,
modelId: "claude-sonnet-4-6",
provider: "anthropic",
prompt: originalPrompt,
parameters: { temperature: 0.7 },
});

The SDK hashes the prompt to bytes32 so the attestation proves which prompt produced the output without revealing the prompt itself.