Skip to content

Commit

Permalink
docs: update snap_manageState documentation (MetaMask#537)
Browse files Browse the repository at this point in the history
* docs: update `snap_manageState` documentation

The `snap_manageState` documentation still warns about storing unencrypted data. MetaMask/snaps#369 makes all Snaps data automatically encrypted.

* Apply suggestions from code review

Co-authored-by: Frederik Bolding <[email protected]>
  • Loading branch information
ziad-saab and FrederikBolding authored Aug 23, 2022
1 parent ec27be1 commit a0c720b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions docs/guide/snaps-rpc-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,6 @@ const addressKey1 = await deriveDogecoinAddress(1);

### `snap_manageState`

::: danger Plaintext Data Storage
The data stored by this method is persisted to disk in unencrypted / plaintext form.
**Never** store any secrets using this method.
:::

::: warning Only Callable By

- Snaps
Expand All @@ -579,8 +574,8 @@ The data stored by this method is persisted to disk in unencrypted / plaintext f

#### Description

This method allows the snap to persist some data to disk in plaintext form and retrieve it at will.
Since the data is in plaintext, the method should **never** be used to store secrets of any kind.
This method allows the snap to persist some data to disk and retrieve it at will.
The data is automatically encrypted using a snap-specific key and automatically decrypted when retrieved.

#### Example

Expand Down

0 comments on commit a0c720b

Please sign in to comment.