@twin.org/crypto 0.0.1-next.9 → 0.0.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.
Files changed (31) hide show
  1. package/dist/cjs/index.cjs +51 -0
  2. package/dist/esm/index.mjs +52 -1
  3. package/dist/types/address/bip44.d.ts +15 -0
  4. package/dist/types/curves/ed25519.d.ts +12 -0
  5. package/docs/changelog.md +331 -1
  6. package/docs/reference/classes/Bech32.md +15 -7
  7. package/docs/reference/classes/Bip32Path.md +17 -9
  8. package/docs/reference/classes/Bip39.md +28 -12
  9. package/docs/reference/classes/Bip44.md +121 -21
  10. package/docs/reference/classes/Blake2b.md +35 -17
  11. package/docs/reference/classes/Blake3.md +28 -14
  12. package/docs/reference/classes/ChaCha20Poly1305.md +18 -8
  13. package/docs/reference/classes/Ed25519.md +65 -9
  14. package/docs/reference/classes/HmacSha1.md +17 -9
  15. package/docs/reference/classes/HmacSha256.md +26 -12
  16. package/docs/reference/classes/HmacSha512.md +38 -16
  17. package/docs/reference/classes/Hotp.md +9 -5
  18. package/docs/reference/classes/PasswordGenerator.md +6 -4
  19. package/docs/reference/classes/PasswordValidator.md +23 -11
  20. package/docs/reference/classes/Pbkdf2.md +27 -11
  21. package/docs/reference/classes/Secp256k1.md +21 -9
  22. package/docs/reference/classes/Sha1.md +11 -7
  23. package/docs/reference/classes/Sha256.md +17 -9
  24. package/docs/reference/classes/Sha3.md +23 -11
  25. package/docs/reference/classes/Sha512.md +23 -11
  26. package/docs/reference/classes/Slip0010.md +27 -11
  27. package/docs/reference/classes/Totp.md +42 -16
  28. package/docs/reference/classes/X25519.md +9 -5
  29. package/docs/reference/classes/Zip215.md +12 -6
  30. package/docs/reference/type-aliases/KeyType.md +1 -1
  31. package/package.json +13 -13
@@ -188,6 +188,39 @@ class Ed25519 {
188
188
  return false;
189
189
  }
190
190
  }
191
+ /**
192
+ * Convert a private key in PKCS8 format.
193
+ * @param privateKey The private key to convert.
194
+ * @returns The private key in PKCS8 format.
195
+ */
196
+ static async privateKeyToPkcs8(privateKey) {
197
+ core.Guards.uint8Array(Ed25519._CLASS_NAME, "privateKey", privateKey);
198
+ if (privateKey.length !== Ed25519.PRIVATE_KEY_SIZE) {
199
+ throw new core.GeneralError(Ed25519._CLASS_NAME, "privateKeyLength", {
200
+ requiredSize: Ed25519.PRIVATE_KEY_SIZE,
201
+ actualSize: privateKey.length
202
+ });
203
+ }
204
+ // crypto.subtle.importKey does not support Ed25519 keys in raw format.
205
+ // We need to convert the key to PKCS8 format before importing.
206
+ // The PKCS8 format is the raw key prefixed with the ASN.1 sequence for an Ed25519 private key.
207
+ // The ASN.1 sequence is 48 46 02 01 00 30 05 06 03 2b 65 70 04 20 04 20 (0x302e020100300506032b657004220420)
208
+ const pkcs8Prefix = new Uint8Array([48, 46, 2, 1, 0, 48, 5, 6, 3, 43, 101, 112, 4, 34, 4, 32]);
209
+ const fullKey = core.Uint8ArrayHelper.concat([pkcs8Prefix, privateKey]);
210
+ return crypto.subtle.importKey("pkcs8", fullKey, "Ed25519", true, ["sign"]);
211
+ }
212
+ /**
213
+ * Convert a crypto key to raw private key.
214
+ * @param cryptoKey The crypto key to convert.
215
+ * @returns The raw private key.
216
+ */
217
+ static async pkcs8ToPrivateKey(cryptoKey) {
218
+ core.Guards.defined(Ed25519._CLASS_NAME, "cryptoKey", cryptoKey);
219
+ // crypto.subtle.exportKey does not support Ed25519 keys in raw format.
220
+ // so we export as PKCS8 and remove the ASN.1 sequence prefix.
221
+ const pkcs8Bytes = await crypto.subtle.exportKey("pkcs8", cryptoKey);
222
+ return new Uint8Array(pkcs8Bytes.slice(16));
223
+ }
191
224
  }
192
225
 
193
226
  // Copyright 2024 IOTA Stiftung.
@@ -592,6 +625,24 @@ class Bip44 {
592
625
  static basePath(coinType) {
593
626
  return `m/44'/${coinType}'`;
594
627
  }
628
+ /**
629
+ * Generate an address from the seed and parts.
630
+ * @param seed The account seed.
631
+ * @param keyType The key type.
632
+ * @param coinType The coin type.
633
+ * @param accountIndex The account index.
634
+ * @param isInternal Is this an internal address.
635
+ * @param addressIndex The address index.
636
+ * @returns The generated path and the associated keypair.
637
+ */
638
+ static address(seed, keyType, coinType, accountIndex, isInternal, addressIndex) {
639
+ const keyPair = Bip44.keyPair(seed, keyType, coinType, accountIndex, isInternal, addressIndex);
640
+ const addressData = Blake2b.sum256(keyPair.publicKey);
641
+ return {
642
+ address: core.Converter.bytesToHex(addressData, true),
643
+ ...keyPair
644
+ };
645
+ }
595
646
  /**
596
647
  * Generate a bech32 address from the seed and parts.
597
648
  * @param seed The account seed.
@@ -1,5 +1,5 @@
1
1
  import { bech32 } from '@scure/base';
2
- import { Guards, BaseError, GeneralError, Is, Converter, GuardError, Base32, RandomHelper, Validation } from '@twin.org/core';
2
+ import { Guards, BaseError, GeneralError, Is, Uint8ArrayHelper, Converter, GuardError, Base32, RandomHelper, Validation } from '@twin.org/core';
3
3
  import { ed25519, edwardsToMontgomeryPriv, edwardsToMontgomeryPub } from '@noble/curves/ed25519';
4
4
  import { secp256k1 } from '@noble/curves/secp256k1';
5
5
  import { blake2b } from '@noble/hashes/blake2b';
@@ -166,6 +166,39 @@ class Ed25519 {
166
166
  return false;
167
167
  }
168
168
  }
169
+ /**
170
+ * Convert a private key in PKCS8 format.
171
+ * @param privateKey The private key to convert.
172
+ * @returns The private key in PKCS8 format.
173
+ */
174
+ static async privateKeyToPkcs8(privateKey) {
175
+ Guards.uint8Array(Ed25519._CLASS_NAME, "privateKey", privateKey);
176
+ if (privateKey.length !== Ed25519.PRIVATE_KEY_SIZE) {
177
+ throw new GeneralError(Ed25519._CLASS_NAME, "privateKeyLength", {
178
+ requiredSize: Ed25519.PRIVATE_KEY_SIZE,
179
+ actualSize: privateKey.length
180
+ });
181
+ }
182
+ // crypto.subtle.importKey does not support Ed25519 keys in raw format.
183
+ // We need to convert the key to PKCS8 format before importing.
184
+ // The PKCS8 format is the raw key prefixed with the ASN.1 sequence for an Ed25519 private key.
185
+ // The ASN.1 sequence is 48 46 02 01 00 30 05 06 03 2b 65 70 04 20 04 20 (0x302e020100300506032b657004220420)
186
+ const pkcs8Prefix = new Uint8Array([48, 46, 2, 1, 0, 48, 5, 6, 3, 43, 101, 112, 4, 34, 4, 32]);
187
+ const fullKey = Uint8ArrayHelper.concat([pkcs8Prefix, privateKey]);
188
+ return crypto.subtle.importKey("pkcs8", fullKey, "Ed25519", true, ["sign"]);
189
+ }
190
+ /**
191
+ * Convert a crypto key to raw private key.
192
+ * @param cryptoKey The crypto key to convert.
193
+ * @returns The raw private key.
194
+ */
195
+ static async pkcs8ToPrivateKey(cryptoKey) {
196
+ Guards.defined(Ed25519._CLASS_NAME, "cryptoKey", cryptoKey);
197
+ // crypto.subtle.exportKey does not support Ed25519 keys in raw format.
198
+ // so we export as PKCS8 and remove the ASN.1 sequence prefix.
199
+ const pkcs8Bytes = await crypto.subtle.exportKey("pkcs8", cryptoKey);
200
+ return new Uint8Array(pkcs8Bytes.slice(16));
201
+ }
169
202
  }
170
203
 
171
204
  // Copyright 2024 IOTA Stiftung.
@@ -570,6 +603,24 @@ class Bip44 {
570
603
  static basePath(coinType) {
571
604
  return `m/44'/${coinType}'`;
572
605
  }
606
+ /**
607
+ * Generate an address from the seed and parts.
608
+ * @param seed The account seed.
609
+ * @param keyType The key type.
610
+ * @param coinType The coin type.
611
+ * @param accountIndex The account index.
612
+ * @param isInternal Is this an internal address.
613
+ * @param addressIndex The address index.
614
+ * @returns The generated path and the associated keypair.
615
+ */
616
+ static address(seed, keyType, coinType, accountIndex, isInternal, addressIndex) {
617
+ const keyPair = Bip44.keyPair(seed, keyType, coinType, accountIndex, isInternal, addressIndex);
618
+ const addressData = Blake2b.sum256(keyPair.publicKey);
619
+ return {
620
+ address: Converter.bytesToHex(addressData, true),
621
+ ...keyPair
622
+ };
623
+ }
573
624
  /**
574
625
  * Generate a bech32 address from the seed and parts.
575
626
  * @param seed The account seed.
@@ -34,6 +34,21 @@ export declare class Bip44 {
34
34
  * @returns The bip44 address base path.
35
35
  */
36
36
  static basePath(coinType: number): string;
37
+ /**
38
+ * Generate an address from the seed and parts.
39
+ * @param seed The account seed.
40
+ * @param keyType The key type.
41
+ * @param coinType The coin type.
42
+ * @param accountIndex The account index.
43
+ * @param isInternal Is this an internal address.
44
+ * @param addressIndex The address index.
45
+ * @returns The generated path and the associated keypair.
46
+ */
47
+ static address(seed: Uint8Array, keyType: KeyType, coinType: number, accountIndex: number, isInternal: boolean, addressIndex: number): {
48
+ address: string;
49
+ privateKey: Uint8Array;
50
+ publicKey: Uint8Array;
51
+ };
37
52
  /**
38
53
  * Generate a bech32 address from the seed and parts.
39
54
  * @param seed The account seed.
@@ -34,4 +34,16 @@ export declare class Ed25519 {
34
34
  * @throws Error if the public key is not the correct length.
35
35
  */
36
36
  static verify(publicKey: Uint8Array, block: Uint8Array, signature: Uint8Array): boolean;
37
+ /**
38
+ * Convert a private key in PKCS8 format.
39
+ * @param privateKey The private key to convert.
40
+ * @returns The private key in PKCS8 format.
41
+ */
42
+ static privateKeyToPkcs8(privateKey: Uint8Array): Promise<CryptoKey>;
43
+ /**
44
+ * Convert a crypto key to raw private key.
45
+ * @param cryptoKey The crypto key to convert.
46
+ * @returns The raw private key.
47
+ */
48
+ static pkcs8ToPrivateKey(cryptoKey: CryptoKey): Promise<Uint8Array>;
37
49
  }
package/docs/changelog.md CHANGED
@@ -1,5 +1,335 @@
1
1
  # @twin.org/crypto - Changelog
2
2
 
3
- ## 0.0.1-next.9
3
+ ## 0.0.1 (2025-07-03)
4
+
5
+
6
+ ### Features
7
+
8
+ * release to production ([829d53d](https://github.com/twinfoundation/framework/commit/829d53d3953b1e1b40b0243c04cfdfd3842aac7b))
9
+ * release to production ([5cf3a76](https://github.com/twinfoundation/framework/commit/5cf3a76a09eff2e6414d0cba846c7c37400a11d6))
10
+
11
+
12
+ ### Dependencies
13
+
14
+ * The following workspace dependencies were updated
15
+ * dependencies
16
+ * @twin.org/core bumped from ^0.0.0 to ^0.0.1
17
+ * @twin.org/nameof bumped from ^0.0.0 to ^0.0.1
18
+ * devDependencies
19
+ * @twin.org/nameof-transformer bumped from ^0.0.0 to ^0.0.1
20
+ * @twin.org/nameof-vitest-plugin bumped from ^0.0.0 to ^0.0.1
21
+
22
+ ## [0.0.1-next.70](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.69...crypto-v0.0.1-next.70) (2025-07-02)
23
+
24
+
25
+ ### Features
26
+
27
+ * add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
28
+ * relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
29
+ * use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
30
+
31
+
32
+ ### Dependencies
33
+
34
+ * The following workspace dependencies were updated
35
+ * dependencies
36
+ * @twin.org/core bumped from 0.0.1-next.69 to 0.0.1-next.70
37
+ * @twin.org/nameof bumped from 0.0.1-next.69 to 0.0.1-next.70
38
+ * devDependencies
39
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.69 to 0.0.1-next.70
40
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.69 to 0.0.1-next.70
41
+
42
+ ## [0.0.1-next.69](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.68...crypto-v0.0.1-next.69) (2025-07-02)
43
+
44
+
45
+ ### Features
46
+
47
+ * add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
48
+ * relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
49
+ * use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
50
+
51
+
52
+ ### Dependencies
53
+
54
+ * The following workspace dependencies were updated
55
+ * dependencies
56
+ * @twin.org/core bumped from 0.0.1-next.68 to 0.0.1-next.69
57
+ * @twin.org/nameof bumped from 0.0.1-next.68 to 0.0.1-next.69
58
+ * devDependencies
59
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.68 to 0.0.1-next.69
60
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.68 to 0.0.1-next.69
61
+
62
+ ## [0.0.1-next.68](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.67...crypto-v0.0.1-next.68) (2025-07-02)
63
+
64
+
65
+ ### Features
66
+
67
+ * relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
68
+
69
+
70
+ ### Dependencies
71
+
72
+ * The following workspace dependencies were updated
73
+ * dependencies
74
+ * @twin.org/core bumped from 0.0.1-next.67 to 0.0.1-next.68
75
+ * @twin.org/nameof bumped from 0.0.1-next.67 to 0.0.1-next.68
76
+ * devDependencies
77
+ * @twin.org/nameof-transformer bumped from 0.0.1-next.67 to 0.0.1-next.68
78
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.67 to 0.0.1-next.68
79
+
80
+ ## [0.0.1-next.67](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.66...crypto-v0.0.1-next.67) (2025-06-26)
81
+
82
+
83
+ ### Miscellaneous Chores
84
+
85
+ * **crypto:** Synchronize repo versions
86
+
87
+
88
+ ### Dependencies
89
+
90
+ * The following workspace dependencies were updated
91
+ * dependencies
92
+ * @twin.org/core bumped from 0.0.1-next.66 to 0.0.1-next.67
93
+
94
+ ## [0.0.1-next.66](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.65...crypto-v0.0.1-next.66) (2025-06-26)
95
+
96
+
97
+ ### Miscellaneous Chores
98
+
99
+ * **crypto:** Synchronize repo versions
100
+
101
+
102
+ ### Dependencies
103
+
104
+ * The following workspace dependencies were updated
105
+ * dependencies
106
+ * @twin.org/core bumped from 0.0.1-next.65 to 0.0.1-next.66
107
+
108
+ ## [0.0.1-next.65](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.64...crypto-v0.0.1-next.65) (2025-06-19)
109
+
110
+
111
+ ### Miscellaneous Chores
112
+
113
+ * **crypto:** Synchronize repo versions
114
+
115
+
116
+ ### Dependencies
117
+
118
+ * The following workspace dependencies were updated
119
+ * dependencies
120
+ * @twin.org/core bumped from 0.0.1-next.64 to 0.0.1-next.65
121
+
122
+ ## [0.0.1-next.64](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.63...crypto-v0.0.1-next.64) (2025-06-19)
123
+
124
+
125
+ ### Miscellaneous Chores
126
+
127
+ * **crypto:** Synchronize repo versions
128
+
129
+
130
+ ### Dependencies
131
+
132
+ * The following workspace dependencies were updated
133
+ * dependencies
134
+ * @twin.org/core bumped from 0.0.1-next.63 to 0.0.1-next.64
135
+
136
+ ## [0.0.1-next.63](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.62...crypto-v0.0.1-next.63) (2025-06-18)
137
+
138
+
139
+ ### Miscellaneous Chores
140
+
141
+ * **crypto:** Synchronize repo versions
142
+
143
+
144
+ ### Dependencies
145
+
146
+ * The following workspace dependencies were updated
147
+ * dependencies
148
+ * @twin.org/core bumped from 0.0.1-next.62 to 0.0.1-next.63
149
+
150
+ ## [0.0.1-next.62](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.61...crypto-v0.0.1-next.62) (2025-06-17)
151
+
152
+
153
+ ### Features
154
+
155
+ * add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
156
+ * use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
157
+
158
+
159
+ ### Dependencies
160
+
161
+ * The following workspace dependencies were updated
162
+ * dependencies
163
+ * @twin.org/core bumped from 0.0.1-next.61 to 0.0.1-next.62
164
+
165
+ ## [0.0.1-next.61](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.60...crypto-v0.0.1-next.61) (2025-06-17)
166
+
167
+
168
+ ### Miscellaneous Chores
169
+
170
+ * **crypto:** Synchronize repo versions
171
+
172
+
173
+ ### Dependencies
174
+
175
+ * The following workspace dependencies were updated
176
+ * dependencies
177
+ * @twin.org/core bumped from 0.0.1-next.60 to 0.0.1-next.61
178
+
179
+ ## [0.0.1-next.60](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.59...crypto-v0.0.1-next.60) (2025-06-17)
180
+
181
+
182
+ ### Miscellaneous Chores
183
+
184
+ * **crypto:** Synchronize repo versions
185
+
186
+
187
+ ### Dependencies
188
+
189
+ * The following workspace dependencies were updated
190
+ * dependencies
191
+ * @twin.org/core bumped from 0.0.1-next.59 to 0.0.1-next.60
192
+
193
+ ## [0.0.1-next.59](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.58...crypto-v0.0.1-next.59) (2025-06-17)
194
+
195
+
196
+ ### Miscellaneous Chores
197
+
198
+ * **crypto:** Synchronize repo versions
199
+
200
+
201
+ ### Dependencies
202
+
203
+ * The following workspace dependencies were updated
204
+ * dependencies
205
+ * @twin.org/core bumped from 0.0.1-next.58 to 0.0.1-next.59
206
+
207
+ ## [0.0.1-next.58](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.57...crypto-v0.0.1-next.58) (2025-06-13)
208
+
209
+
210
+ ### Miscellaneous Chores
211
+
212
+ * **crypto:** Synchronize repo versions
213
+
214
+
215
+ ### Dependencies
216
+
217
+ * The following workspace dependencies were updated
218
+ * dependencies
219
+ * @twin.org/core bumped from 0.0.1-next.57 to 0.0.1-next.58
220
+
221
+ ## [0.0.1-next.57](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.56...crypto-v0.0.1-next.57) (2025-06-10)
222
+
223
+
224
+ ### Features
225
+
226
+ * add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
227
+
228
+
229
+ ### Dependencies
230
+
231
+ * The following workspace dependencies were updated
232
+ * dependencies
233
+ * @twin.org/core bumped from 0.0.1-next.56 to 0.0.1-next.57
234
+
235
+ ## [0.0.1-next.56](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.55...crypto-v0.0.1-next.56) (2025-05-08)
236
+
237
+
238
+ ### Miscellaneous Chores
239
+
240
+ * **crypto:** Synchronize repo versions
241
+
242
+
243
+ ### Dependencies
244
+
245
+ * The following workspace dependencies were updated
246
+ * dependencies
247
+ * @twin.org/core bumped from 0.0.1-next.55 to 0.0.1-next.56
248
+
249
+ ## [0.0.1-next.55](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.54...crypto-v0.0.1-next.55) (2025-05-07)
250
+
251
+
252
+ ### Miscellaneous Chores
253
+
254
+ * **crypto:** Synchronize repo versions
255
+
256
+
257
+ ### Dependencies
258
+
259
+ * The following workspace dependencies were updated
260
+ * dependencies
261
+ * @twin.org/core bumped from 0.0.1-next.54 to 0.0.1-next.55
262
+
263
+ ## [0.0.1-next.54](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.53...crypto-v0.0.1-next.54) (2025-05-06)
264
+
265
+
266
+ ### Miscellaneous Chores
267
+
268
+ * **crypto:** Synchronize repo versions
269
+
270
+
271
+ ### Dependencies
272
+
273
+ * The following workspace dependencies were updated
274
+ * dependencies
275
+ * @twin.org/core bumped from 0.0.1-next.53 to 0.0.1-next.54
276
+
277
+ ## [0.0.1-next.53](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.52...crypto-v0.0.1-next.53) (2025-05-01)
278
+
279
+
280
+ ### Miscellaneous Chores
281
+
282
+ * **crypto:** Synchronize repo versions
283
+
284
+
285
+ ### Dependencies
286
+
287
+ * The following workspace dependencies were updated
288
+ * dependencies
289
+ * @twin.org/core bumped from 0.0.1-next.52 to 0.0.1-next.53
290
+
291
+ ## [0.0.1-next.52](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.51...crypto-v0.0.1-next.52) (2025-04-17)
292
+
293
+
294
+ ### Features
295
+
296
+ * use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
297
+
298
+
299
+ ### Dependencies
300
+
301
+ * The following workspace dependencies were updated
302
+ * dependencies
303
+ * @twin.org/core bumped from 0.0.1-next.51 to 0.0.1-next.52
304
+
305
+ ## [0.0.1-next.51](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.50...crypto-v0.0.1-next.51) (2025-03-27)
306
+
307
+
308
+ ### Miscellaneous Chores
309
+
310
+ * **crypto:** Synchronize repo versions
311
+
312
+
313
+ ### Dependencies
314
+
315
+ * The following workspace dependencies were updated
316
+ * dependencies
317
+ * @twin.org/core bumped from 0.0.1-next.50 to 0.0.1-next.51
318
+
319
+ ## [0.0.1-next.50](https://github.com/twinfoundation/framework/compare/crypto-v0.0.1-next.49...crypto-v0.0.1-next.50) (2025-03-26)
320
+
321
+
322
+ ### Miscellaneous Chores
323
+
324
+ * **crypto:** Synchronize repo versions
325
+
326
+
327
+ ### Dependencies
328
+
329
+ * The following workspace dependencies were updated
330
+ * dependencies
331
+ * @twin.org/core bumped from 0.0.1-next.49 to 0.0.1-next.50
332
+
333
+ ## 0.0.1-next.49
4
334
 
5
335
  - Added: Bip44
@@ -4,13 +4,13 @@ Bech32 encoding and decoding.
4
4
 
5
5
  ## Constructors
6
6
 
7
- ### new Bech32()
7
+ ### Constructor
8
8
 
9
- > **new Bech32**(): [`Bech32`](Bech32.md)
9
+ > **new Bech32**(): `Bech32`
10
10
 
11
11
  #### Returns
12
12
 
13
- [`Bech32`](Bech32.md)
13
+ `Bech32`
14
14
 
15
15
  ## Methods
16
16
 
@@ -22,11 +22,15 @@ Encode the buffer.
22
22
 
23
23
  #### Parameters
24
24
 
25
- **humanReadablePart**: `string`
25
+ ##### humanReadablePart
26
+
27
+ `string`
26
28
 
27
29
  The header.
28
30
 
29
- **data**: `Uint8Array`
31
+ ##### data
32
+
33
+ `Uint8Array`
30
34
 
31
35
  The data to encode.
32
36
 
@@ -46,7 +50,9 @@ Decode a bech32 string.
46
50
 
47
51
  #### Parameters
48
52
 
49
- **bech**: `string`
53
+ ##### bech
54
+
55
+ `string`
50
56
 
51
57
  The text to decode.
52
58
 
@@ -78,7 +84,9 @@ Is the input a bech 32 address.
78
84
 
79
85
  #### Parameters
80
86
 
81
- **bech**: `unknown`
87
+ ##### bech
88
+
89
+ `unknown`
82
90
 
83
91
  The value to test.
84
92
 
@@ -4,39 +4,43 @@ Class to help with bip32 paths.
4
4
 
5
5
  ## Constructors
6
6
 
7
- ### new Bip32Path()
7
+ ### Constructor
8
8
 
9
- > **new Bip32Path**(`initialPath`?): [`Bip32Path`](Bip32Path.md)
9
+ > **new Bip32Path**(`initialPath?`): `Bip32Path`
10
10
 
11
11
  Create a new instance of Bip32Path.
12
12
 
13
13
  #### Parameters
14
14
 
15
- **initialPath?**: `string`
15
+ ##### initialPath?
16
+
17
+ `string`
16
18
 
17
19
  Initial path to create.
18
20
 
19
21
  #### Returns
20
22
 
21
- [`Bip32Path`](Bip32Path.md)
23
+ `Bip32Path`
22
24
 
23
25
  ## Methods
24
26
 
25
27
  ### fromPath()
26
28
 
27
- > `static` **fromPath**(`bip32Path`): [`Bip32Path`](Bip32Path.md)
29
+ > `static` **fromPath**(`bip32Path`): `Bip32Path`
28
30
 
29
31
  Construct a new path by cloning an existing one.
30
32
 
31
33
  #### Parameters
32
34
 
33
- **bip32Path**: [`Bip32Path`](Bip32Path.md)
35
+ ##### bip32Path
36
+
37
+ `Bip32Path`
34
38
 
35
39
  The path to clone.
36
40
 
37
41
  #### Returns
38
42
 
39
- [`Bip32Path`](Bip32Path.md)
43
+ `Bip32Path`
40
44
 
41
45
  A new instance of Bip32Path.
42
46
 
@@ -64,7 +68,9 @@ Push a new index on to the path.
64
68
 
65
69
  #### Parameters
66
70
 
67
- **index**: `number`
71
+ ##### index
72
+
73
+ `number`
68
74
 
69
75
  The index to add to the path.
70
76
 
@@ -82,7 +88,9 @@ Push a new hardened index on to the path.
82
88
 
83
89
  #### Parameters
84
90
 
85
- **index**: `number`
91
+ ##### index
92
+
93
+ `number`
86
94
 
87
95
  The index to add to the path.
88
96