Skip to content

The SDK, for wallets and services ​

Everything in this book can be done from code. The web app and Veilix Wallet are both built on the same TypeScript package, @veilixprotocol/sdk on npm (version 0.1.0 at the time of writing; earlier releases were published as veilix-sdk). A wallet or another Solana service can use it to offer a shielded balance, private payments, a private swap, a private bridge, anonymity-mining rewards, DAO voting, or Private Send inside its own product.

What the partner keeps, and what the SDK does ​

The partner keeps the user, the screens, and the wallet. The SDK never needs the user’s wallet key. It asks the wallet for signatures instead:

  • Public transactions the user sends: a deposit, a backup of sealed notes, and each DAO step, such as locking VEILIX or voting.
  • One message, whose signature becomes the key that seals note backups. It is a Sign In With Solana message that names the account and the official Veilix site, so wallets can warn when another site asks for it. A partner on its own domain sets notesKeyDomain and gets keys of its own. Notes sealed before 19 November 2026 used the older message veilix:notes:v1, which getLegacyEncryptionKey still reads with one more signature.

Withdrawals, swaps, bridges, private payments, and collects need no wallet signature. A relayer signs and sends them.

The SDK does the rest:

JobMain calls
Make a note and send a deposit, with its screening passgenerateDepositParams, sendDeposit (or buildDepositTx)
Seal and find notesgetEncryptionKey, scanOwnedNotes, getNoteStatus
Quote and withdrawgetWithdrawQuote, withdraw
Private paymentsgetPrivateAddress, getPayQuote, sendPrivatePayment, combineNotes
Private swapgetSwapQuote, swap
Private bridgegetBridgeChains, getBridgeQuote, bridge
Anonymity mininggetMiningStatus, getPendingRewards, getCollectQuote, collect
DAO governancegetGovernanceStatus, lockVeilix, createProposal, voteOnProposal, executeProposal, unlockVeilix
Address screeninggetScreeningSettings, assertWithdrawRecipientAllowed, assertBridgeRecipientAllowed
Private Send, one or many recipientsveilixTransfer
Relayers and feesfetchRelayers, getRelayerLimits, fetchPlatformFeeWallets, computeWithdrawFee

Each spend can also be proved now and sent later, with a build…Payload and submit…Payload pair.

A withdrawal, a bridge, a private payment, and combineNotes take a maxFee: the fee the user was shown. The SDK refuses to prove a withdrawal or a payment whose fresh fee is above it. It keeps a bridge at the shown fee when the relayer accepts it. So for those jobs, the number on the partner’s review screen is the most the user pays. A swap and a collect take no maxFee. The SDK works out a swap’s fee itself and refuses a relayer quote that differs. A collect’s flat fee comes out of the reward, and the program caps it.

Veilix Pay and Private Send are being hidden in the app and in Veilix Wallet for now. veilixTransfer still works in the SDK.

Privacy it brings along ​

Proofs are made on the user’s device. The prover runs in the browser or in Node. The note and the spending key never leave the device. In the browser, the proving files are fetched from a pinned address and checked against a pinned SHA-256 hash before use. In Node, the SDK reads them from the package without that check.

Lookups do not reveal notes. To check whether a note is in the tree and unspent, the SDK downloads the whole leaf list from the indexer and the whole list of spent markers from Solana, and matches them locally. The opt-in history lookup, which a compliance report uses, sends the note’s commitment and nullifier to the indexer. So do a few lower-level calls, such as validateNullifier and fetchTxStatus. Avoid them where privacy matters.

Screening runs before the proof. The SDK reads the program’s deny lists from Solana and refuses a listed recipient before it builds a withdrawal or bridge proof, without sending the address anywhere. A deposit carries a screening pass from the indexer. The program checks the same lists again on chain, so skipping the SDK’s check changes nothing.

Relayers are drawn by stake. The SDK picks a relayer at random, weighted by its stake. To keep the same relayer between the quote and the send, pass the quote’s relayerUrl back; otherwise each call draws again. A swap, a bridge, a collect, or a payment tries another relayer when the drawn one fails.

What this is not ​

The SDK is a convenience, not a guarantee. A partner that changes it can mishandle a note, and the partner’s own app sees what the user types. It cannot skip address screening, because the program checks the deny lists itself. Phantom and Solflare are named as prospects in the partner presentation; neither has agreed to integrate. Everything here runs on devnet. The next page is the investor view of the same Private Send job.