@majikah/majik-message 0.1.7 → 0.1.9
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
|
@@ -30,7 +30,6 @@ Also available on [Microsoft Store](https://apps.microsoft.com/detail/9pmjgvzzjs
|
|
|
30
30
|
Also available on [Google Chrome Web Store](https://chromewebstore.google.com/detail/dhlafmkpgjagkhiokoighjaakajbckck) for free.
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
|
|
34
33
|
---
|
|
35
34
|
|
|
36
35
|
- [Majik Message](#majik-message)
|
|
@@ -42,6 +41,7 @@ Also available on [Google Chrome Web Store](https://chromewebstore.google.com/de
|
|
|
42
41
|
- [Offline Operation](#offline-operation)
|
|
43
42
|
- [Realtime Messaging (Free for Everyone)](#realtime-messaging-free-for-everyone)
|
|
44
43
|
- [Group Messaging](#group-messaging)
|
|
44
|
+
- [Persistent Message Threads](#persistent-message-threads)
|
|
45
45
|
- [Message Expiration Timer](#message-expiration-timer)
|
|
46
46
|
- [Encrypted Message Export](#encrypted-message-export)
|
|
47
47
|
- [Solo Messages for Personal Storage](#solo-messages-for-personal-storage)
|
|
@@ -53,6 +53,7 @@ Also available on [Google Chrome Web Store](https://chromewebstore.google.com/de
|
|
|
53
53
|
- [For Solo Messages (sender-only):](#for-solo-messages-sender-only)
|
|
54
54
|
- [For Group Messages (2+ recipients):](#for-group-messages-2-recipients)
|
|
55
55
|
- [Receiving and Decrypting a Message](#receiving-and-decrypting-a-message)
|
|
56
|
+
- [Thread Message Integrity](#thread-message-integrity)
|
|
56
57
|
- [Platform Availability](#platform-availability)
|
|
57
58
|
- [Desktop App](#desktop-app)
|
|
58
59
|
- [Web App](#web-app)
|
|
@@ -71,6 +72,11 @@ Also available on [Google Chrome Web Store](https://chromewebstore.google.com/de
|
|
|
71
72
|
- [Encrypting Messages](#encrypting-messages)
|
|
72
73
|
- [Decrypting Messages](#decrypting-messages)
|
|
73
74
|
- [Managing Accounts](#managing-accounts)
|
|
75
|
+
- [Threads (Persistent Messaging)](#threads-persistent-messaging)
|
|
76
|
+
- [Creating a Thread](#creating-a-thread)
|
|
77
|
+
- [Adding Messages to a Thread](#adding-messages-to-a-thread)
|
|
78
|
+
- [Managing Threads](#managing-threads)
|
|
79
|
+
- [Threads Validation:](#threads-validation)
|
|
74
80
|
- [Chrome Extension](#chrome-extension-1)
|
|
75
81
|
- [Encrypting Text on Any Webpage](#encrypting-text-on-any-webpage)
|
|
76
82
|
- [Decrypting Text on Any Webpage](#decrypting-text-on-any-webpage)
|
|
@@ -168,6 +174,17 @@ Secure group conversations with up to 25 participants:
|
|
|
168
174
|
- Same security guarantees as one-on-one messaging
|
|
169
175
|
- Typing indicators and read receipts work in group chats
|
|
170
176
|
|
|
177
|
+
### Persistent Message Threads
|
|
178
|
+
|
|
179
|
+
Cryptographic hash-chain history for important conversations:
|
|
180
|
+
|
|
181
|
+
- Immutable message records with cryptographic integrity
|
|
182
|
+
- Each message cryptographically linked to the previous (blockchain-style)
|
|
183
|
+
- Tamper-resistant conversation history
|
|
184
|
+
- Messages cannot be edited or deleted individually
|
|
185
|
+
- Thread validation tool to verify message integrity
|
|
186
|
+
- Perfect for contracts, formal communications, and audit trails
|
|
187
|
+
|
|
171
188
|
### Message Expiration Timer
|
|
172
189
|
|
|
173
190
|
Set custom expiration times for sensitive conversations. Messages automatically delete after the specified duration, reducing your digital footprint.
|
|
@@ -257,6 +274,17 @@ This ensures only authorized recipients can decrypt the message, and the ephemer
|
|
|
257
274
|
|
|
258
275
|
If decryption fails (due to tampering or incorrect keys), an authentication error is thrown and the message is rejected.
|
|
259
276
|
|
|
277
|
+
### Thread Message Integrity
|
|
278
|
+
|
|
279
|
+
Threads use blockchain-style message chaining:
|
|
280
|
+
|
|
281
|
+
1. Each message is encrypted using the same end-to-end encryption as regular messages
|
|
282
|
+
2. A cryptographic hash is computed from the message content
|
|
283
|
+
3. This hash is linked to the hash of the previous message in the thread
|
|
284
|
+
4. The chain of hashes creates an immutable, verifiable history
|
|
285
|
+
5. Any tampering breaks the hash chain and is immediately detectable
|
|
286
|
+
6. Downloaded thread logs can be independently verified at any time
|
|
287
|
+
|
|
260
288
|
---
|
|
261
289
|
|
|
262
290
|
## Platform Availability
|
|
@@ -380,6 +408,54 @@ Or share your own invite key:
|
|
|
380
408
|
- **Export backup**: Hover over account → Export
|
|
381
409
|
- **Import account**: Accounts tab → Import Account button
|
|
382
410
|
|
|
411
|
+
#### Threads (Persistent Messaging)
|
|
412
|
+
|
|
413
|
+
##### Creating a Thread
|
|
414
|
+
|
|
415
|
+
1. Navigate to the **Threads** tab in the top navigation
|
|
416
|
+
2. Click the **plus (+) icon** (New Thread button)
|
|
417
|
+
3. Select participants from your contact directory
|
|
418
|
+
- All participants must be registered online
|
|
419
|
+
- Participants cannot be changed after creation
|
|
420
|
+
4. Optionally set a thread topic/subject
|
|
421
|
+
5. Click **Create**
|
|
422
|
+
|
|
423
|
+
##### Adding Messages to a Thread
|
|
424
|
+
|
|
425
|
+
1. Open the thread from the Threads tab
|
|
426
|
+
2. Click the **plus (+) icon** in the Thread Viewer
|
|
427
|
+
3. Enter an optional subject and your message content
|
|
428
|
+
4. Click **Send** to add to the thread
|
|
429
|
+
- Messages are encrypted and permanently stored
|
|
430
|
+
- Messages cannot be edited or deleted after sending
|
|
431
|
+
|
|
432
|
+
##### Managing Threads
|
|
433
|
+
|
|
434
|
+
**Rename Thread Topic:**
|
|
435
|
+
- Any participant can rename the thread at any time
|
|
436
|
+
- Click the **pencil/edit icon** in Thread Viewer
|
|
437
|
+
- Enter new topic and click **Apply Changes**
|
|
438
|
+
|
|
439
|
+
**Close Thread (Owner Only):**
|
|
440
|
+
- Click the **check icon** in Thread Viewer
|
|
441
|
+
- Choose whether to auto-delete after closing
|
|
442
|
+
- Closed threads cannot accept new messages
|
|
443
|
+
|
|
444
|
+
**Request Deletion:**
|
|
445
|
+
- Any participant can request thread deletion
|
|
446
|
+
- Requires approval from all participants
|
|
447
|
+
- Owner can delete immediately by closing with auto-delete enabled
|
|
448
|
+
- All participants receive encrypted backup before deletion
|
|
449
|
+
|
|
450
|
+
**Verify Thread Integrity:**
|
|
451
|
+
- Visit [https://message.majikah.solutions/threads/validate](https://message.majikah.solutions/threads/validate)
|
|
452
|
+
- Import downloaded thread log JSON file
|
|
453
|
+
- System validates blockchain hash chain
|
|
454
|
+
- Tampered messages are detected and flagged
|
|
455
|
+
|
|
456
|
+
##### Threads Validation:
|
|
457
|
+
[https://message.majikah.solutions/threads/validate](https://message.majikah.solutions/threads/validate)
|
|
458
|
+
|
|
383
459
|
### Chrome Extension
|
|
384
460
|
|
|
385
461
|
#### Encrypting Text on Any Webpage
|
|
@@ -414,6 +490,7 @@ Enable automatic detection and decryption:
|
|
|
414
490
|
|
|
415
491
|
Once enabled, any page you load will be automatically scanned for encrypted content.
|
|
416
492
|
|
|
493
|
+
|
|
417
494
|
---
|
|
418
495
|
|
|
419
496
|
## Technical Specifications
|
|
@@ -452,6 +529,7 @@ All cryptographic operations use the **@stablelib** library suite for consistent
|
|
|
452
529
|
| Feature | Status |
|
|
453
530
|
| ------------------ | ------------------------- |
|
|
454
531
|
| Text Messages | ✓ Supported |
|
|
532
|
+
| Persistent Threads | ✓ Blockchain-style-hashing |
|
|
455
533
|
| Group Chats | ✓ Up to 25 participants |
|
|
456
534
|
| Typing Indicators | ✓ Supported |
|
|
457
535
|
| Read Receipts | ✓ Supported |
|
|
@@ -468,6 +546,8 @@ All cryptographic operations use the **@stablelib** library suite for consistent
|
|
|
468
546
|
- **Identity privacy**: No phone numbers or email addresses required
|
|
469
547
|
- **Private keys**: Never transmitted; encrypted at rest with PBKDF2-derived passphrase
|
|
470
548
|
- **Forward secrecy**: Ephemeral keys ensure past messages remain secure even if current keys are compromised
|
|
549
|
+
- **Message integrity**: Thread messages use blockchain-style chaining to detect tampering
|
|
550
|
+
- **Audit trails**: Downloadable, verifiable thread histories for compliance and records
|
|
471
551
|
|
|
472
552
|
### What Users Must Protect
|
|
473
553
|
|
|
@@ -89,7 +89,7 @@ export declare class MajikMessageThread {
|
|
|
89
89
|
private constructor();
|
|
90
90
|
get id(): MajikMessageThreadID;
|
|
91
91
|
get userID(): MajikUserID;
|
|
92
|
-
get owner():
|
|
92
|
+
get owner(): MajikMessageAccountID;
|
|
93
93
|
get metadata(): Readonly<ThreadMetadata>;
|
|
94
94
|
get timestamp(): Date;
|
|
95
95
|
get participants(): readonly MajikMessagePublicKey[];
|
|
@@ -144,9 +144,11 @@ export declare class MajikMessageThread {
|
|
|
144
144
|
updateMetadata(metadata: Partial<ThreadMetadata>): this;
|
|
145
145
|
toJSON(): MajikMessageThreadJSON;
|
|
146
146
|
static fromJSON(json: MajikMessageThreadJSON | string): MajikMessageThread;
|
|
147
|
-
isOwner(
|
|
147
|
+
isOwner(accountID: MajikMessageAccountID): boolean;
|
|
148
148
|
isParticipant(publicKey: MajikMessagePublicKey): boolean;
|
|
149
149
|
toString(): string;
|
|
150
|
+
isClosed(): boolean;
|
|
151
|
+
canBeClosed(): boolean;
|
|
150
152
|
/**
|
|
151
153
|
* Deduplicates and sorts participants to ensure consistent ordering
|
|
152
154
|
*/
|
|
@@ -506,8 +506,8 @@ export class MajikMessageThread {
|
|
|
506
506
|
}
|
|
507
507
|
}
|
|
508
508
|
// ==================== Utility Methods ====================
|
|
509
|
-
isOwner(
|
|
510
|
-
return this._owner ===
|
|
509
|
+
isOwner(accountID) {
|
|
510
|
+
return this._owner === accountID;
|
|
511
511
|
}
|
|
512
512
|
isParticipant(publicKey) {
|
|
513
513
|
return this._participants.includes(publicKey);
|
|
@@ -515,6 +515,12 @@ export class MajikMessageThread {
|
|
|
515
515
|
toString() {
|
|
516
516
|
return JSON.stringify(this.toJSON(), null, 2);
|
|
517
517
|
}
|
|
518
|
+
isClosed() {
|
|
519
|
+
return this._status === ThreadStatus.CLOSED;
|
|
520
|
+
}
|
|
521
|
+
canBeClosed() {
|
|
522
|
+
return this._status === ThreadStatus.ONGOING;
|
|
523
|
+
}
|
|
518
524
|
/**
|
|
519
525
|
* Deduplicates and sorts participants to ensure consistent ordering
|
|
520
526
|
*/
|
|
@@ -542,10 +548,6 @@ export class MajikMessageThread {
|
|
|
542
548
|
!Number.isInteger(messageCount)) {
|
|
543
549
|
throw new ValidationError("messageCount must be a non-negative integer");
|
|
544
550
|
}
|
|
545
|
-
// Cannot finalize a thread marked for deletion
|
|
546
|
-
if (this._status === ThreadStatus.MARKED_FOR_DELETION) {
|
|
547
|
-
throw new OperationNotAllowedError("Cannot export final stats for a thread marked for deletion");
|
|
548
|
-
}
|
|
549
551
|
// Merge tags
|
|
550
552
|
const existingTags = this._metadata.tags || [];
|
|
551
553
|
const mergedTags = additionalTags
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@majikah/majik-message",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "Encrypt and decrypt messages on any website or platform. Secure chats with keypairs and seed-based accounts. Open source.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.9",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "Zelijah",
|
|
8
8
|
"main": "./dist/index.js",
|