Installation
Adding the Etebase dependency
Run the following commands from your project's directory to install the Etebase dependency:
- JavaScript
- Python
- Java
- Kotlin
- C/C++
- Rust
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.
pip install etebase
To install Etebase on Android:
dependencies {
// ... rest of the deps
def etebaseVersion = '...' // IMPORTANT: replace with the latest etebase version from the badge above
implementation "com.etebase:client:$etebaseVersion"
}
To install Etebase on Android:
dependencies {
// ... rest of the deps
def etebaseVersion = '...' // IMPORTANT: replace with the latest etebase version from the badge above
implementation "com.etebase:client:$etebaseVersion"
}
To use the C library please get it from your distributions package manager (where available) or build the library from source.
Using the package in your project
You can then use the package like you would any other:
- JavaScript
- Python
- Java
- Kotlin
- C/C++
- Rust
import * as Etebase from 'etebase';
Etebase.Account.login(...);
from etebase import Account
Account.login(...)
import com.etebase.client.Account;
Account etebase = Account.login(...)
import com.etebase.client.Account
val etebase = Account.login(...)
#include <etebase.h>
EtebaseAccount *account = etebase_account_login(...);
use etebase::Account;
let account = Account::login(...)?;
Advanced
Building the package from source
Please check out the README of each library for language specific instructions.