quantum-resistant-rustykey 0.4.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,47 +1,41 @@
1
1
  {
2
2
  "name": "quantum-resistant-rustykey",
3
- "version": "0.4.1",
4
- "description": "ML-KEM (QRS) compiled to WebAssembly",
3
+ "version": "0.6.0",
4
+ "description": "WebAssembly ML-KEM (post-quantum) key encapsulation for Node.js and web.",
5
5
  "license": "ISC",
6
- "keywords": [
7
- "post-quantum",
8
- "post-quantum-cryptography",
9
- "crystals-kyber",
10
- "nist"
11
- ],
12
- "author": {
13
- "name": "Antony R. Mott"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "git+https://github.com/antonymott/quantum-resistant-rustykey.git"
18
- },
19
6
  "type": "module",
7
+ "sideEffects": false,
8
+ "main": "./dist/index.js",
9
+ "module": "./dist/index.js",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
20
17
  "files": [
21
- "install"
18
+ "dist"
22
19
  ],
23
- "main": "./install/index.js",
24
- "types": "./install/index.d.ts",
25
- "engines": {
26
- "node": ">=23"
20
+ "scripts": {
21
+ "clean": "rm -rf dist",
22
+ "lint": "biome check . && tsc --project tsconfig.lint.json",
23
+ "lint:fix": "biome check --write .",
24
+ "build:wasm": "node scripts/build-wasm.mjs",
25
+ "bundle:mlkem": "node scripts/bundle-mlkem.mjs",
26
+ "build:vendor": "pnpm build:wasm && pnpm bundle:mlkem",
27
+ "build": "tsdown && node scripts/copy-assets.mjs",
28
+ "test": "vitest run",
29
+ "release": "changeset publish",
30
+ "example:browser": "pnpm --filter browser-demo dev"
27
31
  },
28
32
  "devDependencies": {
29
- "@changesets/cli": "^2.29.3",
30
- "@vitest/coverage-v8": "^3.1.3",
31
- "tsup": "^8.4.0",
32
- "typescript": "^5.8.3",
33
- "vitest": "^3.1.3"
34
- },
35
- "dependencies": {
36
- "next": "15.3.3",
37
- "react": "19.1.0",
38
- "react-dom": "19.1.0"
39
- },
40
- "scripts": {
41
- "pre": "emcmake cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install && cmake --build build --target install",
42
- "build": "tsup",
43
- "test": "vitest --coverage",
44
- "lint": "tsc",
45
- "release": "changeset publish"
33
+ "@biomejs/biome": "2.4.10",
34
+ "@changesets/cli": "2.30.0",
35
+ "@types/node": "25.5.0",
36
+ "esbuild": "0.27.4",
37
+ "tsdown": "0.21.7",
38
+ "typescript": "5.9.2",
39
+ "vitest": "4.1.2"
46
40
  }
47
- }
41
+ }
@@ -1,21 +0,0 @@
1
- interface KeyPair {
2
- get(key: 'public_key' | 'private_key'): any;
3
- }
4
- interface EncryptResult {
5
- get(key: 'cyphertext' | 'secret'): any;
6
- }
7
- interface IMlKem {
8
- keypair(): KeyPair;
9
- encrypt(public_key: any): EncryptResult;
10
- decrypt(cyphertext: any, private_key: any): any;
11
- buffer_to_string(buffer: any): string;
12
- encryptMessage(message: string, secret: any): Promise<Uint8Array>;
13
- decryptMessage(encryptedMessage: Uint8Array, secret: any): Promise<string>;
14
- delete(): void;
15
- }
16
-
17
- declare function loadMlKem1024(): Promise<IMlKem>;
18
- declare function loadMlKem768(): Promise<IMlKem>;
19
- declare function loadMlKem512(): Promise<IMlKem>;
20
-
21
- export { loadMlKem1024, loadMlKem512, loadMlKem768 };