Quick start

Use the default export to create an SDK instance in your browser application:

import GeensSdk from '@geens_npo/browser-sdk';

const sdk = new GeensSdk(
  'your-client-id',
  window.location.origin,
  'https://geens.com'
);

sdk.encryptText(
  'Hello',
  'your-password',
  encrypted => {
    sdk.decryptText(
      encrypted,
      'your-password',
      decrypted => console.log(decrypted), // Hello
      error => console.error(error)
    );
  },
  error => console.error(error)
);

Replace your-client-id with your registered Geens OAuth client ID. The text example runs locally without logging in. File operations and access to account data require a Geens session and the relevant permissions.

The import assumes an application bundler such as Vite, webpack, or Angular's build tooling. TypeScript declarations are included; no separate @types package or application-side SDK build is needed.