Skip to main content
  • Snap

snap_clearState

Description

Clear the entire state of the Snap.

Parameters

object

The request parameters for the snap_clearState method.

encrypted

boolean

Whether to use the separate encrypted state, or the unencrypted state. Defaults to the encrypted state. Encrypted state can only be used if the extension is unlocked, while unencrypted state can be used whether the extension is locked or unlocked.

Returns

null

The result returned by the snap_clearState method.

Example

await snap.request({
method: "snap_clearState",
params: {
encrypted: true, // Optional, defaults to true
},
});