@majikah/majik-signature 0.8.3 → 0.9.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.
@@ -25,7 +25,7 @@
25
25
  * Embedding is idempotent. Before writing a new trailer, any existing
26
26
  * universal trailer is removed so signatures do not accumulate back-to-back.
27
27
  */
28
- import { FormatHandler } from "../types";
28
+ import { FormatHandler } from "../types.js";
29
29
  /**
30
30
  * Last-resort {@link FormatHandler} that embeds signatures using the universal
31
31
  * binary trailer format.
@@ -25,7 +25,7 @@
25
25
  * Embedding is idempotent. Before writing a new trailer, any existing
26
26
  * universal trailer is removed so signatures do not accumulate back-to-back.
27
27
  */
28
- import { appendTrailer, extractTrailer } from "./utils";
28
+ import { appendTrailer, extractTrailer } from "./utils.js";
29
29
  /**
30
30
  * Last-resort {@link FormatHandler} that embeds signatures using the universal
31
31
  * binary trailer format.
@@ -44,7 +44,7 @@ export class Mp4Handler {
44
44
  const { boxes, trailing: topTrailing } = this._parseBoxes(clean, 0, clean.length);
45
45
  const moovIdx = boxes.findIndex((b) => b.type === "moov");
46
46
  if (moovIdx < 0) {
47
- const { appendTrailer } = await import("../utils");
47
+ const { appendTrailer } = await import("../utils.js");
48
48
  return appendTrailer(clean, signatureJson);
49
49
  }
50
50
  const moovBox = boxes[moovIdx];
@@ -84,7 +84,7 @@ export class Mp4Handler {
84
84
  const moov = boxes.find((b) => b.type === "moov");
85
85
  // Fallback: If no moov box exists, check for a Tier-2 trailer
86
86
  if (!moov) {
87
- const { extractTrailer } = await import("../utils");
87
+ const { extractTrailer } = await import("../utils.js");
88
88
  const trailer = extractTrailer(bytes);
89
89
  return trailer ? trailer.signatureJson : null;
90
90
  }
@@ -110,7 +110,7 @@ export class Mp4Handler {
110
110
  const moovIdx = boxes.findIndex((b) => b.type === "moov");
111
111
  // Fallback: If no moov box exists, strip the Tier-2 trailer if present
112
112
  if (moovIdx < 0) {
113
- const { extractTrailer } = await import("../utils");
113
+ const { extractTrailer } = await import("../utils.js");
114
114
  const trailer = extractTrailer(bytes);
115
115
  return trailer ? trailer.original : bytes;
116
116
  }
@@ -673,7 +673,7 @@ export declare class MajikSignatureEmbed {
673
673
  * open-signing envelopes it falls back to the first signer. Unsigned files
674
674
  * return `null`.
675
675
  */
676
- static getIssuer(file: FileLike, options?: ExtractOptions): Promise<import("../../core/types").SignatoryInfo | null>;
676
+ static getIssuer(file: FileLike, options?: ExtractOptions): Promise<import("../../core/types.js").SignatoryInfo | null>;
677
677
  /**
678
678
  * Return a one-call snapshot of the embedded envelope state.
679
679
  *
@@ -895,7 +895,7 @@ export type BatchSignResult = {
895
895
  /** Indicates manifest output mode. */
896
896
  mode: "map";
897
897
  /** Immutable batch-manifest instance covering the signed files. */
898
- map: import("./mjksmap").MajikSignatureMap;
898
+ map: import("./mjksmap.js").MajikSignatureMap;
899
899
  /** Ready-to-store `.mjksmap` Blob. */
900
900
  mapBlob: Blob;
901
901
  /** Files that failed when `continueOnError` allowed processing to continue. */
package/package.json CHANGED
@@ -2,12 +2,19 @@
2
2
  "name": "@majikah/majik-signature",
3
3
  "type": "module",
4
4
  "description": "Majik Signature is a hybrid post-quantum content signing and verification library for the Majikah ecosystem. Built on top of Majik Key, it provides tamper-proof, forgery-resistant digital signatures for any content format — using a dual-algorithm architecture that combines classical Ed25519 with post-quantum ML-DSA-87 (FIPS-204).",
5
- "version": "0.8.3",
5
+ "version": "0.9.0",
6
6
  "license": "Apache-2.0",
7
7
  "author": "Zelijah",
8
8
  "main": "./dist/index.js",
9
9
  "module": "./dist/index.js",
10
10
  "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "import": "./dist/index.js",
15
+ "default": "./dist/index.js"
16
+ }
17
+ },
11
18
  "bin": {
12
19
  "mjksig": "./dist/cli.js"
13
20
  },
@@ -61,7 +68,7 @@
61
68
  "test:cli": "vitest run test/mjksig-cli.test.ts"
62
69
  },
63
70
  "dependencies": {
64
- "@majikah/majik-key": "^0.7.0",
71
+ "@majikah/majik-key": "^1.0.0",
65
72
  "@noble/hashes": "^2.4.0",
66
73
  "@noble/post-quantum": "^0.7.1",
67
74
  "@stablelib/ed25519": "^2.1.0",