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