@majikah/majik-key 0.2.14 → 0.3.1
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/LICENSE +1 -1
- package/README.md +16 -5
- package/dist/core/web3/bitcoin/constants.d.ts +1 -1
- package/dist/core/web3/bitcoin/constants.js +1 -1
- package/dist/majik-key.d.ts +5 -1
- package/dist/majik-key.js +5 -2
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -183,7 +183,7 @@ const standardBtc = await MajikKey.deriveStandardBitcoinFromMnemonic(mnemonic);
|
|
|
183
183
|
|
|
184
184
|
### Two Solana paths, on purpose
|
|
185
185
|
|
|
186
|
-
By default (`deriveSolanaKeypairFromEdSecretKey`), the Solana keypair is domain-separated from your Ed25519 message-signing key via `SHA256(edSeed || "
|
|
186
|
+
By default (`deriveSolanaKeypairFromEdSecretKey`), the Solana keypair is domain-separated from your Ed25519 message-signing key via `SHA256(edSeed || "MajikKeySolanaSeed")`, so the same private key never secures two different protocols. You can opt into reusing your Ed25519 message-signing key directly instead:
|
|
187
187
|
|
|
188
188
|
```typescript
|
|
189
189
|
// Recommended: domain-separated Solana key
|
|
@@ -381,12 +381,23 @@ const solanaSigner = await key.getSolanaKeypair(); // needs @solana/kit
|
|
|
381
381
|
|
|
382
382
|
---
|
|
383
383
|
|
|
384
|
-
## License
|
|
384
|
+
## License
|
|
385
385
|
|
|
386
386
|
**License:** [Apache-2.0](LICENSE) — free for personal and commercial use.
|
|
387
387
|
|
|
388
|
+
## Author
|
|
389
|
+
|
|
388
390
|
Developed by **Josef Elijah Fabian (Zelijah)** | [Majikah Solutions OPC](https://majikah.solutions/about)
|
|
389
391
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
392
|
+
|
|
393
|
+
**Developer**: [Josef Elijah Fabian](https://github.com/jedlsf)
|
|
394
|
+
**GitHub**: [https://github.com/Majikah](https://github.com/Majikah)
|
|
395
|
+
**Project Repository**: [https://github.com/Majikah/majik-signature](https://github.com/Majikah/majik-signature)
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## Contact
|
|
400
|
+
|
|
401
|
+
- **Business Email**: [business@majikah.solutions](mailto:business@majikah.solutions)
|
|
402
|
+
- **Official Website**: [https://www.thezelijah.world](https://www.thezelijah.world)
|
|
403
|
+
- **Majikah Ecosystem**: [https://majikah.solutions](https://majikah.solutions)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const MAJIK_BITCOIN_STANDARD_PATH = "m/84'/0'/0'/0/0";
|
|
2
|
-
export declare const MAJIK_BITCOIN_DOMAIN_PATH = "m/84'/
|
|
2
|
+
export declare const MAJIK_BITCOIN_DOMAIN_PATH = "m/84'/1971'/0'/0/0";
|
|
@@ -4,4 +4,4 @@ export const MAJIK_BITCOIN_STANDARD_PATH = "m/84'/0'/0'/0/0";
|
|
|
4
4
|
// Unregistered/private coin-type index — domain-separates Majik's default
|
|
5
5
|
// Bitcoin key from a user's "real" BTC wallet, while remaining 100% standard
|
|
6
6
|
// BIP-32 math (just a different branch of the same tree).
|
|
7
|
-
export const MAJIK_BITCOIN_DOMAIN_PATH = "m/84'/
|
|
7
|
+
export const MAJIK_BITCOIN_DOMAIN_PATH = "m/84'/1971'/0'/0/0";
|
package/dist/majik-key.d.ts
CHANGED
|
@@ -319,7 +319,11 @@ export declare class MajikKey {
|
|
|
319
319
|
*/
|
|
320
320
|
static fromDangerousJSON(json: MajikKeyDangerousJSON | string): MajikKey;
|
|
321
321
|
toMnemonicJSON(mnemonic: string, passphrase?: string): MnemonicJSON;
|
|
322
|
-
static fromMnemonicJSON(mnemonicJson: MnemonicJSON | string, passphrase: string, label?: string
|
|
322
|
+
static fromMnemonicJSON(mnemonicJson: MnemonicJSON | string, passphrase: string, label?: string, options?: {
|
|
323
|
+
mnemonicLanguage?: MnemonicLanguage;
|
|
324
|
+
/** @experimental Set `false` to skip deriving the Bitcoin keypair. Defaults to `true` for backward compatibility. */
|
|
325
|
+
deriveBitcoin?: boolean;
|
|
326
|
+
}): Promise<MajikKey>;
|
|
323
327
|
updateLabel(newLabel: string): this;
|
|
324
328
|
updatePassphrase(currentPassphrase: string, newPassphrase: string): Promise<this>;
|
|
325
329
|
/**
|
package/dist/majik-key.js
CHANGED
|
@@ -483,7 +483,10 @@ export class MajikKey {
|
|
|
483
483
|
phrase: passphrase?.trim() || undefined,
|
|
484
484
|
};
|
|
485
485
|
}
|
|
486
|
-
static async fromMnemonicJSON(mnemonicJson, passphrase, label
|
|
486
|
+
static async fromMnemonicJSON(mnemonicJson, passphrase, label, options = {
|
|
487
|
+
deriveBitcoin: true,
|
|
488
|
+
mnemonicLanguage: "en",
|
|
489
|
+
}) {
|
|
487
490
|
try {
|
|
488
491
|
const parsed = typeof mnemonicJson === "string"
|
|
489
492
|
? JSON.parse(mnemonicJson)
|
|
@@ -492,7 +495,7 @@ export class MajikKey {
|
|
|
492
495
|
throw new MajikKeyError("Invalid MnemonicJSON");
|
|
493
496
|
const mnemonic = seedArrayToString(parsed.seed);
|
|
494
497
|
MajikKeyValidator.validateMnemonic(mnemonic);
|
|
495
|
-
return await MajikKey.create(mnemonic, passphrase, label);
|
|
498
|
+
return await MajikKey.create(mnemonic, passphrase, label, options);
|
|
496
499
|
}
|
|
497
500
|
catch (err) {
|
|
498
501
|
if (err instanceof MajikKeyError)
|
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.
|
|
5
|
+
"version": "0.3.1",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"author": "Zelijah",
|
|
8
8
|
"main": "./dist/index.js",
|