@majikah/majik-signature-client 0.6.6 → 0.6.7

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.
@@ -13,8 +13,6 @@ export declare const MAJIKAH_SQL_TABLES: {
13
13
  };
14
14
  export type MajikahSQLTable = (typeof MAJIKAH_SQL_TABLES)[keyof typeof MAJIKAH_SQL_TABLES];
15
15
  export declare function buildSchemaSQL(schemas: MajikahSQLSchema[]): MajikahSQLSchema;
16
- export declare const MAJIKAH_SQL_SCHEMA_MAJIK_CLIENT_STATE: MajikahSQLSchema;
17
- export declare const MAJIKAH_SQL_SCHEMA_MAJIK_KEYS: MajikahSQLSchema;
18
16
  export declare const MAJIKAH_SQL_SCHEMA_MAJIK_CONTACTS: MajikahSQLSchema;
19
17
  export declare const MAJIKAH_SQL_SCHEMA_MAJIK_CONTACT_GROUPS: MajikahSQLSchema;
20
18
  export declare const MAJIKAH_SQL_SCHEMA_MAJIK_SIGNATURE_STAMPS: MajikahSQLSchema;
@@ -1,11 +1,12 @@
1
+ import { MAJIKAH_SQL_SCHEMA_MAJIK_CLIENT_STATE, MAJIKAH_SQL_SCHEMA_MAJIK_KEYS, MAJIKAH_SQL_TABLE_MAJIK_KEY, MAJIKAH_SQL_TABLE_MAJIK_KEY_CLIENT_STATE, } from "@majikah/majik-key-client";
1
2
  /**
2
3
  * Centralized SQLite table registry.
3
4
  * - `as const` keeps literal types
4
5
  * - `MajikahSQLTable` becomes a strict union type
5
6
  */
6
7
  export const MAJIKAH_SQL_TABLES = {
7
- MAJIK_CLIENT_STATE: "majik_client_state",
8
- MAJIK_KEYS: "majik_keys",
8
+ MAJIK_CLIENT_STATE: MAJIKAH_SQL_TABLE_MAJIK_KEY_CLIENT_STATE,
9
+ MAJIK_KEYS: MAJIKAH_SQL_TABLE_MAJIK_KEY,
9
10
  MAJIK_CONTACTS: "majik_contacts",
10
11
  MAJIK_CONTACT_GROUPS: "majik_contact_groups",
11
12
  MAJIK_SIGNATURE_STAMPS: "majik_signature_stamps",
@@ -30,27 +31,6 @@ export function buildSchemaSQL(schemas) {
30
31
  })
31
32
  .join("\n\n");
32
33
  }
33
- export const MAJIKAH_SQL_SCHEMA_MAJIK_CLIENT_STATE = `
34
- CREATE TABLE IF NOT EXISTS ${MAJIKAH_SQL_TABLES.MAJIK_CLIENT_STATE} (
35
- key TEXT PRIMARY KEY,
36
- value TEXT NOT NULL,
37
- updated_at TEXT DEFAULT (datetime('now'))
38
- );
39
- `;
40
- export const MAJIKAH_SQL_SCHEMA_MAJIK_KEYS = `
41
- CREATE TABLE IF NOT EXISTS ${MAJIKAH_SQL_TABLES.MAJIK_KEYS} (
42
- id TEXT PRIMARY KEY,
43
- json TEXT NOT NULL,
44
- timestamp TEXT NOT NULL,
45
- public_key TEXT NOT NULL
46
- );
47
-
48
- CREATE INDEX IF NOT EXISTS idx_majik_keys_timestamp
49
- ON ${MAJIKAH_SQL_TABLES.MAJIK_KEYS}(timestamp);
50
-
51
- CREATE INDEX IF NOT EXISTS idx_majik_keys_public_key
52
- ON ${MAJIKAH_SQL_TABLES.MAJIK_KEYS}(public_key);
53
- `;
54
34
  export const MAJIKAH_SQL_SCHEMA_MAJIK_CONTACTS = `
55
35
  CREATE TABLE IF NOT EXISTS ${MAJIKAH_SQL_TABLES.MAJIK_CONTACTS} (
56
36
  id TEXT PRIMARY KEY,
@@ -27,8 +27,8 @@ import { ClientStateStorageAdapter, MajikSignatureStampStorageAdapter, UserAppPr
27
27
  import { AppDataSnapshot, ContactManagerSnapshot } from "./core/backup/types";
28
28
  import { MajikSignatureStampManager } from "./core/stamp/majik-signature-stamp-manager";
29
29
  import { MajikSignatureStamp, MajikSignatureStampJSON, StampAssetKind } from "./core/stamp/majik-signature-stamp";
30
- import { MajikKeyClient, MajikKeyClientConfig } from "@majikah/majik-key-client";
31
- type MajikSignatureClientEvents = "sign" | "verify" | "unlock" | "lock" | "error" | "new-stamp" | "removed-stamp" | "new-account" | "updated-account" | "new-contact" | "new-contact-group" | "removed-account" | "removed-contact" | "removed-contact-group" | "contact-group-change" | "active-account-change" | "restore-backup";
30
+ import { MajikKeyClient, MajikKeyClientBaseEvents, MajikKeyClientConfig } from "@majikah/majik-key-client";
31
+ type MajikSignatureClientEvents = MajikKeyClientBaseEvents | "sign" | "verify" | "new-stamp" | "removed-stamp" | "new-contact" | "new-contact-group" | "removed-contact" | "removed-contact-group" | "contact-group-change";
32
32
  export interface MajikSignatureClientConfig extends MajikKeyClientConfig {
33
33
  clientStateManager?: ClientStateManager;
34
34
  contactManager?: MajikContactManager;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@majikah/majik-signature-client",
3
3
  "type": "module",
4
4
  "description": "Majik Signature Client is a hybrid post-quantum content signing and verification library for the Majikah ecosystem. Built on top of Majik Key Client, 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.6.6",
5
+ "version": "0.6.7",
6
6
  "license": "Apache-2.0",
7
7
  "author": "Zelijah",
8
8
  "main": "./dist/index.js",
@@ -56,7 +56,7 @@
56
56
  "@majikah/majik-contact": "^0.0.6",
57
57
  "@majikah/majik-file": "^0.1.12",
58
58
  "@majikah/majik-key": "^0.3.3",
59
- "@majikah/majik-key-client": "^0.1.4",
59
+ "@majikah/majik-key-client": "^0.1.5",
60
60
  "@majikah/majik-signature": "^0.2.1",
61
61
  "@stablelib/ed25519": "^2.1.0",
62
62
  "ed2curve": "^0.3.0",