Skip to main content
  1. Read fetches encrypted transactions from the indexer with dedicated RPC methods.
  2. Only the user, or anyone the user authorizes, can decrypt history with their viewing key.
  3. Use it wherever the wallet runs backfills: on wallet unlock, private wallet open, app resume, network reconnect, stream gap, or wallet restore.
  1. getSignaturesForAddress returns public signatures.
  2. The RPC returns the public history.

Get Started

1

Prerequisites

The TypeScript examples require Node.js 24 or later, pnpm 11.18.0, and the Solana CLI.
Source: sdk-libs/ts
Add a Helius API key:
.env
The examples use the Solana CLI wallet as the payer by default. The payer must hold devnet SOL. See How to Get Devnet SOL.
2

Derive the View Tag

  • senderViewTag is senderAddress.confidentialViewTag(), the sender’s Solana public key in confidential rings. The indexer uses it to return matching encrypted outputs.
3

Fetch Transaction Outputs from the Indexer

  • getShieldedTransactionsByTags fetches the encrypted outputs associated with senderViewTag.
  • atSlot(depositTx.slot) waits until the indexer has the deposit at that slot.
  • The indexer returns encrypted output data. It does not decrypt the private history.
4

Decrypt to Private History

  • senderKeypair supplies the sender’s viewing key for local decryption.
  • decryptTransactions decrypts matching outputs and writes history onto Wallet.
  • wallet.privateTransactions() reads the decrypted history.
  • decryptToBalances returns balances only.
Example Response:
See Concepts for how owner tagging and Private Solana Token Accounts work.

Full Code Example

Clone and run the example:
The examples use a confidential Ring on local/devnet here.

Read a Private Balance

Deposit

Transfer

Withdraw

Didn’t find what you were looking for?

Reach out! Telegram | E-Mail | Contact