@twin.org/crypto 0.0.1-next.2 → 0.0.1-next.20

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 (33) hide show
  1. package/dist/cjs/index.cjs +200 -0
  2. package/dist/esm/index.mjs +199 -1
  3. package/dist/types/hashes/blake3.d.ts +44 -0
  4. package/dist/types/hashes/sha3.d.ts +61 -0
  5. package/dist/types/index.d.ts +2 -0
  6. package/docs/changelog.md +1 -1
  7. package/docs/reference/classes/Bech32.md +12 -4
  8. package/docs/reference/classes/Bip32Path.md +12 -4
  9. package/docs/reference/classes/Bip39.md +24 -8
  10. package/docs/reference/classes/Bip44.md +54 -18
  11. package/docs/reference/classes/Blake2b.md +27 -9
  12. package/docs/reference/classes/Blake3.md +137 -0
  13. package/docs/reference/classes/ChaCha20Poly1305.md +15 -5
  14. package/docs/reference/classes/Ed25519.md +18 -6
  15. package/docs/reference/classes/HmacSha1.md +12 -4
  16. package/docs/reference/classes/HmacSha256.md +21 -7
  17. package/docs/reference/classes/HmacSha512.md +33 -11
  18. package/docs/reference/classes/Hotp.md +6 -2
  19. package/docs/reference/classes/PasswordGenerator.md +3 -1
  20. package/docs/reference/classes/PasswordValidator.md +19 -7
  21. package/docs/reference/classes/Pbkdf2.md +24 -8
  22. package/docs/reference/classes/Secp256k1.md +18 -6
  23. package/docs/reference/classes/Sha1.md +6 -2
  24. package/docs/reference/classes/Sha256.md +12 -4
  25. package/docs/reference/classes/Sha3.md +179 -0
  26. package/docs/reference/classes/Sha512.md +18 -6
  27. package/docs/reference/classes/Slip0010.md +24 -8
  28. package/docs/reference/classes/Totp.md +39 -13
  29. package/docs/reference/classes/X25519.md +6 -2
  30. package/docs/reference/classes/Zip215.md +9 -3
  31. package/docs/reference/index.md +2 -0
  32. package/locales/en.json +3 -6
  33. package/package.json +10 -36
@@ -8,11 +8,13 @@ var blake2b = require('@noble/hashes/blake2b');
8
8
  var bip32 = require('@scure/bip32');
9
9
  var slip10_js = require('micro-key-producer/slip10.js');
10
10
  var chacha = require('@noble/ciphers/chacha');
11
+ var blake3 = require('@noble/hashes/blake3');
11
12
  var hmac = require('@noble/hashes/hmac');
12
13
  var sha1 = require('@noble/hashes/sha1');
13
14
  var sha256 = require('@noble/hashes/sha256');
14
15
  var sha512 = require('@noble/hashes/sha512');
15
16
  var pbkdf2 = require('@noble/hashes/pbkdf2');
17
+ var sha3 = require('@noble/hashes/sha3');
16
18
  var bip39 = require('@scure/bip39');
17
19
  var english = require('@scure/bip39/wordlists/english');
18
20
  var otp = require('micro-key-producer/otp.js');
@@ -727,6 +729,81 @@ class Zip215 {
727
729
  }
728
730
  }
729
731
 
732
+ // Copyright 2024 IOTA Stiftung.
733
+ // SPDX-License-Identifier: Apache-2.0.
734
+ /**
735
+ * Class to help with Blake3 Signature scheme.
736
+ */
737
+ class Blake3 {
738
+ /**
739
+ * Blake3 256.
740
+ */
741
+ static SIZE_256 = 32;
742
+ /**
743
+ * Blake3 512.
744
+ */
745
+ static SIZE_512 = 64;
746
+ /**
747
+ * Runtime name for the class.
748
+ * @internal
749
+ */
750
+ static _CLASS_NAME = "Blake3";
751
+ /**
752
+ * The instance of the hash.
753
+ * @internal
754
+ */
755
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
756
+ _instance;
757
+ /**
758
+ * Create a new instance of Blake3.
759
+ * @param outputLength The output length.
760
+ * @param key Optional key for the hash.
761
+ */
762
+ constructor(outputLength, key) {
763
+ this._instance = blake3.blake3.create({
764
+ dkLen: outputLength,
765
+ key
766
+ });
767
+ }
768
+ /**
769
+ * Perform Sum 256 on the block.
770
+ * @param block The block to operate on.
771
+ * @param key Optional key for the hash.
772
+ * @returns The sum 256 of the block.
773
+ */
774
+ static sum256(block, key) {
775
+ core.Guards.uint8Array(Blake3._CLASS_NAME, "block", block);
776
+ return new Blake3(Blake3.SIZE_256, key).update(block).digest();
777
+ }
778
+ /**
779
+ * Perform Sum 512 on the block.
780
+ * @param block The block to operate on.
781
+ * @param key Optional key for the hash.
782
+ * @returns The sum 512 of the block.
783
+ */
784
+ static sum512(block, key) {
785
+ core.Guards.uint8Array(Blake3._CLASS_NAME, "block", block);
786
+ return new Blake3(Blake3.SIZE_512, key).update(block).digest();
787
+ }
788
+ /**
789
+ * Update the hash with the block.
790
+ * @param block The block to update the hash with.
791
+ * @returns The instance for chaining.
792
+ */
793
+ update(block) {
794
+ core.Guards.uint8Array(Blake3._CLASS_NAME, "block", block);
795
+ this._instance.update(block);
796
+ return this;
797
+ }
798
+ /**
799
+ * Get the digest for the hash.
800
+ * @returns The instance for chaining.
801
+ */
802
+ digest() {
803
+ return this._instance.digest();
804
+ }
805
+ }
806
+
730
807
  // Copyright 2024 IOTA Stiftung.
731
808
  // SPDX-License-Identifier: Apache-2.0.
732
809
  /**
@@ -1160,6 +1237,127 @@ class Sha256 {
1160
1237
  }
1161
1238
  }
1162
1239
 
1240
+ // Copyright 2024 IOTA Stiftung.
1241
+ // SPDX-License-Identifier: Apache-2.0.
1242
+ // eslint-disable-next-line camelcase
1243
+ /**
1244
+ * Perform a SHA-3 hash on the block.
1245
+ */
1246
+ class Sha3 {
1247
+ /**
1248
+ * Sha3 224.
1249
+ */
1250
+ static SIZE_224 = 224;
1251
+ /**
1252
+ * Sha3 256.
1253
+ */
1254
+ static SIZE_256 = 256;
1255
+ /**
1256
+ * Sha3 384.
1257
+ */
1258
+ static SIZE_384 = 384;
1259
+ /**
1260
+ * Sha3 512.
1261
+ */
1262
+ static SIZE_512 = 512;
1263
+ /**
1264
+ * Runtime name for the class.
1265
+ * @internal
1266
+ */
1267
+ static _CLASS_NAME = "Sha3";
1268
+ /**
1269
+ * The instance of the hash.
1270
+ * @internal
1271
+ */
1272
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1273
+ _instance;
1274
+ /**
1275
+ * Create a new instance of Sha3.
1276
+ * @param bits The number of bits.
1277
+ */
1278
+ constructor(bits = Sha3.SIZE_256) {
1279
+ if (bits !== Sha3.SIZE_224 &&
1280
+ bits !== Sha3.SIZE_256 &&
1281
+ bits !== Sha3.SIZE_384 &&
1282
+ bits !== Sha3.SIZE_512) {
1283
+ throw new core.GeneralError(Sha3._CLASS_NAME, "bitSize", { bitSize: bits });
1284
+ }
1285
+ if (bits === Sha3.SIZE_224) {
1286
+ // eslint-disable-next-line camelcase
1287
+ this._instance = sha3.sha3_224.create();
1288
+ }
1289
+ else if (bits === Sha3.SIZE_256) {
1290
+ // eslint-disable-next-line camelcase
1291
+ this._instance = sha3.sha3_256.create();
1292
+ }
1293
+ else if (bits === Sha3.SIZE_384) {
1294
+ // eslint-disable-next-line camelcase
1295
+ this._instance = sha3.sha3_384.create();
1296
+ }
1297
+ else {
1298
+ // eslint-disable-next-line camelcase
1299
+ this._instance = sha3.sha3_512.create();
1300
+ }
1301
+ }
1302
+ /**
1303
+ * Perform Sum 256 on the block.
1304
+ * @param block The block to operate on.
1305
+ * @returns The sum 256 of the block.
1306
+ */
1307
+ static sum256(block) {
1308
+ const b2b = new Sha3(Sha3.SIZE_256);
1309
+ b2b.update(block);
1310
+ return b2b.digest();
1311
+ }
1312
+ /**
1313
+ * Perform Sum 224 on the block.
1314
+ * @param block The block to operate on.
1315
+ * @returns The sum 224 of the block.
1316
+ */
1317
+ static sum224(block) {
1318
+ const b2b = new Sha3(Sha3.SIZE_224);
1319
+ b2b.update(block);
1320
+ return b2b.digest();
1321
+ }
1322
+ /**
1323
+ * Perform Sum 384 on the block.
1324
+ * @param block The block to operate on.
1325
+ * @returns The sum 384 of the block.
1326
+ */
1327
+ static sum384(block) {
1328
+ const b2b = new Sha3(Sha3.SIZE_384);
1329
+ b2b.update(block);
1330
+ return b2b.digest();
1331
+ }
1332
+ /**
1333
+ * Perform Sum 512 on the block.
1334
+ * @param block The block to operate on.
1335
+ * @returns The sum 512 of the block.
1336
+ */
1337
+ static sum512(block) {
1338
+ const b2b = new Sha3(Sha3.SIZE_512);
1339
+ b2b.update(block);
1340
+ return b2b.digest();
1341
+ }
1342
+ /**
1343
+ * Update the hash with the block.
1344
+ * @param block The block to update the hash with.
1345
+ * @returns The instance for chaining.
1346
+ */
1347
+ update(block) {
1348
+ core.Guards.uint8Array(Sha3._CLASS_NAME, "block", block);
1349
+ this._instance.update(block);
1350
+ return this;
1351
+ }
1352
+ /**
1353
+ * Get the digest for the hash.
1354
+ * @returns The instance for chaining.
1355
+ */
1356
+ digest() {
1357
+ return this._instance.digest();
1358
+ }
1359
+ }
1360
+
1163
1361
  // Copyright 2024 IOTA Stiftung.
1164
1362
  // SPDX-License-Identifier: Apache-2.0.
1165
1363
  /* eslint-disable camelcase */
@@ -1552,6 +1750,7 @@ exports.Bip32Path = Bip32Path;
1552
1750
  exports.Bip39 = Bip39;
1553
1751
  exports.Bip44 = Bip44;
1554
1752
  exports.Blake2b = Blake2b;
1753
+ exports.Blake3 = Blake3;
1555
1754
  exports.ChaCha20Poly1305 = ChaCha20Poly1305;
1556
1755
  exports.Ed25519 = Ed25519;
1557
1756
  exports.HmacSha1 = HmacSha1;
@@ -1565,6 +1764,7 @@ exports.Pbkdf2 = Pbkdf2;
1565
1764
  exports.Secp256k1 = Secp256k1;
1566
1765
  exports.Sha1 = Sha1;
1567
1766
  exports.Sha256 = Sha256;
1767
+ exports.Sha3 = Sha3;
1568
1768
  exports.Sha512 = Sha512;
1569
1769
  exports.Slip0010 = Slip0010;
1570
1770
  exports.Totp = Totp;
@@ -6,11 +6,13 @@ import { blake2b } from '@noble/hashes/blake2b';
6
6
  import { HDKey as HDKey$1 } from '@scure/bip32';
7
7
  import { HDKey } from 'micro-key-producer/slip10.js';
8
8
  import { chacha20poly1305 } from '@noble/ciphers/chacha';
9
+ import { blake3 } from '@noble/hashes/blake3';
9
10
  import { hmac } from '@noble/hashes/hmac';
10
11
  import { sha1 } from '@noble/hashes/sha1';
11
12
  import { sha256, sha224 } from '@noble/hashes/sha256';
12
13
  import { sha512_224, sha512_256, sha384, sha512 } from '@noble/hashes/sha512';
13
14
  import { pbkdf2 } from '@noble/hashes/pbkdf2';
15
+ import { sha3_224, sha3_256, sha3_384, sha3_512 } from '@noble/hashes/sha3';
14
16
  import * as bip39 from '@scure/bip39';
15
17
  import { wordlist } from '@scure/bip39/wordlists/english';
16
18
  import * as otp from 'micro-key-producer/otp.js';
@@ -705,6 +707,81 @@ class Zip215 {
705
707
  }
706
708
  }
707
709
 
710
+ // Copyright 2024 IOTA Stiftung.
711
+ // SPDX-License-Identifier: Apache-2.0.
712
+ /**
713
+ * Class to help with Blake3 Signature scheme.
714
+ */
715
+ class Blake3 {
716
+ /**
717
+ * Blake3 256.
718
+ */
719
+ static SIZE_256 = 32;
720
+ /**
721
+ * Blake3 512.
722
+ */
723
+ static SIZE_512 = 64;
724
+ /**
725
+ * Runtime name for the class.
726
+ * @internal
727
+ */
728
+ static _CLASS_NAME = "Blake3";
729
+ /**
730
+ * The instance of the hash.
731
+ * @internal
732
+ */
733
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
734
+ _instance;
735
+ /**
736
+ * Create a new instance of Blake3.
737
+ * @param outputLength The output length.
738
+ * @param key Optional key for the hash.
739
+ */
740
+ constructor(outputLength, key) {
741
+ this._instance = blake3.create({
742
+ dkLen: outputLength,
743
+ key
744
+ });
745
+ }
746
+ /**
747
+ * Perform Sum 256 on the block.
748
+ * @param block The block to operate on.
749
+ * @param key Optional key for the hash.
750
+ * @returns The sum 256 of the block.
751
+ */
752
+ static sum256(block, key) {
753
+ Guards.uint8Array(Blake3._CLASS_NAME, "block", block);
754
+ return new Blake3(Blake3.SIZE_256, key).update(block).digest();
755
+ }
756
+ /**
757
+ * Perform Sum 512 on the block.
758
+ * @param block The block to operate on.
759
+ * @param key Optional key for the hash.
760
+ * @returns The sum 512 of the block.
761
+ */
762
+ static sum512(block, key) {
763
+ Guards.uint8Array(Blake3._CLASS_NAME, "block", block);
764
+ return new Blake3(Blake3.SIZE_512, key).update(block).digest();
765
+ }
766
+ /**
767
+ * Update the hash with the block.
768
+ * @param block The block to update the hash with.
769
+ * @returns The instance for chaining.
770
+ */
771
+ update(block) {
772
+ Guards.uint8Array(Blake3._CLASS_NAME, "block", block);
773
+ this._instance.update(block);
774
+ return this;
775
+ }
776
+ /**
777
+ * Get the digest for the hash.
778
+ * @returns The instance for chaining.
779
+ */
780
+ digest() {
781
+ return this._instance.digest();
782
+ }
783
+ }
784
+
708
785
  // Copyright 2024 IOTA Stiftung.
709
786
  // SPDX-License-Identifier: Apache-2.0.
710
787
  /**
@@ -1138,6 +1215,127 @@ class Sha256 {
1138
1215
  }
1139
1216
  }
1140
1217
 
1218
+ // Copyright 2024 IOTA Stiftung.
1219
+ // SPDX-License-Identifier: Apache-2.0.
1220
+ // eslint-disable-next-line camelcase
1221
+ /**
1222
+ * Perform a SHA-3 hash on the block.
1223
+ */
1224
+ class Sha3 {
1225
+ /**
1226
+ * Sha3 224.
1227
+ */
1228
+ static SIZE_224 = 224;
1229
+ /**
1230
+ * Sha3 256.
1231
+ */
1232
+ static SIZE_256 = 256;
1233
+ /**
1234
+ * Sha3 384.
1235
+ */
1236
+ static SIZE_384 = 384;
1237
+ /**
1238
+ * Sha3 512.
1239
+ */
1240
+ static SIZE_512 = 512;
1241
+ /**
1242
+ * Runtime name for the class.
1243
+ * @internal
1244
+ */
1245
+ static _CLASS_NAME = "Sha3";
1246
+ /**
1247
+ * The instance of the hash.
1248
+ * @internal
1249
+ */
1250
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1251
+ _instance;
1252
+ /**
1253
+ * Create a new instance of Sha3.
1254
+ * @param bits The number of bits.
1255
+ */
1256
+ constructor(bits = Sha3.SIZE_256) {
1257
+ if (bits !== Sha3.SIZE_224 &&
1258
+ bits !== Sha3.SIZE_256 &&
1259
+ bits !== Sha3.SIZE_384 &&
1260
+ bits !== Sha3.SIZE_512) {
1261
+ throw new GeneralError(Sha3._CLASS_NAME, "bitSize", { bitSize: bits });
1262
+ }
1263
+ if (bits === Sha3.SIZE_224) {
1264
+ // eslint-disable-next-line camelcase
1265
+ this._instance = sha3_224.create();
1266
+ }
1267
+ else if (bits === Sha3.SIZE_256) {
1268
+ // eslint-disable-next-line camelcase
1269
+ this._instance = sha3_256.create();
1270
+ }
1271
+ else if (bits === Sha3.SIZE_384) {
1272
+ // eslint-disable-next-line camelcase
1273
+ this._instance = sha3_384.create();
1274
+ }
1275
+ else {
1276
+ // eslint-disable-next-line camelcase
1277
+ this._instance = sha3_512.create();
1278
+ }
1279
+ }
1280
+ /**
1281
+ * Perform Sum 256 on the block.
1282
+ * @param block The block to operate on.
1283
+ * @returns The sum 256 of the block.
1284
+ */
1285
+ static sum256(block) {
1286
+ const b2b = new Sha3(Sha3.SIZE_256);
1287
+ b2b.update(block);
1288
+ return b2b.digest();
1289
+ }
1290
+ /**
1291
+ * Perform Sum 224 on the block.
1292
+ * @param block The block to operate on.
1293
+ * @returns The sum 224 of the block.
1294
+ */
1295
+ static sum224(block) {
1296
+ const b2b = new Sha3(Sha3.SIZE_224);
1297
+ b2b.update(block);
1298
+ return b2b.digest();
1299
+ }
1300
+ /**
1301
+ * Perform Sum 384 on the block.
1302
+ * @param block The block to operate on.
1303
+ * @returns The sum 384 of the block.
1304
+ */
1305
+ static sum384(block) {
1306
+ const b2b = new Sha3(Sha3.SIZE_384);
1307
+ b2b.update(block);
1308
+ return b2b.digest();
1309
+ }
1310
+ /**
1311
+ * Perform Sum 512 on the block.
1312
+ * @param block The block to operate on.
1313
+ * @returns The sum 512 of the block.
1314
+ */
1315
+ static sum512(block) {
1316
+ const b2b = new Sha3(Sha3.SIZE_512);
1317
+ b2b.update(block);
1318
+ return b2b.digest();
1319
+ }
1320
+ /**
1321
+ * Update the hash with the block.
1322
+ * @param block The block to update the hash with.
1323
+ * @returns The instance for chaining.
1324
+ */
1325
+ update(block) {
1326
+ Guards.uint8Array(Sha3._CLASS_NAME, "block", block);
1327
+ this._instance.update(block);
1328
+ return this;
1329
+ }
1330
+ /**
1331
+ * Get the digest for the hash.
1332
+ * @returns The instance for chaining.
1333
+ */
1334
+ digest() {
1335
+ return this._instance.digest();
1336
+ }
1337
+ }
1338
+
1141
1339
  // Copyright 2024 IOTA Stiftung.
1142
1340
  // SPDX-License-Identifier: Apache-2.0.
1143
1341
  /* eslint-disable camelcase */
@@ -1525,4 +1723,4 @@ class PasswordValidator {
1525
1723
  }
1526
1724
  }
1527
1725
 
1528
- export { Bech32, Bip32Path, Bip39, Bip44, Blake2b, ChaCha20Poly1305, Ed25519, HmacSha1, HmacSha256, HmacSha512, Hotp, KeyType, PasswordGenerator, PasswordValidator, Pbkdf2, Secp256k1, Sha1, Sha256, Sha512, Slip0010, Totp, X25519, Zip215 };
1726
+ export { Bech32, Bip32Path, Bip39, Bip44, Blake2b, Blake3, ChaCha20Poly1305, Ed25519, HmacSha1, HmacSha256, HmacSha512, Hotp, KeyType, PasswordGenerator, PasswordValidator, Pbkdf2, Secp256k1, Sha1, Sha256, Sha3, Sha512, Slip0010, Totp, X25519, Zip215 };
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Class to help with Blake3 Signature scheme.
3
+ */
4
+ export declare class Blake3 {
5
+ /**
6
+ * Blake3 256.
7
+ */
8
+ static SIZE_256: number;
9
+ /**
10
+ * Blake3 512.
11
+ */
12
+ static SIZE_512: number;
13
+ /**
14
+ * Create a new instance of Blake3.
15
+ * @param outputLength The output length.
16
+ * @param key Optional key for the hash.
17
+ */
18
+ constructor(outputLength: number, key?: Uint8Array);
19
+ /**
20
+ * Perform Sum 256 on the block.
21
+ * @param block The block to operate on.
22
+ * @param key Optional key for the hash.
23
+ * @returns The sum 256 of the block.
24
+ */
25
+ static sum256(block: Uint8Array, key?: Uint8Array): Uint8Array;
26
+ /**
27
+ * Perform Sum 512 on the block.
28
+ * @param block The block to operate on.
29
+ * @param key Optional key for the hash.
30
+ * @returns The sum 512 of the block.
31
+ */
32
+ static sum512(block: Uint8Array, key?: Uint8Array): Uint8Array;
33
+ /**
34
+ * Update the hash with the block.
35
+ * @param block The block to update the hash with.
36
+ * @returns The instance for chaining.
37
+ */
38
+ update(block: Uint8Array): Blake3;
39
+ /**
40
+ * Get the digest for the hash.
41
+ * @returns The instance for chaining.
42
+ */
43
+ digest(): Uint8Array;
44
+ }
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Perform a SHA-3 hash on the block.
3
+ */
4
+ export declare class Sha3 {
5
+ /**
6
+ * Sha3 224.
7
+ */
8
+ static readonly SIZE_224: number;
9
+ /**
10
+ * Sha3 256.
11
+ */
12
+ static readonly SIZE_256: number;
13
+ /**
14
+ * Sha3 384.
15
+ */
16
+ static readonly SIZE_384: number;
17
+ /**
18
+ * Sha3 512.
19
+ */
20
+ static readonly SIZE_512: number;
21
+ /**
22
+ * Create a new instance of Sha3.
23
+ * @param bits The number of bits.
24
+ */
25
+ constructor(bits?: number);
26
+ /**
27
+ * Perform Sum 256 on the block.
28
+ * @param block The block to operate on.
29
+ * @returns The sum 256 of the block.
30
+ */
31
+ static sum256(block: Uint8Array): Uint8Array;
32
+ /**
33
+ * Perform Sum 224 on the block.
34
+ * @param block The block to operate on.
35
+ * @returns The sum 224 of the block.
36
+ */
37
+ static sum224(block: Uint8Array): Uint8Array;
38
+ /**
39
+ * Perform Sum 384 on the block.
40
+ * @param block The block to operate on.
41
+ * @returns The sum 384 of the block.
42
+ */
43
+ static sum384(block: Uint8Array): Uint8Array;
44
+ /**
45
+ * Perform Sum 512 on the block.
46
+ * @param block The block to operate on.
47
+ * @returns The sum 512 of the block.
48
+ */
49
+ static sum512(block: Uint8Array): Uint8Array;
50
+ /**
51
+ * Update the hash with the block.
52
+ * @param block The block to update the hash with.
53
+ * @returns The instance for chaining.
54
+ */
55
+ update(block: Uint8Array): Sha3;
56
+ /**
57
+ * Get the digest for the hash.
58
+ * @returns The instance for chaining.
59
+ */
60
+ digest(): Uint8Array;
61
+ }
@@ -6,12 +6,14 @@ export * from "./curves/secp256k1";
6
6
  export * from "./curves/x25519";
7
7
  export * from "./curves/zip215";
8
8
  export * from "./hashes/blake2b";
9
+ export * from "./hashes/blake3";
9
10
  export * from "./hashes/hmacSha1";
10
11
  export * from "./hashes/hmacSha256";
11
12
  export * from "./hashes/hmacSha512";
12
13
  export * from "./hashes/pbkdf2";
13
14
  export * from "./hashes/sha1";
14
15
  export * from "./hashes/sha256";
16
+ export * from "./hashes/sha3";
15
17
  export * from "./hashes/sha512";
16
18
  export * from "./keys/bip32Path";
17
19
  export * from "./keys/bip39";
package/docs/changelog.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # @twin.org/crypto - Changelog
2
2
 
3
- ## 0.0.1-next.1
3
+ ## 0.0.1-next.20
4
4
 
5
5
  - Added: Bip44
@@ -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
 
@@ -12,7 +12,9 @@ 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
 
@@ -30,7 +32,9 @@ 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`](Bip32Path.md)
34
38
 
35
39
  The path to clone.
36
40
 
@@ -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