To interact with a user's space, call
If the user already has a space with this name, your application will gain access to it; if the user does not have the space, this method will automatically create one for them.
const space = await box.openSpace('myApp')
When called, this method will cause your user's Ethereum wallet provider to present the user with a message to sign:
Allow this app to open your myApp space. It will look something like this:
Once approved, you will be able to update, decrypt, and interact with your user's space.
When you first authenticate the user's space, all data might not be synced from the network yet. Therefore, you should wait for the data to be synced using the
space.syncDone property. This will allow you to know when the user's current data is available to you.