@majikah/majik-message 0.2.16 → 0.2.18
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/dist/core/contacts/majik-contact-directory.d.ts +1 -1
- package/dist/core/contacts/majik-contact-directory.js +1 -1
- package/dist/core/database/system/identity.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/majik-message.d.ts +2 -1
- package/dist/majik-message.js +6 -1
- package/package.json +4 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessageEnvelope } from "../messages/message-envelope";
|
|
2
2
|
import { MAJIK_API_RESPONSE } from "../types";
|
|
3
|
-
import { MajikContact, MajikContactData, SerializedMajikContact } from "
|
|
3
|
+
import { MajikContact, MajikContactData, SerializedMajikContact } from "@majikah/majik-contact";
|
|
4
4
|
export interface MajikContactDirectoryData {
|
|
5
5
|
contacts: SerializedMajikContact[];
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { KEY_ALGO } from "../crypto/constants";
|
|
2
2
|
import { base64ToArrayBuffer } from "../utils/utilities";
|
|
3
|
-
import { MajikContact, } from "
|
|
3
|
+
import { MajikContact, } from "@majikah/majik-contact";
|
|
4
4
|
/* -------------------------------
|
|
5
5
|
* Errors
|
|
6
6
|
* ------------------------------- */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MajikUser } from "@thezelijah/majik-user";
|
|
2
|
-
import { SerializedMajikContact } from "
|
|
2
|
+
import { SerializedMajikContact } from "@majikah/majik-contact";
|
|
3
3
|
export interface MajikMessageIdentityJSON {
|
|
4
4
|
id: string;
|
|
5
5
|
user_id: string;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/majik-message.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MajikContact, type MajikContactMeta, type SerializedMajikContact } from "
|
|
1
|
+
import { MajikContact, type MajikContactMeta, type SerializedMajikContact } from "@majikah/majik-contact";
|
|
2
2
|
import { MessageEnvelope } from "./core/messages/message-envelope";
|
|
3
3
|
import { EnvelopeCache, type EnvelopeCacheItem, type EnvelopeCacheJSON } from "./core/messages/envelope-cache";
|
|
4
4
|
import { MajikKeyStore } from "./core/crypto/keystore";
|
|
@@ -103,6 +103,7 @@ export declare class MajikMessage {
|
|
|
103
103
|
hasOwnIdentity(fingerprint: string): Promise<boolean>;
|
|
104
104
|
updatePassphrase(currentPassphrase: string, newPassphrase: string, id?: string): Promise<void>;
|
|
105
105
|
getContactByID(id: string): MajikContact | null;
|
|
106
|
+
hasContact(id: string): boolean;
|
|
106
107
|
getContactByPublicKey(publicKeyBase64: string): Promise<MajikContact | null>;
|
|
107
108
|
exportContactAsJSON(contactId: string): Promise<string | null>;
|
|
108
109
|
exportContactAsString(contactId: string): Promise<string | null>;
|
package/dist/majik-message.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// MajikMessage.ts
|
|
2
|
-
import { MajikContact, } from "
|
|
2
|
+
import { MajikContact, } from "@majikah/majik-contact";
|
|
3
3
|
import { KEY_ALGO } from "./core/crypto/constants";
|
|
4
4
|
import { ScannerEngine } from "./core/scanner/scanner-engine";
|
|
5
5
|
import { MessageEnvelope } from "./core/messages/message-envelope";
|
|
@@ -304,6 +304,11 @@ export class MajikMessage {
|
|
|
304
304
|
throw new Error("Invalid contact ID");
|
|
305
305
|
return this.contactDirectory.getContact(id) ?? null;
|
|
306
306
|
}
|
|
307
|
+
hasContact(id) {
|
|
308
|
+
if (!id?.trim())
|
|
309
|
+
throw new Error("Invalid contact ID");
|
|
310
|
+
return this.contactDirectory.hasContact(id);
|
|
311
|
+
}
|
|
307
312
|
async getContactByPublicKey(publicKeyBase64) {
|
|
308
313
|
if (!publicKeyBase64?.trim())
|
|
309
314
|
throw new Error("Invalid public key");
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@majikah/majik-message",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Post-quantum end-to-end encryption with ML-KEM-768. Seed phrase–based accounts. Auto-expiring messages. Offline-ready. Exportable encrypted messages. Tamper-proof threads with blockchain-like integrity. Quantum-resistant messaging.",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.18",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "Zelijah",
|
|
8
8
|
"main": "./dist/index.js",
|
|
@@ -80,10 +80,11 @@
|
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@bokuweb/zstd-wasm": "^0.0.27",
|
|
83
|
+
"@majikah/majik-contact": "^0.0.1",
|
|
83
84
|
"@majikah/majik-envelope": "^0.0.1",
|
|
84
|
-
"@majikah/majik-file": "^0.0.
|
|
85
|
+
"@majikah/majik-file": "^0.0.22",
|
|
85
86
|
"@majikah/majik-key": "^0.2.3",
|
|
86
|
-
"@majikah/majik-signature": "^0.0.
|
|
87
|
+
"@majikah/majik-signature": "^0.0.15",
|
|
87
88
|
"@noble/hashes": "^2.0.1",
|
|
88
89
|
"@noble/post-quantum": "^0.5.4",
|
|
89
90
|
"@scure/bip39": "^1.6.0",
|