Generate a balance proof
Prove you hold at least a threshold of SOL or an SPL token — without revealing the exact amount.
Inputs
- Public:
token,threshold - Private:
balance(your actual holdings)
Generate
ts
const proof = await zk.proveBalance({
token: "SOL",
min: 100, // public threshold
balance: 243.5, // private — stays local
});Submit and read back
ts
const { signature, proofAccount } = await zk.submitProof(proof);
// later — anyone can verify
const onchain = await zk.getProof(proofAccount);
console.log(onchain.verified); // trueThe verifier only sees the threshold and the validity of the proof — never your balance.