V0.5 Testnet · For builders
Reference
Constants
| Value | |
|---|---|
| Registration message | menoid_Wallet |
| Key tags | menoid/spend · menoid/encryption |
| BabyJubJub order l | 2736030358979909402780800718157159386076813972158567259200215660948447373041 |
| Inputs per proof | 4 (MAX_INPUTS) |
| Outputs | transfer 3 (receiver, change, relayer) · withdraw 2 + a public payout |
| Merkle trees | depth 20 (1,048,576 leaves per pool) · last 10 roots |
| Amounts | 0 ≤ amount < 2¹²⁸ |
| Domain separators | 1 commitment · 2 nullifier |
| Proof system | Groth16 (BN254) · Circom · snarkjs |
| Note encryption | ECIES (secp256k1 on EVM) |
Public signals
| Circuit | Signals | Layout |
|---|---|---|
| Deposit | 5 | [depositAmount, c1, c2, c2_enabled, uc2] |
| Transfer | 19 | [relayer, enabled×4, roots×4, nullifiers×4, output_enabled×3, c_outs×3] |
| Withdraw | 19 | [receiver, relayer, enabled×4, roots×4, nullifiers×4, withdrawAmount, out_enabled×2, c_outs×2] |
Events
| Event | When |
|---|---|
| WalletRegistered(wallet, userCommitment, encryptionPublicKey) | a wallet enabled Noid mode |
| NoteCreated(poolId, commitment, encryptedNote) | a note was created |
| NullifierSpent(nullifier) | a note was spent |
| NewPool(poolId) | a tree filled and a new pool opened |
Every formula
signature = sign("menoid_Wallet")
sk = keccak256("menoid/spend" ‖ signature) mod l
spendPk = sk · Base8 // BabyJubJub
encPriv = keccak256("menoid/encryption" ‖ signature)
encPub = encPriv · G
userCommitment = Poseidon(address, spendPk.x, spendPk.y)
commitment = Poseidon(1, amount, r, userCommitment)
nullifier = Poseidon(2, commitment, r, sk)
deposit: depositAmount = a1 + c2_enabled · a2
transfer: Σ inputs = Σ outputs
withdraw: Σ inputs = Σ outputs + withdrawAmountTestnet only
V0.5 runs on testnets and is unaudited. Its proving keys come from a local setup, suitable for testnet only. Use test tokens — never real funds.
