kryptnostic.js is an SDK for secure search, sharing, and storage on the Kryptnostic platform. No private keys are sent to the server in plaintext, and all user data is encrypted with 256-bit AES. It uses state-of-the-art advancements in fully homomorphic encryption to provide searchable encryption over text data.
##Getting Started ###Installation To install the latest version:
npm install --save kryptnostic-js
###Loading To load the library:
var KJS = require('./node_modules/kryptnostic-js/dist/kryptnostic.umd.js');
###Configuration Currently, you must configure the library with valid URLs for 2 backend services. To run against our production services:
KJS.ConfigurationService.set({
servicesUrlV2 : 'https://kodex.im/services2/v2',
heraclesUrlV2 : 'https://kodex.im/heracles2/v2'
});
###Registration To register:
var registrationClient = new KJS.RegistrationClient();
registrationClient.register({ '[email protected]', 'krypto', 'mansbestfriend1^' })
.then(function() {
// confirm successful registration.
})
.catch(function() {
// registration failed :(
});
##API
interface KJS {
ConfigurationService ConfigurationService;
AuthenticationService AuthenticationService;
UserDirectoryApi UserDirectoryApi;
RegistrationClient RegistrationClient;
UserDirectoryApi UserDirectoryApi;
}
interface ConfigurationService {
void set(Config);
String get(ConfigKey);
}
enum ConfigKey = {'servicesUrlV2', 'heraclesUrlV2'}
dictionary Config {
String? ConfigKey;
...
}
interface RegistrationClient {
Promise<void> register: ( RegistrationRequest );
}
dictionary RegistrationRequest {
String email;
String name;
String password;
}
##Developing See docs/development.md