qscl-nimo-sdk 0.2.0 → 0.2.1

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/README.md CHANGED
@@ -1,68 +1,35 @@
1
1
  # QSCL SDK Developer Usage
2
2
 
3
- The `qscl-sdk` natively transpiles from modern TypeScript into CommonJS strictly mapping to enterprise environments (Node.js/Next.js/etc). Below are the usage patterns for building a Quantum-Safe proxy application using this SDK.
3
+ The `qscl-nimo-sdk` natively transpiles from modern TypeScript into CommonJS strictly mapping to enterprise environments (Node.js/Next.js/etc). Below are the usage patterns for building a Quantum-Safe proxy application natively routing Post-Quantum Cryptography logic.
4
4
 
5
- ## Javascript (CommonJS) Flow
5
+ ## Clean Developer Usage
6
6
 
7
- ```js
8
- const { QSCLClient } = require("qscl-sdk");
9
-
10
- async function run() {
11
- // 1. Initialize Client
12
- const client = new QSCLClient({
13
- baseURL: "http://localhost:8080",
14
- apiKey: "your_admin_provisioned_api_key"
15
- });
16
-
17
- // 2. Perform PQC Key Exchange & Session Pinning
18
- await client.connect();
19
-
20
- // 3. Fire Encrypted Traffic safely across proxy channels
21
- const response = await client.secureFetch("/get", {
22
- method: "POST",
23
- body: JSON.stringify({ "secret": "quantum_payload" })
24
- });
25
-
26
- // This decrypts the AES-GCM output entirely autonomously!
27
- const data = await response.json();
28
- console.log(data);
29
- }
30
-
31
- run();
32
- ```
33
-
34
- ## TypeScript Enterprise Flow
7
+ Replace ALL examples with:
35
8
 
36
9
  ```typescript
37
- import { QSCLClient, MockKyberKEM, MockDilithiumProvider } from "qscl-sdk";
10
+ import { QSCLClient } from "qscl-nimo-sdk";
11
+
12
+ const client = new QSCLClient({
13
+ baseURL: "http://localhost:8080",
14
+ apiKey: "YOUR_API_KEY"
15
+ });
38
16
 
39
- export async function bootstrapSecureNode() {
40
- const client = new QSCLClient({
41
- baseURL: "https://pqc.my-enterprise-gateway.com",
42
- apiKey: process.env.QSCL_TENANT_KEY!
43
- // Advanced: Inject future Native C bindings via custom interfaces once WASM resolves
44
- // customKEM: new WasmKyberKEM(),
45
- // customSign: new WasmDilithiumSigner()
46
- });
17
+ await client.connect();
47
18
 
48
- console.log("Negotiating Kyber KEM...");
49
- await client.connect();
50
-
51
- console.log("Sending Dilithium Verified Traffic...");
52
- const fetchResponse = await client.secureFetch("/protected/resource", {
53
- headers: { "Content-Type": "application/json" },
54
- body: JSON.stringify({ vault_id: 1234 })
55
- });
19
+ const res = await client.secureFetch("/api/payment", {
20
+ method: "POST",
21
+ headers: { "Content-Type": "application/json" },
22
+ body: JSON.stringify({ amount: 100 })
23
+ });
56
24
 
57
- const body = await fetchResponse.text();
58
- console.log(`Unsealed payload: ${body}`);
59
- }
25
+ const data = await res.text();
26
+ console.log(data);
60
27
  ```
61
28
 
62
29
  ### SDK Transpiled Outputs:
63
30
  Inside `/sdk/js/dist` you will see the NPM packaged bindings:
64
31
  - `index.js`, `index.d.ts`
65
32
  - `client.js`
66
- - `crypto/kem.js`
33
+ - `crypto/wasm/oqs.wasm`
67
34
  - `transport.js`
68
35
  - `session.js`
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export * from "./client";
2
2
  export * from "./crypto/aes";
3
- export * from "./crypto/kem";
4
- export * from "./crypto/sign";
3
+ export { IKEMProvider } from "./crypto/kem";
4
+ export { ISignatureProvider } from "./crypto/sign";
5
5
  export * from "./handshake";
6
6
  export * from "./transport";
7
7
  export * from "./session";
package/dist/index.js CHANGED
@@ -17,8 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  // Central unified entry point cleanly resolving SDK paths for node resolution
18
18
  __exportStar(require("./client"), exports);
19
19
  __exportStar(require("./crypto/aes"), exports);
20
- __exportStar(require("./crypto/kem"), exports);
21
- __exportStar(require("./crypto/sign"), exports);
22
20
  // Handshake definitions are accessible for advanced users defining specific intercept hooks
23
21
  __exportStar(require("./handshake"), exports);
24
22
  __exportStar(require("./transport"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qscl-nimo-sdk",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Quantum-Safe Communication Layer (QSCL) Developer SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",