@brightchain/brightchain-lib 0.15.0 → 0.16.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/package.json +4 -3
- package/src/lib/constants.d.ts +23 -0
- package/src/lib/constants.d.ts.map +1 -1
- package/src/lib/constants.js +24 -1
- package/src/lib/constants.js.map +1 -1
- package/src/lib/i18n/i18n-setup.d.ts +22 -18
- package/src/lib/i18n/i18n-setup.d.ts.map +1 -1
- package/src/lib/i18n/i18n-setup.js +58 -138
- package/src/lib/i18n/i18n-setup.js.map +1 -1
- package/src/lib/interfaces/constants.d.ts +23 -0
- package/src/lib/interfaces/constants.d.ts.map +1 -1
- package/src/lib/interfaces/failableResult.d.ts +4 -11
- package/src/lib/interfaces/failableResult.d.ts.map +1 -1
- package/src/lib/interfaces/i18nConstants.d.ts +27 -0
- package/src/lib/interfaces/i18nConstants.d.ts.map +1 -0
- package/src/lib/interfaces/i18nConstants.js +3 -0
- package/src/lib/interfaces/i18nConstants.js.map +1 -0
- package/src/lib/interfaces/index.d.ts +1 -0
- package/src/lib/interfaces/index.d.ts.map +1 -1
- package/src/lib/interfaces/index.js.map +1 -1
- package/src/lib/interfaces/storage/clientSession.d.ts +3 -17
- package/src/lib/interfaces/storage/clientSession.d.ts.map +1 -1
- package/src/lib/interfaces/storage/collection.d.ts +3 -74
- package/src/lib/interfaces/storage/collection.d.ts.map +1 -1
- package/src/lib/interfaces/storage/database.d.ts +3 -24
- package/src/lib/interfaces/storage/database.d.ts.map +1 -1
- package/src/lib/interfaces/storage/databaseLifecycleHooks.d.ts +3 -38
- package/src/lib/interfaces/storage/databaseLifecycleHooks.d.ts.map +1 -1
- package/src/lib/interfaces/storage/documentTypes.d.ts +4 -409
- package/src/lib/interfaces/storage/documentTypes.d.ts.map +1 -1
- package/src/lib/interfaces/storage/documentTypes.js +0 -5
- package/src/lib/interfaces/storage/documentTypes.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightchain/brightchain-lib",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "BrightChain core library - browser-compatible blockchain storage",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "src/index.d.ts",
|
|
@@ -37,8 +37,9 @@
|
|
|
37
37
|
"author": "Digital Defiance",
|
|
38
38
|
"license": "MIT",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@digitaldefiance/ecies-lib": "^4.
|
|
41
|
-
"@digitaldefiance/i18n-lib": "^4.
|
|
40
|
+
"@digitaldefiance/ecies-lib": "^4.19.3",
|
|
41
|
+
"@digitaldefiance/i18n-lib": "^4.6.2",
|
|
42
|
+
"@digitaldefiance/node-express-suite": "^3.14.3",
|
|
42
43
|
"@noble/hashes": "^1.4.0",
|
|
43
44
|
"nat-pmp": "^1.0.0",
|
|
44
45
|
"nat-upnp": "^1.1.1",
|
package/src/lib/constants.d.ts
CHANGED
|
@@ -8,11 +8,27 @@
|
|
|
8
8
|
* @see {@link https://github.com/Digital-Defiance/ecies-lib} for base constants
|
|
9
9
|
* @module constants
|
|
10
10
|
*/
|
|
11
|
+
import { IConstants as ISuiteCoreConstants } from '@digitaldefiance/suite-core-lib';
|
|
11
12
|
import { IBCFECConsts, ICBLConsts, IConstants, ISealingConsts, ISiteConsts, ITupleConsts } from './interfaces/constants';
|
|
12
13
|
/**
|
|
13
14
|
* Site-specific constants for BrightChain
|
|
14
15
|
*/
|
|
15
16
|
export declare const SITE: ISiteConsts;
|
|
17
|
+
/**
|
|
18
|
+
* BrightChain theme colors
|
|
19
|
+
*/
|
|
20
|
+
export declare const THEME_COLORS: {
|
|
21
|
+
readonly CHAIN_BLUE: "#1976d2";
|
|
22
|
+
readonly CHAIN_BLUE_LIGHT: "#42a5f5";
|
|
23
|
+
readonly CHAIN_BLUE_DARK: "#1565c0";
|
|
24
|
+
readonly BRIGHT_CYAN: "#00bcd4";
|
|
25
|
+
readonly BRIGHT_CYAN_LIGHT: "#4dd0e1";
|
|
26
|
+
readonly BRIGHT_CYAN_DARK: "#0097a7";
|
|
27
|
+
readonly CRYPTO_PURPLE: "#9c27b0";
|
|
28
|
+
readonly SECURE_GREEN: "#4caf50";
|
|
29
|
+
readonly ALERT_ORANGE: "#ff9800";
|
|
30
|
+
readonly ERROR_RED: "#f44336";
|
|
31
|
+
};
|
|
16
32
|
/**
|
|
17
33
|
* Constants for structured block headers
|
|
18
34
|
*/
|
|
@@ -80,5 +96,12 @@ export declare const SEALING: ISealingConsts;
|
|
|
80
96
|
* Only includes BrightChain-specific constants not provided by upstream.
|
|
81
97
|
*/
|
|
82
98
|
export declare const CONSTANTS: IConstants;
|
|
99
|
+
export declare const CoreOverrides: {
|
|
100
|
+
Site: string;
|
|
101
|
+
SiteTagline: string;
|
|
102
|
+
SiteDescription: string;
|
|
103
|
+
};
|
|
104
|
+
export declare const CoreConstants: ISuiteCoreConstants;
|
|
105
|
+
export type { ISuiteCoreConstants };
|
|
83
106
|
export default CONSTANTS;
|
|
84
107
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../brightchain-lib/src/lib/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,YAAY,EACZ,UAAU,EACV,UAAU,EACV,cAAc,EACd,WAAW,EACX,YAAY,EACb,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,WAOT,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB;;;;OAIG;;IAGH;;OAEG;;CAEK,CAAC;AAEX;;;GAGG;AACH,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,GAAG,IAAO;IAEV;;OAEG;IACH,QAAQ,IAAO;IAEf;;OAEG;IACH,WAAW,IAAO;IAElB;;OAEG;IACH,UAAU,IAAO;IAEjB;;OAEG;IACH,QAAQ,IAAO;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,GAAG,EAAE,UA+BjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAG,GAAY,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,YAQX,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,YAkBV,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,cAIZ,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../brightchain-lib/src/lib/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,UAAU,IAAI,mBAAmB,EAElC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,UAAU,EACV,UAAU,EACV,cAAc,EACd,WAAW,EACX,YAAY,EACb,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,WAOT,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;CAWf,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,YAAY;IACvB;;;;OAIG;;IAGH;;OAEG;;CAEK,CAAC;AAEX;;;GAGG;AACH,oBAAY,mBAAmB;IAC7B;;OAEG;IACH,GAAG,IAAO;IAEV;;OAEG;IACH,QAAQ,IAAO;IAEf;;OAEG;IACH,WAAW,IAAO;IAElB;;OAEG;IACH,UAAU,IAAO;IAEjB;;OAEG;IACH,QAAQ,IAAO;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,GAAG,EAAE,UA+BjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAG,GAAY,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,YAQX,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,YAkBV,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,cAIZ,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,UAUvB,CAAC;AAEF,eAAO,MAAM,aAAa;;;;CAKzB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,mBAI3B,CAAC;AAEF,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,eAAe,SAAS,CAAC"}
|
package/src/lib/constants.js
CHANGED
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
* @module constants
|
|
11
11
|
*/
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.CONSTANTS = exports.SEALING = exports.TUPLE = exports.BC_FEC = exports.OFFS_CACHE_PERCENTAGE = exports.CBL = exports.StructuredBlockType = exports.BLOCK_HEADER = exports.SITE = void 0;
|
|
13
|
+
exports.CoreConstants = exports.CoreOverrides = exports.CONSTANTS = exports.SEALING = exports.TUPLE = exports.BC_FEC = exports.OFFS_CACHE_PERCENTAGE = exports.CBL = exports.StructuredBlockType = exports.BLOCK_HEADER = exports.THEME_COLORS = exports.SITE = void 0;
|
|
14
14
|
const ecies_lib_1 = require("@digitaldefiance/ecies-lib");
|
|
15
|
+
const suite_core_lib_1 = require("@digitaldefiance/suite-core-lib");
|
|
15
16
|
/**
|
|
16
17
|
* Site-specific constants for BrightChain
|
|
17
18
|
*/
|
|
@@ -23,6 +24,21 @@ exports.SITE = {
|
|
|
23
24
|
DOMAIN: 'localhost:3000',
|
|
24
25
|
CSP_NONCE_SIZE: 32,
|
|
25
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* BrightChain theme colors
|
|
29
|
+
*/
|
|
30
|
+
exports.THEME_COLORS = {
|
|
31
|
+
CHAIN_BLUE: '#1976d2',
|
|
32
|
+
CHAIN_BLUE_LIGHT: '#42a5f5',
|
|
33
|
+
CHAIN_BLUE_DARK: '#1565c0',
|
|
34
|
+
BRIGHT_CYAN: '#00bcd4',
|
|
35
|
+
BRIGHT_CYAN_LIGHT: '#4dd0e1',
|
|
36
|
+
BRIGHT_CYAN_DARK: '#0097a7',
|
|
37
|
+
CRYPTO_PURPLE: '#9c27b0',
|
|
38
|
+
SECURE_GREEN: '#4caf50',
|
|
39
|
+
ALERT_ORANGE: '#ff9800',
|
|
40
|
+
ERROR_RED: '#f44336',
|
|
41
|
+
};
|
|
26
42
|
/**
|
|
27
43
|
* Constants for structured block headers
|
|
28
44
|
*/
|
|
@@ -150,6 +166,13 @@ exports.CONSTANTS = {
|
|
|
150
166
|
TUPLE: exports.TUPLE,
|
|
151
167
|
SEALING: exports.SEALING,
|
|
152
168
|
SITE: exports.SITE,
|
|
169
|
+
THEME_COLORS: exports.THEME_COLORS,
|
|
170
|
+
};
|
|
171
|
+
exports.CoreOverrides = {
|
|
172
|
+
Site: 'BrightChain',
|
|
173
|
+
SiteTagline: 'Next-Generation Decentralized Infrastructure',
|
|
174
|
+
SiteDescription: 'The home of BrightChain, a Next-Generation Decentralized Infrastructure project.',
|
|
153
175
|
};
|
|
176
|
+
exports.CoreConstants = (0, suite_core_lib_1.createConstants)('brightchain.org', 'brightchain.org', exports.CoreOverrides);
|
|
154
177
|
exports.default = exports.CONSTANTS;
|
|
155
178
|
//# sourceMappingURL=constants.js.map
|
package/src/lib/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../brightchain-lib/src/lib/constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,0DAAwE;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../brightchain-lib/src/lib/constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAEH,0DAAwE;AACxE,oEAGyC;AAUzC;;GAEG;AACU,QAAA,IAAI,GAAgB;IAC/B,IAAI,EAAE,aAAsB;IAC5B,OAAO,EAAE,OAAgB;IACzB,WAAW,EAAE,aA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|
-
* - ECIES component (imported from ecies-lib - translations defined there)
|
|
4
|
+
* Uses createI18nSetup factory for proper engine initialization and registers:
|
|
5
|
+
* - Core component (automatic via factory)
|
|
6
|
+
* - Suite Core component (via createSuiteCoreComponentPackage)
|
|
7
|
+
* - ECIES component (via createEciesComponentPackage)
|
|
9
8
|
* - BrightChain component (translations defined here)
|
|
10
9
|
*
|
|
11
10
|
* All components support translateStringKey for direct branded enum translation.
|
|
12
11
|
*/
|
|
13
12
|
import { EciesStringKeyValue } from '@digitaldefiance/ecies-lib';
|
|
14
|
-
import { BrandedMasterStringsCollection, ContextManager, CoreLanguageCode, I18nEngine, IActiveContext, LanguageContextSpace } from '@digitaldefiance/i18n-lib';
|
|
13
|
+
import { BrandedMasterStringsCollection, ComponentConfig, ContextManager, CoreLanguageCode, I18nEngine, IActiveContext, LanguageContextSpace, type I18nComponentPackage } from '@digitaldefiance/i18n-lib';
|
|
15
14
|
import { SuiteCoreStringKeyValue } from '@digitaldefiance/suite-core-lib';
|
|
16
15
|
import type { BrightChainStringKeyValue } from '../enumerations/brightChainStrings';
|
|
17
16
|
import { BrightChainComponentId, BrightChainStringKey, BrightChainStrings } from '../enumerations/brightChainStrings';
|
|
@@ -24,16 +23,22 @@ export declare const BrightChainComponentStrings: BrandedMasterStringsCollection
|
|
|
24
23
|
/**
|
|
25
24
|
* Create BrightChain component configuration
|
|
26
25
|
*/
|
|
27
|
-
export declare function createBrightChainComponentConfig():
|
|
28
|
-
|
|
29
|
-
strings: Partial<Record<CoreLanguageCode, Partial<Record<"Common_BlockSize" | "Common_AtIndexTemplate" | "Error_BlockAccess_Template" | "Error_BlockAccessError_BlockAlreadyExists" | "Error_BlockAccessError_BlockIsNotPersistable" | "Error_BlockAccessError_BlockIsNotReadable" | "Error_BlockAccessError_BlockFileNotFoundTemplate" | "Error_BlockAccess_CBLCannotBeEncrypted" | "Error_BlockAccessError_CreatorMustBeProvided" | "Error_BlockValidationError_Template" | "Error_BlockValidationError_ActualDataLengthUnknown" | "Error_BlockValidationError_AddressCountExceedsCapacity" | "Error_BlockValidationError_BlockDataNotBuffer" | "Error_BlockValidationError_BlockSizeNegative" | "Error_BlockValidationError_CreatorIDMismatch" | "Error_BlockValidationError_DataBufferIsTruncated" | "Error_BlockValidationError_DataCannotBeEmpty" | "Error_BlockValidationError_DataLengthExceedsCapacity" | "Error_BlockValidationError_DataLengthTooShort" | "Error_BlockValidationError_DataLengthTooShortForCBLHeader" | "Error_BlockValidationError_DataLengthTooShortForEncryptedCBL" | "Error_BlockValidationError_EphemeralBlockOnlySupportsBufferData" | "Error_BlockValidationError_FutureCreationDate" | "Error_BlockValidationError_InvalidAddressLengthTemplate" | "Error_BlockValidationError_InvalidAuthTagLength" | "Error_BlockValidationError_InvalidBlockTypeTemplate" | "Error_BlockValidationError_InvalidCBLAddressCount" | "Error_BlockValidationError_InvalidCBLDataLength" | "Error_BlockValidationError_InvalidDateCreated" | "Error_BlockValidationError_InvalidEncryptionHeaderLength" | "Error_BlockValidationError_InvalidEphemeralPublicKeyLength" | "Error_BlockValidationError_InvalidIVLength" | "Error_BlockValidationError_InvalidSignature" | "Error_BlockValidationError_InvalidTupleSizeTemplate" | "Error_BlockValidationError_MethodMustBeImplementedByDerivedClass" | "Error_BlockValidationError_NoChecksum" | "Error_BlockValidationError_OriginalDataLengthNegative" | "Error_BlockValidationError_InvalidRecipientCount" | "Error_BlockValidationError_InvalidRecipientIds" | "Error_BlockValidationError_InvalidRecipientKeys" | "Error_BlockValidationError_InvalidEncryptionType" | "Error_BlockValidationError_InvalidCreator" | "Error_BlockValidationError_EncryptionRecipientNotFoundInRecipients" | "Error_BlockValidationError_EncryptionRecipientHasNoPrivateKey" | "Error_BufferError_InvalidBufferTypeTemplate" | "Error_BlockHandle_BlockConstructorMustBeValid" | "Error_BlockHandle_BlockSizeRequired" | "Error_BlockHandle_DataMustBeUint8Array" | "Error_BlockHandle_ChecksumMustBeChecksum" | "Error_BlockHandleTuple_FailedToLoadBlockTemplate" | "Error_BlockHandleTuple_FailedToStoreXorResultTemplate" | "Error_BlockMetadata_Template" | "Error_BlockMetadataError_CreatorIdMismatch" | "Error_BlockMetadataError_CreatorRequired" | "Error_BlockMetadataError_EncryptorRequired" | "Error_BlockMetadataError_InvalidBlockMetadata" | "Error_BlockMetadataError_InvalidBlockMetadataTemplate" | "Error_BlockMetadataError_MetadataRequired" | "Error_BlockMetadataError_MissingRequiredMetadata" | "Error_Block_CannotBeDecrypted" | "Error_Block_CannotBeEncrypted" | "Error_BlockCapacity_Template" | "Error_BlockCapacity_InvalidBlockSize" | "Error_BlockCapacity_InvalidBlockType" | "Error_BlockCapacity_CapacityExceeded" | "Error_BlockCapacity_InvalidFileName" | "Error_BlockCapacity_InvalidMimetype" | "Error_BlockCapacity_InvalidRecipientCount" | "Error_BlockCapacity_InvalidExtendedCblData" | "Error_BlockServiceError_BlockWhitenerCountMismatch" | "Error_BlockServiceError_EmptyBlocksArray" | "Error_BlockServiceError_BlockSizeMismatch" | "Error_BlockServiceError_NoWhitenersProvided" | "Error_BlockServiceError_AlreadyInitialized" | "Error_BlockServiceError_Uninitialized" | "Error_BlockServiceError_BlockAlreadyExistsTemplate" | "Error_BlockServiceError_RecipientRequiredForEncryption" | "Error_BlockServiceError_CannotDetermineBlockSize" | "Error_BlockServiceError_CannotDetermineFileName" | "Error_BlockServiceError_CannotDetermineFileLength" | "Error_BlockServiceError_CannotDetermineMimeType" | "Error_BlockServiceError_FilePathNotProvided" | "Error_BlockServiceError_UnableToDetermineBlockSize" | "Error_BlockServiceError_InvalidBlockData" | "Error_BlockServiceError_InvalidBlockType" | "Error_MemberError_InsufficientRandomBlocks" | "Error_MemberError_FailedToCreateMemberBlocks" | "Error_MemberError_InvalidMemberBlocks" | "Error_MemberError_PrivateKeyRequiredToDeriveVotingKeyPair" | "Error_VotingDerivationError_FailedToGeneratePrime" | "Error_VotingDerivationError_IdenticalPrimes" | "Error_VotingDerivationError_KeyPairTooSmallTemplate" | "Error_VotingDerivationError_KeyPairValidationFailed" | "Error_VotingDerivationError_ModularInverseDoesNotExist" | "Error_VotingDerivationError_PrivateKeyMustBeBuffer" | "Error_VotingDerivationError_PublicKeyMustBeBuffer" | "Error_VotingDerivationError_InvalidPublicKeyFormat" | "Error_VotingDerivationError_InvalidEcdhKeyPair" | "Error_VotingDerivationError_FailedToDeriveVotingKeysTemplate" | "Error_VotingError_InvalidKeyPairPublicKeyNotIsolated" | "Error_VotingError_InvalidKeyPairPrivateKeyNotIsolated" | "Error_VotingError_InvalidPublicKeyNotIsolated" | "Error_VotingError_InvalidPublicKeyBufferTooShort" | "Error_VotingError_InvalidPublicKeyBufferWrongMagic" | "Error_VotingError_UnsupportedPublicKeyVersion" | "Error_VotingError_InvalidPublicKeyBufferIncompleteN" | "Error_VotingError_InvalidPublicKeyBufferFailedToParseNTemplate" | "Error_VotingError_InvalidPublicKeyIdMismatch" | "Error_VotingError_ModularInverseDoesNotExist" | "Error_VotingError_PrivateKeyMustBeBuffer" | "Error_VotingError_PublicKeyMustBeBuffer" | "Error_VotingError_InvalidPublicKeyFormat" | "Error_VotingError_InvalidEcdhKeyPair" | "Error_VotingError_FailedToDeriveVotingKeysTemplate" | "Error_VotingError_FailedToGeneratePrime" | "Error_VotingError_IdenticalPrimes" | "Error_VotingError_KeyPairTooSmallTemplate" | "Error_VotingError_KeyPairValidationFailed" | "Error_VotingError_InvalidVotingKey" | "Error_VotingError_InvalidKeyPair" | "Error_VotingError_InvalidPublicKey" | "Error_VotingError_InvalidPrivateKey" | "Error_VotingError_InvalidEncryptedKey" | "Error_VotingError_InvalidPrivateKeyBufferTooShort" | "Error_VotingError_InvalidPrivateKeyBufferWrongMagic" | "Error_VotingError_UnsupportedPrivateKeyVersion" | "Error_VotingError_InvalidPrivateKeyBufferIncompleteLambda" | "Error_VotingError_InvalidPrivateKeyBufferIncompleteMuLength" | "Error_VotingError_InvalidPrivateKeyBufferIncompleteMu" | "Error_VotingError_InvalidPrivateKeyBufferFailedToParse" | "Error_VotingError_InvalidPrivateKeyBufferFailedToCreate" | "Error_FecError_InputBlockRequired" | "Error_FecError_DamagedBlockRequired" | "Error_FecError_ParityBlocksRequired" | "Error_FecError_InvalidParityBlockSizeTemplate" | "Error_FecError_InvalidRecoveredBlockSizeTemplate" | "Error_FecError_InputDataMustBeBuffer" | "Error_FecError_BlockSizeMismatch" | "Error_FecError_DamagedBlockDataMustBeBuffer" | "Error_FecError_ParityBlockDataMustBeBuffer" | "Error_EciesError_InvalidBlockType" | "Error_StoreError_InvalidBlockMetadataTemplate" | "Error_StoreError_KeyNotFoundTemplate" | "Error_StoreError_StorePathRequired" | "Error_StoreError_StorePathNotFound" | "Error_StoreError_BlockSizeRequired" | "Error_StoreError_BlockIdRequired" | "Error_StoreError_InvalidBlockIdTooShort" | "Error_StoreError_BlockFileSizeMismatch" | "Error_StoreError_BlockValidationFailed" | "Error_StoreError_BlockPathAlreadyExistsTemplate" | "Error_StoreError_BlockAlreadyExists" | "Error_StoreError_NoBlocksProvided" | "Error_StoreError_CannotStoreEphemeralData" | "Error_StoreError_BlockIdMismatchTemplate" | "Error_StoreError_BlockSizeMismatch" | "Error_StoreError_BlockDirectoryCreationFailedTemplate" | "Error_StoreError_BlockDeletionFailedTemplate" | "Error_StoreError_NotImplemented" | "Error_StoreError_InsufficientRandomBlocksTemplate" | "Error_SealingError_MissingPrivateKeys" | "Error_SealingError_MemberNotFound" | "Error_SealingError_TooManyMembersToUnlock" | "Error_SealingError_NotEnoughMembersToUnlock" | "Error_SealingError_EncryptedShareNotFound" | "Error_SealingError_InvalidBitRange" | "Error_SealingError_InvalidMemberArray" | "Error_SealingError_FailedToSealTemplate" | "Error_CblError_BlockNotReadable" | "Error_CblError_CblRequired" | "Error_CblError_WhitenedBlockFunctionRequired" | "Error_CblError_FailedToLoadBlock" | "Error_CblError_ExpectedEncryptedDataBlock" | "Error_CblError_ExpectedOwnedDataBlock" | "Error_CblError_InvalidStructure" | "Error_CblError_CreatorUndefined" | "Error_CblError_CreatorRequiredForSignature" | "Error_CblError_InvalidCreatorId" | "Error_CblError_FileNameRequired" | "Error_CblError_FileNameEmpty" | "Error_CblError_FileNameWhitespace" | "Error_CblError_FileNameInvalidChar" | "Error_CblError_FileNameControlChars" | "Error_CblError_FileNamePathTraversal" | "Error_CblError_MimeTypeRequired" | "Error_CblError_MimeTypeEmpty" | "Error_CblError_MimeTypeWhitespace" | "Error_CblError_MimeTypeLowercase" | "Error_CblError_MimeTypeInvalidFormat" | "Error_CblError_InvalidBlockSize" | "Error_CblError_MetadataSizeExceeded" | "Error_CblError_MetadataSizeNegative" | "Error_CblError_InvalidMetadataBuffer" | "Error_CblError_CreationFailedTemplate" | "Error_CblError_InsufficientCapacityTemplate" | "Error_CblError_NotExtendedCbl" | "Error_CblError_InvalidSignature" | "Error_CblError_CreatorIdMismatch" | "Error_CblError_FileSizeTooLarge" | "Error_CblError_FileSizeTooLargeForNode" | "Error_CblError_InvalidTupleSize" | "Error_CblError_FileNameTooLong" | "Error_CblError_MimeTypeTooLong" | "Error_CblError_AddressCountExceedsCapacity" | "Error_CblError_CblEncrypted" | "Error_CblError_UserRequiredForDecryption" | "Error_CblError_NotASuperCbl" | "Error_CblError_FailedToExtractCreatorId" | "Error_CblError_FailedToExtractProvidedCreatorId" | "Error_CblError_PoolIntegrityError" | "Error_MultiEncryptedError_InvalidEphemeralPublicKeyLength" | "Error_MultiEncryptedError_DataLengthExceedsCapacity" | "Error_MultiEncryptedError_BlockNotReadable" | "Error_MultiEncryptedError_DataTooShort" | "Error_MultiEncryptedError_CreatorMustBeMember" | "Error_MultiEncryptedError_InvalidIVLength" | "Error_MultiEncryptedError_InvalidAuthTagLength" | "Error_MultiEncryptedError_ChecksumMismatch" | "Error_MultiEncryptedError_RecipientMismatch" | "Error_MultiEncryptedError_RecipientsAlreadyLoaded" | "Error_BlockError_DataLengthMustMatchBlockSize" | "Error_BlockError_CreatorRequired" | "Error_BlockError_DataLengthExceedsCapacity" | "Error_BlockError_DataRequired" | "Error_BlockError_ActualDataLengthExceedsDataLength" | "Error_BlockError_ActualDataLengthNegative" | "Error_BlockError_CreatorRequiredForEncryption" | "Error_BlockError_UnexpectedEncryptedBlockType" | "Error_BlockError_CannotEncrypt" | "Error_BlockError_CannotDecrypt" | "Error_BlockError_CreatorPrivateKeyRequired" | "Error_BlockError_InvalidMultiEncryptionRecipientCount" | "Error_BlockError_InvalidNewBlockType" | "Error_BlockError_UnexpectedEphemeralBlockType" | "Error_BlockError_RecipientRequired" | "Error_BlockError_RecipientKeyRequired" | "Error_WhitenedError_BlockNotReadable" | "Error_WhitenedError_BlockSizeMismatch" | "Error_WhitenedError_DataLengthMismatch" | "Error_WhitenedError_InvalidBlockSize" | "Error_TupleError_InvalidTupleSize" | "Error_TupleError_BlockSizeMismatch" | "Error_TupleError_NoBlocksToXor" | "Error_TupleError_InvalidBlockCount" | "Error_TupleError_InvalidBlockType" | "Error_TupleError_InvalidSourceLength" | "Error_TupleError_RandomBlockGenerationFailed" | "Error_TupleError_WhiteningBlockGenerationFailed" | "Error_TupleError_MissingParameters" | "Error_TupleError_XorOperationFailedTemplate" | "Error_TupleError_DataStreamProcessingFailedTemplate" | "Error_TupleError_EncryptedDataStreamProcessingFailedTemplate" | "Error_TupleError_PoolBoundaryViolationTemplate" | "Error_MemoryTupleError_InvalidTupleSizeTemplate" | "Error_MemoryTupleError_BlockSizeMismatch" | "Error_MemoryTupleError_NoBlocksToXor" | "Error_MemoryTupleError_InvalidBlockCount" | "Error_MemoryTupleError_ExpectedBlockIdsTemplate" | "Error_MemoryTupleError_ExpectedBlocksTemplate" | "Error_HandleTupleError_InvalidTupleSizeTemplate" | "Error_HandleTupleError_BlockSizeMismatch" | "Error_HandleTupleError_NoBlocksToXor" | "Error_HandleTupleError_BlockSizesMustMatch" | "Error_HandleTupleError_PoolMismatchTemplate" | "Error_StreamError_BlockSizeRequired" | "Error_StreamError_WhitenedBlockSourceRequired" | "Error_StreamError_RandomBlockSourceRequired" | "Error_StreamError_InputMustBeBuffer" | "Error_StreamError_FailedToGetRandomBlock" | "Error_StreamError_FailedToGetWhiteningBlock" | "Error_StreamError_IncompleteEncryptedBlock" | "Error_Checksum_MismatchTemplate" | "Error_Hydration_FailedToHydrateTemplate" | "Error_Serialization_FailedToSerializeTemplate" | "Error_BlockSize_InvalidTemplate" | "Error_Checksum_Invalid" | "Error_Creator_Invalid" | "Error_Credentials_Invalid" | "Error_ID_InvalidFormat" | "Error_TupleCount_InvalidTemplate" | "Error_References_Invalid" | "Error_SessionID_Invalid" | "Error_Signature_Invalid" | "Error_Metadata_Mismatch" | "Error_Token_Expired" | "Error_Token_Invalid" | "Error_Unexpected_Error" | "Error_User_NotFound" | "Error_Validation_Error" | "Error_Capacity_Insufficient" | "Error_Implementation_NotImplemented" | "BlockSize_Unknown" | "BlockSize_Message" | "BlockSize_Tiny" | "BlockSize_Small" | "BlockSize_Medium" | "BlockSize_Large" | "BlockSize_Huge" | "ChangePassword_Success" | "Common_Site" | "ForgotPassword_Title" | "Register_Button" | "Register_Error" | "Register_Success" | "Error_DocumentError_InvalidValueTemplate" | "Error_DocumentError_FieldRequiredTemplate" | "Error_DocumentError_AlreadyInitialized" | "Error_DocumentError_Uninitialized" | "Error_IsolatedKeyError_InvalidPublicKey" | "Error_IsolatedKeyError_InvalidKeyId" | "Error_IsolatedKeyError_InvalidKeyFormat" | "Error_IsolatedKeyError_InvalidKeyLength" | "Error_IsolatedKeyError_InvalidKeyType" | "Error_IsolatedKeyError_KeyIsolationViolation" | "Error_QuorumError_InvalidQuorumId" | "Error_QuorumError_DocumentNotFound" | "Error_QuorumError_UnableToRestoreDocument" | "Error_QuorumError_NotImplemented" | "Error_QuorumError_Uninitialized" | "Error_QuorumError_MemberNotFound" | "Error_QuorumError_NotEnoughMembers" | "Error_SystemKeyringError_KeyNotFoundTemplate" | "Error_SystemKeyringError_RateLimitExceeded" | "Error_Xor_LengthMismatchTemplate" | "Error_Xor_NoArraysProvided" | "Error_Xor_ArrayLengthMismatchTemplate" | "Error_Xor_CryptoApiNotAvailable" | "Error_TupleStorage_DataExceedsBlockSizeTemplate" | "Error_TupleStorage_InvalidMagnetProtocol" | "Error_TupleStorage_InvalidMagnetType" | "Error_TupleStorage_MissingMagnetParameters" | "Error_LocationRecord_NodeIdRequired" | "Error_LocationRecord_LastSeenRequired" | "Error_LocationRecord_IsAuthoritativeRequired" | "Error_LocationRecord_InvalidLastSeenDate" | "Error_LocationRecord_InvalidLatencyMs" | "Error_LocationRecord_InvalidPoolId" | "Error_Metadata_BlockIdRequired" | "Error_Metadata_CreatedAtRequired" | "Error_Metadata_LastAccessedAtRequired" | "Error_Metadata_LocationUpdatedAtRequired" | "Error_Metadata_InvalidCreatedAtDate" | "Error_Metadata_InvalidLastAccessedAtDate" | "Error_Metadata_InvalidLocationUpdatedAtDate" | "Error_Metadata_InvalidExpiresAtDate" | "Error_Metadata_InvalidAvailabilityStateTemplate" | "Error_Metadata_LocationRecordsMustBeArray" | "Error_Metadata_InvalidLocationRecordTemplate" | "Error_Metadata_InvalidAccessCount" | "Error_Metadata_InvalidTargetReplicationFactor" | "Error_Metadata_InvalidSize" | "Error_Metadata_ParityBlockIdsMustBeArray" | "Error_Metadata_ReplicaNodeIdsMustBeArray" | "Error_ServiceProvider_UseSingletonInstance" | "Error_ServiceProvider_NotInitialized" | "Error_ServiceLocator_NotSet" | "Error_BlockService_CannotEncrypt" | "Error_BlockService_BlocksArrayEmpty" | "Error_BlockService_BlockSizesMustMatch" | "Error_MessageRouter_MessageNotFoundTemplate" | "Error_BrowserConfig_NotImplementedTemplate" | "Error_Debug_UnsupportedFormat" | "Error_SecureHeap_KeyNotFound" | "Error_I18n_KeyConflictObjectTemplate" | "Error_I18n_KeyConflictValueTemplate" | "Error_I18n_StringsNotFoundTemplate" | "Error_Document_CreatorRequiredForSaving" | "Error_Document_CreatorRequiredForEncrypting" | "Error_Document_NoEncryptedData" | "Error_Document_FieldShouldBeArrayTemplate" | "Error_Document_InvalidArrayValueTemplate" | "Error_Document_FieldRequiredTemplate" | "Error_Document_FieldInvalidTemplate" | "Error_Document_InvalidValueTemplate" | "Error_MemberDocument_PublicCblIdNotSet" | "Error_MemberDocument_PrivateCblIdNotSet" | "Error_BaseMemberDocument_PublicCblIdNotSet" | "Error_BaseMemberDocument_PrivateCblIdNotSet" | "Error_SimpleBrightChain_BlockNotFoundTemplate" | "Error_CurrencyCode_Invalid" | "Warning_BufferUtils_InvalidBase64String" | "Warning_Keyring_FailedToLoad" | "Warning_I18n_TranslationFailedTemplate" | "Error_MemberStore_RollbackFailed" | "Error_MemberCblService_CreateMemberCblFailed" | "Error_MemberCblService_ChecksumMismatch" | "Error_MemberCblService_BlockRetrievalFailed" | "Error_MemberCblService_MissingRequiredFields" | "Error_DeliveryTimeout_HandleTimeoutFailedTemplate" | "Error_Validator_InvalidBlockSizeTemplate" | "Error_Validator_InvalidBlockTypeTemplate" | "Error_Validator_InvalidEncryptionTypeTemplate" | "Error_Validator_RecipientCountMustBeAtLeastOne" | "Error_Validator_RecipientCountMaximumTemplate" | "Error_Validator_FieldRequiredTemplate" | "Error_Validator_FieldCannotBeEmptyTemplate" | "Error_BlockError_BlockSizesMustMatch" | "Error_BlockError_DataCannotBeNullOrUndefined" | "Error_BlockError_DataLengthExceedsBlockSizeTemplate" | "Error_CPU_DuplicateOpcodeErrorTemplate" | "Error_CPU_NotImplementedTemplate" | "Error_CPU_InvalidReadSizeTemplate" | "Error_CPU_StackOverflow" | "Error_CPU_StackUnderflow" | "Error_Document_InvalidValueInArrayTemplate" | "Error_Document_FieldIsRequiredTemplate" | "Error_Document_FieldIsInvalidTemplate" | "Error_MemberCBL_PublicCBLIdNotSet" | "Error_MemberCBL_PrivateCBLIdNotSet" | "Error_MemberDocument_Hint" | "Error_MemberDocument_CBLNotGenerated" | "Error_MemberProfileDocument_Hint" | "Error_QuorumDocument_CreatorMustBeSetBeforeSaving" | "Error_QuorumDocument_CreatorMustBeSetBeforeEncrypting" | "Error_QuorumDocument_DocumentHasNoEncryptedData" | "Error_QuorumDocument_InvalidEncryptedDataFormat" | "Error_QuorumDocument_InvalidMemberIdsFormat" | "Error_QuorumDocument_InvalidSignatureFormat" | "Error_QuorumDocument_InvalidCreatorIdFormat" | "Error_QuorumDocument_InvalidChecksumFormat" | "QuorumDataRecord_MustShareWithAtLeastTwoMembers" | "QuorumDataRecord_SharesRequiredExceedsMembers" | "QuorumDataRecord_SharesRequiredMustBeAtLeastTwo" | "QuorumDataRecord_InvalidChecksum" | "QuorumDataRecord_InvalidSignature" | "BlockLogger_Redacted" | "Error_MemberSchema_InvalidIdFormat" | "Error_MemberSchema_InvalidPublicKeyFormat" | "Error_MemberSchema_InvalidVotingPublicKeyFormat" | "Error_MemberSchema_InvalidEmailFormat" | "Error_MemberSchema_InvalidRecoveryDataFormat" | "Error_MemberSchema_InvalidTrustedPeersFormat" | "Error_MemberSchema_InvalidBlockedPeersFormat" | "Error_MemberSchema_InvalidActivityLogFormat" | "Error_MessageMetadataSchema_InvalidRecipientsFormat" | "Error_MessageMetadataSchema_InvalidPriorityFormat" | "Error_MessageMetadataSchema_InvalidDeliveryStatusFormat" | "Error_MessageMetadataSchema_InvalidAcknowledgmentsFormat" | "Error_MessageMetadataSchema_InvalidEncryptionSchemeFormat" | "Error_MessageMetadataSchema_InvalidCBLBlockIDsFormat" | "Security_DOS_InputSizeExceedsLimitErrorTemplate" | "Security_DOS_OperationExceededTimeLimitErrorTemplate" | "Security_RateLimiter_RateLimitExceededErrorTemplate" | "Security_AuditLogger_SignatureValidationResultTemplate" | "Security_AuditLogger_Success" | "Security_AuditLogger_Failure" | "Security_AuditLogger_BlockCreated" | "Security_AuditLogger_EncryptionPerformed" | "Security_AuditLogger_DecryptionResultTemplate" | "Security_AuditLogger_AccessDeniedTemplate" | "Security_AuditLogger_Security" | "DeliveryTimeout_FailedToHandleTimeoutTemplate" | "MessageCBLService_MessageSizeExceedsMaximumTemplate" | "MessageCBLService_FailedToCreateMessageAfterRetries" | "MessageCBLService_FailedToRetrieveMessageTemplate" | "MessageCBLService_MessageTypeIsRequired" | "MessageCBLService_SenderIDIsRequired" | "MessageCBLService_RecipientCountExceedsMaximumTemplate" | "MessageEncryptionService_NoRecipientPublicKeysProvided" | "MessageEncryptionService_FailedToEncryptTemplate" | "MessageEncryptionService_BroadcastEncryptionFailedTemplate" | "MessageEncryptionService_DecryptionFailedTemplate" | "MessageEncryptionService_KeyDecryptionFailedTemplate" | "MessageLogger_MessageCreated" | "MessageLogger_RoutingDecision" | "MessageLogger_DeliveryFailure" | "MessageLogger_EncryptionFailure" | "MessageLogger_SlowQueryDetected" | "MessageRouter_RoutingTimeout" | "MessageRouter_FailedToRouteToAnyRecipient" | "MessageRouter_ForwardingLoopDetected" | "BlockFormatService_DataTooShort" | "BlockFormatService_InvalidStructuredBlockFormatTemplate" | "BlockFormatService_CannotDetermineHeaderSize" | "BlockFormatService_Crc8MismatchTemplate" | "BlockFormatService_DataAppearsEncrypted" | "BlockFormatService_UnknownBlockFormat" | "CBLService_NotAMessageCBL" | "CBLService_CreatorIDByteLengthMismatchTemplate" | "CBLService_CreatorIDProviderReturnedBytesLengthMismatchTemplate" | "CBLService_SignatureLengthMismatchTemplate" | "CBLService_DataAppearsRaw" | "CBLService_InvalidBlockFormat" | "CBLService_SubCBLCountChecksumMismatchTemplate" | "CBLService_InvalidDepthTemplate" | "CBLService_ExpectedSuperCBLTemplate" | "GlobalServiceProvider_NotInitialized" | "BlockStoreAdapter_DataLengthExceedsBlockSizeTemplate" | "MemoryBlockStore_FECServiceUnavailable" | "MemoryBlockStore_FECServiceUnavailableInThisEnvironment" | "MemoryBlockStore_NoParityDataAvailable" | "MemoryBlockStore_BlockMetadataNotFound" | "MemoryBlockStore_RecoveryFailedInsufficientParityData" | "MemoryBlockStore_UnknownRecoveryError" | "MemoryBlockStore_CBLDataCannotBeEmpty" | "MemoryBlockStore_CBLDataTooLargeTemplate" | "MemoryBlockStore_Block1NotFound" | "MemoryBlockStore_Block2NotFound" | "MemoryBlockStore_InvalidMagnetURL" | "MemoryBlockStore_InvalidMagnetURLXT" | "MemoryBlockStore_InvalidMagnetURLMissingTemplate" | "MemoryBlockStore_InvalidMagnetURL_InvalidBlockSize" | "Checksum_InvalidTemplate" | "Checksum_InvalidHexString" | "Checksum_InvalidHexStringTemplate" | "Error_XorLengthMismatchTemplate" | "Error_XorAtLeastOneArrayRequired" | "Error_InvalidUnixTimestampTemplate" | "Error_InvalidDateStringTemplate" | "Error_InvalidDateValueTypeTemplate" | "Error_InvalidDateObjectTemplate" | "Error_InvalidDateNaN" | "Error_JsonValidationErrorTemplate" | "Error_JsonValidationError_MustBeNonNull" | "Error_JsonValidationError_FieldRequired" | "Error_JsonValidationError_MustBeValidBlockSize" | "Error_JsonValidationError_MustBeValidBlockType" | "Error_JsonValidationError_MustBeValidBlockDataType" | "Error_JsonValidationError_MustBeNumber" | "Error_JsonValidationError_MustBeNonNegative" | "Error_JsonValidationError_MustBeInteger" | "Error_JsonValidationError_MustBeISO8601DateStringOrUnixTimestamp" | "Error_JsonValidationError_MustBeString" | "Error_JsonValidationError_MustNotBeEmpty" | "Error_JsonValidationError_JSONParsingFailed" | "Error_JsonValidationError_ValidationFailed" | "XorUtils_BlockSizeMustBePositiveTemplate" | "XorUtils_InvalidPaddedDataTemplate" | "XorUtils_InvalidLengthPrefixTemplate" | "BlockPaddingTransform_MustBeAnArray" | "CblStream_UnknownErrorReadingData" | "CurrencyCode_InvalidCurrencyCode" | "EnergyAccount_InsufficientBalanceTemplate" | "Init_BrowserCompatibleConfiguration" | "Init_NotInitialized" | "ModInverse_MultiplicativeInverseDoesNotExist" | "PrimeTupleGeneratorStream_UnknownErrorInTransform" | "Unknown error in makeTuple" | "Unknown error in flush" | "SimpleBrowserStore_BlockNotFoundTemplate" | "EncryptedBlockCreator_NoCreatorRegisteredTemplate" | "TestMember_MemberNotFoundTemplate", string>>>>;
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
export declare function createBrightChainComponentConfig(): ComponentConfig;
|
|
27
|
+
/**
|
|
28
|
+
* Creates an I18nComponentPackage bundling the BrightChain ComponentConfig
|
|
29
|
+
* with its branded string key enum. Use this with createI18nSetup's
|
|
30
|
+
* libraryComponents array.
|
|
31
|
+
*/
|
|
32
|
+
export declare function createBrightChainComponentPackage(): I18nComponentPackage;
|
|
32
33
|
/**
|
|
33
34
|
* Get or create the BrightChain i18n engine.
|
|
34
35
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
36
|
+
* Uses createI18nSetup factory which handles:
|
|
37
|
+
* - Engine creation/reuse (idempotent via instanceKey 'default')
|
|
38
|
+
* - Core component registration (automatic)
|
|
39
|
+
* - Library component registration (SuiteCore, ECIES)
|
|
40
|
+
* - BrightChain component and branded enum registration
|
|
41
|
+
* - GlobalActiveContext initialization
|
|
37
42
|
*/
|
|
38
43
|
export declare function getBrightChainI18nEngine(): I18nEngine;
|
|
39
44
|
/**
|
|
@@ -47,16 +52,14 @@ export declare const i18nContext: IActiveContext<CoreLanguageCode>;
|
|
|
47
52
|
* Translate any registered branded string key.
|
|
48
53
|
* Works with EciesStringKey, SuiteCoreStringKey, BrightChainStrings.
|
|
49
54
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* via a cached value → componentId lookup.
|
|
55
|
+
* The engine's built-in browser-safe fallback handles Symbol mismatch
|
|
56
|
+
* in bundled environments (Vite/webpack) automatically — no manual
|
|
57
|
+
* component lookup needed.
|
|
54
58
|
*/
|
|
55
59
|
export declare function translateStringKey(stringKey: RegisteredStringKey, variables?: Record<string, string | number>, language?: CoreLanguageCode): string;
|
|
56
60
|
/**
|
|
57
61
|
* Safe translation helper that returns a placeholder on failure.
|
|
58
62
|
* Works with any registered branded string key.
|
|
59
|
-
* Uses the same fallback strategy as translateStringKey.
|
|
60
63
|
*/
|
|
61
64
|
export declare function safeTranslateStringKey(stringKey: RegisteredStringKey, variables?: Record<string, string | number>, language?: CoreLanguageCode): string;
|
|
62
65
|
export declare const getBrightChainTranslation: typeof translateStringKey;
|
|
@@ -83,4 +86,5 @@ export type { BrightChainStringKey, BrightChainStringKeyValue };
|
|
|
83
86
|
* Use this for type-safe translation calls.
|
|
84
87
|
*/
|
|
85
88
|
export type RegisteredStringKey = BrightChainStringKeyValue | EciesStringKeyValue | SuiteCoreStringKeyValue;
|
|
89
|
+
export type { IBrightChainI18nConstants } from '../interfaces/i18nConstants';
|
|
86
90
|
//# sourceMappingURL=i18n-setup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-setup.d.ts","sourceRoot":"","sources":["../../../../../brightchain-lib/src/lib/i18n/i18n-setup.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"i18n-setup.d.ts","sourceRoot":"","sources":["../../../../../brightchain-lib/src/lib/i18n/i18n-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAEL,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,8BAA8B,EAC9B,eAAe,EACf,cAAc,EACd,gBAAgB,EAGhB,UAAU,EACV,cAAc,EAEd,oBAAoB,EACpB,KAAK,oBAAoB,EAE1B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,uBAAuB,EACxB,MAAM,iCAAiC,CAAC;AAGzC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,oCAAoC,CAAC;AAc5C,OAAO,EAAE,sBAAsB,EAAE,CAAC;AAElC;;;GAGG;AACH,eAAO,MAAM,2BAA2B,EAAE,8BAA8B,CACtE,OAAO,kBAAkB,EACzB,gBAAgB,CAUjB,CAAC;AAEF;;GAEG;AACH,wBAAgB,gCAAgC,IAAI,eAAe,CAMlE;AAED;;;;GAIG;AACH,wBAAgB,iCAAiC,IAAI,oBAAoB,CAMxE;AAKD;;;;;;;;;GASG;AACH,wBAAgB,w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AAoB,SAEvD,CAAC;AAEF,eAAO,MAAM,WAAW,QAAO,gBAE9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAO,gBAEnC,CAAC;AAGF,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAC9B,YAAY,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,CAAC;AAEhE;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAC3B,yBAAyB,GACzB,mBAAmB,GACnB,uBAAuB,CAAC;AAG5B,YAAY,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BrightChainStrings = exports.getAdminLanguage = exports.getLanguage = exports.setContext = exports.setAdminLanguage = exports.setLanguage = exports.contextManager = exports.translateCore = exports.translate = exports.safeGetBrightChainTranslation = exports.getBrightChainTranslation = exports.i18nContext = exports.pluginI18nEngine = exports.i18nEngine = exports.BrightChainComponentStrings = exports.BrightChainComponentId = void 0;
|
|
4
4
|
exports.createBrightChainComponentConfig = createBrightChainComponentConfig;
|
|
5
|
+
exports.createBrightChainComponentPackage = createBrightChainComponentPackage;
|
|
5
6
|
exports.getBrightChainI18nEngine = getBrightChainI18nEngine;
|
|
6
7
|
exports.resetBrightChainI18nEngine = resetBrightChainI18nEngine;
|
|
7
8
|
exports.translateStringKey = translateStringKey;
|
|
@@ -9,11 +10,10 @@ exports.safeTranslateStringKey = safeTranslateStringKey;
|
|
|
9
10
|
/**
|
|
10
11
|
* BrightChain i18n setup and configuration.
|
|
11
12
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* - Core component (
|
|
15
|
-
* -
|
|
16
|
-
* - ECIES component (imported from ecies-lib - translations defined there)
|
|
13
|
+
* Uses createI18nSetup factory for proper engine initialization and registers:
|
|
14
|
+
* - Core component (automatic via factory)
|
|
15
|
+
* - Suite Core component (via createSuiteCoreComponentPackage)
|
|
16
|
+
* - ECIES component (via createEciesComponentPackage)
|
|
17
17
|
* - BrightChain component (translations defined here)
|
|
18
18
|
*
|
|
19
19
|
* All components support translateStringKey for direct branded enum translation.
|
|
@@ -50,130 +50,70 @@ function createBrightChainComponentConfig() {
|
|
|
50
50
|
aliases: ['BrightChainStrings'],
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
let _brightChainI18nEngine = null;
|
|
54
|
-
let _componentRegistered = false;
|
|
55
|
-
/**
|
|
56
|
-
* Safely register a branded string key enum.
|
|
57
|
-
* In browser environments (Vite), branded Symbol identity may differ across
|
|
58
|
-
* pre-bundled packages, causing registerStringKeyEnum to reject valid enums.
|
|
59
|
-
* Logs a warning on failure — translateStringKey has a manual fallback.
|
|
60
|
-
*/
|
|
61
|
-
function safeRegisterStringKeyEnum(engine, enumObj, name) {
|
|
62
|
-
try {
|
|
63
|
-
if (!engine.hasStringKeyEnum(enumObj)) {
|
|
64
|
-
engine.registerStringKeyEnum(enumObj);
|
|
65
|
-
}
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
catch (e) {
|
|
69
|
-
console.warn(`[i18n-setup] Failed to register ${name} as branded string key enum ` +
|
|
70
|
-
`(likely Symbol mismatch in browser bundle). ` +
|
|
71
|
-
`translateStringKey will use manual component routing as fallback.`, e instanceof Error ? e.message : e);
|
|
72
|
-
return false;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
53
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
54
|
+
* Creates an I18nComponentPackage bundling the BrightChain ComponentConfig
|
|
55
|
+
* with its branded string key enum. Use this with createI18nSetup's
|
|
56
|
+
* libraryComponents array.
|
|
79
57
|
*/
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
_componentLookup.set(value, brightChainStrings_1.BrightChainComponentId);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
for (const value of Object.values(ecies_lib_1.EciesStringKey)) {
|
|
90
|
-
if (typeof value === 'string') {
|
|
91
|
-
_componentLookup.set(value, ecies_lib_1.EciesComponentId);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
for (const value of Object.values(suite_core_lib_1.SuiteCoreStringKey)) {
|
|
95
|
-
if (typeof value === 'string') {
|
|
96
|
-
_componentLookup.set(value, suite_core_lib_1.SuiteCoreComponentId);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return _componentLookup;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Register the engine with all required components using I18nBuilder
|
|
104
|
-
*/
|
|
105
|
-
function registerEngine() {
|
|
106
|
-
const newEngine = i18n_lib_1.I18nBuilder.create()
|
|
107
|
-
.withLanguages((0, i18n_lib_1.getCoreLanguageDefinitions)())
|
|
108
|
-
.withDefaultLanguage(i18n_lib_1.LanguageCodes.EN_US)
|
|
109
|
-
.withConstants(constants_1.CONSTANTS)
|
|
110
|
-
.withInstanceKey('default')
|
|
111
|
-
.build();
|
|
112
|
-
// Register Core i18n component (required for error messages)
|
|
113
|
-
newEngine.register((0, i18n_lib_1.createCoreComponentConfig)());
|
|
114
|
-
// Register Suite Core component (common UI strings)
|
|
115
|
-
newEngine.register((0, suite_core_lib_1.createSuiteCoreComponentConfig)());
|
|
116
|
-
// Register ECIES component from ecies-lib (translations are defined there)
|
|
117
|
-
const eciesConfig = (0, ecies_lib_1.createEciesComponentConfig)();
|
|
118
|
-
newEngine.register({
|
|
119
|
-
...eciesConfig,
|
|
120
|
-
aliases: ['EciesStringKey'],
|
|
121
|
-
});
|
|
122
|
-
// Register BrightChain component (translations defined in this lib)
|
|
123
|
-
newEngine.register(createBrightChainComponentConfig());
|
|
124
|
-
// Register branded string key enums for translateStringKey support.
|
|
125
|
-
// Done after build to avoid issues with jest.resetModules() in tests.
|
|
126
|
-
// Uses safe registration — in browser bundles (Vite) the branded Symbol
|
|
127
|
-
// may differ across pre-bundled packages. The translateStringKey wrapper
|
|
128
|
-
// has a manual fallback for that case.
|
|
129
|
-
safeRegisterStringKeyEnum(newEngine, ecies_lib_1.EciesStringKey, 'EciesStringKey');
|
|
130
|
-
safeRegisterStringKeyEnum(newEngine, suite_core_lib_1.SuiteCoreStringKey, 'SuiteCoreStringKey');
|
|
131
|
-
safeRegisterStringKeyEnum(newEngine, brightChainStrings_1.BrightChainStrings, 'BrightChainStrings');
|
|
132
|
-
return newEngine;
|
|
58
|
+
function createBrightChainComponentPackage() {
|
|
59
|
+
return {
|
|
60
|
+
config: createBrightChainComponentConfig(),
|
|
61
|
+
stringKeyEnum: brightChainStrings_1.BrightChainStrings,
|
|
62
|
+
constants: constants_1.CONSTANTS,
|
|
63
|
+
};
|
|
133
64
|
}
|
|
65
|
+
let _brightChainI18nEngine = null;
|
|
66
|
+
let _i18nSetupResult = null;
|
|
134
67
|
/**
|
|
135
68
|
* Get or create the BrightChain i18n engine.
|
|
136
69
|
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
70
|
+
* Uses createI18nSetup factory which handles:
|
|
71
|
+
* - Engine creation/reuse (idempotent via instanceKey 'default')
|
|
72
|
+
* - Core component registration (automatic)
|
|
73
|
+
* - Library component registration (SuiteCore, ECIES)
|
|
74
|
+
* - BrightChain component and branded enum registration
|
|
75
|
+
* - GlobalActiveContext initialization
|
|
139
76
|
*/
|
|
140
77
|
function getBrightChainI18nEngine() {
|
|
141
|
-
if (i18n_lib_1.I18nEngine.hasInstance('default')) {
|
|
142
|
-
_brightChainI18nEngine
|
|
143
|
-
// Ensure our components are registered on existing instance
|
|
144
|
-
if (!_componentRegistered) {
|
|
145
|
-
// Merge our constants
|
|
146
|
-
_brightChainI18nEngine.mergeConstants(constants_1.CONSTANTS);
|
|
147
|
-
// Register Suite Core component if not present
|
|
148
|
-
_brightChainI18nEngine.registerIfNotExists((0, suite_core_lib_1.createSuiteCoreComponentConfig)());
|
|
149
|
-
// Register ECIES component if not present (translations from ecies-lib)
|
|
150
|
-
const eciesConfig = (0, ecies_lib_1.createEciesComponentConfig)();
|
|
151
|
-
_brightChainI18nEngine.registerIfNotExists({
|
|
152
|
-
...eciesConfig,
|
|
153
|
-
aliases: ['EciesStringKey'],
|
|
154
|
-
});
|
|
155
|
-
// Register BrightChain component if not present
|
|
156
|
-
_brightChainI18nEngine.registerIfNotExists(createBrightChainComponentConfig());
|
|
157
|
-
// Register branded string key enums (safe — see safeRegisterStringKeyEnum)
|
|
158
|
-
safeRegisterStringKeyEnum(_brightChainI18nEngine, ecies_lib_1.EciesStringKey, 'EciesStringKey');
|
|
159
|
-
safeRegisterStringKeyEnum(_brightChainI18nEngine, suite_core_lib_1.SuiteCoreStringKey, 'SuiteCoreStringKey');
|
|
160
|
-
safeRegisterStringKeyEnum(_brightChainI18nEngine, brightChainStrings_1.BrightChainStrings, 'BrightChainStrings');
|
|
161
|
-
_componentRegistered = true;
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
else {
|
|
165
|
-
_brightChainI18nEngine = registerEngine();
|
|
166
|
-
_componentRegistered = true;
|
|
78
|
+
if (_brightChainI18nEngine && i18n_lib_1.I18nEngine.hasInstance('default')) {
|
|
79
|
+
return _brightChainI18nEngine;
|
|
167
80
|
}
|
|
81
|
+
const result = (0, i18n_lib_1.createI18nSetup)({
|
|
82
|
+
componentId: brightChainStrings_1.BrightChainComponentId,
|
|
83
|
+
stringKeyEnum: brightChainStrings_1.BrightChainStrings,
|
|
84
|
+
strings: exports.BrightChainComponentStrings,
|
|
85
|
+
aliases: ['BrightChainStrings'],
|
|
86
|
+
constants: constants_1.CONSTANTS,
|
|
87
|
+
libraryComponents: [
|
|
88
|
+
(0, suite_core_lib_1.createSuiteCoreComponentPackage)(),
|
|
89
|
+
(0, ecies_lib_1.createEciesComponentPackage)(),
|
|
90
|
+
],
|
|
91
|
+
});
|
|
92
|
+
_brightChainI18nEngine = result.engine;
|
|
93
|
+
_i18nSetupResult = result;
|
|
94
|
+
// Override SuiteCore default constants (Site: 'New Site', etc.) with
|
|
95
|
+
// BrightChain values (Site: 'BrightChain', etc.) so that template
|
|
96
|
+
// variables like {Site} in Common_SiteTemplate resolve correctly.
|
|
97
|
+
const suiteCoreOverrides = {
|
|
98
|
+
Site: constants_1.CoreConstants.Site,
|
|
99
|
+
SiteTagline: constants_1.CoreConstants.SiteTagline,
|
|
100
|
+
SiteDescription: constants_1.CoreConstants.SiteDescription,
|
|
101
|
+
SiteEmailDomain: constants_1.CoreConstants.SiteEmailDomain,
|
|
102
|
+
SiteHostname: constants_1.CoreConstants.SiteHostname,
|
|
103
|
+
EmailTokenResendIntervalMinutes: constants_1.CoreConstants.EmailTokenResendIntervalMinutes,
|
|
104
|
+
};
|
|
105
|
+
result.updateConstants(suite_core_lib_1.SuiteCoreComponentId, suiteCoreOverrides);
|
|
168
106
|
return _brightChainI18nEngine;
|
|
169
107
|
}
|
|
170
108
|
/**
|
|
171
109
|
* Reset the engine instance (useful for testing)
|
|
172
110
|
*/
|
|
173
111
|
function resetBrightChainI18nEngine() {
|
|
112
|
+
if (_i18nSetupResult) {
|
|
113
|
+
_i18nSetupResult.reset();
|
|
114
|
+
}
|
|
174
115
|
_brightChainI18nEngine = null;
|
|
175
|
-
|
|
176
|
-
_componentLookup = null;
|
|
116
|
+
_i18nSetupResult = null;
|
|
177
117
|
}
|
|
178
118
|
// Export the engine instance for backward compatibility
|
|
179
119
|
// Use getBrightChainI18nEngine() for new code
|
|
@@ -181,8 +121,6 @@ exports.i18nEngine = getBrightChainI18nEngine();
|
|
|
181
121
|
exports.pluginI18nEngine = exports.i18nEngine;
|
|
182
122
|
// Get global context instance
|
|
183
123
|
const globalContext = i18n_lib_1.GlobalActiveContext.getInstance();
|
|
184
|
-
// Create context for the brightchain instance
|
|
185
|
-
globalContext.createContext(i18n_lib_1.LanguageCodes.EN_US, i18n_lib_1.LanguageCodes.EN_US, brightChainStrings_1.BrightChainComponentId);
|
|
186
124
|
// Create dynamic context that uses GlobalActiveContext
|
|
187
125
|
exports.i18nContext = {
|
|
188
126
|
get language() {
|
|
@@ -208,37 +146,19 @@ exports.i18nContext = {
|
|
|
208
146
|
* Translate any registered branded string key.
|
|
209
147
|
* Works with EciesStringKey, SuiteCoreStringKey, BrightChainStrings.
|
|
210
148
|
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
* via a cached value → componentId lookup.
|
|
149
|
+
* The engine's built-in browser-safe fallback handles Symbol mismatch
|
|
150
|
+
* in bundled environments (Vite/webpack) automatically — no manual
|
|
151
|
+
* component lookup needed.
|
|
215
152
|
*/
|
|
216
153
|
function translateStringKey(stringKey, variables, language) {
|
|
217
|
-
|
|
218
|
-
try {
|
|
219
|
-
return engine.translateStringKey(stringKey, variables, language);
|
|
220
|
-
}
|
|
221
|
-
catch {
|
|
222
|
-
// Fallback: resolve component ID manually from enum value tables
|
|
223
|
-
const componentId = getComponentLookup().get(stringKey) ?? brightChainStrings_1.BrightChainComponentId;
|
|
224
|
-
return engine.translate(componentId, stringKey, variables, language);
|
|
225
|
-
}
|
|
154
|
+
return getBrightChainI18nEngine().translateStringKey(stringKey, variables, language);
|
|
226
155
|
}
|
|
227
156
|
/**
|
|
228
157
|
* Safe translation helper that returns a placeholder on failure.
|
|
229
158
|
* Works with any registered branded string key.
|
|
230
|
-
* Uses the same fallback strategy as translateStringKey.
|
|
231
159
|
*/
|
|
232
160
|
function safeTranslateStringKey(stringKey, variables, language) {
|
|
233
|
-
|
|
234
|
-
try {
|
|
235
|
-
return engine.safeTranslateStringKey(stringKey, variables, language);
|
|
236
|
-
}
|
|
237
|
-
catch {
|
|
238
|
-
// Fallback: resolve component ID manually
|
|
239
|
-
const componentId = getComponentLookup().get(stringKey) ?? brightChainStrings_1.BrightChainComponentId;
|
|
240
|
-
return engine.safeTranslate(componentId, stringKey, variables, language);
|
|
241
|
-
}
|
|
161
|
+
return getBrightChainI18nEngine().safeTranslateStringKey(stringKey, variables, language);
|
|
242
162
|
}
|
|
243
163
|
// Legacy aliases for backward compatibility
|
|
244
164
|
exports.getBrightChainTranslation = translateStringKey;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n-setup.js","sourceRoot":"","sources":["../../../../../brightchain-lib/src/lib/i18n/i18n-setup.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"i18n-setup.js","sourceRoot":"","sources":["../../../../../brightchain-lib/src/lib/i18n/i18n-setup.ts"],"names":[],"mappings":";;;AA8EA,4EAMC;AAOD,8EAMC;AAeD,4DAmCC;AAKD,gEAMC;AA2CD,gDAUC;AAMD,wDAUC;AAnOD;;;;;;;;;;GAUG;AACH,0DAGoC;AACpC,wDAamC;AACnC,oEAIyC;AAEzC,4CAAwD;AAExD,2EAI4C;AAcnC,uGAjBP,2CAAsB,OAiBO;AAwPtB,mGAvQP,uCAAkB,OAuQO;AApQ3B,uCASmB;AAKnB;;;GAGG;AACU,QAAA,2BAA2B,GAGpC;IACF,CAAC,wBAAa,CAAC,KAAK,CAAC,EAAE,gCAAsB;IAC7C,CAAC,wBAAa,CAAC,KAAK,CAAC,EAAE,+BAAqB;IAC5C,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,uBAAa;IACjC,CAAC,wBAAa,CAAC,KAAK,CAAC,EAAE,yBAAe;IACtC,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,wBAAc;IAClC,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,0BAAgB;IACpC,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,uBAAa;IACjC,CAAC,wBAAa,CAAC,EAAE,CAAC,EAAE,yBAAe;CACpC,CAAC;AAEF;;GAEG;AACH,SAAgB,gCAAgC;IAC9C,OAAO;QACL,EAAE,EAAE,2CAAsB;QAC1B,OAAO,EAAE,mCAA2B;QACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;KAChC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,iCAAiC;IAC/C,OAAO;QACL,MAAM,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AAC,CAAC;AACnD,CAAC,CAAC;AAHW,QAAA,WAAW,eAGtB;AAEK,MAAM,gBAAgB,GAAG,CAAC,QAA0B,EAAE,EAAE;IAC7D,aAAa,CAAC,gBAAgB,CAAC,QAAQ,EAAE,2CAAsB,CAAC,CAAC;AACnE,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B;AAEK,MAAM,UAAU,GAAG,CAAC,OAA6B,EAAE,EAAE;IAC1D,aAAa,CAAC,uBAAuB,CAAC,OAAO,EAAE,2CAAsB,CAAC,CAAC;AACzE,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB;AAEK,MAAM,WAAW,GAAG,GAAqB,EAAE;IAChD,OAAO,aAAa,CAAC,UAAU,CAAC,2CAAsB,CAAC,CAAC,QAAQ,CAAC;AACnE,CAAC,CAAC;AAFW,QAAA,WAAW,eAEtB;AAEK,MAAM,gBAAgB,GAAG,GAAqB,EAAE;IACrD,OAAO,aAAa,CAAC,UAAU,CAAC,2CAAsB,CAAC,CAAC,aAAa,CAAC;AACxE,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B"}
|
|
@@ -247,6 +247,21 @@ export interface ISiteConsts {
|
|
|
247
247
|
*/
|
|
248
248
|
readonly CSP_NONCE_SIZE: number;
|
|
249
249
|
}
|
|
250
|
+
/**
|
|
251
|
+
* BrightChain theme color constants
|
|
252
|
+
*/
|
|
253
|
+
export interface IThemeColors {
|
|
254
|
+
readonly CHAIN_BLUE: string;
|
|
255
|
+
readonly CHAIN_BLUE_LIGHT: string;
|
|
256
|
+
readonly CHAIN_BLUE_DARK: string;
|
|
257
|
+
readonly BRIGHT_CYAN: string;
|
|
258
|
+
readonly BRIGHT_CYAN_LIGHT: string;
|
|
259
|
+
readonly BRIGHT_CYAN_DARK: string;
|
|
260
|
+
readonly CRYPTO_PURPLE: string;
|
|
261
|
+
readonly SECURE_GREEN: string;
|
|
262
|
+
readonly ALERT_ORANGE: string;
|
|
263
|
+
readonly ERROR_RED: string;
|
|
264
|
+
}
|
|
250
265
|
import type { IConstants as IEciesConstants } from '@digitaldefiance/ecies-lib';
|
|
251
266
|
/**
|
|
252
267
|
* Main constants interface that combines all BrightChain-specific constants
|
|
@@ -267,6 +282,12 @@ import type { IConstants as IEciesConstants } from '@digitaldefiance/ecies-lib';
|
|
|
267
282
|
* ```
|
|
268
283
|
*/
|
|
269
284
|
export interface IConstants extends IEciesConstants {
|
|
285
|
+
/**
|
|
286
|
+
* Index signature for II18nConstants compatibility.
|
|
287
|
+
* The i18n engine only uses string/number values for template replacement;
|
|
288
|
+
* nested objects (CBL, TUPLE, etc.) are silently ignored.
|
|
289
|
+
*/
|
|
290
|
+
[key: string]: unknown;
|
|
270
291
|
/** Structured block header constants */
|
|
271
292
|
readonly BLOCK_HEADER: IBlockHeaderConsts;
|
|
272
293
|
/** Constituent Block List constants */
|
|
@@ -279,6 +300,8 @@ export interface IConstants extends IEciesConstants {
|
|
|
279
300
|
readonly SEALING: ISealingConsts;
|
|
280
301
|
/** Site configuration constants */
|
|
281
302
|
readonly SITE: ISiteConsts;
|
|
303
|
+
/** Theme color constants */
|
|
304
|
+
readonly THEME_COLORS: IThemeColors;
|
|
282
305
|
/** OFFS cache percentage */
|
|
283
306
|
readonly OFFS_CACHE_PERCENTAGE: number;
|
|
284
307
|
}
|