UNPKG

@nori-zk/mina-token-bridge

Version:

Nori ethereum state settelment and nETH token bridge zkApp

26 lines (25 loc) 1.14 kB
import 'dotenv/config'; import { Field } from 'o1js'; import { EthInput, type CreateProofArgument, type VerificationKey, type Bytes32, type FileSystemCacheConfig } from '@nori-zk/o1js-zk-utils'; import { type NodeProofLeft as NodeProofLeftRaw } from '@nori-zk/proof-conversion/min'; export type NoriTokenBridgeUpdateArgs = { ethInput: EthInput; rawProof: NodeProofLeftRaw; }; export declare class NoriTokenBridgeSubmitter { #private; private cache; readonly noriTokenBridgeVerificationKey: VerificationKey; readonly noriStorageInterfaceVerificationKey: VerificationKey; protected readonly minaRPCNetworkUrl: string; protected readonly minaArchiveRPCUrl: string; constructor(cache?: FileSystemCacheConfig); networkSetUp(): Promise<void>; compileContracts(): Promise<void>; deployContract(storeHash: Bytes32, ethTokenBridgeAddress: Field, genesisRoot: Field): Promise<void>; createProof(proofArguments: CreateProofArgument): Promise<NoriTokenBridgeUpdateArgs>; submit({ ethInput, rawProof }: NoriTokenBridgeUpdateArgs): Promise<{ txId: string; txHash: string; }>; }