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.
getStatementRawIdentifier(subjectFideId, predicateFideId, objectFideId)
Parameters subjectFideId FideId *
The Fide ID reference (format: did:fide:0x... or 0x...)
predicateFideId FideId *
The Fide ID reference (format: did:fide:0x... or 0x...)
objectFideId FideId *
The Fide ID reference (format: did:fide:0x... or 0x...)
import { getStatementRawIdentifier } from '@fide.work/fcp';
const result = getStatementRawIdentifier(
'did:fide:0x152f02f1d1c1e62b2e569e11818420c1968be3d9',
'did:fide:0x6524b049fa7069dd318c44531214a955c3f1fa37',
'did:fide:0x66a023246354ad7e064b1e4e009ec8a0699a3043'
);Type Definitions type FideIdFull Fide ID format (with did:fide:0x prefix)
Properties charAt(pos: number) => string
charCodeAt(index: number) => number
concat(...strings: string[]) => string
indexOf(searchString: string, position?: number) => number
lastIndexOf(searchString: string, position?: number) => number
localeCompare{ (that: string): number; (that: string, locales?: string | string[], options?: Intl.CollatorOptions): number; (that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number; }
match{ (regexp: string | RegExp): RegExpMatchArray | null; (matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; }
replace{ (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; (searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; }
search{ (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }
slice(start?: number, end?: number) => string
split{ (separator: string | RegExp, limit?: number): string[]; (splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; }
substring(start: number, end?: number) => string
toLocaleLowerCase{ (locales?: string | string[]): string; (locales?: Intl.LocalesArgument): string; }
toLocaleUpperCase{ (locales?: string | string[]): string; (locales?: Intl.LocalesArgument): string; }
substr(from: number, length?: number) => string
codePointAt(pos: number) => number | undefined
includes(searchString: string, position?: number) => boolean
endsWith(searchString: string, endPosition?: number) => boolean
normalize{ (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; (form?: string): string; }
repeat(count: number) => string
startsWith(searchString: string, position?: number) => boolean
anchor(name: string) => string
fontcolor(color: string) => string
fontsize{ (size: number): string; (size: string): string; }
link(url: string) => string
padStart(maxLength: number, fillString?: string) => string
padEnd(maxLength: number, fillString?: string) => string
matchAll(regexp: RegExp) => RegExpStringIterator<RegExpExecArray>
replaceAll{ (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; }
at(index: number) => string | undefined
__@iterator@100() => StringIterator<string>