assertFideId
Assert that a value is a properly formatted Fide ID. Valid format is: `did:fide:0x` prefix followed by exactly 40 hexadecimal characters (case-insensitive).
Node Runtime Required
This function requires a Node.js runtime and is disabled in the browser docs preview.
assertFideId(value)
Parameters
valuestring*
The Fide ID reference (format: did:fide:0x...)
Returns
Prop
Type
import { assertFideId } from '@fide-work/id';
const result = assertFideId('did:fide:0x10205fcbdc6d73bcfcd2c73eb4795c2f02f1d1c1');Type Definitions
type FideId
Full Fide ID format (with did:fide:0x prefix). Length: 11 ("did:fide:0x") + 40 hex = 51 chars.
`did:fide:0x${string}`SDK
JavaScript SDK reference for Fide ID.
buildFideIdFromParts
Build a Fide ID from type code, source code, and fingerprint (no hashing). Use when you already have the fingerprint (e.g. from a database) and need to reconstruct the full Fide ID. For computing a new Fide ID from a reference identifier, use `calculateFideId` instead.