How to use the @tanker/client-node.Tanker.version function in @tanker/client-node

To help you get started, we’ve selected a few @tanker/client-node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TankerHQ / quickstart-examples / client / nodejs / hello-world / main.js View on Github external
async function main () {
  console.log(`Application: using Tanker version: ${Tanker.version}`);
  // Randomize emails so that each test runs with new users
  const aliceEmail = `alice-${uuid()}@example.com`;
  const bobEmail = `bob-${uuid()}@example.com`;

  // Init tanker
  console.log('Application: init Tanker object');
  const tankerConfig = await getTankerConfig();
  const tanker = new Tanker(tankerConfig);

  // Open Bob's session to make sure his account exists
  const bob = await signUp(bobEmail);
  console.log('Application: starting Tanker session for Bob');
  await tanker.start(bob.identity);
  await tanker.registerIdentity({ passphrase: 'Bob\'s secret passphrase'});
  await tanker.stop();
  console.log('Application: stopping Tanker session for Bob');

@tanker/client-node

Tanker end-to-end encryption SDK for Node.js client applications

Apache-2.0
Latest version published 5 months ago

Package Health Score

65 / 100
Full package analysis