Public withdraw spends one private pool note and pays its full value to a public wallet. The sender, recipient, asset, and amount are public. The connected wallet must be the payout address and must sign the transaction.

Disclosure policy

Every disclosure field is public. execute() submits the transaction directly.

Example

The addresses, contracts, and seed values below are placeholders, not runnable testnet data. Use the matching pool configuration and audit public key from Set up the SDK. Create the client using Frontend integration or Backend integration, and load real account state as described in State methods.

Seed state

Seed one unspent note whose value matches the amount you will withdraw. id is the note commitment.
Sync pool state before you withdraw so the client can find the note’s leaf index.

List notes and withdraw

listPublicWithdrawNotes reads local state. It returns unspent notes that can be withdrawn. page starts at 1.
amount must equal the note value. to must be the connected wallet. That address signs the payout. Omit noteId only when exactly one unspent note has that asset and amount. Catch PublicWithdrawNoteError when no unspent note matches.
A blocked payout address fails the transaction. The note stays unspent. Call listPublicWithdrawNotes again to confirm it is still listed.