From e935d00204a482d5e0421ea32d74f3b5c5283db1 Mon Sep 17 00:00:00 2001 From: Pascal Perrenoud Date: Wed, 5 Jun 2024 09:15:52 +0200 Subject: [PATCH] Fix exports Closes #18 --- index.ts | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/index.ts b/index.ts index 759b12f..2829490 100644 --- a/index.ts +++ b/index.ts @@ -1,4 +1,27 @@ -export * as signature from './src/signature' -export * as boxes from './src/boxes' -export * as JWT from './src/jwt' +import * as sig from './src/signature' +import * as bx from './src/boxes' +import * as jwt from './src/jwt' + +export const JWT = jwt.JWTcontext +export const boxes = { + secret: { + box: bx.SecretBox, + wrap: bx.SecretWrap + }, + private: { + box: bx.PrivateBox, + wrap: bx.SecretWrap + }, + pwd: { + box: bx.PwdBox, + wrap: bx.PwdWrap + }, +} +export const signature = { + sign: sig.sign, + verify: sig.verify, + gen_keypair: sig.gen_keypair, + from_password: sig.from_password, +} + export {pbkdf} from './src/pbkdf'