Skip to content

Commit 2ca9df9

Browse files
Travis Vachongobengo
Travis Vachon
andauthored
fix: update client docs to show how to properly delegate recovery (#78)
we are currently instructing users in a way that does not back up their spaces! --------- Co-authored-by: Benjamin Goering <[email protected]>
1 parent 04f6ba7 commit 2ca9df9

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/pages/docs/w3up-client.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,7 @@ Now you may provision your space with your account:
7272
await myAccount.provision(space.did())
7373
```
7474

75-
Once provisioned, it's a good idea to setup recovery, so that when you move to a different device you can still access your space:
76-
77-
```js
78-
await space.createRecovery(myAccount.did())
79-
```
75+
ℹ️ Note: creating a space and provisioning it needs to happen only **once**!
8076

8177
Finally, save your space to your agent's state store:
8278

@@ -90,7 +86,17 @@ If your agent has no other spaces, saving the space will set it as the "current
9086
await client.setCurrentSpace(space.did())
9187
```
9288

93-
ℹ️ Note: creating a space and provisioning it needs to happen only **once**!
89+
One last thing - now that you've saved your space locally, it's a good idea to setup recovery via [web3.storage Account](https://github.com/web3-storage/specs/blob/main/w3-account.md), so that when you move to a different device you can still administer your space as long as you can log in to your web3.storage Account:
90+
91+
```js
92+
const recovery = await space.createRecovery(myAccount.did())
93+
await client.capability.access.delegate({
94+
space: space.did(),
95+
delegations: [recovery],
96+
})
97+
```
98+
99+
ℹ️ Note: If you do not create and delegate space recovery you run the risk of losing access to your space!
94100

95101
## Upload files
96102

0 commit comments

Comments
 (0)