Separate snap_manageState
into separate functions snap_getState
, snap_setState
, and snap_clearState
#1287
Labels
area-capabilities
Related to the kinds of things that snaps are able to do.
type-enhancement
New feature or request
type-research
A research task.
The
snap_manageState
API is a bit strange currently, because you have to specify anoperation
for each request. It's better if the method was separated into three separate methods:snap_getState
, similar to theget
operation.snap_setState
, similar to theupdate
operation, whereparams
is the new state.snap_clearState
, similar to theclear
operation.snap_manageState
can be deprecated, and mapped internally to one of the methods above, depending on theoperation
.Right now we only have one-to-one mappings for permissions to their respective JSON-RPC methods. In order to accomplish the above, while using a single permission, we need to have a way to map one-to-many, from a single storage permission to all the methods above.
The text was updated successfully, but these errors were encountered: