Docs/SDK
Private balances
Unlock, shield, trade, batch, send and withdraw.
#Unlock
ts
import { PrivateBalance } from "@provenapp/sdk";
const priv = await PrivateBalance.unlock(walletClient, config);One EIP-712 signature, bound to this chain, opens the private account on every vault.
#Shield
ts
await priv.shieldHype(parseEther("0.5"));
await priv.shieldToken(wallet, token, amount);#Trade
ts
await priv.buy(token, parseEther("0.1"));
await priv.sell(token, amount);Instant private swaps through the launch's Uniswap v4 pool, submitted by the relayer. For any pair, use trade(tokenIn, tokenOut, amount), and tradePlan(...) to see how many parts a large trade needs.
#Batch
ts
await priv.batch(token, "sell", amount);Splits into standard sizes and places sealed orders in the current round.
#Send
ts
await priv.send(token, "proven:…", amount);A private transfer inside the vault with no sender, recipient or amount on-chain.
#Withdraw
ts
await priv.unshieldHype(to, amount);Use planSplitWithdraw to spread a withdrawal over time.
#Utilities
balance(pool), address(), roundInfo(), depositCaps(token), receiveAddress(n) and collectReceived().