calculateFideId
Calculate a Fide ID for an entity from its type, source type, and raw identifier. Generates a unique identifier by creating a SHA-256 hash of the raw identifier, then constructing a Fide ID with type and source characters followed by the last 38 hex characters.
calculateFideId(entityType, sourceEntityType, rawIdentifier)
Parameters
entityTypeFideEntityType*
The entity type.
sourceEntityTypeFideEntityType*
The source entity type.
rawIdentifierstring*
The raw identifier string to hash.
Returns
Prop
Type
import { calculateFideId } from '@fide.work/fcp';
const result = await calculateFideId(
'Person',
'Product',
'https://x.com/alice'
);Type Definitions
type FideEntityTypeRelated docs
Valid FCP entity type names derived from `FIDE_ENTITY_TYPE_MAP`.
"Statement" | "Person" | "Organization" | "AutonomousAgent" | "Place" | "Event" | "Product" | "CreativeWork"SDKs
Complete API surface for @fide.work/fcp
calculateStatementFideId
Calculate a Fide ID for a Statement from its RDF triple components. Creates a statement Fide ID by hashing a canonical JSON representation of the subject-predicate-object triple. The resulting Fide ID always has type and source both set to Statement (0x00...).