zkverifyjs
Version:
Submit proofs to zkVerify and query proof state with ease using our npm package.
33 lines • 1.44 kB
TypeScript
import { VerifyOptions } from '../../types';
import { ProofOptions } from '../../../config';
import { EventEmitter } from 'events';
import { VKRegistrationTransactionInfo } from '../../../types';
export declare class RegisterKeyBuilder {
private readonly executeRegisterVerificationKey;
private readonly options;
private nonceSet;
constructor(executeRegisterVerificationKey: (options: VerifyOptions, verificationKey: unknown) => Promise<{
events: EventEmitter;
transactionResult: Promise<VKRegistrationTransactionInfo>;
}>, proofOptions: ProofOptions, accountAddress?: string);
/**
* Sets the nonce for the registration process.
* Can only be set once; subsequent calls will throw an error.
*
* @param {number} nonce - The nonce value to set.
* @returns {this} The builder instance for method chaining.
* @throws {Error} If the nonce is already set.
*/
nonce(nonce: number): this;
/**
* Executes the registration process with the provided verification key.
*
* @param {unknown} verificationKey - The verification key to register.
* @returns {Promise<{ events: EventEmitter, transactionResult: Promise<VKRegistrationTransactionInfo> }>}
*/
execute(verificationKey: unknown): Promise<{
events: EventEmitter;
transactionResult: Promise<VKRegistrationTransactionInfo>;
}>;
}
//# sourceMappingURL=index.d.ts.map