To initialize a new 3Box session, call
If the user already has a 3Box account and profile, your application will gain access to it; if the user does not have an existing 3Box account, this method will automatically create one for them.
const box = await Box.openBox('0x12345...abcde', ethereumProvider)
When called, this method will cause your user's Ethereum wallet provider to present the user with a message to sign:
This app wants to view and update your 3Box profile. It will look something like this:
Once approved, you will be able to update, decrypt, and interact with your user's 3Box profile store.
When you first authenticate the user's 3Box, all data might not be synced from the network yet. Therefore, you should wait for the data to be synced using the
box.syncDone property. This will allow you to know when the user's current data is available to you.