{"id":21659021,"url":"https://github.com/3box/3box-js","last_synced_at":"2025-07-17T21:32:15.618Z","repository":{"id":48311626,"uuid":"145133349","full_name":"3box/3box-js","owner":"3box","description":"3Box JavaScript SDK: User identities, storage, messaging","archived":true,"fork":false,"pushed_at":"2021-08-09T12:14:17.000Z","size":17760,"stargazers_count":207,"open_issues_count":70,"forks_count":65,"subscribers_count":35,"default_branch":"develop","last_synced_at":"2024-11-10T05:42:43.410Z","etag":null,"topics":["database","decentralized","ethereum","profiles"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3box.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-17T14:54:00.000Z","updated_at":"2024-05-08T19:42:36.000Z","dependencies_parsed_at":"2022-09-05T04:20:21.923Z","dependency_job_id":null,"html_url":"https://github.com/3box/3box-js","commit_stats":null,"previous_names":[],"tags_count":67,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3box%2F3box-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3box%2F3box-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3box%2F3box-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3box%2F3box-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3box","download_url":"https://codeload.github.com/3box/3box-js/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226305128,"owners_count":17603745,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","decentralized","ethereum","profiles"],"created_at":"2024-11-25T09:30:18.384Z","updated_at":"2024-11-25T09:30:36.629Z","avatar_url":"https://github.com/3box.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# ⚠️ ⚠️ Deprecated in favor of Ceramic ⚠️ ⚠️ \n\u003e 3box.js and related tools built by 3Box Labs are deprecated and no loger supported. Developers are encurraged to build with https://ceramic.network which is a more secure and decentralized protocol for sovereign data.\n\n\n[Install](#install) | [Usage](#usage) | [Example](#example) | [Data Standards](#datastandards) | [API Docs](#api)\n\n\n# 3box-js\n\u003e ⚠️ 3Box.js is slowly being phased out in favor of a new more decentralized system called IDX (https://idx.xyz) which is built on top of the Ceramic network. You can use 3Box.js for now, but be aware that support will be limited as Ceramic is moving closer to a mainnet release.\n\n\nThis is a library which allows you to set, get, and remove private and public data associated with an ethereum account. It can be used to store identity data, user settings, etc. by dapps that use a web3 enabled browser. The data will be retrievable as long as the user has access to the private key for the used ethereum account. The data is encrypted and can not be read by any third party that the user hasn't authorized. There is one shared space for data which all authorized dapps access by default, then there are spaces which dapps have to request explicit consent to access.\n\n## Getting Started\n### \u003ca name=\"install\"\u003e\u003c/a\u003eInstallation\nInstall 3box in your npm project:\n```\n$ npm install 3box\n```\n\n### \u003ca name=\"usage\"\u003e\u003c/a\u003eUsage\n#### Import 3Box into your project\nImport the 3box module\n```js\nconst Box = require('3box')\n```\nImport using the dist build in your html code\n```js\n\u003cscript type=\"text/javascript\" src=\"../dist/3box.js\"\u003e\u003c/script\u003e\n```\n\nOr optionally by loading remote copy from [unpkg](https://unpkg.com/) CDN.\n\n```html\n\u003c!-- The most recent version  --\u003e\n\u003cscript src=\"https://unpkg.com/3box/dist/3box.js\"\u003e\u003c/script\u003e\n\u003c!-- The most recent minified version  --\u003e\n\u003cscript src=\"https://unpkg.com/3box/dist/3box.min.js\"\u003e\u003c/script\u003e\n\u003c!-- Load specific versions by specifying the version as follows --\u003e\n\u003cscript src=\"https://unpkg.com/3box@\u003cversion\u003e/dist/3box.js\"\u003e\u003c/script\u003e\n```\n\n## Profiles API\n### Get the existing public profile of an address (or DID)\n3Box allows users to create a public profile for their Ethereum address. In your dapp you might have multiple ethereum addresses that you would like to display a name, image, and other basic social metadata for. The `getProfile` method allows you to fetch the public profile of any ethereum address (if it has one). This is a *static* method so you can call it directly from the **Box** object.\n\n```js\nconst profile = await Box.getProfile('0x12345abcde')\nconsole.log(profile)\n```\n\n### Update (get, set, remove) public and private profile data\n3Box allows applications to create, read, update, and delete public and private data stored in a user's 3Box. To enable this functionality, applications must first authenticate the user's 3Box by calling the `auth` method. This method prompts the user to authenticate (sign-in) to your dapp and returns a promise with a threeBox instance. You can only update (set, get, remove) data for users that have authenticated to and are currently interacting with your dapp. Below `ethereumProvider` refers to the object that you would get from `web3.currentProvider`, or `window.ethereum`.\n\n#### 1. Create a 3Box instance\nTo create a 3Box session you call the `create` method. This creates an instance of the Box class which can be used to openThreads and authenticate the user in any order. This is best to call on page load, so it can begin initializing and connecting services like IPFS in background.\n\n```js\nconst box = await Box.create()\n```\n\n#### 2. Authenticate user\nCalling the `auth` method will authenticate the user. If you want to authenticate the user to one or multiple spaces you can specify this here. A provider needs to be passed, this can be an `ethereum provider` (from `web3.currentProvider`, or `window.ethereum`) or a `3ID Provider` (from [IdentityWallet](https://github.com/3box/identity-wallet-js)). If using an ethereum provider you need to pass an ethereum address to the `auth` method as well. If the user does not have an existing 3Box account, this method will automatically create one for them in the background.\n\n```js\nconst address = '0x12345abcde'\nconst spaces = ['myDapp']\nawait box.auth(spaces, { address, provider })\n```\n\n#### 3. Sync user's available 3Box data from the network\nWhen you first authenticate the box in your dapp all data might not be synced from the network yet. You should therefore wait for the data to be fully synced. To do this you can simply await the `box.syncDone` promise:\n```js\nawait box.syncDone\n```\nThis will allow you to know when all the user's data is available to you. We advise against *setting* any data before this sync has happened. However, reading data before the sync is complete is fine and encouraged - just remember to check for updates once the sync is finished! Please note, `box.syncDone` can only be called once the user has been authenticated, it is  not possible if only the `Box.create` method has been called.\n\nIf you prefer to not use promises you can add a callback using the `onSyncDone` method.\n\n#### 3. Interact with 3Box profile data\nYou can now use the `box` instance object to interact with public and private data stored in the user's profile. In both the public and the private data store you use a `key` to set a `value`.\n\n```js\n// use the public profile\n// get\nconst nickname = await box.public.get('name')\nconsole.log(nickname)\n// set\nawait box.public.set('name', 'oed')\n// remove\nawait box.public.remove('name')\n\n// use the private store\n// get\nconst email = await box.private.get('email')\nconsole.log(email)\n// set\nawait box.private.set('email', 'oed@email.service')\n// remove\nawait box.private.remove('email')\n```\n\n##### Set multiple fields at once:\n```js\nconst fields = ['name', 'website', 'employer']\nconst values = ['Jon Schwartz', 'openworklabs.com', 'Open Work Labs']\n\nawait box.public.setMultiple(fields, values)\n\nconst privateFields = ['age', 'coinBalance']\nconst privateValues = ['xxx', 'yyy']\n\nawait box.private.setMultiple(privateFields, privateValues)\n```\n\n##### Open a thread\nOnce you have created a 3Box session you can open a thread to view data in it. This can be done before you authenticate the user (required for them to post in the thread).\nWhen opening a thread the moderation options need to be given. You can pass `firstModerator`, a 3ID (or ethereum address) of the first moderator, and a `members` boolean which indicates if it is a members thread or not.\n```js\nconst thread = await box.openThread('myDapp', 'myThread', { firstModerator: 'did:3:bafy...', members: true })\n```\nOnce a thread has been opened you can call the `getPosts()` method to retrive the posts.\n\n\n\u003c!-- commenting this out for now, not really needed when we're not using the iframe\n#### IPFS Configs\n\nTwo options are available if you want to pass additional IPFS config options to the IPFS object used in the library.\n\nFirst you can pass your own IPFS object, configured how you decide and then disable the iframe as well. This offers the most optionality but experiences a loss in performace without the iframe.\n\n```js\nconst IPFS_OPTIONS = {\n  EXPERIMENTAL: {\n    pubsub: true\n  },\n  ... // Add your additional options, pubsub is required\n}\n\nconst ipfs = new IPFS(IPFS_OPTIONS)\nconst box = await Box.openBox('0x12345abcde', ethereumProvider, { ipfs, iframeStore: false })\n```\n\nSecond you can access the already initialized default IPFS object and change the IPFS configurations available after initialization. For example you can add a pinning node as follows.\n\n```js\nconst box = await Box.openBox('0x12345abcde', ethereumProvider)\n\nbox._ipfs.swarm.connect(pinningNode, () =\u003e {\n  ...\n})\n```\n\nReference [ipfs-js](https://github.com/ipfs/js-ipfs) for additional options.\n--\u003e\n\n## Spaces API (Storage)\n### Open a space\nA space is a named section of a users 3Box. Each space has both a public and a private store, and for every space you open the user has to grant explicit consent to view that space. This means that if your dapp uses a space that no other dapp uses, only your dapp is allowed to update the data and read the private store of that particular space. To open a space called `narwhal` you simply call:\n\n```js\nconst space = await box.openSpace('narwhal')\n```\n\n#### Sync user's available space data from the network\nSimilarly to how you need to wait for data to sync in a users main data storage, you may also do the same thing for a space:\n```js\nawait space.syncDone\n```\n\n#### Get, set, and remove space data\nInteracting with data in a space is done in the same way as interacting with `box.public` and `box.private` ([see here](#interact-with-3box-data)). For example:\n```js\nconst config = await space.private.get('dapp-config')\n```\n\n## Threads API (Messaging)\n### Add public and confidential message threads to your app\nThreads are a shared datastore that enable decentralized communication between users, by allowing one or more users to post messages in a sequence. This functionality is great for adding commenting, chat, messaging, feed, and stream features to your application. Threads are saved within a space and users that join a thread (with the same name, space, moderation configs, and access configs) will be able to communicate in that thread.\n\nFor the fully detailed spec, view the [documentation](https://github.com/3box/3box/blob/master/3IPs/3ip-2.md).\n\n#### Viewing a Public Thread\nYou can get all posts made in a public thread without opening a space. This is great for allowing visitors of your site view comments made by other users. This is achieved by calling the `getThread` method on the Box object. A thread can be referenced by all its configuration options or by its address.\n```js\nconst posts = await Box.getThread(spaceName, threadName, firstModerator, membersThread)\nconsole.log(posts)\n```\nThreads can also be viewed without opening space, or authenticating by calling the `getPosts()` method on the thread object returned from `openThread` (see Open a thread section above).\n\n```js\nconst posts = await Box.getThreadByAddress(threadAddress)\nconsole.log(posts)\n```\nHowever if applications want to add interactivity to the thread, such as allowing the user to post in a thread or follow updates in a thread, you will need to open their space to enable additional functionality. Same is true for a confidential thread, which requires you autheticate to get access to view the posts in a confidential thread.\n\n#### Interacting with a Thread\n\n##### 1.a Creating a Public Thread\n\nTo create and join a public thread, you can simply join the thread. This will implicitly use the moderation options where the current user is the `firstModerator` and `members` is false.\n\n```js\nconst thread = await space.joinThread('myThread')\n```\n\nA thread can also be given the moderation options when joining. You can pass `firstModerator`, a 3ID of the first moderator, and a `members` boolean which indicates if it is a members thread or not. Moderators can add other moderators, add members, and delete any posts in the thread. Members can post in member only threads.\n\n```js\nconst thread = await space.joinThread('myThread', { firstModerator: 'some3ID', members: true })\n```\n\n##### 1.b Creating a Confidential Thread\n\nTo create and join a confidential thread.\n\n```js\nconst thread = await space.createConfidentialThread('myConfThread')\n```\n\nAt creation you will likely want to add other members so that they can read and write messages to the thread, as shown below.\n\n##### 2. Joining a Thread\n\nAn existing public or confidential thread can be joined by its address. Confidential threads are best referenced by their address.\n\n```js\nconst thread = await space.joinThreadByAddress('/orbitdb/zdpuAp5QpBKR4BBVTvqe3KXVcNgo4z8Rkp9C5eK38iuEZj3jq/3box.thread.testSpace.testThread')\n```\n\nWhile public threads can be joined by address or by passing known configs (same as above).\n\n```js\nconst publicThread = await space.joinThread('myThread', { firstModerator: 'some3ID', members: true })\n```\n\nAn address of a thread can be found as follows once joined.\n\n```js\nconst threadAddress = thread.address\n```\n\n##### 3. Posting to a thread\nThis allows the user to add a message to the thread. The author of the message will be the user's 3Box DID. When a user posts in a thread, they are automatically subscribed to the thread and it is saved in the space used by the application under the key `thread-threadName`.\n```js\nawait thread.post('hello world')\n```\n##### 4. Getting all posts in a thread\nThis allows applications to get the posts in a thread.\n```js\nconst posts = await thread.getPosts()\nconsole.log(posts)\n```\n##### 5. Listening for updates in thread\nThis allows applications to listen for new posts in the thread, and perform an action when this occurs, such as adding the new message to the application's UI.\n```js\nthread.onUpdate(myCallbackFunction)\n```\n\n##### 6. Handling moderation and capabilities\n\nAdd a moderator and list all existing moderators\n```js\nawait thread.addModerator('some3ID')\n\nconst mods = await thread.listModerators()\n```\n\nAdd a member and list all existing members, if a members only thread\n```js\nawait thread.addMember('some3ID')\n\nconst members = await thread.listMembers()\n```\n\nListen for when there has been moderators or member added.\n```js\nthread.onNewCapabilities(myCallbackFunction)\n```\n\n## \u003ca name=\"example\"\u003e\u003c/a\u003e Example Application\n\nYou can quickly run and interact with some code by looking at the files in the `/example` folder. You run the example with the following commands:\n\n```bash\n$ npm ci\n$ npm run example:start\n```\n\nThis runs a simple server at `http://localhost:3000/` that serves the static `example/index.html` file. This allows it easily interact with metamask. You can edit the `example/index.html` file to try differnt code.\n\n## Build\n\n### Optimize build for read-only 3Box API\n\nIf you only want to fetch profile data from 3Box's profile APIs you can optimize by importing only those functions or the API specific dist file. Since this includes minimal dependencies, file size is ~ 80kb vs 4+mb for the full build.\n\n```js\nconst { profileGraphQL, getProfile, getProfiles, getVerifiedAccounts } = require('3box/lib/api')\n```\n```html\n\u003cscript src=\"https://unpkg.com/3box/dist/3box.api.min.js\"\u003e\u003c/script\u003e\n```\n\n### Resolving build size issues and out of memory errors\n\nSome platforms, tooling, or configs have caused the build process to throw out of memory errors. This is a combination of the size of our library (plus dependencies) and the specific configs you have for your build. It could be things like tooling running on dependencies and not just your source or dependencies be recursively resolved. You can attempt to build the library anyways by adding the follow environment variable to increase memory for the node process.\n\n```\nNODE_OPTIONS=--max_old_space_size=4096 npm run build\n```\n\n## \u003ca name=\"datastandards\"\u003e\u003c/a\u003e Data Standards\nDapps can store data about users that relate to only their dapp. However we encurage dapps to share data between them for a richer web3 experience. Therefore we have created [**Key Conventions**](https://github.com/3box/3box/blob/master/community/key-conventions.md) in order to facilitate this. Feel free to make a PR to this file to explain to the community how you use 3Box!\n\n## \u003ca nam=\"idUtils\"\u003e\u003c/a\u003e Validate claims\nUse the `idUtils` module to [validate claims](https://www.w3.org/TR/verifiable-claims-data-model/). See\nthe [did-jwt](https://github.com/uport-project/did-jwt) library for more details.\n\n```js\nconst { idUtils } = require('3box')\n\nconst claim = 'eyJ0eX...'\nidUtils.verifyClaim(claim)\n  .then(valid =\u003e console.info('details:', valid)\n  .catch(err =\u003e console.error('claim verification failed:', err)\n```\n\n## Maintainers\n[@oed](https://github.com/oed)\n\n## \u003ca name=\"api\"\u003e\u003c/a\u003e API Documentation\n\u003ca name=\"Box\"\u003e\u003c/a\u003e\n\n### Box ⇐ [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)\n**Kind**: global class  \n**Extends**: [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)  \n\n* [Box](#Box) ⇐ [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)\n    * [new Box()](#new_Box_new)\n    * _instance_\n        * [.public](#Box+public)\n        * [.private](#Box+private)\n        * [.verified](#Box+verified)\n        * [.spaces](#Box+spaces)\n        * [.syncDone](#Box+syncDone)\n        * [.DID](#Box+DID)\n        * [.auth(spaces, opts)](#Box+auth)\n        * [.openSpace(name, opts)](#Box+openSpace) ⇒ [\u003ccode\u003eSpace\u003c/code\u003e](#Space)\n        * [.openThread(space, name, opts)](#Box+openThread) ⇒ [\u003ccode\u003eThread\u003c/code\u003e](#Thread)\n        * [.onSyncDone(syncDone)](#Box+onSyncDone) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\n        * [.linkAddress([link])](#Box+linkAddress)\n        * [.removeAddressLink(address)](#Box+removeAddressLink)\n        * [.isAddressLinked([query])](#Box+isAddressLinked)\n        * [.listAddressLinks()](#Box+listAddressLinks) ⇒ \u003ccode\u003eArray\u003c/code\u003e\n        * [.logout()](#Box+logout)\n    * _static_\n        * [.idUtils](#Box.idUtils)\n            * [.verifyClaim](#Box.idUtils.verifyClaim) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n            * [.isSupportedDID(did)](#Box.idUtils.isSupportedDID) ⇒ \u003ccode\u003e\\*\u003c/code\u003e \\| \u003ccode\u003eboolean\u003c/code\u003e\n            * [.isClaim(claim, opts)](#Box.idUtils.isClaim) ⇒ \u003ccode\u003ePromise.\u0026lt;boolean\u0026gt;\u003c/code\u003e\n        * [.create(provider, opts)](#Box.create) ⇒ [\u003ccode\u003eBox\u003c/code\u003e](#Box)\n        * [.supported()](#Box.supported) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\n        * [.openBox(address, provider, opts)](#Box.openBox) ⇒ [\u003ccode\u003eBox\u003c/code\u003e](#Box)\n        * [.isLoggedIn(address)](#Box.isLoggedIn) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\n        * [.getIPFS()](#Box.getIPFS) ⇒ \u003ccode\u003eIPFS\u003c/code\u003e\n\n\u003ca name=\"new_Box_new\"\u003e\u003c/a\u003e\n\n#### new Box()\nPlease use the **openBox** method to instantiate a 3Box\n\n\u003ca name=\"Box+public\"\u003e\u003c/a\u003e\n\n#### box.public\n**Kind**: instance property of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| public | [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore) | access the profile store of the users 3Box |\n\n\u003ca name=\"Box+private\"\u003e\u003c/a\u003e\n\n#### box.private\n**Kind**: instance property of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| private | [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore) | access the private store of the users 3Box |\n\n\u003ca name=\"Box+verified\"\u003e\u003c/a\u003e\n\n#### box.verified\n**Kind**: instance property of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| verified | [\u003ccode\u003eVerified\u003c/code\u003e](#Verified) | check and create verifications |\n\n\u003ca name=\"Box+spaces\"\u003e\u003c/a\u003e\n\n#### box.spaces\n**Kind**: instance property of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| spaces | \u003ccode\u003eObject\u003c/code\u003e | an object containing all open spaces indexed by their name. |\n\n\u003ca name=\"Box+syncDone\"\u003e\u003c/a\u003e\n\n#### box.syncDone\n**Kind**: instance property of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| syncDone | \u003ccode\u003ePromise\u003c/code\u003e | A promise that is resolved when the box is synced |\n\n\u003ca name=\"Box+DID\"\u003e\u003c/a\u003e\n\n#### box.DID\n**Kind**: instance property of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| DID | \u003ccode\u003eString\u003c/code\u003e | the DID of the user |\n\n\u003ca name=\"Box+auth\"\u003e\u003c/a\u003e\n\n#### box.auth(spaces, opts)\nAuthenticate the user\n\n**Kind**: instance method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| spaces | \u003ccode\u003eArray.\u0026lt;String\u0026gt;\u003c/code\u003e | A list of spaces to authenticate (optional) |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.address | \u003ccode\u003eString\u003c/code\u003e | An ethereum address |\n| opts.provider | \u003ccode\u003eString\u003c/code\u003e | A 3ID provider, or ethereum provider |\n| opts.consentCallback | \u003ccode\u003efunction\u003c/code\u003e | A function that will be called when the user has consented to opening the box |\n\n\u003ca name=\"Box+openSpace\"\u003e\u003c/a\u003e\n\n#### box.openSpace(name, opts) ⇒ [\u003ccode\u003eSpace\u003c/code\u003e](#Space)\nOpens the space with the given name in the users 3Box\n\n**Kind**: instance method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Returns**: [\u003ccode\u003eSpace\u003c/code\u003e](#Space) - the Space instance for the given space name  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | \u003ccode\u003eString\u003c/code\u003e | The name of the space |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.consentCallback | \u003ccode\u003efunction\u003c/code\u003e | A function that will be called when the user has consented to opening the box |\n| opts.onSyncDone | \u003ccode\u003efunction\u003c/code\u003e | A function that will be called when the space has finished syncing with the pinning node |\n\n\u003ca name=\"Box+openThread\"\u003e\u003c/a\u003e\n\n#### box.openThread(space, name, opts) ⇒ [\u003ccode\u003eThread\u003c/code\u003e](#Thread)\nOpen a thread. Use this to start receiving updates\n\n**Kind**: instance method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Returns**: [\u003ccode\u003eThread\u003c/code\u003e](#Thread) - An instance of the thread class for the joined thread  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| space | \u003ccode\u003eString\u003c/code\u003e | The name of the space for this thread |\n| name | \u003ccode\u003eString\u003c/code\u003e | The name of the thread |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.firstModerator | \u003ccode\u003eString\u003c/code\u003e | DID of first moderator of a thread, by default, user is first moderator |\n| opts.members | \u003ccode\u003eBoolean\u003c/code\u003e | join a members only thread, which only members can post in, defaults to open thread |\n| opts.noAutoSub | \u003ccode\u003eBoolean\u003c/code\u003e | Disable auto subscription to the thread when posting to it (default false) |\n| opts.ghost | \u003ccode\u003eBoolean\u003c/code\u003e | Enable ephemeral messaging via Ghost Thread |\n| opts.ghostBacklogLimit | \u003ccode\u003eNumber\u003c/code\u003e | The number of posts to maintain in the ghost backlog |\n| opts.ghostFilters | \u003ccode\u003eArray.\u0026lt;function()\u0026gt;\u003c/code\u003e | Array of functions for filtering messages |\n\n\u003ca name=\"Box+onSyncDone\"\u003e\u003c/a\u003e\n\n#### box.onSyncDone(syncDone) ⇒ \u003ccode\u003ePromise\u003c/code\u003e\nSets the callback function that will be called once when the box is fully synced.\n\n**Kind**: instance method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Returns**: \u003ccode\u003ePromise\u003c/code\u003e - A promise that is fulfilled when the box is syned  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| syncDone | \u003ccode\u003efunction\u003c/code\u003e | The function that will be called |\n\n\u003ca name=\"Box+linkAddress\"\u003e\u003c/a\u003e\n\n#### box.linkAddress([link])\nCreates a proof that links an ethereum address to the 3Box account of the user. If given proof, it will simply be added to the root store.\n\n**Kind**: instance method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [link] | \u003ccode\u003eObject\u003c/code\u003e | Optional link object with type or proof |\n| [link.proof] | \u003ccode\u003eObject\u003c/code\u003e | Proof object, should follow [spec](https://github.com/3box/3box/blob/master/3IPs/3ip-5.md) |\n\n\u003ca name=\"Box+removeAddressLink\"\u003e\u003c/a\u003e\n\n#### box.removeAddressLink(address)\nRemove given address link, returns true if successful\n\n**Kind**: instance method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | address that is linked |\n\n\u003ca name=\"Box+isAddressLinked\"\u003e\u003c/a\u003e\n\n#### box.isAddressLinked([query])\nChecks if there is a proof that links an external account to the 3Box account of the user. If not params given and any link exists, returns true\n\n**Kind**: instance method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| [query] | \u003ccode\u003eObject\u003c/code\u003e | Optional object with address and/or type. |\n| [query.type] | \u003ccode\u003eString\u003c/code\u003e | Does the given type of link exist |\n| [query.address] | \u003ccode\u003eString\u003c/code\u003e | Is the given adressed linked |\n\n\u003ca name=\"Box+listAddressLinks\"\u003e\u003c/a\u003e\n\n#### box.listAddressLinks() ⇒ \u003ccode\u003eArray\u003c/code\u003e\nLists address links associated with this 3Box\n\n**Kind**: instance method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Returns**: \u003ccode\u003eArray\u003c/code\u003e - An array of link objects  \n\u003ca name=\"Box+logout\"\u003e\u003c/a\u003e\n\n#### box.logout()\nCloses the 3box instance and clears local cache. If you call this,\nusers will need to sign a consent message to log in the next time\nyou call openBox.\n\n**Kind**: instance method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n\u003ca name=\"Box.idUtils\"\u003e\u003c/a\u003e\n\n#### Box.idUtils\nA module to verify \u0026 validate claims\n\n**Kind**: static property of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n\n* [.idUtils](#Box.idUtils)\n    * [.verifyClaim](#Box.idUtils.verifyClaim) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.isSupportedDID(did)](#Box.idUtils.isSupportedDID) ⇒ \u003ccode\u003e\\*\u003c/code\u003e \\| \u003ccode\u003eboolean\u003c/code\u003e\n    * [.isClaim(claim, opts)](#Box.idUtils.isClaim) ⇒ \u003ccode\u003ePromise.\u0026lt;boolean\u0026gt;\u003c/code\u003e\n\n\u003ca name=\"Box.idUtils.verifyClaim\"\u003e\u003c/a\u003e\n\n##### idUtils.verifyClaim ⇒ \u003ccode\u003eObject\u003c/code\u003e\nVerify a claim and return its content.\nSee https://github.com/uport-project/did-jwt/ for more details.\n\n**Kind**: static property of [\u003ccode\u003eidUtils\u003c/code\u003e](#Box.idUtils)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - The validated claim  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| claim | \u003ccode\u003eString\u003c/code\u003e |  |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.audience | \u003ccode\u003estring\u003c/code\u003e | The DID of the JWT's audience |\n\n\u003ca name=\"Box.idUtils.isSupportedDID\"\u003e\u003c/a\u003e\n\n##### idUtils.isSupportedDID(did) ⇒ \u003ccode\u003e\\*\u003c/code\u003e \\| \u003ccode\u003eboolean\u003c/code\u003e\nCheck whether a string is a muport did or not\n\n**Kind**: static method of [\u003ccode\u003eidUtils\u003c/code\u003e](#Box.idUtils)  \n**Returns**: \u003ccode\u003e\\*\u003c/code\u003e \\| \u003ccode\u003eboolean\u003c/code\u003e - Whether the did is a supported did or not  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| did | \u003ccode\u003eString\u003c/code\u003e | A string containing a user did |\n\n\u003ca name=\"Box.idUtils.isClaim\"\u003e\u003c/a\u003e\n\n##### idUtils.isClaim(claim, opts) ⇒ \u003ccode\u003ePromise.\u0026lt;boolean\u0026gt;\u003c/code\u003e\nCheck whether a string is a valid claim or not\n\n**Kind**: static method of [\u003ccode\u003eidUtils\u003c/code\u003e](#Box.idUtils)  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;boolean\u0026gt;\u003c/code\u003e - whether the parameter is an actual claim  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| claim | \u003ccode\u003eString\u003c/code\u003e |  |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.audience | \u003ccode\u003estring\u003c/code\u003e | The DID of the audience of the JWT |\n\n\u003ca name=\"Box.create\"\u003e\u003c/a\u003e\n\n#### Box.create(provider, opts) ⇒ [\u003ccode\u003eBox\u003c/code\u003e](#Box)\nCreates an instance of 3Box\n\n**Kind**: static method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Returns**: [\u003ccode\u003eBox\u003c/code\u003e](#Box) - the 3Box session instance  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| provider | \u003ccode\u003eprovider\u003c/code\u003e | A 3ID provider, or ethereum provider |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.pinningNode | \u003ccode\u003eString\u003c/code\u003e | A string with an ipfs multi-address to a 3box pinning node |\n| opts.ipfs | \u003ccode\u003eObject\u003c/code\u003e | A js-ipfs ipfs object |\n| opts.addressServer | \u003ccode\u003eString\u003c/code\u003e | URL of the Address Server |\n| opts.ghostPinbot | \u003ccode\u003eString\u003c/code\u003e | MultiAddress of a Ghost Pinbot node |\n| opts.supportCheck | \u003ccode\u003eString\u003c/code\u003e | Gives browser alert if 3boxjs/ipfs not supported in browser env, defaults to true. You can also set to false to implement your own alert and call Box.support to check if supported. |\n| opts.iframeCache | \u003ccode\u003eBoolean\u003c/code\u003e | Enable iframe cache for ipfs/orbit, defaults to true |\n\n\u003ca name=\"Box.supported\"\u003e\u003c/a\u003e\n\n#### Box.supported() ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\nDetermines if this browser environment supports 3boxjs and ipfs.\n\n**Kind**: static method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n\u003ca name=\"Box.openBox\"\u003e\u003c/a\u003e\n\n#### Box.openBox(address, provider, opts) ⇒ [\u003ccode\u003eBox\u003c/code\u003e](#Box)\nOpens the 3Box associated with the given address\n\n**Kind**: static method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Returns**: [\u003ccode\u003eBox\u003c/code\u003e](#Box) - the 3Box instance for the given address  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | An ethereum address |\n| provider | \u003ccode\u003eprovider\u003c/code\u003e | An ethereum or 3ID provider |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.consentCallback | \u003ccode\u003efunction\u003c/code\u003e | A function that will be called when the user has consented to opening the box |\n| opts.pinningNode | \u003ccode\u003eString\u003c/code\u003e | A string with an ipfs multi-address to a 3box pinning node |\n| opts.ipfs | \u003ccode\u003eObject\u003c/code\u003e | A js-ipfs ipfs object |\n| opts.addressServer | \u003ccode\u003eString\u003c/code\u003e | URL of the Address Server |\n| opts.contentSignature | \u003ccode\u003eString\u003c/code\u003e | A signature, provided by a client of 3box using the private keys associated with the given address, of the 3box consent message |\n\n\u003ca name=\"Box.isLoggedIn\"\u003e\u003c/a\u003e\n\n#### Box.isLoggedIn(address) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\nCheck if the given address is logged in\n\n**Kind**: static method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Returns**: \u003ccode\u003eBoolean\u003c/code\u003e - true if the user is logged in  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | An ethereum address |\n\n\u003ca name=\"Box.getIPFS\"\u003e\u003c/a\u003e\n\n#### Box.getIPFS() ⇒ \u003ccode\u003eIPFS\u003c/code\u003e\nInstanciate ipfs used by 3Box without calling openBox.\n\n**Kind**: static method of [\u003ccode\u003eBox\u003c/code\u003e](#Box)  \n**Returns**: \u003ccode\u003eIPFS\u003c/code\u003e - the ipfs instance  \n\u003ca name=\"BoxApi\"\u003e\u003c/a\u003e\n\n### BoxApi\n**Kind**: global class  \n\n* [BoxApi](#BoxApi)\n    * [.listSpaces(address, opts)](#BoxApi.listSpaces) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.getSpace(address, name, opts)](#BoxApi.getSpace) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.getThread(space, name, firstModerator, members, opts)](#BoxApi.getThread) ⇒ \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e\n    * [.getThreadByAddress(address, opts)](#BoxApi.getThreadByAddress) ⇒ \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e\n    * [.getConfig(address, opts)](#BoxApi.getConfig) ⇒ \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e\n    * [.getProfile(address, opts)](#BoxApi.getProfile) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.getProfiles(address, opts)](#BoxApi.getProfiles) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.profileGraphQL(query, opts)](#BoxApi.profileGraphQL) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.getVerifiedAccounts(profile)](#BoxApi.getVerifiedAccounts) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\n\u003ca name=\"BoxApi.listSpaces\"\u003e\u003c/a\u003e\n\n#### BoxApi.listSpaces(address, opts) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nGet the names of all spaces a user has\n\n**Kind**: static method of [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - an array with all spaces as strings  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | An ethereum address |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.profileServer | \u003ccode\u003eString\u003c/code\u003e | URL of Profile API server |\n\n\u003ca name=\"BoxApi.getSpace\"\u003e\u003c/a\u003e\n\n#### BoxApi.getSpace(address, name, opts) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nGet the public data in a space of a given address with the given name\n\n**Kind**: static method of [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - a json object with the public space data  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | An ethereum address |\n| name | \u003ccode\u003eString\u003c/code\u003e | A space name |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.blocklist | \u003ccode\u003efunction\u003c/code\u003e | A function that takes an address and returns true if the user has been blocked |\n| opts.metadata | \u003ccode\u003eString\u003c/code\u003e | flag to retrieve metadata |\n| opts.profileServer | \u003ccode\u003eString\u003c/code\u003e | URL of Profile API server |\n\n\u003ca name=\"BoxApi.getThread\"\u003e\u003c/a\u003e\n\n#### BoxApi.getThread(space, name, firstModerator, members, opts) ⇒ \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e\nGet all posts that are made to a thread.\n\n**Kind**: static method of [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)  \n**Returns**: \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e - An array of posts  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| space | \u003ccode\u003eString\u003c/code\u003e | The name of the space the thread is in |\n| name | \u003ccode\u003eString\u003c/code\u003e | The name of the thread |\n| firstModerator | \u003ccode\u003eString\u003c/code\u003e | The DID (or ethereum address) of the first moderator |\n| members | \u003ccode\u003eBoolean\u003c/code\u003e | True if only members are allowed to post |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.profileServer | \u003ccode\u003eString\u003c/code\u003e | URL of Profile API server |\n\n\u003ca name=\"BoxApi.getThreadByAddress\"\u003e\u003c/a\u003e\n\n#### BoxApi.getThreadByAddress(address, opts) ⇒ \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e\nGet all posts that are made to a thread.\n\n**Kind**: static method of [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)  \n**Returns**: \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e - An array of posts  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | The orbitdb-address of the thread |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.profileServer | \u003ccode\u003eString\u003c/code\u003e | URL of Profile API server |\n\n\u003ca name=\"BoxApi.getConfig\"\u003e\u003c/a\u003e\n\n#### BoxApi.getConfig(address, opts) ⇒ \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e\nGet the configuration of a users 3Box\n\n**Kind**: static method of [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)  \n**Returns**: \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e - An array of posts  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | The ethereum address |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.profileServer | \u003ccode\u003eString\u003c/code\u003e | URL of Profile API server |\n\n\u003ca name=\"BoxApi.getProfile\"\u003e\u003c/a\u003e\n\n#### BoxApi.getProfile(address, opts) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nGet the public profile of a given address\n\n**Kind**: static method of [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - a json object with the profile for the given address  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | An ethereum address |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.blocklist | \u003ccode\u003efunction\u003c/code\u003e | A function that takes an address and returns true if the user has been blocked |\n| opts.metadata | \u003ccode\u003eString\u003c/code\u003e | flag to retrieve metadata |\n| opts.profileServer | \u003ccode\u003eString\u003c/code\u003e | URL of Profile API server |\n\n\u003ca name=\"BoxApi.getProfiles\"\u003e\u003c/a\u003e\n\n#### BoxApi.getProfiles(address, opts) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nGet a list of public profiles for given addresses. This relies on 3Box profile API.\n\n**Kind**: static method of [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - a json object with each key an address and value the profile  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eArray\u003c/code\u003e | An array of ethereum addresses |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.profileServer | \u003ccode\u003eString\u003c/code\u003e | URL of Profile API server |\n\n\u003ca name=\"BoxApi.profileGraphQL\"\u003e\u003c/a\u003e\n\n#### BoxApi.profileGraphQL(query, opts) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nGraphQL for 3Box profile API\n\n**Kind**: static method of [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - a json object with each key an address and value the profile  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| query | \u003ccode\u003eObject\u003c/code\u003e | A graphQL query object. |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.graphqlServer | \u003ccode\u003eString\u003c/code\u003e | URL of graphQL 3Box profile service |\n\n\u003ca name=\"BoxApi.getVerifiedAccounts\"\u003e\u003c/a\u003e\n\n#### BoxApi.getVerifiedAccounts(profile) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nVerifies the proofs of social accounts that is present in the profile.\n\n**Kind**: static method of [\u003ccode\u003eBoxApi\u003c/code\u003e](#BoxApi)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - An object containing the accounts that have been verified  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| profile | \u003ccode\u003eObject\u003c/code\u003e | A user profile object, received from the `getProfile` function |\n\n\u003ca name=\"KeyValueStore\"\u003e\u003c/a\u003e\n\n### KeyValueStore\n**Kind**: global class  \n\n* [KeyValueStore](#KeyValueStore)\n    * [new KeyValueStore()](#new_KeyValueStore_new)\n    * [.get(key, opts)](#KeyValueStore+get) ⇒ \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eObject\u003c/code\u003e\n    * [.getMetadata(key)](#KeyValueStore+getMetadata) ⇒ \u003ccode\u003eMetadata\u003c/code\u003e\n    * [.set(key, value)](#KeyValueStore+set) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\n    * [.setMultiple(keys, values)](#KeyValueStore+setMultiple) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\n    * [.remove(key)](#KeyValueStore+remove) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\n    * [.all(opts)](#KeyValueStore+all) ⇒ \u003ccode\u003eArray.\u0026lt;(String\\|{value: String, timestamp: Number})\u0026gt;\u003c/code\u003e\n    * [.log()](#KeyValueStore+log) ⇒ \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e\n\n\u003ca name=\"new_KeyValueStore_new\"\u003e\u003c/a\u003e\n\n#### new KeyValueStore()\nPlease use **box.public** or **box.private** to get the instance of this class\n\n\u003ca name=\"KeyValueStore+get\"\u003e\u003c/a\u003e\n\n#### keyValueStore.get(key, opts) ⇒ \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eObject\u003c/code\u003e\nGet the value and optionally metadata of the given key\n\n**Kind**: instance method of [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e \\| \u003ccode\u003eObject\u003c/code\u003e - the value associated with the key, undefined if there's no such key  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | \u003ccode\u003eString\u003c/code\u003e | the key |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | optional parameters |\n| opts.metadata | \u003ccode\u003eBoolean\u003c/code\u003e | return both value and metadata |\n\n\u003ca name=\"KeyValueStore+getMetadata\"\u003e\u003c/a\u003e\n\n#### keyValueStore.getMetadata(key) ⇒ \u003ccode\u003eMetadata\u003c/code\u003e\nGet metadata for for a given key\n\n**Kind**: instance method of [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore)  \n**Returns**: \u003ccode\u003eMetadata\u003c/code\u003e - Metadata for the key, undefined if there's no such key  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | \u003ccode\u003eString\u003c/code\u003e | the key |\n\n\u003ca name=\"KeyValueStore+set\"\u003e\u003c/a\u003e\n\n#### keyValueStore.set(key, value) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\nSet a value for the given key\n\n**Kind**: instance method of [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore)  \n**Returns**: \u003ccode\u003eBoolean\u003c/code\u003e - true if successful  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | \u003ccode\u003eString\u003c/code\u003e | the key |\n| value | \u003ccode\u003eString\u003c/code\u003e | the value |\n\n\u003ca name=\"KeyValueStore+setMultiple\"\u003e\u003c/a\u003e\n\n#### keyValueStore.setMultiple(keys, values) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\nSet multiple values for multiple keys\n\n**Kind**: instance method of [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore)  \n**Returns**: \u003ccode\u003eBoolean\u003c/code\u003e - true if successful, throw error if not  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| keys | \u003ccode\u003eArray.\u0026lt;String\u0026gt;\u003c/code\u003e | the keys |\n| values | \u003ccode\u003eArray.\u0026lt;String\u0026gt;\u003c/code\u003e | the values |\n\n\u003ca name=\"KeyValueStore+remove\"\u003e\u003c/a\u003e\n\n#### keyValueStore.remove(key) ⇒ \u003ccode\u003eBoolean\u003c/code\u003e\nRemove the value for the given key\n\n**Kind**: instance method of [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore)  \n**Returns**: \u003ccode\u003eBoolean\u003c/code\u003e - true if successful  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| key | \u003ccode\u003eString\u003c/code\u003e | the key |\n\n\u003ca name=\"KeyValueStore+all\"\u003e\u003c/a\u003e\n\n#### keyValueStore.all(opts) ⇒ \u003ccode\u003eArray.\u0026lt;(String\\|{value: String, timestamp: Number})\u0026gt;\u003c/code\u003e\nGet all values and optionally metadata\n\n**Kind**: instance method of [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore)  \n**Returns**: \u003ccode\u003eArray.\u0026lt;(String\\|{value: String, timestamp: Number})\u0026gt;\u003c/code\u003e - the values  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | optional parameters |\n| opts.metadata | \u003ccode\u003eBoolean\u003c/code\u003e | return both values and metadata |\n\n\u003ca name=\"KeyValueStore+log\"\u003e\u003c/a\u003e\n\n#### keyValueStore.log() ⇒ \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e\nReturns array of underlying log entries. In linearized order according to their Lamport clocks.\nUseful for generating a complete history of all operations on store.\n\n**Kind**: instance method of [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore)  \n**Returns**: \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e - Array of ordered log entry objects  \n**Example**  \n```js\nconst log = store.log\n const entry = log[0]\n console.log(entry)\n // { op: 'PUT', key: 'Name', value: 'Botbot', timeStamp: '1538575416068' }\n```\n\u003ca name=\"User\"\u003e\u003c/a\u003e\n\n### User\nClass representing a user.\n\n**Kind**: global class  \n\n* [User](#User)\n    * [.DID](#User+DID)\n    * [.signClaim(payload, opts)](#User+signClaim) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.encrypt(message, opts, to)](#User+encrypt) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.decrypt(encryptedObject)](#User+decrypt) ⇒ \u003ccode\u003eString\u003c/code\u003e\n\n\u003ca name=\"User+DID\"\u003e\u003c/a\u003e\n\n#### user.DID\n**Kind**: instance property of [\u003ccode\u003eUser\u003c/code\u003e](#User)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| DID | \u003ccode\u003eString\u003c/code\u003e | the DID of the user |\n\n\u003ca name=\"User+signClaim\"\u003e\u003c/a\u003e\n\n#### user.signClaim(payload, opts) ⇒ \u003ccode\u003eString\u003c/code\u003e\nSign a JWT claim\n\n**Kind**: instance method of [\u003ccode\u003eUser\u003c/code\u003e](#User)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - The signed JWT  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| payload | \u003ccode\u003eObject\u003c/code\u003e | The payload to sign |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n\n\u003ca name=\"User+encrypt\"\u003e\u003c/a\u003e\n\n#### user.encrypt(message, opts, to) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nEncrypt a message. By default encrypts messages symmetrically\nwith the users private key. If the `to` parameter is used,\nthe message will be asymmetrically encrypted to the recipient.\n\n**Kind**: instance method of [\u003ccode\u003eUser\u003c/code\u003e](#User)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - An object containing the encrypted payload  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| message | \u003ccode\u003eString\u003c/code\u003e | The message to encrypt |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| to | \u003ccode\u003eString\u003c/code\u003e | The receiver of the message, a DID or an ethereum address |\n\n\u003ca name=\"User+decrypt\"\u003e\u003c/a\u003e\n\n#### user.decrypt(encryptedObject) ⇒ \u003ccode\u003eString\u003c/code\u003e\nDecrypts a message if the user owns the correct key to decrypt it.\n\n**Kind**: instance method of [\u003ccode\u003eUser\u003c/code\u003e](#User)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - The clear text message  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| encryptedObject | \u003ccode\u003eObject\u003c/code\u003e | The encrypted message to decrypt (as encoded by the `encrypt` method |\n\n\u003ca name=\"Space\"\u003e\u003c/a\u003e\n\n### Space\n**Kind**: global class  \n\n* [Space](#Space)\n    * [new Space()](#new_Space_new)\n    * [.public](#Space+public)\n    * [.private](#Space+private)\n    * [.syncDone](#Space+syncDone)\n    * [.user](#Space+user)\n    * [.joinThread(name, opts)](#Space+joinThread) ⇒ [\u003ccode\u003eThread\u003c/code\u003e](#Thread)\n    * [.createConfidentialThread(name)](#Space+createConfidentialThread) ⇒ [\u003ccode\u003eThread\u003c/code\u003e](#Thread)\n    * [.joinThreadByAddress(address, opts)](#Space+joinThreadByAddress) ⇒ [\u003ccode\u003eThread\u003c/code\u003e](#Thread)\n    * [.subscribeThread(address, config)](#Space+subscribeThread)\n    * [.unsubscribeThread(address)](#Space+unsubscribeThread)\n    * [.subscribedThreads()](#Space+subscribedThreads) ⇒ \u003ccode\u003eArray.\u0026lt;Objects\u0026gt;\u003c/code\u003e\n\n\u003ca name=\"new_Space_new\"\u003e\u003c/a\u003e\n\n#### new Space()\nPlease use **box.openSpace** to get the instance of this class\n\n\u003ca name=\"Space+public\"\u003e\u003c/a\u003e\n\n#### space.public\n**Kind**: instance property of [\u003ccode\u003eSpace\u003c/code\u003e](#Space)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| public | [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore) | access the profile store of the space |\n\n\u003ca name=\"Space+private\"\u003e\u003c/a\u003e\n\n#### space.private\n**Kind**: instance property of [\u003ccode\u003eSpace\u003c/code\u003e](#Space)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| private | [\u003ccode\u003eKeyValueStore\u003c/code\u003e](#KeyValueStore) | access the private store of the space |\n\n\u003ca name=\"Space+syncDone\"\u003e\u003c/a\u003e\n\n#### space.syncDone\n**Kind**: instance property of [\u003ccode\u003eSpace\u003c/code\u003e](#Space)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| syncDone | \u003ccode\u003ePromise\u003c/code\u003e | A promise that is resolved when the space data is synced |\n\n\u003ca name=\"Space+user\"\u003e\u003c/a\u003e\n\n#### space.user\n**Kind**: instance property of [\u003ccode\u003eSpace\u003c/code\u003e](#Space)  \n**Properties**\n\n| Name | Type | Description |\n| --- | --- | --- |\n| user | [\u003ccode\u003eUser\u003c/code\u003e](#User) | access the user object to encrypt data and sign claims |\n\n\u003ca name=\"Space+joinThread\"\u003e\u003c/a\u003e\n\n#### space.joinThread(name, opts) ⇒ [\u003ccode\u003eThread\u003c/code\u003e](#Thread)\nJoin a thread. Use this to start receiving updates from, and to post in threads\n\n**Kind**: instance method of [\u003ccode\u003eSpace\u003c/code\u003e](#Space)  \n**Returns**: [\u003ccode\u003eThread\u003c/code\u003e](#Thread) - An instance of the thread class for the joined thread  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | \u003ccode\u003eString\u003c/code\u003e | The name of the thread |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.firstModerator | \u003ccode\u003eString\u003c/code\u003e | DID of first moderator of a thread, by default, user is first moderator |\n| opts.members | \u003ccode\u003eBoolean\u003c/code\u003e | join a members only thread, which only members can post in, defaults to open thread |\n| opts.confidential | \u003ccode\u003eBoolean\u003c/code\u003e | create a confidential thread with true or join existing confidential thread with an encKeyId string |\n| opts.noAutoSub | \u003ccode\u003eBoolean\u003c/code\u003e | Disable auto subscription to the thread when posting to it (default false) |\n| opts.ghost | \u003ccode\u003eBoolean\u003c/code\u003e | Enable ephemeral messaging via Ghost Thread |\n| opts.ghostPinbot | \u003ccode\u003eString\u003c/code\u003e | MultiAddress of a Ghost Pinbot node |\n| opts.ghostBacklogLimit | \u003ccode\u003eNumber\u003c/code\u003e | The number of posts to maintain in the ghost backlog |\n| opts.ghostFilters | \u003ccode\u003eArray.\u0026lt;function()\u0026gt;\u003c/code\u003e | Array of functions for filtering messages |\n\n\u003ca name=\"Space+createConfidentialThread\"\u003e\u003c/a\u003e\n\n#### space.createConfidentialThread(name) ⇒ [\u003ccode\u003eThread\u003c/code\u003e](#Thread)\nCreate a confidential thread\n\n**Kind**: instance method of [\u003ccode\u003eSpace\u003c/code\u003e](#Space)  \n**Returns**: [\u003ccode\u003eThread\u003c/code\u003e](#Thread) - An instance of the thread class for the created thread  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| name | \u003ccode\u003eString\u003c/code\u003e | The name of the thread |\n\n\u003ca name=\"Space+joinThreadByAddress\"\u003e\u003c/a\u003e\n\n#### space.joinThreadByAddress(address, opts) ⇒ [\u003ccode\u003eThread\u003c/code\u003e](#Thread)\nJoin a thread by full thread address. Use this to start receiving updates from, and to post in threads\n\n**Kind**: instance method of [\u003ccode\u003eSpace\u003c/code\u003e](#Space)  \n**Returns**: [\u003ccode\u003eThread\u003c/code\u003e](#Thread) - An instance of the thread class for the joined thread  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | The full address of the thread |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.noAutoSub | \u003ccode\u003eBoolean\u003c/code\u003e | Disable auto subscription to the thread when posting to it (default false) |\n\n\u003ca name=\"Space+subscribeThread\"\u003e\u003c/a\u003e\n\n#### space.subscribeThread(address, config)\nSubscribe to the given thread, if not already subscribed\n\n**Kind**: instance method of [\u003ccode\u003eSpace\u003c/code\u003e](#Space)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | The address of the thread |\n| config | \u003ccode\u003eObject\u003c/code\u003e | configuration and thread meta data |\n| opts.name | \u003ccode\u003eString\u003c/code\u003e | Name of thread |\n| opts.firstModerator | \u003ccode\u003eString\u003c/code\u003e | DID of the first moderator |\n| opts.members | \u003ccode\u003eString\u003c/code\u003e | Boolean string, true if a members only thread |\n\n\u003ca name=\"Space+unsubscribeThread\"\u003e\u003c/a\u003e\n\n#### space.unsubscribeThread(address)\nUnsubscribe from the given thread, if subscribed\n\n**Kind**: instance method of [\u003ccode\u003eSpace\u003c/code\u003e](#Space)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| address | \u003ccode\u003eString\u003c/code\u003e | The address of the thread |\n\n\u003ca name=\"Space+subscribedThreads\"\u003e\u003c/a\u003e\n\n#### space.subscribedThreads() ⇒ \u003ccode\u003eArray.\u0026lt;Objects\u0026gt;\u003c/code\u003e\nGet a list of all the threads subscribed to in this space\n\n**Kind**: instance method of [\u003ccode\u003eSpace\u003c/code\u003e](#Space)  \n**Returns**: \u003ccode\u003eArray.\u0026lt;Objects\u0026gt;\u003c/code\u003e - A list of thread objects as { address, firstModerator, members, name}  \n\u003ca name=\"Thread\"\u003e\u003c/a\u003e\n\n### Thread\n**Kind**: global class  \n\n* [Thread](#Thread)\n    * [new Thread()](#new_Thread_new)\n    * [.post(message)](#Thread+post) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.addModerator(id)](#Thread+addModerator)\n    * [.listModerators()](#Thread+listModerators) ⇒ \u003ccode\u003eArray.\u0026lt;String\u0026gt;\u003c/code\u003e\n    * [.addMember(id)](#Thread+addMember)\n    * [.listMembers()](#Thread+listMembers) ⇒ \u003ccode\u003eArray.\u0026lt;String\u0026gt;\u003c/code\u003e\n    * [.deletePost(id)](#Thread+deletePost)\n    * [.getPosts(opts)](#Thread+getPosts) ⇒ \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e\n    * [.onUpdate(updateFn)](#Thread+onUpdate)\n    * [.onNewCapabilities(updateFn)](#Thread+onNewCapabilities)\n\n\u003ca name=\"new_Thread_new\"\u003e\u003c/a\u003e\n\n#### new Thread()\nPlease use **space.joinThread** to get the instance of this class\n\n\u003ca name=\"Thread+post\"\u003e\u003c/a\u003e\n\n#### thread.post(message) ⇒ \u003ccode\u003eString\u003c/code\u003e\nPost a message to the thread\n\n**Kind**: instance method of [\u003ccode\u003eThread\u003c/code\u003e](#Thread)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - The postId of the new post  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| message | \u003ccode\u003eObject\u003c/code\u003e | The message |\n\n\u003ca name=\"Thread+addModerator\"\u003e\u003c/a\u003e\n\n#### thread.addModerator(id)\nAdd a moderator to this thread, throws error is user can not add a moderator\n\n**Kind**: instance method of [\u003ccode\u003eThread\u003c/code\u003e](#Thread)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | \u003ccode\u003eString\u003c/code\u003e | Moderator Id |\n\n\u003ca name=\"Thread+listModerators\"\u003e\u003c/a\u003e\n\n#### thread.listModerators() ⇒ \u003ccode\u003eArray.\u0026lt;String\u0026gt;\u003c/code\u003e\nList moderators\n\n**Kind**: instance method of [\u003ccode\u003eThread\u003c/code\u003e](#Thread)  \n**Returns**: \u003ccode\u003eArray.\u0026lt;String\u0026gt;\u003c/code\u003e - Array of moderator DIDs  \n\u003ca name=\"Thread+addMember\"\u003e\u003c/a\u003e\n\n#### thread.addMember(id)\nAdd a member to this thread, throws if user can not add member, throw is not member thread\n\n**Kind**: instance method of [\u003ccode\u003eThread\u003c/code\u003e](#Thread)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | \u003ccode\u003eString\u003c/code\u003e | Member Id |\n\n\u003ca name=\"Thread+listMembers\"\u003e\u003c/a\u003e\n\n#### thread.listMembers() ⇒ \u003ccode\u003eArray.\u0026lt;String\u0026gt;\u003c/code\u003e\nList members, throws if not member thread\n\n**Kind**: instance method of [\u003ccode\u003eThread\u003c/code\u003e](#Thread)  \n**Returns**: \u003ccode\u003eArray.\u0026lt;String\u0026gt;\u003c/code\u003e - Array of member DIDs  \n\u003ca name=\"Thread+deletePost\"\u003e\u003c/a\u003e\n\n#### thread.deletePost(id)\nDelete post\n\n**Kind**: instance method of [\u003ccode\u003eThread\u003c/code\u003e](#Thread)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| id | \u003ccode\u003eString\u003c/code\u003e | Moderator Id |\n\n\u003ca name=\"Thread+getPosts\"\u003e\u003c/a\u003e\n\n#### thread.getPosts(opts) ⇒ \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e\nReturns an array of posts, based on the options.\nIf hash not found when passing gt, gte, lt, or lte,\nthe iterator will return all items (respecting limit and reverse).\n\n**Kind**: instance method of [\u003ccode\u003eThread\u003c/code\u003e](#Thread)  \n**Returns**: \u003ccode\u003eArray.\u0026lt;Object\u0026gt;\u003c/code\u003e - true if successful  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| opts | \u003ccode\u003eObject\u003c/code\u003e | Optional parameters |\n| opts.gt | \u003ccode\u003eString\u003c/code\u003e | Greater than, takes an postId |\n| opts.gte | \u003ccode\u003eString\u003c/code\u003e | Greater than or equal to, takes an postId |\n| opts.lt | \u003ccode\u003eString\u003c/code\u003e | Less than, takes an postId |\n| opts.lte | \u003ccode\u003eString\u003c/code\u003e | Less than or equal to, takes an postId |\n| opts.limit | \u003ccode\u003eInteger\u003c/code\u003e | Limiting the number of entries in result, defaults to -1 (no limit) |\n| opts.reverse | \u003ccode\u003eBoolean\u003c/code\u003e | If set to true will result in reversing the result |\n\n\u003ca name=\"Thread+onUpdate\"\u003e\u003c/a\u003e\n\n#### thread.onUpdate(updateFn)\nRegister a function to be called after new updates\nhave been received from the network or locally.\n\n**Kind**: instance method of [\u003ccode\u003eThread\u003c/code\u003e](#Thread)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| updateFn | \u003ccode\u003efunction\u003c/code\u003e | The function that will get called |\n\n\u003ca name=\"Thread+onNewCapabilities\"\u003e\u003c/a\u003e\n\n#### thread.onNewCapabilities(updateFn)\nRegister a function to be called for every new\ncapability that is added to the thread access controller.\nThis inlcudes when a moderator or member is added.\nThe function takes one parameter, which is the capabilities obj, or\nyou can call listModerator / listMembers again instead.\n\n**Kind**: instance method of [\u003ccode\u003eThread\u003c/code\u003e](#Thread)  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| updateFn | \u003ccode\u003efunction\u003c/code\u003e | The function that will get called |\n\n\u003ca name=\"Verified\"\u003e\u003c/a\u003e\n\n### Verified\n**Kind**: global class  \n\n* [Verified](#Verified)\n    * [new Verified()](#new_Verified_new)\n    * [.DID()](#Verified+DID) ⇒ \u003ccode\u003eString\u003c/code\u003e\n    * [.github()](#Verified+github) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.addGithub(gistUrl)](#Verified+addGithub) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.twitter()](#Verified+twitter) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.addTwitter(claim)](#Verified+addTwitter) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.email()](#Verified+email) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n    * [.addEmail(claim)](#Verified+addEmail) ⇒ \u003ccode\u003eObject\u003c/code\u003e\n\n\u003ca name=\"new_Verified_new\"\u003e\u003c/a\u003e\n\n#### new Verified()\nPlease use **box.verified** to get the instance of this class\n\n\u003ca name=\"Verified+DID\"\u003e\u003c/a\u003e\n\n#### verified.DID() ⇒ \u003ccode\u003eString\u003c/code\u003e\nReturns the verified DID of the user\n\n**Kind**: instance method of [\u003ccode\u003eVerified\u003c/code\u003e](#Verified)  \n**Returns**: \u003ccode\u003eString\u003c/code\u003e - The DID of the user  \n\u003ca name=\"Verified+github\"\u003e\u003c/a\u003e\n\n#### verified.github() ⇒ \u003ccode\u003eObject\u003c/code\u003e\nVerifies that the user has a valid github account\nThrows an error otherwise.\n\n**Kind**: instance method of [\u003ccode\u003eVerified\u003c/code\u003e](#Verified)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - Object containing username, and proof  \n\u003ca name=\"Verified+addGithub\"\u003e\u003c/a\u003e\n\n#### verified.addGithub(gistUrl) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nAdds a github verification to the users profile\nThrows an error if the verification fails.\n\n**Kind**: instance method of [\u003ccode\u003eVerified\u003c/code\u003e](#Verified)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - Object containing username, and proof  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| gistUrl | \u003ccode\u003eObject\u003c/code\u003e | URL of the proof |\n\n\u003ca name=\"Verified+twitter\"\u003e\u003c/a\u003e\n\n#### verified.twitter() ⇒ \u003ccode\u003eObject\u003c/code\u003e\nVerifies that the user has a valid twitter account\nThrows an error otherwise.\n\n**Kind**: instance method of [\u003ccode\u003eVerified\u003c/code\u003e](#Verified)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - Object containing username, proof, and the verifier  \n\u003ca name=\"Verified+addTwitter\"\u003e\u003c/a\u003e\n\n#### verified.addTwitter(claim) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nAdds a twitter verification to the users profile\nThrows an error if the verification fails.\n\n**Kind**: instance method of [\u003ccode\u003eVerified\u003c/code\u003e](#Verified)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - Object containing username, proof, and the verifier  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| claim | \u003ccode\u003eString\u003c/code\u003e | A did-JWT claim ownership of a twitter username |\n\n\u003ca name=\"Verified+email\"\u003e\u003c/a\u003e\n\n#### verified.email() ⇒ \u003ccode\u003eObject\u003c/code\u003e\nVerifies that the user has a verified email account\nThrows an error otherwise.\n\n**Kind**: instance method of [\u003ccode\u003eVerified\u003c/code\u003e](#Verified)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - Object containing username, proof, and the verifier  \n\u003ca name=\"Verified+addEmail\"\u003e\u003c/a\u003e\n\n#### verified.addEmail(claim) ⇒ \u003ccode\u003eObject\u003c/code\u003e\nAdds an email verification to the users profile\nThrows an error if the verification fails.\n\n**Kind**: instance method of [\u003ccode\u003eVerified\u003c/code\u003e](#Verified)  \n**Returns**: \u003ccode\u003eObject\u003c/code\u003e - Object containing username, proof, and the verifier  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| claim | \u003ccode\u003eString\u003c/code\u003e | A did-JWT claim ownership of an email username |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3box%2F3box-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3box%2F3box-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3box%2F3box-js/lists"}