@digitaldefiance/node-ecies-lib 3.0.8 → 4.1.0
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/README.md +229 -409
- package/package.json +3 -3
- package/src/builders/member-builder.d.ts +1 -2
- package/src/builders/member-builder.d.ts.map +1 -1
- package/src/builders/member-builder.js.map +1 -1
- package/src/constants.d.ts.map +1 -1
- package/src/constants.js +38 -9
- package/src/constants.js.map +1 -1
- package/src/i18n/ecies-i18n-factory.d.ts +2 -52
- package/src/i18n/ecies-i18n-factory.d.ts.map +1 -1
- package/src/i18n/ecies-i18n-factory.js +9 -63
- package/src/i18n/ecies-i18n-factory.js.map +1 -1
- package/src/i18n/node-ecies-i18n-setup.d.ts.map +1 -1
- package/src/i18n/node-ecies-i18n-setup.js +5 -53
- package/src/i18n/node-ecies-i18n-setup.js.map +1 -1
- package/src/i18n/node-keys.d.ts +57 -0
- package/src/i18n/node-keys.d.ts.map +1 -0
- package/src/i18n/node-keys.js +67 -0
- package/src/i18n/node-keys.js.map +1 -0
- package/src/i18n/translations/de.d.ts +1 -1
- package/src/i18n/translations/de.d.ts.map +1 -1
- package/src/i18n/translations/de.js +51 -46
- package/src/i18n/translations/de.js.map +1 -1
- package/src/i18n/translations/en-GB.d.ts +1 -1
- package/src/i18n/translations/en-GB.d.ts.map +1 -1
- package/src/i18n/translations/en-GB.js +51 -46
- package/src/i18n/translations/en-GB.js.map +1 -1
- package/src/i18n/translations/en-US.d.ts +1 -1
- package/src/i18n/translations/en-US.d.ts.map +1 -1
- package/src/i18n/translations/en-US.js +52 -46
- package/src/i18n/translations/en-US.js.map +1 -1
- package/src/i18n/translations/es.d.ts +1 -1
- package/src/i18n/translations/es.d.ts.map +1 -1
- package/src/i18n/translations/es.js +51 -46
- package/src/i18n/translations/es.js.map +1 -1
- package/src/i18n/translations/fr.d.ts +1 -1
- package/src/i18n/translations/fr.d.ts.map +1 -1
- package/src/i18n/translations/fr.js +51 -46
- package/src/i18n/translations/fr.js.map +1 -1
- package/src/i18n/translations/index.d.ts +2 -0
- package/src/i18n/translations/index.d.ts.map +1 -1
- package/src/i18n/translations/index.js +5 -1
- package/src/i18n/translations/index.js.map +1 -1
- package/src/i18n/translations/ja.d.ts +1 -1
- package/src/i18n/translations/ja.d.ts.map +1 -1
- package/src/i18n/translations/ja.js +51 -46
- package/src/i18n/translations/ja.js.map +1 -1
- package/src/i18n/translations/uk.d.ts +1 -1
- package/src/i18n/translations/uk.d.ts.map +1 -1
- package/src/i18n/translations/uk.js +51 -46
- package/src/i18n/translations/uk.js.map +1 -1
- package/src/i18n/translations/zh-cn.d.ts +1 -1
- package/src/i18n/translations/zh-cn.d.ts.map +1 -1
- package/src/i18n/translations/zh-cn.js +51 -46
- package/src/i18n/translations/zh-cn.js.map +1 -1
- package/src/interfaces/authenticated-cipher.d.ts +3 -0
- package/src/interfaces/authenticated-cipher.d.ts.map +1 -1
- package/src/interfaces/authenticated-decipher.d.ts +3 -0
- package/src/interfaces/authenticated-decipher.d.ts.map +1 -1
- package/src/interfaces/backend-member-operational.d.ts +1 -1
- package/src/interfaces/backend-member-operational.d.ts.map +1 -1
- package/src/interfaces/constants.d.ts +26 -17
- package/src/interfaces/constants.d.ts.map +1 -1
- package/src/interfaces/multi-encrypted-parsed-header.d.ts +5 -2
- package/src/interfaces/multi-encrypted-parsed-header.d.ts.map +1 -1
- package/src/interfaces/multi-recipient-chunk.d.ts +16 -0
- package/src/interfaces/multi-recipient-chunk.d.ts.map +1 -1
- package/src/interfaces/multi-recipient-chunk.js +10 -0
- package/src/interfaces/multi-recipient-chunk.js.map +1 -1
- package/src/lib/index.d.ts +2 -0
- package/src/lib/index.d.ts.map +1 -1
- package/src/lib/index.js +2 -0
- package/src/lib/index.js.map +1 -1
- package/src/lib/invariant-validator.d.ts +62 -0
- package/src/lib/invariant-validator.d.ts.map +1 -0
- package/src/lib/invariant-validator.js +108 -0
- package/src/lib/invariant-validator.js.map +1 -0
- package/src/lib/invariants/index.d.ts +8 -0
- package/src/lib/invariants/index.d.ts.map +1 -0
- package/src/lib/invariants/index.js +12 -0
- package/src/lib/invariants/index.js.map +1 -0
- package/src/lib/invariants/recipient-id-consistency.d.ts +22 -0
- package/src/lib/invariants/recipient-id-consistency.d.ts.map +1 -0
- package/src/lib/invariants/recipient-id-consistency.js +62 -0
- package/src/lib/invariants/recipient-id-consistency.js.map +1 -0
- package/src/member.d.ts +6 -6
- package/src/member.d.ts.map +1 -1
- package/src/member.js +13 -20
- package/src/member.js.map +1 -1
- package/src/services/aes-gcm.d.ts +2 -2
- package/src/services/aes-gcm.d.ts.map +1 -1
- package/src/services/aes-gcm.js +8 -2
- package/src/services/aes-gcm.js.map +1 -1
- package/src/services/ecies/crypto-core.d.ts +21 -0
- package/src/services/ecies/crypto-core.d.ts.map +1 -1
- package/src/services/ecies/crypto-core.js +62 -7
- package/src/services/ecies/crypto-core.js.map +1 -1
- package/src/services/ecies/multi-recipient.d.ts +11 -7
- package/src/services/ecies/multi-recipient.d.ts.map +1 -1
- package/src/services/ecies/multi-recipient.js +200 -71
- package/src/services/ecies/multi-recipient.js.map +1 -1
- package/src/services/ecies/service.d.ts +1 -1
- package/src/services/ecies/service.d.ts.map +1 -1
- package/src/services/ecies/service.js +2 -2
- package/src/services/ecies/service.js.map +1 -1
- package/src/services/ecies/single-recipient.d.ts +1 -1
- package/src/services/ecies/single-recipient.d.ts.map +1 -1
- package/src/services/ecies/single-recipient.js +76 -43
- package/src/services/ecies/single-recipient.js.map +1 -1
- package/src/services/encryption-stream.js +3 -4
- package/src/services/encryption-stream.js.map +1 -1
- package/src/services/multi-recipient-processor.d.ts +42 -9
- package/src/services/multi-recipient-processor.d.ts.map +1 -1
- package/src/services/multi-recipient-processor.js +273 -177
- package/src/services/multi-recipient-processor.js.map +1 -1
- package/src/test-mocks/mock-backend-member.d.ts +7 -8
- package/src/test-mocks/mock-backend-member.d.ts.map +1 -1
- package/src/test-mocks/mock-backend-member.js +4 -4
- package/src/test-mocks/mock-backend-member.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digitaldefiance/node-ecies-lib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Digital Defiance Node ECIES Library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"packageManager": "yarn@4.10.3",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@digitaldefiance/ecies-lib": "
|
|
49
|
-
"@digitaldefiance/i18n-lib": "3.
|
|
48
|
+
"@digitaldefiance/ecies-lib": "4.1.0",
|
|
49
|
+
"@digitaldefiance/i18n-lib": "3.7.2",
|
|
50
50
|
"@ethereumjs/wallet": "^10.0.0",
|
|
51
51
|
"@noble/curves": "^2.0.1",
|
|
52
52
|
"@noble/hashes": "^2.0.1",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MemberType, EmailString, SecureString } from '@digitaldefiance/ecies-lib';
|
|
2
2
|
import { ECIESService } from '../services/ecies';
|
|
3
3
|
import { IBackendMemberWithMnemonic } from '../interfaces/member-with-mnemonic';
|
|
4
|
-
import { ObjectId } from 'bson';
|
|
5
4
|
export declare class MemberBuilder {
|
|
6
5
|
private eciesService?;
|
|
7
6
|
private type?;
|
|
@@ -15,7 +14,7 @@ export declare class MemberBuilder {
|
|
|
15
14
|
withName(name: string): this;
|
|
16
15
|
withEmail(email: string | EmailString): this;
|
|
17
16
|
withMnemonic(mnemonic: SecureString): this;
|
|
18
|
-
withCreatedBy(creatorId:
|
|
17
|
+
withCreatedBy(creatorId: Buffer): this;
|
|
19
18
|
generateMnemonic(): this;
|
|
20
19
|
build(): IBackendMemberWithMnemonic;
|
|
21
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-builder.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/builders/member-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"member-builder.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/builders/member-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,oCAAoC,CAAC;AAIhF,qBAAa,aAAa;IACxB,OAAO,CAAC,YAAY,CAAC,CAAe;IACpC,OAAO,CAAC,IAAI,CAAC,CAAa;IAC1B,OAAO,CAAC,IAAI,CAAC,CAAS;IACtB,OAAO,CAAC,KAAK,CAAC,CAAc;IAC5B,OAAO,CAAC,QAAQ,CAAC,CAAe;IAChC,OAAO,CAAC,SAAS,CAAC,CAAS;IAE3B,MAAM,CAAC,MAAM,IAAI,aAAa;IAI9B,gBAAgB,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAK7C,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAKhC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK5B,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI;IAK5C,YAAY,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAK1C,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAKtC,gBAAgB,IAAI,IAAI;IASxB,KAAK,IAAI,0BAA0B;CAkBpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"member-builder.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/builders/member-builder.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AACnC,0DAAmF;
|
|
1
|
+
{"version":3,"file":"member-builder.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/builders/member-builder.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AACnC,0DAAmF;AAGnF,yEAAuE;AACvE,mEAAsF;AAEtF,MAAa,aAAa;IAChB,YAAY,CAAgB;IAC5B,IAAI,CAAc;IAClB,IAAI,CAAU;IACd,KAAK,CAAe;IACpB,QAAQ,CAAgB;IACxB,SAAS,CAAU;IAE3B,MAAM,CAAC,MAAM;QACX,OAAO,IAAI,aAAa,EAAE,CAAC;IAC7B,CAAC;IAED,gBAAgB,CAAC,OAAqB;QACpC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,IAAgB;QACvB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,QAAQ,CAAC,IAAY;QACnB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,SAAS,CAAC,KAA2B;QACnC,IAAI,CAAC,KAAK,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,uBAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QACxE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,YAAY,CAAC,QAAsB;QACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,aAAa,CAAC,SAAiB;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,gBAAgB;QACd,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,MAAM,MAAM,GAAG,IAAA,8CAAsB,GAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,yCAAoB,EAAE,uCAAkB,CAAC,2DAA2D,CAAC,CAAC,CAAC;QAC1I,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,mBAAmB,EAAE,CAAC;QACxD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK;QACH,MAAM,MAAM,GAAG,IAAA,8CAAsB,GAAE,CAAC;QACxC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,yCAAoB,EAAE,uCAAkB,CAAC,oCAAoC,CAAC,CAAC,CAAC;QACnH,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAC5C,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,yCAAoB,EAAE,uCAAkB,CAAC,yCAAyC,CAAC,CAAC,CAAC;QACxH,CAAC;QAED,OAAO,eAAM,CAAC,SAAS,CACrB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,SAAS,CACf,CAAC;IACJ,CAAC;CACF;AArED,sCAqEC"}
|
package/src/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-ecies-lib/src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,IAAI,cAAc,EAC5B,aAAa,EAEb,4BAA4B,
|
|
1
|
+
{"version":3,"file":"constants.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AAO,MAAM,+BAA+B,EACoB,cAAc,CAAC;AAQ/E;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,iBAGd,CAAC;AAEZ,eAAO,MAAM,SAAS,EAAE,UAkDb,CAAC"}
|
package/src/constants.js
CHANGED
|
@@ -22,7 +22,17 @@ function getNodeRuntimeConfiguration() {
|
|
|
22
22
|
return runtimeDefaults;
|
|
23
23
|
}
|
|
24
24
|
function registerNodeRuntimeConfiguration(configOrOverrides, options) {
|
|
25
|
+
// Register configuration through ecies-lib's system
|
|
26
|
+
// This handles auto-sync of idProvider -> MEMBER_ID_LENGTH and ECIES.MULTIPLE.RECIPIENT_ID_SIZE
|
|
25
27
|
runtimeDefaults = (0, ecies_lib_1.registerRuntimeConfiguration)(exports.NODE_RUNTIME_CONFIGURATION_KEY, configOrOverrides, options);
|
|
28
|
+
// Note: ENCRYPTION.RECIPIENT_ID_SIZE is set at module initialization
|
|
29
|
+
// and uses DEFAULT_ID_PROVIDER.byteLength. For runtime configurations with
|
|
30
|
+
// different providers, code should reference config.ECIES.MULTIPLE.RECIPIENT_ID_SIZE
|
|
31
|
+
// which is auto-synced by ecies-lib's createRuntimeConfiguration.
|
|
32
|
+
// Validate Node-specific invariants (base ecies-lib invariants already validated)
|
|
33
|
+
// Note: Validation temporarily disabled for configs without ENCRYPTION property
|
|
34
|
+
// as runtimeDefaults doesn't include node-specific constants
|
|
35
|
+
// InvariantValidator.validateAll(runtimeDefaults as IConstants);
|
|
26
36
|
return runtimeDefaults;
|
|
27
37
|
}
|
|
28
38
|
exports.CHECKSUM = runtimeDefaults.CHECKSUM;
|
|
@@ -50,7 +60,7 @@ exports.PBKDF2_PROFILES = Object.freeze({
|
|
|
50
60
|
// Fast test profile (small salt and iterations for speed)
|
|
51
61
|
[pbkdf2_profile_1.Pbkdf2ProfileEnum.TEST_FAST]: Object.freeze({
|
|
52
62
|
saltBytes: 16,
|
|
53
|
-
iterations:
|
|
63
|
+
iterations: 1000, // Minimum required by PBKDF2 validation
|
|
54
64
|
algorithm: 'sha256',
|
|
55
65
|
hashBytes: 32,
|
|
56
66
|
}),
|
|
@@ -80,21 +90,42 @@ exports.WRAPPED_KEY = Object.freeze({
|
|
|
80
90
|
MIN_ITERATIONS: 100000, // Keep lower for key-wrapping operations
|
|
81
91
|
});
|
|
82
92
|
exports.KEYRING_ALGORITHM_CONFIGURATION = `${exports.KEYRING.ALGORITHM}-${exports.KEYRING.KEY_BITS}-${exports.KEYRING.MODE}`;
|
|
93
|
+
/**
|
|
94
|
+
* Default ID provider instance (singleton).
|
|
95
|
+
* Uses MongoDB ObjectID format (12 bytes).
|
|
96
|
+
*/
|
|
97
|
+
const DEFAULT_ID_PROVIDER = new ecies_lib_1.ObjectIdProvider();
|
|
83
98
|
/**
|
|
84
99
|
* Constants for encrypted data
|
|
85
100
|
*/
|
|
86
101
|
exports.ENCRYPTION = Object.freeze({
|
|
87
102
|
ENCRYPTION_TYPE_SIZE: 1,
|
|
88
|
-
RECIPIENT_ID_SIZE:
|
|
103
|
+
RECIPIENT_ID_SIZE: DEFAULT_ID_PROVIDER.byteLength,
|
|
89
104
|
});
|
|
90
105
|
exports.Constants = Object.freeze({
|
|
91
106
|
...ecies_lib_1.Constants,
|
|
107
|
+
ECIES: {
|
|
108
|
+
...ecies_lib_1.Constants.ECIES,
|
|
109
|
+
// Override public key length for compressed keys
|
|
110
|
+
PUBLIC_KEY_LENGTH: 33,
|
|
111
|
+
// Override IV size for AES-GCM (standard is 12 bytes)
|
|
112
|
+
IV_SIZE: 12,
|
|
113
|
+
SINGLE: {
|
|
114
|
+
...ecies_lib_1.Constants.ECIES.SINGLE,
|
|
115
|
+
FIXED_OVERHEAD_SIZE: 72,
|
|
116
|
+
},
|
|
117
|
+
SIMPLE: {
|
|
118
|
+
...ecies_lib_1.Constants.ECIES.SIMPLE,
|
|
119
|
+
FIXED_OVERHEAD_SIZE: 64,
|
|
120
|
+
},
|
|
121
|
+
MULTIPLE: {
|
|
122
|
+
...ecies_lib_1.Constants.ECIES.MULTIPLE,
|
|
123
|
+
ENCRYPTED_KEY_SIZE: 60,
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
// Node-specific overrides and additions
|
|
92
127
|
/**
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
OBJECT_ID_LENGTH: ecies_lib_1.OBJECT_ID_LENGTH,
|
|
96
|
-
/**
|
|
97
|
-
* PBKDF2 constants
|
|
128
|
+
* PBKDF2 constants (Node.js crypto implementation)
|
|
98
129
|
*/
|
|
99
130
|
PBKDF2: exports.PBKDF2,
|
|
100
131
|
/**
|
|
@@ -121,8 +152,6 @@ exports.Constants = Object.freeze({
|
|
|
121
152
|
* Algorithm configuration string for keyring operations
|
|
122
153
|
*/
|
|
123
154
|
KEYRING_ALGORITHM_CONFIGURATION: exports.KEYRING_ALGORITHM_CONFIGURATION,
|
|
124
|
-
PasswordRegex: runtimeDefaults.PasswordRegex,
|
|
125
|
-
MnemonicRegex: runtimeDefaults.MnemonicRegex,
|
|
126
155
|
});
|
|
127
156
|
if (exports.CHECKSUM.SHA3_BUFFER_LENGTH !== exports.CHECKSUM.SHA3_DEFAULT_HASH_BITS / 8 ||
|
|
128
157
|
exports.CHECKSUM.SHA3_BUFFER_LENGTH !== exports.CHECKSUM.SHA3_DEFAULT_HASH_BITS / 8) {
|
package/src/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-ecies-lib/src/constants.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../packages/digitaldefiance-node-ecies-lib/src/constants.ts"],"names":[],"mappings":";;;AAwDA,kEAEC;AAED,4EAuBC;AAnFD,0DAQoC;AAQpC,kEAA2F;AAC3F,iCAIgB;AAGhB;;;;GAIG;AACU,QAAA,8BAA8B,GAAG,MAAM,CAAC,GAAG,CACtD,qCAAqC,CACtC,CAAC;AAcW,Q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IAAI,CACV,uDAAuD,EACvD,4BAAgB,CACjB,CAAC;AACJ,CAAC"}
|
|
@@ -1,55 +1,6 @@
|
|
|
1
1
|
import { ComponentDefinition, ComponentRegistration, PluginI18nEngine, CoreLanguageCode, RegistryConfig, EngineConfig } from '@digitaldefiance/i18n-lib';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
declare enum NodeEciesStringKey {
|
|
6
|
-
Error_LengthError_LengthIsInvalidType = "error_length_error_length_is_invalid_type",
|
|
7
|
-
Error_Member_MissingMemberName = "error_member_missing_member_name",
|
|
8
|
-
Error_Member_InvalidMemberNameWhitespace = "error_member_invalid_member_name_whitespace",
|
|
9
|
-
Error_Member_NoWallet = "error_member_no_wallet",
|
|
10
|
-
Error_Member_WalletAlreadyLoaded = "error_member_wallet_already_loaded",
|
|
11
|
-
Error_Member_InvalidMnemonic = "error_member_invalid_mnemonic",
|
|
12
|
-
Error_Member_MissingPrivateKey = "error_member_missing_private_key",
|
|
13
|
-
Error_Member_MissingEncryptionData = "error_member_missing_encryption_data",
|
|
14
|
-
Error_Member_EncryptionDataTooLarge = "error_member_encryption_data_too_large",
|
|
15
|
-
Error_Member_MissingEmail = "error_member_missing_email",
|
|
16
|
-
Error_Member_InvalidEmailWhitespace = "error_member_invalid_email_whitespace",
|
|
17
|
-
Error_InvalidPublicKey = "error_invalidPublicKey",
|
|
18
|
-
Error_InvalidPublicKeyFormat = "error_invalidPublicKeyFormat",
|
|
19
|
-
Error_MessageLengthExceedsMaximumAllowedSize = "error_messageLengthExceedsMaximumAllowedSize",
|
|
20
|
-
Error_InvalidEncryptionTypeOrNumberOfRecipients = "error_invalidEncryptionTypeOrNumberOfRecipients",
|
|
21
|
-
Error_EncryptedDataLengthMismatch = "error_encryptedDataLengthMismatch",
|
|
22
|
-
Error_EphemeralPublicKeyLengthMismatch = "error_ephemeralPublicKeyLengthMismatch",
|
|
23
|
-
Error_EncryptedDataIsEmpty = "error_encryptedDataIsEmpty",
|
|
24
|
-
Error_CombinedDataTooShort = "error_combinedDataTooShort",
|
|
25
|
-
Error_BufferIsTooShort = "error_bufferIsTooShort",
|
|
26
|
-
Error_BufferIsTooShortToReadFullLengthValue = "error_bufferIsTooShortToReadFullLengthValue",
|
|
27
|
-
Error_LengthExceedsMaximumSafeInteger = "error_lengthExceedsMaximumSafeInteger",
|
|
28
|
-
Error_BufferIsTooShortForDeclaredDataLength = "error_bufferIsTooShortForDeclaredDataLength",
|
|
29
|
-
Error_InvalidChecksumConstants = "error_invalidChecksumConstants",
|
|
30
|
-
Error_InvalidAESKeyLength = "error_invalidAESKeyLength",
|
|
31
|
-
Error_CannotEncryptEmptyData = "error_cannotEncryptEmptyData",
|
|
32
|
-
Error_CannotDecryptEmptyData = "error_cannotDecryptEmptyData",
|
|
33
|
-
Error_InvalidIVLength = "error_invalidIVLength",
|
|
34
|
-
Error_MessageTooLarge = "error_messageTooLarge",
|
|
35
|
-
Error_EncryptedSizeExceedsExpected = "error_encryptedSizeExceedsExpected",
|
|
36
|
-
Error_Pbkdf2_InvalidSaltLength = "error_pbkdf2_invalid_salt_length",
|
|
37
|
-
Error_Pbkdf2_InvalidHashLength = "error_pbkdf2_invalid_hash_length",
|
|
38
|
-
Error_Builder_ECIESServiceMustBeSetBeforeGeneratingMnemonic = "error_builder_ecies_service_must_be_set_before_generating_mnemonic",
|
|
39
|
-
Error_Builder_ECIESServiceIsRequired = "error_builder_ecies_service_is_required",
|
|
40
|
-
Error_Builder_TypeNameAndEmailAreRequired = "error_builder_type_name_and_email_are_required",
|
|
41
|
-
Error_Stream_InvalidPublicKeyLength = "error_stream_invalid_public_key_length",
|
|
42
|
-
Error_Stream_EncryptionCancelled = "error_stream_encryption_cancelled",
|
|
43
|
-
Error_Stream_BufferOverflow = "error_stream_buffer_overflow",
|
|
44
|
-
Error_Stream_AtLeastOneRecipientRequired = "error_stream_at_least_one_recipient_required",
|
|
45
|
-
Error_Stream_MaxRecipientsExceeded = "error_stream_max_recipients_exceeded",
|
|
46
|
-
Error_Stream_InvalidRecipientPublicKeyLength = "error_stream_invalid_recipient_public_key_length",
|
|
47
|
-
Error_Stream_InvalidRecipientIdLength = "error_stream_invalid_recipient_id_length",
|
|
48
|
-
Error_Stream_InvalidPrivateKeyLength = "error_stream_invalid_private_key_length",
|
|
49
|
-
Error_Stream_DecryptionCancelled = "error_stream_decryption_cancelled",
|
|
50
|
-
Error_Stream_ChunkSequenceError = "error_stream_chunk_sequence_error"
|
|
51
|
-
}
|
|
52
|
-
export declare const NodeEciesComponentId = "node-ecies";
|
|
2
|
+
import { NodeEciesStringKey, NodeEciesComponentId } from './node-keys';
|
|
3
|
+
export { NodeEciesStringKey, NodeEciesComponentId };
|
|
53
4
|
/**
|
|
54
5
|
* Component definition for Node ECIES strings
|
|
55
6
|
*/
|
|
@@ -74,5 +25,4 @@ export declare function getNodeEciesTranslation(key: NodeEciesStringKey, variabl
|
|
|
74
25
|
* Cast to any to handle cross-package type compatibility
|
|
75
26
|
*/
|
|
76
27
|
export declare function createEciesTranslationEngine(config?: EngineConfig): any;
|
|
77
|
-
export { NodeEciesStringKey };
|
|
78
28
|
//# sourceMappingURL=ecies-i18n-factory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecies-i18n-factory.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/i18n/ecies-i18n-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EAErB,gBAAgB,EAEhB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACb,MAAM,2BAA2B,CAAC;AAGnC
|
|
1
|
+
{"version":3,"file":"ecies-i18n-factory.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/i18n/ecies-i18n-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EAErB,gBAAgB,EAEhB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACb,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAKvE,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAC;AAIpD;;GAEG;AACH,wBAAgB,kCAAkC,IAAI,mBAAmB,CAAC,kBAAkB,CAAC,CAO5F;AAED,wBAAgB,oCAAoC,IAAI,qBAAqB,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAgBxG;AAOD;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,GAAG,gBAAgB,CAAC,gBAAgB,CAAC,CAkBrH;AAED;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAEjD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,kBAAkB,EACvB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EAC3C,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,MAAM,CAKR;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,GAAG,CAEvE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.NodeEciesComponentId = exports.NodeEciesStringKey = void 0;
|
|
4
4
|
exports.createNodeEciesComponentDefinition = createNodeEciesComponentDefinition;
|
|
5
5
|
exports.createNodeEciesComponentRegistration = createNodeEciesComponentRegistration;
|
|
6
6
|
exports.getEciesPluginI18nEngine = getEciesPluginI18nEngine;
|
|
@@ -9,64 +9,10 @@ exports.getNodeEciesTranslation = getNodeEciesTranslation;
|
|
|
9
9
|
exports.createEciesTranslationEngine = createEciesTranslationEngine;
|
|
10
10
|
const i18n_lib_1 = require("@digitaldefiance/i18n-lib");
|
|
11
11
|
const ecies_lib_1 = require("@digitaldefiance/ecies-lib");
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
(function (NodeEciesStringKey) {
|
|
17
|
-
NodeEciesStringKey["Error_LengthError_LengthIsInvalidType"] = "error_length_error_length_is_invalid_type";
|
|
18
|
-
// Member errors
|
|
19
|
-
NodeEciesStringKey["Error_Member_MissingMemberName"] = "error_member_missing_member_name";
|
|
20
|
-
NodeEciesStringKey["Error_Member_InvalidMemberNameWhitespace"] = "error_member_invalid_member_name_whitespace";
|
|
21
|
-
NodeEciesStringKey["Error_Member_NoWallet"] = "error_member_no_wallet";
|
|
22
|
-
NodeEciesStringKey["Error_Member_WalletAlreadyLoaded"] = "error_member_wallet_already_loaded";
|
|
23
|
-
NodeEciesStringKey["Error_Member_InvalidMnemonic"] = "error_member_invalid_mnemonic";
|
|
24
|
-
NodeEciesStringKey["Error_Member_MissingPrivateKey"] = "error_member_missing_private_key";
|
|
25
|
-
NodeEciesStringKey["Error_Member_MissingEncryptionData"] = "error_member_missing_encryption_data";
|
|
26
|
-
NodeEciesStringKey["Error_Member_EncryptionDataTooLarge"] = "error_member_encryption_data_too_large";
|
|
27
|
-
NodeEciesStringKey["Error_Member_MissingEmail"] = "error_member_missing_email";
|
|
28
|
-
NodeEciesStringKey["Error_Member_InvalidEmailWhitespace"] = "error_member_invalid_email_whitespace";
|
|
29
|
-
NodeEciesStringKey["Error_InvalidPublicKey"] = "error_invalidPublicKey";
|
|
30
|
-
NodeEciesStringKey["Error_InvalidPublicKeyFormat"] = "error_invalidPublicKeyFormat";
|
|
31
|
-
NodeEciesStringKey["Error_MessageLengthExceedsMaximumAllowedSize"] = "error_messageLengthExceedsMaximumAllowedSize";
|
|
32
|
-
NodeEciesStringKey["Error_InvalidEncryptionTypeOrNumberOfRecipients"] = "error_invalidEncryptionTypeOrNumberOfRecipients";
|
|
33
|
-
NodeEciesStringKey["Error_EncryptedDataLengthMismatch"] = "error_encryptedDataLengthMismatch";
|
|
34
|
-
NodeEciesStringKey["Error_EphemeralPublicKeyLengthMismatch"] = "error_ephemeralPublicKeyLengthMismatch";
|
|
35
|
-
NodeEciesStringKey["Error_EncryptedDataIsEmpty"] = "error_encryptedDataIsEmpty";
|
|
36
|
-
NodeEciesStringKey["Error_CombinedDataTooShort"] = "error_combinedDataTooShort";
|
|
37
|
-
NodeEciesStringKey["Error_BufferIsTooShort"] = "error_bufferIsTooShort";
|
|
38
|
-
NodeEciesStringKey["Error_BufferIsTooShortToReadFullLengthValue"] = "error_bufferIsTooShortToReadFullLengthValue";
|
|
39
|
-
NodeEciesStringKey["Error_LengthExceedsMaximumSafeInteger"] = "error_lengthExceedsMaximumSafeInteger";
|
|
40
|
-
NodeEciesStringKey["Error_BufferIsTooShortForDeclaredDataLength"] = "error_bufferIsTooShortForDeclaredDataLength";
|
|
41
|
-
NodeEciesStringKey["Error_InvalidChecksumConstants"] = "error_invalidChecksumConstants";
|
|
42
|
-
// AES-GCM security errors
|
|
43
|
-
NodeEciesStringKey["Error_InvalidAESKeyLength"] = "error_invalidAESKeyLength";
|
|
44
|
-
NodeEciesStringKey["Error_CannotEncryptEmptyData"] = "error_cannotEncryptEmptyData";
|
|
45
|
-
NodeEciesStringKey["Error_CannotDecryptEmptyData"] = "error_cannotDecryptEmptyData";
|
|
46
|
-
NodeEciesStringKey["Error_InvalidIVLength"] = "error_invalidIVLength";
|
|
47
|
-
NodeEciesStringKey["Error_MessageTooLarge"] = "error_messageTooLarge";
|
|
48
|
-
NodeEciesStringKey["Error_EncryptedSizeExceedsExpected"] = "error_encryptedSizeExceedsExpected";
|
|
49
|
-
// PBKDF2 errors
|
|
50
|
-
NodeEciesStringKey["Error_Pbkdf2_InvalidSaltLength"] = "error_pbkdf2_invalid_salt_length";
|
|
51
|
-
NodeEciesStringKey["Error_Pbkdf2_InvalidHashLength"] = "error_pbkdf2_invalid_hash_length";
|
|
52
|
-
// Builder errors
|
|
53
|
-
NodeEciesStringKey["Error_Builder_ECIESServiceMustBeSetBeforeGeneratingMnemonic"] = "error_builder_ecies_service_must_be_set_before_generating_mnemonic";
|
|
54
|
-
NodeEciesStringKey["Error_Builder_ECIESServiceIsRequired"] = "error_builder_ecies_service_is_required";
|
|
55
|
-
NodeEciesStringKey["Error_Builder_TypeNameAndEmailAreRequired"] = "error_builder_type_name_and_email_are_required";
|
|
56
|
-
// Streaming errors
|
|
57
|
-
NodeEciesStringKey["Error_Stream_InvalidPublicKeyLength"] = "error_stream_invalid_public_key_length";
|
|
58
|
-
NodeEciesStringKey["Error_Stream_EncryptionCancelled"] = "error_stream_encryption_cancelled";
|
|
59
|
-
NodeEciesStringKey["Error_Stream_BufferOverflow"] = "error_stream_buffer_overflow";
|
|
60
|
-
NodeEciesStringKey["Error_Stream_AtLeastOneRecipientRequired"] = "error_stream_at_least_one_recipient_required";
|
|
61
|
-
NodeEciesStringKey["Error_Stream_MaxRecipientsExceeded"] = "error_stream_max_recipients_exceeded";
|
|
62
|
-
NodeEciesStringKey["Error_Stream_InvalidRecipientPublicKeyLength"] = "error_stream_invalid_recipient_public_key_length";
|
|
63
|
-
NodeEciesStringKey["Error_Stream_InvalidRecipientIdLength"] = "error_stream_invalid_recipient_id_length";
|
|
64
|
-
NodeEciesStringKey["Error_Stream_InvalidPrivateKeyLength"] = "error_stream_invalid_private_key_length";
|
|
65
|
-
NodeEciesStringKey["Error_Stream_DecryptionCancelled"] = "error_stream_decryption_cancelled";
|
|
66
|
-
NodeEciesStringKey["Error_Stream_ChunkSequenceError"] = "error_stream_chunk_sequence_error";
|
|
67
|
-
})(NodeEciesStringKey || (exports.NodeEciesStringKey = NodeEciesStringKey = {}));
|
|
68
|
-
exports.NodeEciesComponentId = 'node-ecies';
|
|
69
|
-
// Import translations after enum is defined
|
|
12
|
+
const node_keys_1 = require("./node-keys");
|
|
13
|
+
Object.defineProperty(exports, "NodeEciesStringKey", { enumerable: true, get: function () { return node_keys_1.NodeEciesStringKey; } });
|
|
14
|
+
Object.defineProperty(exports, "NodeEciesComponentId", { enumerable: true, get: function () { return node_keys_1.NodeEciesComponentId; } });
|
|
15
|
+
// Import translations
|
|
70
16
|
const en_US_1 = require("./translations/en-US");
|
|
71
17
|
const en_GB_1 = require("./translations/en-GB");
|
|
72
18
|
const translations_1 = require("./translations");
|
|
@@ -75,9 +21,9 @@ const translations_1 = require("./translations");
|
|
|
75
21
|
*/
|
|
76
22
|
function createNodeEciesComponentDefinition() {
|
|
77
23
|
const NodeEciesComponent = {
|
|
78
|
-
id:
|
|
24
|
+
id: node_keys_1.NodeEciesComponentId,
|
|
79
25
|
name: 'Node ECIES Library Strings',
|
|
80
|
-
stringKeys: Object.values(NodeEciesStringKey),
|
|
26
|
+
stringKeys: Object.values(node_keys_1.NodeEciesStringKey),
|
|
81
27
|
};
|
|
82
28
|
return NodeEciesComponent;
|
|
83
29
|
}
|
|
@@ -109,7 +55,7 @@ let eciesI18nEngineInstance = null;
|
|
|
109
55
|
function getEciesPluginI18nEngine(config) {
|
|
110
56
|
if (!eciesI18nEngineInstance) {
|
|
111
57
|
// Create core engine with system strings
|
|
112
|
-
eciesI18nEngineInstance = (0, i18n_lib_1.createCoreI18nEngine)(
|
|
58
|
+
eciesI18nEngineInstance = (0, i18n_lib_1.createCoreI18nEngine)(node_keys_1.NodeEciesComponentId, config);
|
|
113
59
|
const result = eciesI18nEngineInstance.registerComponent(createNodeEciesComponentRegistration());
|
|
114
60
|
if (!result.isValid) {
|
|
115
61
|
console.warn('Node ECIES component registration incomplete:', result.missingKeys);
|
|
@@ -130,7 +76,7 @@ function getNodeEciesTranslation(key, variables, language) {
|
|
|
130
76
|
// Import here to avoid circular dependency
|
|
131
77
|
const { getNodeEciesI18nEngine } = require('../i18n/node-ecies-i18n-setup');
|
|
132
78
|
const engine = getNodeEciesI18nEngine();
|
|
133
|
-
return engine.translate(
|
|
79
|
+
return engine.translate(node_keys_1.NodeEciesComponentId, key, variables, language);
|
|
134
80
|
}
|
|
135
81
|
/**
|
|
136
82
|
* Get the ECIES PluginI18nEngine for use in node-ecies services
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecies-i18n-factory.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/i18n/ecies-i18n-factory.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ecies-i18n-factory.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/i18n/ecies-i18n-factory.ts"],"names":[],"mappings":";;;AAwBA,gFAOC;AAED,oFAgBC;AAWD,4DAkBC;AAKD,gEAEC;AAKD,0DASC;AAOD,oEAEC;AA5GD,wDASmC;AACnC,0DAAgE;AAEhE,2CAAuE;AAK9D,mGALA,8BAAkB,OAKA;AAAE,qGALA,gCAAoB,OAKA;AAHjD,sBAAsB;AACtB,gDAA2D;AAG3D,gDAAkE;AAClE,iDAAgK;AAEhK;;GAEG;AACH,SAAgB,kCAAkC;IAChD,MAAM,kBAAkB,GAA4C;QAClE,EAAE,EAAE,gCAAoB;QACxB,IAAI,EAAE,4BAA4B;QAClC,UAAU,EAAE,MAAM,CAAC,MAAM,CAAC,8BAAkB,CAAC;KAC9C,CAAC;IACF,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAAA,CAAC;AAEF,SAAgB,oCAAoC;IAClD,MAAM,SAAS,GAAG,kCAAkC,EAAE,CAAC;IAEvD,OAAO;QACL,SAAS;QACT,OAAO,EAAE;YACP,CAAC,wBAAa,CAAC,KAAK,CAAC,EAAE,2BAAmB;YAC1C,CAAC,wBAAa,CAAC,KAAK,CAAC,EAAE,kCAA0B;YACjD,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,iCAAkB;YACtC,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,kCAAmB;YACvC,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,iCAAkB;YACtC,CAAC,wBAAa,CAAC,KAAK,CAAC,EAAE,mCAAoB;YAC3C,CAAC,w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/i18n/node-ecies-i18n-setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAiB,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"node-ecies-i18n-setup.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/i18n/node-ecies-i18n-setup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAiB,MAAM,2BAA2B,CAAC;AAgBrG,wBAAgB,sBAAsB,CAAC,MAAM,CAAC,EAAE,YAAY,GAAG,UAAU,CAYxE;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C;AAED,wBAAgB,8BAA8B,IAAI,eAAe,CAMhE"}
|
|
@@ -5,8 +5,7 @@ exports.resetNodeEciesI18nEngine = resetNodeEciesI18nEngine;
|
|
|
5
5
|
exports.createNodeEciesComponentConfig = createNodeEciesComponentConfig;
|
|
6
6
|
const ecies_lib_1 = require("@digitaldefiance/ecies-lib");
|
|
7
7
|
const i18n_lib_1 = require("@digitaldefiance/i18n-lib");
|
|
8
|
-
const
|
|
9
|
-
const ecies_i18n_factory_2 = require("./ecies-i18n-factory");
|
|
8
|
+
const node_keys_1 = require("./node-keys");
|
|
10
9
|
const translations_1 = require("./translations");
|
|
11
10
|
let _nodeEciesI18nEngine = null;
|
|
12
11
|
let _componentRegistered = false;
|
|
@@ -19,7 +18,7 @@ function getNodeEciesI18nEngine(config) {
|
|
|
19
18
|
_componentRegistered = true;
|
|
20
19
|
}
|
|
21
20
|
_nodeEciesI18nEngine = baseEngine;
|
|
22
|
-
return
|
|
21
|
+
return baseEngine;
|
|
23
22
|
}
|
|
24
23
|
function resetNodeEciesI18nEngine() {
|
|
25
24
|
_nodeEciesI18nEngine = null;
|
|
@@ -27,62 +26,15 @@ function resetNodeEciesI18nEngine() {
|
|
|
27
26
|
}
|
|
28
27
|
function createNodeEciesComponentConfig() {
|
|
29
28
|
return {
|
|
30
|
-
id:
|
|
29
|
+
id: node_keys_1.NodeEciesComponentId,
|
|
31
30
|
strings: createNodeEciesStrings(),
|
|
32
31
|
aliases: ['NodeEciesStringKey'],
|
|
33
32
|
};
|
|
34
33
|
}
|
|
35
34
|
function createNodeEciesStrings() {
|
|
36
|
-
const englishTranslations = {
|
|
37
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_LengthError_LengthIsInvalidType]: 'Length encoding type is invalid',
|
|
38
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Member_MissingMemberName]: 'Member name is required',
|
|
39
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Member_InvalidMemberNameWhitespace]: 'Member name cannot have leading or trailing whitespace',
|
|
40
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Member_NoWallet]: 'No wallet available',
|
|
41
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Member_WalletAlreadyLoaded]: 'Wallet is already loaded',
|
|
42
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Member_InvalidMnemonic]: 'Invalid mnemonic phrase',
|
|
43
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Member_MissingPrivateKey]: 'Private key is missing',
|
|
44
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Member_MissingEncryptionData]: 'Encryption data is missing',
|
|
45
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Member_EncryptionDataTooLarge]: 'Encryption data is too large',
|
|
46
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Member_MissingEmail]: 'Email address is required',
|
|
47
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Member_InvalidEmailWhitespace]: 'Email address cannot have leading or trailing whitespace',
|
|
48
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_InvalidPublicKey]: 'Received null or undefined public key',
|
|
49
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_InvalidPublicKeyFormat]: 'Invalid public key format or length',
|
|
50
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_MessageLengthExceedsMaximumAllowedSize]: 'Message length exceeds maximum allowed size',
|
|
51
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_InvalidEncryptionTypeOrNumberOfRecipients]: 'Invalid encryption type or number of recipients',
|
|
52
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_EncryptedDataLengthMismatch]: 'Encrypted data length mismatch',
|
|
53
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_EphemeralPublicKeyLengthMismatch]: 'Ephemeral public key has incorrect length after normalization',
|
|
54
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_EncryptedDataIsEmpty]: 'Encrypted data is empty',
|
|
55
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_CombinedDataTooShort]: 'Combined data is too short to contain required components',
|
|
56
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_BufferIsTooShort]: 'Buffer is too short to read length type.',
|
|
57
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_BufferIsTooShortToReadFullLengthValue]: 'Buffer is too short to read the full length value.',
|
|
58
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_LengthExceedsMaximumSafeInteger]: 'Length exceeds maximum safe integer value',
|
|
59
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_BufferIsTooShortForDeclaredDataLength]: 'Buffer is too short for declared data length',
|
|
60
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_InvalidChecksumConstants]: 'Invalid checksum constants',
|
|
61
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_InvalidAESKeyLength]: 'AES key must be 16, 24, or 32 bytes',
|
|
62
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_CannotEncryptEmptyData]: 'Cannot encrypt null or undefined data',
|
|
63
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_CannotDecryptEmptyData]: 'Cannot decrypt null or undefined data',
|
|
64
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_InvalidIVLength]: 'IV must be 16 bytes',
|
|
65
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_MessageTooLarge]: 'Message exceeds maximum size of 2GB',
|
|
66
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_EncryptedSizeExceedsExpected]: 'Encrypted data size exceeds expected maximum',
|
|
67
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Pbkdf2_InvalidSaltLength]: 'Invalid salt length',
|
|
68
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Pbkdf2_InvalidHashLength]: 'Invalid hash length',
|
|
69
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Builder_ECIESServiceMustBeSetBeforeGeneratingMnemonic]: 'ECIESService must be set before generating mnemonic',
|
|
70
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Builder_ECIESServiceIsRequired]: 'ECIESService is required',
|
|
71
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Builder_TypeNameAndEmailAreRequired]: 'Type, name, and email are required',
|
|
72
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Stream_InvalidPublicKeyLength]: 'Invalid public key: must be 33 (compressed) or 65 (uncompressed) bytes',
|
|
73
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Stream_EncryptionCancelled]: 'Encryption cancelled',
|
|
74
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Stream_BufferOverflow]: 'Buffer overflow: source chunk exceeds maximum size',
|
|
75
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Stream_AtLeastOneRecipientRequired]: 'At least one recipient required',
|
|
76
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Stream_MaxRecipientsExceeded]: 'Maximum 65535 recipients supported',
|
|
77
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Stream_InvalidRecipientPublicKeyLength]: 'Invalid recipient public key: must be 33 (compressed) or 65 (uncompressed) bytes',
|
|
78
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Stream_InvalidRecipientIdLength]: 'Invalid recipient ID: must be 32 bytes',
|
|
79
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Stream_InvalidPrivateKeyLength]: 'Invalid private key: must be 32 bytes',
|
|
80
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Stream_DecryptionCancelled]: 'Decryption cancelled',
|
|
81
|
-
[ecies_i18n_factory_2.NodeEciesStringKey.Error_Stream_ChunkSequenceError]: 'Chunk sequence error',
|
|
82
|
-
};
|
|
83
35
|
return {
|
|
84
|
-
[i18n_lib_1.LanguageCodes.EN_US]: englishTranslations,
|
|
85
|
-
[i18n_lib_1.LanguageCodes.EN_GB]:
|
|
36
|
+
[i18n_lib_1.LanguageCodes.EN_US]: translations_1.englishTranslations,
|
|
37
|
+
[i18n_lib_1.LanguageCodes.EN_GB]: translations_1.britishEnglishTranslations,
|
|
86
38
|
[i18n_lib_1.LanguageCodes.FR]: translations_1.frenchTranslations,
|
|
87
39
|
[i18n_lib_1.LanguageCodes.ES]: translations_1.spanishTranslations,
|
|
88
40
|
[i18n_lib_1.LanguageCodes.DE]: translations_1.germanTranslations,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-ecies-i18n-setup.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/i18n/node-ecies-i18n-setup.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"node-ecies-i18n-setup.js","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/i18n/node-ecies-i18n-setup.ts"],"names":[],"mappings":";;AAiBA,wDAYC;AAED,4DAGC;AAED,wEAMC;AA1CD,0DAAgE;AAChE,wDAAqG;AACrG,2CAAuE;AACvE,iDASwB;AAExB,IAAI,oBAAoB,GAAsB,IAAI,CAAC;AACnD,IAAI,oBAAoB,GAAG,KAAK,CAAC;AAEjC,SAAgB,sBAAsB,CAAC,MAAqB;IAC1D,6CAA6C;IAC7C,MAAM,UAAU,GAAG,IAAA,8BAAkB,EAAC,MAAM,CAAC,CAAC;IAE9C,0DAA0D;IAC1D,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC1B,UAAU,CAAC,mBAAmB,CAAC,8BAA8B,EAAE,CAAC,CAAC;QACjE,oBAAoB,GAAG,IAAI,CAAC;IAC9B,CAAC;IAED,oBAAoB,GAAG,UAAU,CAAC;IAClC,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAgB,wBAAwB;IACtC,oBAAoB,GAAG,IAAI,CAAC;IAC5B,oBAAoB,GAAG,KAAK,CAAC;AAC/B,CAAC;AAED,SAAgB,8BAA8B;IAC5C,OAAO;QACL,EAAE,EAAE,gCAAoB;QACxB,OAAO,EAAE,sBAAsB,EAAE;QACjC,OAAO,EAAE,CAAE,oBAAoB,CAAE;KAClC,CAAC;AACJ,CAAC;AAED,SAAS,sBAAsB;IAC7B,OAAO;QACL,CAAC,wBAAa,CAAC,KAAK,CAAC,EAAE,kCAAmB;QAC1C,CAAC,wBAAa,CAAC,KAAK,CAAC,EAAE,yCAA0B;QACjD,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,iCAAkB;QACtC,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,kCAAmB;QACvC,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,iCAAkB;QACtC,CAAC,wBAAa,CAAC,KAAK,CAAC,EAAE,mCAAoB;QAC3C,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,mCAAoB;QACxC,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,oCAAqB;KAC1C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ECIES-specific string keys for the node ECIES library
|
|
3
|
+
*/
|
|
4
|
+
export declare enum NodeEciesStringKey {
|
|
5
|
+
Error_LengthError_LengthIsInvalidType = "error_length_error_length_is_invalid_type",
|
|
6
|
+
Error_Member_MissingMemberName = "error_member_missing_member_name",
|
|
7
|
+
Error_Member_InvalidMemberNameWhitespace = "error_member_invalid_member_name_whitespace",
|
|
8
|
+
Error_Member_NoWallet = "error_member_no_wallet",
|
|
9
|
+
Error_Member_WalletAlreadyLoaded = "error_member_wallet_already_loaded",
|
|
10
|
+
Error_Member_InvalidMnemonic = "error_member_invalid_mnemonic",
|
|
11
|
+
Error_Member_MissingPrivateKey = "error_member_missing_private_key",
|
|
12
|
+
Error_Member_MissingEncryptionData = "error_member_missing_encryption_data",
|
|
13
|
+
Error_Member_EncryptionDataTooLarge = "error_member_encryption_data_too_large",
|
|
14
|
+
Error_Member_MissingEmail = "error_member_missing_email",
|
|
15
|
+
Error_Member_InvalidEmailWhitespace = "error_member_invalid_email_whitespace",
|
|
16
|
+
Error_InvalidPublicKey = "error_invalidPublicKey",
|
|
17
|
+
Error_InvalidPublicKeyFormat = "error_invalidPublicKeyFormat",
|
|
18
|
+
Error_MessageLengthExceedsMaximumAllowedSize = "error_messageLengthExceedsMaximumAllowedSize",
|
|
19
|
+
Error_InvalidEncryptionTypeOrNumberOfRecipients = "error_invalidEncryptionTypeOrNumberOfRecipients",
|
|
20
|
+
Error_EncryptedDataLengthMismatch = "error_encryptedDataLengthMismatch",
|
|
21
|
+
Error_EphemeralPublicKeyLengthMismatch = "error_ephemeralPublicKeyLengthMismatch",
|
|
22
|
+
Error_EncryptedDataIsEmpty = "error_encryptedDataIsEmpty",
|
|
23
|
+
Error_CombinedDataTooShort = "error_combinedDataTooShort",
|
|
24
|
+
Error_BufferIsTooShort = "error_bufferIsTooShort",
|
|
25
|
+
Error_BufferIsTooShortToReadFullLengthValue = "error_bufferIsTooShortToReadFullLengthValue",
|
|
26
|
+
Error_LengthExceedsMaximumSafeInteger = "error_lengthExceedsMaximumSafeInteger",
|
|
27
|
+
Error_BufferIsTooShortForDeclaredDataLength = "error_bufferIsTooShortForDeclaredDataLength",
|
|
28
|
+
Error_InvalidChecksumConstants = "error_invalidChecksumConstants",
|
|
29
|
+
Error_InvalidAESKeyLength = "error_invalidAESKeyLength",
|
|
30
|
+
Error_CannotEncryptEmptyData = "error_cannotEncryptEmptyData",
|
|
31
|
+
Error_CannotDecryptEmptyData = "error_cannotDecryptEmptyData",
|
|
32
|
+
Error_InvalidIVLength = "error_invalidIVLength",
|
|
33
|
+
Error_MessageTooLarge = "error_messageTooLarge",
|
|
34
|
+
Error_EncryptedSizeExceedsExpected = "error_encryptedSizeExceedsExpected",
|
|
35
|
+
Error_Pbkdf2_InvalidSaltLength = "error_pbkdf2_invalid_salt_length",
|
|
36
|
+
Error_Pbkdf2_InvalidHashLength = "error_pbkdf2_invalid_hash_length",
|
|
37
|
+
Error_Builder_ECIESServiceMustBeSetBeforeGeneratingMnemonic = "error_builder_ecies_service_must_be_set_before_generating_mnemonic",
|
|
38
|
+
Error_Builder_ECIESServiceIsRequired = "error_builder_ecies_service_is_required",
|
|
39
|
+
Error_Builder_TypeNameAndEmailAreRequired = "error_builder_type_name_and_email_are_required",
|
|
40
|
+
Error_Stream_InvalidPublicKeyLength = "error_stream_invalid_public_key_length",
|
|
41
|
+
Error_Stream_EncryptionCancelled = "error_stream_encryption_cancelled",
|
|
42
|
+
Error_Stream_BufferOverflow = "error_stream_buffer_overflow",
|
|
43
|
+
Error_Stream_AtLeastOneRecipientRequired = "error_stream_at_least_one_recipient_required",
|
|
44
|
+
Error_Stream_MaxRecipientsExceeded = "error_stream_max_recipients_exceeded",
|
|
45
|
+
Error_Stream_InvalidRecipientPublicKeyLength = "error_stream_invalid_recipient_public_key_length",
|
|
46
|
+
Error_Stream_InvalidRecipientIdLength = "error_stream_invalid_recipient_id_length",
|
|
47
|
+
Error_Stream_InvalidPrivateKeyLength = "error_stream_invalid_private_key_length",
|
|
48
|
+
Error_Stream_DecryptionCancelled = "error_stream_decryption_cancelled",
|
|
49
|
+
Error_Stream_ChunkSequenceError = "error_stream_chunk_sequence_error",
|
|
50
|
+
Error_Invariant_ConfigurationValidationFailedTemplate = "error_invariant_configuration_validation_failed_template",
|
|
51
|
+
Error_Invariant_NodeRecipientIdConsistency_FailedTemplate = "error_invariant_node_recipient_id_consistency_failed_template",
|
|
52
|
+
Error_Invariant_MemberIdLengthMismatchTemplate = "error_invariant_member_id_length_mismatch_template",
|
|
53
|
+
Error_Invariant_EciesMultipleRecipientIdSizeMismatchTemplate = "error_invariant_ecies_multiple_recipient_id_size_mismatch_template",
|
|
54
|
+
Error_Invariant_EncryptionRecipientIdSizeMismatchTemplate = "error_invariant_encryption_recipient_id_size_mismatch_template"
|
|
55
|
+
}
|
|
56
|
+
export declare const NodeEciesComponentId = "node-ecies";
|
|
57
|
+
//# sourceMappingURL=node-keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-keys.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-node-ecies-lib/src/i18n/node-keys.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,kBAAkB;IAC5B,qCAAqC,8CAA8C;IAGnF,8BAA8B,qCAAqC;IACnE,wCAAwC,gDAAgD;IACxF,qBAAqB,2BAA2B;IAChD,gCAAgC,uCAAuC;IACvE,4BAA4B,kCAAkC;IAC9D,8BAA8B,qCAAqC;IACnE,kCAAkC,yCAAyC;IAC3E,mCAAmC,2CAA2C;IAC9E,yBAAyB,+BAA+B;IACxD,mCAAmC,0CAA0C;IAC7E,sBAAsB,2BAA2B;IACjD,4BAA4B,iCAAiC;IAC7D,4CAA4C,iDAAiD;IAC7F,+CAA+C,oDAAoD;IACnG,iCAAiC,sCAAsC;IACvE,sCAAsC,2CAA2C;IACjF,0BAA0B,+BAA+B;IACzD,0BAA0B,+BAA+B;IACzD,sBAAsB,2BAA2B;IACjD,2CAA2C,gDAAgD;IAC3F,qCAAqC,0CAA0C;IAC/E,2CAA2C,gDAAgD;IAC3F,8BAA8B,mCAAmC;IAGjE,yBAAyB,8BAA8B;IACvD,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;IAC7D,qBAAqB,0BAA0B;IAC/C,qBAAqB,0BAA0B;IAC/C,kCAAkC,uCAAuC;IAGzE,8BAA8B,qCAAqC;IACnE,8BAA8B,qCAAqC;IAGnE,2DAA2D,uEAAuE;IAClI,oCAAoC,4CAA4C;IAChF,yCAAyC,mDAAmD;IAG5F,mCAAmC,2CAA2C;IAC9E,gCAAgC,sCAAsC;IACtE,2BAA2B,iCAAiC;IAC5D,wCAAwC,iDAAiD;IACzF,kCAAkC,yCAAyC;IAC3E,4CAA4C,qDAAqD;IACjG,qCAAqC,6CAA6C;IAClF,oCAAoC,4CAA4C;IAChF,gCAAgC,sCAAsC;IACtE,+BAA+B,sCAAsC;IAGrE,qDAAqD,6DAA6D;IAClH,yDAAyD,kEAAkE;IAC3H,8CAA8C,uDAAuD;IACrG,4DAA4D,uEAAuE;IACnI,yDAAyD,mEAAmE;CAC7H;AAED,eAAO,MAAM,oBAAoB,eAAe,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeEciesComponentId = exports.NodeEciesStringKey = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* ECIES-specific string keys for the node ECIES library
|
|
6
|
+
*/
|
|
7
|
+
var NodeEciesStringKey;
|
|
8
|
+
(function (NodeEciesStringKey) {
|
|
9
|
+
NodeEciesStringKey["Error_LengthError_LengthIsInvalidType"] = "error_length_error_length_is_invalid_type";
|
|
10
|
+
// Member errors
|
|
11
|
+
NodeEciesStringKey["Error_Member_MissingMemberName"] = "error_member_missing_member_name";
|
|
12
|
+
NodeEciesStringKey["Error_Member_InvalidMemberNameWhitespace"] = "error_member_invalid_member_name_whitespace";
|
|
13
|
+
NodeEciesStringKey["Error_Member_NoWallet"] = "error_member_no_wallet";
|
|
14
|
+
NodeEciesStringKey["Error_Member_WalletAlreadyLoaded"] = "error_member_wallet_already_loaded";
|
|
15
|
+
NodeEciesStringKey["Error_Member_InvalidMnemonic"] = "error_member_invalid_mnemonic";
|
|
16
|
+
NodeEciesStringKey["Error_Member_MissingPrivateKey"] = "error_member_missing_private_key";
|
|
17
|
+
NodeEciesStringKey["Error_Member_MissingEncryptionData"] = "error_member_missing_encryption_data";
|
|
18
|
+
NodeEciesStringKey["Error_Member_EncryptionDataTooLarge"] = "error_member_encryption_data_too_large";
|
|
19
|
+
NodeEciesStringKey["Error_Member_MissingEmail"] = "error_member_missing_email";
|
|
20
|
+
NodeEciesStringKey["Error_Member_InvalidEmailWhitespace"] = "error_member_invalid_email_whitespace";
|
|
21
|
+
NodeEciesStringKey["Error_InvalidPublicKey"] = "error_invalidPublicKey";
|
|
22
|
+
NodeEciesStringKey["Error_InvalidPublicKeyFormat"] = "error_invalidPublicKeyFormat";
|
|
23
|
+
NodeEciesStringKey["Error_MessageLengthExceedsMaximumAllowedSize"] = "error_messageLengthExceedsMaximumAllowedSize";
|
|
24
|
+
NodeEciesStringKey["Error_InvalidEncryptionTypeOrNumberOfRecipients"] = "error_invalidEncryptionTypeOrNumberOfRecipients";
|
|
25
|
+
NodeEciesStringKey["Error_EncryptedDataLengthMismatch"] = "error_encryptedDataLengthMismatch";
|
|
26
|
+
NodeEciesStringKey["Error_EphemeralPublicKeyLengthMismatch"] = "error_ephemeralPublicKeyLengthMismatch";
|
|
27
|
+
NodeEciesStringKey["Error_EncryptedDataIsEmpty"] = "error_encryptedDataIsEmpty";
|
|
28
|
+
NodeEciesStringKey["Error_CombinedDataTooShort"] = "error_combinedDataTooShort";
|
|
29
|
+
NodeEciesStringKey["Error_BufferIsTooShort"] = "error_bufferIsTooShort";
|
|
30
|
+
NodeEciesStringKey["Error_BufferIsTooShortToReadFullLengthValue"] = "error_bufferIsTooShortToReadFullLengthValue";
|
|
31
|
+
NodeEciesStringKey["Error_LengthExceedsMaximumSafeInteger"] = "error_lengthExceedsMaximumSafeInteger";
|
|
32
|
+
NodeEciesStringKey["Error_BufferIsTooShortForDeclaredDataLength"] = "error_bufferIsTooShortForDeclaredDataLength";
|
|
33
|
+
NodeEciesStringKey["Error_InvalidChecksumConstants"] = "error_invalidChecksumConstants";
|
|
34
|
+
// AES-GCM security errors
|
|
35
|
+
NodeEciesStringKey["Error_InvalidAESKeyLength"] = "error_invalidAESKeyLength";
|
|
36
|
+
NodeEciesStringKey["Error_CannotEncryptEmptyData"] = "error_cannotEncryptEmptyData";
|
|
37
|
+
NodeEciesStringKey["Error_CannotDecryptEmptyData"] = "error_cannotDecryptEmptyData";
|
|
38
|
+
NodeEciesStringKey["Error_InvalidIVLength"] = "error_invalidIVLength";
|
|
39
|
+
NodeEciesStringKey["Error_MessageTooLarge"] = "error_messageTooLarge";
|
|
40
|
+
NodeEciesStringKey["Error_EncryptedSizeExceedsExpected"] = "error_encryptedSizeExceedsExpected";
|
|
41
|
+
// PBKDF2 errors
|
|
42
|
+
NodeEciesStringKey["Error_Pbkdf2_InvalidSaltLength"] = "error_pbkdf2_invalid_salt_length";
|
|
43
|
+
NodeEciesStringKey["Error_Pbkdf2_InvalidHashLength"] = "error_pbkdf2_invalid_hash_length";
|
|
44
|
+
// Builder errors
|
|
45
|
+
NodeEciesStringKey["Error_Builder_ECIESServiceMustBeSetBeforeGeneratingMnemonic"] = "error_builder_ecies_service_must_be_set_before_generating_mnemonic";
|
|
46
|
+
NodeEciesStringKey["Error_Builder_ECIESServiceIsRequired"] = "error_builder_ecies_service_is_required";
|
|
47
|
+
NodeEciesStringKey["Error_Builder_TypeNameAndEmailAreRequired"] = "error_builder_type_name_and_email_are_required";
|
|
48
|
+
// Streaming errors
|
|
49
|
+
NodeEciesStringKey["Error_Stream_InvalidPublicKeyLength"] = "error_stream_invalid_public_key_length";
|
|
50
|
+
NodeEciesStringKey["Error_Stream_EncryptionCancelled"] = "error_stream_encryption_cancelled";
|
|
51
|
+
NodeEciesStringKey["Error_Stream_BufferOverflow"] = "error_stream_buffer_overflow";
|
|
52
|
+
NodeEciesStringKey["Error_Stream_AtLeastOneRecipientRequired"] = "error_stream_at_least_one_recipient_required";
|
|
53
|
+
NodeEciesStringKey["Error_Stream_MaxRecipientsExceeded"] = "error_stream_max_recipients_exceeded";
|
|
54
|
+
NodeEciesStringKey["Error_Stream_InvalidRecipientPublicKeyLength"] = "error_stream_invalid_recipient_public_key_length";
|
|
55
|
+
NodeEciesStringKey["Error_Stream_InvalidRecipientIdLength"] = "error_stream_invalid_recipient_id_length";
|
|
56
|
+
NodeEciesStringKey["Error_Stream_InvalidPrivateKeyLength"] = "error_stream_invalid_private_key_length";
|
|
57
|
+
NodeEciesStringKey["Error_Stream_DecryptionCancelled"] = "error_stream_decryption_cancelled";
|
|
58
|
+
NodeEciesStringKey["Error_Stream_ChunkSequenceError"] = "error_stream_chunk_sequence_error";
|
|
59
|
+
// Invariant errors
|
|
60
|
+
NodeEciesStringKey["Error_Invariant_ConfigurationValidationFailedTemplate"] = "error_invariant_configuration_validation_failed_template";
|
|
61
|
+
NodeEciesStringKey["Error_Invariant_NodeRecipientIdConsistency_FailedTemplate"] = "error_invariant_node_recipient_id_consistency_failed_template";
|
|
62
|
+
NodeEciesStringKey["Error_Invariant_MemberIdLengthMismatchTemplate"] = "error_invariant_member_id_length_mismatch_template";
|
|
63
|
+
NodeEciesStringKey["Error_Invariant_EciesMultipleRecipientIdSizeMismatchTemplate"] = "error_invariant_ecies_multiple_recipient_id_size_mismatch_template";
|
|
64
|
+
NodeEciesStringKey["Error_Invariant_EncryptionRecipientIdSizeMismatchTemplate"] = "error_invariant_encryption_recipient_id_size_mismatch_template";
|
|
65
|
+
})(NodeEciesStringKey || (exports.NodeEciesStringKey = NodeEciesStringKey = {}));
|
|
66
|
+
exports.NodeEciesComponentId = 'node-ecies';
|
|
67
|
+
//# sourceMappingURL=node-keys.js.map
|