@xyo-network/bip39 2.99.2 → 2.99.3

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.
Files changed (71) hide show
  1. package/dist/neutral/index.cjs +18575 -0
  2. package/dist/neutral/index.cjs.map +1 -0
  3. package/dist/neutral/index.d.cts +71 -0
  4. package/dist/neutral/index.d.cts.map +1 -0
  5. package/dist/neutral/index.d.mts +71 -0
  6. package/dist/neutral/index.d.mts.map +1 -0
  7. package/dist/neutral/index.d.ts +71 -0
  8. package/dist/neutral/index.d.ts.map +1 -0
  9. package/dist/neutral/index.js +18544 -0
  10. package/dist/neutral/index.js.map +1 -0
  11. package/dist/neutral/wordlists/czech.d.cts +3 -0
  12. package/dist/neutral/wordlists/czech.d.cts.map +1 -0
  13. package/dist/neutral/wordlists/czech.d.mts +3 -0
  14. package/dist/neutral/wordlists/czech.d.mts.map +1 -0
  15. package/dist/neutral/wordlists/czech.d.ts +3 -0
  16. package/dist/neutral/wordlists/czech.d.ts.map +1 -0
  17. package/dist/neutral/wordlists/english.d.cts +3 -0
  18. package/dist/neutral/wordlists/english.d.cts.map +1 -0
  19. package/dist/neutral/wordlists/english.d.mts +3 -0
  20. package/dist/neutral/wordlists/english.d.mts.map +1 -0
  21. package/dist/neutral/wordlists/english.d.ts +3 -0
  22. package/dist/neutral/wordlists/english.d.ts.map +1 -0
  23. package/dist/neutral/wordlists/french.d.cts +3 -0
  24. package/dist/neutral/wordlists/french.d.cts.map +1 -0
  25. package/dist/neutral/wordlists/french.d.mts +3 -0
  26. package/dist/neutral/wordlists/french.d.mts.map +1 -0
  27. package/dist/neutral/wordlists/french.d.ts +3 -0
  28. package/dist/neutral/wordlists/french.d.ts.map +1 -0
  29. package/dist/neutral/wordlists/index.d.cts +13 -0
  30. package/dist/neutral/wordlists/index.d.cts.map +1 -0
  31. package/dist/neutral/wordlists/index.d.mts +13 -0
  32. package/dist/neutral/wordlists/index.d.mts.map +1 -0
  33. package/dist/neutral/wordlists/index.d.ts +13 -0
  34. package/dist/neutral/wordlists/index.d.ts.map +1 -0
  35. package/dist/neutral/wordlists/italian.d.cts +3 -0
  36. package/dist/neutral/wordlists/italian.d.cts.map +1 -0
  37. package/dist/neutral/wordlists/italian.d.mts +3 -0
  38. package/dist/neutral/wordlists/italian.d.mts.map +1 -0
  39. package/dist/neutral/wordlists/italian.d.ts +3 -0
  40. package/dist/neutral/wordlists/italian.d.ts.map +1 -0
  41. package/dist/neutral/wordlists/japanese.d.cts +3 -0
  42. package/dist/neutral/wordlists/japanese.d.cts.map +1 -0
  43. package/dist/neutral/wordlists/japanese.d.mts +3 -0
  44. package/dist/neutral/wordlists/japanese.d.mts.map +1 -0
  45. package/dist/neutral/wordlists/japanese.d.ts +3 -0
  46. package/dist/neutral/wordlists/japanese.d.ts.map +1 -0
  47. package/dist/neutral/wordlists/korean.d.cts +3 -0
  48. package/dist/neutral/wordlists/korean.d.cts.map +1 -0
  49. package/dist/neutral/wordlists/korean.d.mts +3 -0
  50. package/dist/neutral/wordlists/korean.d.mts.map +1 -0
  51. package/dist/neutral/wordlists/korean.d.ts +3 -0
  52. package/dist/neutral/wordlists/korean.d.ts.map +1 -0
  53. package/dist/neutral/wordlists/simplified-chinese.d.cts +3 -0
  54. package/dist/neutral/wordlists/simplified-chinese.d.cts.map +1 -0
  55. package/dist/neutral/wordlists/simplified-chinese.d.mts +3 -0
  56. package/dist/neutral/wordlists/simplified-chinese.d.mts.map +1 -0
  57. package/dist/neutral/wordlists/simplified-chinese.d.ts +3 -0
  58. package/dist/neutral/wordlists/simplified-chinese.d.ts.map +1 -0
  59. package/dist/neutral/wordlists/spanish.d.cts +3 -0
  60. package/dist/neutral/wordlists/spanish.d.cts.map +1 -0
  61. package/dist/neutral/wordlists/spanish.d.mts +3 -0
  62. package/dist/neutral/wordlists/spanish.d.mts.map +1 -0
  63. package/dist/neutral/wordlists/spanish.d.ts +3 -0
  64. package/dist/neutral/wordlists/spanish.d.ts.map +1 -0
  65. package/dist/neutral/wordlists/traditional-chinese.d.cts +3 -0
  66. package/dist/neutral/wordlists/traditional-chinese.d.cts.map +1 -0
  67. package/dist/neutral/wordlists/traditional-chinese.d.mts +3 -0
  68. package/dist/neutral/wordlists/traditional-chinese.d.mts.map +1 -0
  69. package/dist/neutral/wordlists/traditional-chinese.d.ts +3 -0
  70. package/dist/neutral/wordlists/traditional-chinese.d.ts.map +1 -0
  71. package/package.json +3 -3
@@ -0,0 +1,71 @@
1
+ export * from './wordlists';
2
+ /**
3
+ * Generate x random words. Uses Cryptographically-Secure Random Number Generator.
4
+ * @param wordlist imported wordlist for specific language
5
+ * @param strength mnemonic strength 128-256 bits
6
+ * @example
7
+ * generateMnemonic(wordlist, 128)
8
+ * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
9
+ */
10
+ /** @deprecated use @scure/bip39 instead */
11
+ export declare function generateMnemonic(wordlist: string[], strength?: number): string;
12
+ /**
13
+ * Reversible: Converts mnemonic string to raw entropy in form of byte array.
14
+ * @param mnemonic 12-24 words
15
+ * @param wordlist imported wordlist for specific language
16
+ * @example
17
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
18
+ * mnemonicToEntropy(mnem, wordlist)
19
+ * // Produces
20
+ * new Uint8Array([
21
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
22
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
23
+ * ])
24
+ */
25
+ /** @deprecated use @scure/bip39 instead */
26
+ export declare function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array;
27
+ /**
28
+ * Reversible: Converts raw entropy in form of byte array to mnemonic string.
29
+ * @param entropy byte array
30
+ * @param wordlist imported wordlist for specific language
31
+ * @returns 12-24 words
32
+ * @example
33
+ * const ent = new Uint8Array([
34
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
35
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
36
+ * ]);
37
+ * entropyToMnemonic(ent, wordlist);
38
+ * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
39
+ */
40
+ /** @deprecated use @scure/bip39 instead */
41
+ export declare function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string;
42
+ /**
43
+ * Validates mnemonic for being 12-24 words contained in `wordlist`.
44
+ */
45
+ /** @deprecated use @scure/bip39 instead */
46
+ export declare function validateMnemonic(mnemonic: string, wordlist: string[]): boolean;
47
+ /**
48
+ * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
49
+ * @param mnemonic 12-24 words
50
+ * @param passphrase string that will additionally protect the key
51
+ * @returns 64 bytes of key data
52
+ * @example
53
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
54
+ * await mnemonicToSeed(mnem, 'password');
55
+ * // new Uint8Array([...64 bytes])
56
+ */
57
+ /** @deprecated use @scure/bip39 instead */
58
+ export declare function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise<Uint8Array>;
59
+ /**
60
+ * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
61
+ * @param mnemonic 12-24 words
62
+ * @param passphrase string that will additionally protect the key
63
+ * @returns 64 bytes of key data
64
+ * @example
65
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
66
+ * mnemonicToSeedSync(mnem, 'password');
67
+ * // new Uint8Array([...64 bytes])
68
+ */
69
+ /** @deprecated use @scure/bip39 instead */
70
+ export declare function mnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array;
71
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAUA,cAAc,aAAa,CAAA;AAwB3B;;;;;;;GAOG;AACH,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,SAAM,GAAG,MAAM,CAK3E;AAmBD;;;;;;;;;;;;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;AAED;;GAEG;AAEH,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAQ9E;AAID;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,SAAK,uBAE/D;AAED;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,SAAK,cAEnE"}
@@ -0,0 +1,71 @@
1
+ export * from './wordlists';
2
+ /**
3
+ * Generate x random words. Uses Cryptographically-Secure Random Number Generator.
4
+ * @param wordlist imported wordlist for specific language
5
+ * @param strength mnemonic strength 128-256 bits
6
+ * @example
7
+ * generateMnemonic(wordlist, 128)
8
+ * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
9
+ */
10
+ /** @deprecated use @scure/bip39 instead */
11
+ export declare function generateMnemonic(wordlist: string[], strength?: number): string;
12
+ /**
13
+ * Reversible: Converts mnemonic string to raw entropy in form of byte array.
14
+ * @param mnemonic 12-24 words
15
+ * @param wordlist imported wordlist for specific language
16
+ * @example
17
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
18
+ * mnemonicToEntropy(mnem, wordlist)
19
+ * // Produces
20
+ * new Uint8Array([
21
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
22
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
23
+ * ])
24
+ */
25
+ /** @deprecated use @scure/bip39 instead */
26
+ export declare function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array;
27
+ /**
28
+ * Reversible: Converts raw entropy in form of byte array to mnemonic string.
29
+ * @param entropy byte array
30
+ * @param wordlist imported wordlist for specific language
31
+ * @returns 12-24 words
32
+ * @example
33
+ * const ent = new Uint8Array([
34
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
35
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
36
+ * ]);
37
+ * entropyToMnemonic(ent, wordlist);
38
+ * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
39
+ */
40
+ /** @deprecated use @scure/bip39 instead */
41
+ export declare function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string;
42
+ /**
43
+ * Validates mnemonic for being 12-24 words contained in `wordlist`.
44
+ */
45
+ /** @deprecated use @scure/bip39 instead */
46
+ export declare function validateMnemonic(mnemonic: string, wordlist: string[]): boolean;
47
+ /**
48
+ * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
49
+ * @param mnemonic 12-24 words
50
+ * @param passphrase string that will additionally protect the key
51
+ * @returns 64 bytes of key data
52
+ * @example
53
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
54
+ * await mnemonicToSeed(mnem, 'password');
55
+ * // new Uint8Array([...64 bytes])
56
+ */
57
+ /** @deprecated use @scure/bip39 instead */
58
+ export declare function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise<Uint8Array>;
59
+ /**
60
+ * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
61
+ * @param mnemonic 12-24 words
62
+ * @param passphrase string that will additionally protect the key
63
+ * @returns 64 bytes of key data
64
+ * @example
65
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
66
+ * mnemonicToSeedSync(mnem, 'password');
67
+ * // new Uint8Array([...64 bytes])
68
+ */
69
+ /** @deprecated use @scure/bip39 instead */
70
+ export declare function mnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array;
71
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAUA,cAAc,aAAa,CAAA;AAwB3B;;;;;;;GAOG;AACH,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,SAAM,GAAG,MAAM,CAK3E;AAmBD;;;;;;;;;;;;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;AAED;;GAEG;AAEH,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAQ9E;AAID;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,SAAK,uBAE/D;AAED;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,SAAK,cAEnE"}
@@ -0,0 +1,71 @@
1
+ export * from './wordlists';
2
+ /**
3
+ * Generate x random words. Uses Cryptographically-Secure Random Number Generator.
4
+ * @param wordlist imported wordlist for specific language
5
+ * @param strength mnemonic strength 128-256 bits
6
+ * @example
7
+ * generateMnemonic(wordlist, 128)
8
+ * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
9
+ */
10
+ /** @deprecated use @scure/bip39 instead */
11
+ export declare function generateMnemonic(wordlist: string[], strength?: number): string;
12
+ /**
13
+ * Reversible: Converts mnemonic string to raw entropy in form of byte array.
14
+ * @param mnemonic 12-24 words
15
+ * @param wordlist imported wordlist for specific language
16
+ * @example
17
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
18
+ * mnemonicToEntropy(mnem, wordlist)
19
+ * // Produces
20
+ * new Uint8Array([
21
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
22
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
23
+ * ])
24
+ */
25
+ /** @deprecated use @scure/bip39 instead */
26
+ export declare function mnemonicToEntropy(mnemonic: string, wordlist: string[]): Uint8Array;
27
+ /**
28
+ * Reversible: Converts raw entropy in form of byte array to mnemonic string.
29
+ * @param entropy byte array
30
+ * @param wordlist imported wordlist for specific language
31
+ * @returns 12-24 words
32
+ * @example
33
+ * const ent = new Uint8Array([
34
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f,
35
+ * 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f, 0x7f
36
+ * ]);
37
+ * entropyToMnemonic(ent, wordlist);
38
+ * // 'legal winner thank year wave sausage worth useful legal winner thank yellow'
39
+ */
40
+ /** @deprecated use @scure/bip39 instead */
41
+ export declare function entropyToMnemonic(entropy: Uint8Array, wordlist: string[]): string;
42
+ /**
43
+ * Validates mnemonic for being 12-24 words contained in `wordlist`.
44
+ */
45
+ /** @deprecated use @scure/bip39 instead */
46
+ export declare function validateMnemonic(mnemonic: string, wordlist: string[]): boolean;
47
+ /**
48
+ * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
49
+ * @param mnemonic 12-24 words
50
+ * @param passphrase string that will additionally protect the key
51
+ * @returns 64 bytes of key data
52
+ * @example
53
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
54
+ * await mnemonicToSeed(mnem, 'password');
55
+ * // new Uint8Array([...64 bytes])
56
+ */
57
+ /** @deprecated use @scure/bip39 instead */
58
+ export declare function mnemonicToSeed(mnemonic: string, passphrase?: string): Promise<Uint8Array>;
59
+ /**
60
+ * Irreversible: Uses KDF to derive 64 bytes of key data from mnemonic + optional password.
61
+ * @param mnemonic 12-24 words
62
+ * @param passphrase string that will additionally protect the key
63
+ * @returns 64 bytes of key data
64
+ * @example
65
+ * const mnem = 'legal winner thank year wave sausage worth useful legal winner thank yellow';
66
+ * mnemonicToSeedSync(mnem, 'password');
67
+ * // new Uint8Array([...64 bytes])
68
+ */
69
+ /** @deprecated use @scure/bip39 instead */
70
+ export declare function mnemonicToSeedSync(mnemonic: string, passphrase?: string): Uint8Array;
71
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAUA,cAAc,aAAa,CAAA;AAwB3B;;;;;;;GAOG;AACH,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,QAAQ,SAAM,GAAG,MAAM,CAK3E;AAmBD;;;;;;;;;;;;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;AAED;;GAEG;AAEH,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,OAAO,CAQ9E;AAID;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,SAAK,uBAE/D;AAED;;;;;;;;;GASG;AAEH,2CAA2C;AAC3C,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,SAAK,cAEnE"}