/* tslint:disable */ /* eslint-disable */ /** * Deterministically computes `ShielderActionSecrets` from `nonce` and `id`. * All returned values are field elements. * @param {Uint8Array} id * @param {number} nonce * @returns {ShielderActionSecrets} */ export function get_action_secrets(id: Uint8Array, nonce: number): ShielderActionSecrets; /** * @returns {number} */ export function arity(): number; /** * @returns {number} */ export function tree_height(): number; /** * @param {Uint8Array} inputs * @returns {Uint8Array} */ export function poseidon_hash(inputs: Uint8Array): Uint8Array; /** * @param {string} hex * @returns {Uint8Array} */ export function private_key_to_f(hex: string): Uint8Array; /** */ export function set_panic_hook(): void; /** */ export class CircuitCost { free(): void; /** */ readonly circuitCostStr: string; /** */ readonly marginalProofSize: string; /** */ readonly marginalProofSizeBytes: number; /** */ readonly proofSize: string; /** */ readonly proofSizeBytes: number; /** */ readonly verifyingKeySizeBytes: number; } /** */ export class Config { free(): void; /** */ k: number; /** */ log2Leaves: number; /** */ treeArity: number; /** */ treeHeight: number; } /** */ export class DepositCircuit { free(): void; /** */ constructor(); /** * @param {Uint8Array} id * @param {Uint8Array} nonce * @param {Uint8Array} nullifier_old * @param {Uint8Array} trapdoor_old * @param {Uint8Array} account_balance_old * @param {Uint8Array} path * @param {Uint8Array} value * @param {Uint8Array} nullifier_new * @param {Uint8Array} trapdoor_new * @returns {Uint8Array} */ prove(id: Uint8Array, nonce: Uint8Array, nullifier_old: Uint8Array, trapdoor_old: Uint8Array, account_balance_old: Uint8Array, path: Uint8Array, value: Uint8Array, nullifier_new: Uint8Array, trapdoor_new: Uint8Array): Uint8Array; /** * @param {Uint8Array} id_hiding * @param {Uint8Array} merkle_root * @param {Uint8Array} h_nullifier_old * @param {Uint8Array} h_note_new * @param {Uint8Array} value * @param {Uint8Array} proof */ verify(id_hiding: Uint8Array, merkle_root: Uint8Array, h_nullifier_old: Uint8Array, h_note_new: Uint8Array, value: Uint8Array, proof: Uint8Array): void; } /** */ export class MerkleCircuit { free(): void; /** * @param {string | undefined} [seed] */ constructor(seed?: string); /** * @returns {string} */ prove(): string; /** * @returns {string} */ verify(): string; /** * @returns {Uint8Array} */ proof(): Uint8Array; /** */ readonly circuitCost: CircuitCost; /** */ readonly config: Config; } /** */ export class NewAccountCircuit { free(): void; /** */ constructor(); /** * @param {Uint8Array} id * @param {Uint8Array} nullifier * @param {Uint8Array} trapdoor * @param {Uint8Array} initial_deposit * @returns {Uint8Array} */ prove(id: Uint8Array, nullifier: Uint8Array, trapdoor: Uint8Array, initial_deposit: Uint8Array): Uint8Array; /** * @param {Uint8Array} h_note * @param {Uint8Array} h_id * @param {Uint8Array} initial_deposit * @param {Uint8Array} proof */ verify(h_note: Uint8Array, h_id: Uint8Array, initial_deposit: Uint8Array, proof: Uint8Array): void; } /** */ export class ShielderActionSecrets { free(): void; /** */ nullifier: Uint8Array; /** */ trapdoor: Uint8Array; } /** */ export class WithdrawCircuit { free(): void; /** */ constructor(); /** * @param {Uint8Array} id * @param {Uint8Array} nonce * @param {Uint8Array} nullifier_old * @param {Uint8Array} trapdoor_old * @param {Uint8Array} account_balance_old * @param {Uint8Array} path * @param {Uint8Array} value * @param {Uint8Array} nullifier_new * @param {Uint8Array} trapdoor_new * @param {Uint8Array} commitment * @returns {Uint8Array} */ prove(id: Uint8Array, nonce: Uint8Array, nullifier_old: Uint8Array, trapdoor_old: Uint8Array, account_balance_old: Uint8Array, path: Uint8Array, value: Uint8Array, nullifier_new: Uint8Array, trapdoor_new: Uint8Array, commitment: Uint8Array): Uint8Array; /** * @param {Uint8Array} id_hiding * @param {Uint8Array} merkle_root * @param {Uint8Array} h_nullifier_old * @param {Uint8Array} h_note_new * @param {Uint8Array} value * @param {Uint8Array} proof * @param {Uint8Array} commitment */ verify(id_hiding: Uint8Array, merkle_root: Uint8Array, h_nullifier_old: Uint8Array, h_note_new: Uint8Array, value: Uint8Array, proof: Uint8Array, commitment: Uint8Array): void; } export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; export interface InitOutput { readonly __wbg_shielderactionsecrets_free: (a: number, b: number) => void; readonly __wbg_get_shielderactionsecrets_nullifier: (a: number, b: number) => void; readonly __wbg_set_shielderactionsecrets_nullifier: (a: number, b: number, c: number) => void; readonly __wbg_get_shielderactionsecrets_trapdoor: (a: number, b: number) => void; readonly __wbg_set_shielderactionsecrets_trapdoor: (a: number, b: number, c: number) => void; readonly get_action_secrets: (a: number, b: number, c: number) => number; readonly arity: () => number; readonly tree_height: () => number; readonly poseidon_hash: (a: number, b: number, c: number) => void; readonly private_key_to_f: (a: number, b: number, c: number) => void; readonly __wbg_depositcircuit_free: (a: number, b: number) => void; readonly depositcircuit_new_pronto: () => number; readonly depositcircuit_prove: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number) => void; readonly depositcircuit_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number) => void; readonly __wbg_withdrawcircuit_free: (a: number, b: number) => void; readonly withdrawcircuit_new_pronto: () => number; readonly withdrawcircuit_prove: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number) => void; readonly withdrawcircuit_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number) => void; readonly __wbg_config_free: (a: number, b: number) => void; readonly __wbg_get_config_k: (a: number) => number; readonly __wbg_set_config_k: (a: number, b: number) => void; readonly __wbg_get_config_treeArity: (a: number) => number; readonly __wbg_set_config_treeArity: (a: number, b: number) => void; readonly __wbg_get_config_treeHeight: (a: number) => number; readonly __wbg_set_config_treeHeight: (a: number, b: number) => void; readonly __wbg_get_config_log2Leaves: (a: number) => number; readonly __wbg_set_config_log2Leaves: (a: number, b: number) => void; readonly __wbg_circuitcost_free: (a: number, b: number) => void; readonly circuitcost_proofSize: (a: number, b: number) => void; readonly circuitcost_proofSizeBytes: (a: number) => number; readonly circuitcost_marginalProofSize: (a: number, b: number) => void; readonly circuitcost_marginalProofSizeBytes: (a: number) => number; readonly circuitcost_verifyingKeySizeBytes: (a: number) => number; readonly circuitcost_circuitCostStr: (a: number, b: number) => void; readonly __wbg_merklecircuit_free: (a: number, b: number) => void; readonly merklecircuit_new_pronto: (a: number, b: number) => number; readonly merklecircuit_prove: (a: number, b: number) => void; readonly merklecircuit_config: (a: number) => number; readonly merklecircuit_circuitCost: (a: number) => number; readonly merklecircuit_verify: (a: number, b: number) => void; readonly merklecircuit_proof: (a: number, b: number) => void; readonly __wbg_newaccountcircuit_free: (a: number, b: number) => void; readonly newaccountcircuit_new_pronto: () => number; readonly newaccountcircuit_prove: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void; readonly newaccountcircuit_verify: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void; readonly set_panic_hook: () => void; readonly memory: WebAssembly.Memory; readonly __wbindgen_add_to_stack_pointer: (a: number) => number; readonly __wbindgen_free: (a: number, b: number, c: number) => void; readonly __wbindgen_malloc: (a: number, b: number) => number; readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; readonly __wbindgen_exn_store: (a: number) => void; readonly __wbindgen_thread_destroy: (a?: number, b?: number, c?: number) => void; readonly __wbindgen_start: (a: number) => void; } export type SyncInitInput = BufferSource | WebAssembly.Module; /** * Instantiates the given `module`, which can either be bytes or * a precompiled `WebAssembly.Module`. * * @param {{ module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number }} module - Passing `SyncInitInput` directly is deprecated. * @param {WebAssembly.Memory} memory - Deprecated. * * @returns {InitOutput} */ export function initSync(module: { module: SyncInitInput, memory?: WebAssembly.Memory, thread_stack_size?: number } | SyncInitInput, memory?: WebAssembly.Memory): InitOutput; /** * If `module_or_path` is {RequestInfo} or {URL}, makes a request and * for everything else, calls `WebAssembly.instantiate` directly. * * @param {{ module_or_path: InitInput | Promise, memory?: WebAssembly.Memory, thread_stack_size?: number }} module_or_path - Passing `InitInput` directly is deprecated. * @param {WebAssembly.Memory} memory - Deprecated. * * @returns {Promise} */ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise, memory?: WebAssembly.Memory, thread_stack_size?: number } | InitInput | Promise, memory?: WebAssembly.Memory): Promise;