Skip to main content

Overview

The SparkReadonlyClient lets you query wallet data without creating a full SparkWallet. It exposes read-only methods for balances, transfers, deposits, invoices, and token transactions. Three use cases:

Installation

The wallet viewer ships with the standard SDK package.

Create a Public Client

No authentication. Queries public (non-private) wallet data.
Public clients can query any wallet that hasn’t enabled privacy mode. Private wallets return empty results, not errors.

Create with Master Key

Authenticates with an identity key derived from a mnemonic or seed. Can query private wallets the key owns.

Create with Custom Signer

For integrations where a partner provides a SparkSigner implementation instead of a mnemonic.

Query Examples

Balances

Transfers

Deposits and UTXOs

Invoices and Token Transactions


Privacy Model

The wallet viewer respects privacy mode:
  • Privacy off (default): Both public and authenticated clients see all data.
  • Privacy on: Public clients get empty results. Authenticated clients (master key / signer) see everything.
The distinction is server-side. When a wallet has privacy enabled, unauthenticated requests return zero balances and empty arrays, not errors. If you need visibility into private wallets without full wallet initialization, use createWithMasterKey(). For event-driven notifications (push notifications, payment alerts) without needing read access, see webhooks.

API Reference

See the full method reference at Wallet Viewer API.