Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@evervault/sdk

Package Overview
Dependencies
Maintainers
7
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evervault/sdk - npm Package Compare versions

Comparing version 0.6.0 to 1.0.0

.github/pull_request_template.md

47

package.json
{
"name": "@evervault/sdk",
"version": "0.6.0",
"description": "evervault Browser SDK",
"version": "1.0.0",
"description": "Node.js SDK for working with evervault cages",
"main": "lib/index.js",
"scripts": {
"test": "mocha 'tests/**/*.test.js'",
"test:coverage": "nyc --reporter=text npm run test"
},
"repository": {
"type": "git",
"url": "git+https://github.com/evervault/evervault-sdk.git"
"url": "git+https://github.com/evervault/evervault-node-sdk.git"
},
"main": "index.js",
"keywords": [
"node",
"evervault",
"cages"
],
"author": "evervault (https://evervault.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/evervault/evervault-sdk/issues"
"url": "https://github.com/evervault/evervault-node-sdk/issues"
},
"scripts": {
"build": "npx webpack --mode=production",
"test": "node test/index.js"
"homepage": "https://github.com/evervault/evervault-node-sdk#readme",
"dependencies": {
"phin": "^3.5.0",
"uuid": "^8.1.0"
},
"license": "MIT",
"homepage": "https://evervault.com/",
"devDependencies": {
"@babel/core": "^7.6.2",
"babel-preset-es2015": "^6.24.1",
"babelify": "^10.0.0",
"chai": "^4.2.0",
"mocha": "^7.0.1",
"puppeteer": "^2.1.1",
"sinon": "^9.0.1",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.11"
},
"dependencies": {}
"mocha": "^8.0.1",
"nock": "^12.0.3",
"nyc": "^15.1.0",
"rewire": "^5.0.0",
"sinon": "^9.0.2",
"sinon-chai": "^3.5.0"
}
}

@@ -1,92 +0,1 @@

<img src="https://raw.githubusercontent.com/evervault/evervault-sdk/master/logo.png" height="35" />
## About
The evervault SDK allows developers to integrate with [evervault auth](https://evervault.com/auth) and encrypt/decrypt data within their web app. Built on the [Web Crypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API).
## API Reference
### checkAuth
```javascript
evervault.checkAuth(appId): void
```
Check a user's auth status in the system, and redirect them if they are unauthenticated.
| Param | Type | Description |
| --- | --- | --- |
| appId | `String` | The unique identifier for your app in the evervault system |
### encrypt
```javascript
evervault.encrypt(data[, encryptOptions]): Promise<String>
```
Encrypt data using a user's secret key. The encrypt function will handle any data excluding `undefined` and `Symbol`.
| Param | Type | Description |
| --- | --- | --- |
| data | `any` | the data to be encrypted |
| [encryptOptions](#encryptoptions) | `object` | control how your data is encrypted |
### encryptOptions
| Key | Value | Description |
| --- | --- | --- |
| preserveObjectShape | `boolean` | if true, javascript objects will only have their values encrypted, if false objects will be stringified |
| fieldsToEncrypt | `Array<String>` | a list of fields in an object to encrypt |
| privateKey | `String` | a base64 representation of a user's evervault secret key |
### decrypt
```javascript
evervault.decrypt(data[, privateKey]): Promise<String>
```
Decrypt evervault encrypted data. Decrypt will preserve the shape of any object it's given (e.g. Array or Object). Any stringified data that enters decrypt will be parsable when it has been decrypted.
| Param | Type | Description |
| --- | --- | --- |
| data | `any` | the data to be decrypted, be it an object, array or a string |
| privateKey | `String` | a base64 representation of a user's evervault secret key |
### set
```javascript
evervault.set(toSet): Promise<Object>
```
Save data on behalf of the user in evervault storage.
| Param | Type | Description |
| --- | --- | --- |
| toSave | `Object` | the data to be saved. Must be an object in `{ "key": "value" }` form |
### get
```javascript
evervault.get([toGet]): Promise<Object>
```
Retrieve data on behalf of the user in evervault storage.
| Param | Type | Description |
| --- | --- | --- |
| toGet | `String` | Optional. the data to be retrieved. Must resolve to a previously stored piece of data |
### logout
```javascript
logout(): void
```
Remove a user's credentials and redirect them to evervault auth.
### refreshAccessToken
```javascript
refreshAccessToken([accessToken, refreshToken]): Promise<Object>
```
Refresh a user's access token in the evervault system.
| Param | Type | Description |
| --- | --- | --- |
| accessToken | `String` | a user's evervault access token to authenticate them in your system |
| refreshToken | `String` | a user's evervault refresh token to keep them authenticated |
# evervault node sdk

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc