Skip to main content

Function: getRegisterEntry()

function getRegisterEntry(
hasherIssuer,
hashes
): [FileDescription, SingleClaimRead][];

Constructs an array of tuples, where each tuple contains a FileDescription and a claim read specification, a SingleClaimRead. This array represents the registration entry for a smart contract. Each read is of a claim written by the data-hasher contract by the convention used by the self-registration system, but the call operation supports reading claims from any smart contract.

Parameters

hasherIssuer: ClaimIssuer

The hasher contract. This is the smart contract that has the files stored and typically the data-hasher is the smart contract for this.

hashes: readonly [FileDescription, string][]

An array of tuples, where each tuple contains a FileDescription and a HashId. The FileDescription describes the file in the virtual file system and the HashId is the unique identifier for the file's content. By convention, the HashId is the key used by the data-hasher to store the file contents.

Returns

[FileDescription, SingleClaimRead][]

An array of tuples, where each tuple contains a FileDescription and a SingleClaimRead. The SingleClaimRead is a claim that can be used to read the file's content from the virtual file system.


Coinweb © 2024