npm install datum-sdk --save
const Datum = require('datum-sdk');
var datum = new Datum();
datum.initialize({
privateKey : identityUser.privateKey // users private key
developerPublicKey : identityDeveloper.publicKey // developers public key
});
datum.set('test@example.com', 'EMAIL')
.then(hash => {
//returns the hash / unique id of data
console.log(hash);
})
datum.getWithKey('EMAIL')
.then(result => {
console.log(result);
})
datum.removeByKey('EMAIL');
.then(result => {
console.log(result);
})