@silvana-one/mina-utils
Version:
Silvana Mina Utils
12 lines (11 loc) • 775 B
TypeScript
import { Field, UInt32 } from "o1js";
import { Fr } from "./constants.js";
export type CanonicalElement = InstanceType<typeof Fr.Canonical>;
export type AlmostReducedElement = InstanceType<typeof Fr.AlmostReduced>;
export declare const R: CanonicalElement;
export declare const S: CanonicalElement;
export declare function scalar(n: bigint): CanonicalElement;
export declare function blsCommitment(element: CanonicalElement): Field;
export declare function digestStruct(fields: CanonicalElement[]): CanonicalElement;
export declare function commit(table: CanonicalElement[]): CanonicalElement;
export declare function update(oldTableCommitment: CanonicalElement, oldStructDigest: AlmostReducedElement, newStructDigest: AlmostReducedElement, index: UInt32): CanonicalElement;