UNPKG

@nori-zk/o1js-zk-utils

Version:

o1js-zk-utils supporting Nori Bridge

28 lines (27 loc) 1.38 kB
import { Field, SmartContract, UInt64, UInt8 } from 'o1js'; import { PlonkProof, CompilableZkProgram } from './types.js'; export declare function uint8ArrayToBigIntBE(bytes: Uint8Array): bigint; export declare function uint8ArrayToBigIntLE(bytes: Uint8Array): bigint; export declare function fieldToHexBE(field: Field): string; export declare function fieldToBigIntBE(field: Field): bigint; export declare function fieldToHexLE(field: Field): string; export declare function fieldToBigIntLE(field: Field): bigint; export declare function padUInt64To32Bytes(num: UInt64): UInt8[]; export declare function decodeConsensusMptProof(ethSP1Proof: PlonkProof): { inputSlot: UInt64; inputStoreHash: import("o1js/dist/node/lib/provable/bytes.js").Bytes; outputSlot: UInt64; outputStoreHash: import("o1js/dist/node/lib/provable/bytes.js").Bytes; executionStateRoot: import("o1js/dist/node/lib/provable/bytes.js").Bytes; verifiedContractDepositsRoot: import("o1js/dist/node/lib/provable/bytes.js").Bytes; nextSyncCommitteeHash: import("o1js/dist/node/lib/provable/bytes.js").Bytes; }; export declare function compileAndVerifyContracts(logger: any, // Logger fix this later contracts: { name: string; program: typeof SmartContract | CompilableZkProgram; integrityHash: string; }[]): Promise<Record<string, { data: string; hash: Field; }>>;