Fide logoFIDE

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

This function requires a Node.js runtime and is disabled in the browser docs preview.
buildFideIdFromParts(typeChar, referenceChar, fingerprint)

Parameters

typeCharstring*
Entity type code (2 hex chars, e.g. "10" for Person).
referenceCharstring*
Reference type code (2 hex chars, e.g. "20" for NetworkResource).
fingerprintstring*
Content hash fingerprint (36 hex chars).

Returns

Prop

Type

import { buildFideIdFromParts } from '@fide-work/context-protocol';

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}`