Skip to content

Commit

Permalink
Remove endowment:long-running from documentation (#919)
Browse files Browse the repository at this point in the history
  • Loading branch information
david0xd authored Sep 19, 2023
1 parent 9464241 commit d8c3bf0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
2 changes: 0 additions & 2 deletions snaps/concepts/lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ AWS lambda functions, snaps are designed to wake up in response to messages/even
when idle.
Snaps have an ephemeral lifecycle: they're here one moment, gone the next.
Also, if MetaMask detects that a snap becomes unresponsive, it shuts the snap down.
This doesn't mean that you can't create long-running snaps, but it does mean that your snaps must
handle being shut down, especially when they're not within the JSON-RPC request/response cycle.

A snap is considered unresponsive if:

Expand Down
18 changes: 0 additions & 18 deletions snaps/reference/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,24 +87,6 @@ You can also use it to connect to Ethereum accounts with `eth_requestAccounts` a
those connected accounts.
:::

### endowment:long-running

:::caution
`endowment:long-running` is deprecated.
:::

A snap that is computationally heavy and can't finish execution within the
[snap lifecycle requirements](../concepts/lifecycle.md) must request the `endowment:long-running` permission.
This permission allows the snap to run indefinitely while processing RPC requests.

Specify this permission in the manifest file as follows:

```json
"initialPermissions": {
"endowment:long-running": {}
},
```

### endowment:network-access

To access the internet, a snap must request the `endowment:network-access` permission.
Expand Down

0 comments on commit d8c3bf0

Please sign in to comment.