JSPM

  • Created
  • Published
  • Downloads 71
  • Score
    100M100P100Q54420F
  • License proprietary

JavaScript client interface for E3DB JS SDKs

Package Exports

  • e3db-client-interface

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (e3db-client-interface) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

E3DB JavaScript SDK Client Interface

The Tozny End-to-End Encrypted Database (E3DB) is a storage platform with powerful sharing and consent management features.

Read more on our blog.

This repository contains interfaces and code providing the core of the Tozny platform JS SDKs. It defines types, API behaviors, and more to keep interactions consistent across the various code bases, yet allowing each SDK to define the cryptography layer and any context specific helpers for use in the target environment.

Use

Import this package

npm install --save e3db-client-interface

Create a concrete crypto implementation.

// crypto.js
import { Crypto as BaseCrypto } from 'e3db-client-interface'

export default class Crypto extends BaseCrypto{
  // implement the crypto for each of the methods.
}

Create a concrete client implementation

// client.js
import Crypto from './crypto'
import { Client as ClientBase } from 'e3db-client-interface'

// instantiate a concrete crypto instance
const crypto = new Crypto()

export default class Client {
  // overload the getter for crypto to return the concrete instance
  static get crypto() {
    return crypto
  }
}

Finally to make the standard Tozny platform primitives available from the implementing package by exporting the constructors and helpers.

// index.js
export { default as Client } from './client'
export { Config, types } from 'e3db-client-interface'

// optionally export context specific helpers
export { default as helpers } from './helpers'

Terms of Service

Your use of E3DB must abide by our Terms of Service, as detailed in the linked document.