@xyo-network/bip39 3.9.18 → 3.9.19

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.
@@ -1,18 +1,56 @@
1
- declare const wordlists: {
2
- czech: string[];
3
- english: string[];
4
- french: string[];
5
- italian: string[];
6
- japanese: string[];
7
- korean: string[];
8
- simplifiedChinese: string[];
9
- spanish: string[];
10
- traditionalChinese: string[];
11
- };
12
-
13
- declare function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array;
14
- declare function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string;
15
- declare function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise<Uint8Array<ArrayBufferLike>>;
16
- declare function mnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array<ArrayBufferLike>;
17
-
18
- export { entropyToMnemonic, mnemonicToEntropy, mnemonicToSeed, mnemonicToSeedSync, wordlists };
1
+ export * from './wordlists/index.ts';
2
+ /**
3
+ * Reversible: Converts mnemonic string to raw entropy in form of byte array.
4
+ * @param mnemonic 12-24 words
5
+ * @param wordlist imported wordlist for specific language
6
+ * @example
7
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
8
+ * mnemonicToEntropy(mnem, wordlist)
9
+ * // Produces
10
+ * new Uint8Array([
11
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
12
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
13
+ * ])
14
+ */
15
+ /** @deprecated use @scure/bip39 instead */
16
+ export declare function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array;
17
+ /**
18
+ * Reversible: Converts raw entropy in form of byte array to mnemonic string.
19
+ * @param entropy byte array
20
+ * @param wordlist imported wordlist for specific language
21
+ * @returns 12-24 words
22
+ * @example
23
+ * const ent = new Uint8Array([
24
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
25
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
26
+ * ]);
27
+ * entropyToMnemonic(ent, wordlist);
28
+ * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
29
+ */
30
+ /** @deprecated use @scure/bip39 instead */
31
+ export declare function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string;
32
+ /**
33
+ * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
34
+ * @param mnemonic 12-24 words
35
+ * @param passphrase string that will additionally protect the key
36
+ * @returns 64 bytes of key data
37
+ * @example
38
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
39
+ * await mnemonicToSeed(mnem, 'password');
40
+ * // new Uint8Array([...64 bytes])
41
+ */
42
+ /** @deprecated use @scure/bip39 instead */
43
+ export declare function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise<Uint8Array<ArrayBufferLike>>;
44
+ /**
45
+ * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
46
+ * @param mnemonic 12-24 words
47
+ * @param passphrase string that will additionally protect the key
48
+ * @returns 64 bytes of key data
49
+ * @example
50
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
51
+ * mnemonicToSeedSync(mnem, 'password');
52
+ * // new Uint8Array([...64 bytes])
53
+ */
54
+ /** @deprecated use @scure/bip39 instead */
55
+ export declare function mnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array<ArrayBufferLike>;
56
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,cAAc,sBAAsB,CAAA;AAyCpC;;;;;;;;;;;;GAYG;AAEH,2CAA2C;AAC3C,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,UAAU,CAKlF;AAED;;;;;;;;;;;;GAYG;AAEH,2CAA2C;AAC3C,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAIjF;AAID;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,SAAK,wCAE/D;AAED;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,SAAK,+BAEnE"}
@@ -0,0 +1,13 @@
1
+ /** @deprecated use @scure/bip39 instead */
2
+ export declare const wordlists: {
3
+ czech: string[];
4
+ english: string[];
5
+ french: string[];
6
+ italian: string[];
7
+ japanese: string[];
8
+ korean: string[];
9
+ simplifiedChinese: string[];
10
+ spanish: string[];
11
+ traditionalChinese: string[];
12
+ };
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/wordlists/index.ts"],"names":[],"mappings":"AAUA,2CAA2C;AAC3C,eAAO,MAAM,SAAS;;;;;;;;;;CAUrB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/bip39",
3
- "version": "3.9.18",
3
+ "version": "3.9.19",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -34,9 +34,9 @@
34
34
  "@scure/bip39": "^1.5.4"
35
35
  },
36
36
  "devDependencies": {
37
- "@xylabs/ts-scripts-yarn3": "^5.0.25",
38
- "@xylabs/tsconfig": "^5.0.25",
39
- "typescript": "^5.7.3"
37
+ "@xylabs/ts-scripts-yarn3": "^5.0.39",
38
+ "@xylabs/tsconfig": "^5.0.39",
39
+ "typescript": "^5.8.2"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"