@nori-zk/mina-token-bridge
Version:
A Mina zk-program contract allowing users to mint tokens on Nori Bridge.
63 lines (62 loc) • 3.14 kB
TypeScript
import { EnforceMaxLength, SecretMaxLength } from '../../credentialAttestation.js';
import { NetworkId } from 'o1js';
import { MintProofDataJson } from '../../NoriTokenController.js';
export declare class TokenMintWorker {
#private;
WALLET_setMinaPrivateKey(minaPrivateKeyBase58: string): Promise<void>;
WALLET_computeEcdsaSigPresentation(presentationRequestJson: string, credentialJson: string): Promise<string>;
WALLET_signAndSend(provedTxJsonStr: string): Promise<{
txHash: string;
}>;
compileCredentialDeps(): Promise<void>;
computeCredential<FixedString extends string>(secret: EnforceMaxLength<FixedString, SecretMaxLength>, ethSecretSignature: string, ethWalletAddress: string, senderPublicKeyBase58: string): Promise<string>;
computeEcdsaSigPresentationRequest(zkAppPublicKeyBase58: string): Promise<string>;
compileEthDepositProgramDeps(): Promise<void>;
computeEthDeposit(presentationJson: string, depositBlockNumber: number, ethAddressLowerHex: string): Promise<{
despositSlotRaw: {
slot_key_address: string;
slot_nested_key_attestation_hash: string;
value: string;
};
ethDepositProofJson: import("o1js").JsonProof;
}>;
minaSetup(options: {
networkId?: NetworkId;
mina: string | string[];
archive?: string | string[];
lightnetAccountManager?: string;
bypassTransactionLimits?: boolean;
minaDefaultHeaders?: HeadersInit;
archiveDefaultHeaders?: HeadersInit;
}): Promise<void>;
private fetchAccounts;
getBalanceOf(noriTokenBaseBase58: string, minaSenderPublicKeyBase58: string): Promise<string>;
mintedSoFar(noriTokenControllerAddressBase58: string, minaSenderPublicKeyBase58: string): Promise<string>;
needsToSetupStorage(noriTokenControllerAddressBase58: string, minaSenderPublicKeyBase58: string): Promise<boolean>;
setupStorage(userPublicKeyBase58: string, noriAddressBase58: string, txFee: number, storageInterfaceVerificationKeySafe: {
data: string;
hashStr: string;
}): Promise<string>;
MOCK_setupStorage(userPublicKeyBase58: string, noriAddressBase58: string, txFee: number, storageInterfaceVerificationKeySafe: {
data: string;
hashStr: string;
}): Promise<{
txHash: string;
}>;
compileMinterDeps(): Promise<{
data: string;
hashStr: string;
}>;
mint(userPublicKeyBase58: string, noriAddressBase58: string, proofDataJson: MintProofDataJson, txFee: number, fundNewAccount?: boolean): Promise<string>;
MOCK_mint(userPublicKeyBase58: string, noriAddressBase58: string, proofDataJson: MintProofDataJson, txFee: number, fundNewAccount?: boolean): Promise<{
txHash: string;
}>;
compileAll(): Promise<{
data: string;
hashStr: string;
}>;
MOCK_computeMintProofAndCache(userPublicKeyBase58: string, noriAddressBase58: string, proofDataJson: MintProofDataJson, txFee: number, fundNewAccount?: boolean): Promise<void>;
WALLET_MOCK_signAndSendMintProofCache(): Promise<{
txHash: string;
}>;
}