resetStorage
Clear chain-derived cache and rebuild it from the live account registry:
- stop the price-refresh timer,
- atomically clear balances, notes-tree state, and the hot projection,
- restart the price-refresh timer (running once immediately),
- ensure each known account remains persisted, then
- refresh balances for each.
Finalized transaction history and locally-authored transfer workflow records are preserved. Account discovery cursors are reset so the next sync backfills every committed note instead of skipping leaves from the cleared tree.
Import
ts
import { resetStorage } from "@0xcurvy/curvy-sdk/actions";Usage
ts
await resetStorage();Signature
ts
function resetStorage(parameters?: ResetStorageParameters): Promise<void>Returns
Promise<void>
The action resolves or returns the value shown in the signature.
Parameters
config
- Type:
CurvyConfig - Required: no
Curvy config to use. Defaults to the ambient config.
ts
await resetStorage({
config,
});Errors
Errors from config resolution and the underlying SDK operation are propagated to the caller.
Related
- Config guide
refreshBalances— Re-sync and persist an account's shielded balances.