Skip to content
This repository has been archived by the owner. It is now read-only.

Latest commit

 

History

History
34 lines (24 loc) · 784 Bytes

README.md

File metadata and controls

34 lines (24 loc) · 784 Bytes

tide-js

A Javascript library to create and assemble accounts in the Tide ecosystem.

npm install tide-js

Initialization

import Tide from 'tide-js';
const tide = new Tide(['ork-endpoint-1','ork-endpoint-2'], 256); // Ork nodes, encryption strength

Creating an account

const result = await tide.postCredentials('username', 'password');

Assembling an account

const account = await tide.getCredentials('username', 'password'));

Encryption & decryption

const secretMsg = 'So long, and thanks for all the fish.';
const encrypted = await tide.processEncryption(true, secretMsg, keys.pub); // Encrypt, data, key

const decrypted = await tide.processEncryption(false, encrypted, keys.priv);