Static
Stateful
Get the public data in a space of a given address with the given name
Kind: static method of Box
Returns: Object
- a json object with the public space data
Param | Type | Description |
address |
| An ethereum address, or DID |
name |
| A space name |
opts |
| Optional parameters |
opts.blocklist |
| A function that takes an address and returns true if the user has been blocked |
opts.metadata |
| flag to retrieve metadata |
opts.profileServer |
| URL of Profile API server |
Get the names of all spaces a user has
Kind: static method of Box
Returns: Object
- an array with all spaces as strings
Param | Type | Description |
address |
| An ethereum address, or DID |
opts |
| Optional parameters |
opts.profileServer |
| URL of Profile API server |
The space
object is an instance of a particular space. See the Auth section for how to create an instance of a space.
Get the value and optionally metadata of the given key
Kind: instance method of KeyValueStore
Returns: String
| Object
- the value associated with the key, undefined if there's no such key
Param | Type | Description |
key |
| the key |
opts |
| optional parameters |
opts.metadata |
| return both value and metadata |
Get the value and optionally metadata of the given key
Kind: instance method of KeyValueStore
Returns: String
| Object
- the value associated with the key, undefined if there's no such key
Param | Type | Description |
key |
| the key |
opts |
| optional parameters |
opts.metadata |
| return both value and metadata |
Get all values in the public store of the space, and optionally all its metadata.
Kind: instance method of KeyValueStore
Returns: String
| Object
- the value associated with the key, undefined if there's no such key
Param | Type | Description |
opts |
| optional parameters |
opts.metadata |
| return both value and metadata |
Get all values in the private store of the space, and optionally all its metadata. This method requires the user to sign before gaining access.
Kind: instance method of KeyValueStore
Returns: String
| Object
- the value associated with the key, undefined if there's no such key
Param | Type | Description |
opts |
| optional parameters |
opts.metadata |
| return both value and metadata |
Get metadata for for a given key
Kind: instance method of KeyValueStore
Returns: Metadata
- Metadata for the key, undefined if there's no such key
Param | Type | Description |
key |
| the key |
| | |
Get metadata for for a given key
Kind: instance method of KeyValueStore
Returns: Metadata
- Metadata for the key, undefined if there's no such key
Param | Type | Description |
key |
| the key |
| | |
Returns array of underlying log entries. In linearized order according to their Lamport clocks. Useful for generating a complete history of all operations on store.
Kind: instance property of KeyValueStore
Returns: Array.<Object>
- Array of ordered log entry objects
const log = store.logconst entry = log[0]console.log(entry)// { op: 'PUT', key: 'Name', value: 'Botbot', timeStamp: '1538575416068' }
Returns array of underlying log entries. In linearized order according to their Lamport clocks. Useful for generating a complete history of all operations on store.
Kind: instance property of KeyValueStore
Returns: Array.<Object>
- Array of ordered log entry objects
const log = store.logconst entry = log[0]console.log(entry)// { op: 'PUT', key: 'Name', value: 'Botbot', timeStamp: '1538575416068' }