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

Node.js SDK for Evervault

  • 1.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.9K
decreased by-10.88%
Maintainers
7
Weekly downloads
 
Created
Source

Evervault

Evervault Node.js SDK

The Evervault Node.js SDK is a toolkit for encrypting data as it enters your server, and working with Cages.

Getting Started

Before starting with the Evervault Node.js SDK, you will need to create an account and a team.

For full installation support, book time here.

Documentation

See the Evervault Node.js SDK documentation.

Installation

Our Node.js SDK is distributed via npm, and can be installed using your preferred package manager.

npm install --save @evervault/sdk

yarn add @evervault/sdk

Setup

To make Evervault available for use in your app:

const Evervault = require('@evervault/sdk');

// Initialize the client with your team's api key
const evervaultClient = new Evervault('<API-KEY>');

// Encrypt your sensitive data
const encrypted = await evervaultClient.encrypt({ ssn: '012-34-5678' });

// Process the encrypted data in a Cage
const result = await evervaultClient.run('<CAGE_NAME>', encrypted);

Reference

The Evervault Node.js SDK exposes three functions.

evervault.encrypt()

evervault.encrypt()encrypts data for use in your Cages. To encrypt data at the server, simply pass an object or string into the evervault.encrypt() function. Store the encrypted data in your database as normal.

async evervault.encrypt(data: Object | String);
ParameterTypeDescription
dataObject or StringData to be encrypted.

evervault.run()

evervault.run() invokes a Cage with a given payload.

async evervault.run(cageName: String, payload: Object[, options: Object]);
ParameterTypeDescription
cageNameStringName of the Cage to be run
dataObjectPayload for the Cage
optionsObjectOptions for the Cage run
Cage Run Options

Options to control how your Cage is run

OptionTypeDefaultDescription
asyncBooleanfalseRun your Cage in async mode. Async Cage runs will be queued for processing.
versionNumberundefinedSpecify the version of your Cage to run. By default, the latest version will be run.

evervault.cagify()

evervault.cagify() lets you deploy and run ordinary Node.js functions as Cages, inline.

This function will automatically deploy a function as a Cage and return a native async Node.js function that accepts the original parameters, but which invokes a Cage when run.

Note: evervault.cagify() is a synchronous function and will block your event loop if no cage-lock.json file is present for the Caged functions.

evervault.cagify(cageName: String, cageFunction: Function);
ParameterTypeDescription
cageNameStringName of the Cage to be run
cageFunctionFunctionThe function to deploy as a Cage

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/evervault/evervault-node.

Feedback

Questions or feedback? Let us know.

Keywords

FAQs

Package last updated on 15 Jun 2021

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

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