@typeberry/lib 0.0.5-6e657f4 → 0.0.5-ab52154
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/configs/index.d.ts +30 -28
- package/index.d.ts +418 -412
- package/index.js +798 -793
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -7852,6 +7852,173 @@ declare class JipChainSpec extends WithDebug {
|
|
|
7852
7852
|
}
|
|
7853
7853
|
}
|
|
7854
7854
|
|
|
7855
|
+
declare enum Level {
|
|
7856
|
+
INSANE = 1,
|
|
7857
|
+
TRACE = 2,
|
|
7858
|
+
LOG = 3,
|
|
7859
|
+
INFO = 4,
|
|
7860
|
+
WARN = 5,
|
|
7861
|
+
ERROR = 6,
|
|
7862
|
+
}
|
|
7863
|
+
|
|
7864
|
+
type Options = {
|
|
7865
|
+
defaultLevel: Level;
|
|
7866
|
+
workingDir: string;
|
|
7867
|
+
modules: Map<string, Level>;
|
|
7868
|
+
};
|
|
7869
|
+
|
|
7870
|
+
/**
|
|
7871
|
+
* A function to parse logger definition (including modules) given as a string.
|
|
7872
|
+
*
|
|
7873
|
+
* Examples
|
|
7874
|
+
* - `info` - setup default logging level to `info`.
|
|
7875
|
+
* - `trace` - default logging level set to `trace`.
|
|
7876
|
+
* - `debug;consensus=trace` - default level is set to `debug/log`, but consensus is in trace mode.
|
|
7877
|
+
*/
|
|
7878
|
+
declare function parseLoggerOptions(input: string, defaultLevel: Level, workingDir?: string): Options {
|
|
7879
|
+
const modules = new Map<string, Level>();
|
|
7880
|
+
const parts = input.toLowerCase().split(",");
|
|
7881
|
+
let defLevel = defaultLevel;
|
|
7882
|
+
|
|
7883
|
+
for (const p of parts) {
|
|
7884
|
+
const clean = p.trim();
|
|
7885
|
+
// skip empty objects (forgotten `,` removed)
|
|
7886
|
+
if (clean.length === 0) {
|
|
7887
|
+
continue;
|
|
7888
|
+
}
|
|
7889
|
+
// we just have the default level
|
|
7890
|
+
if (clean.includes("=")) {
|
|
7891
|
+
const [mod, lvl] = clean.split("=");
|
|
7892
|
+
modules.set(mod.trim(), parseLevel(lvl.trim()));
|
|
7893
|
+
} else {
|
|
7894
|
+
defLevel = parseLevel(clean);
|
|
7895
|
+
}
|
|
7896
|
+
}
|
|
7897
|
+
|
|
7898
|
+
// TODO [ToDr] Fix dirname for workers.
|
|
7899
|
+
const myDir = (import.meta.dirname ?? "").split("/");
|
|
7900
|
+
myDir.pop();
|
|
7901
|
+
myDir.pop();
|
|
7902
|
+
return {
|
|
7903
|
+
defaultLevel: defLevel,
|
|
7904
|
+
modules,
|
|
7905
|
+
workingDir: workingDir ?? myDir.join("/"),
|
|
7906
|
+
};
|
|
7907
|
+
}
|
|
7908
|
+
|
|
7909
|
+
declare const GLOBAL_CONFIG = {
|
|
7910
|
+
options: DEFAULT_OPTIONS,
|
|
7911
|
+
transport: ConsoleTransport.create(DEFAULT_OPTIONS.defaultLevel, DEFAULT_OPTIONS),
|
|
7912
|
+
};
|
|
7913
|
+
|
|
7914
|
+
/**
|
|
7915
|
+
* A logger instance.
|
|
7916
|
+
*/
|
|
7917
|
+
declare class Logger {
|
|
7918
|
+
/**
|
|
7919
|
+
* Create a new logger instance given filename and an optional module name.
|
|
7920
|
+
*
|
|
7921
|
+
* If the module name is not given, `fileName` becomes the module name.
|
|
7922
|
+
* The module name can be composed from multiple parts separated with `/`.
|
|
7923
|
+
*
|
|
7924
|
+
* The logger will use a global configuration which can be changed using
|
|
7925
|
+
* [`configureLogger`] function.
|
|
7926
|
+
*/
|
|
7927
|
+
static new(fileName?: string, moduleName?: string) {
|
|
7928
|
+
const fName = fileName ?? "unknown";
|
|
7929
|
+
const module = moduleName ?? fName;
|
|
7930
|
+
return new Logger(module.padStart(8, " "), GLOBAL_CONFIG);
|
|
7931
|
+
}
|
|
7932
|
+
|
|
7933
|
+
/**
|
|
7934
|
+
* Return currently configured level for given module. */
|
|
7935
|
+
static getLevel(moduleName: string): Level {
|
|
7936
|
+
return findLevel(GLOBAL_CONFIG.options, moduleName);
|
|
7937
|
+
}
|
|
7938
|
+
|
|
7939
|
+
/**
|
|
7940
|
+
* Global configuration of all loggers.
|
|
7941
|
+
*
|
|
7942
|
+
* One can specify a default logging level (only logs with level >= default will be printed).
|
|
7943
|
+
* It's also possible to configure per-module logging level that takes precedence
|
|
7944
|
+
* over the default one.
|
|
7945
|
+
*
|
|
7946
|
+
* Changing the options affects all previously created loggers.
|
|
7947
|
+
*/
|
|
7948
|
+
static configureAllFromOptions(options: Options) {
|
|
7949
|
+
// find minimal level to optimise logging in case
|
|
7950
|
+
// we don't care about low-level logs.
|
|
7951
|
+
const minimalLevel = Array.from(options.modules.values()).reduce((level, modLevel) => {
|
|
7952
|
+
return level < modLevel ? level : modLevel;
|
|
7953
|
+
}, options.defaultLevel);
|
|
7954
|
+
|
|
7955
|
+
const transport = ConsoleTransport.create(minimalLevel, options);
|
|
7956
|
+
|
|
7957
|
+
// set the global config
|
|
7958
|
+
GLOBAL_CONFIG.options = options;
|
|
7959
|
+
GLOBAL_CONFIG.transport = transport;
|
|
7960
|
+
}
|
|
7961
|
+
|
|
7962
|
+
/**
|
|
7963
|
+
* Global configuration of all loggers.
|
|
7964
|
+
*
|
|
7965
|
+
* Parse configuration options from an input string typically obtained
|
|
7966
|
+
* from environment variable `JAM_LOG`.
|
|
7967
|
+
*/
|
|
7968
|
+
static configureAll(input: string, defaultLevel: Level, workingDir?: string) {
|
|
7969
|
+
const options = parseLoggerOptions(input, defaultLevel, workingDir);
|
|
7970
|
+
Logger.configureAllFromOptions(options);
|
|
7971
|
+
}
|
|
7972
|
+
|
|
7973
|
+
private constructor(
|
|
7974
|
+
private readonly moduleName: string,
|
|
7975
|
+
private readonly config: typeof GLOBAL_CONFIG,
|
|
7976
|
+
) {}
|
|
7977
|
+
|
|
7978
|
+
/** Log a message with `INSANE` level. */
|
|
7979
|
+
insane(val: string) {
|
|
7980
|
+
this.config.transport.insane(this.moduleName, val);
|
|
7981
|
+
}
|
|
7982
|
+
|
|
7983
|
+
/** Log a message with `TRACE` level. */
|
|
7984
|
+
trace(val: string) {
|
|
7985
|
+
this.config.transport.trace(this.moduleName, val);
|
|
7986
|
+
}
|
|
7987
|
+
|
|
7988
|
+
/** Log a message with `DEBUG`/`LOG` level. */
|
|
7989
|
+
log(val: string) {
|
|
7990
|
+
this.config.transport.log(this.moduleName, val);
|
|
7991
|
+
}
|
|
7992
|
+
|
|
7993
|
+
/** Log a message with `INFO` level. */
|
|
7994
|
+
info(val: string) {
|
|
7995
|
+
this.config.transport.info(this.moduleName, val);
|
|
7996
|
+
}
|
|
7997
|
+
|
|
7998
|
+
/** Log a message with `WARN` level. */
|
|
7999
|
+
warn(val: string) {
|
|
8000
|
+
this.config.transport.warn(this.moduleName, val);
|
|
8001
|
+
}
|
|
8002
|
+
|
|
8003
|
+
/** Log a message with `ERROR` level. */
|
|
8004
|
+
error(val: string) {
|
|
8005
|
+
this.config.transport.error(this.moduleName, val);
|
|
8006
|
+
}
|
|
8007
|
+
}
|
|
8008
|
+
|
|
8009
|
+
type index$g_Level = Level;
|
|
8010
|
+
declare const index$g_Level: typeof Level;
|
|
8011
|
+
type index$g_Logger = Logger;
|
|
8012
|
+
declare const index$g_Logger: typeof Logger;
|
|
8013
|
+
declare const index$g_parseLoggerOptions: typeof parseLoggerOptions;
|
|
8014
|
+
declare namespace index$g {
|
|
8015
|
+
export {
|
|
8016
|
+
index$g_Level as Level,
|
|
8017
|
+
index$g_Logger as Logger,
|
|
8018
|
+
index$g_parseLoggerOptions as parseLoggerOptions,
|
|
8019
|
+
};
|
|
8020
|
+
}
|
|
8021
|
+
|
|
7855
8022
|
/** Block authorship options. */
|
|
7856
8023
|
declare class AuthorshipOptions {
|
|
7857
8024
|
static fromJson = json.object<JsonObject<AuthorshipOptions>, AuthorshipOptions>(
|
|
@@ -7871,6 +8038,8 @@ declare class AuthorshipOptions {
|
|
|
7871
8038
|
) {}
|
|
7872
8039
|
}
|
|
7873
8040
|
|
|
8041
|
+
declare const logger$1 = Logger.new(import.meta.filename, "config");
|
|
8042
|
+
|
|
7874
8043
|
/** Development config. Will accept unsealed blocks for now. */
|
|
7875
8044
|
declare const DEV_CONFIG = "dev";
|
|
7876
8045
|
/** Default config file. */
|
|
@@ -7932,14 +8101,17 @@ declare class NodeConfiguration {
|
|
|
7932
8101
|
|
|
7933
8102
|
declare function loadConfig(configPath: string): NodeConfiguration {
|
|
7934
8103
|
if (configPath === DEFAULT_CONFIG) {
|
|
8104
|
+
logger.log("🔧 Loading DEFAULT config");
|
|
7935
8105
|
return parseFromJson(configs.default, NodeConfiguration.fromJson);
|
|
7936
8106
|
}
|
|
7937
8107
|
|
|
7938
8108
|
if (configPath === DEV_CONFIG) {
|
|
8109
|
+
logger.log("🔧 Loading DEV config");
|
|
7939
8110
|
return parseFromJson(configs.dev, NodeConfiguration.fromJson);
|
|
7940
8111
|
}
|
|
7941
8112
|
|
|
7942
8113
|
try {
|
|
8114
|
+
logger.log(`🔧 Loading config from ${configPath}`);
|
|
7943
8115
|
const configFile = fs.readFileSync(configPath, "utf8");
|
|
7944
8116
|
const parsed = JSON.parse(configFile);
|
|
7945
8117
|
return parseFromJson(parsed, NodeConfiguration.fromJson);
|
|
@@ -7948,29 +8120,30 @@ declare function loadConfig(configPath: string): NodeConfiguration {
|
|
|
7948
8120
|
}
|
|
7949
8121
|
}
|
|
7950
8122
|
|
|
7951
|
-
declare const index$
|
|
7952
|
-
declare const index$
|
|
7953
|
-
type index$
|
|
7954
|
-
declare const index$
|
|
7955
|
-
type index$
|
|
7956
|
-
declare const index$
|
|
7957
|
-
declare const index$
|
|
7958
|
-
type index$
|
|
7959
|
-
declare const index$
|
|
7960
|
-
declare const index$
|
|
7961
|
-
declare const index$
|
|
7962
|
-
declare const index$
|
|
7963
|
-
declare namespace index$
|
|
8123
|
+
declare const index$f_DEFAULT_CONFIG: typeof DEFAULT_CONFIG;
|
|
8124
|
+
declare const index$f_DEV_CONFIG: typeof DEV_CONFIG;
|
|
8125
|
+
type index$f_JipChainSpec = JipChainSpec;
|
|
8126
|
+
declare const index$f_JipChainSpec: typeof JipChainSpec;
|
|
8127
|
+
type index$f_KnownChainSpec = KnownChainSpec;
|
|
8128
|
+
declare const index$f_KnownChainSpec: typeof KnownChainSpec;
|
|
8129
|
+
declare const index$f_NODE_DEFAULTS: typeof NODE_DEFAULTS;
|
|
8130
|
+
type index$f_NodeConfiguration = NodeConfiguration;
|
|
8131
|
+
declare const index$f_NodeConfiguration: typeof NodeConfiguration;
|
|
8132
|
+
declare const index$f_knownChainSpecFromJson: typeof knownChainSpecFromJson;
|
|
8133
|
+
declare const index$f_loadConfig: typeof loadConfig;
|
|
8134
|
+
declare const index$f_parseBootnode: typeof parseBootnode;
|
|
8135
|
+
declare namespace index$f {
|
|
7964
8136
|
export {
|
|
7965
|
-
index$
|
|
7966
|
-
index$
|
|
7967
|
-
index$
|
|
7968
|
-
index$
|
|
7969
|
-
index$
|
|
7970
|
-
index$
|
|
7971
|
-
index$
|
|
7972
|
-
index$
|
|
7973
|
-
|
|
8137
|
+
index$f_DEFAULT_CONFIG as DEFAULT_CONFIG,
|
|
8138
|
+
index$f_DEV_CONFIG as DEV_CONFIG,
|
|
8139
|
+
index$f_JipChainSpec as JipChainSpec,
|
|
8140
|
+
index$f_KnownChainSpec as KnownChainSpec,
|
|
8141
|
+
index$f_NODE_DEFAULTS as NODE_DEFAULTS,
|
|
8142
|
+
index$f_NodeConfiguration as NodeConfiguration,
|
|
8143
|
+
index$f_knownChainSpecFromJson as knownChainSpecFromJson,
|
|
8144
|
+
index$f_loadConfig as loadConfig,
|
|
8145
|
+
logger$1 as logger,
|
|
8146
|
+
index$f_parseBootnode as parseBootnode,
|
|
7974
8147
|
};
|
|
7975
8148
|
}
|
|
7976
8149
|
|
|
@@ -8654,40 +8827,40 @@ declare function trieStringify(root: TrieNode | null, nodes: NodesDb): string {
|
|
|
8654
8827
|
return `\nLeaf('${leaf.getKey().toString()}',${value})`;
|
|
8655
8828
|
}
|
|
8656
8829
|
|
|
8657
|
-
type index$
|
|
8658
|
-
declare const index$
|
|
8659
|
-
type index$
|
|
8660
|
-
declare const index$
|
|
8661
|
-
type index$
|
|
8662
|
-
type index$
|
|
8663
|
-
declare const index$
|
|
8664
|
-
type index$
|
|
8665
|
-
declare const index$
|
|
8666
|
-
type index$
|
|
8667
|
-
declare const index$
|
|
8668
|
-
declare const index$
|
|
8669
|
-
declare const index$
|
|
8670
|
-
type index$
|
|
8671
|
-
type index$
|
|
8672
|
-
declare const index$
|
|
8673
|
-
type index$
|
|
8674
|
-
type index$
|
|
8675
|
-
declare const index$
|
|
8676
|
-
type index$
|
|
8677
|
-
type index$
|
|
8678
|
-
type index$
|
|
8679
|
-
type index$
|
|
8680
|
-
declare const index$
|
|
8681
|
-
declare const index$
|
|
8682
|
-
declare const index$
|
|
8683
|
-
declare const index$
|
|
8684
|
-
declare const index$
|
|
8685
|
-
declare const index$
|
|
8686
|
-
declare const index$
|
|
8687
|
-
declare const index$
|
|
8688
|
-
declare namespace index$
|
|
8689
|
-
export { index$
|
|
8690
|
-
export type { index$
|
|
8830
|
+
type index$e_BranchNode = BranchNode;
|
|
8831
|
+
declare const index$e_BranchNode: typeof BranchNode;
|
|
8832
|
+
type index$e_InMemoryTrie = InMemoryTrie;
|
|
8833
|
+
declare const index$e_InMemoryTrie: typeof InMemoryTrie;
|
|
8834
|
+
type index$e_InputKey = InputKey;
|
|
8835
|
+
type index$e_LeafNode = LeafNode;
|
|
8836
|
+
declare const index$e_LeafNode: typeof LeafNode;
|
|
8837
|
+
type index$e_NodeType = NodeType;
|
|
8838
|
+
declare const index$e_NodeType: typeof NodeType;
|
|
8839
|
+
type index$e_NodesDb = NodesDb;
|
|
8840
|
+
declare const index$e_NodesDb: typeof NodesDb;
|
|
8841
|
+
declare const index$e_TRIE_NODE_BYTES: typeof TRIE_NODE_BYTES;
|
|
8842
|
+
declare const index$e_TRUNCATED_KEY_BITS: typeof TRUNCATED_KEY_BITS;
|
|
8843
|
+
type index$e_TRUNCATED_KEY_BYTES = TRUNCATED_KEY_BYTES;
|
|
8844
|
+
type index$e_TraversedPath = TraversedPath;
|
|
8845
|
+
declare const index$e_TraversedPath: typeof TraversedPath;
|
|
8846
|
+
type index$e_TrieHasher = TrieHasher;
|
|
8847
|
+
type index$e_TrieNode = TrieNode;
|
|
8848
|
+
declare const index$e_TrieNode: typeof TrieNode;
|
|
8849
|
+
type index$e_TrieNodeHash = TrieNodeHash;
|
|
8850
|
+
type index$e_TruncatedStateKey = TruncatedStateKey;
|
|
8851
|
+
type index$e_ValueHash = ValueHash;
|
|
8852
|
+
type index$e_WriteableNodesDb = WriteableNodesDb;
|
|
8853
|
+
declare const index$e_WriteableNodesDb: typeof WriteableNodesDb;
|
|
8854
|
+
declare const index$e_createSubtreeForBothLeaves: typeof createSubtreeForBothLeaves;
|
|
8855
|
+
declare const index$e_findNodeToReplace: typeof findNodeToReplace;
|
|
8856
|
+
declare const index$e_getBit: typeof getBit;
|
|
8857
|
+
declare const index$e_leafComparator: typeof leafComparator;
|
|
8858
|
+
declare const index$e_parseInputKey: typeof parseInputKey;
|
|
8859
|
+
declare const index$e_trieInsert: typeof trieInsert;
|
|
8860
|
+
declare const index$e_trieStringify: typeof trieStringify;
|
|
8861
|
+
declare namespace index$e {
|
|
8862
|
+
export { index$e_BranchNode as BranchNode, index$e_InMemoryTrie as InMemoryTrie, index$e_LeafNode as LeafNode, index$e_NodeType as NodeType, index$e_NodesDb as NodesDb, index$e_TRIE_NODE_BYTES as TRIE_NODE_BYTES, index$e_TRUNCATED_KEY_BITS as TRUNCATED_KEY_BITS, index$e_TraversedPath as TraversedPath, index$e_TrieNode as TrieNode, index$e_WriteableNodesDb as WriteableNodesDb, index$e_createSubtreeForBothLeaves as createSubtreeForBothLeaves, index$e_findNodeToReplace as findNodeToReplace, index$e_getBit as getBit, index$e_leafComparator as leafComparator, index$e_parseInputKey as parseInputKey, index$e_trieInsert as trieInsert, index$e_trieStringify as trieStringify };
|
|
8863
|
+
export type { index$e_InputKey as InputKey, StateKey$1 as StateKey, index$e_TRUNCATED_KEY_BYTES as TRUNCATED_KEY_BYTES, index$e_TrieHasher as TrieHasher, index$e_TrieNodeHash as TrieNodeHash, index$e_TruncatedStateKey as TruncatedStateKey, index$e_ValueHash as ValueHash };
|
|
8691
8864
|
}
|
|
8692
8865
|
|
|
8693
8866
|
/**
|
|
@@ -9129,16 +9302,16 @@ declare class Mountain<H extends OpaqueHash> {
|
|
|
9129
9302
|
}
|
|
9130
9303
|
}
|
|
9131
9304
|
|
|
9132
|
-
type index$
|
|
9133
|
-
declare const index$
|
|
9134
|
-
type index$
|
|
9135
|
-
type index$
|
|
9136
|
-
type index$
|
|
9137
|
-
declare const index$
|
|
9138
|
-
declare const index$
|
|
9139
|
-
declare namespace index$
|
|
9140
|
-
export { index$
|
|
9141
|
-
export type { index$
|
|
9305
|
+
type index$d_MerkleMountainRange<H extends OpaqueHash> = MerkleMountainRange<H>;
|
|
9306
|
+
declare const index$d_MerkleMountainRange: typeof MerkleMountainRange;
|
|
9307
|
+
type index$d_MmrHasher<H extends OpaqueHash> = MmrHasher<H>;
|
|
9308
|
+
type index$d_MmrPeaks<H extends OpaqueHash> = MmrPeaks<H>;
|
|
9309
|
+
type index$d_Mountain<H extends OpaqueHash> = Mountain<H>;
|
|
9310
|
+
declare const index$d_Mountain: typeof Mountain;
|
|
9311
|
+
declare const index$d_SUPER_PEAK_STRING: typeof SUPER_PEAK_STRING;
|
|
9312
|
+
declare namespace index$d {
|
|
9313
|
+
export { index$d_MerkleMountainRange as MerkleMountainRange, index$d_Mountain as Mountain, index$d_SUPER_PEAK_STRING as SUPER_PEAK_STRING };
|
|
9314
|
+
export type { index$d_MmrHasher as MmrHasher, index$d_MmrPeaks as MmrPeaks };
|
|
9142
9315
|
}
|
|
9143
9316
|
|
|
9144
9317
|
/**
|
|
@@ -10836,103 +11009,103 @@ type FieldNames<T> = {
|
|
|
10836
11009
|
[K in keyof T]: T[K] extends Function ? never : K;
|
|
10837
11010
|
}[keyof T];
|
|
10838
11011
|
|
|
10839
|
-
type index$
|
|
10840
|
-
declare const index$
|
|
10841
|
-
type index$
|
|
10842
|
-
declare const index$
|
|
10843
|
-
type index$
|
|
10844
|
-
declare const index$
|
|
10845
|
-
declare const index$
|
|
10846
|
-
type index$
|
|
10847
|
-
declare const index$
|
|
10848
|
-
type index$
|
|
10849
|
-
type index$
|
|
10850
|
-
declare const index$
|
|
10851
|
-
type index$
|
|
10852
|
-
declare const index$
|
|
10853
|
-
declare const index$
|
|
10854
|
-
declare const index$
|
|
10855
|
-
type index$
|
|
10856
|
-
type index$
|
|
10857
|
-
type index$
|
|
10858
|
-
type index$
|
|
10859
|
-
declare const index$
|
|
10860
|
-
type index$
|
|
10861
|
-
declare const index$
|
|
10862
|
-
type index$
|
|
10863
|
-
type index$
|
|
10864
|
-
declare const index$
|
|
10865
|
-
type index$
|
|
10866
|
-
declare const index$
|
|
10867
|
-
type index$
|
|
10868
|
-
type index$
|
|
10869
|
-
type index$
|
|
10870
|
-
declare const index$
|
|
10871
|
-
type index$
|
|
10872
|
-
declare const index$
|
|
10873
|
-
type index$
|
|
10874
|
-
declare const index$
|
|
10875
|
-
type index$
|
|
10876
|
-
declare const index$
|
|
10877
|
-
type index$
|
|
10878
|
-
declare const index$
|
|
10879
|
-
type index$
|
|
10880
|
-
type index$
|
|
10881
|
-
declare const index$
|
|
10882
|
-
type index$
|
|
10883
|
-
declare const index$
|
|
10884
|
-
type index$
|
|
10885
|
-
type index$
|
|
10886
|
-
declare const index$
|
|
10887
|
-
type index$
|
|
10888
|
-
type index$
|
|
10889
|
-
type index$
|
|
10890
|
-
declare const index$
|
|
10891
|
-
type index$
|
|
10892
|
-
type index$
|
|
10893
|
-
type index$
|
|
10894
|
-
declare const index$
|
|
10895
|
-
type index$
|
|
10896
|
-
declare const index$
|
|
10897
|
-
type index$
|
|
10898
|
-
type index$
|
|
10899
|
-
declare const index$
|
|
10900
|
-
type index$
|
|
10901
|
-
declare const index$
|
|
10902
|
-
type index$
|
|
10903
|
-
declare const index$
|
|
10904
|
-
type index$
|
|
10905
|
-
declare const index$
|
|
10906
|
-
type index$
|
|
10907
|
-
declare const index$
|
|
10908
|
-
type index$
|
|
10909
|
-
declare const index$
|
|
10910
|
-
type index$
|
|
10911
|
-
declare const index$
|
|
10912
|
-
type index$
|
|
10913
|
-
type index$
|
|
10914
|
-
declare const index$
|
|
10915
|
-
type index$
|
|
10916
|
-
declare const index$
|
|
10917
|
-
declare const index$
|
|
10918
|
-
declare const index$
|
|
10919
|
-
declare const index$
|
|
10920
|
-
declare const index$
|
|
10921
|
-
declare const index$
|
|
10922
|
-
declare const index$
|
|
10923
|
-
declare const index$
|
|
10924
|
-
declare const index$
|
|
10925
|
-
declare const index$
|
|
10926
|
-
declare const index$
|
|
10927
|
-
declare const index$
|
|
10928
|
-
declare const index$
|
|
10929
|
-
declare const index$
|
|
10930
|
-
declare const index$
|
|
10931
|
-
declare const index$
|
|
10932
|
-
declare const index$
|
|
10933
|
-
declare namespace index$
|
|
10934
|
-
export { index$
|
|
10935
|
-
export type { index$
|
|
11012
|
+
type index$c_AccumulationOutput = AccumulationOutput;
|
|
11013
|
+
declare const index$c_AccumulationOutput: typeof AccumulationOutput;
|
|
11014
|
+
type index$c_AutoAccumulate = AutoAccumulate;
|
|
11015
|
+
declare const index$c_AutoAccumulate: typeof AutoAccumulate;
|
|
11016
|
+
type index$c_AvailabilityAssignment = AvailabilityAssignment;
|
|
11017
|
+
declare const index$c_AvailabilityAssignment: typeof AvailabilityAssignment;
|
|
11018
|
+
declare const index$c_BASE_SERVICE_BALANCE: typeof BASE_SERVICE_BALANCE;
|
|
11019
|
+
type index$c_BlockState = BlockState;
|
|
11020
|
+
declare const index$c_BlockState: typeof BlockState;
|
|
11021
|
+
type index$c_BlocksState = BlocksState;
|
|
11022
|
+
type index$c_CoreStatistics = CoreStatistics;
|
|
11023
|
+
declare const index$c_CoreStatistics: typeof CoreStatistics;
|
|
11024
|
+
type index$c_DisputesRecords = DisputesRecords;
|
|
11025
|
+
declare const index$c_DisputesRecords: typeof DisputesRecords;
|
|
11026
|
+
declare const index$c_ELECTIVE_BYTE_BALANCE: typeof ELECTIVE_BYTE_BALANCE;
|
|
11027
|
+
declare const index$c_ELECTIVE_ITEM_BALANCE: typeof ELECTIVE_ITEM_BALANCE;
|
|
11028
|
+
type index$c_ENTROPY_ENTRIES = ENTROPY_ENTRIES;
|
|
11029
|
+
type index$c_EnumerableState = EnumerableState;
|
|
11030
|
+
type index$c_FieldNames<T> = FieldNames<T>;
|
|
11031
|
+
type index$c_InMemoryService = InMemoryService;
|
|
11032
|
+
declare const index$c_InMemoryService: typeof InMemoryService;
|
|
11033
|
+
type index$c_InMemoryState = InMemoryState;
|
|
11034
|
+
declare const index$c_InMemoryState: typeof InMemoryState;
|
|
11035
|
+
type index$c_InMemoryStateFields = InMemoryStateFields;
|
|
11036
|
+
type index$c_LookupHistoryItem = LookupHistoryItem;
|
|
11037
|
+
declare const index$c_LookupHistoryItem: typeof LookupHistoryItem;
|
|
11038
|
+
type index$c_LookupHistorySlots = LookupHistorySlots;
|
|
11039
|
+
declare const index$c_MAX_LOOKUP_HISTORY_SLOTS: typeof MAX_LOOKUP_HISTORY_SLOTS;
|
|
11040
|
+
type index$c_MAX_RECENT_HISTORY = MAX_RECENT_HISTORY;
|
|
11041
|
+
type index$c_PerCore<T> = PerCore<T>;
|
|
11042
|
+
type index$c_PreimageItem = PreimageItem;
|
|
11043
|
+
declare const index$c_PreimageItem: typeof PreimageItem;
|
|
11044
|
+
type index$c_PrivilegedServices = PrivilegedServices;
|
|
11045
|
+
declare const index$c_PrivilegedServices: typeof PrivilegedServices;
|
|
11046
|
+
type index$c_RecentBlocks = RecentBlocks;
|
|
11047
|
+
declare const index$c_RecentBlocks: typeof RecentBlocks;
|
|
11048
|
+
type index$c_RecentBlocksHistory = RecentBlocksHistory;
|
|
11049
|
+
declare const index$c_RecentBlocksHistory: typeof RecentBlocksHistory;
|
|
11050
|
+
type index$c_SafroleData = SafroleData;
|
|
11051
|
+
declare const index$c_SafroleData: typeof SafroleData;
|
|
11052
|
+
type index$c_SafroleSealingKeys = SafroleSealingKeys;
|
|
11053
|
+
type index$c_SafroleSealingKeysData = SafroleSealingKeysData;
|
|
11054
|
+
declare const index$c_SafroleSealingKeysData: typeof SafroleSealingKeysData;
|
|
11055
|
+
type index$c_SafroleSealingKeysKind = SafroleSealingKeysKind;
|
|
11056
|
+
declare const index$c_SafroleSealingKeysKind: typeof SafroleSealingKeysKind;
|
|
11057
|
+
type index$c_Service = Service;
|
|
11058
|
+
type index$c_ServiceAccountInfo = ServiceAccountInfo;
|
|
11059
|
+
declare const index$c_ServiceAccountInfo: typeof ServiceAccountInfo;
|
|
11060
|
+
type index$c_ServiceData = ServiceData;
|
|
11061
|
+
type index$c_ServiceEntries = ServiceEntries;
|
|
11062
|
+
type index$c_ServiceStatistics = ServiceStatistics;
|
|
11063
|
+
declare const index$c_ServiceStatistics: typeof ServiceStatistics;
|
|
11064
|
+
type index$c_ServicesUpdate = ServicesUpdate;
|
|
11065
|
+
type index$c_State = State;
|
|
11066
|
+
type index$c_StatisticsData = StatisticsData;
|
|
11067
|
+
declare const index$c_StatisticsData: typeof StatisticsData;
|
|
11068
|
+
type index$c_StorageItem = StorageItem;
|
|
11069
|
+
declare const index$c_StorageItem: typeof StorageItem;
|
|
11070
|
+
type index$c_StorageKey = StorageKey;
|
|
11071
|
+
type index$c_UpdateError = UpdateError;
|
|
11072
|
+
declare const index$c_UpdateError: typeof UpdateError;
|
|
11073
|
+
type index$c_UpdatePreimage = UpdatePreimage;
|
|
11074
|
+
declare const index$c_UpdatePreimage: typeof UpdatePreimage;
|
|
11075
|
+
type index$c_UpdatePreimageKind = UpdatePreimageKind;
|
|
11076
|
+
declare const index$c_UpdatePreimageKind: typeof UpdatePreimageKind;
|
|
11077
|
+
type index$c_UpdateService = UpdateService;
|
|
11078
|
+
declare const index$c_UpdateService: typeof UpdateService;
|
|
11079
|
+
type index$c_UpdateServiceKind = UpdateServiceKind;
|
|
11080
|
+
declare const index$c_UpdateServiceKind: typeof UpdateServiceKind;
|
|
11081
|
+
type index$c_UpdateStorage = UpdateStorage;
|
|
11082
|
+
declare const index$c_UpdateStorage: typeof UpdateStorage;
|
|
11083
|
+
type index$c_UpdateStorageKind = UpdateStorageKind;
|
|
11084
|
+
declare const index$c_UpdateStorageKind: typeof UpdateStorageKind;
|
|
11085
|
+
type index$c_VALIDATOR_META_BYTES = VALIDATOR_META_BYTES;
|
|
11086
|
+
type index$c_ValidatorData = ValidatorData;
|
|
11087
|
+
declare const index$c_ValidatorData: typeof ValidatorData;
|
|
11088
|
+
type index$c_ValidatorStatistics = ValidatorStatistics;
|
|
11089
|
+
declare const index$c_ValidatorStatistics: typeof ValidatorStatistics;
|
|
11090
|
+
declare const index$c_accumulationOutputComparator: typeof accumulationOutputComparator;
|
|
11091
|
+
declare const index$c_codecBandersnatchKey: typeof codecBandersnatchKey;
|
|
11092
|
+
declare const index$c_codecPerCore: typeof codecPerCore;
|
|
11093
|
+
declare const index$c_codecServiceId: typeof codecServiceId;
|
|
11094
|
+
declare const index$c_codecVarGas: typeof codecVarGas;
|
|
11095
|
+
declare const index$c_codecVarU16: typeof codecVarU16;
|
|
11096
|
+
declare const index$c_codecWithHash: typeof codecWithHash;
|
|
11097
|
+
declare const index$c_hashComparator: typeof hashComparator;
|
|
11098
|
+
declare const index$c_ignoreValueWithDefault: typeof ignoreValueWithDefault;
|
|
11099
|
+
declare const index$c_serviceDataCodec: typeof serviceDataCodec;
|
|
11100
|
+
declare const index$c_serviceEntriesCodec: typeof serviceEntriesCodec;
|
|
11101
|
+
declare const index$c_sortedSetCodec: typeof sortedSetCodec;
|
|
11102
|
+
declare const index$c_tryAsLookupHistorySlots: typeof tryAsLookupHistorySlots;
|
|
11103
|
+
declare const index$c_tryAsPerCore: typeof tryAsPerCore;
|
|
11104
|
+
declare const index$c_workReportsSortedSetCodec: typeof workReportsSortedSetCodec;
|
|
11105
|
+
declare const index$c_zeroSizeHint: typeof zeroSizeHint;
|
|
11106
|
+
declare namespace index$c {
|
|
11107
|
+
export { index$c_AccumulationOutput as AccumulationOutput, index$c_AutoAccumulate as AutoAccumulate, index$c_AvailabilityAssignment as AvailabilityAssignment, index$c_BASE_SERVICE_BALANCE as BASE_SERVICE_BALANCE, index$c_BlockState as BlockState, index$c_CoreStatistics as CoreStatistics, index$c_DisputesRecords as DisputesRecords, index$c_ELECTIVE_BYTE_BALANCE as ELECTIVE_BYTE_BALANCE, index$c_ELECTIVE_ITEM_BALANCE as ELECTIVE_ITEM_BALANCE, index$c_InMemoryService as InMemoryService, index$c_InMemoryState as InMemoryState, index$c_LookupHistoryItem as LookupHistoryItem, index$c_MAX_LOOKUP_HISTORY_SLOTS as MAX_LOOKUP_HISTORY_SLOTS, index$c_PreimageItem as PreimageItem, index$c_PrivilegedServices as PrivilegedServices, index$c_RecentBlocks as RecentBlocks, index$c_RecentBlocksHistory as RecentBlocksHistory, index$c_SafroleData as SafroleData, index$c_SafroleSealingKeysData as SafroleSealingKeysData, index$c_SafroleSealingKeysKind as SafroleSealingKeysKind, index$c_ServiceAccountInfo as ServiceAccountInfo, index$c_ServiceStatistics as ServiceStatistics, index$c_StatisticsData as StatisticsData, index$c_StorageItem as StorageItem, index$c_UpdateError as UpdateError, index$c_UpdatePreimage as UpdatePreimage, index$c_UpdatePreimageKind as UpdatePreimageKind, index$c_UpdateService as UpdateService, index$c_UpdateServiceKind as UpdateServiceKind, index$c_UpdateStorage as UpdateStorage, index$c_UpdateStorageKind as UpdateStorageKind, index$c_ValidatorData as ValidatorData, index$c_ValidatorStatistics as ValidatorStatistics, index$c_accumulationOutputComparator as accumulationOutputComparator, index$c_codecBandersnatchKey as codecBandersnatchKey, index$c_codecPerCore as codecPerCore, index$c_codecServiceId as codecServiceId, index$c_codecVarGas as codecVarGas, index$c_codecVarU16 as codecVarU16, index$c_codecWithHash as codecWithHash, index$c_hashComparator as hashComparator, index$c_ignoreValueWithDefault as ignoreValueWithDefault, index$c_serviceDataCodec as serviceDataCodec, index$c_serviceEntriesCodec as serviceEntriesCodec, index$c_sortedSetCodec as sortedSetCodec, index$c_tryAsLookupHistorySlots as tryAsLookupHistorySlots, index$c_tryAsPerCore as tryAsPerCore, index$c_workReportsSortedSetCodec as workReportsSortedSetCodec, index$c_zeroSizeHint as zeroSizeHint };
|
|
11108
|
+
export type { index$c_BlocksState as BlocksState, index$c_ENTROPY_ENTRIES as ENTROPY_ENTRIES, index$c_EnumerableState as EnumerableState, index$c_FieldNames as FieldNames, index$c_InMemoryStateFields as InMemoryStateFields, index$c_LookupHistorySlots as LookupHistorySlots, index$c_MAX_RECENT_HISTORY as MAX_RECENT_HISTORY, index$c_PerCore as PerCore, index$c_SafroleSealingKeys as SafroleSealingKeys, index$c_Service as Service, index$c_ServiceData as ServiceData, index$c_ServiceEntries as ServiceEntries, index$c_ServicesUpdate as ServicesUpdate, index$c_State as State, index$c_StorageKey as StorageKey, index$c_VALIDATOR_META_BYTES as VALIDATOR_META_BYTES };
|
|
10936
11109
|
}
|
|
10937
11110
|
|
|
10938
11111
|
type StateKey = Opaque<OpaqueHash, "stateKey">;
|
|
@@ -11884,44 +12057,44 @@ declare function loadState(spec: ChainSpec, entries: Iterable<[StateKey | Trunca
|
|
|
11884
12057
|
* hashmap of `key -> value` entries.
|
|
11885
12058
|
*/
|
|
11886
12059
|
|
|
11887
|
-
declare const index$
|
|
11888
|
-
type index$
|
|
11889
|
-
type index$
|
|
11890
|
-
type index$
|
|
11891
|
-
declare const index$
|
|
11892
|
-
type index$
|
|
11893
|
-
declare const index$
|
|
11894
|
-
type index$
|
|
11895
|
-
type index$
|
|
11896
|
-
type index$
|
|
11897
|
-
declare const index$
|
|
11898
|
-
type index$
|
|
11899
|
-
type index$
|
|
11900
|
-
declare const index$
|
|
11901
|
-
type index$
|
|
11902
|
-
type index$
|
|
11903
|
-
declare const index$
|
|
11904
|
-
declare const index$
|
|
11905
|
-
declare const index$
|
|
11906
|
-
declare const index$
|
|
11907
|
-
declare const index$
|
|
11908
|
-
declare const index$
|
|
11909
|
-
declare const index$
|
|
11910
|
-
declare const index$
|
|
11911
|
-
declare const index$
|
|
11912
|
-
declare const index$
|
|
11913
|
-
import index$
|
|
11914
|
-
declare const index$
|
|
11915
|
-
declare const index$
|
|
11916
|
-
declare const index$
|
|
11917
|
-
declare const index$
|
|
11918
|
-
declare const index$
|
|
11919
|
-
declare const index$
|
|
11920
|
-
declare const index$
|
|
11921
|
-
import index$
|
|
11922
|
-
declare namespace index$
|
|
11923
|
-
export { index$
|
|
11924
|
-
export type { index$
|
|
12060
|
+
declare const index$b_EMPTY_BLOB: typeof EMPTY_BLOB;
|
|
12061
|
+
type index$b_EncodeFun = EncodeFun;
|
|
12062
|
+
type index$b_KeyAndCodec<T> = KeyAndCodec<T>;
|
|
12063
|
+
type index$b_SerializedService = SerializedService;
|
|
12064
|
+
declare const index$b_SerializedService: typeof SerializedService;
|
|
12065
|
+
type index$b_SerializedState<T extends SerializedStateBackend = SerializedStateBackend> = SerializedState<T>;
|
|
12066
|
+
declare const index$b_SerializedState: typeof SerializedState;
|
|
12067
|
+
type index$b_SerializedStateBackend = SerializedStateBackend;
|
|
12068
|
+
type index$b_StateCodec<T> = StateCodec<T>;
|
|
12069
|
+
type index$b_StateEntries = StateEntries;
|
|
12070
|
+
declare const index$b_StateEntries: typeof StateEntries;
|
|
12071
|
+
type index$b_StateEntryUpdate = StateEntryUpdate;
|
|
12072
|
+
type index$b_StateEntryUpdateAction = StateEntryUpdateAction;
|
|
12073
|
+
declare const index$b_StateEntryUpdateAction: typeof StateEntryUpdateAction;
|
|
12074
|
+
type index$b_StateKey = StateKey;
|
|
12075
|
+
type index$b_StateKeyIdx = StateKeyIdx;
|
|
12076
|
+
declare const index$b_StateKeyIdx: typeof StateKeyIdx;
|
|
12077
|
+
declare const index$b_TYPICAL_STATE_ITEMS: typeof TYPICAL_STATE_ITEMS;
|
|
12078
|
+
declare const index$b_TYPICAL_STATE_ITEM_LEN: typeof TYPICAL_STATE_ITEM_LEN;
|
|
12079
|
+
declare const index$b_U32_BYTES: typeof U32_BYTES;
|
|
12080
|
+
declare const index$b_binaryMerkleization: typeof binaryMerkleization;
|
|
12081
|
+
declare const index$b_convertInMemoryStateToDictionary: typeof convertInMemoryStateToDictionary;
|
|
12082
|
+
declare const index$b_dumpCodec: typeof dumpCodec;
|
|
12083
|
+
declare const index$b_getSafroleData: typeof getSafroleData;
|
|
12084
|
+
declare const index$b_legacyServiceNested: typeof legacyServiceNested;
|
|
12085
|
+
declare const index$b_loadState: typeof loadState;
|
|
12086
|
+
import index$b_serialize = serialize;
|
|
12087
|
+
declare const index$b_serializeBasicKeys: typeof serializeBasicKeys;
|
|
12088
|
+
declare const index$b_serializePreimages: typeof serializePreimages;
|
|
12089
|
+
declare const index$b_serializeRemovedServices: typeof serializeRemovedServices;
|
|
12090
|
+
declare const index$b_serializeServiceUpdates: typeof serializeServiceUpdates;
|
|
12091
|
+
declare const index$b_serializeStateUpdate: typeof serializeStateUpdate;
|
|
12092
|
+
declare const index$b_serializeStorage: typeof serializeStorage;
|
|
12093
|
+
declare const index$b_stateEntriesSequenceCodec: typeof stateEntriesSequenceCodec;
|
|
12094
|
+
import index$b_stateKeys = stateKeys;
|
|
12095
|
+
declare namespace index$b {
|
|
12096
|
+
export { index$b_EMPTY_BLOB as EMPTY_BLOB, index$b_SerializedService as SerializedService, index$b_SerializedState as SerializedState, index$b_StateEntries as StateEntries, index$b_StateEntryUpdateAction as StateEntryUpdateAction, index$b_StateKeyIdx as StateKeyIdx, index$b_TYPICAL_STATE_ITEMS as TYPICAL_STATE_ITEMS, index$b_TYPICAL_STATE_ITEM_LEN as TYPICAL_STATE_ITEM_LEN, index$b_U32_BYTES as U32_BYTES, index$b_binaryMerkleization as binaryMerkleization, index$b_convertInMemoryStateToDictionary as convertInMemoryStateToDictionary, index$b_dumpCodec as dumpCodec, index$b_getSafroleData as getSafroleData, index$b_legacyServiceNested as legacyServiceNested, index$b_loadState as loadState, index$b_serialize as serialize, index$b_serializeBasicKeys as serializeBasicKeys, index$b_serializePreimages as serializePreimages, index$b_serializeRemovedServices as serializeRemovedServices, index$b_serializeServiceUpdates as serializeServiceUpdates, index$b_serializeStateUpdate as serializeStateUpdate, index$b_serializeStorage as serializeStorage, index$b_stateEntriesSequenceCodec as stateEntriesSequenceCodec, index$b_stateKeys as stateKeys };
|
|
12097
|
+
export type { index$b_EncodeFun as EncodeFun, index$b_KeyAndCodec as KeyAndCodec, index$b_SerializedStateBackend as SerializedStateBackend, index$b_StateCodec as StateCodec, index$b_StateEntryUpdate as StateEntryUpdate, index$b_StateKey as StateKey };
|
|
11925
12098
|
}
|
|
11926
12099
|
|
|
11927
12100
|
/** Error during `LeafDb` creation. */
|
|
@@ -12129,25 +12302,25 @@ declare class InMemoryStates implements StatesDb<InMemoryState> {
|
|
|
12129
12302
|
}
|
|
12130
12303
|
}
|
|
12131
12304
|
|
|
12132
|
-
type index$
|
|
12133
|
-
type index$
|
|
12134
|
-
declare const index$
|
|
12135
|
-
type index$
|
|
12136
|
-
declare const index$
|
|
12137
|
-
type index$
|
|
12138
|
-
declare const index$
|
|
12139
|
-
type index$
|
|
12140
|
-
declare const index$
|
|
12141
|
-
type index$
|
|
12142
|
-
type index$
|
|
12143
|
-
declare const index$
|
|
12144
|
-
type index$
|
|
12145
|
-
declare const index$
|
|
12146
|
-
type index$
|
|
12147
|
-
type index$
|
|
12148
|
-
declare namespace index$
|
|
12149
|
-
export { index$
|
|
12150
|
-
export type { index$
|
|
12305
|
+
type index$a_BlocksDb = BlocksDb;
|
|
12306
|
+
type index$a_InMemoryBlocks = InMemoryBlocks;
|
|
12307
|
+
declare const index$a_InMemoryBlocks: typeof InMemoryBlocks;
|
|
12308
|
+
type index$a_InMemoryStates = InMemoryStates;
|
|
12309
|
+
declare const index$a_InMemoryStates: typeof InMemoryStates;
|
|
12310
|
+
type index$a_LeafDb = LeafDb;
|
|
12311
|
+
declare const index$a_LeafDb: typeof LeafDb;
|
|
12312
|
+
type index$a_LeafDbError = LeafDbError;
|
|
12313
|
+
declare const index$a_LeafDbError: typeof LeafDbError;
|
|
12314
|
+
type index$a_Lookup = Lookup;
|
|
12315
|
+
type index$a_LookupKind = LookupKind;
|
|
12316
|
+
declare const index$a_LookupKind: typeof LookupKind;
|
|
12317
|
+
type index$a_StateUpdateError = StateUpdateError;
|
|
12318
|
+
declare const index$a_StateUpdateError: typeof StateUpdateError;
|
|
12319
|
+
type index$a_StatesDb<T extends State = State> = StatesDb<T>;
|
|
12320
|
+
type index$a_ValuesDb = ValuesDb;
|
|
12321
|
+
declare namespace index$a {
|
|
12322
|
+
export { index$a_InMemoryBlocks as InMemoryBlocks, index$a_InMemoryStates as InMemoryStates, index$a_LeafDb as LeafDb, index$a_LeafDbError as LeafDbError, index$a_LookupKind as LookupKind, index$a_StateUpdateError as StateUpdateError };
|
|
12323
|
+
export type { index$a_BlocksDb as BlocksDb, index$a_Lookup as Lookup, index$a_StatesDb as StatesDb, index$a_ValuesDb as ValuesDb };
|
|
12151
12324
|
}
|
|
12152
12325
|
|
|
12153
12326
|
/**
|
|
@@ -12566,30 +12739,30 @@ declare const initEc = async () => {
|
|
|
12566
12739
|
await init.reedSolomon();
|
|
12567
12740
|
};
|
|
12568
12741
|
|
|
12569
|
-
declare const index$
|
|
12570
|
-
declare const index$
|
|
12571
|
-
type index$
|
|
12572
|
-
type index$
|
|
12573
|
-
type index$
|
|
12574
|
-
declare const index$
|
|
12575
|
-
type index$
|
|
12576
|
-
declare const index$
|
|
12577
|
-
declare const index$
|
|
12578
|
-
declare const index$
|
|
12579
|
-
declare const index$
|
|
12580
|
-
declare const index$
|
|
12581
|
-
declare const index$
|
|
12582
|
-
declare const index$
|
|
12583
|
-
declare const index$
|
|
12584
|
-
declare const index$
|
|
12585
|
-
declare const index$
|
|
12586
|
-
declare const index$
|
|
12587
|
-
declare const index$
|
|
12588
|
-
declare const index$
|
|
12589
|
-
declare const index$
|
|
12590
|
-
declare namespace index$
|
|
12591
|
-
export { index$
|
|
12592
|
-
export type { index$
|
|
12742
|
+
declare const index$9_HALF_POINT_SIZE: typeof HALF_POINT_SIZE;
|
|
12743
|
+
declare const index$9_N_CHUNKS_REDUNDANCY: typeof N_CHUNKS_REDUNDANCY;
|
|
12744
|
+
type index$9_N_CHUNKS_REQUIRED = N_CHUNKS_REQUIRED;
|
|
12745
|
+
type index$9_N_CHUNKS_TOTAL = N_CHUNKS_TOTAL;
|
|
12746
|
+
type index$9_PIECE_SIZE = PIECE_SIZE;
|
|
12747
|
+
declare const index$9_POINT_ALIGNMENT: typeof POINT_ALIGNMENT;
|
|
12748
|
+
type index$9_POINT_LENGTH = POINT_LENGTH;
|
|
12749
|
+
declare const index$9_chunkingFunction: typeof chunkingFunction;
|
|
12750
|
+
declare const index$9_chunksToShards: typeof chunksToShards;
|
|
12751
|
+
declare const index$9_decodeData: typeof decodeData;
|
|
12752
|
+
declare const index$9_decodeDataAndTrim: typeof decodeDataAndTrim;
|
|
12753
|
+
declare const index$9_decodePiece: typeof decodePiece;
|
|
12754
|
+
declare const index$9_encodePoints: typeof encodePoints;
|
|
12755
|
+
declare const index$9_initEc: typeof initEc;
|
|
12756
|
+
declare const index$9_join: typeof join;
|
|
12757
|
+
declare const index$9_lace: typeof lace;
|
|
12758
|
+
declare const index$9_padAndEncodeData: typeof padAndEncodeData;
|
|
12759
|
+
declare const index$9_shardsToChunks: typeof shardsToChunks;
|
|
12760
|
+
declare const index$9_split: typeof split;
|
|
12761
|
+
declare const index$9_transpose: typeof transpose;
|
|
12762
|
+
declare const index$9_unzip: typeof unzip;
|
|
12763
|
+
declare namespace index$9 {
|
|
12764
|
+
export { index$9_HALF_POINT_SIZE as HALF_POINT_SIZE, index$9_N_CHUNKS_REDUNDANCY as N_CHUNKS_REDUNDANCY, index$9_POINT_ALIGNMENT as POINT_ALIGNMENT, index$9_chunkingFunction as chunkingFunction, index$9_chunksToShards as chunksToShards, index$9_decodeData as decodeData, index$9_decodeDataAndTrim as decodeDataAndTrim, index$9_decodePiece as decodePiece, index$9_encodePoints as encodePoints, index$9_initEc as initEc, index$9_join as join, index$9_lace as lace, index$9_padAndEncodeData as padAndEncodeData, index$9_shardsToChunks as shardsToChunks, index$9_split as split, index$9_transpose as transpose, index$9_unzip as unzip };
|
|
12765
|
+
export type { index$9_N_CHUNKS_REQUIRED as N_CHUNKS_REQUIRED, index$9_N_CHUNKS_TOTAL as N_CHUNKS_TOTAL, index$9_PIECE_SIZE as PIECE_SIZE, index$9_POINT_LENGTH as POINT_LENGTH };
|
|
12593
12766
|
}
|
|
12594
12767
|
|
|
12595
12768
|
/** Size of the transfer memo. */
|
|
@@ -12932,173 +13105,6 @@ interface GasCounter {
|
|
|
12932
13105
|
sub(g: Gas): boolean;
|
|
12933
13106
|
}
|
|
12934
13107
|
|
|
12935
|
-
declare enum Level {
|
|
12936
|
-
INSANE = 1,
|
|
12937
|
-
TRACE = 2,
|
|
12938
|
-
LOG = 3,
|
|
12939
|
-
INFO = 4,
|
|
12940
|
-
WARN = 5,
|
|
12941
|
-
ERROR = 6,
|
|
12942
|
-
}
|
|
12943
|
-
|
|
12944
|
-
type Options = {
|
|
12945
|
-
defaultLevel: Level;
|
|
12946
|
-
workingDir: string;
|
|
12947
|
-
modules: Map<string, Level>;
|
|
12948
|
-
};
|
|
12949
|
-
|
|
12950
|
-
/**
|
|
12951
|
-
* A function to parse logger definition (including modules) given as a string.
|
|
12952
|
-
*
|
|
12953
|
-
* Examples
|
|
12954
|
-
* - `info` - setup default logging level to `info`.
|
|
12955
|
-
* - `trace` - default logging level set to `trace`.
|
|
12956
|
-
* - `debug;consensus=trace` - default level is set to `debug/log`, but consensus is in trace mode.
|
|
12957
|
-
*/
|
|
12958
|
-
declare function parseLoggerOptions(input: string, defaultLevel: Level, workingDir?: string): Options {
|
|
12959
|
-
const modules = new Map<string, Level>();
|
|
12960
|
-
const parts = input.toLowerCase().split(",");
|
|
12961
|
-
let defLevel = defaultLevel;
|
|
12962
|
-
|
|
12963
|
-
for (const p of parts) {
|
|
12964
|
-
const clean = p.trim();
|
|
12965
|
-
// skip empty objects (forgotten `,` removed)
|
|
12966
|
-
if (clean.length === 0) {
|
|
12967
|
-
continue;
|
|
12968
|
-
}
|
|
12969
|
-
// we just have the default level
|
|
12970
|
-
if (clean.includes("=")) {
|
|
12971
|
-
const [mod, lvl] = clean.split("=");
|
|
12972
|
-
modules.set(mod.trim(), parseLevel(lvl.trim()));
|
|
12973
|
-
} else {
|
|
12974
|
-
defLevel = parseLevel(clean);
|
|
12975
|
-
}
|
|
12976
|
-
}
|
|
12977
|
-
|
|
12978
|
-
// TODO [ToDr] Fix dirname for workers.
|
|
12979
|
-
const myDir = (import.meta.dirname ?? "").split("/");
|
|
12980
|
-
myDir.pop();
|
|
12981
|
-
myDir.pop();
|
|
12982
|
-
return {
|
|
12983
|
-
defaultLevel: defLevel,
|
|
12984
|
-
modules,
|
|
12985
|
-
workingDir: workingDir ?? myDir.join("/"),
|
|
12986
|
-
};
|
|
12987
|
-
}
|
|
12988
|
-
|
|
12989
|
-
declare const GLOBAL_CONFIG = {
|
|
12990
|
-
options: DEFAULT_OPTIONS,
|
|
12991
|
-
transport: ConsoleTransport.create(DEFAULT_OPTIONS.defaultLevel, DEFAULT_OPTIONS),
|
|
12992
|
-
};
|
|
12993
|
-
|
|
12994
|
-
/**
|
|
12995
|
-
* A logger instance.
|
|
12996
|
-
*/
|
|
12997
|
-
declare class Logger {
|
|
12998
|
-
/**
|
|
12999
|
-
* Create a new logger instance given filename and an optional module name.
|
|
13000
|
-
*
|
|
13001
|
-
* If the module name is not given, `fileName` becomes the module name.
|
|
13002
|
-
* The module name can be composed from multiple parts separated with `/`.
|
|
13003
|
-
*
|
|
13004
|
-
* The logger will use a global configuration which can be changed using
|
|
13005
|
-
* [`configureLogger`] function.
|
|
13006
|
-
*/
|
|
13007
|
-
static new(fileName?: string, moduleName?: string) {
|
|
13008
|
-
const fName = fileName ?? "unknown";
|
|
13009
|
-
return new Logger(moduleName ?? fName, fName, GLOBAL_CONFIG);
|
|
13010
|
-
}
|
|
13011
|
-
|
|
13012
|
-
/**
|
|
13013
|
-
* Return currently configured level for given module. */
|
|
13014
|
-
static getLevel(moduleName: string): Level {
|
|
13015
|
-
return findLevel(GLOBAL_CONFIG.options, moduleName);
|
|
13016
|
-
}
|
|
13017
|
-
|
|
13018
|
-
/**
|
|
13019
|
-
* Global configuration of all loggers.
|
|
13020
|
-
*
|
|
13021
|
-
* One can specify a default logging level (only logs with level >= default will be printed).
|
|
13022
|
-
* It's also possible to configure per-module logging level that takes precedence
|
|
13023
|
-
* over the default one.
|
|
13024
|
-
*
|
|
13025
|
-
* Changing the options affects all previously created loggers.
|
|
13026
|
-
*/
|
|
13027
|
-
static configureAllFromOptions(options: Options) {
|
|
13028
|
-
// find minimal level to optimise logging in case
|
|
13029
|
-
// we don't care about low-level logs.
|
|
13030
|
-
const minimalLevel = Array.from(options.modules.values()).reduce((level, modLevel) => {
|
|
13031
|
-
return level < modLevel ? level : modLevel;
|
|
13032
|
-
}, options.defaultLevel);
|
|
13033
|
-
|
|
13034
|
-
const transport = ConsoleTransport.create(minimalLevel, options);
|
|
13035
|
-
|
|
13036
|
-
// set the global config
|
|
13037
|
-
GLOBAL_CONFIG.options = options;
|
|
13038
|
-
GLOBAL_CONFIG.transport = transport;
|
|
13039
|
-
}
|
|
13040
|
-
|
|
13041
|
-
/**
|
|
13042
|
-
* Global configuration of all loggers.
|
|
13043
|
-
*
|
|
13044
|
-
* Parse configuration options from an input string typically obtained
|
|
13045
|
-
* from environment variable `JAM_LOG`.
|
|
13046
|
-
*/
|
|
13047
|
-
static configureAll(input: string, defaultLevel: Level, workingDir?: string) {
|
|
13048
|
-
const options = parseLoggerOptions(input, defaultLevel, workingDir);
|
|
13049
|
-
Logger.configureAllFromOptions(options);
|
|
13050
|
-
}
|
|
13051
|
-
|
|
13052
|
-
constructor(
|
|
13053
|
-
private readonly moduleName: string,
|
|
13054
|
-
private readonly fileName: string,
|
|
13055
|
-
private readonly config: typeof GLOBAL_CONFIG,
|
|
13056
|
-
) {}
|
|
13057
|
-
|
|
13058
|
-
/** Log a message with `INSANE` level. */
|
|
13059
|
-
insane(val: string) {
|
|
13060
|
-
this.config.transport.insane(this.moduleName, val);
|
|
13061
|
-
}
|
|
13062
|
-
|
|
13063
|
-
/** Log a message with `TRACE` level. */
|
|
13064
|
-
trace(val: string) {
|
|
13065
|
-
this.config.transport.trace(this.moduleName, val);
|
|
13066
|
-
}
|
|
13067
|
-
|
|
13068
|
-
/** Log a message with `DEBUG`/`LOG` level. */
|
|
13069
|
-
log(val: string) {
|
|
13070
|
-
this.config.transport.log(this.moduleName, val);
|
|
13071
|
-
}
|
|
13072
|
-
|
|
13073
|
-
/** Log a message with `INFO` level. */
|
|
13074
|
-
info(val: string) {
|
|
13075
|
-
this.config.transport.info(this.moduleName, val);
|
|
13076
|
-
}
|
|
13077
|
-
|
|
13078
|
-
/** Log a message with `WARN` level. */
|
|
13079
|
-
warn(val: string) {
|
|
13080
|
-
this.config.transport.warn(this.moduleName, val);
|
|
13081
|
-
}
|
|
13082
|
-
|
|
13083
|
-
/** Log a message with `ERROR` level. */
|
|
13084
|
-
error(val: string) {
|
|
13085
|
-
this.config.transport.error(this.moduleName, val);
|
|
13086
|
-
}
|
|
13087
|
-
}
|
|
13088
|
-
|
|
13089
|
-
type index$9_Level = Level;
|
|
13090
|
-
declare const index$9_Level: typeof Level;
|
|
13091
|
-
type index$9_Logger = Logger;
|
|
13092
|
-
declare const index$9_Logger: typeof Logger;
|
|
13093
|
-
declare const index$9_parseLoggerOptions: typeof parseLoggerOptions;
|
|
13094
|
-
declare namespace index$9 {
|
|
13095
|
-
export {
|
|
13096
|
-
index$9_Level as Level,
|
|
13097
|
-
index$9_Logger as Logger,
|
|
13098
|
-
index$9_parseLoggerOptions as parseLoggerOptions,
|
|
13099
|
-
};
|
|
13100
|
-
}
|
|
13101
|
-
|
|
13102
13108
|
/**
|
|
13103
13109
|
* Mask class is an implementation of skip function defined in GP.
|
|
13104
13110
|
*
|
|
@@ -19108,4 +19114,4 @@ declare namespace index {
|
|
|
19108
19114
|
export type { index_PreimagesInput as PreimagesInput, index_PreimagesState as PreimagesState, index_PreimagesStateUpdate as PreimagesStateUpdate };
|
|
19109
19115
|
}
|
|
19110
19116
|
|
|
19111
|
-
export { index$j as block, index$h as block_json, index$q as bytes, index$o as codec, index$m as collections, index$k as config, index$
|
|
19117
|
+
export { index$j as block, index$h as block_json, index$q as bytes, index$o as codec, index$m as collections, index$k as config, index$f as config_node, index$l as crypto, index$a as database, index$9 as erasure_coding, index$n as hash, index$6 as jam_host_calls, index$i as json_parser, index$g as logger, index$d as mmr, index$p as numbers, index$r as ordering, index$3 as pvm, index$7 as pvm_host_calls, index$8 as pvm_interpreter, index$4 as pvm_program, index$5 as pvm_spi_decoder, index$2 as shuffling, index$c as state, index$1 as state_json, index$b as state_merkleization, index as transition, index$e as trie, index$s as utils };
|