Skip to content

field

field(value): Hash32

Defined in: src/Hash.ts:118

Compute the persistent hash of a Field value (bigint).

Matches Compact’s persistentHash<Field>() function.

Parameters

value

bigint

A bigint representing a Field

Returns

Hash32

The hash as a 32-byte Uint8Array

Example

const hash = Midday.Hash.field(12345n);

Since

0.3.0