UNPKG

@nori-zk/mina-token-bridge

Version:

A Mina zk-program contract allowing users to mint tokens on Nori Bridge.

32 lines (31 loc) 1.28 kB
import { JsonProof } from 'o1js'; import { NoriTokenControllerConfig } from '../../NoriControllerSubmitter.js'; /** * Specification of the methods exposed by E2eWorker * for parent proxying. */ export declare const workerSpec: { /** * Initialize the worker with NoriTokenController config. * @param config - NoriTokenControllerConfig */ readonly ready: (config: NoriTokenControllerConfig) => Promise<void>; /** * Setup storage for a user by their public key. * @param userPublicKeyBase58 - Base58-encoded public key * @returns Result of the storage setup */ readonly setupStorage: (userPublicKeyBase58: string) => Promise<{}>; /** * Mint a token for a user. * @param userPublicKeyBase58 - Base58-encoded public key of the user * @param proofData - Contains deposit and presentation proofs * @param userPrivateKeyBase58 - Base58-encoded private key of the user * @param fundNewAccount - Optional boolean to fund the account * @returns Result of the mint operation */ readonly mint: (userPublicKeyBase58: string, proofData: { ethDepositProofJson: JsonProof; presentationProofStr: string; }, userPrivateKeyBase58: string, fundNewAccount?: boolean) => Promise<{}>; };