Installation

Adding the Etebase dependency

Run the following commands from your project's directory to install the Etebase dependency:

yarn add etebase

On Node

yarn add etebase node-fetch

On React Native

yarn add etebase react-native-etebase react-native-get-random-values react-native-sodium

You now need to import it at the top of your project (e.g. index.js) like so:

import 'react-native-etebase';

On the web (without a bundler)

yarn add etebase

The UMD bundle is then available at node_modules/etebase/dist/umd/Etebase.js. You can use it like this:

<script src="path/to/Etebase.js"></script>

Important information about the web

Etebase uses WebAssembly and web workers behind the scenes to significantly speed up all of the cryptographic operations. However, please keep in mind that some CSP rules can block WebAssembly. If you are experiencing slowness, this is the place to look. You probably want to start with something like script-src 'self' 'unsafe-eval' blob:; worker-src 'self' 'unsafe-eval' blob:;, which should cover all major browsers.

Using the package in your project

You can then use the package like you would any other:

import * as Etebase from 'etebase';
Etebase.Account.login(...);

Advanced

Building the package from source

Please check out the README of each library for language specific instructions.

Problems?

Ask for help on our chat or reddit.