Private users,your program untouched

Your program is live and people use it in public. Publish a hook for it and the same instruction runs from any private balance on Solana Privacy Rings.

What changes in your program

Nothing.

A hook is a record that describes an instruction you already shipped, and Pook’s program is the one that calls it. Your program receives a normal call from the stage, an account holding the tokens for that one call. You ship no upgrade and write no circuit.

What publishing takes

  1. 1Your program’s IDLOr its program ID. The builder reads every instruction from it.
  2. 2One instructionA hook describes one, so a protocol with a deposit and a withdraw publishes two.
  3. 3The slotsWhich argument carries the amount in, which the minimum out, and which accounts the money moves through.
  4. 4A simulationThe builder runs the hook against the chain and shows the logs before you sign.
  5. 5One signatureYour wallet publishes the hook and becomes its author.

The hook is in the registry the moment it confirms, and anyone can run it.

What you earn

Every run pays a run fee, taken from what the run returns. A fixed part of it, the author’s share, goes to the author of the hook the run used. It accrues per hook, in the asset each run produced, and you claim it from the hook’s page with the wallet that published it.

Fees and POOK has the rates and where the rest goes.

What a hook can reach

A hook is handed the stage accounts for one run, and Pook checks the caller’s minimum out after your instruction returns. An instruction that leaves a position open, like a loan, is published as a seat hook: the position is owned by a seat, an address no wallet controls.

How a run works has each step.

In your own app

Once your hook is published, your front end can offer the private path beside the public one.

TypeScript
import { createPook } from '@pook/sdk'

const pook = createPook({ apiUrl })

// The same call your users’ wallets and apps make
await pook.run('your-protocol.deposit', { in, amount })