Skip to main content
Version: 1.2.0-beta1

Interface: MnemonicRecoveryHook

Defined in: src/Mnemonic/types.ts:1016

Namespace-scoped recovery helpers returned by useMnemonicRecovery.

These helpers operate on the current provider namespace and are intended for user-facing recovery UX such as "reset app data" or "clear stale filters".

Properties

canEnumerateKeys

canEnumerateKeys: boolean

Defined in: src/Mnemonic/types.ts:1028

Whether namespace keys can be enumerated automatically.

clearAll() and clearMatching() require this to be true. If it is false, prefer clearKeys([...]) with an explicit durable-key list.


clearAll()

clearAll: () => string[]

Defined in: src/Mnemonic/types.ts:1043

Clears every key in the current namespace.

Returns

string[]

Throws

When the storage backend cannot enumerate namespace keys


clearKeys()

clearKeys: (keys) => string[]

Defined in: src/Mnemonic/types.ts:1050

Clears a specific set of unprefixed keys in the current namespace.

Duplicate keys are ignored.

Parameters

ParameterType
keysreadonly string[]

Returns

string[]


clearMatching()

clearMatching: (predicate) => string[]

Defined in: src/Mnemonic/types.ts:1057

Clears namespace keys whose names match the supplied predicate.

Parameters

ParameterType
predicate(key) => boolean

Returns

string[]

Throws

When the storage backend cannot enumerate namespace keys


listKeys()

listKeys: () => string[]

Defined in: src/Mnemonic/types.ts:1036

Lists all unprefixed keys currently visible in this namespace.

Returns an empty array when no keys exist or when the storage backend cannot enumerate keys.

Returns

string[]


namespace

namespace: string

Defined in: src/Mnemonic/types.ts:1020

Current provider namespace without the trailing storage prefix dot.