Skip to main content

ZkpWallet

Tied to one spending key and one signing account (or walletClient, e.g. MetaMask). Created with client.wallet({ spendingKey, account }) or { spendingKey, walletClient }.

Identity

MemberDescription
clientParent ZkpClient
addressEVM signer address
getZkAddress()zk1 receive address for concealed transfers
currencySet when using token('USD') etc.

Balances

MethodDescription
getBalance()Decrypted concealed balance
getCachedBalance(), getCachedBalances(), seedBalanceCache helpers (incl. multi-token)
wallet.public.getBalance() / getBalances()ERC-20 balanceOf on the public token contract(s)

Public ↔ concealed (wallet.public)

MethodDescription
toConcealed({ amount, to?, useRelayer? })Public ledger → concealed (shield)
toPublic(amount, recipient?, { useRelayer? })Concealed → public balance (exit); not an ERC-20 transfer between public accounts

Root shortcuts: wallet.toPublic matches wallet.public.toPublic.

Concealed → concealed

MethodDescription
toConcealed({ to, amount, useRelayer? })Private transfer to another registered BPK / zk1 address
prepareTransfer(to, amount, options?)Build proof only (no submit)
transfer(…)Deprecated — same as toConcealed

Recipient is a zk1 string or internal BPK point type.

Multi-token

When the client has several currencies: token('USD'), wallet.USD, EUR, PLN, getAllBalances(), getAllHistory(). Do not call token() on an already scoped wallet.

Registration & settings

isRegistered(), registerBPK(), getAutoConceal() / setAutoConceal(), faucet() (testnets when available).

History

getHistory({ fromBlock?, limit?, refresh? }), getAllHistory, invalidateHistoryCache(). Types like to_concealed, transfer_in, … (swap rows may share a txHash).

Stealth

wallet.stealth — create/list/recover stealth receive addresses and balances. Full method list: Advanced: stealth.

Swap

wallet.swap and related methods throw — not implemented in this SDK line yet.

Types

ConnectedWalletConfig, Recipient, HistoryItem, HistoryOptions, PublicToConcealedParams — from @zk-privacy/core / package re-exports.