Skip to content

Configuration

Each SDK uses the same set of configuration knobs. Only the names and types change to match each language’s conventions.

new Fidemark({
network, // "base-sepolia" | "base" | NetworkConfig
signer, // optional: ethers Signer
privateKey, // optional: hex private key
provider, // optional: ethers Provider (read-only)
verifyUrlBase, // optional: override the public verify URL
ensProvider, // optional: Ethereum mainnet Provider for ENS lookups
});
import { Fidemark, getNetwork } from "@fidemark/sdk";
import { JsonRpcProvider } from "ethers";
const fidemark = new Fidemark({
network: getNetwork("base"),
provider: new JsonRpcProvider("https://your-rpc.example.com"),
privateKey: process.env.PRIVATE_KEY,
});

All three SDKs support the same modes:

  1. Pass a private key (or, in TypeScript, an ethers Signer). The SDK builds a transaction signer bound to the network’s RPC.
  2. Read-only: omit the key entirely. Verify methods work; the attest and revoke methods raise INVALID_INPUT.

In TypeScript, signer and privateKey are mutually exclusive. The Python and Go SDKs accept the private key only.

The default is https://verify.fidemark.dev/<uid>. Override per-instance via verifyUrlBase / verify_url_base / VerifyURLBase. Useful when self-hosting the verify page on a private domain.

NetworkConstructor arg
Base SepoliagetNetwork("base-sepolia")
Base mainnetgetNetwork("base")

The resolver address and schema UIDs for each public network are bundled inside the published SDK package, so getNetwork(name) returns a fully-populated config without any extra setup. If you call it for a network where Fidemark hasn’t rolled out yet, or your installed SDK version predates that rollout, the call raises NETWORK_NOT_DEPLOYED. Upgrade the package or wait for the next release.