@nori-zk/ethprocessor
Version:
zkApp for verifying SP1 Helios Nori proof and storing latest execution state root on Mina
197 lines (196 loc) • 5.93 kB
TypeScript
import 'dotenv/config';
import { Field, PrivateKey, SmartContract, State, UInt64, PublicKey, Provable } from 'o1js';
import { EthProof } from './EthVerifier.js';
import { Bytes32FieldPair } from './types.js';
export declare const adminPrivateKey: PrivateKey;
export declare const adminPublicKey: PublicKey;
export declare class EthProofType extends EthProof {
}
declare const VerificationKey_base: (new (value: {
data: string;
hash: import("o1js/dist/node/lib/provable/field.js").Field;
}) => {
data: string;
hash: import("o1js/dist/node/lib/provable/field.js").Field;
}) & {
_isStruct: true;
} & Provable<{
data: string;
hash: import("o1js/dist/node/lib/provable/field.js").Field;
}, {
data: string;
hash: bigint;
}> & {
fromValue: (value: {
data: string;
hash: string | number | bigint | import("o1js/dist/node/lib/provable/field.js").Field;
}) => {
data: string;
hash: import("o1js/dist/node/lib/provable/field.js").Field;
};
toInput: (x: {
data: string;
hash: import("o1js/dist/node/lib/provable/field.js").Field;
}) => {
fields?: Field[] | undefined;
packed?: [Field, number][] | undefined;
};
toJSON: (x: {
data: string;
hash: import("o1js/dist/node/lib/provable/field.js").Field;
}) => {
data: string;
hash: string;
};
fromJSON: (x: {
data: string;
hash: string;
}) => {
data: string;
hash: import("o1js/dist/node/lib/provable/field.js").Field;
};
empty: () => {
data: string;
hash: import("o1js/dist/node/lib/provable/field.js").Field;
};
};
declare class VerificationKey extends VerificationKey_base {
}
declare const DeployArgsWithStoreHash_base: (new (value: {
verificationKey: VerificationKey;
storeHash: Bytes32FieldPair;
}) => {
verificationKey: VerificationKey;
storeHash: Bytes32FieldPair;
}) & {
_isStruct: true;
} & Provable<{
verificationKey: VerificationKey;
storeHash: Bytes32FieldPair;
}, {
verificationKey: {
data: string;
hash: bigint;
};
storeHash: {
highByteField: bigint;
lowerBytesField: bigint;
};
}> & {
fromValue: (value: {
verificationKey: VerificationKey | {
data: string;
hash: string | number | bigint | import("o1js/dist/node/lib/provable/field.js").Field;
};
storeHash: Bytes32FieldPair | {
highByteField: string | number | bigint | import("o1js/dist/node/lib/provable/field.js").Field;
lowerBytesField: string | number | bigint | import("o1js/dist/node/lib/provable/field.js").Field;
};
}) => {
verificationKey: VerificationKey;
storeHash: Bytes32FieldPair;
};
toInput: (x: {
verificationKey: VerificationKey;
storeHash: Bytes32FieldPair;
}) => {
fields?: Field[] | undefined;
packed?: [Field, number][] | undefined;
};
toJSON: (x: {
verificationKey: VerificationKey;
storeHash: Bytes32FieldPair;
}) => {
verificationKey: {
data: string;
hash: string;
};
storeHash: {
highByteField: string;
lowerBytesField: string;
};
};
fromJSON: (x: {
verificationKey: {
data: string;
hash: string;
};
storeHash: {
highByteField: string;
lowerBytesField: string;
};
}) => {
verificationKey: VerificationKey;
storeHash: Bytes32FieldPair;
};
empty: () => {
verificationKey: VerificationKey;
storeHash: Bytes32FieldPair;
};
};
declare class DeployArgsWithStoreHash extends DeployArgsWithStoreHash_base {
}
declare const DeployArgsWithoutStoreHash_base: (new (value: {
verificationKey: VerificationKey;
}) => {
verificationKey: VerificationKey;
}) & {
_isStruct: true;
} & Provable<{
verificationKey: VerificationKey;
}, {
verificationKey: {
data: string;
hash: bigint;
};
}> & {
fromValue: (value: {
verificationKey: VerificationKey | {
data: string;
hash: string | number | bigint | import("o1js/dist/node/lib/provable/field.js").Field;
};
}) => {
verificationKey: VerificationKey;
};
toInput: (x: {
verificationKey: VerificationKey;
}) => {
fields?: Field[] | undefined;
packed?: [Field, number][] | undefined;
};
toJSON: (x: {
verificationKey: VerificationKey;
}) => {
verificationKey: {
data: string;
hash: string;
};
};
fromJSON: (x: {
verificationKey: {
data: string;
hash: string;
};
}) => {
verificationKey: VerificationKey;
};
empty: () => {
verificationKey: VerificationKey;
};
};
declare class DeployArgsWithoutStoreHash extends DeployArgsWithoutStoreHash_base {
}
export type EthProcessorDeployArgs = DeployArgsWithStoreHash | DeployArgsWithoutStoreHash;
export declare class EthProcessor extends SmartContract {
admin: State<PublicKey>;
verifiedStateRoot: State<import("o1js/dist/node/lib/provable/field.js").Field>;
latestHead: State<UInt64>;
latestHeliusStoreInputHashHighByte: State<import("o1js/dist/node/lib/provable/field.js").Field>;
latestHeliusStoreInputHashLowerBytes: State<import("o1js/dist/node/lib/provable/field.js").Field>;
latestVerifiedContractDepositsRootHighByte: State<import("o1js/dist/node/lib/provable/field.js").Field>;
latestVerifiedContractDepositsRootLowerBytes: State<import("o1js/dist/node/lib/provable/field.js").Field>;
init(): void;
deploy(args: EthProcessorDeployArgs): Promise<void>;
update(ethProof: EthProofType): Promise<void>;
}
export {};