@twin.org/crypto 0.0.1-next.9 → 0.0.2-next.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.
- package/dist/cjs/index.cjs +304 -1
- package/dist/esm/index.mjs +304 -3
- package/dist/types/address/bip44.d.ts +15 -0
- package/dist/types/ciphers/rsa.d.ts +63 -0
- package/dist/types/curves/ed25519.d.ts +12 -0
- package/dist/types/helpers/pemHelper.d.ts +19 -0
- package/dist/types/index.d.ts +2 -0
- package/docs/changelog.md +400 -1
- package/docs/reference/classes/Bech32.md +15 -7
- package/docs/reference/classes/Bip32Path.md +17 -9
- package/docs/reference/classes/Bip39.md +28 -12
- package/docs/reference/classes/Bip44.md +121 -21
- package/docs/reference/classes/Blake2b.md +35 -17
- package/docs/reference/classes/Blake3.md +28 -14
- package/docs/reference/classes/ChaCha20Poly1305.md +18 -8
- package/docs/reference/classes/Ed25519.md +65 -9
- package/docs/reference/classes/HmacSha1.md +17 -9
- package/docs/reference/classes/HmacSha256.md +26 -12
- package/docs/reference/classes/HmacSha512.md +38 -16
- package/docs/reference/classes/Hotp.md +9 -5
- package/docs/reference/classes/PasswordGenerator.md +6 -4
- package/docs/reference/classes/PasswordValidator.md +23 -11
- package/docs/reference/classes/Pbkdf2.md +27 -11
- package/docs/reference/classes/PemHelper.md +69 -0
- package/docs/reference/classes/RSA.md +213 -0
- package/docs/reference/classes/Secp256k1.md +21 -9
- package/docs/reference/classes/Sha1.md +11 -7
- package/docs/reference/classes/Sha256.md +17 -9
- package/docs/reference/classes/Sha3.md +23 -11
- package/docs/reference/classes/Sha512.md +23 -11
- package/docs/reference/classes/Slip0010.md +27 -11
- package/docs/reference/classes/Totp.md +42 -16
- package/docs/reference/classes/X25519.md +9 -5
- package/docs/reference/classes/Zip215.md +12 -6
- package/docs/reference/index.md +2 -0
- package/docs/reference/type-aliases/KeyType.md +1 -1
- package/locales/en.json +4 -0
- package/package.json +13 -13
|
@@ -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.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Implementation of the RSA cipher.
|
|
3
|
+
*/
|
|
4
|
+
export declare class RSA {
|
|
5
|
+
/**
|
|
6
|
+
* Create a new instance of RSA.
|
|
7
|
+
* @param publicKey The public key for encryption (DER format as Uint8Array).
|
|
8
|
+
* @param privateKey The private key for decryption (DER format as Uint8Array).
|
|
9
|
+
*/
|
|
10
|
+
constructor(publicKey: Uint8Array, privateKey?: Uint8Array);
|
|
11
|
+
/**
|
|
12
|
+
* Generate a new RSA key pair in PKCS8 format.
|
|
13
|
+
* @param modulusLength The key size in bits (default: 2048).
|
|
14
|
+
* @returns The public and private keys as Uint8Array.
|
|
15
|
+
*/
|
|
16
|
+
static generateKeyPair(modulusLength?: number): {
|
|
17
|
+
publicKey: Uint8Array;
|
|
18
|
+
privateKey: Uint8Array;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Convert a PKCS1 key to a PKCS8 key.
|
|
22
|
+
* @param pkcs1Key The PKCS1 key as Uint8Array.
|
|
23
|
+
* @returns The PKCS8 key as Uint8Array.
|
|
24
|
+
*/
|
|
25
|
+
static convertPkcs1ToPkcs8(pkcs1Key: Uint8Array): Uint8Array;
|
|
26
|
+
/**
|
|
27
|
+
* Break the private key down in to its components.
|
|
28
|
+
* @param pkcs8Key The PKCS8 key as Uint8Array.
|
|
29
|
+
* @returns The key components.
|
|
30
|
+
*/
|
|
31
|
+
static getPrivateKeyComponents(pkcs8Key: Uint8Array): {
|
|
32
|
+
n: bigint;
|
|
33
|
+
e: bigint;
|
|
34
|
+
d: bigint;
|
|
35
|
+
p: bigint;
|
|
36
|
+
q: bigint;
|
|
37
|
+
dp: bigint;
|
|
38
|
+
dq: bigint;
|
|
39
|
+
qi: bigint;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Break the public key down in to its components.
|
|
43
|
+
* @param spkiKey The SPKI key as Uint8Array.
|
|
44
|
+
* @returns The key components.
|
|
45
|
+
*/
|
|
46
|
+
static getPublicKeyComponents(spkiKey: Uint8Array): {
|
|
47
|
+
n: bigint;
|
|
48
|
+
e: bigint;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Encrypt the data.
|
|
52
|
+
* @param data The data to encrypt.
|
|
53
|
+
* @returns The data encrypted.
|
|
54
|
+
*/
|
|
55
|
+
encrypt(data: Uint8Array): Uint8Array;
|
|
56
|
+
/**
|
|
57
|
+
* Decrypt the data.
|
|
58
|
+
* @param data The data to decrypt.
|
|
59
|
+
* @returns The data decrypted.
|
|
60
|
+
* @throws GeneralError If no private key is provided.
|
|
61
|
+
*/
|
|
62
|
+
decrypt(data: Uint8Array): Uint8Array;
|
|
63
|
+
}
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper class for working with PEM (Privacy-Enhanced Mail) formatted data.
|
|
3
|
+
*/
|
|
4
|
+
export declare class PemHelper {
|
|
5
|
+
/**
|
|
6
|
+
* Strip the PEM content of its headers, footers, and newlines.
|
|
7
|
+
* @param pemContent The PEM content to strip.
|
|
8
|
+
* @returns The stripped PEM content in bas64 format.
|
|
9
|
+
*/
|
|
10
|
+
static stripPemMarkers(pemContent: string): string;
|
|
11
|
+
/**
|
|
12
|
+
* Format the PEM content to have a specific line length.
|
|
13
|
+
* @param marker The marker for the PEM content, e.g. RSA PRIVATE KEY
|
|
14
|
+
* @param base64Content The base64 content to format.
|
|
15
|
+
* @param lineLength The length of each line in the PEM content, default is 64 characters.
|
|
16
|
+
* @returns The formatted PEM content.
|
|
17
|
+
*/
|
|
18
|
+
static formatPem(marker: string, base64Content: string, lineLength?: number): string;
|
|
19
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./address/bech32";
|
|
2
2
|
export * from "./address/bip44";
|
|
3
3
|
export * from "./ciphers/chaCha20Poly1305";
|
|
4
|
+
export * from "./ciphers/rsa";
|
|
4
5
|
export * from "./curves/ed25519";
|
|
5
6
|
export * from "./curves/secp256k1";
|
|
6
7
|
export * from "./curves/x25519";
|
|
@@ -15,6 +16,7 @@ export * from "./hashes/sha1";
|
|
|
15
16
|
export * from "./hashes/sha256";
|
|
16
17
|
export * from "./hashes/sha3";
|
|
17
18
|
export * from "./hashes/sha512";
|
|
19
|
+
export * from "./helpers/pemHelper";
|
|
18
20
|
export * from "./keys/bip32Path";
|
|
19
21
|
export * from "./keys/bip39";
|
|
20
22
|
export * from "./keys/slip0010";
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,404 @@
|
|
|
1
1
|
# @twin.org/crypto - Changelog
|
|
2
2
|
|
|
3
|
-
## 0.0.
|
|
3
|
+
## [0.0.2-next.3](https://github.com/twinfoundation/framework/compare/crypto-v0.0.2-next.2...crypto-v0.0.2-next.3) (2025-08-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
9
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
10
|
+
* add RSA support for public key components ([7126259](https://github.com/twinfoundation/framework/commit/7126259103b758c291e52a8a03818eb822d1aad1))
|
|
11
|
+
* change method accessibility ([c1b77fc](https://github.com/twinfoundation/framework/commit/c1b77fcfb61c092a01c97aebb2fe2dc2bbaa221b))
|
|
12
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
13
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
14
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Dependencies
|
|
18
|
+
|
|
19
|
+
* The following workspace dependencies were updated
|
|
20
|
+
* dependencies
|
|
21
|
+
* @twin.org/core bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
22
|
+
* @twin.org/nameof bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
23
|
+
* devDependencies
|
|
24
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
25
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
26
|
+
|
|
27
|
+
## [0.0.2-next.2](https://github.com/twinfoundation/framework/compare/crypto-v0.0.2-next.1...crypto-v0.0.2-next.2) (2025-08-06)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
|
|
32
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
33
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
34
|
+
* change method accessibility ([c1b77fc](https://github.com/twinfoundation/framework/commit/c1b77fcfb61c092a01c97aebb2fe2dc2bbaa221b))
|
|
35
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
36
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
37
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
### Dependencies
|
|
41
|
+
|
|
42
|
+
* The following workspace dependencies were updated
|
|
43
|
+
* dependencies
|
|
44
|
+
* @twin.org/core bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
45
|
+
* @twin.org/nameof bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
46
|
+
* devDependencies
|
|
47
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
48
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
49
|
+
|
|
50
|
+
## [0.0.2-next.1](https://github.com/twinfoundation/framework/compare/crypto-v0.0.2-next.0...crypto-v0.0.2-next.1) (2025-08-06)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Features
|
|
54
|
+
|
|
55
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
56
|
+
* add rsa cipher support ([7af6cc6](https://github.com/twinfoundation/framework/commit/7af6cc67512d3363bd4a2f2e87bd7733c2800147))
|
|
57
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
58
|
+
* update dependencies ([f3bd015](https://github.com/twinfoundation/framework/commit/f3bd015efd169196b7e0335f5cab876ba6ca1d75))
|
|
59
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Dependencies
|
|
63
|
+
|
|
64
|
+
* The following workspace dependencies were updated
|
|
65
|
+
* dependencies
|
|
66
|
+
* @twin.org/core bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
67
|
+
* @twin.org/nameof bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
68
|
+
* devDependencies
|
|
69
|
+
* @twin.org/nameof-transformer bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
70
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
71
|
+
|
|
72
|
+
## 0.0.1 (2025-07-03)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Features
|
|
76
|
+
|
|
77
|
+
* release to production ([829d53d](https://github.com/twinfoundation/framework/commit/829d53d3953b1e1b40b0243c04cfdfd3842aac7b))
|
|
78
|
+
* release to production ([5cf3a76](https://github.com/twinfoundation/framework/commit/5cf3a76a09eff2e6414d0cba846c7c37400a11d6))
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Dependencies
|
|
82
|
+
|
|
83
|
+
* The following workspace dependencies were updated
|
|
84
|
+
* dependencies
|
|
85
|
+
* @twin.org/core bumped from ^0.0.0 to ^0.0.1
|
|
86
|
+
* @twin.org/nameof bumped from ^0.0.0 to ^0.0.1
|
|
87
|
+
* devDependencies
|
|
88
|
+
* @twin.org/nameof-transformer bumped from ^0.0.0 to ^0.0.1
|
|
89
|
+
* @twin.org/nameof-vitest-plugin bumped from ^0.0.0 to ^0.0.1
|
|
90
|
+
|
|
91
|
+
## [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)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
### Features
|
|
95
|
+
|
|
96
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
97
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
98
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Dependencies
|
|
102
|
+
|
|
103
|
+
* The following workspace dependencies were updated
|
|
104
|
+
* dependencies
|
|
105
|
+
* @twin.org/core bumped from 0.0.1-next.69 to 0.0.1-next.70
|
|
106
|
+
* @twin.org/nameof bumped from 0.0.1-next.69 to 0.0.1-next.70
|
|
107
|
+
* devDependencies
|
|
108
|
+
* @twin.org/nameof-transformer bumped from 0.0.1-next.69 to 0.0.1-next.70
|
|
109
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.69 to 0.0.1-next.70
|
|
110
|
+
|
|
111
|
+
## [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)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
### Features
|
|
115
|
+
|
|
116
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
117
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
118
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
### Dependencies
|
|
122
|
+
|
|
123
|
+
* The following workspace dependencies were updated
|
|
124
|
+
* dependencies
|
|
125
|
+
* @twin.org/core bumped from 0.0.1-next.68 to 0.0.1-next.69
|
|
126
|
+
* @twin.org/nameof bumped from 0.0.1-next.68 to 0.0.1-next.69
|
|
127
|
+
* devDependencies
|
|
128
|
+
* @twin.org/nameof-transformer bumped from 0.0.1-next.68 to 0.0.1-next.69
|
|
129
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.68 to 0.0.1-next.69
|
|
130
|
+
|
|
131
|
+
## [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)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
### Features
|
|
135
|
+
|
|
136
|
+
* relocate core packages from tools ([bcab8f3](https://github.com/twinfoundation/framework/commit/bcab8f3160442ea4fcaf442947462504f3d6a17d))
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
### Dependencies
|
|
140
|
+
|
|
141
|
+
* The following workspace dependencies were updated
|
|
142
|
+
* dependencies
|
|
143
|
+
* @twin.org/core bumped from 0.0.1-next.67 to 0.0.1-next.68
|
|
144
|
+
* @twin.org/nameof bumped from 0.0.1-next.67 to 0.0.1-next.68
|
|
145
|
+
* devDependencies
|
|
146
|
+
* @twin.org/nameof-transformer bumped from 0.0.1-next.67 to 0.0.1-next.68
|
|
147
|
+
* @twin.org/nameof-vitest-plugin bumped from 0.0.1-next.67 to 0.0.1-next.68
|
|
148
|
+
|
|
149
|
+
## [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)
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
### Miscellaneous Chores
|
|
153
|
+
|
|
154
|
+
* **crypto:** Synchronize repo versions
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### Dependencies
|
|
158
|
+
|
|
159
|
+
* The following workspace dependencies were updated
|
|
160
|
+
* dependencies
|
|
161
|
+
* @twin.org/core bumped from 0.0.1-next.66 to 0.0.1-next.67
|
|
162
|
+
|
|
163
|
+
## [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)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
### Miscellaneous Chores
|
|
167
|
+
|
|
168
|
+
* **crypto:** Synchronize repo versions
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
### Dependencies
|
|
172
|
+
|
|
173
|
+
* The following workspace dependencies were updated
|
|
174
|
+
* dependencies
|
|
175
|
+
* @twin.org/core bumped from 0.0.1-next.65 to 0.0.1-next.66
|
|
176
|
+
|
|
177
|
+
## [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)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
### Miscellaneous Chores
|
|
181
|
+
|
|
182
|
+
* **crypto:** Synchronize repo versions
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
### Dependencies
|
|
186
|
+
|
|
187
|
+
* The following workspace dependencies were updated
|
|
188
|
+
* dependencies
|
|
189
|
+
* @twin.org/core bumped from 0.0.1-next.64 to 0.0.1-next.65
|
|
190
|
+
|
|
191
|
+
## [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)
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
### Miscellaneous Chores
|
|
195
|
+
|
|
196
|
+
* **crypto:** Synchronize repo versions
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
### Dependencies
|
|
200
|
+
|
|
201
|
+
* The following workspace dependencies were updated
|
|
202
|
+
* dependencies
|
|
203
|
+
* @twin.org/core bumped from 0.0.1-next.63 to 0.0.1-next.64
|
|
204
|
+
|
|
205
|
+
## [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)
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
### Miscellaneous Chores
|
|
209
|
+
|
|
210
|
+
* **crypto:** Synchronize repo versions
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
### Dependencies
|
|
214
|
+
|
|
215
|
+
* The following workspace dependencies were updated
|
|
216
|
+
* dependencies
|
|
217
|
+
* @twin.org/core bumped from 0.0.1-next.62 to 0.0.1-next.63
|
|
218
|
+
|
|
219
|
+
## [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)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
### Features
|
|
223
|
+
|
|
224
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
225
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
### Dependencies
|
|
229
|
+
|
|
230
|
+
* The following workspace dependencies were updated
|
|
231
|
+
* dependencies
|
|
232
|
+
* @twin.org/core bumped from 0.0.1-next.61 to 0.0.1-next.62
|
|
233
|
+
|
|
234
|
+
## [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)
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
### Miscellaneous Chores
|
|
238
|
+
|
|
239
|
+
* **crypto:** Synchronize repo versions
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
### Dependencies
|
|
243
|
+
|
|
244
|
+
* The following workspace dependencies were updated
|
|
245
|
+
* dependencies
|
|
246
|
+
* @twin.org/core bumped from 0.0.1-next.60 to 0.0.1-next.61
|
|
247
|
+
|
|
248
|
+
## [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)
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
### Miscellaneous Chores
|
|
252
|
+
|
|
253
|
+
* **crypto:** Synchronize repo versions
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
### Dependencies
|
|
257
|
+
|
|
258
|
+
* The following workspace dependencies were updated
|
|
259
|
+
* dependencies
|
|
260
|
+
* @twin.org/core bumped from 0.0.1-next.59 to 0.0.1-next.60
|
|
261
|
+
|
|
262
|
+
## [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)
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
### Miscellaneous Chores
|
|
266
|
+
|
|
267
|
+
* **crypto:** Synchronize repo versions
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
### Dependencies
|
|
271
|
+
|
|
272
|
+
* The following workspace dependencies were updated
|
|
273
|
+
* dependencies
|
|
274
|
+
* @twin.org/core bumped from 0.0.1-next.58 to 0.0.1-next.59
|
|
275
|
+
|
|
276
|
+
## [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)
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
### Miscellaneous Chores
|
|
280
|
+
|
|
281
|
+
* **crypto:** Synchronize repo versions
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
### Dependencies
|
|
285
|
+
|
|
286
|
+
* The following workspace dependencies were updated
|
|
287
|
+
* dependencies
|
|
288
|
+
* @twin.org/core bumped from 0.0.1-next.57 to 0.0.1-next.58
|
|
289
|
+
|
|
290
|
+
## [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)
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
### Features
|
|
294
|
+
|
|
295
|
+
* add guards arrayEndsWith and arrayStartsWith ([95d875e](https://github.com/twinfoundation/framework/commit/95d875ec8ccb4713c145fdde941d4cfedcec2ed3))
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
### Dependencies
|
|
299
|
+
|
|
300
|
+
* The following workspace dependencies were updated
|
|
301
|
+
* dependencies
|
|
302
|
+
* @twin.org/core bumped from 0.0.1-next.56 to 0.0.1-next.57
|
|
303
|
+
|
|
304
|
+
## [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)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
### Miscellaneous Chores
|
|
308
|
+
|
|
309
|
+
* **crypto:** Synchronize repo versions
|
|
310
|
+
|
|
311
|
+
|
|
312
|
+
### Dependencies
|
|
313
|
+
|
|
314
|
+
* The following workspace dependencies were updated
|
|
315
|
+
* dependencies
|
|
316
|
+
* @twin.org/core bumped from 0.0.1-next.55 to 0.0.1-next.56
|
|
317
|
+
|
|
318
|
+
## [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)
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
### Miscellaneous Chores
|
|
322
|
+
|
|
323
|
+
* **crypto:** Synchronize repo versions
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
### Dependencies
|
|
327
|
+
|
|
328
|
+
* The following workspace dependencies were updated
|
|
329
|
+
* dependencies
|
|
330
|
+
* @twin.org/core bumped from 0.0.1-next.54 to 0.0.1-next.55
|
|
331
|
+
|
|
332
|
+
## [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)
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
### Miscellaneous Chores
|
|
336
|
+
|
|
337
|
+
* **crypto:** Synchronize repo versions
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
### Dependencies
|
|
341
|
+
|
|
342
|
+
* The following workspace dependencies were updated
|
|
343
|
+
* dependencies
|
|
344
|
+
* @twin.org/core bumped from 0.0.1-next.53 to 0.0.1-next.54
|
|
345
|
+
|
|
346
|
+
## [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)
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
### Miscellaneous Chores
|
|
350
|
+
|
|
351
|
+
* **crypto:** Synchronize repo versions
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
### Dependencies
|
|
355
|
+
|
|
356
|
+
* The following workspace dependencies were updated
|
|
357
|
+
* dependencies
|
|
358
|
+
* @twin.org/core bumped from 0.0.1-next.52 to 0.0.1-next.53
|
|
359
|
+
|
|
360
|
+
## [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)
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
### Features
|
|
364
|
+
|
|
365
|
+
* use new shared store mechanism ([#131](https://github.com/twinfoundation/framework/issues/131)) ([934385b](https://github.com/twinfoundation/framework/commit/934385b2fbaf9f5c00a505ebf9d093bd5a425f55))
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
### Dependencies
|
|
369
|
+
|
|
370
|
+
* The following workspace dependencies were updated
|
|
371
|
+
* dependencies
|
|
372
|
+
* @twin.org/core bumped from 0.0.1-next.51 to 0.0.1-next.52
|
|
373
|
+
|
|
374
|
+
## [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)
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
### Miscellaneous Chores
|
|
378
|
+
|
|
379
|
+
* **crypto:** Synchronize repo versions
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
### Dependencies
|
|
383
|
+
|
|
384
|
+
* The following workspace dependencies were updated
|
|
385
|
+
* dependencies
|
|
386
|
+
* @twin.org/core bumped from 0.0.1-next.50 to 0.0.1-next.51
|
|
387
|
+
|
|
388
|
+
## [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)
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
### Miscellaneous Chores
|
|
392
|
+
|
|
393
|
+
* **crypto:** Synchronize repo versions
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
### Dependencies
|
|
397
|
+
|
|
398
|
+
* The following workspace dependencies were updated
|
|
399
|
+
* dependencies
|
|
400
|
+
* @twin.org/core bumped from 0.0.1-next.49 to 0.0.1-next.50
|
|
401
|
+
|
|
402
|
+
## 0.0.1-next.49
|
|
4
403
|
|
|
5
404
|
- Added: Bip44
|
|
@@ -4,13 +4,13 @@ Bech32 encoding and decoding.
|
|
|
4
4
|
|
|
5
5
|
## Constructors
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Bech32**():
|
|
9
|
+
> **new Bech32**(): `Bech32`
|
|
10
10
|
|
|
11
11
|
#### Returns
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`Bech32`
|
|
14
14
|
|
|
15
15
|
## Methods
|
|
16
16
|
|
|
@@ -22,11 +22,15 @@ Encode the buffer.
|
|
|
22
22
|
|
|
23
23
|
#### Parameters
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
##### humanReadablePart
|
|
26
|
+
|
|
27
|
+
`string`
|
|
26
28
|
|
|
27
29
|
The header.
|
|
28
30
|
|
|
29
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
7
|
+
### Constructor
|
|
8
8
|
|
|
9
|
-
> **new Bip32Path**(`initialPath
|
|
9
|
+
> **new Bip32Path**(`initialPath?`): `Bip32Path`
|
|
10
10
|
|
|
11
11
|
Create a new instance of Bip32Path.
|
|
12
12
|
|
|
13
13
|
#### Parameters
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
##### initialPath?
|
|
16
|
+
|
|
17
|
+
`string`
|
|
16
18
|
|
|
17
19
|
Initial path to create.
|
|
18
20
|
|
|
19
21
|
#### Returns
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
`Bip32Path`
|
|
22
24
|
|
|
23
25
|
## Methods
|
|
24
26
|
|
|
25
27
|
### fromPath()
|
|
26
28
|
|
|
27
|
-
> `static` **fromPath**(`bip32Path`):
|
|
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
|
-
|
|
35
|
+
##### bip32Path
|
|
36
|
+
|
|
37
|
+
`Bip32Path`
|
|
34
38
|
|
|
35
39
|
The path to clone.
|
|
36
40
|
|
|
37
41
|
#### Returns
|
|
38
42
|
|
|
39
|
-
|
|
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
|
-
|
|
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
|
-
|
|
91
|
+
##### index
|
|
92
|
+
|
|
93
|
+
`number`
|
|
86
94
|
|
|
87
95
|
The index to add to the path.
|
|
88
96
|
|