elementUriToEntryUri
elementUriToEntryUri(
registryEntryUri):EntriesUri
Converts a registry entry URI to a simpler identifier URI.
Parameters
• registryEntryUri: entry:cord:${string}
The registry entry URI to be converted. Format: ‘entry:cord:<identifier>:<digest>’.
Returns
EntriesUri
A simplified identifier URI: ‘entry:cord:<identifier>’.
Remarks
This function processes a registry entry URI and returns a URI containing only the identifier part.
Example
const entryUri = 'entry:cord:1234:abcd';const identifierUri = elementUriToEntryUri(entryUri);console.log('Identifier URI:', identifierUri);Throws
If the registryEntryUri does not conform to the expected format.
Description
The function splits the registryEntryUri, validates its structure, and constructs a URI using only the identifier part.