Reading receipts & memos
From your generated shielded project after local setup, run the included authenticated query client:
pnpm run query
The starter's CHEF_URL points to its local API on port 39370. This command prints private receipt data to your terminal. For the older repository-only example, use node --env-file=/protected/inbox.env examples/shielded-inbox/query.mjs; its fallback port is 39375.
query ReadShieldedMemos {
ReadableNoteList(first: 10) {
items { txid pool blockHeight valueZat memoKind memoText }
nextCursor
}
_meta { height status }
}
| Field | Meaning |
|---|---|
txid, pool, outputIndex | Transaction and note location |
blockHeight, blockHash | Containing block context stored by the generated receipt handler |
valueZat | Exact received note value as a decimal string |
receiver | Authorized receiver component |
memoHex | Original 512-byte memo |
memoKind, memoText | Format classification and optional text |
scope, origin, coinbase | Note context |
memoKind distinguishes text, empty_text, no_memo, non_text, invalid_utf8 and text_with_nul. Add memoHex when you need original bytes. Use where: {txid: "YOUR_64_HEX_TX_ID"} for a known ID and after: nextCursor for another page.
Notes: Keep results local. If the list is empty, check the key, birthday, filter and _meta.height. Memo text alone does not establish a received payment.
Try a published example
Open the Chef playground, select Read shielded memos, then press Run query. The example reads one deliberately published receipt from Zeer's testnet demo wallet. Its memo is Hello from Zeer Chef, with a note value of 100,000 zatoshi (0.001 TAZ).
Inspect the Ironwood transaction. The scanner ran locally with Zeer's viewing key; the hosted reader receives only the selected projection. Your own viewing key and decrypted results stay in your environment.
Read a known transaction locally
Install the published Chef package:
npm install @zeer-dev/chef@0.7.0
The generated shielded starter already includes the package and read-transaction.mjs:
pnpm run read:transaction YOUR_64_HEX_TX_ID
The single-transaction example uses readShieldedTransaction to fetch public bytes from Prep and decrypt locally, then checks that the source still reports the same mined block. An archive gap or changed block is an error, not a confirmed empty deposit.
Match the exact per-note amount, decoded pool receiver and your application reference. External/internal scope leaves origin: unknown. The application remains responsible for deduplication, order validation and a fresh confirmation/canonicality check before settlement.