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.
Node Runtime Required
Parameters
Returns
Prop
Type
import { buildFideIdFromParts } from '@fide-work/id';
const result = buildFideIdFromParts(
'10',
'20',
'5fcbdc6d73bcfcd2c73eb4795c2f02f1d1c1'
);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}`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).
parseFideId
Parse a Fide ID into its constituent components. Decomposes a Fide ID into entity type code (2 hex), reference type code (2 hex), and fingerprint (36 hex), converting type/source codes to their corresponding entity type names.