@twin.org/crypto 0.0.2-next.9 → 0.0.3-next.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.
- package/dist/es/address/bech32.js +72 -0
- package/dist/es/address/bech32.js.map +1 -0
- package/dist/es/address/bip44.js +113 -0
- package/dist/es/address/bip44.js.map +1 -0
- package/dist/es/ciphers/chaCha20Poly1305.js +48 -0
- package/dist/es/ciphers/chaCha20Poly1305.js.map +1 -0
- package/dist/es/curves/ed25519.js +114 -0
- package/dist/es/curves/ed25519.js.map +1 -0
- package/dist/es/curves/secp256k1.js +82 -0
- package/dist/es/curves/secp256k1.js.map +1 -0
- package/dist/es/curves/x25519.js +34 -0
- package/dist/es/curves/x25519.js.map +1 -0
- package/dist/es/curves/zip215.js +33 -0
- package/dist/es/curves/zip215.js.map +1 -0
- package/dist/es/hashes/blake2b.js +90 -0
- package/dist/es/hashes/blake2b.js.map +1 -0
- package/dist/es/hashes/blake3.js +76 -0
- package/dist/es/hashes/blake3.js.map +1 -0
- package/dist/es/hashes/hmacSha1.js +56 -0
- package/dist/es/hashes/hmacSha1.js.map +1 -0
- package/dist/es/hashes/hmacSha256.js +83 -0
- package/dist/es/hashes/hmacSha256.js.map +1 -0
- package/dist/es/hashes/hmacSha512.js +132 -0
- package/dist/es/hashes/hmacSha512.js.map +1 -0
- package/dist/es/hashes/pbkdf2.js +45 -0
- package/dist/es/hashes/pbkdf2.js.map +1 -0
- package/dist/es/hashes/sha1.js +52 -0
- package/dist/es/hashes/sha1.js.map +1 -0
- package/dist/es/hashes/sha256.js +75 -0
- package/dist/es/hashes/sha256.js.map +1 -0
- package/dist/es/hashes/sha3.js +122 -0
- package/dist/es/hashes/sha3.js.map +1 -0
- package/dist/es/hashes/sha512.js +118 -0
- package/dist/es/hashes/sha512.js.map +1 -0
- package/dist/es/helpers/pemHelper.js +42 -0
- package/dist/es/helpers/pemHelper.js.map +1 -0
- package/dist/es/index.js +29 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/keys/bip32Path.js +72 -0
- package/dist/es/keys/bip32Path.js.map +1 -0
- package/dist/es/keys/bip39.js +83 -0
- package/dist/es/keys/bip39.js.map +1 -0
- package/dist/es/keys/slip0010.js +83 -0
- package/dist/es/keys/slip0010.js.map +1 -0
- package/dist/es/models/keyType.js +17 -0
- package/dist/es/models/keyType.js.map +1 -0
- package/dist/es/otp/hotp.js +27 -0
- package/dist/es/otp/hotp.js.map +1 -0
- package/dist/es/otp/totp.js +75 -0
- package/dist/es/otp/totp.js.map +1 -0
- package/dist/es/passwords/passwordGenerator.js +28 -0
- package/dist/es/passwords/passwordGenerator.js.map +1 -0
- package/dist/es/passwords/passwordValidator.js +81 -0
- package/dist/es/passwords/passwordValidator.js.map +1 -0
- package/dist/types/address/bech32.d.ts +4 -0
- package/dist/types/address/bip44.d.ts +6 -2
- package/dist/types/ciphers/chaCha20Poly1305.d.ts +4 -0
- package/dist/types/curves/ed25519.d.ts +4 -0
- package/dist/types/curves/secp256k1.d.ts +4 -0
- package/dist/types/curves/x25519.d.ts +4 -0
- package/dist/types/curves/zip215.d.ts +4 -0
- package/dist/types/hashes/blake2b.d.ts +4 -0
- package/dist/types/hashes/blake3.d.ts +4 -0
- package/dist/types/hashes/hmacSha1.d.ts +4 -0
- package/dist/types/hashes/hmacSha256.d.ts +4 -0
- package/dist/types/hashes/hmacSha512.d.ts +4 -0
- package/dist/types/hashes/pbkdf2.d.ts +4 -0
- package/dist/types/hashes/sha1.d.ts +4 -0
- package/dist/types/hashes/sha256.d.ts +4 -0
- package/dist/types/hashes/sha3.d.ts +4 -0
- package/dist/types/hashes/sha512.d.ts +4 -0
- package/dist/types/helpers/pemHelper.d.ts +4 -0
- package/dist/types/index.d.ts +26 -26
- package/dist/types/keys/bip39.d.ts +4 -0
- package/dist/types/keys/slip0010.d.ts +6 -2
- package/dist/types/otp/hotp.d.ts +4 -0
- package/docs/changelog.md +267 -0
- package/docs/reference/classes/Bech32.md +8 -0
- package/docs/reference/classes/Bip39.md +8 -0
- package/docs/reference/classes/Bip44.md +8 -0
- package/docs/reference/classes/Blake2b.md +8 -0
- package/docs/reference/classes/Blake3.md +8 -0
- package/docs/reference/classes/ChaCha20Poly1305.md +8 -0
- package/docs/reference/classes/Ed25519.md +8 -0
- package/docs/reference/classes/HmacSha1.md +8 -0
- package/docs/reference/classes/HmacSha256.md +8 -0
- package/docs/reference/classes/HmacSha512.md +8 -0
- package/docs/reference/classes/Hotp.md +8 -0
- package/docs/reference/classes/Pbkdf2.md +8 -0
- package/docs/reference/classes/PemHelper.md +8 -0
- package/docs/reference/classes/Secp256k1.md +8 -0
- package/docs/reference/classes/Sha1.md +8 -0
- package/docs/reference/classes/Sha256.md +8 -0
- package/docs/reference/classes/Sha3.md +8 -0
- package/docs/reference/classes/Sha512.md +8 -0
- package/docs/reference/classes/Slip0010.md +8 -0
- package/docs/reference/classes/Totp.md +2 -2
- package/docs/reference/classes/X25519.md +8 -0
- package/docs/reference/classes/Zip215.md +8 -0
- package/locales/en.json +9 -28
- package/package.json +29 -16
- package/dist/cjs/index.cjs +0 -1876
- package/dist/esm/index.mjs +0 -1829
package/locales/en.json
CHANGED
|
@@ -2,13 +2,7 @@
|
|
|
2
2
|
"error": {
|
|
3
3
|
"guard": {
|
|
4
4
|
"length32Multiple": "Property \"{property}\" should be a multiple of 32, it is {value}",
|
|
5
|
-
"lengthEntropy": "Property \"{property}\" should be a multiple of 4, >=16 and <= 32, it is {value}"
|
|
6
|
-
"length3Multiple": "Property \"{property}\" should be a multiple of 3, it is {value}",
|
|
7
|
-
"greaterThan0": "Property \"{property}\" must be greater than zero, it is {value}"
|
|
8
|
-
},
|
|
9
|
-
"bip39": {
|
|
10
|
-
"missingMnemonicWord": "The mnemonic contains a word not in the wordlist, \"{value}\"",
|
|
11
|
-
"checksumMismatch": "The checksum does not match \"{newChecksum}\" != \"{checksumBits}\""
|
|
5
|
+
"lengthEntropy": "Property \"{property}\" should be a multiple of 4, >=16 and <= 32, it is {value}"
|
|
12
6
|
},
|
|
13
7
|
"ed25519": {
|
|
14
8
|
"privateKeyLength": "The private key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\"",
|
|
@@ -18,13 +12,6 @@
|
|
|
18
12
|
"privateKeyLength": "The private key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\"",
|
|
19
13
|
"publicKeyLength": "The public key length is incorrect, it should be \"{requiredSize}\" but is \"{actualSize}\""
|
|
20
14
|
},
|
|
21
|
-
"x25519": {
|
|
22
|
-
"invalidPublicKey": "Invalid Ed25519 Public Key"
|
|
23
|
-
},
|
|
24
|
-
"blake2b": {
|
|
25
|
-
"outputLength64": "The output length should be between 1 and 64, it is \"{outputLength}\"",
|
|
26
|
-
"keyLength64": "The key length should be between 1 and 64, it is \"{keyLength}\""
|
|
27
|
-
},
|
|
28
15
|
"sha512": {
|
|
29
16
|
"bitSize": "Only 224, 256, 384 or 512 bits are supported, it is \"{bitSize}\""
|
|
30
17
|
},
|
|
@@ -47,26 +34,20 @@
|
|
|
47
34
|
"lowerUpper": "The address my use either lowercase or uppercase, \"{bech32}\"",
|
|
48
35
|
"dataTooShort": "The address does not contain enough data to decode, \"{bech32}\""
|
|
49
36
|
},
|
|
50
|
-
"pbkdf2": {
|
|
51
|
-
"keyTooLong": "The requested key length \"{keyLength}\" is too long, based on the \"{macLength}\""
|
|
52
|
-
},
|
|
53
|
-
"chaCha20Poly1305": {
|
|
54
|
-
"noAadWithData": "You can not set the aad when there is already data",
|
|
55
|
-
"noAuthTag": "Can not finalise when the auth tag is not set",
|
|
56
|
-
"authenticationFailed": "The data could not be authenticated",
|
|
57
|
-
"authTagDecrypting": "Can not get the auth tag when decrypting",
|
|
58
|
-
"authTagEncrypting": "Can not set the auth tag when encrypting",
|
|
59
|
-
"noAuthTagSet": "The auth tag has not been set"
|
|
60
|
-
},
|
|
61
37
|
"bip44": {
|
|
62
38
|
"unsupportedKeyType": "The key type \"{keyType}\" is not supported"
|
|
63
39
|
},
|
|
64
40
|
"slip0010": {
|
|
65
41
|
"invalidSeed": "The seed is invalid \"{seed}\""
|
|
66
42
|
},
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
43
|
+
"validation": {
|
|
44
|
+
"minLengthRequired": "The value length should be at least {minLength}, it is {actualLength}",
|
|
45
|
+
"maxLengthRequired": "The value length should be at most {maxLength}, it is {actualLength}",
|
|
46
|
+
"repeatedCharacters": "The value should not contain repeated characters in sequence",
|
|
47
|
+
"atLeastOneLowerCase": "The value should contain at least one lowercase character",
|
|
48
|
+
"atLeastOneUpperCase": "The value should contain at least one uppercase character",
|
|
49
|
+
"atLeastOneNumber": "The value should contain at least one number",
|
|
50
|
+
"atLeastOneSpecialChar": "The value should contain at least one symbol"
|
|
70
51
|
}
|
|
71
52
|
}
|
|
72
53
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/crypto",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-next.1",
|
|
4
4
|
"description": "Contains helper methods and classes which implement cryptographic functions",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,33 +14,46 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@noble/ciphers": "2.0.
|
|
18
|
-
"@noble/curves": "2.0.
|
|
19
|
-
"@noble/hashes": "2.0.
|
|
17
|
+
"@noble/ciphers": "2.0.1",
|
|
18
|
+
"@noble/curves": "2.0.1",
|
|
19
|
+
"@noble/hashes": "2.0.1",
|
|
20
20
|
"@scure/base": "2.0.0",
|
|
21
|
-
"@scure/bip32": "2.0.
|
|
22
|
-
"@scure/bip39": "2.0.
|
|
23
|
-
"@twin.org/core": "0.0.
|
|
24
|
-
"@twin.org/nameof": "0.0.
|
|
21
|
+
"@scure/bip32": "2.0.1",
|
|
22
|
+
"@scure/bip39": "2.0.1",
|
|
23
|
+
"@twin.org/core": "0.0.3-next.1",
|
|
24
|
+
"@twin.org/nameof": "0.0.3-next.1",
|
|
25
25
|
"crypto-browserify": "3.12.1",
|
|
26
|
-
"micro-key-producer": "0.8.
|
|
26
|
+
"micro-key-producer": "0.8.2"
|
|
27
27
|
},
|
|
28
|
-
"main": "./dist/
|
|
29
|
-
"module": "./dist/esm/index.mjs",
|
|
28
|
+
"main": "./dist/es/index.js",
|
|
30
29
|
"types": "./dist/types/index.d.ts",
|
|
31
30
|
"exports": {
|
|
32
31
|
".": {
|
|
33
32
|
"types": "./dist/types/index.d.ts",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
33
|
+
"import": "./dist/es/index.js",
|
|
34
|
+
"default": "./dist/es/index.js"
|
|
36
35
|
},
|
|
37
36
|
"./locales/*.json": "./locales/*.json"
|
|
38
37
|
},
|
|
39
38
|
"files": [
|
|
40
|
-
"dist/
|
|
41
|
-
"dist/esm",
|
|
39
|
+
"dist/es",
|
|
42
40
|
"dist/types",
|
|
43
41
|
"locales",
|
|
44
42
|
"docs"
|
|
45
|
-
]
|
|
43
|
+
],
|
|
44
|
+
"keywords": [
|
|
45
|
+
"twin",
|
|
46
|
+
"trade",
|
|
47
|
+
"iota",
|
|
48
|
+
"framework",
|
|
49
|
+
"blockchain",
|
|
50
|
+
"cryptography",
|
|
51
|
+
"encryption",
|
|
52
|
+
"hashing",
|
|
53
|
+
"security"
|
|
54
|
+
],
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "git+https://github.com/twinfoundation/framework/issues"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://twindev.org"
|
|
46
59
|
}
|