calculateStatementFideId
Calculate a Fide ID for a Statement from its RDF triple components. Creates a statement Fide ID by hashing the reference identifier: concatenation of subject, property, and object Fide IDs in that order, separated by ASCII `|`. No whitespace. This helper always returns the self-referential Statement form (Entity Type/Reference Type = `0000`).
Node Runtime Required
Parameters
Returns
Prop
Type
import { calculateStatementFideId } from '@fide-work/id';
const result = await calculateStatementFideId(
'did:fide:0x10205fcbdc6d73bcfcd2c73eb4795c2f02f1d1c1',
'did:fide:0x312047e49369039d57063d0535a246065fbf9c9e',
'did:fide:0x1020f200f70f531f0f9cce26e9f4bf0bfa5f15d6',
);Type Definitions
type FideIdCalculationOptions
Options for Fide ID calculation helpers. Reserved for forward-compatible toggles without changing function signatures.
FideIdCalculationOptionsProperties
Prop
Type
calculateFideId
Core primitive: calculate a Fide ID from type codes and reference identifier. Deterministic SHA-256 hash of the reference identifier (UTF-8), then constructs `did:fide:0x` + 2 hex (entity type) + 2 hex (reference type) + first 36 hex of hash = 40 hex total.
normalizePropertyReferenceIdentifier
Normalize a property reference identifier to canonical URL form. Property reference identifiers must be canonical absolute `https` URLs without userinfo.