Claim-Graph is a chain-neutral system for creating, attesting, and verifying claims about the world. It enables portable trust—reputation that can move between different blockchain ecosystems, prediction markets, and decentralized applications.
Built on top of IPFS and DAG-Time, Claim-Graph provides:
- Content-addressed claims with cryptographic integrity
- Witness attestations using ed25519 signatures
- Reputation scoring that tracks witness behavior over time
- Time anchoring via DAG-Time's drand integration
go get github.com/systemshift/claim-graphimport (
"github.com/systemshift/claim-graph/claim""github.com/systemshift/claim-graph/store"
)go install github.com/systemshift/claim-graph/cmd/claimctl@latestclaimctl identity create
# Created witness identity:# ID: 2feac6a20abe481de325d933fbfc4f5d875c2d54290f0f45a875d7f6b6111aea# Saved to: ~/.claimctl/identity.jsonclaimctl claim create \
--subject "https://example.com/sports/match-123" \
--predicate "result" \
--object "Manchester United won 2-1" \
--domain "sports"# Claim CID: bafkreifzr6prp4qymiioooqzjrpsrvpjdiff2ibqpr6o7czc5daipitndeclaimctl witness attest bafkreifzr6prp4qymiioooqzjrpsrvpjdiff2ibqpr6o7czc5daipitnde
# Attestation added to claimclaimctl claim verify bafkreifzr6prp4qymiioooqzjrpsrvpjdiff2ibqpr6o7czc5daipitnde
# CID verification: OK# Attestations: 2 validpackage main
import (
"fmt""github.com/systemshift/claim-graph/claim"
)
funcmain() {
// Create a witnesswitness, _:=claim.GenerateWitness()
fmt.Printf("Witness ID: %s\n", witness.ID)
// Create a claimstatement:= claim.Statement{
Subject: "https://example.com/page",
Predicate: "contains",
Object: "Hello World",
Domain: "web",
}
c, _:=claim.NewClaim(statement, []string{"evidence-cid"}, "dag-time-event")
fmt.Printf("Claim CID: %s\n", c.ID)
// Attest to the claimattestation, _:=witness.Attest(c)
c.AddAttestation(attestation)
// Verifyerr:=c.VerifyAllAttestations()
fmt.Printf("Valid: %v\n", err==nil)
}A claim is a statement about the world with supporting evidence:
typeClaimstruct {
IDstring// Content-addressed identifier (CID)StatementStatement// What is being claimedEvidence []string// CIDs of supporting dataTimeEventstring// DAG-Time event for temporal orderingWitnesses []Attestation// Signatures from witnesses
}
typeStatementstruct {
Subjectstring// What the claim is aboutPredicatestring// The relationship or propertyObjectstring// The value or targetDomainstring// Category (e.g., "sports", "web", "finance")
}Witnesses are entities that attest to claims using ed25519 signatures:
// Generate a new witnesswitness, _:=claim.GenerateWitness()
// Attest to a claimattestation, _:=witness.Attest(claim)
// Verify an attestationerr:=claim.VerifyAttestation(claim, attestation)Reputation is computed from witness behavior over time:
store:=claim.NewReputationStore()
// Record attestations and outcomesstore.RecordAttestation(witnessID, "sports")
store.RecordAgreement(witnessID, "sports") // Witness was correct// Get reputationrecord, _:=store.GetRecord(witnessID)
score:=record.Score() // Overall score (0-1)domainScore:=record.DomainScore("sports") // Domain-specific score// Compute claim confidence based on witness reputationsconfidence:=claim.ClaimConfidence(c, store)Claims can be stored on IPFS:
s, _:=store.NewIPFSStore(store.IPFSConfig{
APIURL: "http://localhost:5001",
})
// Store a claimcid, _:=s.Put(ctx, claim)
// Retrieve a claimclaim, _:=s.Get(ctx, cid)
// List claims by filtercids, _:=s.List(ctx, &store.Filter{
Domain: "sports",
WitnessID: "abc123...",
})┌─────────────────────────────────────────────────────────────┐
│ Consumers │
│ - Prediction markets (add staking/slashing) │
│ - Blockchain oracles (consume verified claims) │
│ - Applications (use reputation for trust decisions) │
└─────────────────────────────────────────────────────────────┘
↑ reads
┌─────────────────────────────────────────────────────────────┐
│ Claim-Graph │
│ - Claims with evidence + witness signatures │
│ - Reputation computed from history │
│ - No tokens, no staking (chain-neutral) │
└─────────────────────────────────────────────────────────────┘
↑ uses
┌─────────────────────────────────────────────────────────────┐
│ DAG-Time │
│ - "No later than" timestamps via drand │
│ - Verifiable temporal ordering │
└─────────────────────────────────────────────────────────────┘
↑ runs on
┌─────────────────────────────────────────────────────────────┐
│ IPFS │
│ - Content-addressed storage │
│ - P2P distribution │
└─────────────────────────────────────────────────────────────┘
When you join a new blockchain or decentralized system, you start with zero reputation. But your behavior on other systems is publicly visible—just not verifiable across boundaries.
Claim-Graph creates a neutral layer where:
- Evidence is external (IPFS CIDs) - anyone can verify content
- Time is external (drand via DAG-Time) - anyone can verify ordering
- Reputation is computed from verifiable claim history
- Any system can read the claim graph to bootstrap trust
Traditional oracles are closed loops—reputation exists only within one ecosystem. Claim-Graph enables:
- Witnesses build reputation across multiple systems
- New systems can import existing trust
- No tokens or staking required (consumers add their own incentives)
claimctl - Claim Graph CLI
Commands:
identity create Create new witness keypair
identity show Show current witness ID
claim create Create a new claim
claim get <cid> Get a claim by CID
claim verify <cid> Verify a claim's integrity and attestations
witness attest <cid> Attest to a claim
witness reputation <id> Check witness reputation
Options:
--ipfs IPFS API URL (default: http://localhost:5001)
- Go 1.22+
- IPFS node (optional, for storage)
BSD 3-Clause License. See LICENSE for details.