Vaults
Creating vaults, deposits, withdrawals and recovery.
Creating a vault
createVault(name, verifier, keyCommitment, recoveryDelay) deploys a vault owned by the caller. The recovery delay must be at least two days. The verifier must be one the factory was deployed with.
Deposits
Anyone can deposit. Send HYPE directly to the vault address, or approve the vault and call depositToken(token, amount) for ERC-20s. Deposits never require a post-quantum signature.
Withdrawals
withdraw(token, to, amount, deadline, nextKeyCommitment, signature) must be sent by the owner and carry a valid signature over the withdrawal digest. Changing the recipient, amount, token, chain or nonce invalidates the signature.
Recovery
If the post-quantum seed is lost, the owner calls initiateRecovery(verifier, newCommitment). The new key becomes usable after the vault's recovery delay through executeRecovery(). During the delay, whoever holds the current post-quantum key can cancel. This means a stolen ECDSA key can start a recovery but cannot finish one if the real owner is watching, which is why the app treats any pending recovery as a critical finding.