@majikah/majik-key 0.2.9 → 0.2.10
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 +1 -1
- package/dist/majik-key.d.ts +6 -2
- package/dist/majik-key.js +12 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -893,7 +893,7 @@ Secure messaging platform using Majik Keys
|
|
|
893
893
|
|
|
894
894
|
[Read more about Majik Message here](https://majikah.solutions/products/majik-message)
|
|
895
895
|
|
|
896
|
-
[](https://message.majikah.solutions)
|
|
897
897
|
|
|
898
898
|
> Click the image to try Majik Message live.
|
|
899
899
|
|
package/dist/majik-key.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* point, so ML-KEM keys can be deterministically re-derived and stored.
|
|
22
22
|
* No partial migration — either fully upgraded or not upgraded yet.
|
|
23
23
|
*/
|
|
24
|
-
import { MajikContact } from "@majikah/majik-contact";
|
|
24
|
+
import { MajikContact, MajikContactMeta } from "@majikah/majik-contact";
|
|
25
25
|
import { KDF_VERSION } from "./core/crypto/constants";
|
|
26
26
|
import type { MajikKeyJSON, MajikKeyMetadata, MnemonicJSON } from "./core/types";
|
|
27
27
|
import { MajikMessageIdentity } from "./core/database/system/identity";
|
|
@@ -165,7 +165,11 @@ export declare class MajikKey {
|
|
|
165
165
|
toString(pretty?: boolean): string;
|
|
166
166
|
static generateMnemonic(strength?: 128 | 256, language?: MnemonicLanguage): Promise<string>;
|
|
167
167
|
static validateMnemonic(mnemonic: string): boolean;
|
|
168
|
-
|
|
168
|
+
/**
|
|
169
|
+
* Converts the MajikKey to a MajikContact.
|
|
170
|
+
* You can pass a custom metadata type if needed, e.g., toContact<MyMeta>()
|
|
171
|
+
*/
|
|
172
|
+
toContact<TMeta extends MajikContactMeta = MajikContactMeta>(initialMeta?: Partial<TMeta>): MajikContact<TMeta>;
|
|
169
173
|
toKeyIdentity(): MajikKeyIdentity;
|
|
170
174
|
toSerializedIdentity(): SerializedIdentity;
|
|
171
175
|
toMajikMessageIdentity(user: MajikUser, options?: {
|
package/dist/majik-key.js
CHANGED
|
@@ -198,7 +198,7 @@ export class MajikKey {
|
|
|
198
198
|
encryptedMlDsaSecretKeyBase64: arrayBufferToBase64(identity.encryptedMlDsaSecretKey),
|
|
199
199
|
edSecretKey: identity.edSecretKey,
|
|
200
200
|
mlDsaSecretKey: identity.mlDsaSecretKey,
|
|
201
|
-
mnemonicLanguage: mnemonicLanguage
|
|
201
|
+
mnemonicLanguage: mnemonicLanguage,
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
catch (err) {
|
|
@@ -512,13 +512,22 @@ export class MajikKey {
|
|
|
512
512
|
return false;
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
|
|
515
|
+
/**
|
|
516
|
+
* Converts the MajikKey to a MajikContact.
|
|
517
|
+
* You can pass a custom metadata type if needed, e.g., toContact<MyMeta>()
|
|
518
|
+
*/
|
|
519
|
+
toContact(initialMeta) {
|
|
516
520
|
const mlKeyBase64 = arrayToBase64(this.mlKemPublicKey);
|
|
521
|
+
// We construct the base metadata and merge with any provided initialMeta
|
|
522
|
+
const meta = {
|
|
523
|
+
label: this._label,
|
|
524
|
+
...initialMeta,
|
|
525
|
+
};
|
|
517
526
|
return new MajikContact({
|
|
518
527
|
id: this._id,
|
|
519
528
|
publicKey: this._publicKey,
|
|
520
529
|
fingerprint: this._fingerprint,
|
|
521
|
-
meta:
|
|
530
|
+
meta: meta,
|
|
522
531
|
mlKey: mlKeyBase64,
|
|
523
532
|
edPublicKeyBase64: this._edPublicKey
|
|
524
533
|
? arrayToBase64(this._edPublicKey)
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@majikah/majik-key",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"description": "A post-quantum ready seed phrase account library for the Majikah ecosystem. Manages deterministic X25519 and ML-KEM-768 identities with Argon2id protection and seamless legacy account migration.",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.10",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "Zelijah",
|
|
8
8
|
"main": "./dist/index.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"test:watch": "vitest"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@majikah/majik-contact": "^0.0.
|
|
53
|
+
"@majikah/majik-contact": "^0.0.6",
|
|
54
54
|
"@noble/hashes": "^2.2.0",
|
|
55
55
|
"@noble/post-quantum": "^0.6.1",
|
|
56
56
|
"@scure/bip39": "^2.2.0",
|