Skip to content

getDetailsfromChain

getDetailsfromChain(registryEntryId): Promise<IRegistryEntryChainStorage | null>

Retrieves the details of a registry entry from the blockchain using the provided identifier.

Queries the blockchain for the registry entry associated with the specified identifier and decodes the details into a structured format.

Parameters

registryEntryId: string

The identifier used to query the entry (without entry:cord: prefix).

Returns

Promise<IRegistryEntryChainStorage | null>

A promise resolving to the decoded entry details as IRegistryEntryChainStorage, or null if not found.

Throws

If no entry exists for the provided identifier.

Example

const details = await getDetailsfromChain('abc123');
console.log(details); // { uri: 'entry:cord:abc123...', tx_hash: '0x...', ... }

Source

entry/src/Entry.chain.ts:538