- Read fetches encrypted transactions from the indexer with dedicated RPC methods.
- Only the user, or anyone the user authorizes, can decrypt history with their viewing key.
- Use it wherever the wallet runs backfills: on wallet unlock, private wallet open, app resume, network reconnect, stream gap, or wallet restore.
Compare to getSignaturesForAddress
Compare to getSignaturesForAddress
getSignaturesForAddressreturns public signatures.- The RPC returns the public history.
Get Started
- TypeScript Client
- Rust Client
1
Prerequisites
The TypeScript examples require Node.js 24 or later, pnpm 11.18.0, and the Solana CLI.
Connect to Endpoints
Connect to Endpoints
- Devnet
- Localnet
.env
2
Derive the View Tag
senderViewTagissenderAddress.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
getShieldedTransactionsByTagsfetches the encrypted outputs associated withsenderViewTag.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
senderKeypairsupplies the sender’s viewing key for local decryption.decryptTransactionsdecrypts matching outputs and writes history ontoWallet.wallet.privateTransactions()reads the decrypted history.decryptToBalancesreturns balances only.
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.