Guides
Enter and leave
Entering moves an asset into your private balance. Leaving moves it out. Both work with a public Solana wallet and with a Rings private balance. Everything you do between the two runs from the private balance, and your wallet is not part of it.
Enter from your wallet
Your wallet signs this transaction itself, so the chain shows your wallet, the asset and the amount. It is the last time your wallet appears.
Open Enter
On Balance, press Enter. If you have not yet, connect your wallet and press Unlock.
Choose what to enter
Leave From on Your wallet. Pick the Asset and type the amount. The form shows what your wallet holds of it.
Check and sign
The What happens panel shows the amount going into your private balance, the wallet it comes from and what the chain will show. Press Enter and approve the transaction in your wallet.
Wait for the note
The stages are Build the transaction, Sign in your wallet, Submitted and In your private balance. At You are in, the amount is a note on Balance.
const USDC = 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
const entered = await pook.enter({
mint: USDC,
amount: '20000000', // 20 USDC in base units
onStage: (stage) => console.log(stage), // building, signing, submitted, confirmed
})
entered.tx.status // 'confirmed'
entered.signature // the transactionTo enter SOL, pass the wrapped SOL mint, So11111111111111111111111111111111111111112, and an amount in lamports. The note holds native SOL.
Entering pays no fee to Pook. Your wallet pays the network fee of its transaction, so keep a little SOL in it beyond what you enter.
The note you receive is owned by a one-time key derived from your wallet's signature. The same wallet unlocks it on any device.
Enter from a Rings private balance
If you already hold an asset privately in Solana Privacy Rings, it can move into Pook without becoming public. The move is a private transfer inside Rings: the chain shows that a transfer happened, and the asset and the amount stay encrypted.
In the app, set From to Rings private balance on the Enter screen and continue as above. In the SDK, pass source: 'rings':
await pook.enter({ source: 'rings', mint: USDC, amount: '20000000' })Your wallet is asked for two things. First it signs the Rings message TSPP/derive/v1, once in a session, so your Rings keys can be derived on your device and your Rings notes found. Then it signs the transfer as the owner of those notes. The transfer spends your Rings notes into a new note owned through Pook, and any change returns to your Rings balance. One enter spends up to two Rings notes, and the SDK reports a proving stage before signing.
Leave to a public address
Leaving spends your notes and pays the amount to an address. A relayer submits it, so the transaction shows the destination, the asset and the amount, and does not show who left.
The destination can be any Solana address. It does not have to be the wallet you entered from.
Open Leave
On Balance, press Leave.
Choose what leaves and where to
Pick the Asset and type the amount. Under To, keep A public address and paste the address. It starts filled with your connected wallet.
Check and leave
The What happens panel shows what leaves your private balance, where it arrives and what the chain will show. The relayer takes its fee from the amount. Press Leave.
Wait for it to land
The stages are Making the proofs, Relayed and Confirmed. At You have left, the amount is at the address.
const SOL = 'So11111111111111111111111111111111111111112'
const left = await pook.leave({
mint: SOL,
amount: '50000000', // 0.05 SOL in lamports
destination: '<a Solana address>',
onStage: (stage) => console.log(stage), // quoting, proving, relayed, confirmed
})
left.relay.status // 'confirmed'
left.signature // the transactionFor a token, the amount arrives in the destination's token account for that mint. The relayer creates the account in the same transaction if the address has none.
The address receives the amount less the relayer's fee. Leaving pays no run fee.
A leave spends up to two notes of the asset. If the amount is more than any two of your notes hold together, leave in two steps.
Leave to a Rings private balance
Leaving to a Rings private balance moves the amount to a Rings holder without it touching a public account. The transaction shows the asset and the amount, and the recipient as a Rings owner hash, not as a wallet.
Name the recipient by the Solana wallet address they registered with Rings. Their Rings address is looked up from it. In the app, set To to A Rings private balance and paste that address. In the SDK:
await pook.leave({
mint: SOL,
amount: '25000000',
destinationType: 'rings',
destination: '<the recipient wallet address>',
})When a leave does not go through
A leave is one transaction. If it fails, no note is spent.
| What you see | Why | What to do |
|---|---|---|
INSUFFICIENT_BALANCE | No one or two notes of the asset cover the amount. | Leave with less, in more than one step. |
NOT_FOUND, leaving to Rings | The wallet address has no record in the Rings user registry. | Ask the recipient for the wallet they use with Rings. |
| The proof expired before it landed | The transaction reached the chain after the relayer's quote ran out. | Leave again. |
| The relayer could not land it | The chain refused the transaction. The message carries the program's reason. | Check the destination and the amount, and try again. |
What the chain shows
| Transaction | Shown | Not shown |
|---|---|---|
| Enter from your wallet | Your wallet, the asset, the amount | Which note it became among all holders' notes |
| Enter from a Rings private balance | That your Rings owner spent and Pook's tag received | The asset and the amount |
| Leave to a public address | The destination, the asset, the amount, the relayer and its fee | Who left, and what they still hold |
| Leave to a Rings private balance | The asset, the amount, the recipient's owner hash | Who left |
What the chain shows goes through each one field by field.