Skip to content

verifyAgainstInputProperties

verifyAgainstInputProperties(registryEntryId, tx_hash, creator?, registryId?): Promise<object>

Verifies the input properties of a registry entry URI against its on-chain details.

Ensures that the provided transaction hash, and optional creator URI and registry URI, match the data stored on the blockchain. Also checks if the entry is revoked or if URIs mismatch.

Parameters

registryEntryId: string

The id of the entry to verify.

tx_hash: HexString

The expected transaction hash associated with the entry.

creator?: string

registryId?: string

Optional id of the registry.

Returns

Promise<object>

A promise resolving to an object with isValid (boolean) and message (string) describing the verification result.

isValid

isValid: boolean

message

message: string

Throws

If an unexpected error occurs during verification.

Example

const result = await verifyAgainstInputProperties(
'2Lwedabc123...',
'0x1234abcd...',
'2wed3xygo...',
'3HJB3xygo...'
);
console.log('', result.isValid, result.message);

Source

entry/src/Entry.ts:289