Giter Site home page Giter Site logo

sdk-js's Introduction

Tanker logo

License Build BrowserStack Status Coverage Last Commit

Encryption SDK for JavaScript

Overview · Packages · Usage example · Documentation · Release notes · Browser support · Contributing · License

Overview

Tanker is an open-source client SDK that can be embedded in any application.

It leverages powerful client-side encryption of any type of data, textual or binary, but without performance loss and assuring a seamless end-user experience. No cryptographic skills are required.

Packages

Package Version Description
@tanker/client-browser browser_npm-badge Client SDK for Web applications
@tanker/client-node nodejs_npm-badge Client SDK for Node.js client applications

To use Tanker in your mobile applications, use our open-source iOS and Android SDKs.

Usage example

The client SDK takes care of all the difficult cryptography in the background, leaving you with simple high-level APIs:

import { Tanker } from '@tanker/client-browser';

// Init the isolated Tanker environment within your application
const tanker = new Tanker({ trustchainId: '...' });

// Sign in with the user's cryptographic identity
await tanker.open(aliceUserId, aliceUserToken);

// Encrypt data and share it with separate recipients or groups
const encryptedMessage = await tanker.encrypt(
  'It is a secret to everybody',
  { shareWithUsers: [bobUserId] }
);

// Decrypt data (or throw if not a legitimate recipient)
const message = await tanker.decrypt(encryptedMessage);

The client SDK automatically handles complex key exchanges, cryptographic operations, and identity verification for you.

Documentation

For more details and advanced examples, please refer to:

Or fiddle with the quickstart examples to see the Tanker SDKs integrated in a collection of demo apps.

Release notes

Detailed changes for each release are documented in the release notes.

Browser support

The JavaScript client SDK supports and is heavily tested on:

  • Chrome, Firefox, Safari, Edge, and Internet Explorer 11
  • Node.js 8+

Contributing

We welcome feedback, bug reports, and bug fixes in the form of pull requests.

To build the JavaScript client SDK yourself, please follow the steps below.

Prerequisites

Install Yarn version 1.0 or greater.

Use this command to check the Yarn version installed on your system:

yarn -v

Install dependencies

Clone this repository:

git clone https://github.com/TankerHQ/sdk-js.git

Install dependencies:

cd sdk-js && yarn

Test and lint

Our codebase uses the following ES6 features: async / await, import / export, and classes with flow for type-checking and with eslint for linting.

To check that the code is correct and to launch the tests in Node.js, use:

yarn proof

Submit your pull request

Before submitting your pull request, please make sure that your changes pass the linters and that all the tests pass on your local machine.

For non-trivial changes, we highly recommend including extra tests.

When you're ready, submit your pull request, targeting the master branch of this repository.

Credits

At Tanker, we happily use BrowserStack to automate testing on many browsers.

BrowserStack logo

License

The Tanker JavaScript SDK is licensed under the Apache License, version 2.0.

sdk-js's People

Contributors

banetl avatar blastrock avatar captainachab avatar dmerejkowsky avatar jmounier avatar maximerety avatar quentinvernot avatar theodelrieu avatar tux3 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.