extractFideIdTypeAndSource
Extract the type and source hex characters from a Fide ID. Returns the first two hex characters after the prefix, which encode the entity type and source type.
extractFideIdTypeAndSource(fideId)
Parameters
fideIdstring*
The Fide ID reference (format: did:fide:0x... or 0x...)
Returns
Prop
Type
import { extractFideIdTypeAndSource } from '@fide.work/fcp';
const result = extractFideIdTypeAndSource('did:fide:0x152f02f1d1c1e62b2e569e11818420c1968be3d9');extractFideIdFingerprint
Extract the 38-character fingerprint from a Fide ID. The fingerprint comprises the last 38 hex characters after the type and source bytes, representing the last 19 bytes of the SHA-256 hash used to create the Fide ID.
getStatementRawIdentifier
Get the normalized JSON string for a statement's raw identifier. Generates a deterministic JSON representation of an RDF triple with keys in alphabetical order. This ensures the same statement always produces the same Fide ID across all implementations.