New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

userspace

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

userspace

Interact with the user space

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

UserSpace

Warning: This project is under active development, APIs are subject to change.

This is a library which allows you to set, get, and remove 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. Data is backed up using an identity hub.

Take a look at the demo to get a feeling of how it works!

Usage

Simply install using npm

$ npm install userspace

and then import into your project

const UserSpace = require('userspace')

UserSpace.open(web3.eth.accounts[0]).then(userspace => {
  // Code goes here...
})

UserSpace

Kind: global class

new UserSpace(muDID)

Instantiates a user space

Returns: UserSpace - self

ParamTypeDescription
muDIDMuPortA MuPort DID instance

userSpace.get(key) ⇒ String

Get the value of the given key

Kind: instance method of UserSpace
Returns: String - the value associated with the key

ParamTypeDescription
keyStringthe key

userSpace.getAll() ⇒ Object

Get all of the items in the userspace

Kind: instance method of UserSpace
Returns: Object - an object containing all items

userSpace.set(key, value) ⇒ Boolean

Set a value for the given key

Kind: instance method of UserSpace
Returns: Boolean - true if successful

ParamTypeDescription
keyStringthe key
valueStringthe value

userSpace.remove(key) ⇒ Boolean

Remove the value for the given key

Kind: instance method of UserSpace
Returns: Boolean - true if successful

ParamTypeDescription
keyStringthe key

UserSpace.open(address) ⇒ UserSpace

Opens the user space associated with the given address

Kind: static method of UserSpace
Returns: UserSpace - the userspace instance for the given address

ParamTypeDescription
addressStringan ethereum address

FAQs

Package last updated on 12 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts