This page shows the infrastructure code you add once before calling deposit, transfer, or withdraw. All examples use TypeScript and React.

Redux state adapter

Create the SDK state branch, register it in your store, and bind the adapter before creating the client.

Wallet adapter

The client signs messages and transactions through a wallet adapter. Implement the three methods against your wallet SDK.

Client bootstrap

Load browser circuit assets, pass network configuration, and create the client once at startup.

React provider and hook

Expose the client through context so feature code can call usePrivacySdkClient().
Wrap your app root with PrivacySdkProvider and read client from the hook before calling operations.

Persist state in local storage

SDK state lives in the Redux branch created above. Save and restore that branch per wallet owner so private records and registry cache survive reloads.
Call usePrivacySdkPersistence(walletAddress) inside PrivacySdkProvider after the client is ready. Amount fields in private records are stored as strings in JSON; the SDK normalizes them on read.

Quick start (Stellar preset)

Minimal in-memory bootstrap before this full React setup.

State integration

Why the SDK needs state and when to use Redux.

Data sources

Production vs documentation fixture state.

Operation lifecycle

Prepare, execute, errors, and progress events.