Skip to main content
Payroll from a private balance is a series of payments, one per recipient. Each payment is its own transaction, because the recipient is bound into its proof. What Cloak gives you is that the payments are private, need no wallet prompt each, and can be retried without paying anyone twice.

Prerequisites

  • A private balance that covers the total plus withdrawal fees for recipients paid to public addresses. Use quote per row to size it.
  • For an organization: a business-mode account on a server. See Backend integration.

Pay a list of recipients

Run it again after a crash or a partial failure: rows already paid return their first receipt with repeated: true and move nothing. A row whose earlier attempt started and never recorded its end throws ref.unsettled; reconcile that one by hand before paying it again.

Private or public recipients

Paying cloak_ addresses keeps amounts hidden from everyone, including other employees. Paying public addresses hides who paid, but each amount and recipient is public.

How fast it runs

createCloak runs one money-moving call at a time per account, so a payroll is sequential: each row proves, submits and confirms before the next starts. Plan for the run to take a while for a long list, and run it on a server, not in a browser tab.

Fewer prompts with the low-level API

With createCloak there are no wallet prompts to batch: payments are signed by the account. With the low-level API, each payment needs the wallet to sign a request. transactBatch runs up to 64 payments under one wallet approval, proving in parallel. The SDK recommends chunks of about 25 rows, because every spend consumes on-chain root history. See Batch signing.