@majikah/majik-contact
v0.0.4
Published
A cryptographically secure contact and identity model for Majikah, enabling zero-trust communication using public keys, post-quantum cryptography (ML-KEM, ML-DSA), and privacy-preserving metadata. Supports serialization, identity binding, and hybrid key f
Maintainers
Readme
Majik Contact
A lightweight, cryptographically secure contact model for building zero-trust, end-to-end encrypted systems.
@majikah/majik-contact provides a structured way to represent identities using public keys, fingerprints, and post-quantum–ready cryptography (ML-KEM, ML-DSA). It is designed for use within the Majikah ecosystem and other decentralized messaging applications.
Features
Individual Contacts (MajikContact)
- Key-Based Identity: Uses public keys instead of usernames for identity verification.
- Post-Quantum Ready: Built-in support for ML-KEM and ML-DSA standards.
- Hybrid Key Support: Handles both WebCrypto CryptoKey objects and raw Uint8Array fallbacks.
- Status Tracking: Native support for blocking/unblocking and Majikah registration status.
Contact Groups (MajikContactGroup)
- Organization: Group identities by custom labels or system-reserved types (e.g., Favorites, Blocked).
- Set Operations: Advanced membership logic including group Merging (union) and Intersection.
- Rich Metadata: Supports descriptions and base64-normalized photo storage.
- Serialization: Full JSON support for persistence in local storage or databases.
Installation
# Using npm
npm install @majikah/majik-contact
Usage
Managing Individual Contacts
The MajikContact class encapsulates identity data and cryptographic public keys.
import { MajikContact } from '@majikah/majik-contact';
const contact = MajikContact.create(
"user-uuid",
publicKey, // CryptoKey or { raw: Uint8Array }
"ml-kem-public-key-string",
"fingerprint-string",
{ label: "Alice", notes: "Met at the conference" }
);
// Update details
contact.updateLabel("Alice (Lead Engineer)");
contact.block();
Managing Individual Contacts
The MajikContact class encapsulates identity data and cryptographic public keys.
import { MajikContact } from '@majikah/majik-contact';
const contact = MajikContact.create(
"user-uuid",
publicKey, // CryptoKey or { raw: Uint8Array }
"ml-kem-public-key-string",
"fingerprint-string",
{ label: "Alice", notes: "Met at the conference" }
);
// Update details
contact.updateLabel("Alice (Lead Engineer)");
contact.block();
Organizing Contacts into Groups
The MajikContactGroup class manages collections of contact IDs with built-in validation.
import { MajikContactGroup } from '@majikah/majik-contact';
// Create a custom group and add members
const team = MajikContactGroup.create('group-id', 'Engineering');
team.addMember(contact.id);
// Use System Groups
const blockedList = MajikContactGroup.createBlocked();
blockedList.addMember(contact.id);
Advanced Group Operations
Perform set operations to derive new groups without manual ID management.
import { MajikContactGroup } from '@majikah/majik-contact';
// Intersection: Find contacts present in BOTH groups
const priorityContacts = MajikContactGroup.intersect([team, favorites], {
name: "Priority Engineers"
});
// Union: Combine multiple groups into one
const allStaff = MajikContactGroup.merge([team, designGroup], {
name: "All Staff"
});
Related Projects
Majik Message
Secure messaging platform using Majik Keys and Majik Signatures for identity-bound communication.
Majik Signature
Hybrid post-quantum content signing — the signing engine used by signContent() and signFile().
Majik Key
Seed phrase account library — required peer dependency for signing and encryption.
Majik Envelope
Post-quantum group encryption — used to encrypt and share private personal info.
Contributing
If you want to contribute or help extend support, reach out via email. All contributions are welcome!
License
Apache-2.0 — free for personal and commercial use.
Author
Made with 💙 by @thezelijah
Developer: Josef Elijah Fabian
GitHub: https://github.com/jedlsf
Project Repository: https://github.com/Majikah/majik-contact
Contact
- Business Email: [email protected]
- Official Website: https://www.thezelijah.world
