@typeberry/lib 0.2.0-5746fdc → 0.2.0-663eeb1

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.
Files changed (4) hide show
  1. package/index.cjs +659 -453
  2. package/index.d.ts +1342 -1120
  3. package/index.js +631 -426
  4. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -2,7 +2,7 @@ declare enum GpVersion {
2
2
  V0_6_7 = "0.6.7",
3
3
  V0_7_0 = "0.7.0",
4
4
  V0_7_1 = "0.7.1",
5
- V0_7_2 = "0.7.2-preview",
5
+ V0_7_2 = "0.7.2",
6
6
  }
7
7
 
8
8
  declare enum TestSuite {
@@ -10,43 +10,39 @@ declare enum TestSuite {
10
10
  JAMDUNA = "jamduna",
11
11
  }
12
12
 
13
+ declare const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1, GpVersion.V0_7_2];
14
+
13
15
  declare const DEFAULT_SUITE = TestSuite.W3F_DAVXY;
14
- declare const DEFAULT_VERSION = GpVersion.V0_7_1;
16
+ declare const DEFAULT_VERSION = GpVersion.V0_7_2;
15
17
  declare let CURRENT_VERSION = parseCurrentVersion(env.GP_VERSION) ?? DEFAULT_VERSION;
16
18
  declare let CURRENT_SUITE = parseCurrentSuite(env.TEST_SUITE) ?? DEFAULT_SUITE;
17
19
 
18
- declare const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1, GpVersion.V0_7_2];
19
-
20
20
  declare function parseCurrentVersion(env?: string): GpVersion | undefined {
21
21
  if (env === undefined) {
22
22
  return undefined;
23
23
  }
24
- switch (env) {
25
- case GpVersion.V0_6_7:
26
- case GpVersion.V0_7_0:
27
- case GpVersion.V0_7_1:
28
- case GpVersion.V0_7_2:
29
- return env;
30
- default:
31
- throw new Error(
32
- `Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`,
33
- );
24
+ for (const v of Object.values(GpVersion)) {
25
+ if (env === v) {
26
+ return v;
27
+ }
34
28
  }
29
+ throw new Error(
30
+ `Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`,
31
+ );
35
32
  }
36
33
 
37
34
  declare function parseCurrentSuite(env?: string): TestSuite | undefined {
38
35
  if (env === undefined) {
39
36
  return undefined;
40
37
  }
41
- switch (env) {
42
- case TestSuite.W3F_DAVXY:
43
- case TestSuite.JAMDUNA:
44
- return env;
45
- default:
46
- throw new Error(
47
- `Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`,
48
- );
38
+ for (const s of Object.values(TestSuite)) {
39
+ if (env === s) {
40
+ return s;
41
+ }
49
42
  }
43
+ throw new Error(
44
+ `Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`,
45
+ );
50
46
  }
51
47
 
52
48
  declare class Compatibility {
@@ -242,6 +238,14 @@ declare abstract class WithDebug {
242
238
  }
243
239
  }
244
240
 
241
+ declare function lazyInspect<T>(obj: T) {
242
+ return {
243
+ toString() {
244
+ return inspect(obj);
245
+ },
246
+ };
247
+ }
248
+
245
249
  /**
246
250
  * The function will produce relative path resolver that is adjusted
247
251
  * for package location within the workspace.
@@ -292,8 +296,7 @@ type Uninstantiable = void & { __brand: "uninstantiable" };
292
296
 
293
297
  type StringLiteral<Type> = Type extends string ? (string extends Type ? never : Type) : never;
294
298
 
295
- // TODO [MaSi]: it should be "unique symbol" but in debugger adapter we have opaque types from different packages and it is problematic.
296
- declare const __OPAQUE_TYPE__ = "__INTERNAL_OPAQUE_ID__";
299
+ declare const __OPAQUE_TYPE__: unique symbol;
297
300
 
298
301
  type WithOpaque<Token extends string> = {
299
302
  readonly [__OPAQUE_TYPE__]: Token;
@@ -728,60 +731,61 @@ declare function isResult(x: unknown): x is Result$2<unknown, unknown> {
728
731
  * as an afterthought.
729
732
  */
730
733
 
731
- declare const index$u_ALL_VERSIONS_IN_ORDER: typeof ALL_VERSIONS_IN_ORDER;
732
- declare const index$u_CURRENT_SUITE: typeof CURRENT_SUITE;
733
- declare const index$u_CURRENT_VERSION: typeof CURRENT_VERSION;
734
- type index$u_Compatibility = Compatibility;
735
- declare const index$u_Compatibility: typeof Compatibility;
736
- declare const index$u_DEFAULT_SUITE: typeof DEFAULT_SUITE;
737
- declare const index$u_DEFAULT_VERSION: typeof DEFAULT_VERSION;
738
- type index$u_DeepEqualOptions = DeepEqualOptions;
739
- type index$u_EnumMapping = EnumMapping;
740
- type index$u_ErrorResult<Error> = ErrorResult<Error>;
741
- type index$u_ErrorsCollector = ErrorsCollector;
742
- declare const index$u_ErrorsCollector: typeof ErrorsCollector;
743
- type index$u_GpVersion = GpVersion;
744
- declare const index$u_GpVersion: typeof GpVersion;
745
- type index$u_OK = OK;
746
- type index$u_OkResult<Ok> = OkResult<Ok>;
747
- type index$u_Opaque<Type, Token extends string> = Opaque<Type, Token>;
748
- type index$u_RichTaggedError<Kind extends string | number, Nested> = RichTaggedError<Kind, Nested>;
749
- declare const index$u_RichTaggedError: typeof RichTaggedError;
750
- type index$u_StringLiteral<Type> = StringLiteral<Type>;
751
- declare const index$u_TEST_COMPARE_USING: typeof TEST_COMPARE_USING;
752
- type index$u_TaggedError<Kind, Nested> = TaggedError<Kind, Nested>;
753
- type index$u_TestSuite = TestSuite;
754
- declare const index$u_TestSuite: typeof TestSuite;
755
- type index$u_TokenOf<OpaqueType, Type> = TokenOf<OpaqueType, Type>;
756
- type index$u_Uninstantiable = Uninstantiable;
757
- type index$u_WithDebug = WithDebug;
758
- declare const index$u_WithDebug: typeof WithDebug;
759
- type index$u_WithOpaque<Token extends string> = WithOpaque<Token>;
760
- declare const index$u___OPAQUE_TYPE__: typeof __OPAQUE_TYPE__;
761
- declare const index$u_asOpaqueType: typeof asOpaqueType;
762
- declare const index$u_assertEmpty: typeof assertEmpty;
763
- declare const index$u_assertNever: typeof assertNever;
764
- declare const index$u_callCompareFunction: typeof callCompareFunction;
765
- declare const index$u_check: typeof check;
766
- declare const index$u_deepEqual: typeof deepEqual;
767
- declare const index$u_getAllKeysSorted: typeof getAllKeysSorted;
768
- declare const index$u_inspect: typeof inspect;
769
- declare const index$u_isBrowser: typeof isBrowser;
770
- declare const index$u_isResult: typeof isResult;
771
- declare const index$u_isTaggedError: typeof isTaggedError;
772
- declare const index$u_maybeTaggedErrorToString: typeof maybeTaggedErrorToString;
773
- declare const index$u_measure: typeof measure;
774
- declare const index$u_oomWarningPrinted: typeof oomWarningPrinted;
775
- declare const index$u_parseCurrentSuite: typeof parseCurrentSuite;
776
- declare const index$u_parseCurrentVersion: typeof parseCurrentVersion;
777
- declare const index$u_resultToString: typeof resultToString;
778
- declare const index$u_safeAllocUint8Array: typeof safeAllocUint8Array;
779
- declare const index$u_seeThrough: typeof seeThrough;
780
- declare const index$u_trimStack: typeof trimStack;
781
- declare const index$u_workspacePathFix: typeof workspacePathFix;
782
- declare namespace index$u {
783
- export { index$u_ALL_VERSIONS_IN_ORDER as ALL_VERSIONS_IN_ORDER, index$u_CURRENT_SUITE as CURRENT_SUITE, index$u_CURRENT_VERSION as CURRENT_VERSION, index$u_Compatibility as Compatibility, index$u_DEFAULT_SUITE as DEFAULT_SUITE, index$u_DEFAULT_VERSION as DEFAULT_VERSION, index$u_ErrorsCollector as ErrorsCollector, index$u_GpVersion as GpVersion, MAX_LENGTH$1 as MAX_LENGTH, Result$2 as Result, index$u_RichTaggedError as RichTaggedError, index$u_TEST_COMPARE_USING as TEST_COMPARE_USING, index$u_TestSuite as TestSuite, index$u_WithDebug as WithDebug, index$u___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$u_asOpaqueType as asOpaqueType, index$u_assertEmpty as assertEmpty, index$u_assertNever as assertNever, index$u_callCompareFunction as callCompareFunction, index$u_check as check, index$u_deepEqual as deepEqual, index$u_getAllKeysSorted as getAllKeysSorted, index$u_inspect as inspect, index$u_isBrowser as isBrowser, index$u_isResult as isResult, index$u_isTaggedError as isTaggedError, index$u_maybeTaggedErrorToString as maybeTaggedErrorToString, index$u_measure as measure, index$u_oomWarningPrinted as oomWarningPrinted, index$u_parseCurrentSuite as parseCurrentSuite, index$u_parseCurrentVersion as parseCurrentVersion, index$u_resultToString as resultToString, index$u_safeAllocUint8Array as safeAllocUint8Array, index$u_seeThrough as seeThrough, index$u_trimStack as trimStack, index$u_workspacePathFix as workspacePathFix };
784
- export type { index$u_DeepEqualOptions as DeepEqualOptions, index$u_EnumMapping as EnumMapping, index$u_ErrorResult as ErrorResult, index$u_OK as OK, index$u_OkResult as OkResult, index$u_Opaque as Opaque, index$u_StringLiteral as StringLiteral, index$u_TaggedError as TaggedError, index$u_TokenOf as TokenOf, index$u_Uninstantiable as Uninstantiable, index$u_WithOpaque as WithOpaque };
734
+ declare const index$v_ALL_VERSIONS_IN_ORDER: typeof ALL_VERSIONS_IN_ORDER;
735
+ declare const index$v_CURRENT_SUITE: typeof CURRENT_SUITE;
736
+ declare const index$v_CURRENT_VERSION: typeof CURRENT_VERSION;
737
+ type index$v_Compatibility = Compatibility;
738
+ declare const index$v_Compatibility: typeof Compatibility;
739
+ declare const index$v_DEFAULT_SUITE: typeof DEFAULT_SUITE;
740
+ declare const index$v_DEFAULT_VERSION: typeof DEFAULT_VERSION;
741
+ type index$v_DeepEqualOptions = DeepEqualOptions;
742
+ type index$v_EnumMapping = EnumMapping;
743
+ type index$v_ErrorResult<Error> = ErrorResult<Error>;
744
+ type index$v_ErrorsCollector = ErrorsCollector;
745
+ declare const index$v_ErrorsCollector: typeof ErrorsCollector;
746
+ type index$v_GpVersion = GpVersion;
747
+ declare const index$v_GpVersion: typeof GpVersion;
748
+ type index$v_OK = OK;
749
+ type index$v_OkResult<Ok> = OkResult<Ok>;
750
+ type index$v_Opaque<Type, Token extends string> = Opaque<Type, Token>;
751
+ type index$v_RichTaggedError<Kind extends string | number, Nested> = RichTaggedError<Kind, Nested>;
752
+ declare const index$v_RichTaggedError: typeof RichTaggedError;
753
+ type index$v_StringLiteral<Type> = StringLiteral<Type>;
754
+ declare const index$v_TEST_COMPARE_USING: typeof TEST_COMPARE_USING;
755
+ type index$v_TaggedError<Kind, Nested> = TaggedError<Kind, Nested>;
756
+ type index$v_TestSuite = TestSuite;
757
+ declare const index$v_TestSuite: typeof TestSuite;
758
+ type index$v_TokenOf<OpaqueType, Type> = TokenOf<OpaqueType, Type>;
759
+ type index$v_Uninstantiable = Uninstantiable;
760
+ type index$v_WithDebug = WithDebug;
761
+ declare const index$v_WithDebug: typeof WithDebug;
762
+ type index$v_WithOpaque<Token extends string> = WithOpaque<Token>;
763
+ declare const index$v___OPAQUE_TYPE__: typeof __OPAQUE_TYPE__;
764
+ declare const index$v_asOpaqueType: typeof asOpaqueType;
765
+ declare const index$v_assertEmpty: typeof assertEmpty;
766
+ declare const index$v_assertNever: typeof assertNever;
767
+ declare const index$v_callCompareFunction: typeof callCompareFunction;
768
+ declare const index$v_check: typeof check;
769
+ declare const index$v_deepEqual: typeof deepEqual;
770
+ declare const index$v_getAllKeysSorted: typeof getAllKeysSorted;
771
+ declare const index$v_inspect: typeof inspect;
772
+ declare const index$v_isBrowser: typeof isBrowser;
773
+ declare const index$v_isResult: typeof isResult;
774
+ declare const index$v_isTaggedError: typeof isTaggedError;
775
+ declare const index$v_lazyInspect: typeof lazyInspect;
776
+ declare const index$v_maybeTaggedErrorToString: typeof maybeTaggedErrorToString;
777
+ declare const index$v_measure: typeof measure;
778
+ declare const index$v_oomWarningPrinted: typeof oomWarningPrinted;
779
+ declare const index$v_parseCurrentSuite: typeof parseCurrentSuite;
780
+ declare const index$v_parseCurrentVersion: typeof parseCurrentVersion;
781
+ declare const index$v_resultToString: typeof resultToString;
782
+ declare const index$v_safeAllocUint8Array: typeof safeAllocUint8Array;
783
+ declare const index$v_seeThrough: typeof seeThrough;
784
+ declare const index$v_trimStack: typeof trimStack;
785
+ declare const index$v_workspacePathFix: typeof workspacePathFix;
786
+ declare namespace index$v {
787
+ export { index$v_ALL_VERSIONS_IN_ORDER as ALL_VERSIONS_IN_ORDER, index$v_CURRENT_SUITE as CURRENT_SUITE, index$v_CURRENT_VERSION as CURRENT_VERSION, index$v_Compatibility as Compatibility, index$v_DEFAULT_SUITE as DEFAULT_SUITE, index$v_DEFAULT_VERSION as DEFAULT_VERSION, index$v_ErrorsCollector as ErrorsCollector, index$v_GpVersion as GpVersion, MAX_LENGTH$1 as MAX_LENGTH, Result$2 as Result, index$v_RichTaggedError as RichTaggedError, index$v_TEST_COMPARE_USING as TEST_COMPARE_USING, index$v_TestSuite as TestSuite, index$v_WithDebug as WithDebug, index$v___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$v_asOpaqueType as asOpaqueType, index$v_assertEmpty as assertEmpty, index$v_assertNever as assertNever, index$v_callCompareFunction as callCompareFunction, index$v_check as check, index$v_deepEqual as deepEqual, index$v_getAllKeysSorted as getAllKeysSorted, index$v_inspect as inspect, index$v_isBrowser as isBrowser, index$v_isResult as isResult, index$v_isTaggedError as isTaggedError, index$v_lazyInspect as lazyInspect, index$v_maybeTaggedErrorToString as maybeTaggedErrorToString, index$v_measure as measure, index$v_oomWarningPrinted as oomWarningPrinted, index$v_parseCurrentSuite as parseCurrentSuite, index$v_parseCurrentVersion as parseCurrentVersion, index$v_resultToString as resultToString, index$v_safeAllocUint8Array as safeAllocUint8Array, index$v_seeThrough as seeThrough, index$v_trimStack as trimStack, index$v_workspacePathFix as workspacePathFix };
788
+ export type { index$v_DeepEqualOptions as DeepEqualOptions, index$v_EnumMapping as EnumMapping, index$v_ErrorResult as ErrorResult, index$v_OK as OK, index$v_OkResult as OkResult, index$v_Opaque as Opaque, index$v_StringLiteral as StringLiteral, index$v_TaggedError as TaggedError, index$v_TokenOf as TokenOf, index$v_Uninstantiable as Uninstantiable, index$v_WithOpaque as WithOpaque };
785
789
  }
786
790
 
787
791
  /** A return value of some comparator. */
@@ -834,14 +838,14 @@ declare class Ordering {
834
838
  */
835
839
  type Comparator<V> = (self: V, other: V) => Ordering;
836
840
 
837
- type index$t_Comparator<V> = Comparator<V>;
838
- type index$t_Ordering = Ordering;
839
- declare const index$t_Ordering: typeof Ordering;
840
- type index$t_OrderingValue = OrderingValue;
841
- declare const index$t_OrderingValue: typeof OrderingValue;
842
- declare namespace index$t {
843
- export { index$t_Ordering as Ordering, index$t_OrderingValue as OrderingValue };
844
- export type { index$t_Comparator as Comparator };
841
+ type index$u_Comparator<V> = Comparator<V>;
842
+ type index$u_Ordering = Ordering;
843
+ declare const index$u_Ordering: typeof Ordering;
844
+ type index$u_OrderingValue = OrderingValue;
845
+ declare const index$u_OrderingValue: typeof OrderingValue;
846
+ declare namespace index$u {
847
+ export { index$u_Ordering as Ordering, index$u_OrderingValue as OrderingValue };
848
+ export type { index$u_Comparator as Comparator };
845
849
  }
846
850
 
847
851
  // TODO: [MaSo] Update BytesBlob and Bytes, so they return Result (not throw error)
@@ -873,12 +877,13 @@ declare class BytesBlob {
873
877
 
874
878
  /** Display a hex-encoded version of this byte blob, but truncated if it's large. */
875
879
  toStringTruncated() {
880
+ const bytes = `${this.raw.length} ${this.raw.length === 1 ? "byte" : "bytes"}`;
876
881
  if (this.raw.length > 32) {
877
882
  const start = bytesToHexString(this.raw.subarray(0, 16));
878
883
  const end = bytesToHexString(this.raw.subarray(this.raw.length - 16));
879
- return `${start}...${end.substring(2)} (${this.raw.length} bytes)`;
884
+ return `${start}...${end.substring(2)} (${bytes})`;
880
885
  }
881
- return this.toString();
886
+ return `${this.toString()} (${bytes})`;
882
887
  }
883
888
 
884
889
  toJSON() {
@@ -1234,53 +1239,50 @@ declare class BitVec {
1234
1239
  }
1235
1240
  }
1236
1241
 
1237
- type index$s_BitVec = BitVec;
1238
- declare const index$s_BitVec: typeof BitVec;
1239
- type index$s_Bytes<T extends number> = Bytes<T>;
1240
- declare const index$s_Bytes: typeof Bytes;
1241
- type index$s_BytesBlob = BytesBlob;
1242
- declare const index$s_BytesBlob: typeof BytesBlob;
1243
- declare const index$s_CODE_OF_0: typeof CODE_OF_0;
1244
- declare const index$s_CODE_OF_9: typeof CODE_OF_9;
1245
- declare const index$s_CODE_OF_A: typeof CODE_OF_A;
1246
- declare const index$s_CODE_OF_F: typeof CODE_OF_F;
1247
- declare const index$s_CODE_OF_a: typeof CODE_OF_a;
1248
- declare const index$s_CODE_OF_f: typeof CODE_OF_f;
1249
- declare const index$s_VALUE_OF_A: typeof VALUE_OF_A;
1250
- declare const index$s_byteFromString: typeof byteFromString;
1251
- declare const index$s_bytesBlobComparator: typeof bytesBlobComparator;
1252
- declare const index$s_bytesToHexString: typeof bytesToHexString;
1253
- declare const index$s_numberFromCharCode: typeof numberFromCharCode;
1254
- declare const index$s_u8ArraySameLengthEqual: typeof u8ArraySameLengthEqual;
1255
- declare namespace index$s {
1242
+ type index$t_BitVec = BitVec;
1243
+ declare const index$t_BitVec: typeof BitVec;
1244
+ type index$t_Bytes<T extends number> = Bytes<T>;
1245
+ declare const index$t_Bytes: typeof Bytes;
1246
+ type index$t_BytesBlob = BytesBlob;
1247
+ declare const index$t_BytesBlob: typeof BytesBlob;
1248
+ declare const index$t_CODE_OF_0: typeof CODE_OF_0;
1249
+ declare const index$t_CODE_OF_9: typeof CODE_OF_9;
1250
+ declare const index$t_CODE_OF_A: typeof CODE_OF_A;
1251
+ declare const index$t_CODE_OF_F: typeof CODE_OF_F;
1252
+ declare const index$t_CODE_OF_a: typeof CODE_OF_a;
1253
+ declare const index$t_CODE_OF_f: typeof CODE_OF_f;
1254
+ declare const index$t_VALUE_OF_A: typeof VALUE_OF_A;
1255
+ declare const index$t_byteFromString: typeof byteFromString;
1256
+ declare const index$t_bytesBlobComparator: typeof bytesBlobComparator;
1257
+ declare const index$t_bytesToHexString: typeof bytesToHexString;
1258
+ declare const index$t_numberFromCharCode: typeof numberFromCharCode;
1259
+ declare const index$t_u8ArraySameLengthEqual: typeof u8ArraySameLengthEqual;
1260
+ declare namespace index$t {
1256
1261
  export {
1257
- index$s_BitVec as BitVec,
1258
- index$s_Bytes as Bytes,
1259
- index$s_BytesBlob as BytesBlob,
1260
- index$s_CODE_OF_0 as CODE_OF_0,
1261
- index$s_CODE_OF_9 as CODE_OF_9,
1262
- index$s_CODE_OF_A as CODE_OF_A,
1263
- index$s_CODE_OF_F as CODE_OF_F,
1264
- index$s_CODE_OF_a as CODE_OF_a,
1265
- index$s_CODE_OF_f as CODE_OF_f,
1266
- index$s_VALUE_OF_A as VALUE_OF_A,
1267
- index$s_byteFromString as byteFromString,
1268
- index$s_bytesBlobComparator as bytesBlobComparator,
1269
- index$s_bytesToHexString as bytesToHexString,
1270
- index$s_numberFromCharCode as numberFromCharCode,
1271
- index$s_u8ArraySameLengthEqual as u8ArraySameLengthEqual,
1262
+ index$t_BitVec as BitVec,
1263
+ index$t_Bytes as Bytes,
1264
+ index$t_BytesBlob as BytesBlob,
1265
+ index$t_CODE_OF_0 as CODE_OF_0,
1266
+ index$t_CODE_OF_9 as CODE_OF_9,
1267
+ index$t_CODE_OF_A as CODE_OF_A,
1268
+ index$t_CODE_OF_F as CODE_OF_F,
1269
+ index$t_CODE_OF_a as CODE_OF_a,
1270
+ index$t_CODE_OF_f as CODE_OF_f,
1271
+ index$t_VALUE_OF_A as VALUE_OF_A,
1272
+ index$t_byteFromString as byteFromString,
1273
+ index$t_bytesBlobComparator as bytesBlobComparator,
1274
+ index$t_bytesToHexString as bytesToHexString,
1275
+ index$t_numberFromCharCode as numberFromCharCode,
1276
+ index$t_u8ArraySameLengthEqual as u8ArraySameLengthEqual,
1272
1277
  };
1273
1278
  }
1274
1279
 
1275
- /**
1276
- * TODO [ToDr] This should be `unique symbol`, but for some reason
1277
- * I can't figure out how to build `@typeberry/blocks` package.
1278
- */
1279
- declare const __REPRESENTATION_BYTES__: "REPRESENTATION_BYTES";
1280
+ declare const __REPRESENTATION_BYTES__: unique symbol;
1280
1281
 
1281
1282
  type WithBytesRepresentation<Bytes extends number> = {
1282
1283
  readonly [__REPRESENTATION_BYTES__]: Bytes;
1283
1284
  };
1285
+
1284
1286
  declare const asTypedNumber = <T, N extends number>(v: T): T & WithBytesRepresentation<N> =>
1285
1287
  v as T & WithBytesRepresentation<N>;
1286
1288
 
@@ -1416,37 +1418,37 @@ declare const minU64 = (a: U64, ...values: U64[]): U64 => values.reduce((min, va
1416
1418
  /** Get the biggest value between U64 a and values given as input parameters. */
1417
1419
  declare const maxU64 = (a: U64, ...values: U64[]): U64 => values.reduce((max, value) => (value < max ? max : value), a);
1418
1420
 
1419
- type index$r_FixedSizeNumber<Bytes extends number> = FixedSizeNumber<Bytes>;
1420
- declare const index$r_MAX_VALUE_U16: typeof MAX_VALUE_U16;
1421
- declare const index$r_MAX_VALUE_U32: typeof MAX_VALUE_U32;
1422
- declare const index$r_MAX_VALUE_U64: typeof MAX_VALUE_U64;
1423
- declare const index$r_MAX_VALUE_U8: typeof MAX_VALUE_U8;
1424
- type index$r_U16 = U16;
1425
- type index$r_U32 = U32;
1426
- type index$r_U64 = U64;
1427
- type index$r_U8 = U8;
1428
- type index$r_WithBytesRepresentation<Bytes extends number> = WithBytesRepresentation<Bytes>;
1429
- declare const index$r___REPRESENTATION_BYTES__: typeof __REPRESENTATION_BYTES__;
1430
- declare const index$r_asTypedNumber: typeof asTypedNumber;
1431
- declare const index$r_isU16: typeof isU16;
1432
- declare const index$r_isU32: typeof isU32;
1433
- declare const index$r_isU64: typeof isU64;
1434
- declare const index$r_isU8: typeof isU8;
1435
- declare const index$r_leBytesAsU32: typeof leBytesAsU32;
1436
- declare const index$r_maxU64: typeof maxU64;
1437
- declare const index$r_minU64: typeof minU64;
1438
- declare const index$r_sumU32: typeof sumU32;
1439
- declare const index$r_sumU64: typeof sumU64;
1440
- declare const index$r_tryAsU16: typeof tryAsU16;
1441
- declare const index$r_tryAsU32: typeof tryAsU32;
1442
- declare const index$r_tryAsU64: typeof tryAsU64;
1443
- declare const index$r_tryAsU8: typeof tryAsU8;
1444
- declare const index$r_u32AsLeBytes: typeof u32AsLeBytes;
1445
- declare const index$r_u64FromParts: typeof u64FromParts;
1446
- declare const index$r_u64IntoParts: typeof u64IntoParts;
1447
- declare namespace index$r {
1448
- export { index$r_MAX_VALUE_U16 as MAX_VALUE_U16, index$r_MAX_VALUE_U32 as MAX_VALUE_U32, index$r_MAX_VALUE_U64 as MAX_VALUE_U64, index$r_MAX_VALUE_U8 as MAX_VALUE_U8, index$r___REPRESENTATION_BYTES__ as __REPRESENTATION_BYTES__, index$r_asTypedNumber as asTypedNumber, index$r_isU16 as isU16, index$r_isU32 as isU32, index$r_isU64 as isU64, index$r_isU8 as isU8, index$r_leBytesAsU32 as leBytesAsU32, index$r_maxU64 as maxU64, index$r_minU64 as minU64, index$r_sumU32 as sumU32, index$r_sumU64 as sumU64, index$r_tryAsU16 as tryAsU16, index$r_tryAsU32 as tryAsU32, index$r_tryAsU64 as tryAsU64, index$r_tryAsU8 as tryAsU8, index$r_u32AsLeBytes as u32AsLeBytes, index$r_u64FromParts as u64FromParts, index$r_u64IntoParts as u64IntoParts };
1449
- export type { index$r_FixedSizeNumber as FixedSizeNumber, Result$1 as Result, index$r_U16 as U16, index$r_U32 as U32, index$r_U64 as U64, index$r_U8 as U8, index$r_WithBytesRepresentation as WithBytesRepresentation };
1421
+ type index$s_FixedSizeNumber<Bytes extends number> = FixedSizeNumber<Bytes>;
1422
+ declare const index$s_MAX_VALUE_U16: typeof MAX_VALUE_U16;
1423
+ declare const index$s_MAX_VALUE_U32: typeof MAX_VALUE_U32;
1424
+ declare const index$s_MAX_VALUE_U64: typeof MAX_VALUE_U64;
1425
+ declare const index$s_MAX_VALUE_U8: typeof MAX_VALUE_U8;
1426
+ type index$s_U16 = U16;
1427
+ type index$s_U32 = U32;
1428
+ type index$s_U64 = U64;
1429
+ type index$s_U8 = U8;
1430
+ type index$s_WithBytesRepresentation<Bytes extends number> = WithBytesRepresentation<Bytes>;
1431
+ declare const index$s___REPRESENTATION_BYTES__: typeof __REPRESENTATION_BYTES__;
1432
+ declare const index$s_asTypedNumber: typeof asTypedNumber;
1433
+ declare const index$s_isU16: typeof isU16;
1434
+ declare const index$s_isU32: typeof isU32;
1435
+ declare const index$s_isU64: typeof isU64;
1436
+ declare const index$s_isU8: typeof isU8;
1437
+ declare const index$s_leBytesAsU32: typeof leBytesAsU32;
1438
+ declare const index$s_maxU64: typeof maxU64;
1439
+ declare const index$s_minU64: typeof minU64;
1440
+ declare const index$s_sumU32: typeof sumU32;
1441
+ declare const index$s_sumU64: typeof sumU64;
1442
+ declare const index$s_tryAsU16: typeof tryAsU16;
1443
+ declare const index$s_tryAsU32: typeof tryAsU32;
1444
+ declare const index$s_tryAsU64: typeof tryAsU64;
1445
+ declare const index$s_tryAsU8: typeof tryAsU8;
1446
+ declare const index$s_u32AsLeBytes: typeof u32AsLeBytes;
1447
+ declare const index$s_u64FromParts: typeof u64FromParts;
1448
+ declare const index$s_u64IntoParts: typeof u64IntoParts;
1449
+ declare namespace index$s {
1450
+ export { index$s_MAX_VALUE_U16 as MAX_VALUE_U16, index$s_MAX_VALUE_U32 as MAX_VALUE_U32, index$s_MAX_VALUE_U64 as MAX_VALUE_U64, index$s_MAX_VALUE_U8 as MAX_VALUE_U8, index$s___REPRESENTATION_BYTES__ as __REPRESENTATION_BYTES__, index$s_asTypedNumber as asTypedNumber, index$s_isU16 as isU16, index$s_isU32 as isU32, index$s_isU64 as isU64, index$s_isU8 as isU8, index$s_leBytesAsU32 as leBytesAsU32, index$s_maxU64 as maxU64, index$s_minU64 as minU64, index$s_sumU32 as sumU32, index$s_sumU64 as sumU64, index$s_tryAsU16 as tryAsU16, index$s_tryAsU32 as tryAsU32, index$s_tryAsU64 as tryAsU64, index$s_tryAsU8 as tryAsU8, index$s_u32AsLeBytes as u32AsLeBytes, index$s_u64FromParts as u64FromParts, index$s_u64IntoParts as u64IntoParts };
1451
+ export type { index$s_FixedSizeNumber as FixedSizeNumber, Result$1 as Result, index$s_U16 as U16, index$s_U32 as U32, index$s_U64 as U64, index$s_U8 as U8, index$s_WithBytesRepresentation as WithBytesRepresentation };
1450
1452
  }
1451
1453
 
1452
1454
  /** A decoder for some specific type `T` */
@@ -3468,53 +3470,53 @@ declare function sequenceViewFixLen<T, V>(
3468
3470
  );
3469
3471
  }
3470
3472
 
3471
- type index$q_ClassConstructor<T> = ClassConstructor<T>;
3472
- type index$q_Codec<T> = Codec<T>;
3473
- type index$q_CodecRecord<T> = CodecRecord<T>;
3474
- type index$q_CodecWithView<T, V> = CodecWithView<T, V>;
3475
- declare const index$q_DEFAULT_START_LENGTH: typeof DEFAULT_START_LENGTH;
3476
- type index$q_Decode<T> = Decode<T>;
3477
- type index$q_Decoder = Decoder;
3478
- declare const index$q_Decoder: typeof Decoder;
3479
- type index$q_DescribedBy<T> = DescribedBy<T>;
3480
- type index$q_Descriptor<T, V = T> = Descriptor<T, V>;
3481
- declare const index$q_Descriptor: typeof Descriptor;
3482
- type index$q_DescriptorRecord<T> = DescriptorRecord<T>;
3483
- type index$q_Encode<T> = Encode<T>;
3484
- type index$q_Encoder = Encoder;
3485
- declare const index$q_Encoder: typeof Encoder;
3486
- type index$q_EndOfDataError = EndOfDataError;
3487
- declare const index$q_EndOfDataError: typeof EndOfDataError;
3488
- type index$q_LengthRange = LengthRange;
3489
- declare const index$q_MASKS: typeof MASKS;
3490
- declare const index$q_MAX_LENGTH: typeof MAX_LENGTH;
3491
- type index$q_ObjectView<T> = ObjectView<T>;
3492
- declare const index$q_ObjectView: typeof ObjectView;
3493
- type index$q_OptionalRecord<T> = OptionalRecord<T>;
3494
- type index$q_PropertyKeys<T> = PropertyKeys<T>;
3495
- type index$q_SequenceView<T, V = T> = SequenceView<T, V>;
3496
- declare const index$q_SequenceView: typeof SequenceView;
3497
- type index$q_SimpleDescriptorRecord<T> = SimpleDescriptorRecord<T>;
3498
- type index$q_SizeHint = SizeHint;
3499
- declare const index$q_TYPICAL_DICTIONARY_LENGTH: typeof TYPICAL_DICTIONARY_LENGTH;
3500
- declare const index$q_TYPICAL_SEQUENCE_LENGTH: typeof TYPICAL_SEQUENCE_LENGTH;
3501
- type index$q_ViewField<T, V> = ViewField<T, V>;
3502
- declare const index$q_ViewField: typeof ViewField;
3503
- type index$q_ViewOf<T, D extends DescriptorRecord<T>> = ViewOf<T, D>;
3504
- declare const index$q_addSizeHints: typeof addSizeHints;
3505
- declare const index$q_decodeVariableLengthExtraBytes: typeof decodeVariableLengthExtraBytes;
3506
- declare const index$q_exactHint: typeof exactHint;
3507
- declare const index$q_forEachDescriptor: typeof forEachDescriptor;
3508
- declare const index$q_hasUniqueView: typeof hasUniqueView;
3509
- declare const index$q_objectView: typeof objectView;
3510
- declare const index$q_readonlyArray: typeof readonlyArray;
3511
- declare const index$q_sequenceViewFixLen: typeof sequenceViewFixLen;
3512
- declare const index$q_sequenceViewVarLen: typeof sequenceViewVarLen;
3513
- declare const index$q_tryAsExactBytes: typeof tryAsExactBytes;
3514
- declare const index$q_validateLength: typeof validateLength;
3515
- declare namespace index$q {
3516
- export { index$q_DEFAULT_START_LENGTH as DEFAULT_START_LENGTH, index$q_Decoder as Decoder, index$q_Descriptor as Descriptor, index$q_Encoder as Encoder, index$q_EndOfDataError as EndOfDataError, index$q_MASKS as MASKS, index$q_MAX_LENGTH as MAX_LENGTH, index$q_ObjectView as ObjectView, index$q_SequenceView as SequenceView, index$q_TYPICAL_DICTIONARY_LENGTH as TYPICAL_DICTIONARY_LENGTH, index$q_TYPICAL_SEQUENCE_LENGTH as TYPICAL_SEQUENCE_LENGTH, index$q_ViewField as ViewField, index$q_addSizeHints as addSizeHints, codec$1 as codec, index$q_decodeVariableLengthExtraBytes as decodeVariableLengthExtraBytes, index$q_exactHint as exactHint, index$q_forEachDescriptor as forEachDescriptor, index$q_hasUniqueView as hasUniqueView, index$q_objectView as objectView, index$q_readonlyArray as readonlyArray, index$q_sequenceViewFixLen as sequenceViewFixLen, index$q_sequenceViewVarLen as sequenceViewVarLen, index$q_tryAsExactBytes as tryAsExactBytes, index$q_validateLength as validateLength };
3517
- export type { index$q_ClassConstructor as ClassConstructor, index$q_Codec as Codec, index$q_CodecRecord as CodecRecord, index$q_CodecWithView as CodecWithView, index$q_Decode as Decode, index$q_DescribedBy as DescribedBy, index$q_DescriptorRecord as DescriptorRecord, index$q_Encode as Encode, index$q_LengthRange as LengthRange, index$q_OptionalRecord as OptionalRecord, Options$1 as Options, index$q_PropertyKeys as PropertyKeys, index$q_SimpleDescriptorRecord as SimpleDescriptorRecord, index$q_SizeHint as SizeHint, index$q_ViewOf as ViewOf };
3473
+ type index$r_ClassConstructor<T> = ClassConstructor<T>;
3474
+ type index$r_Codec<T> = Codec<T>;
3475
+ type index$r_CodecRecord<T> = CodecRecord<T>;
3476
+ type index$r_CodecWithView<T, V> = CodecWithView<T, V>;
3477
+ declare const index$r_DEFAULT_START_LENGTH: typeof DEFAULT_START_LENGTH;
3478
+ type index$r_Decode<T> = Decode<T>;
3479
+ type index$r_Decoder = Decoder;
3480
+ declare const index$r_Decoder: typeof Decoder;
3481
+ type index$r_DescribedBy<T> = DescribedBy<T>;
3482
+ type index$r_Descriptor<T, V = T> = Descriptor<T, V>;
3483
+ declare const index$r_Descriptor: typeof Descriptor;
3484
+ type index$r_DescriptorRecord<T> = DescriptorRecord<T>;
3485
+ type index$r_Encode<T> = Encode<T>;
3486
+ type index$r_Encoder = Encoder;
3487
+ declare const index$r_Encoder: typeof Encoder;
3488
+ type index$r_EndOfDataError = EndOfDataError;
3489
+ declare const index$r_EndOfDataError: typeof EndOfDataError;
3490
+ type index$r_LengthRange = LengthRange;
3491
+ declare const index$r_MASKS: typeof MASKS;
3492
+ declare const index$r_MAX_LENGTH: typeof MAX_LENGTH;
3493
+ type index$r_ObjectView<T> = ObjectView<T>;
3494
+ declare const index$r_ObjectView: typeof ObjectView;
3495
+ type index$r_OptionalRecord<T> = OptionalRecord<T>;
3496
+ type index$r_PropertyKeys<T> = PropertyKeys<T>;
3497
+ type index$r_SequenceView<T, V = T> = SequenceView<T, V>;
3498
+ declare const index$r_SequenceView: typeof SequenceView;
3499
+ type index$r_SimpleDescriptorRecord<T> = SimpleDescriptorRecord<T>;
3500
+ type index$r_SizeHint = SizeHint;
3501
+ declare const index$r_TYPICAL_DICTIONARY_LENGTH: typeof TYPICAL_DICTIONARY_LENGTH;
3502
+ declare const index$r_TYPICAL_SEQUENCE_LENGTH: typeof TYPICAL_SEQUENCE_LENGTH;
3503
+ type index$r_ViewField<T, V> = ViewField<T, V>;
3504
+ declare const index$r_ViewField: typeof ViewField;
3505
+ type index$r_ViewOf<T, D extends DescriptorRecord<T>> = ViewOf<T, D>;
3506
+ declare const index$r_addSizeHints: typeof addSizeHints;
3507
+ declare const index$r_decodeVariableLengthExtraBytes: typeof decodeVariableLengthExtraBytes;
3508
+ declare const index$r_exactHint: typeof exactHint;
3509
+ declare const index$r_forEachDescriptor: typeof forEachDescriptor;
3510
+ declare const index$r_hasUniqueView: typeof hasUniqueView;
3511
+ declare const index$r_objectView: typeof objectView;
3512
+ declare const index$r_readonlyArray: typeof readonlyArray;
3513
+ declare const index$r_sequenceViewFixLen: typeof sequenceViewFixLen;
3514
+ declare const index$r_sequenceViewVarLen: typeof sequenceViewVarLen;
3515
+ declare const index$r_tryAsExactBytes: typeof tryAsExactBytes;
3516
+ declare const index$r_validateLength: typeof validateLength;
3517
+ declare namespace index$r {
3518
+ export { index$r_DEFAULT_START_LENGTH as DEFAULT_START_LENGTH, index$r_Decoder as Decoder, index$r_Descriptor as Descriptor, index$r_Encoder as Encoder, index$r_EndOfDataError as EndOfDataError, index$r_MASKS as MASKS, index$r_MAX_LENGTH as MAX_LENGTH, index$r_ObjectView as ObjectView, index$r_SequenceView as SequenceView, index$r_TYPICAL_DICTIONARY_LENGTH as TYPICAL_DICTIONARY_LENGTH, index$r_TYPICAL_SEQUENCE_LENGTH as TYPICAL_SEQUENCE_LENGTH, index$r_ViewField as ViewField, index$r_addSizeHints as addSizeHints, codec$1 as codec, index$r_decodeVariableLengthExtraBytes as decodeVariableLengthExtraBytes, index$r_exactHint as exactHint, index$r_forEachDescriptor as forEachDescriptor, index$r_hasUniqueView as hasUniqueView, index$r_objectView as objectView, index$r_readonlyArray as readonlyArray, index$r_sequenceViewFixLen as sequenceViewFixLen, index$r_sequenceViewVarLen as sequenceViewVarLen, index$r_tryAsExactBytes as tryAsExactBytes, index$r_validateLength as validateLength };
3519
+ export type { index$r_ClassConstructor as ClassConstructor, index$r_Codec as Codec, index$r_CodecRecord as CodecRecord, index$r_CodecWithView as CodecWithView, index$r_Decode as Decode, index$r_DescribedBy as DescribedBy, index$r_DescriptorRecord as DescriptorRecord, index$r_Encode as Encode, index$r_LengthRange as LengthRange, index$r_OptionalRecord as OptionalRecord, Options$1 as Options, index$r_PropertyKeys as PropertyKeys, index$r_SimpleDescriptorRecord as SimpleDescriptorRecord, index$r_SizeHint as SizeHint, index$r_ViewOf as ViewOf };
3518
3520
  }
3519
3521
 
3520
3522
  /**
@@ -3735,23 +3737,23 @@ declare namespace keccak {
3735
3737
  // TODO [ToDr] (#213) this should most likely be moved to a separate
3736
3738
  // package to avoid pulling in unnecessary deps.
3737
3739
 
3738
- type index$p_Blake2b = Blake2b;
3739
- declare const index$p_Blake2b: typeof Blake2b;
3740
- type index$p_Blake2bHash = Blake2bHash;
3741
- type index$p_HASH_SIZE = HASH_SIZE;
3742
- type index$p_KeccakHash = KeccakHash;
3743
- type index$p_OpaqueHash = OpaqueHash;
3744
- type index$p_TRUNCATED_HASH_SIZE = TRUNCATED_HASH_SIZE;
3745
- type index$p_TruncatedHash = TruncatedHash;
3746
- type index$p_WithHash<THash extends OpaqueHash, TData> = WithHash<THash, TData>;
3747
- declare const index$p_WithHash: typeof WithHash;
3748
- type index$p_WithHashAndBytes<THash extends OpaqueHash, TData> = WithHashAndBytes<THash, TData>;
3749
- declare const index$p_WithHashAndBytes: typeof WithHashAndBytes;
3750
- declare const index$p_ZERO_HASH: typeof ZERO_HASH;
3751
- declare const index$p_keccak: typeof keccak;
3752
- declare namespace index$p {
3753
- export { index$p_Blake2b as Blake2b, index$p_WithHash as WithHash, index$p_WithHashAndBytes as WithHashAndBytes, index$p_ZERO_HASH as ZERO_HASH, index$p_keccak as keccak, zero$1 as zero };
3754
- export type { index$p_Blake2bHash as Blake2bHash, index$p_HASH_SIZE as HASH_SIZE, index$p_KeccakHash as KeccakHash, index$p_OpaqueHash as OpaqueHash, index$p_TRUNCATED_HASH_SIZE as TRUNCATED_HASH_SIZE, index$p_TruncatedHash as TruncatedHash };
3740
+ type index$q_Blake2b = Blake2b;
3741
+ declare const index$q_Blake2b: typeof Blake2b;
3742
+ type index$q_Blake2bHash = Blake2bHash;
3743
+ type index$q_HASH_SIZE = HASH_SIZE;
3744
+ type index$q_KeccakHash = KeccakHash;
3745
+ type index$q_OpaqueHash = OpaqueHash;
3746
+ type index$q_TRUNCATED_HASH_SIZE = TRUNCATED_HASH_SIZE;
3747
+ type index$q_TruncatedHash = TruncatedHash;
3748
+ type index$q_WithHash<THash extends OpaqueHash, TData> = WithHash<THash, TData>;
3749
+ declare const index$q_WithHash: typeof WithHash;
3750
+ type index$q_WithHashAndBytes<THash extends OpaqueHash, TData> = WithHashAndBytes<THash, TData>;
3751
+ declare const index$q_WithHashAndBytes: typeof WithHashAndBytes;
3752
+ declare const index$q_ZERO_HASH: typeof ZERO_HASH;
3753
+ declare const index$q_keccak: typeof keccak;
3754
+ declare namespace index$q {
3755
+ export { index$q_Blake2b as Blake2b, index$q_WithHash as WithHash, index$q_WithHashAndBytes as WithHashAndBytes, index$q_ZERO_HASH as ZERO_HASH, index$q_keccak as keccak, zero$1 as zero };
3756
+ export type { index$q_Blake2bHash as Blake2bHash, index$q_HASH_SIZE as HASH_SIZE, index$q_KeccakHash as KeccakHash, index$q_OpaqueHash as OpaqueHash, index$q_TRUNCATED_HASH_SIZE as TRUNCATED_HASH_SIZE, index$q_TruncatedHash as TruncatedHash };
3755
3757
  }
3756
3758
 
3757
3759
  /** Immutable view of the `HashDictionary`. */
@@ -4528,37 +4530,37 @@ declare class TruncatedHashDictionary<T extends OpaqueHash, V> {
4528
4530
  }
4529
4531
  }
4530
4532
 
4531
- type index$o_ArrayView<T> = ArrayView<T>;
4532
- declare const index$o_ArrayView: typeof ArrayView;
4533
- type index$o_FixedSizeArray<T, N extends number> = FixedSizeArray<T, N>;
4534
- declare const index$o_FixedSizeArray: typeof FixedSizeArray;
4535
- type index$o_HashDictionary<K extends OpaqueHash, V> = HashDictionary<K, V>;
4536
- declare const index$o_HashDictionary: typeof HashDictionary;
4537
- type index$o_HashSet<V extends OpaqueHash> = HashSet<V>;
4538
- declare const index$o_HashSet: typeof HashSet;
4539
- type index$o_HashWithZeroedBit<T extends OpaqueHash> = HashWithZeroedBit<T>;
4540
- type index$o_ImmutableHashDictionary<K extends OpaqueHash, V> = ImmutableHashDictionary<K, V>;
4541
- type index$o_ImmutableHashSet<V extends OpaqueHash> = ImmutableHashSet<V>;
4542
- type index$o_ImmutableSortedArray<V> = ImmutableSortedArray<V>;
4543
- type index$o_ImmutableSortedSet<V> = ImmutableSortedSet<V>;
4544
- type index$o_KeyMapper<K> = KeyMapper<K>;
4545
- type index$o_KeyMappers<TKeys extends readonly unknown[]> = KeyMappers<TKeys>;
4546
- type index$o_KnownSize<T, F extends string> = KnownSize<T, F>;
4547
- type index$o_KnownSizeArray<T, F extends string> = KnownSizeArray<T, F>;
4548
- type index$o_KnownSizeId<X> = KnownSizeId<X>;
4549
- type index$o_MultiMap<TKeys extends readonly unknown[], TValue> = MultiMap<TKeys, TValue>;
4550
- declare const index$o_MultiMap: typeof MultiMap;
4551
- type index$o_NestedMaps<TKeys extends readonly unknown[], TValue> = NestedMaps<TKeys, TValue>;
4552
- type index$o_SortedArray<V> = SortedArray<V>;
4553
- declare const index$o_SortedArray: typeof SortedArray;
4554
- type index$o_SortedSet<V> = SortedSet<V>;
4555
- declare const index$o_SortedSet: typeof SortedSet;
4556
- type index$o_TruncatedHashDictionary<T extends OpaqueHash, V> = TruncatedHashDictionary<T, V>;
4557
- declare const index$o_TruncatedHashDictionary: typeof TruncatedHashDictionary;
4558
- declare const index$o_asKnownSize: typeof asKnownSize;
4559
- declare namespace index$o {
4560
- export { index$o_ArrayView as ArrayView, index$o_FixedSizeArray as FixedSizeArray, index$o_HashDictionary as HashDictionary, index$o_HashSet as HashSet, index$o_MultiMap as MultiMap, index$o_SortedArray as SortedArray, index$o_SortedSet as SortedSet, index$o_TruncatedHashDictionary as TruncatedHashDictionary, index$o_asKnownSize as asKnownSize };
4561
- export type { index$o_HashWithZeroedBit as HashWithZeroedBit, index$o_ImmutableHashDictionary as ImmutableHashDictionary, index$o_ImmutableHashSet as ImmutableHashSet, index$o_ImmutableSortedArray as ImmutableSortedArray, index$o_ImmutableSortedSet as ImmutableSortedSet, index$o_KeyMapper as KeyMapper, index$o_KeyMappers as KeyMappers, index$o_KnownSize as KnownSize, index$o_KnownSizeArray as KnownSizeArray, index$o_KnownSizeId as KnownSizeId, index$o_NestedMaps as NestedMaps };
4533
+ type index$p_ArrayView<T> = ArrayView<T>;
4534
+ declare const index$p_ArrayView: typeof ArrayView;
4535
+ type index$p_FixedSizeArray<T, N extends number> = FixedSizeArray<T, N>;
4536
+ declare const index$p_FixedSizeArray: typeof FixedSizeArray;
4537
+ type index$p_HashDictionary<K extends OpaqueHash, V> = HashDictionary<K, V>;
4538
+ declare const index$p_HashDictionary: typeof HashDictionary;
4539
+ type index$p_HashSet<V extends OpaqueHash> = HashSet<V>;
4540
+ declare const index$p_HashSet: typeof HashSet;
4541
+ type index$p_HashWithZeroedBit<T extends OpaqueHash> = HashWithZeroedBit<T>;
4542
+ type index$p_ImmutableHashDictionary<K extends OpaqueHash, V> = ImmutableHashDictionary<K, V>;
4543
+ type index$p_ImmutableHashSet<V extends OpaqueHash> = ImmutableHashSet<V>;
4544
+ type index$p_ImmutableSortedArray<V> = ImmutableSortedArray<V>;
4545
+ type index$p_ImmutableSortedSet<V> = ImmutableSortedSet<V>;
4546
+ type index$p_KeyMapper<K> = KeyMapper<K>;
4547
+ type index$p_KeyMappers<TKeys extends readonly unknown[]> = KeyMappers<TKeys>;
4548
+ type index$p_KnownSize<T, F extends string> = KnownSize<T, F>;
4549
+ type index$p_KnownSizeArray<T, F extends string> = KnownSizeArray<T, F>;
4550
+ type index$p_KnownSizeId<X> = KnownSizeId<X>;
4551
+ type index$p_MultiMap<TKeys extends readonly unknown[], TValue> = MultiMap<TKeys, TValue>;
4552
+ declare const index$p_MultiMap: typeof MultiMap;
4553
+ type index$p_NestedMaps<TKeys extends readonly unknown[], TValue> = NestedMaps<TKeys, TValue>;
4554
+ type index$p_SortedArray<V> = SortedArray<V>;
4555
+ declare const index$p_SortedArray: typeof SortedArray;
4556
+ type index$p_SortedSet<V> = SortedSet<V>;
4557
+ declare const index$p_SortedSet: typeof SortedSet;
4558
+ type index$p_TruncatedHashDictionary<T extends OpaqueHash, V> = TruncatedHashDictionary<T, V>;
4559
+ declare const index$p_TruncatedHashDictionary: typeof TruncatedHashDictionary;
4560
+ declare const index$p_asKnownSize: typeof asKnownSize;
4561
+ declare namespace index$p {
4562
+ export { index$p_ArrayView as ArrayView, index$p_FixedSizeArray as FixedSizeArray, index$p_HashDictionary as HashDictionary, index$p_HashSet as HashSet, index$p_MultiMap as MultiMap, index$p_SortedArray as SortedArray, index$p_SortedSet as SortedSet, index$p_TruncatedHashDictionary as TruncatedHashDictionary, index$p_asKnownSize as asKnownSize };
4563
+ export type { index$p_HashWithZeroedBit as HashWithZeroedBit, index$p_ImmutableHashDictionary as ImmutableHashDictionary, index$p_ImmutableHashSet as ImmutableHashSet, index$p_ImmutableSortedArray as ImmutableSortedArray, index$p_ImmutableSortedSet as ImmutableSortedSet, index$p_KeyMapper as KeyMapper, index$p_KeyMappers as KeyMappers, index$p_KnownSize as KnownSize, index$p_KnownSizeArray as KnownSizeArray, index$p_KnownSizeId as KnownSizeId, index$p_NestedMaps as NestedMaps };
4562
4564
  }
4563
4565
 
4564
4566
  declare namespace bandersnatch_d_exports {
@@ -4918,32 +4920,32 @@ declare namespace keyDerivation {
4918
4920
  export type { keyDerivation_BandersnatchSecretSeed as BandersnatchSecretSeed, keyDerivation_Ed25519SecretSeed as Ed25519SecretSeed, keyDerivation_KeySeed as KeySeed, keyDerivation_SEED_SIZE as SEED_SIZE };
4919
4921
  }
4920
4922
 
4921
- type index$n_BANDERSNATCH_KEY_BYTES = BANDERSNATCH_KEY_BYTES;
4922
- type index$n_BANDERSNATCH_PROOF_BYTES = BANDERSNATCH_PROOF_BYTES;
4923
- type index$n_BANDERSNATCH_RING_ROOT_BYTES = BANDERSNATCH_RING_ROOT_BYTES;
4924
- type index$n_BANDERSNATCH_VRF_SIGNATURE_BYTES = BANDERSNATCH_VRF_SIGNATURE_BYTES;
4925
- type index$n_BLS_KEY_BYTES = BLS_KEY_BYTES;
4926
- type index$n_BandersnatchKey = BandersnatchKey;
4927
- type index$n_BandersnatchProof = BandersnatchProof;
4928
- type index$n_BandersnatchRingRoot = BandersnatchRingRoot;
4929
- type index$n_BandersnatchSecretSeed = BandersnatchSecretSeed;
4930
- type index$n_BandersnatchVrfSignature = BandersnatchVrfSignature;
4931
- type index$n_BlsKey = BlsKey;
4932
- type index$n_ED25519_KEY_BYTES = ED25519_KEY_BYTES;
4933
- type index$n_ED25519_PRIV_KEY_BYTES = ED25519_PRIV_KEY_BYTES;
4934
- type index$n_ED25519_SIGNATURE_BYTES = ED25519_SIGNATURE_BYTES;
4935
- type index$n_Ed25519Key = Ed25519Key;
4936
- type index$n_Ed25519Pair = Ed25519Pair;
4937
- declare const index$n_Ed25519Pair: typeof Ed25519Pair;
4938
- type index$n_Ed25519SecretSeed = Ed25519SecretSeed;
4939
- type index$n_Ed25519Signature = Ed25519Signature;
4940
- type index$n_SEED_SIZE = SEED_SIZE;
4941
- declare const index$n_bandersnatch: typeof bandersnatch;
4942
- declare const index$n_ed25519: typeof ed25519;
4943
- declare const index$n_keyDerivation: typeof keyDerivation;
4944
- declare namespace index$n {
4945
- export { index$n_Ed25519Pair as Ed25519Pair, index$n_bandersnatch as bandersnatch, bandersnatch_d_exports as bandersnatchWasm, index$n_ed25519 as ed25519, initAll as initWasm, index$n_keyDerivation as keyDerivation };
4946
- export type { index$n_BANDERSNATCH_KEY_BYTES as BANDERSNATCH_KEY_BYTES, index$n_BANDERSNATCH_PROOF_BYTES as BANDERSNATCH_PROOF_BYTES, index$n_BANDERSNATCH_RING_ROOT_BYTES as BANDERSNATCH_RING_ROOT_BYTES, index$n_BANDERSNATCH_VRF_SIGNATURE_BYTES as BANDERSNATCH_VRF_SIGNATURE_BYTES, index$n_BLS_KEY_BYTES as BLS_KEY_BYTES, index$n_BandersnatchKey as BandersnatchKey, index$n_BandersnatchProof as BandersnatchProof, index$n_BandersnatchRingRoot as BandersnatchRingRoot, index$n_BandersnatchSecretSeed as BandersnatchSecretSeed, index$n_BandersnatchVrfSignature as BandersnatchVrfSignature, index$n_BlsKey as BlsKey, index$n_ED25519_KEY_BYTES as ED25519_KEY_BYTES, index$n_ED25519_PRIV_KEY_BYTES as ED25519_PRIV_KEY_BYTES, index$n_ED25519_SIGNATURE_BYTES as ED25519_SIGNATURE_BYTES, index$n_Ed25519Key as Ed25519Key, index$n_Ed25519SecretSeed as Ed25519SecretSeed, index$n_Ed25519Signature as Ed25519Signature, KeySeed as PublicKeySeed, index$n_SEED_SIZE as SEED_SIZE };
4923
+ type index$o_BANDERSNATCH_KEY_BYTES = BANDERSNATCH_KEY_BYTES;
4924
+ type index$o_BANDERSNATCH_PROOF_BYTES = BANDERSNATCH_PROOF_BYTES;
4925
+ type index$o_BANDERSNATCH_RING_ROOT_BYTES = BANDERSNATCH_RING_ROOT_BYTES;
4926
+ type index$o_BANDERSNATCH_VRF_SIGNATURE_BYTES = BANDERSNATCH_VRF_SIGNATURE_BYTES;
4927
+ type index$o_BLS_KEY_BYTES = BLS_KEY_BYTES;
4928
+ type index$o_BandersnatchKey = BandersnatchKey;
4929
+ type index$o_BandersnatchProof = BandersnatchProof;
4930
+ type index$o_BandersnatchRingRoot = BandersnatchRingRoot;
4931
+ type index$o_BandersnatchSecretSeed = BandersnatchSecretSeed;
4932
+ type index$o_BandersnatchVrfSignature = BandersnatchVrfSignature;
4933
+ type index$o_BlsKey = BlsKey;
4934
+ type index$o_ED25519_KEY_BYTES = ED25519_KEY_BYTES;
4935
+ type index$o_ED25519_PRIV_KEY_BYTES = ED25519_PRIV_KEY_BYTES;
4936
+ type index$o_ED25519_SIGNATURE_BYTES = ED25519_SIGNATURE_BYTES;
4937
+ type index$o_Ed25519Key = Ed25519Key;
4938
+ type index$o_Ed25519Pair = Ed25519Pair;
4939
+ declare const index$o_Ed25519Pair: typeof Ed25519Pair;
4940
+ type index$o_Ed25519SecretSeed = Ed25519SecretSeed;
4941
+ type index$o_Ed25519Signature = Ed25519Signature;
4942
+ type index$o_SEED_SIZE = SEED_SIZE;
4943
+ declare const index$o_bandersnatch: typeof bandersnatch;
4944
+ declare const index$o_ed25519: typeof ed25519;
4945
+ declare const index$o_keyDerivation: typeof keyDerivation;
4946
+ declare namespace index$o {
4947
+ export { index$o_Ed25519Pair as Ed25519Pair, index$o_bandersnatch as bandersnatch, bandersnatch_d_exports as bandersnatchWasm, index$o_ed25519 as ed25519, initAll as initWasm, index$o_keyDerivation as keyDerivation };
4948
+ export type { index$o_BANDERSNATCH_KEY_BYTES as BANDERSNATCH_KEY_BYTES, index$o_BANDERSNATCH_PROOF_BYTES as BANDERSNATCH_PROOF_BYTES, index$o_BANDERSNATCH_RING_ROOT_BYTES as BANDERSNATCH_RING_ROOT_BYTES, index$o_BANDERSNATCH_VRF_SIGNATURE_BYTES as BANDERSNATCH_VRF_SIGNATURE_BYTES, index$o_BLS_KEY_BYTES as BLS_KEY_BYTES, index$o_BandersnatchKey as BandersnatchKey, index$o_BandersnatchProof as BandersnatchProof, index$o_BandersnatchRingRoot as BandersnatchRingRoot, index$o_BandersnatchSecretSeed as BandersnatchSecretSeed, index$o_BandersnatchVrfSignature as BandersnatchVrfSignature, index$o_BlsKey as BlsKey, index$o_ED25519_KEY_BYTES as ED25519_KEY_BYTES, index$o_ED25519_PRIV_KEY_BYTES as ED25519_PRIV_KEY_BYTES, index$o_ED25519_SIGNATURE_BYTES as ED25519_SIGNATURE_BYTES, index$o_Ed25519Key as Ed25519Key, index$o_Ed25519SecretSeed as Ed25519SecretSeed, index$o_Ed25519Signature as Ed25519Signature, KeySeed as PublicKeySeed, index$o_SEED_SIZE as SEED_SIZE };
4947
4949
  }
4948
4950
 
4949
4951
  /**
@@ -4984,6 +4986,8 @@ declare const EC_SEGMENT_SIZE = 4104;
4984
4986
  * Additional data that has to be passed to the codec to correctly parse incoming bytes.
4985
4987
  */
4986
4988
  declare class ChainSpec extends WithDebug {
4989
+ /** Human-readable name of the chain spec. */
4990
+ readonly name: string;
4987
4991
  /** Number of validators. */
4988
4992
  readonly validatorsCount: U16;
4989
4993
  /** 1/3 of number of validators */
@@ -5028,6 +5032,7 @@ declare class ChainSpec extends WithDebug {
5028
5032
  constructor(data: Omit<ChainSpec, "validatorsSuperMajority" | "thirdOfValidators" | "erasureCodedPieceSize">) {
5029
5033
  super();
5030
5034
 
5035
+ this.name = data.name;
5031
5036
  this.validatorsCount = data.validatorsCount;
5032
5037
  this.thirdOfValidators = tryAsU16(Math.floor(data.validatorsCount / 3));
5033
5038
  this.validatorsSuperMajority = tryAsU16(Math.floor(data.validatorsCount / 3) * 2 + 1);
@@ -5049,6 +5054,7 @@ declare class ChainSpec extends WithDebug {
5049
5054
 
5050
5055
  /** Set of values for "tiny" chain as defined in JAM test vectors. */
5051
5056
  declare const tinyChainSpec = new ChainSpec({
5057
+ name: "tiny",
5052
5058
  validatorsCount: tryAsU16(6),
5053
5059
  coresCount: tryAsU16(2),
5054
5060
  epochLength: tryAsU32(12),
@@ -5071,6 +5077,7 @@ declare const tinyChainSpec = new ChainSpec({
5071
5077
  * Please note that only validatorsCount and epochLength are "full", the rest is copied from "tiny".
5072
5078
  */
5073
5079
  declare const fullChainSpec = new ChainSpec({
5080
+ name: "full",
5074
5081
  validatorsCount: tryAsU16(1023),
5075
5082
  coresCount: tryAsU16(341),
5076
5083
  epochLength: tryAsU32(600),
@@ -5128,25 +5135,25 @@ declare enum PvmBackend {
5128
5135
  Ananas = 1,
5129
5136
  }
5130
5137
 
5131
- type index$m_Bootnode = Bootnode;
5132
- declare const index$m_Bootnode: typeof Bootnode;
5133
- type index$m_ChainSpec = ChainSpec;
5134
- declare const index$m_ChainSpec: typeof ChainSpec;
5135
- declare const index$m_EC_SEGMENT_SIZE: typeof EC_SEGMENT_SIZE;
5136
- declare const index$m_EST_CORES: typeof EST_CORES;
5137
- declare const index$m_EST_EPOCH_LENGTH: typeof EST_EPOCH_LENGTH;
5138
- declare const index$m_EST_VALIDATORS: typeof EST_VALIDATORS;
5139
- declare const index$m_EST_VALIDATORS_SUPER_MAJORITY: typeof EST_VALIDATORS_SUPER_MAJORITY;
5140
- type index$m_PeerAddress = PeerAddress;
5141
- type index$m_PeerId = PeerId;
5142
- type index$m_PvmBackend = PvmBackend;
5143
- declare const index$m_PvmBackend: typeof PvmBackend;
5144
- declare const index$m_PvmBackendNames: typeof PvmBackendNames;
5145
- declare const index$m_fullChainSpec: typeof fullChainSpec;
5146
- declare const index$m_tinyChainSpec: typeof tinyChainSpec;
5147
- declare namespace index$m {
5148
- export { index$m_Bootnode as Bootnode, index$m_ChainSpec as ChainSpec, index$m_EC_SEGMENT_SIZE as EC_SEGMENT_SIZE, index$m_EST_CORES as EST_CORES, index$m_EST_EPOCH_LENGTH as EST_EPOCH_LENGTH, index$m_EST_VALIDATORS as EST_VALIDATORS, index$m_EST_VALIDATORS_SUPER_MAJORITY as EST_VALIDATORS_SUPER_MAJORITY, index$m_PvmBackend as PvmBackend, index$m_PvmBackendNames as PvmBackendNames, index$m_fullChainSpec as fullChainSpec, index$m_tinyChainSpec as tinyChainSpec };
5149
- export type { index$m_PeerAddress as PeerAddress, index$m_PeerId as PeerId };
5138
+ type index$n_Bootnode = Bootnode;
5139
+ declare const index$n_Bootnode: typeof Bootnode;
5140
+ type index$n_ChainSpec = ChainSpec;
5141
+ declare const index$n_ChainSpec: typeof ChainSpec;
5142
+ declare const index$n_EC_SEGMENT_SIZE: typeof EC_SEGMENT_SIZE;
5143
+ declare const index$n_EST_CORES: typeof EST_CORES;
5144
+ declare const index$n_EST_EPOCH_LENGTH: typeof EST_EPOCH_LENGTH;
5145
+ declare const index$n_EST_VALIDATORS: typeof EST_VALIDATORS;
5146
+ declare const index$n_EST_VALIDATORS_SUPER_MAJORITY: typeof EST_VALIDATORS_SUPER_MAJORITY;
5147
+ type index$n_PeerAddress = PeerAddress;
5148
+ type index$n_PeerId = PeerId;
5149
+ type index$n_PvmBackend = PvmBackend;
5150
+ declare const index$n_PvmBackend: typeof PvmBackend;
5151
+ declare const index$n_PvmBackendNames: typeof PvmBackendNames;
5152
+ declare const index$n_fullChainSpec: typeof fullChainSpec;
5153
+ declare const index$n_tinyChainSpec: typeof tinyChainSpec;
5154
+ declare namespace index$n {
5155
+ export { index$n_Bootnode as Bootnode, index$n_ChainSpec as ChainSpec, index$n_EC_SEGMENT_SIZE as EC_SEGMENT_SIZE, index$n_EST_CORES as EST_CORES, index$n_EST_EPOCH_LENGTH as EST_EPOCH_LENGTH, index$n_EST_VALIDATORS as EST_VALIDATORS, index$n_EST_VALIDATORS_SUPER_MAJORITY as EST_VALIDATORS_SUPER_MAJORITY, index$n_PvmBackend as PvmBackend, index$n_PvmBackendNames as PvmBackendNames, index$n_fullChainSpec as fullChainSpec, index$n_tinyChainSpec as tinyChainSpec };
5156
+ export type { index$n_PeerAddress as PeerAddress, index$n_PeerId as PeerId };
5150
5157
  }
5151
5158
 
5152
5159
  /**
@@ -6952,74 +6959,74 @@ declare function reencodeAsView<T, V>(codec: Descriptor<T, V>, object: T, chainS
6952
6959
  return Decoder.decodeObject(codec.View, encoded, chainSpec);
6953
6960
  }
6954
6961
 
6955
- type index$l_Block = Block;
6956
- declare const index$l_Block: typeof Block;
6957
- type index$l_BlockView = BlockView;
6958
- type index$l_CodeHash = CodeHash;
6959
- type index$l_CoreIndex = CoreIndex;
6960
- type index$l_EntropyHash = EntropyHash;
6961
- type index$l_Epoch = Epoch;
6962
- type index$l_EpochMarker = EpochMarker;
6963
- declare const index$l_EpochMarker: typeof EpochMarker;
6964
- type index$l_EpochMarkerView = EpochMarkerView;
6965
- type index$l_Extrinsic = Extrinsic;
6966
- declare const index$l_Extrinsic: typeof Extrinsic;
6967
- type index$l_ExtrinsicHash = ExtrinsicHash;
6968
- type index$l_ExtrinsicView = ExtrinsicView;
6969
- type index$l_Header = Header;
6970
- declare const index$l_Header: typeof Header;
6971
- type index$l_HeaderHash = HeaderHash;
6972
- type index$l_HeaderView = HeaderView;
6973
- type index$l_HeaderViewWithHash = HeaderViewWithHash;
6974
- declare const index$l_HeaderViewWithHash: typeof HeaderViewWithHash;
6975
- declare const index$l_MAX_NUMBER_OF_SEGMENTS: typeof MAX_NUMBER_OF_SEGMENTS;
6976
- type index$l_PerEpochBlock<T> = PerEpochBlock<T>;
6977
- type index$l_PerValidator<T> = PerValidator<T>;
6978
- type index$l_SEGMENT_BYTES = SEGMENT_BYTES;
6979
- type index$l_Segment = Segment;
6980
- type index$l_SegmentIndex = SegmentIndex;
6981
- type index$l_ServiceGas = ServiceGas;
6982
- type index$l_ServiceId = ServiceId;
6983
- type index$l_StateRootHash = StateRootHash;
6984
- type index$l_TicketsMarker = TicketsMarker;
6985
- declare const index$l_TicketsMarker: typeof TicketsMarker;
6986
- type index$l_TicketsMarkerView = TicketsMarkerView;
6987
- type index$l_TimeSlot = TimeSlot;
6988
- type index$l_ValidatorIndex = ValidatorIndex;
6989
- type index$l_ValidatorKeys = ValidatorKeys;
6990
- declare const index$l_ValidatorKeys: typeof ValidatorKeys;
6991
- declare const index$l_W_E: typeof W_E;
6992
- declare const index$l_W_S: typeof W_S;
6993
- type index$l_WorkReportHash = WorkReportHash;
6994
- declare const index$l_assurances: typeof assurances;
6995
- declare const index$l_codecPerEpochBlock: typeof codecPerEpochBlock;
6996
- declare const index$l_codecPerValidator: typeof codecPerValidator;
6997
- declare const index$l_disputes: typeof disputes;
6998
- declare const index$l_emptyBlock: typeof emptyBlock;
6999
- declare const index$l_encodeUnsealedHeader: typeof encodeUnsealedHeader;
7000
- declare const index$l_guarantees: typeof guarantees;
7001
- declare const index$l_headerViewWithHashCodec: typeof headerViewWithHashCodec;
7002
- declare const index$l_legacyDescriptor: typeof legacyDescriptor;
7003
- declare const index$l_preimage: typeof preimage;
7004
- declare const index$l_reencodeAsView: typeof reencodeAsView;
7005
- declare const index$l_refineContext: typeof refineContext;
7006
- declare const index$l_tickets: typeof tickets;
7007
- declare const index$l_tryAsCoreIndex: typeof tryAsCoreIndex;
7008
- declare const index$l_tryAsEpoch: typeof tryAsEpoch;
7009
- declare const index$l_tryAsPerEpochBlock: typeof tryAsPerEpochBlock;
7010
- declare const index$l_tryAsPerValidator: typeof tryAsPerValidator;
7011
- declare const index$l_tryAsSegmentIndex: typeof tryAsSegmentIndex;
7012
- declare const index$l_tryAsServiceGas: typeof tryAsServiceGas;
7013
- declare const index$l_tryAsServiceId: typeof tryAsServiceId;
7014
- declare const index$l_tryAsTimeSlot: typeof tryAsTimeSlot;
7015
- declare const index$l_tryAsValidatorIndex: typeof tryAsValidatorIndex;
7016
- declare const index$l_workItem: typeof workItem;
7017
- declare const index$l_workPackage: typeof workPackage;
7018
- declare const index$l_workReport: typeof workReport;
7019
- declare const index$l_workResult: typeof workResult;
7020
- declare namespace index$l {
7021
- export { index$l_Block as Block, index$l_EpochMarker as EpochMarker, index$l_Extrinsic as Extrinsic, index$l_Header as Header, index$l_HeaderViewWithHash as HeaderViewWithHash, index$l_MAX_NUMBER_OF_SEGMENTS as MAX_NUMBER_OF_SEGMENTS, index$l_TicketsMarker as TicketsMarker, index$l_ValidatorKeys as ValidatorKeys, index$l_W_E as W_E, index$l_W_S as W_S, index$l_assurances as assurances, index$l_codecPerEpochBlock as codecPerEpochBlock, index$l_codecPerValidator as codecPerValidator, codec as codecUtils, index$l_disputes as disputes, index$l_emptyBlock as emptyBlock, index$l_encodeUnsealedHeader as encodeUnsealedHeader, index$l_guarantees as guarantees, index$l_headerViewWithHashCodec as headerViewWithHashCodec, index$l_legacyDescriptor as legacyDescriptor, index$l_preimage as preimage, index$l_reencodeAsView as reencodeAsView, index$l_refineContext as refineContext, index$l_tickets as tickets, index$l_tryAsCoreIndex as tryAsCoreIndex, index$l_tryAsEpoch as tryAsEpoch, index$l_tryAsPerEpochBlock as tryAsPerEpochBlock, index$l_tryAsPerValidator as tryAsPerValidator, index$l_tryAsSegmentIndex as tryAsSegmentIndex, index$l_tryAsServiceGas as tryAsServiceGas, index$l_tryAsServiceId as tryAsServiceId, index$l_tryAsTimeSlot as tryAsTimeSlot, index$l_tryAsValidatorIndex as tryAsValidatorIndex, index$l_workItem as workItem, index$l_workPackage as workPackage, index$l_workReport as workReport, index$l_workResult as workResult };
7022
- export type { index$l_BlockView as BlockView, index$l_CodeHash as CodeHash, index$l_CoreIndex as CoreIndex, index$l_EntropyHash as EntropyHash, index$l_Epoch as Epoch, index$l_EpochMarkerView as EpochMarkerView, index$l_ExtrinsicHash as ExtrinsicHash, index$l_ExtrinsicView as ExtrinsicView, index$l_HeaderHash as HeaderHash, index$l_HeaderView as HeaderView, index$l_PerEpochBlock as PerEpochBlock, index$l_PerValidator as PerValidator, index$l_SEGMENT_BYTES as SEGMENT_BYTES, index$l_Segment as Segment, index$l_SegmentIndex as SegmentIndex, index$l_ServiceGas as ServiceGas, index$l_ServiceId as ServiceId, index$l_StateRootHash as StateRootHash, index$l_TicketsMarkerView as TicketsMarkerView, index$l_TimeSlot as TimeSlot, index$l_ValidatorIndex as ValidatorIndex, index$l_WorkReportHash as WorkReportHash };
6962
+ type index$m_Block = Block;
6963
+ declare const index$m_Block: typeof Block;
6964
+ type index$m_BlockView = BlockView;
6965
+ type index$m_CodeHash = CodeHash;
6966
+ type index$m_CoreIndex = CoreIndex;
6967
+ type index$m_EntropyHash = EntropyHash;
6968
+ type index$m_Epoch = Epoch;
6969
+ type index$m_EpochMarker = EpochMarker;
6970
+ declare const index$m_EpochMarker: typeof EpochMarker;
6971
+ type index$m_EpochMarkerView = EpochMarkerView;
6972
+ type index$m_Extrinsic = Extrinsic;
6973
+ declare const index$m_Extrinsic: typeof Extrinsic;
6974
+ type index$m_ExtrinsicHash = ExtrinsicHash;
6975
+ type index$m_ExtrinsicView = ExtrinsicView;
6976
+ type index$m_Header = Header;
6977
+ declare const index$m_Header: typeof Header;
6978
+ type index$m_HeaderHash = HeaderHash;
6979
+ type index$m_HeaderView = HeaderView;
6980
+ type index$m_HeaderViewWithHash = HeaderViewWithHash;
6981
+ declare const index$m_HeaderViewWithHash: typeof HeaderViewWithHash;
6982
+ declare const index$m_MAX_NUMBER_OF_SEGMENTS: typeof MAX_NUMBER_OF_SEGMENTS;
6983
+ type index$m_PerEpochBlock<T> = PerEpochBlock<T>;
6984
+ type index$m_PerValidator<T> = PerValidator<T>;
6985
+ type index$m_SEGMENT_BYTES = SEGMENT_BYTES;
6986
+ type index$m_Segment = Segment;
6987
+ type index$m_SegmentIndex = SegmentIndex;
6988
+ type index$m_ServiceGas = ServiceGas;
6989
+ type index$m_ServiceId = ServiceId;
6990
+ type index$m_StateRootHash = StateRootHash;
6991
+ type index$m_TicketsMarker = TicketsMarker;
6992
+ declare const index$m_TicketsMarker: typeof TicketsMarker;
6993
+ type index$m_TicketsMarkerView = TicketsMarkerView;
6994
+ type index$m_TimeSlot = TimeSlot;
6995
+ type index$m_ValidatorIndex = ValidatorIndex;
6996
+ type index$m_ValidatorKeys = ValidatorKeys;
6997
+ declare const index$m_ValidatorKeys: typeof ValidatorKeys;
6998
+ declare const index$m_W_E: typeof W_E;
6999
+ declare const index$m_W_S: typeof W_S;
7000
+ type index$m_WorkReportHash = WorkReportHash;
7001
+ declare const index$m_assurances: typeof assurances;
7002
+ declare const index$m_codecPerEpochBlock: typeof codecPerEpochBlock;
7003
+ declare const index$m_codecPerValidator: typeof codecPerValidator;
7004
+ declare const index$m_disputes: typeof disputes;
7005
+ declare const index$m_emptyBlock: typeof emptyBlock;
7006
+ declare const index$m_encodeUnsealedHeader: typeof encodeUnsealedHeader;
7007
+ declare const index$m_guarantees: typeof guarantees;
7008
+ declare const index$m_headerViewWithHashCodec: typeof headerViewWithHashCodec;
7009
+ declare const index$m_legacyDescriptor: typeof legacyDescriptor;
7010
+ declare const index$m_preimage: typeof preimage;
7011
+ declare const index$m_reencodeAsView: typeof reencodeAsView;
7012
+ declare const index$m_refineContext: typeof refineContext;
7013
+ declare const index$m_tickets: typeof tickets;
7014
+ declare const index$m_tryAsCoreIndex: typeof tryAsCoreIndex;
7015
+ declare const index$m_tryAsEpoch: typeof tryAsEpoch;
7016
+ declare const index$m_tryAsPerEpochBlock: typeof tryAsPerEpochBlock;
7017
+ declare const index$m_tryAsPerValidator: typeof tryAsPerValidator;
7018
+ declare const index$m_tryAsSegmentIndex: typeof tryAsSegmentIndex;
7019
+ declare const index$m_tryAsServiceGas: typeof tryAsServiceGas;
7020
+ declare const index$m_tryAsServiceId: typeof tryAsServiceId;
7021
+ declare const index$m_tryAsTimeSlot: typeof tryAsTimeSlot;
7022
+ declare const index$m_tryAsValidatorIndex: typeof tryAsValidatorIndex;
7023
+ declare const index$m_workItem: typeof workItem;
7024
+ declare const index$m_workPackage: typeof workPackage;
7025
+ declare const index$m_workReport: typeof workReport;
7026
+ declare const index$m_workResult: typeof workResult;
7027
+ declare namespace index$m {
7028
+ export { index$m_Block as Block, index$m_EpochMarker as EpochMarker, index$m_Extrinsic as Extrinsic, index$m_Header as Header, index$m_HeaderViewWithHash as HeaderViewWithHash, index$m_MAX_NUMBER_OF_SEGMENTS as MAX_NUMBER_OF_SEGMENTS, index$m_TicketsMarker as TicketsMarker, index$m_ValidatorKeys as ValidatorKeys, index$m_W_E as W_E, index$m_W_S as W_S, index$m_assurances as assurances, index$m_codecPerEpochBlock as codecPerEpochBlock, index$m_codecPerValidator as codecPerValidator, codec as codecUtils, index$m_disputes as disputes, index$m_emptyBlock as emptyBlock, index$m_encodeUnsealedHeader as encodeUnsealedHeader, index$m_guarantees as guarantees, index$m_headerViewWithHashCodec as headerViewWithHashCodec, index$m_legacyDescriptor as legacyDescriptor, index$m_preimage as preimage, index$m_reencodeAsView as reencodeAsView, index$m_refineContext as refineContext, index$m_tickets as tickets, index$m_tryAsCoreIndex as tryAsCoreIndex, index$m_tryAsEpoch as tryAsEpoch, index$m_tryAsPerEpochBlock as tryAsPerEpochBlock, index$m_tryAsPerValidator as tryAsPerValidator, index$m_tryAsSegmentIndex as tryAsSegmentIndex, index$m_tryAsServiceGas as tryAsServiceGas, index$m_tryAsServiceId as tryAsServiceId, index$m_tryAsTimeSlot as tryAsTimeSlot, index$m_tryAsValidatorIndex as tryAsValidatorIndex, index$m_workItem as workItem, index$m_workPackage as workPackage, index$m_workReport as workReport, index$m_workResult as workResult };
7029
+ export type { index$m_BlockView as BlockView, index$m_CodeHash as CodeHash, index$m_CoreIndex as CoreIndex, index$m_EntropyHash as EntropyHash, index$m_Epoch as Epoch, index$m_EpochMarkerView as EpochMarkerView, index$m_ExtrinsicHash as ExtrinsicHash, index$m_ExtrinsicView as ExtrinsicView, index$m_HeaderHash as HeaderHash, index$m_HeaderView as HeaderView, index$m_PerEpochBlock as PerEpochBlock, index$m_PerValidator as PerValidator, index$m_SEGMENT_BYTES as SEGMENT_BYTES, index$m_Segment as Segment, index$m_SegmentIndex as SegmentIndex, index$m_ServiceGas as ServiceGas, index$m_ServiceId as ServiceId, index$m_StateRootHash as StateRootHash, index$m_TicketsMarkerView as TicketsMarkerView, index$m_TimeSlot as TimeSlot, index$m_ValidatorIndex as ValidatorIndex, index$m_WorkReportHash as WorkReportHash };
7023
7030
  }
7024
7031
 
7025
7032
  /** A type that can be read from a JSON-parsed object. */
@@ -7317,21 +7324,21 @@ declare namespace json {
7317
7324
  }
7318
7325
  }
7319
7326
 
7320
- type index$k_Builder<TFrom, TInto> = Builder<TFrom, TInto>;
7321
- type index$k_FromJson<T> = FromJson<T>;
7322
- type index$k_FromJsonOptional<TInto> = FromJsonOptional<TInto>;
7323
- type index$k_FromJsonPrimitive<T> = FromJsonPrimitive<T>;
7324
- type index$k_FromJsonWithParser<TFrom, TInto> = FromJsonWithParser<TFrom, TInto>;
7325
- declare const index$k_NO_KEY: typeof NO_KEY;
7326
- type index$k_ObjectFromJson<T> = ObjectFromJson<T>;
7327
- type index$k_Parser<TFrom, TInto> = Parser<TFrom, TInto>;
7328
- declare const index$k_diffKeys: typeof diffKeys;
7329
- import index$k_json = json;
7330
- declare const index$k_parseFromJson: typeof parseFromJson;
7331
- declare const index$k_parseOrThrow: typeof parseOrThrow;
7332
- declare namespace index$k {
7333
- export { index$k_NO_KEY as NO_KEY, index$k_diffKeys as diffKeys, index$k_json as json, index$k_parseFromJson as parseFromJson, index$k_parseOrThrow as parseOrThrow };
7334
- export type { index$k_Builder as Builder, index$k_FromJson as FromJson, index$k_FromJsonOptional as FromJsonOptional, index$k_FromJsonPrimitive as FromJsonPrimitive, index$k_FromJsonWithParser as FromJsonWithParser, index$k_ObjectFromJson as ObjectFromJson, index$k_Parser as Parser };
7327
+ type index$l_Builder<TFrom, TInto> = Builder<TFrom, TInto>;
7328
+ type index$l_FromJson<T> = FromJson<T>;
7329
+ type index$l_FromJsonOptional<TInto> = FromJsonOptional<TInto>;
7330
+ type index$l_FromJsonPrimitive<T> = FromJsonPrimitive<T>;
7331
+ type index$l_FromJsonWithParser<TFrom, TInto> = FromJsonWithParser<TFrom, TInto>;
7332
+ declare const index$l_NO_KEY: typeof NO_KEY;
7333
+ type index$l_ObjectFromJson<T> = ObjectFromJson<T>;
7334
+ type index$l_Parser<TFrom, TInto> = Parser<TFrom, TInto>;
7335
+ declare const index$l_diffKeys: typeof diffKeys;
7336
+ import index$l_json = json;
7337
+ declare const index$l_parseFromJson: typeof parseFromJson;
7338
+ declare const index$l_parseOrThrow: typeof parseOrThrow;
7339
+ declare namespace index$l {
7340
+ export { index$l_NO_KEY as NO_KEY, index$l_diffKeys as diffKeys, index$l_json as json, index$l_parseFromJson as parseFromJson, index$l_parseOrThrow as parseOrThrow };
7341
+ export type { index$l_Builder as Builder, index$l_FromJson as FromJson, index$l_FromJsonOptional as FromJsonOptional, index$l_FromJsonPrimitive as FromJsonPrimitive, index$l_FromJsonWithParser as FromJsonWithParser, index$l_ObjectFromJson as ObjectFromJson, index$l_Parser as Parser };
7335
7342
  }
7336
7343
 
7337
7344
  declare namespace fromJson {
@@ -7834,52 +7841,52 @@ declare const blockFromJson = (spec: ChainSpec) =>
7834
7841
  ({ header, extrinsic }) => Block.create({ header, extrinsic }),
7835
7842
  );
7836
7843
 
7837
- type index$j_CamelToSnake<S extends string> = CamelToSnake<S>;
7838
- type index$j_JsonCulprit = JsonCulprit;
7839
- type index$j_JsonEpochMarker = JsonEpochMarker;
7840
- type index$j_JsonFault = JsonFault;
7841
- type index$j_JsonHeader = JsonHeader;
7842
- type index$j_JsonJudgement = JsonJudgement;
7843
- type index$j_JsonObject<T> = JsonObject<T>;
7844
- type index$j_JsonRefineContext = JsonRefineContext;
7845
- type index$j_JsonReportGuarantee = JsonReportGuarantee;
7846
- type index$j_JsonVerdict = JsonVerdict;
7847
- type index$j_JsonWorkExecResult = JsonWorkExecResult;
7848
- type index$j_JsonWorkRefineLoad = JsonWorkRefineLoad;
7849
- type index$j_JsonWorkReport = JsonWorkReport;
7850
- type index$j_JsonWorkResult = JsonWorkResult;
7851
- declare const index$j_bandersnatchVrfSignature: typeof bandersnatchVrfSignature;
7852
- declare const index$j_blockFromJson: typeof blockFromJson;
7853
- declare const index$j_culpritFromJson: typeof culpritFromJson;
7854
- declare const index$j_disputesExtrinsicFromJson: typeof disputesExtrinsicFromJson;
7855
- declare const index$j_epochMark: typeof epochMark;
7856
- declare const index$j_faultFromJson: typeof faultFromJson;
7857
- import index$j_fromJson = fromJson;
7858
- declare const index$j_getAssurancesExtrinsicFromJson: typeof getAssurancesExtrinsicFromJson;
7859
- declare const index$j_getAvailabilityAssuranceFromJson: typeof getAvailabilityAssuranceFromJson;
7860
- declare const index$j_getExtrinsicFromJson: typeof getExtrinsicFromJson;
7861
- declare const index$j_guaranteesExtrinsicFromJson: typeof guaranteesExtrinsicFromJson;
7862
- declare const index$j_headerFromJson: typeof headerFromJson;
7863
- declare const index$j_judgementFromJson: typeof judgementFromJson;
7864
- declare const index$j_preimageFromJson: typeof preimageFromJson;
7865
- declare const index$j_preimagesExtrinsicFromJson: typeof preimagesExtrinsicFromJson;
7866
- declare const index$j_refineContextFromJson: typeof refineContextFromJson;
7867
- declare const index$j_reportGuaranteeFromJson: typeof reportGuaranteeFromJson;
7868
- declare const index$j_segmentRootLookupItemFromJson: typeof segmentRootLookupItemFromJson;
7869
- declare const index$j_ticket: typeof ticket;
7870
- declare const index$j_ticketEnvelopeFromJson: typeof ticketEnvelopeFromJson;
7871
- declare const index$j_ticketsExtrinsicFromJson: typeof ticketsExtrinsicFromJson;
7872
- declare const index$j_validatorKeysFromJson: typeof validatorKeysFromJson;
7873
- declare const index$j_validatorSignatureFromJson: typeof validatorSignatureFromJson;
7874
- declare const index$j_verdictFromJson: typeof verdictFromJson;
7875
- declare const index$j_workExecResultFromJson: typeof workExecResultFromJson;
7876
- declare const index$j_workPackageSpecFromJson: typeof workPackageSpecFromJson;
7877
- declare const index$j_workRefineLoadFromJson: typeof workRefineLoadFromJson;
7878
- declare const index$j_workReportFromJson: typeof workReportFromJson;
7879
- declare const index$j_workResultFromJson: typeof workResultFromJson;
7880
- declare namespace index$j {
7881
- export { index$j_bandersnatchVrfSignature as bandersnatchVrfSignature, index$j_blockFromJson as blockFromJson, index$j_culpritFromJson as culpritFromJson, index$j_disputesExtrinsicFromJson as disputesExtrinsicFromJson, index$j_epochMark as epochMark, index$j_faultFromJson as faultFromJson, index$j_fromJson as fromJson, index$j_getAssurancesExtrinsicFromJson as getAssurancesExtrinsicFromJson, index$j_getAvailabilityAssuranceFromJson as getAvailabilityAssuranceFromJson, index$j_getExtrinsicFromJson as getExtrinsicFromJson, index$j_guaranteesExtrinsicFromJson as guaranteesExtrinsicFromJson, index$j_headerFromJson as headerFromJson, index$j_judgementFromJson as judgementFromJson, index$j_preimageFromJson as preimageFromJson, index$j_preimagesExtrinsicFromJson as preimagesExtrinsicFromJson, index$j_refineContextFromJson as refineContextFromJson, index$j_reportGuaranteeFromJson as reportGuaranteeFromJson, index$j_segmentRootLookupItemFromJson as segmentRootLookupItemFromJson, index$j_ticket as ticket, index$j_ticketEnvelopeFromJson as ticketEnvelopeFromJson, index$j_ticketsExtrinsicFromJson as ticketsExtrinsicFromJson, index$j_validatorKeysFromJson as validatorKeysFromJson, index$j_validatorSignatureFromJson as validatorSignatureFromJson, index$j_verdictFromJson as verdictFromJson, index$j_workExecResultFromJson as workExecResultFromJson, index$j_workPackageSpecFromJson as workPackageSpecFromJson, index$j_workRefineLoadFromJson as workRefineLoadFromJson, index$j_workReportFromJson as workReportFromJson, index$j_workResultFromJson as workResultFromJson };
7882
- export type { index$j_CamelToSnake as CamelToSnake, index$j_JsonCulprit as JsonCulprit, index$j_JsonEpochMarker as JsonEpochMarker, index$j_JsonFault as JsonFault, index$j_JsonHeader as JsonHeader, index$j_JsonJudgement as JsonJudgement, index$j_JsonObject as JsonObject, index$j_JsonRefineContext as JsonRefineContext, index$j_JsonReportGuarantee as JsonReportGuarantee, index$j_JsonVerdict as JsonVerdict, index$j_JsonWorkExecResult as JsonWorkExecResult, index$j_JsonWorkRefineLoad as JsonWorkRefineLoad, index$j_JsonWorkReport as JsonWorkReport, index$j_JsonWorkResult as JsonWorkResult };
7844
+ type index$k_CamelToSnake<S extends string> = CamelToSnake<S>;
7845
+ type index$k_JsonCulprit = JsonCulprit;
7846
+ type index$k_JsonEpochMarker = JsonEpochMarker;
7847
+ type index$k_JsonFault = JsonFault;
7848
+ type index$k_JsonHeader = JsonHeader;
7849
+ type index$k_JsonJudgement = JsonJudgement;
7850
+ type index$k_JsonObject<T> = JsonObject<T>;
7851
+ type index$k_JsonRefineContext = JsonRefineContext;
7852
+ type index$k_JsonReportGuarantee = JsonReportGuarantee;
7853
+ type index$k_JsonVerdict = JsonVerdict;
7854
+ type index$k_JsonWorkExecResult = JsonWorkExecResult;
7855
+ type index$k_JsonWorkRefineLoad = JsonWorkRefineLoad;
7856
+ type index$k_JsonWorkReport = JsonWorkReport;
7857
+ type index$k_JsonWorkResult = JsonWorkResult;
7858
+ declare const index$k_bandersnatchVrfSignature: typeof bandersnatchVrfSignature;
7859
+ declare const index$k_blockFromJson: typeof blockFromJson;
7860
+ declare const index$k_culpritFromJson: typeof culpritFromJson;
7861
+ declare const index$k_disputesExtrinsicFromJson: typeof disputesExtrinsicFromJson;
7862
+ declare const index$k_epochMark: typeof epochMark;
7863
+ declare const index$k_faultFromJson: typeof faultFromJson;
7864
+ import index$k_fromJson = fromJson;
7865
+ declare const index$k_getAssurancesExtrinsicFromJson: typeof getAssurancesExtrinsicFromJson;
7866
+ declare const index$k_getAvailabilityAssuranceFromJson: typeof getAvailabilityAssuranceFromJson;
7867
+ declare const index$k_getExtrinsicFromJson: typeof getExtrinsicFromJson;
7868
+ declare const index$k_guaranteesExtrinsicFromJson: typeof guaranteesExtrinsicFromJson;
7869
+ declare const index$k_headerFromJson: typeof headerFromJson;
7870
+ declare const index$k_judgementFromJson: typeof judgementFromJson;
7871
+ declare const index$k_preimageFromJson: typeof preimageFromJson;
7872
+ declare const index$k_preimagesExtrinsicFromJson: typeof preimagesExtrinsicFromJson;
7873
+ declare const index$k_refineContextFromJson: typeof refineContextFromJson;
7874
+ declare const index$k_reportGuaranteeFromJson: typeof reportGuaranteeFromJson;
7875
+ declare const index$k_segmentRootLookupItemFromJson: typeof segmentRootLookupItemFromJson;
7876
+ declare const index$k_ticket: typeof ticket;
7877
+ declare const index$k_ticketEnvelopeFromJson: typeof ticketEnvelopeFromJson;
7878
+ declare const index$k_ticketsExtrinsicFromJson: typeof ticketsExtrinsicFromJson;
7879
+ declare const index$k_validatorKeysFromJson: typeof validatorKeysFromJson;
7880
+ declare const index$k_validatorSignatureFromJson: typeof validatorSignatureFromJson;
7881
+ declare const index$k_verdictFromJson: typeof verdictFromJson;
7882
+ declare const index$k_workExecResultFromJson: typeof workExecResultFromJson;
7883
+ declare const index$k_workPackageSpecFromJson: typeof workPackageSpecFromJson;
7884
+ declare const index$k_workRefineLoadFromJson: typeof workRefineLoadFromJson;
7885
+ declare const index$k_workReportFromJson: typeof workReportFromJson;
7886
+ declare const index$k_workResultFromJson: typeof workResultFromJson;
7887
+ declare namespace index$k {
7888
+ export { index$k_bandersnatchVrfSignature as bandersnatchVrfSignature, index$k_blockFromJson as blockFromJson, index$k_culpritFromJson as culpritFromJson, index$k_disputesExtrinsicFromJson as disputesExtrinsicFromJson, index$k_epochMark as epochMark, index$k_faultFromJson as faultFromJson, index$k_fromJson as fromJson, index$k_getAssurancesExtrinsicFromJson as getAssurancesExtrinsicFromJson, index$k_getAvailabilityAssuranceFromJson as getAvailabilityAssuranceFromJson, index$k_getExtrinsicFromJson as getExtrinsicFromJson, index$k_guaranteesExtrinsicFromJson as guaranteesExtrinsicFromJson, index$k_headerFromJson as headerFromJson, index$k_judgementFromJson as judgementFromJson, index$k_preimageFromJson as preimageFromJson, index$k_preimagesExtrinsicFromJson as preimagesExtrinsicFromJson, index$k_refineContextFromJson as refineContextFromJson, index$k_reportGuaranteeFromJson as reportGuaranteeFromJson, index$k_segmentRootLookupItemFromJson as segmentRootLookupItemFromJson, index$k_ticket as ticket, index$k_ticketEnvelopeFromJson as ticketEnvelopeFromJson, index$k_ticketsExtrinsicFromJson as ticketsExtrinsicFromJson, index$k_validatorKeysFromJson as validatorKeysFromJson, index$k_validatorSignatureFromJson as validatorSignatureFromJson, index$k_verdictFromJson as verdictFromJson, index$k_workExecResultFromJson as workExecResultFromJson, index$k_workPackageSpecFromJson as workPackageSpecFromJson, index$k_workRefineLoadFromJson as workRefineLoadFromJson, index$k_workReportFromJson as workReportFromJson, index$k_workResultFromJson as workResultFromJson };
7889
+ export type { index$k_CamelToSnake as CamelToSnake, index$k_JsonCulprit as JsonCulprit, index$k_JsonEpochMarker as JsonEpochMarker, index$k_JsonFault as JsonFault, index$k_JsonHeader as JsonHeader, index$k_JsonJudgement as JsonJudgement, index$k_JsonObject as JsonObject, index$k_JsonRefineContext as JsonRefineContext, index$k_JsonReportGuarantee as JsonReportGuarantee, index$k_JsonVerdict as JsonVerdict, index$k_JsonWorkExecResult as JsonWorkExecResult, index$k_JsonWorkRefineLoad as JsonWorkRefineLoad, index$k_JsonWorkReport as JsonWorkReport, index$k_JsonWorkResult as JsonWorkResult };
7883
7890
  }
7884
7891
 
7885
7892
  declare function parseBootnode(v: string): Bootnode {
@@ -8127,16 +8134,16 @@ declare class Logger {
8127
8134
  }
8128
8135
  }
8129
8136
 
8130
- type index$i_Level = Level;
8131
- declare const index$i_Level: typeof Level;
8132
- type index$i_Logger = Logger;
8133
- declare const index$i_Logger: typeof Logger;
8134
- declare const index$i_parseLoggerOptions: typeof parseLoggerOptions;
8135
- declare namespace index$i {
8137
+ type index$j_Level = Level;
8138
+ declare const index$j_Level: typeof Level;
8139
+ type index$j_Logger = Logger;
8140
+ declare const index$j_Logger: typeof Logger;
8141
+ declare const index$j_parseLoggerOptions: typeof parseLoggerOptions;
8142
+ declare namespace index$j {
8136
8143
  export {
8137
- index$i_Level as Level,
8138
- index$i_Logger as Logger,
8139
- index$i_parseLoggerOptions as parseLoggerOptions,
8144
+ index$j_Level as Level,
8145
+ index$j_Logger as Logger,
8146
+ index$j_parseLoggerOptions as parseLoggerOptions,
8140
8147
  };
8141
8148
  }
8142
8149
 
@@ -8168,8 +8175,8 @@ declare const DEFAULT_CONFIG = "default";
8168
8175
 
8169
8176
  declare const NODE_DEFAULTS = {
8170
8177
  name: isBrowser() ? "browser" : os.hostname(),
8171
- config: DEFAULT_CONFIG,
8172
- pvm: PvmBackend.BuiltIn,
8178
+ config: [DEFAULT_CONFIG],
8179
+ pvm: PvmBackend.Ananas,
8173
8180
  };
8174
8181
 
8175
8182
  /** Chain spec chooser. */
@@ -8222,52 +8229,173 @@ declare class NodeConfiguration {
8222
8229
  ) {}
8223
8230
  }
8224
8231
 
8225
- declare function loadConfig(configPath: string): NodeConfiguration {
8226
- if (configPath === DEFAULT_CONFIG) {
8227
- logger.log`🔧 Loading DEFAULT config`;
8228
- return parseFromJson(configs.default, NodeConfiguration.fromJson);
8229
- }
8232
+ declare function loadConfig(config: string[], withRelPath: (p: string) => string): NodeConfiguration {
8233
+ logger.log`🔧 Loading config`;
8234
+ let mergedJson: AnyJsonObject = {};
8235
+
8236
+ for (const entry of config) {
8237
+ logger.log`🔧 Applying '${entry}'`;
8238
+
8239
+ if (entry === DEV_CONFIG) {
8240
+ mergedJson = structuredClone(configs.dev); // clone to avoid mutating the original config. not doing a merge since dev and default should theoretically replace all properties.
8241
+ continue;
8242
+ }
8243
+
8244
+ if (entry === DEFAULT_CONFIG) {
8245
+ mergedJson = structuredClone(configs.default);
8246
+ continue;
8247
+ }
8230
8248
 
8231
- if (configPath === DEV_CONFIG) {
8232
- logger.log`🔧 Loading DEV config`;
8233
- return parseFromJson(configs.dev, NodeConfiguration.fromJson);
8249
+ // try to parse as JSON
8250
+ try {
8251
+ const parsed = JSON.parse(entry);
8252
+ deepMerge(mergedJson, parsed);
8253
+ continue;
8254
+ } catch {}
8255
+
8256
+ // if not, try to load as file
8257
+ if (entry.indexOf("=") === -1 && entry.endsWith(".json")) {
8258
+ try {
8259
+ const configFile = fs.readFileSync(withRelPath(entry), "utf8");
8260
+ const parsed = JSON.parse(configFile);
8261
+ deepMerge(mergedJson, parsed);
8262
+ } catch (e) {
8263
+ throw new Error(`Unable to load config from ${entry}: ${e}`);
8264
+ }
8265
+ } else {
8266
+ // finally try to process as a pseudo-jq query
8267
+ try {
8268
+ processQuery(mergedJson, entry, withRelPath);
8269
+ } catch (e) {
8270
+ throw new Error(`Error while processing '${entry}': ${e}`);
8271
+ }
8272
+ }
8234
8273
  }
8235
8274
 
8236
8275
  try {
8237
- logger.log`🔧 Loading config from ${configPath}`;
8238
- const configFile = fs.readFileSync(configPath, "utf8");
8239
- const parsed = JSON.parse(configFile);
8240
- return parseFromJson(parsed, NodeConfiguration.fromJson);
8276
+ const parsed = parseFromJson(mergedJson, NodeConfiguration.fromJson);
8277
+ logger.log`🔧 Config ready`;
8278
+ return parsed;
8241
8279
  } catch (e) {
8242
- throw new Error(`Unable to load config file from ${configPath}: ${e}`);
8243
- }
8244
- }
8245
-
8246
- declare const index$h_DEFAULT_CONFIG: typeof DEFAULT_CONFIG;
8247
- declare const index$h_DEV_CONFIG: typeof DEV_CONFIG;
8248
- type index$h_JipChainSpec = JipChainSpec;
8249
- declare const index$h_JipChainSpec: typeof JipChainSpec;
8250
- type index$h_KnownChainSpec = KnownChainSpec;
8251
- declare const index$h_KnownChainSpec: typeof KnownChainSpec;
8252
- declare const index$h_NODE_DEFAULTS: typeof NODE_DEFAULTS;
8253
- type index$h_NodeConfiguration = NodeConfiguration;
8254
- declare const index$h_NodeConfiguration: typeof NodeConfiguration;
8255
- declare const index$h_knownChainSpecFromJson: typeof knownChainSpecFromJson;
8256
- declare const index$h_loadConfig: typeof loadConfig;
8257
- declare const index$h_parseBootnode: typeof parseBootnode;
8258
- declare namespace index$h {
8259
- export {
8260
- index$h_DEFAULT_CONFIG as DEFAULT_CONFIG,
8261
- index$h_DEV_CONFIG as DEV_CONFIG,
8262
- index$h_JipChainSpec as JipChainSpec,
8263
- index$h_KnownChainSpec as KnownChainSpec,
8264
- index$h_NODE_DEFAULTS as NODE_DEFAULTS,
8265
- index$h_NodeConfiguration as NodeConfiguration,
8266
- index$h_knownChainSpecFromJson as knownChainSpecFromJson,
8267
- index$h_loadConfig as loadConfig,
8268
- logger$2 as logger,
8269
- index$h_parseBootnode as parseBootnode,
8270
- };
8280
+ throw new Error(`Unable to parse config: ${e}`);
8281
+ }
8282
+ }
8283
+
8284
+ declare function deepMerge(target: AnyJsonObject, source: JsonValue): void {
8285
+ if (!isJsonObject(source)) {
8286
+ throw new Error(`Expected object, got ${source}`);
8287
+ }
8288
+ for (const key in source) {
8289
+ if (isJsonObject(source[key])) {
8290
+ if (!isJsonObject(target[key])) {
8291
+ target[key] = {};
8292
+ }
8293
+ deepMerge(target[key], source[key]);
8294
+ } else {
8295
+ target[key] = source[key];
8296
+ }
8297
+ }
8298
+ }
8299
+
8300
+ /**
8301
+ * Caution: updates input directly.
8302
+ * Processes a pseudo-jq query. Syntax:
8303
+ * .path.to.value = { ... } - updates value with the specified object by replacement
8304
+ * .path.to.value += { ... } - updates value with the specified object by merging
8305
+ * .path.to.value = file.json - updates value with the contents of file.json
8306
+ * .path.to.value += file.json - merges the contents of file.json onto value
8307
+ */
8308
+ declare function processQuery(input: AnyJsonObject, query: string, withRelPath: (p: string) => string): void {
8309
+ const queryParts = query.split("=");
8310
+
8311
+ if (queryParts.length === 2) {
8312
+ let [path, value] = queryParts.map((part) => part.trim());
8313
+ let merge = false;
8314
+
8315
+ // detect += syntax
8316
+ if (path.endsWith("+")) {
8317
+ merge = true;
8318
+ path = path.slice(0, -1);
8319
+ }
8320
+
8321
+ let parsedValue: JsonValue;
8322
+ if (value.endsWith(".json")) {
8323
+ try {
8324
+ const configFile = fs.readFileSync(withRelPath(value), "utf8");
8325
+ const parsed = JSON.parse(configFile);
8326
+ parsedValue = parsed;
8327
+ } catch (e) {
8328
+ throw new Error(`Unable to load config from ${value}: ${e}`);
8329
+ }
8330
+ } else {
8331
+ try {
8332
+ parsedValue = JSON.parse(value);
8333
+ } catch (e) {
8334
+ throw new Error(`Unrecognized syntax '${value}': ${e}`);
8335
+ }
8336
+ }
8337
+
8338
+ let pathParts = path.split(".");
8339
+
8340
+ // allow leading dot in path
8341
+ if (pathParts[0] === "") {
8342
+ pathParts = pathParts.slice(1);
8343
+ }
8344
+
8345
+ let target = input;
8346
+ for (let i = 0; i < pathParts.length; i++) {
8347
+ const part = pathParts[i];
8348
+ if (!isJsonObject(target[part])) {
8349
+ target[part] = {};
8350
+ }
8351
+ if (i === pathParts.length - 1) {
8352
+ if (merge) {
8353
+ deepMerge(target[part], parsedValue);
8354
+ } else {
8355
+ target[part] = parsedValue;
8356
+ }
8357
+ return;
8358
+ }
8359
+ target = target[part];
8360
+ }
8361
+ }
8362
+
8363
+ throw new Error("Unrecognized syntax.");
8364
+ }
8365
+
8366
+ type JsonValue = string | number | boolean | null | AnyJsonObject | JsonArray;
8367
+
8368
+ interface AnyJsonObject {
8369
+ [key: string]: JsonValue;
8370
+ }
8371
+
8372
+ interface JsonArray extends Array<JsonValue> {}
8373
+
8374
+ declare function isJsonObject(value: JsonValue): value is AnyJsonObject {
8375
+ return typeof value === "object" && value !== null && !Array.isArray(value);
8376
+ }
8377
+
8378
+ type index$i_AnyJsonObject = AnyJsonObject;
8379
+ declare const index$i_DEFAULT_CONFIG: typeof DEFAULT_CONFIG;
8380
+ declare const index$i_DEV_CONFIG: typeof DEV_CONFIG;
8381
+ type index$i_JipChainSpec = JipChainSpec;
8382
+ declare const index$i_JipChainSpec: typeof JipChainSpec;
8383
+ type index$i_JsonArray = JsonArray;
8384
+ type index$i_JsonValue = JsonValue;
8385
+ type index$i_KnownChainSpec = KnownChainSpec;
8386
+ declare const index$i_KnownChainSpec: typeof KnownChainSpec;
8387
+ declare const index$i_NODE_DEFAULTS: typeof NODE_DEFAULTS;
8388
+ type index$i_NodeConfiguration = NodeConfiguration;
8389
+ declare const index$i_NodeConfiguration: typeof NodeConfiguration;
8390
+ declare const index$i_deepMerge: typeof deepMerge;
8391
+ declare const index$i_isJsonObject: typeof isJsonObject;
8392
+ declare const index$i_knownChainSpecFromJson: typeof knownChainSpecFromJson;
8393
+ declare const index$i_loadConfig: typeof loadConfig;
8394
+ declare const index$i_parseBootnode: typeof parseBootnode;
8395
+ declare const index$i_processQuery: typeof processQuery;
8396
+ declare namespace index$i {
8397
+ export { index$i_DEFAULT_CONFIG as DEFAULT_CONFIG, index$i_DEV_CONFIG as DEV_CONFIG, index$i_JipChainSpec as JipChainSpec, index$i_KnownChainSpec as KnownChainSpec, index$i_NODE_DEFAULTS as NODE_DEFAULTS, index$i_NodeConfiguration as NodeConfiguration, index$i_deepMerge as deepMerge, index$i_isJsonObject as isJsonObject, index$i_knownChainSpecFromJson as knownChainSpecFromJson, index$i_loadConfig as loadConfig, logger$2 as logger, index$i_parseBootnode as parseBootnode, index$i_processQuery as processQuery };
8398
+ export type { index$i_AnyJsonObject as AnyJsonObject, index$i_JsonArray as JsonArray, index$i_JsonValue as JsonValue };
8271
8399
  }
8272
8400
 
8273
8401
  /**
@@ -9057,43 +9185,43 @@ declare const bitLookup = [
9057
9185
  [0b00000000, 8],
9058
9186
  ];
9059
9187
 
9060
- type index$g_BranchNode = BranchNode;
9061
- declare const index$g_BranchNode: typeof BranchNode;
9062
- type index$g_InMemoryTrie = InMemoryTrie;
9063
- declare const index$g_InMemoryTrie: typeof InMemoryTrie;
9064
- type index$g_InputKey = InputKey;
9065
- type index$g_LeafNode = LeafNode;
9066
- declare const index$g_LeafNode: typeof LeafNode;
9067
- type index$g_NodeType = NodeType;
9068
- declare const index$g_NodeType: typeof NodeType;
9069
- type index$g_NodesDb = NodesDb;
9070
- declare const index$g_NodesDb: typeof NodesDb;
9071
- declare const index$g_TRIE_NODE_BYTES: typeof TRIE_NODE_BYTES;
9072
- declare const index$g_TRUNCATED_KEY_BITS: typeof TRUNCATED_KEY_BITS;
9073
- type index$g_TRUNCATED_KEY_BYTES = TRUNCATED_KEY_BYTES;
9074
- type index$g_TraversedPath = TraversedPath;
9075
- declare const index$g_TraversedPath: typeof TraversedPath;
9076
- type index$g_TrieHasher = TrieHasher;
9077
- type index$g_TrieNode = TrieNode;
9078
- declare const index$g_TrieNode: typeof TrieNode;
9079
- type index$g_TrieNodeHash = TrieNodeHash;
9080
- type index$g_TruncatedStateKey = TruncatedStateKey;
9081
- type index$g_ValueHash = ValueHash;
9082
- type index$g_WriteableNodesDb = WriteableNodesDb;
9083
- declare const index$g_WriteableNodesDb: typeof WriteableNodesDb;
9084
- declare const index$g_bitLookup: typeof bitLookup;
9085
- declare const index$g_createSubtreeForBothLeaves: typeof createSubtreeForBothLeaves;
9086
- declare const index$g_findNodeToReplace: typeof findNodeToReplace;
9087
- declare const index$g_findSharedPrefix: typeof findSharedPrefix;
9088
- declare const index$g_getBit: typeof getBit;
9089
- declare const index$g_leafComparator: typeof leafComparator;
9090
- declare const index$g_parseInputKey: typeof parseInputKey;
9091
- declare const index$g_trieInsert: typeof trieInsert;
9092
- declare const index$g_trieStringify: typeof trieStringify;
9093
- declare const index$g_zero: typeof zero;
9094
- declare namespace index$g {
9095
- export { index$g_BranchNode as BranchNode, index$g_InMemoryTrie as InMemoryTrie, index$g_LeafNode as LeafNode, index$g_NodeType as NodeType, index$g_NodesDb as NodesDb, index$g_TRIE_NODE_BYTES as TRIE_NODE_BYTES, index$g_TRUNCATED_KEY_BITS as TRUNCATED_KEY_BITS, index$g_TraversedPath as TraversedPath, index$g_TrieNode as TrieNode, index$g_WriteableNodesDb as WriteableNodesDb, index$g_bitLookup as bitLookup, index$g_createSubtreeForBothLeaves as createSubtreeForBothLeaves, index$g_findNodeToReplace as findNodeToReplace, index$g_findSharedPrefix as findSharedPrefix, index$g_getBit as getBit, index$g_leafComparator as leafComparator, index$g_parseInputKey as parseInputKey, index$g_trieInsert as trieInsert, index$g_trieStringify as trieStringify, index$g_zero as zero };
9096
- export type { index$g_InputKey as InputKey, StateKey$1 as StateKey, index$g_TRUNCATED_KEY_BYTES as TRUNCATED_KEY_BYTES, index$g_TrieHasher as TrieHasher, index$g_TrieNodeHash as TrieNodeHash, index$g_TruncatedStateKey as TruncatedStateKey, index$g_ValueHash as ValueHash };
9188
+ type index$h_BranchNode = BranchNode;
9189
+ declare const index$h_BranchNode: typeof BranchNode;
9190
+ type index$h_InMemoryTrie = InMemoryTrie;
9191
+ declare const index$h_InMemoryTrie: typeof InMemoryTrie;
9192
+ type index$h_InputKey = InputKey;
9193
+ type index$h_LeafNode = LeafNode;
9194
+ declare const index$h_LeafNode: typeof LeafNode;
9195
+ type index$h_NodeType = NodeType;
9196
+ declare const index$h_NodeType: typeof NodeType;
9197
+ type index$h_NodesDb = NodesDb;
9198
+ declare const index$h_NodesDb: typeof NodesDb;
9199
+ declare const index$h_TRIE_NODE_BYTES: typeof TRIE_NODE_BYTES;
9200
+ declare const index$h_TRUNCATED_KEY_BITS: typeof TRUNCATED_KEY_BITS;
9201
+ type index$h_TRUNCATED_KEY_BYTES = TRUNCATED_KEY_BYTES;
9202
+ type index$h_TraversedPath = TraversedPath;
9203
+ declare const index$h_TraversedPath: typeof TraversedPath;
9204
+ type index$h_TrieHasher = TrieHasher;
9205
+ type index$h_TrieNode = TrieNode;
9206
+ declare const index$h_TrieNode: typeof TrieNode;
9207
+ type index$h_TrieNodeHash = TrieNodeHash;
9208
+ type index$h_TruncatedStateKey = TruncatedStateKey;
9209
+ type index$h_ValueHash = ValueHash;
9210
+ type index$h_WriteableNodesDb = WriteableNodesDb;
9211
+ declare const index$h_WriteableNodesDb: typeof WriteableNodesDb;
9212
+ declare const index$h_bitLookup: typeof bitLookup;
9213
+ declare const index$h_createSubtreeForBothLeaves: typeof createSubtreeForBothLeaves;
9214
+ declare const index$h_findNodeToReplace: typeof findNodeToReplace;
9215
+ declare const index$h_findSharedPrefix: typeof findSharedPrefix;
9216
+ declare const index$h_getBit: typeof getBit;
9217
+ declare const index$h_leafComparator: typeof leafComparator;
9218
+ declare const index$h_parseInputKey: typeof parseInputKey;
9219
+ declare const index$h_trieInsert: typeof trieInsert;
9220
+ declare const index$h_trieStringify: typeof trieStringify;
9221
+ declare const index$h_zero: typeof zero;
9222
+ declare namespace index$h {
9223
+ export { index$h_BranchNode as BranchNode, index$h_InMemoryTrie as InMemoryTrie, index$h_LeafNode as LeafNode, index$h_NodeType as NodeType, index$h_NodesDb as NodesDb, index$h_TRIE_NODE_BYTES as TRIE_NODE_BYTES, index$h_TRUNCATED_KEY_BITS as TRUNCATED_KEY_BITS, index$h_TraversedPath as TraversedPath, index$h_TrieNode as TrieNode, index$h_WriteableNodesDb as WriteableNodesDb, index$h_bitLookup as bitLookup, index$h_createSubtreeForBothLeaves as createSubtreeForBothLeaves, index$h_findNodeToReplace as findNodeToReplace, index$h_findSharedPrefix as findSharedPrefix, index$h_getBit as getBit, index$h_leafComparator as leafComparator, index$h_parseInputKey as parseInputKey, index$h_trieInsert as trieInsert, index$h_trieStringify as trieStringify, index$h_zero as zero };
9224
+ export type { index$h_InputKey as InputKey, StateKey$1 as StateKey, index$h_TRUNCATED_KEY_BYTES as TRUNCATED_KEY_BYTES, index$h_TrieHasher as TrieHasher, index$h_TrieNodeHash as TrieNodeHash, index$h_TruncatedStateKey as TruncatedStateKey, index$h_ValueHash as ValueHash };
9097
9225
  }
9098
9226
 
9099
9227
  /**
@@ -9160,7 +9288,7 @@ declare function accumulationOutputComparator(a: AccumulationOutput, b: Accumula
9160
9288
  return Ordering.Greater;
9161
9289
  }
9162
9290
 
9163
- return Ordering.Equal;
9291
+ return a.output.compare(b.output);
9164
9292
  }
9165
9293
 
9166
9294
  /**
@@ -9523,16 +9651,16 @@ declare class Mountain<H extends OpaqueHash> {
9523
9651
  }
9524
9652
  }
9525
9653
 
9526
- type index$f_MerkleMountainRange<H extends OpaqueHash> = MerkleMountainRange<H>;
9527
- declare const index$f_MerkleMountainRange: typeof MerkleMountainRange;
9528
- type index$f_MmrHasher<H extends OpaqueHash> = MmrHasher<H>;
9529
- type index$f_MmrPeaks<H extends OpaqueHash> = MmrPeaks<H>;
9530
- type index$f_Mountain<H extends OpaqueHash> = Mountain<H>;
9531
- declare const index$f_Mountain: typeof Mountain;
9532
- declare const index$f_SUPER_PEAK_STRING: typeof SUPER_PEAK_STRING;
9533
- declare namespace index$f {
9534
- export { index$f_MerkleMountainRange as MerkleMountainRange, index$f_Mountain as Mountain, index$f_SUPER_PEAK_STRING as SUPER_PEAK_STRING };
9535
- export type { index$f_MmrHasher as MmrHasher, index$f_MmrPeaks as MmrPeaks };
9654
+ type index$g_MerkleMountainRange<H extends OpaqueHash> = MerkleMountainRange<H>;
9655
+ declare const index$g_MerkleMountainRange: typeof MerkleMountainRange;
9656
+ type index$g_MmrHasher<H extends OpaqueHash> = MmrHasher<H>;
9657
+ type index$g_MmrPeaks<H extends OpaqueHash> = MmrPeaks<H>;
9658
+ type index$g_Mountain<H extends OpaqueHash> = Mountain<H>;
9659
+ declare const index$g_Mountain: typeof Mountain;
9660
+ declare const index$g_SUPER_PEAK_STRING: typeof SUPER_PEAK_STRING;
9661
+ declare namespace index$g {
9662
+ export { index$g_MerkleMountainRange as MerkleMountainRange, index$g_Mountain as Mountain, index$g_SUPER_PEAK_STRING as SUPER_PEAK_STRING };
9663
+ export type { index$g_MmrHasher as MmrHasher, index$g_MmrPeaks as MmrPeaks };
9536
9664
  }
9537
9665
 
9538
9666
  /**
@@ -9992,25 +10120,6 @@ declare class LookupHistoryItem {
9992
10120
  }
9993
10121
  }
9994
10122
 
9995
- /** Dictionary entry of services that auto-accumulate every block. */
9996
- declare class AutoAccumulate {
9997
- static Codec = codec.Class(AutoAccumulate, {
9998
- service: codec.u32.asOpaque<ServiceId>(),
9999
- gasLimit: codec.u64.asOpaque<ServiceGas>(),
10000
- });
10001
-
10002
- static create({ service, gasLimit }: CodecRecord<AutoAccumulate>) {
10003
- return new AutoAccumulate(service, gasLimit);
10004
- }
10005
-
10006
- private constructor(
10007
- /** Service id that auto-accumulates. */
10008
- readonly service: ServiceId,
10009
- /** Gas limit for auto-accumulation. */
10010
- readonly gasLimit: ServiceGas,
10011
- ) {}
10012
- }
10013
-
10014
10123
  /**
10015
10124
  * https://graypaper.fluffylabs.dev/#/ab2cdbd/114402114402?v=0.7.2
10016
10125
  */
@@ -10023,7 +10132,9 @@ declare class PrivilegedServices {
10023
10132
  registrar: Compatibility.isGreaterOrEqual(GpVersion.V0_7_1)
10024
10133
  ? codec.u32.asOpaque<ServiceId>()
10025
10134
  : ignoreValueWithDefault(tryAsServiceId(2 ** 32 - 1)),
10026
- autoAccumulateServices: readonlyArray(codec.sequenceVarLen(AutoAccumulate.Codec)),
10135
+ autoAccumulateServices: codec.dictionary(codec.u32.asOpaque<ServiceId>(), codec.u64.asOpaque<ServiceGas>(), {
10136
+ sortKeys: (a, b) => a - b,
10137
+ }),
10027
10138
  });
10028
10139
 
10029
10140
  static create(a: CodecRecord<PrivilegedServices>) {
@@ -10048,7 +10159,7 @@ declare class PrivilegedServices {
10048
10159
  /** `χ_A`: Manages authorization queue one for each core. */
10049
10160
  readonly assigners: PerCore<ServiceId>,
10050
10161
  /** `χ_Z`: Dictionary of services that auto-accumulate every block with their gas limit. */
10051
- readonly autoAccumulateServices: readonly AutoAccumulate[],
10162
+ readonly autoAccumulateServices: Map<ServiceId, ServiceGas>,
10052
10163
  ) {}
10053
10164
  }
10054
10165
 
@@ -10912,6 +11023,18 @@ declare class InMemoryService extends WithDebug implements Service {
10912
11023
  };
10913
11024
  }
10914
11025
 
11026
+ /** Return identical `InMemoryService` which does not share any references. */
11027
+ clone(): InMemoryService {
11028
+ return new InMemoryService(this.serviceId, {
11029
+ info: ServiceAccountInfo.create(this.data.info),
11030
+ preimages: HashDictionary.fromEntries(Array.from(this.data.preimages.entries())),
11031
+ lookupHistory: HashDictionary.fromEntries(
11032
+ Array.from(this.data.lookupHistory.entries()).map(([k, v]) => [k, v.slice()]),
11033
+ ),
11034
+ storage: new Map(this.data.storage.entries()),
11035
+ });
11036
+ }
11037
+
10915
11038
  /**
10916
11039
  * Create a new in-memory service from another state service
10917
11040
  * by copying all given entries.
@@ -11365,7 +11488,7 @@ declare class InMemoryState extends WithDebug implements State, WithStateView, E
11365
11488
  assigners: tryAsPerCore(new Array(spec.coresCount).fill(tryAsServiceId(0)), spec),
11366
11489
  delegator: tryAsServiceId(0),
11367
11490
  registrar: tryAsServiceId(MAX_VALUE),
11368
- autoAccumulateServices: [],
11491
+ autoAccumulateServices: new Map(),
11369
11492
  }),
11370
11493
  accumulationOutputLog: SortedArray.fromArray(accumulationOutputComparator, []),
11371
11494
  services: new Map(),
@@ -11414,125 +11537,123 @@ type FieldNames<T> = {
11414
11537
  [K in keyof T]: T[K] extends Function ? never : K;
11415
11538
  }[keyof T];
11416
11539
 
11417
- type index$e_AUTHORIZATION_QUEUE_SIZE = AUTHORIZATION_QUEUE_SIZE;
11418
- type index$e_AccumulationOutput = AccumulationOutput;
11419
- declare const index$e_AccumulationOutput: typeof AccumulationOutput;
11420
- type index$e_AccumulationQueue = AccumulationQueue;
11421
- type index$e_AccumulationQueueView = AccumulationQueueView;
11422
- type index$e_AuthorizationPool = AuthorizationPool;
11423
- type index$e_AuthorizationQueue = AuthorizationQueue;
11424
- type index$e_AutoAccumulate = AutoAccumulate;
11425
- declare const index$e_AutoAccumulate: typeof AutoAccumulate;
11426
- type index$e_AvailabilityAssignment = AvailabilityAssignment;
11427
- declare const index$e_AvailabilityAssignment: typeof AvailabilityAssignment;
11428
- type index$e_AvailabilityAssignmentsView = AvailabilityAssignmentsView;
11429
- declare const index$e_BASE_SERVICE_BALANCE: typeof BASE_SERVICE_BALANCE;
11430
- type index$e_BlockState = BlockState;
11431
- declare const index$e_BlockState: typeof BlockState;
11432
- type index$e_BlocksState = BlocksState;
11433
- type index$e_CoreStatistics = CoreStatistics;
11434
- declare const index$e_CoreStatistics: typeof CoreStatistics;
11435
- type index$e_DisputesRecords = DisputesRecords;
11436
- declare const index$e_DisputesRecords: typeof DisputesRecords;
11437
- declare const index$e_ELECTIVE_BYTE_BALANCE: typeof ELECTIVE_BYTE_BALANCE;
11438
- declare const index$e_ELECTIVE_ITEM_BALANCE: typeof ELECTIVE_ITEM_BALANCE;
11439
- type index$e_ENTROPY_ENTRIES = ENTROPY_ENTRIES;
11440
- type index$e_EnumerableState = EnumerableState;
11441
- type index$e_FieldNames<T> = FieldNames<T>;
11442
- type index$e_InMemoryService = InMemoryService;
11443
- declare const index$e_InMemoryService: typeof InMemoryService;
11444
- type index$e_InMemoryState = InMemoryState;
11445
- declare const index$e_InMemoryState: typeof InMemoryState;
11446
- type index$e_InMemoryStateFields = InMemoryStateFields;
11447
- type index$e_LookupHistoryItem = LookupHistoryItem;
11448
- declare const index$e_LookupHistoryItem: typeof LookupHistoryItem;
11449
- type index$e_LookupHistorySlots = LookupHistorySlots;
11450
- type index$e_MAX_AUTH_POOL_SIZE = MAX_AUTH_POOL_SIZE;
11451
- declare const index$e_MAX_LOOKUP_HISTORY_SLOTS: typeof MAX_LOOKUP_HISTORY_SLOTS;
11452
- type index$e_MAX_RECENT_HISTORY = MAX_RECENT_HISTORY;
11453
- type index$e_NotYetAccumulatedReport = NotYetAccumulatedReport;
11454
- declare const index$e_NotYetAccumulatedReport: typeof NotYetAccumulatedReport;
11455
- type index$e_PerCore<T> = PerCore<T>;
11456
- type index$e_PreimageItem = PreimageItem;
11457
- declare const index$e_PreimageItem: typeof PreimageItem;
11458
- type index$e_PrivilegedServices = PrivilegedServices;
11459
- declare const index$e_PrivilegedServices: typeof PrivilegedServices;
11460
- type index$e_RecentBlocks = RecentBlocks;
11461
- declare const index$e_RecentBlocks: typeof RecentBlocks;
11462
- type index$e_RecentBlocksView = RecentBlocksView;
11463
- type index$e_RecentlyAccumulated = RecentlyAccumulated;
11464
- type index$e_RecentlyAccumulatedView = RecentlyAccumulatedView;
11465
- type index$e_SafroleData = SafroleData;
11466
- declare const index$e_SafroleData: typeof SafroleData;
11467
- type index$e_SafroleDataView = SafroleDataView;
11468
- type index$e_SafroleSealingKeys = SafroleSealingKeys;
11469
- type index$e_SafroleSealingKeysData = SafroleSealingKeysData;
11470
- declare const index$e_SafroleSealingKeysData: typeof SafroleSealingKeysData;
11471
- type index$e_SafroleSealingKeysKind = SafroleSealingKeysKind;
11472
- declare const index$e_SafroleSealingKeysKind: typeof SafroleSealingKeysKind;
11473
- type index$e_Service = Service;
11474
- type index$e_ServiceAccountInfo = ServiceAccountInfo;
11475
- declare const index$e_ServiceAccountInfo: typeof ServiceAccountInfo;
11476
- type index$e_ServiceAccountInfoView = ServiceAccountInfoView;
11477
- type index$e_ServiceData = ServiceData;
11478
- type index$e_ServiceEntries = ServiceEntries;
11479
- type index$e_ServiceStatistics = ServiceStatistics;
11480
- declare const index$e_ServiceStatistics: typeof ServiceStatistics;
11481
- type index$e_ServicesUpdate = ServicesUpdate;
11482
- type index$e_State = State;
11483
- type index$e_StateView = StateView;
11484
- type index$e_StatisticsData = StatisticsData;
11485
- declare const index$e_StatisticsData: typeof StatisticsData;
11486
- type index$e_StatisticsDataView = StatisticsDataView;
11487
- type index$e_StorageItem = StorageItem;
11488
- declare const index$e_StorageItem: typeof StorageItem;
11489
- type index$e_StorageKey = StorageKey;
11490
- type index$e_UpdateError = UpdateError;
11491
- declare const index$e_UpdateError: typeof UpdateError;
11492
- type index$e_UpdatePreimage = UpdatePreimage;
11493
- declare const index$e_UpdatePreimage: typeof UpdatePreimage;
11494
- type index$e_UpdatePreimageKind = UpdatePreimageKind;
11495
- declare const index$e_UpdatePreimageKind: typeof UpdatePreimageKind;
11496
- type index$e_UpdateService = UpdateService;
11497
- declare const index$e_UpdateService: typeof UpdateService;
11498
- type index$e_UpdateServiceKind = UpdateServiceKind;
11499
- declare const index$e_UpdateServiceKind: typeof UpdateServiceKind;
11500
- type index$e_UpdateStorage = UpdateStorage;
11501
- declare const index$e_UpdateStorage: typeof UpdateStorage;
11502
- type index$e_UpdateStorageKind = UpdateStorageKind;
11503
- declare const index$e_UpdateStorageKind: typeof UpdateStorageKind;
11504
- type index$e_VALIDATOR_META_BYTES = VALIDATOR_META_BYTES;
11505
- type index$e_ValidatorData = ValidatorData;
11506
- declare const index$e_ValidatorData: typeof ValidatorData;
11507
- type index$e_ValidatorDataView = ValidatorDataView;
11508
- type index$e_ValidatorStatistics = ValidatorStatistics;
11509
- declare const index$e_ValidatorStatistics: typeof ValidatorStatistics;
11510
- type index$e_WithStateView<V = StateView> = WithStateView<V>;
11511
- declare const index$e_accumulationOutputComparator: typeof accumulationOutputComparator;
11512
- declare const index$e_accumulationQueueCodec: typeof accumulationQueueCodec;
11513
- declare const index$e_authPoolsCodec: typeof authPoolsCodec;
11514
- declare const index$e_authQueuesCodec: typeof authQueuesCodec;
11515
- declare const index$e_availabilityAssignmentsCodec: typeof availabilityAssignmentsCodec;
11516
- declare const index$e_codecBandersnatchKey: typeof codecBandersnatchKey;
11517
- declare const index$e_codecPerCore: typeof codecPerCore;
11518
- declare const index$e_codecServiceId: typeof codecServiceId;
11519
- declare const index$e_codecVarGas: typeof codecVarGas;
11520
- declare const index$e_codecVarU16: typeof codecVarU16;
11521
- declare const index$e_codecWithVersion: typeof codecWithVersion;
11522
- declare const index$e_hashComparator: typeof hashComparator;
11523
- declare const index$e_ignoreValueWithDefault: typeof ignoreValueWithDefault;
11524
- declare const index$e_recentlyAccumulatedCodec: typeof recentlyAccumulatedCodec;
11525
- declare const index$e_serviceDataCodec: typeof serviceDataCodec;
11526
- declare const index$e_serviceEntriesCodec: typeof serviceEntriesCodec;
11527
- declare const index$e_sortedSetCodec: typeof sortedSetCodec;
11528
- declare const index$e_tryAsLookupHistorySlots: typeof tryAsLookupHistorySlots;
11529
- declare const index$e_tryAsPerCore: typeof tryAsPerCore;
11530
- declare const index$e_validatorsDataCodec: typeof validatorsDataCodec;
11531
- declare const index$e_workReportsSortedSetCodec: typeof workReportsSortedSetCodec;
11532
- declare const index$e_zeroSizeHint: typeof zeroSizeHint;
11533
- declare namespace index$e {
11534
- export { index$e_AccumulationOutput as AccumulationOutput, index$e_AutoAccumulate as AutoAccumulate, index$e_AvailabilityAssignment as AvailabilityAssignment, index$e_BASE_SERVICE_BALANCE as BASE_SERVICE_BALANCE, index$e_BlockState as BlockState, index$e_CoreStatistics as CoreStatistics, index$e_DisputesRecords as DisputesRecords, index$e_ELECTIVE_BYTE_BALANCE as ELECTIVE_BYTE_BALANCE, index$e_ELECTIVE_ITEM_BALANCE as ELECTIVE_ITEM_BALANCE, index$e_InMemoryService as InMemoryService, index$e_InMemoryState as InMemoryState, index$e_LookupHistoryItem as LookupHistoryItem, index$e_MAX_LOOKUP_HISTORY_SLOTS as MAX_LOOKUP_HISTORY_SLOTS, index$e_NotYetAccumulatedReport as NotYetAccumulatedReport, index$e_PreimageItem as PreimageItem, index$e_PrivilegedServices as PrivilegedServices, index$e_RecentBlocks as RecentBlocks, index$e_SafroleData as SafroleData, index$e_SafroleSealingKeysData as SafroleSealingKeysData, index$e_SafroleSealingKeysKind as SafroleSealingKeysKind, index$e_ServiceAccountInfo as ServiceAccountInfo, index$e_ServiceStatistics as ServiceStatistics, index$e_StatisticsData as StatisticsData, index$e_StorageItem as StorageItem, index$e_UpdateError as UpdateError, index$e_UpdatePreimage as UpdatePreimage, index$e_UpdatePreimageKind as UpdatePreimageKind, index$e_UpdateService as UpdateService, index$e_UpdateServiceKind as UpdateServiceKind, index$e_UpdateStorage as UpdateStorage, index$e_UpdateStorageKind as UpdateStorageKind, index$e_ValidatorData as ValidatorData, index$e_ValidatorStatistics as ValidatorStatistics, index$e_accumulationOutputComparator as accumulationOutputComparator, index$e_accumulationQueueCodec as accumulationQueueCodec, index$e_authPoolsCodec as authPoolsCodec, index$e_authQueuesCodec as authQueuesCodec, index$e_availabilityAssignmentsCodec as availabilityAssignmentsCodec, index$e_codecBandersnatchKey as codecBandersnatchKey, index$e_codecPerCore as codecPerCore, index$e_codecServiceId as codecServiceId, index$e_codecVarGas as codecVarGas, index$e_codecVarU16 as codecVarU16, index$e_codecWithVersion as codecWithVersion, index$e_hashComparator as hashComparator, index$e_ignoreValueWithDefault as ignoreValueWithDefault, index$e_recentlyAccumulatedCodec as recentlyAccumulatedCodec, index$e_serviceDataCodec as serviceDataCodec, index$e_serviceEntriesCodec as serviceEntriesCodec, index$e_sortedSetCodec as sortedSetCodec, index$e_tryAsLookupHistorySlots as tryAsLookupHistorySlots, index$e_tryAsPerCore as tryAsPerCore, index$e_validatorsDataCodec as validatorsDataCodec, index$e_workReportsSortedSetCodec as workReportsSortedSetCodec, index$e_zeroSizeHint as zeroSizeHint };
11535
- export type { index$e_AUTHORIZATION_QUEUE_SIZE as AUTHORIZATION_QUEUE_SIZE, index$e_AccumulationQueue as AccumulationQueue, index$e_AccumulationQueueView as AccumulationQueueView, index$e_AuthorizationPool as AuthorizationPool, index$e_AuthorizationQueue as AuthorizationQueue, index$e_AvailabilityAssignmentsView as AvailabilityAssignmentsView, index$e_BlocksState as BlocksState, index$e_ENTROPY_ENTRIES as ENTROPY_ENTRIES, index$e_EnumerableState as EnumerableState, index$e_FieldNames as FieldNames, index$e_InMemoryStateFields as InMemoryStateFields, index$e_LookupHistorySlots as LookupHistorySlots, index$e_MAX_AUTH_POOL_SIZE as MAX_AUTH_POOL_SIZE, index$e_MAX_RECENT_HISTORY as MAX_RECENT_HISTORY, index$e_PerCore as PerCore, index$e_RecentBlocksView as RecentBlocksView, index$e_RecentlyAccumulated as RecentlyAccumulated, index$e_RecentlyAccumulatedView as RecentlyAccumulatedView, index$e_SafroleDataView as SafroleDataView, index$e_SafroleSealingKeys as SafroleSealingKeys, index$e_Service as Service, index$e_ServiceAccountInfoView as ServiceAccountInfoView, index$e_ServiceData as ServiceData, index$e_ServiceEntries as ServiceEntries, index$e_ServicesUpdate as ServicesUpdate, index$e_State as State, index$e_StateView as StateView, index$e_StatisticsDataView as StatisticsDataView, index$e_StorageKey as StorageKey, index$e_VALIDATOR_META_BYTES as VALIDATOR_META_BYTES, index$e_ValidatorDataView as ValidatorDataView, index$e_WithStateView as WithStateView };
11540
+ type index$f_AUTHORIZATION_QUEUE_SIZE = AUTHORIZATION_QUEUE_SIZE;
11541
+ type index$f_AccumulationOutput = AccumulationOutput;
11542
+ declare const index$f_AccumulationOutput: typeof AccumulationOutput;
11543
+ type index$f_AccumulationQueue = AccumulationQueue;
11544
+ type index$f_AccumulationQueueView = AccumulationQueueView;
11545
+ type index$f_AuthorizationPool = AuthorizationPool;
11546
+ type index$f_AuthorizationQueue = AuthorizationQueue;
11547
+ type index$f_AvailabilityAssignment = AvailabilityAssignment;
11548
+ declare const index$f_AvailabilityAssignment: typeof AvailabilityAssignment;
11549
+ type index$f_AvailabilityAssignmentsView = AvailabilityAssignmentsView;
11550
+ declare const index$f_BASE_SERVICE_BALANCE: typeof BASE_SERVICE_BALANCE;
11551
+ type index$f_BlockState = BlockState;
11552
+ declare const index$f_BlockState: typeof BlockState;
11553
+ type index$f_BlocksState = BlocksState;
11554
+ type index$f_CoreStatistics = CoreStatistics;
11555
+ declare const index$f_CoreStatistics: typeof CoreStatistics;
11556
+ type index$f_DisputesRecords = DisputesRecords;
11557
+ declare const index$f_DisputesRecords: typeof DisputesRecords;
11558
+ declare const index$f_ELECTIVE_BYTE_BALANCE: typeof ELECTIVE_BYTE_BALANCE;
11559
+ declare const index$f_ELECTIVE_ITEM_BALANCE: typeof ELECTIVE_ITEM_BALANCE;
11560
+ type index$f_ENTROPY_ENTRIES = ENTROPY_ENTRIES;
11561
+ type index$f_EnumerableState = EnumerableState;
11562
+ type index$f_FieldNames<T> = FieldNames<T>;
11563
+ type index$f_InMemoryService = InMemoryService;
11564
+ declare const index$f_InMemoryService: typeof InMemoryService;
11565
+ type index$f_InMemoryState = InMemoryState;
11566
+ declare const index$f_InMemoryState: typeof InMemoryState;
11567
+ type index$f_InMemoryStateFields = InMemoryStateFields;
11568
+ type index$f_LookupHistoryItem = LookupHistoryItem;
11569
+ declare const index$f_LookupHistoryItem: typeof LookupHistoryItem;
11570
+ type index$f_LookupHistorySlots = LookupHistorySlots;
11571
+ type index$f_MAX_AUTH_POOL_SIZE = MAX_AUTH_POOL_SIZE;
11572
+ declare const index$f_MAX_LOOKUP_HISTORY_SLOTS: typeof MAX_LOOKUP_HISTORY_SLOTS;
11573
+ type index$f_MAX_RECENT_HISTORY = MAX_RECENT_HISTORY;
11574
+ type index$f_NotYetAccumulatedReport = NotYetAccumulatedReport;
11575
+ declare const index$f_NotYetAccumulatedReport: typeof NotYetAccumulatedReport;
11576
+ type index$f_PerCore<T> = PerCore<T>;
11577
+ type index$f_PreimageItem = PreimageItem;
11578
+ declare const index$f_PreimageItem: typeof PreimageItem;
11579
+ type index$f_PrivilegedServices = PrivilegedServices;
11580
+ declare const index$f_PrivilegedServices: typeof PrivilegedServices;
11581
+ type index$f_RecentBlocks = RecentBlocks;
11582
+ declare const index$f_RecentBlocks: typeof RecentBlocks;
11583
+ type index$f_RecentBlocksView = RecentBlocksView;
11584
+ type index$f_RecentlyAccumulated = RecentlyAccumulated;
11585
+ type index$f_RecentlyAccumulatedView = RecentlyAccumulatedView;
11586
+ type index$f_SafroleData = SafroleData;
11587
+ declare const index$f_SafroleData: typeof SafroleData;
11588
+ type index$f_SafroleDataView = SafroleDataView;
11589
+ type index$f_SafroleSealingKeys = SafroleSealingKeys;
11590
+ type index$f_SafroleSealingKeysData = SafroleSealingKeysData;
11591
+ declare const index$f_SafroleSealingKeysData: typeof SafroleSealingKeysData;
11592
+ type index$f_SafroleSealingKeysKind = SafroleSealingKeysKind;
11593
+ declare const index$f_SafroleSealingKeysKind: typeof SafroleSealingKeysKind;
11594
+ type index$f_Service = Service;
11595
+ type index$f_ServiceAccountInfo = ServiceAccountInfo;
11596
+ declare const index$f_ServiceAccountInfo: typeof ServiceAccountInfo;
11597
+ type index$f_ServiceAccountInfoView = ServiceAccountInfoView;
11598
+ type index$f_ServiceData = ServiceData;
11599
+ type index$f_ServiceEntries = ServiceEntries;
11600
+ type index$f_ServiceStatistics = ServiceStatistics;
11601
+ declare const index$f_ServiceStatistics: typeof ServiceStatistics;
11602
+ type index$f_ServicesUpdate = ServicesUpdate;
11603
+ type index$f_State = State;
11604
+ type index$f_StateView = StateView;
11605
+ type index$f_StatisticsData = StatisticsData;
11606
+ declare const index$f_StatisticsData: typeof StatisticsData;
11607
+ type index$f_StatisticsDataView = StatisticsDataView;
11608
+ type index$f_StorageItem = StorageItem;
11609
+ declare const index$f_StorageItem: typeof StorageItem;
11610
+ type index$f_StorageKey = StorageKey;
11611
+ type index$f_UpdateError = UpdateError;
11612
+ declare const index$f_UpdateError: typeof UpdateError;
11613
+ type index$f_UpdatePreimage = UpdatePreimage;
11614
+ declare const index$f_UpdatePreimage: typeof UpdatePreimage;
11615
+ type index$f_UpdatePreimageKind = UpdatePreimageKind;
11616
+ declare const index$f_UpdatePreimageKind: typeof UpdatePreimageKind;
11617
+ type index$f_UpdateService = UpdateService;
11618
+ declare const index$f_UpdateService: typeof UpdateService;
11619
+ type index$f_UpdateServiceKind = UpdateServiceKind;
11620
+ declare const index$f_UpdateServiceKind: typeof UpdateServiceKind;
11621
+ type index$f_UpdateStorage = UpdateStorage;
11622
+ declare const index$f_UpdateStorage: typeof UpdateStorage;
11623
+ type index$f_UpdateStorageKind = UpdateStorageKind;
11624
+ declare const index$f_UpdateStorageKind: typeof UpdateStorageKind;
11625
+ type index$f_VALIDATOR_META_BYTES = VALIDATOR_META_BYTES;
11626
+ type index$f_ValidatorData = ValidatorData;
11627
+ declare const index$f_ValidatorData: typeof ValidatorData;
11628
+ type index$f_ValidatorDataView = ValidatorDataView;
11629
+ type index$f_ValidatorStatistics = ValidatorStatistics;
11630
+ declare const index$f_ValidatorStatistics: typeof ValidatorStatistics;
11631
+ type index$f_WithStateView<V = StateView> = WithStateView<V>;
11632
+ declare const index$f_accumulationOutputComparator: typeof accumulationOutputComparator;
11633
+ declare const index$f_accumulationQueueCodec: typeof accumulationQueueCodec;
11634
+ declare const index$f_authPoolsCodec: typeof authPoolsCodec;
11635
+ declare const index$f_authQueuesCodec: typeof authQueuesCodec;
11636
+ declare const index$f_availabilityAssignmentsCodec: typeof availabilityAssignmentsCodec;
11637
+ declare const index$f_codecBandersnatchKey: typeof codecBandersnatchKey;
11638
+ declare const index$f_codecPerCore: typeof codecPerCore;
11639
+ declare const index$f_codecServiceId: typeof codecServiceId;
11640
+ declare const index$f_codecVarGas: typeof codecVarGas;
11641
+ declare const index$f_codecVarU16: typeof codecVarU16;
11642
+ declare const index$f_codecWithVersion: typeof codecWithVersion;
11643
+ declare const index$f_hashComparator: typeof hashComparator;
11644
+ declare const index$f_ignoreValueWithDefault: typeof ignoreValueWithDefault;
11645
+ declare const index$f_recentlyAccumulatedCodec: typeof recentlyAccumulatedCodec;
11646
+ declare const index$f_serviceDataCodec: typeof serviceDataCodec;
11647
+ declare const index$f_serviceEntriesCodec: typeof serviceEntriesCodec;
11648
+ declare const index$f_sortedSetCodec: typeof sortedSetCodec;
11649
+ declare const index$f_tryAsLookupHistorySlots: typeof tryAsLookupHistorySlots;
11650
+ declare const index$f_tryAsPerCore: typeof tryAsPerCore;
11651
+ declare const index$f_validatorsDataCodec: typeof validatorsDataCodec;
11652
+ declare const index$f_workReportsSortedSetCodec: typeof workReportsSortedSetCodec;
11653
+ declare const index$f_zeroSizeHint: typeof zeroSizeHint;
11654
+ declare namespace index$f {
11655
+ export { index$f_AccumulationOutput as AccumulationOutput, index$f_AvailabilityAssignment as AvailabilityAssignment, index$f_BASE_SERVICE_BALANCE as BASE_SERVICE_BALANCE, index$f_BlockState as BlockState, index$f_CoreStatistics as CoreStatistics, index$f_DisputesRecords as DisputesRecords, index$f_ELECTIVE_BYTE_BALANCE as ELECTIVE_BYTE_BALANCE, index$f_ELECTIVE_ITEM_BALANCE as ELECTIVE_ITEM_BALANCE, index$f_InMemoryService as InMemoryService, index$f_InMemoryState as InMemoryState, index$f_LookupHistoryItem as LookupHistoryItem, index$f_MAX_LOOKUP_HISTORY_SLOTS as MAX_LOOKUP_HISTORY_SLOTS, index$f_NotYetAccumulatedReport as NotYetAccumulatedReport, index$f_PreimageItem as PreimageItem, index$f_PrivilegedServices as PrivilegedServices, index$f_RecentBlocks as RecentBlocks, index$f_SafroleData as SafroleData, index$f_SafroleSealingKeysData as SafroleSealingKeysData, index$f_SafroleSealingKeysKind as SafroleSealingKeysKind, index$f_ServiceAccountInfo as ServiceAccountInfo, index$f_ServiceStatistics as ServiceStatistics, index$f_StatisticsData as StatisticsData, index$f_StorageItem as StorageItem, index$f_UpdateError as UpdateError, index$f_UpdatePreimage as UpdatePreimage, index$f_UpdatePreimageKind as UpdatePreimageKind, index$f_UpdateService as UpdateService, index$f_UpdateServiceKind as UpdateServiceKind, index$f_UpdateStorage as UpdateStorage, index$f_UpdateStorageKind as UpdateStorageKind, index$f_ValidatorData as ValidatorData, index$f_ValidatorStatistics as ValidatorStatistics, index$f_accumulationOutputComparator as accumulationOutputComparator, index$f_accumulationQueueCodec as accumulationQueueCodec, index$f_authPoolsCodec as authPoolsCodec, index$f_authQueuesCodec as authQueuesCodec, index$f_availabilityAssignmentsCodec as availabilityAssignmentsCodec, index$f_codecBandersnatchKey as codecBandersnatchKey, index$f_codecPerCore as codecPerCore, index$f_codecServiceId as codecServiceId, index$f_codecVarGas as codecVarGas, index$f_codecVarU16 as codecVarU16, index$f_codecWithVersion as codecWithVersion, index$f_hashComparator as hashComparator, index$f_ignoreValueWithDefault as ignoreValueWithDefault, index$f_recentlyAccumulatedCodec as recentlyAccumulatedCodec, index$f_serviceDataCodec as serviceDataCodec, index$f_serviceEntriesCodec as serviceEntriesCodec, index$f_sortedSetCodec as sortedSetCodec, index$f_tryAsLookupHistorySlots as tryAsLookupHistorySlots, index$f_tryAsPerCore as tryAsPerCore, index$f_validatorsDataCodec as validatorsDataCodec, index$f_workReportsSortedSetCodec as workReportsSortedSetCodec, index$f_zeroSizeHint as zeroSizeHint };
11656
+ export type { index$f_AUTHORIZATION_QUEUE_SIZE as AUTHORIZATION_QUEUE_SIZE, index$f_AccumulationQueue as AccumulationQueue, index$f_AccumulationQueueView as AccumulationQueueView, index$f_AuthorizationPool as AuthorizationPool, index$f_AuthorizationQueue as AuthorizationQueue, index$f_AvailabilityAssignmentsView as AvailabilityAssignmentsView, index$f_BlocksState as BlocksState, index$f_ENTROPY_ENTRIES as ENTROPY_ENTRIES, index$f_EnumerableState as EnumerableState, index$f_FieldNames as FieldNames, index$f_InMemoryStateFields as InMemoryStateFields, index$f_LookupHistorySlots as LookupHistorySlots, index$f_MAX_AUTH_POOL_SIZE as MAX_AUTH_POOL_SIZE, index$f_MAX_RECENT_HISTORY as MAX_RECENT_HISTORY, index$f_PerCore as PerCore, index$f_RecentBlocksView as RecentBlocksView, index$f_RecentlyAccumulated as RecentlyAccumulated, index$f_RecentlyAccumulatedView as RecentlyAccumulatedView, index$f_SafroleDataView as SafroleDataView, index$f_SafroleSealingKeys as SafroleSealingKeys, index$f_Service as Service, index$f_ServiceAccountInfoView as ServiceAccountInfoView, index$f_ServiceData as ServiceData, index$f_ServiceEntries as ServiceEntries, index$f_ServicesUpdate as ServicesUpdate, index$f_State as State, index$f_StateView as StateView, index$f_StatisticsDataView as StatisticsDataView, index$f_StorageKey as StorageKey, index$f_VALIDATOR_META_BYTES as VALIDATOR_META_BYTES, index$f_ValidatorDataView as ValidatorDataView, index$f_WithStateView as WithStateView };
11536
11657
  }
11537
11658
 
11538
11659
  type StateKey = Opaque<OpaqueHash, "stateKey">;
@@ -12001,7 +12122,6 @@ declare function* serializeRemovedServices(servicesRemoved: ServiceId[] | undefi
12001
12122
  return;
12002
12123
  }
12003
12124
  for (const serviceId of servicesRemoved) {
12004
- // TODO [ToDr] what about all data associated with a service?
12005
12125
  const codec = serialize.serviceData(serviceId);
12006
12126
  yield [StateEntryUpdateAction.Remove, codec.key, EMPTY_BLOB];
12007
12127
  }
@@ -12632,47 +12752,47 @@ declare function loadState(spec: ChainSpec, blake2b: Blake2b, entries: Iterable<
12632
12752
  * hashmap of `key -> value` entries.
12633
12753
  */
12634
12754
 
12635
- declare const index$d_EMPTY_BLOB: typeof EMPTY_BLOB;
12636
- type index$d_EncodeFun = EncodeFun;
12637
- type index$d_KeyAndCodec<T> = KeyAndCodec<T>;
12638
- type index$d_KeyAndCodecWithView<T, V> = KeyAndCodecWithView<T, V>;
12639
- type index$d_SerializedService = SerializedService;
12640
- declare const index$d_SerializedService: typeof SerializedService;
12641
- type index$d_SerializedState<T extends SerializedStateBackend = SerializedStateBackend> = SerializedState<T>;
12642
- declare const index$d_SerializedState: typeof SerializedState;
12643
- type index$d_SerializedStateBackend = SerializedStateBackend;
12644
- type index$d_SerializedStateView<T extends SerializedStateBackend> = SerializedStateView<T>;
12645
- declare const index$d_SerializedStateView: typeof SerializedStateView;
12646
- type index$d_StateCodec<T, V = T> = StateCodec<T, V>;
12647
- type index$d_StateEntries = StateEntries;
12648
- declare const index$d_StateEntries: typeof StateEntries;
12649
- type index$d_StateEntryUpdate = StateEntryUpdate;
12650
- type index$d_StateEntryUpdateAction = StateEntryUpdateAction;
12651
- declare const index$d_StateEntryUpdateAction: typeof StateEntryUpdateAction;
12652
- type index$d_StateKey = StateKey;
12653
- type index$d_StateKeyIdx = StateKeyIdx;
12654
- declare const index$d_StateKeyIdx: typeof StateKeyIdx;
12655
- declare const index$d_TYPICAL_STATE_ITEMS: typeof TYPICAL_STATE_ITEMS;
12656
- declare const index$d_TYPICAL_STATE_ITEM_LEN: typeof TYPICAL_STATE_ITEM_LEN;
12657
- declare const index$d_U32_BYTES: typeof U32_BYTES;
12658
- declare const index$d_binaryMerkleization: typeof binaryMerkleization;
12659
- declare const index$d_convertInMemoryStateToDictionary: typeof convertInMemoryStateToDictionary;
12660
- declare const index$d_dumpCodec: typeof dumpCodec;
12661
- declare const index$d_getSafroleData: typeof getSafroleData;
12662
- declare const index$d_legacyServiceNested: typeof legacyServiceNested;
12663
- declare const index$d_loadState: typeof loadState;
12664
- import index$d_serialize = serialize;
12665
- declare const index$d_serializeBasicKeys: typeof serializeBasicKeys;
12666
- declare const index$d_serializePreimages: typeof serializePreimages;
12667
- declare const index$d_serializeRemovedServices: typeof serializeRemovedServices;
12668
- declare const index$d_serializeServiceUpdates: typeof serializeServiceUpdates;
12669
- declare const index$d_serializeStateUpdate: typeof serializeStateUpdate;
12670
- declare const index$d_serializeStorage: typeof serializeStorage;
12671
- declare const index$d_stateEntriesSequenceCodec: typeof stateEntriesSequenceCodec;
12672
- import index$d_stateKeys = stateKeys;
12673
- declare namespace index$d {
12674
- export { index$d_EMPTY_BLOB as EMPTY_BLOB, index$d_SerializedService as SerializedService, index$d_SerializedState as SerializedState, index$d_SerializedStateView as SerializedStateView, index$d_StateEntries as StateEntries, index$d_StateEntryUpdateAction as StateEntryUpdateAction, index$d_StateKeyIdx as StateKeyIdx, index$d_TYPICAL_STATE_ITEMS as TYPICAL_STATE_ITEMS, index$d_TYPICAL_STATE_ITEM_LEN as TYPICAL_STATE_ITEM_LEN, index$d_U32_BYTES as U32_BYTES, index$d_binaryMerkleization as binaryMerkleization, index$d_convertInMemoryStateToDictionary as convertInMemoryStateToDictionary, index$d_dumpCodec as dumpCodec, index$d_getSafroleData as getSafroleData, index$d_legacyServiceNested as legacyServiceNested, index$d_loadState as loadState, index$d_serialize as serialize, index$d_serializeBasicKeys as serializeBasicKeys, index$d_serializePreimages as serializePreimages, index$d_serializeRemovedServices as serializeRemovedServices, index$d_serializeServiceUpdates as serializeServiceUpdates, index$d_serializeStateUpdate as serializeStateUpdate, index$d_serializeStorage as serializeStorage, index$d_stateEntriesSequenceCodec as stateEntriesSequenceCodec, index$d_stateKeys as stateKeys };
12675
- export type { index$d_EncodeFun as EncodeFun, index$d_KeyAndCodec as KeyAndCodec, index$d_KeyAndCodecWithView as KeyAndCodecWithView, index$d_SerializedStateBackend as SerializedStateBackend, index$d_StateCodec as StateCodec, index$d_StateEntryUpdate as StateEntryUpdate, index$d_StateKey as StateKey };
12755
+ declare const index$e_EMPTY_BLOB: typeof EMPTY_BLOB;
12756
+ type index$e_EncodeFun = EncodeFun;
12757
+ type index$e_KeyAndCodec<T> = KeyAndCodec<T>;
12758
+ type index$e_KeyAndCodecWithView<T, V> = KeyAndCodecWithView<T, V>;
12759
+ type index$e_SerializedService = SerializedService;
12760
+ declare const index$e_SerializedService: typeof SerializedService;
12761
+ type index$e_SerializedState<T extends SerializedStateBackend = SerializedStateBackend> = SerializedState<T>;
12762
+ declare const index$e_SerializedState: typeof SerializedState;
12763
+ type index$e_SerializedStateBackend = SerializedStateBackend;
12764
+ type index$e_SerializedStateView<T extends SerializedStateBackend> = SerializedStateView<T>;
12765
+ declare const index$e_SerializedStateView: typeof SerializedStateView;
12766
+ type index$e_StateCodec<T, V = T> = StateCodec<T, V>;
12767
+ type index$e_StateEntries = StateEntries;
12768
+ declare const index$e_StateEntries: typeof StateEntries;
12769
+ type index$e_StateEntryUpdate = StateEntryUpdate;
12770
+ type index$e_StateEntryUpdateAction = StateEntryUpdateAction;
12771
+ declare const index$e_StateEntryUpdateAction: typeof StateEntryUpdateAction;
12772
+ type index$e_StateKey = StateKey;
12773
+ type index$e_StateKeyIdx = StateKeyIdx;
12774
+ declare const index$e_StateKeyIdx: typeof StateKeyIdx;
12775
+ declare const index$e_TYPICAL_STATE_ITEMS: typeof TYPICAL_STATE_ITEMS;
12776
+ declare const index$e_TYPICAL_STATE_ITEM_LEN: typeof TYPICAL_STATE_ITEM_LEN;
12777
+ declare const index$e_U32_BYTES: typeof U32_BYTES;
12778
+ declare const index$e_binaryMerkleization: typeof binaryMerkleization;
12779
+ declare const index$e_convertInMemoryStateToDictionary: typeof convertInMemoryStateToDictionary;
12780
+ declare const index$e_dumpCodec: typeof dumpCodec;
12781
+ declare const index$e_getSafroleData: typeof getSafroleData;
12782
+ declare const index$e_legacyServiceNested: typeof legacyServiceNested;
12783
+ declare const index$e_loadState: typeof loadState;
12784
+ import index$e_serialize = serialize;
12785
+ declare const index$e_serializeBasicKeys: typeof serializeBasicKeys;
12786
+ declare const index$e_serializePreimages: typeof serializePreimages;
12787
+ declare const index$e_serializeRemovedServices: typeof serializeRemovedServices;
12788
+ declare const index$e_serializeServiceUpdates: typeof serializeServiceUpdates;
12789
+ declare const index$e_serializeStateUpdate: typeof serializeStateUpdate;
12790
+ declare const index$e_serializeStorage: typeof serializeStorage;
12791
+ declare const index$e_stateEntriesSequenceCodec: typeof stateEntriesSequenceCodec;
12792
+ import index$e_stateKeys = stateKeys;
12793
+ declare namespace index$e {
12794
+ export { index$e_EMPTY_BLOB as EMPTY_BLOB, index$e_SerializedService as SerializedService, index$e_SerializedState as SerializedState, index$e_SerializedStateView as SerializedStateView, index$e_StateEntries as StateEntries, index$e_StateEntryUpdateAction as StateEntryUpdateAction, index$e_StateKeyIdx as StateKeyIdx, index$e_TYPICAL_STATE_ITEMS as TYPICAL_STATE_ITEMS, index$e_TYPICAL_STATE_ITEM_LEN as TYPICAL_STATE_ITEM_LEN, index$e_U32_BYTES as U32_BYTES, index$e_binaryMerkleization as binaryMerkleization, index$e_convertInMemoryStateToDictionary as convertInMemoryStateToDictionary, index$e_dumpCodec as dumpCodec, index$e_getSafroleData as getSafroleData, index$e_legacyServiceNested as legacyServiceNested, index$e_loadState as loadState, index$e_serialize as serialize, index$e_serializeBasicKeys as serializeBasicKeys, index$e_serializePreimages as serializePreimages, index$e_serializeRemovedServices as serializeRemovedServices, index$e_serializeServiceUpdates as serializeServiceUpdates, index$e_serializeStateUpdate as serializeStateUpdate, index$e_serializeStorage as serializeStorage, index$e_stateEntriesSequenceCodec as stateEntriesSequenceCodec, index$e_stateKeys as stateKeys };
12795
+ export type { index$e_EncodeFun as EncodeFun, index$e_KeyAndCodec as KeyAndCodec, index$e_KeyAndCodecWithView as KeyAndCodecWithView, index$e_SerializedStateBackend as SerializedStateBackend, index$e_StateCodec as StateCodec, index$e_StateEntryUpdate as StateEntryUpdate, index$e_StateKey as StateKey };
12676
12796
  }
12677
12797
 
12678
12798
  /** Error during `LeafDb` creation. */
@@ -13024,31 +13144,31 @@ declare class InMemorySerializedStates implements StatesDb<SerializedState<LeafD
13024
13144
  async close() {}
13025
13145
  }
13026
13146
 
13027
- type index$c_BlocksDb = BlocksDb;
13028
- type index$c_InMemoryBlocks = InMemoryBlocks;
13029
- declare const index$c_InMemoryBlocks: typeof InMemoryBlocks;
13030
- type index$c_InMemorySerializedStates = InMemorySerializedStates;
13031
- declare const index$c_InMemorySerializedStates: typeof InMemorySerializedStates;
13032
- type index$c_InMemoryStates = InMemoryStates;
13033
- declare const index$c_InMemoryStates: typeof InMemoryStates;
13034
- type index$c_InitStatesDb<T = State> = InitStatesDb<T>;
13035
- type index$c_LeafDb = LeafDb;
13036
- declare const index$c_LeafDb: typeof LeafDb;
13037
- type index$c_LeafDbError = LeafDbError;
13038
- declare const index$c_LeafDbError: typeof LeafDbError;
13039
- type index$c_Lookup = Lookup;
13040
- type index$c_LookupKind = LookupKind;
13041
- declare const index$c_LookupKind: typeof LookupKind;
13042
- type index$c_RootDb<TBlocks = BlocksDb, TStates = StatesDb> = RootDb<TBlocks, TStates>;
13043
- type index$c_SerializedStatesDb = SerializedStatesDb;
13044
- type index$c_StateUpdateError = StateUpdateError;
13045
- declare const index$c_StateUpdateError: typeof StateUpdateError;
13046
- type index$c_StatesDb<T extends State = State> = StatesDb<T>;
13047
- type index$c_ValuesDb = ValuesDb;
13048
- declare const index$c_updateLeafs: typeof updateLeafs;
13049
- declare namespace index$c {
13050
- export { index$c_InMemoryBlocks as InMemoryBlocks, index$c_InMemorySerializedStates as InMemorySerializedStates, index$c_InMemoryStates as InMemoryStates, index$c_LeafDb as LeafDb, index$c_LeafDbError as LeafDbError, index$c_LookupKind as LookupKind, index$c_StateUpdateError as StateUpdateError, index$c_updateLeafs as updateLeafs };
13051
- export type { index$c_BlocksDb as BlocksDb, index$c_InitStatesDb as InitStatesDb, index$c_Lookup as Lookup, index$c_RootDb as RootDb, index$c_SerializedStatesDb as SerializedStatesDb, index$c_StatesDb as StatesDb, index$c_ValuesDb as ValuesDb };
13147
+ type index$d_BlocksDb = BlocksDb;
13148
+ type index$d_InMemoryBlocks = InMemoryBlocks;
13149
+ declare const index$d_InMemoryBlocks: typeof InMemoryBlocks;
13150
+ type index$d_InMemorySerializedStates = InMemorySerializedStates;
13151
+ declare const index$d_InMemorySerializedStates: typeof InMemorySerializedStates;
13152
+ type index$d_InMemoryStates = InMemoryStates;
13153
+ declare const index$d_InMemoryStates: typeof InMemoryStates;
13154
+ type index$d_InitStatesDb<T = State> = InitStatesDb<T>;
13155
+ type index$d_LeafDb = LeafDb;
13156
+ declare const index$d_LeafDb: typeof LeafDb;
13157
+ type index$d_LeafDbError = LeafDbError;
13158
+ declare const index$d_LeafDbError: typeof LeafDbError;
13159
+ type index$d_Lookup = Lookup;
13160
+ type index$d_LookupKind = LookupKind;
13161
+ declare const index$d_LookupKind: typeof LookupKind;
13162
+ type index$d_RootDb<TBlocks = BlocksDb, TStates = StatesDb> = RootDb<TBlocks, TStates>;
13163
+ type index$d_SerializedStatesDb = SerializedStatesDb;
13164
+ type index$d_StateUpdateError = StateUpdateError;
13165
+ declare const index$d_StateUpdateError: typeof StateUpdateError;
13166
+ type index$d_StatesDb<T extends State = State> = StatesDb<T>;
13167
+ type index$d_ValuesDb = ValuesDb;
13168
+ declare const index$d_updateLeafs: typeof updateLeafs;
13169
+ declare namespace index$d {
13170
+ export { index$d_InMemoryBlocks as InMemoryBlocks, index$d_InMemorySerializedStates as InMemorySerializedStates, index$d_InMemoryStates as InMemoryStates, index$d_LeafDb as LeafDb, index$d_LeafDbError as LeafDbError, index$d_LookupKind as LookupKind, index$d_StateUpdateError as StateUpdateError, index$d_updateLeafs as updateLeafs };
13171
+ export type { index$d_BlocksDb as BlocksDb, index$d_InitStatesDb as InitStatesDb, index$d_Lookup as Lookup, index$d_RootDb as RootDb, index$d_SerializedStatesDb as SerializedStatesDb, index$d_StatesDb as StatesDb, index$d_ValuesDb as ValuesDb };
13052
13172
  }
13053
13173
 
13054
13174
  /**
@@ -13470,31 +13590,31 @@ declare const initEc = async () => {
13470
13590
  await init.reedSolomon();
13471
13591
  };
13472
13592
 
13473
- declare const index$b_HALF_POINT_SIZE: typeof HALF_POINT_SIZE;
13474
- declare const index$b_N_CHUNKS_REDUNDANCY: typeof N_CHUNKS_REDUNDANCY;
13475
- type index$b_N_CHUNKS_REQUIRED = N_CHUNKS_REQUIRED;
13476
- type index$b_N_CHUNKS_TOTAL = N_CHUNKS_TOTAL;
13477
- type index$b_PIECE_SIZE = PIECE_SIZE;
13478
- declare const index$b_POINT_ALIGNMENT: typeof POINT_ALIGNMENT;
13479
- type index$b_POINT_LENGTH = POINT_LENGTH;
13480
- declare const index$b_checkConsistency: typeof checkConsistency;
13481
- declare const index$b_chunkingFunction: typeof chunkingFunction;
13482
- declare const index$b_chunksToShards: typeof chunksToShards;
13483
- declare const index$b_decodeData: typeof decodeData;
13484
- declare const index$b_decodeDataAndTrim: typeof decodeDataAndTrim;
13485
- declare const index$b_decodePiece: typeof decodePiece;
13486
- declare const index$b_encodePoints: typeof encodePoints;
13487
- declare const index$b_initEc: typeof initEc;
13488
- declare const index$b_join: typeof join;
13489
- declare const index$b_lace: typeof lace;
13490
- declare const index$b_padAndEncodeData: typeof padAndEncodeData;
13491
- declare const index$b_shardsToChunks: typeof shardsToChunks;
13492
- declare const index$b_split: typeof split;
13493
- declare const index$b_transpose: typeof transpose;
13494
- declare const index$b_unzip: typeof unzip;
13495
- declare namespace index$b {
13496
- export { index$b_HALF_POINT_SIZE as HALF_POINT_SIZE, index$b_N_CHUNKS_REDUNDANCY as N_CHUNKS_REDUNDANCY, index$b_POINT_ALIGNMENT as POINT_ALIGNMENT, index$b_checkConsistency as checkConsistency, index$b_chunkingFunction as chunkingFunction, index$b_chunksToShards as chunksToShards, index$b_decodeData as decodeData, index$b_decodeDataAndTrim as decodeDataAndTrim, index$b_decodePiece as decodePiece, index$b_encodePoints as encodePoints, index$b_initEc as initEc, index$b_join as join, index$b_lace as lace, index$b_padAndEncodeData as padAndEncodeData, index$b_shardsToChunks as shardsToChunks, index$b_split as split, index$b_transpose as transpose, index$b_unzip as unzip };
13497
- export type { index$b_N_CHUNKS_REQUIRED as N_CHUNKS_REQUIRED, index$b_N_CHUNKS_TOTAL as N_CHUNKS_TOTAL, index$b_PIECE_SIZE as PIECE_SIZE, index$b_POINT_LENGTH as POINT_LENGTH };
13593
+ declare const index$c_HALF_POINT_SIZE: typeof HALF_POINT_SIZE;
13594
+ declare const index$c_N_CHUNKS_REDUNDANCY: typeof N_CHUNKS_REDUNDANCY;
13595
+ type index$c_N_CHUNKS_REQUIRED = N_CHUNKS_REQUIRED;
13596
+ type index$c_N_CHUNKS_TOTAL = N_CHUNKS_TOTAL;
13597
+ type index$c_PIECE_SIZE = PIECE_SIZE;
13598
+ declare const index$c_POINT_ALIGNMENT: typeof POINT_ALIGNMENT;
13599
+ type index$c_POINT_LENGTH = POINT_LENGTH;
13600
+ declare const index$c_checkConsistency: typeof checkConsistency;
13601
+ declare const index$c_chunkingFunction: typeof chunkingFunction;
13602
+ declare const index$c_chunksToShards: typeof chunksToShards;
13603
+ declare const index$c_decodeData: typeof decodeData;
13604
+ declare const index$c_decodeDataAndTrim: typeof decodeDataAndTrim;
13605
+ declare const index$c_decodePiece: typeof decodePiece;
13606
+ declare const index$c_encodePoints: typeof encodePoints;
13607
+ declare const index$c_initEc: typeof initEc;
13608
+ declare const index$c_join: typeof join;
13609
+ declare const index$c_lace: typeof lace;
13610
+ declare const index$c_padAndEncodeData: typeof padAndEncodeData;
13611
+ declare const index$c_shardsToChunks: typeof shardsToChunks;
13612
+ declare const index$c_split: typeof split;
13613
+ declare const index$c_transpose: typeof transpose;
13614
+ declare const index$c_unzip: typeof unzip;
13615
+ declare namespace index$c {
13616
+ export { index$c_HALF_POINT_SIZE as HALF_POINT_SIZE, index$c_N_CHUNKS_REDUNDANCY as N_CHUNKS_REDUNDANCY, index$c_POINT_ALIGNMENT as POINT_ALIGNMENT, index$c_checkConsistency as checkConsistency, index$c_chunkingFunction as chunkingFunction, index$c_chunksToShards as chunksToShards, index$c_decodeData as decodeData, index$c_decodeDataAndTrim as decodeDataAndTrim, index$c_decodePiece as decodePiece, index$c_encodePoints as encodePoints, index$c_initEc as initEc, index$c_join as join, index$c_lace as lace, index$c_padAndEncodeData as padAndEncodeData, index$c_shardsToChunks as shardsToChunks, index$c_split as split, index$c_transpose as transpose, index$c_unzip as unzip };
13617
+ export type { index$c_N_CHUNKS_REQUIRED as N_CHUNKS_REQUIRED, index$c_N_CHUNKS_TOTAL as N_CHUNKS_TOTAL, index$c_PIECE_SIZE as PIECE_SIZE, index$c_POINT_LENGTH as POINT_LENGTH };
13498
13618
  }
13499
13619
 
13500
13620
  /** A per-client handler of incoming socket messages. */
@@ -13997,45 +14117,45 @@ declare class FuzzTarget implements IpcHandler {
13997
14117
  }
13998
14118
  }
13999
14119
 
14000
- type index$a_Ancestry = Ancestry;
14001
- type index$a_AncestryItem = AncestryItem;
14002
- declare const index$a_AncestryItem: typeof AncestryItem;
14003
- type index$a_ErrorMessage = ErrorMessage;
14004
- declare const index$a_ErrorMessage: typeof ErrorMessage;
14005
- type index$a_Features = Features;
14006
- declare const index$a_Features: typeof Features;
14007
- type index$a_FuzzMessageHandler = FuzzMessageHandler;
14008
- type index$a_FuzzTarget = FuzzTarget;
14009
- declare const index$a_FuzzTarget: typeof FuzzTarget;
14010
- type index$a_GetState = GetState;
14011
- type index$a_Initialize = Initialize;
14012
- declare const index$a_Initialize: typeof Initialize;
14013
- type index$a_KeyValue = KeyValue;
14014
- declare const index$a_KeyValue: typeof KeyValue;
14015
- type index$a_Message = Message;
14016
- type index$a_MessageData = MessageData;
14017
- type index$a_MessageType = MessageType;
14018
- declare const index$a_MessageType: typeof MessageType;
14019
- type index$a_PeerInfo = PeerInfo;
14020
- declare const index$a_PeerInfo: typeof PeerInfo;
14021
- type index$a_StateRoot = StateRoot;
14022
- type index$a_Version = Version;
14023
- declare const index$a_Version: typeof Version;
14024
- declare const index$a_ancestryCodec: typeof ancestryCodec;
14025
- declare const index$a_getStateCodec: typeof getStateCodec;
14026
- declare const index$a_messageCodec: typeof messageCodec;
14027
- declare const index$a_stateCodec: typeof stateCodec;
14028
- declare const index$a_stateRootCodec: typeof stateRootCodec;
14029
- declare namespace index$a {
14030
- export { index$a_AncestryItem as AncestryItem, index$a_ErrorMessage as ErrorMessage, index$a_Features as Features, index$a_FuzzTarget as FuzzTarget, index$a_Initialize as Initialize, index$a_KeyValue as KeyValue, index$a_MessageType as MessageType, index$a_PeerInfo as PeerInfo, index$a_Version as Version, index$a_ancestryCodec as ancestryCodec, index$a_getStateCodec as getStateCodec, logger$1 as logger, index$a_messageCodec as messageCodec, index$a_stateCodec as stateCodec, index$a_stateRootCodec as stateRootCodec };
14031
- export type { index$a_Ancestry as Ancestry, index$a_FuzzMessageHandler as FuzzMessageHandler, index$a_GetState as GetState, index$a_Message as Message, index$a_MessageData as MessageData, index$a_StateRoot as StateRoot };
14120
+ type index$b_Ancestry = Ancestry;
14121
+ type index$b_AncestryItem = AncestryItem;
14122
+ declare const index$b_AncestryItem: typeof AncestryItem;
14123
+ type index$b_ErrorMessage = ErrorMessage;
14124
+ declare const index$b_ErrorMessage: typeof ErrorMessage;
14125
+ type index$b_Features = Features;
14126
+ declare const index$b_Features: typeof Features;
14127
+ type index$b_FuzzMessageHandler = FuzzMessageHandler;
14128
+ type index$b_FuzzTarget = FuzzTarget;
14129
+ declare const index$b_FuzzTarget: typeof FuzzTarget;
14130
+ type index$b_GetState = GetState;
14131
+ type index$b_Initialize = Initialize;
14132
+ declare const index$b_Initialize: typeof Initialize;
14133
+ type index$b_KeyValue = KeyValue;
14134
+ declare const index$b_KeyValue: typeof KeyValue;
14135
+ type index$b_Message = Message;
14136
+ type index$b_MessageData = MessageData;
14137
+ type index$b_MessageType = MessageType;
14138
+ declare const index$b_MessageType: typeof MessageType;
14139
+ type index$b_PeerInfo = PeerInfo;
14140
+ declare const index$b_PeerInfo: typeof PeerInfo;
14141
+ type index$b_StateRoot = StateRoot;
14142
+ type index$b_Version = Version;
14143
+ declare const index$b_Version: typeof Version;
14144
+ declare const index$b_ancestryCodec: typeof ancestryCodec;
14145
+ declare const index$b_getStateCodec: typeof getStateCodec;
14146
+ declare const index$b_messageCodec: typeof messageCodec;
14147
+ declare const index$b_stateCodec: typeof stateCodec;
14148
+ declare const index$b_stateRootCodec: typeof stateRootCodec;
14149
+ declare namespace index$b {
14150
+ export { index$b_AncestryItem as AncestryItem, index$b_ErrorMessage as ErrorMessage, index$b_Features as Features, index$b_FuzzTarget as FuzzTarget, index$b_Initialize as Initialize, index$b_KeyValue as KeyValue, index$b_MessageType as MessageType, index$b_PeerInfo as PeerInfo, index$b_Version as Version, index$b_ancestryCodec as ancestryCodec, index$b_getStateCodec as getStateCodec, logger$1 as logger, index$b_messageCodec as messageCodec, index$b_stateCodec as stateCodec, index$b_stateRootCodec as stateRootCodec };
14151
+ export type { index$b_Ancestry as Ancestry, index$b_FuzzMessageHandler as FuzzMessageHandler, index$b_GetState as GetState, index$b_Message as Message, index$b_MessageData as MessageData, index$b_StateRoot as StateRoot };
14032
14152
  }
14033
14153
 
14034
- type index$9_IpcHandler = IpcHandler;
14035
- type index$9_IpcSender = IpcSender;
14036
- declare namespace index$9 {
14037
- export { index$a as v1 };
14038
- export type { index$9_IpcHandler as IpcHandler, index$9_IpcSender as IpcSender };
14154
+ type index$a_IpcHandler = IpcHandler;
14155
+ type index$a_IpcSender = IpcSender;
14156
+ declare namespace index$a {
14157
+ export { index$b as v1 };
14158
+ export type { index$a_IpcHandler as IpcHandler, index$a_IpcSender as IpcSender };
14039
14159
  }
14040
14160
 
14041
14161
  /** Size of the transfer memo. */
@@ -14136,13 +14256,6 @@ declare enum ForgetPreimageError {
14136
14256
 
14137
14257
  /**
14138
14258
  * Errors that may occur when the transfer is invoked.
14139
- *
14140
- * TODO [ToDr] Since I don't fully understand yet which of these
14141
- * could be checked directly in the host call (i.e. if we will
14142
- * have access to the service account state there) for now I keep
14143
- * them safely in the `AccumulationPartialState` implementation.
14144
- * However, if possible, these should be moved directly to the
14145
- * host call implementation.
14146
14259
  */
14147
14260
  declare enum TransferError {
14148
14261
  /** The destination service does not exist. */
@@ -14307,7 +14420,7 @@ interface PartialState {
14307
14420
  a: PerCore<ServiceId>,
14308
14421
  v: ServiceId | null,
14309
14422
  r: ServiceId | null,
14310
- z: [ServiceId, ServiceGas][],
14423
+ z: Map<ServiceId, ServiceGas>,
14311
14424
  ): Result$2<OK, UpdatePrivilegesError>;
14312
14425
 
14313
14426
  /** Yield accumulation trie result hash. */
@@ -15327,25 +15440,25 @@ declare function getRegisters(argsLength: number) {
15327
15440
  return regs;
15328
15441
  }
15329
15442
 
15330
- type index$8_MemorySegment = MemorySegment;
15331
- declare const index$8_MemorySegment: typeof MemorySegment;
15332
- declare const index$8_NO_OF_REGISTERS: typeof NO_OF_REGISTERS;
15333
- type index$8_SpiMemory = SpiMemory;
15334
- declare const index$8_SpiMemory: typeof SpiMemory;
15335
- type index$8_SpiProgram = SpiProgram;
15336
- declare const index$8_SpiProgram: typeof SpiProgram;
15337
- declare const index$8_decodeStandardProgram: typeof decodeStandardProgram;
15338
- declare const index$8_getMemorySegment: typeof getMemorySegment;
15339
- declare const index$8_getRegisters: typeof getRegisters;
15340
- declare namespace index$8 {
15443
+ type index$9_MemorySegment = MemorySegment;
15444
+ declare const index$9_MemorySegment: typeof MemorySegment;
15445
+ declare const index$9_NO_OF_REGISTERS: typeof NO_OF_REGISTERS;
15446
+ type index$9_SpiMemory = SpiMemory;
15447
+ declare const index$9_SpiMemory: typeof SpiMemory;
15448
+ type index$9_SpiProgram = SpiProgram;
15449
+ declare const index$9_SpiProgram: typeof SpiProgram;
15450
+ declare const index$9_decodeStandardProgram: typeof decodeStandardProgram;
15451
+ declare const index$9_getMemorySegment: typeof getMemorySegment;
15452
+ declare const index$9_getRegisters: typeof getRegisters;
15453
+ declare namespace index$9 {
15341
15454
  export {
15342
- index$8_MemorySegment as MemorySegment,
15343
- index$8_NO_OF_REGISTERS as NO_OF_REGISTERS,
15344
- index$8_SpiMemory as SpiMemory,
15345
- index$8_SpiProgram as SpiProgram,
15346
- index$8_decodeStandardProgram as decodeStandardProgram,
15347
- index$8_getMemorySegment as getMemorySegment,
15348
- index$8_getRegisters as getRegisters,
15455
+ index$9_MemorySegment as MemorySegment,
15456
+ index$9_NO_OF_REGISTERS as NO_OF_REGISTERS,
15457
+ index$9_SpiMemory as SpiMemory,
15458
+ index$9_SpiProgram as SpiProgram,
15459
+ index$9_decodeStandardProgram as decodeStandardProgram,
15460
+ index$9_getMemorySegment as getMemorySegment,
15461
+ index$9_getRegisters as getRegisters,
15349
15462
  };
15350
15463
  }
15351
15464
 
@@ -15403,13 +15516,13 @@ declare function extractCodeAndMetadata(blobWithMetadata: Uint8Array) {
15403
15516
  return { metadata, code };
15404
15517
  }
15405
15518
 
15406
- type index$7_Program = Program;
15407
- declare const index$7_Program: typeof Program;
15408
- declare const index$7_extractCodeAndMetadata: typeof extractCodeAndMetadata;
15409
- declare namespace index$7 {
15519
+ type index$8_Program = Program;
15520
+ declare const index$8_Program: typeof Program;
15521
+ declare const index$8_extractCodeAndMetadata: typeof extractCodeAndMetadata;
15522
+ declare namespace index$8 {
15410
15523
  export {
15411
- index$7_Program as Program,
15412
- index$7_extractCodeAndMetadata as extractCodeAndMetadata,
15524
+ index$8_Program as Program,
15525
+ index$8_extractCodeAndMetadata as extractCodeAndMetadata,
15413
15526
  };
15414
15527
  }
15415
15528
 
@@ -18462,24 +18575,24 @@ declare class Interpreter implements IPvmInterpreter {
18462
18575
  }
18463
18576
  }
18464
18577
 
18465
- type index$6_Interpreter = Interpreter;
18466
- declare const index$6_Interpreter: typeof Interpreter;
18467
- type index$6_InterpreterOptions = InterpreterOptions;
18468
- type index$6_Memory = Memory;
18469
- declare const index$6_Memory: typeof Memory;
18470
- type index$6_MemoryBuilder = MemoryBuilder;
18471
- declare const index$6_MemoryBuilder: typeof MemoryBuilder;
18472
- type index$6_MemoryIndex = MemoryIndex;
18473
- type index$6_Registers = Registers;
18474
- declare const index$6_Registers: typeof Registers;
18475
- type index$6_SbrkIndex = SbrkIndex;
18476
- declare const index$6_gasCounter: typeof gasCounter;
18477
- declare const index$6_logger: typeof logger;
18478
- declare const index$6_tryAsMemoryIndex: typeof tryAsMemoryIndex;
18479
- declare const index$6_tryAsSbrkIndex: typeof tryAsSbrkIndex;
18480
- declare namespace index$6 {
18481
- export { index$6_Interpreter as Interpreter, index$6_Memory as Memory, index$6_MemoryBuilder as MemoryBuilder, index$6_Registers as Registers, index$6_gasCounter as gasCounter, index$6_logger as logger, index$6_tryAsMemoryIndex as tryAsMemoryIndex, index$6_tryAsSbrkIndex as tryAsSbrkIndex };
18482
- export type { index$6_InterpreterOptions as InterpreterOptions, index$6_MemoryIndex as MemoryIndex, index$6_SbrkIndex as SbrkIndex };
18578
+ type index$7_Interpreter = Interpreter;
18579
+ declare const index$7_Interpreter: typeof Interpreter;
18580
+ type index$7_InterpreterOptions = InterpreterOptions;
18581
+ type index$7_Memory = Memory;
18582
+ declare const index$7_Memory: typeof Memory;
18583
+ type index$7_MemoryBuilder = MemoryBuilder;
18584
+ declare const index$7_MemoryBuilder: typeof MemoryBuilder;
18585
+ type index$7_MemoryIndex = MemoryIndex;
18586
+ type index$7_Registers = Registers;
18587
+ declare const index$7_Registers: typeof Registers;
18588
+ type index$7_SbrkIndex = SbrkIndex;
18589
+ declare const index$7_gasCounter: typeof gasCounter;
18590
+ declare const index$7_logger: typeof logger;
18591
+ declare const index$7_tryAsMemoryIndex: typeof tryAsMemoryIndex;
18592
+ declare const index$7_tryAsSbrkIndex: typeof tryAsSbrkIndex;
18593
+ declare namespace index$7 {
18594
+ export { index$7_Interpreter as Interpreter, index$7_Memory as Memory, index$7_MemoryBuilder as MemoryBuilder, index$7_Registers as Registers, index$7_gasCounter as gasCounter, index$7_logger as logger, index$7_tryAsMemoryIndex as tryAsMemoryIndex, index$7_tryAsSbrkIndex as tryAsSbrkIndex };
18595
+ export type { index$7_InterpreterOptions as InterpreterOptions, index$7_MemoryIndex as MemoryIndex, index$7_SbrkIndex as SbrkIndex };
18483
18596
  }
18484
18597
 
18485
18598
  type ResolveFn = (pvm: IPvmInterpreter) => void;
@@ -18665,18 +18778,18 @@ declare class HostCalls {
18665
18778
  }
18666
18779
  }
18667
18780
 
18668
- type index$5_HostCallHandler = HostCallHandler;
18669
- type index$5_HostCallMemory = HostCallMemory;
18670
- declare const index$5_HostCallMemory: typeof HostCallMemory;
18671
- type index$5_HostCallRegisters = HostCallRegisters;
18672
- declare const index$5_HostCallRegisters: typeof HostCallRegisters;
18673
- type index$5_PvmExecution = PvmExecution;
18674
- declare const index$5_PvmExecution: typeof PvmExecution;
18675
- declare const index$5_traceRegisters: typeof traceRegisters;
18676
- declare const index$5_tryAsHostCallIndex: typeof tryAsHostCallIndex;
18677
- declare namespace index$5 {
18678
- export { index$5_HostCallMemory as HostCallMemory, index$5_HostCallRegisters as HostCallRegisters, HostCallsManager as HostCalls, index$5_PvmExecution as PvmExecution, HostCalls as PvmHostCallExtension, InterpreterInstanceManager as PvmInstanceManager, index$5_traceRegisters as traceRegisters, index$5_tryAsHostCallIndex as tryAsHostCallIndex };
18679
- export type { index$5_HostCallHandler as HostCallHandler };
18781
+ type index$6_HostCallHandler = HostCallHandler;
18782
+ type index$6_HostCallMemory = HostCallMemory;
18783
+ declare const index$6_HostCallMemory: typeof HostCallMemory;
18784
+ type index$6_HostCallRegisters = HostCallRegisters;
18785
+ declare const index$6_HostCallRegisters: typeof HostCallRegisters;
18786
+ type index$6_PvmExecution = PvmExecution;
18787
+ declare const index$6_PvmExecution: typeof PvmExecution;
18788
+ declare const index$6_traceRegisters: typeof traceRegisters;
18789
+ declare const index$6_tryAsHostCallIndex: typeof tryAsHostCallIndex;
18790
+ declare namespace index$6 {
18791
+ export { index$6_HostCallMemory as HostCallMemory, index$6_HostCallRegisters as HostCallRegisters, HostCallsManager as HostCalls, index$6_PvmExecution as PvmExecution, HostCalls as PvmHostCallExtension, InterpreterInstanceManager as PvmInstanceManager, index$6_traceRegisters as traceRegisters, index$6_tryAsHostCallIndex as tryAsHostCallIndex };
18792
+ export type { index$6_HostCallHandler as HostCallHandler };
18680
18793
  }
18681
18794
 
18682
18795
  /**
@@ -18873,7 +18986,7 @@ declare class AccumulationStateUpdate {
18873
18986
  /** Pending transfers. */
18874
18987
  public transfers: PendingTransfer[],
18875
18988
  /** Yielded accumulation root. */
18876
- public readonly yieldedRoots: Map<ServiceId, OpaqueHash> = new Map(),
18989
+ public yieldedRoot: OpaqueHash | null = null,
18877
18990
  ) {}
18878
18991
 
18879
18992
  /** Create new empty state update. */
@@ -18912,7 +19025,7 @@ declare class AccumulationStateUpdate {
18912
19025
  storage: deepCloneMapWithArray(from.services.storage),
18913
19026
  };
18914
19027
  const transfers = [...from.transfers];
18915
- const update = new AccumulationStateUpdate(serviceUpdates, transfers, new Map(from.yieldedRoots));
19028
+ const update = new AccumulationStateUpdate(serviceUpdates, transfers, from.yieldedRoot);
18916
19029
 
18917
19030
  // update entries
18918
19031
  for (const [k, v] of from.authorizationQueues) {
@@ -18938,6 +19051,13 @@ declare class AccumulationStateUpdate {
18938
19051
  this.transfers = [];
18939
19052
  return transfers;
18940
19053
  }
19054
+
19055
+ /** Retrieve and clear yielded root. */
19056
+ takeYieldedRoot() {
19057
+ const yieldedRoot = this.yieldedRoot;
19058
+ this.yieldedRoot = null;
19059
+ return yieldedRoot;
19060
+ }
18941
19061
  }
18942
19062
 
18943
19063
  type StateSlice = Pick<State, "getService" | "privilegedServices">;
@@ -19038,6 +19158,21 @@ declare class PartiallyUpdatedState<T extends StateSlice = StateSlice> {
19038
19158
  hash: PreimageHash,
19039
19159
  length: U64,
19040
19160
  ): LookupHistoryItem | null {
19161
+ const updatedService = this.stateUpdate.services.updated.get(serviceId);
19162
+
19163
+ /** Return lookup history item for newly created service */
19164
+ if (updatedService !== undefined && updatedService.action.kind === UpdateServiceKind.Create) {
19165
+ const lookupHistoryItem = updatedService.action.lookupHistory;
19166
+
19167
+ if (
19168
+ lookupHistoryItem !== null &&
19169
+ hash.isEqualTo(lookupHistoryItem.hash) &&
19170
+ length === BigInt(lookupHistoryItem.length)
19171
+ ) {
19172
+ return lookupHistoryItem;
19173
+ }
19174
+ }
19175
+
19041
19176
  const preimages = this.stateUpdate.services.preimages.get(serviceId) ?? [];
19042
19177
  // TODO [ToDr] This is most likely wrong. We may have `provide` and `remove` within
19043
19178
  // the same state update. We should however switch to proper "updated state"
@@ -19270,71 +19405,95 @@ declare function emptyRegistersBuffer(): Uint8Array {
19270
19405
  return safeAllocUint8Array(NO_OF_REGISTERS * REGISTER_BYTE_SIZE);
19271
19406
  }
19272
19407
 
19273
- type index$4_AccumulationStateUpdate = AccumulationStateUpdate;
19274
- declare const index$4_AccumulationStateUpdate: typeof AccumulationStateUpdate;
19275
- declare const index$4_CURRENT_SERVICE_ID: typeof CURRENT_SERVICE_ID;
19276
- type index$4_EjectError = EjectError;
19277
- declare const index$4_EjectError: typeof EjectError;
19278
- type index$4_ForgetPreimageError = ForgetPreimageError;
19279
- declare const index$4_ForgetPreimageError: typeof ForgetPreimageError;
19280
- declare const index$4_HostCallResult: typeof HostCallResult;
19281
- type index$4_InsufficientFundsError = InsufficientFundsError;
19282
- declare const index$4_MAX_U32: typeof MAX_U32;
19283
- declare const index$4_MAX_U32_BIG_INT: typeof MAX_U32_BIG_INT;
19284
- type index$4_MachineId = MachineId;
19285
- type index$4_MachineInstance = MachineInstance;
19286
- declare const index$4_MachineInstance: typeof MachineInstance;
19287
- type index$4_MachineResult = MachineResult;
19288
- type index$4_MachineStatus = MachineStatus;
19289
- type index$4_MemoryOperation = MemoryOperation;
19290
- declare const index$4_MemoryOperation: typeof MemoryOperation;
19291
- type index$4_NewServiceError = NewServiceError;
19292
- declare const index$4_NewServiceError: typeof NewServiceError;
19293
- type index$4_NoMachineError = NoMachineError;
19294
- type index$4_PagesError = PagesError;
19295
- declare const index$4_PagesError: typeof PagesError;
19296
- type index$4_PartialState = PartialState;
19297
- type index$4_PartiallyUpdatedState<T extends StateSlice = StateSlice> = PartiallyUpdatedState<T>;
19298
- declare const index$4_PartiallyUpdatedState: typeof PartiallyUpdatedState;
19299
- type index$4_PeekPokeError = PeekPokeError;
19300
- declare const index$4_PeekPokeError: typeof PeekPokeError;
19301
- type index$4_PendingTransfer = PendingTransfer;
19302
- declare const index$4_PendingTransfer: typeof PendingTransfer;
19303
- type index$4_PreimageStatus = PreimageStatus;
19304
- type index$4_PreimageStatusKind = PreimageStatusKind;
19305
- declare const index$4_PreimageStatusKind: typeof PreimageStatusKind;
19306
- type index$4_ProgramCounter = ProgramCounter;
19307
- type index$4_ProvidePreimageError = ProvidePreimageError;
19308
- declare const index$4_ProvidePreimageError: typeof ProvidePreimageError;
19309
- type index$4_RefineExternalities = RefineExternalities;
19310
- type index$4_RequestPreimageError = RequestPreimageError;
19311
- declare const index$4_RequestPreimageError: typeof RequestPreimageError;
19312
- declare const index$4_SERVICE_ID_BYTES: typeof SERVICE_ID_BYTES;
19313
- type index$4_SegmentExportError = SegmentExportError;
19314
- type index$4_ServiceStateUpdate = ServiceStateUpdate;
19315
- type index$4_StateSlice = StateSlice;
19316
- type index$4_TRANSFER_MEMO_BYTES = TRANSFER_MEMO_BYTES;
19317
- type index$4_TransferError = TransferError;
19318
- declare const index$4_TransferError: typeof TransferError;
19319
- type index$4_UnprivilegedError = UnprivilegedError;
19320
- type index$4_UpdatePrivilegesError = UpdatePrivilegesError;
19321
- declare const index$4_UpdatePrivilegesError: typeof UpdatePrivilegesError;
19322
- type index$4_ZeroVoidError = ZeroVoidError;
19323
- declare const index$4_ZeroVoidError: typeof ZeroVoidError;
19324
- declare const index$4_clampU64ToU32: typeof clampU64ToU32;
19325
- declare const index$4_deepCloneMapWithArray: typeof deepCloneMapWithArray;
19326
- declare const index$4_emptyRegistersBuffer: typeof emptyRegistersBuffer;
19327
- declare const index$4_getServiceId: typeof getServiceId;
19328
- declare const index$4_getServiceIdOrCurrent: typeof getServiceIdOrCurrent;
19329
- declare const index$4_preimageLenAsU32: typeof preimageLenAsU32;
19330
- declare const index$4_slotsToPreimageStatus: typeof slotsToPreimageStatus;
19331
- declare const index$4_toMemoryOperation: typeof toMemoryOperation;
19332
- declare const index$4_tryAsMachineId: typeof tryAsMachineId;
19333
- declare const index$4_tryAsProgramCounter: typeof tryAsProgramCounter;
19334
- declare const index$4_writeServiceIdAsLeBytes: typeof writeServiceIdAsLeBytes;
19335
- declare namespace index$4 {
19336
- export { index$4_AccumulationStateUpdate as AccumulationStateUpdate, index$4_CURRENT_SERVICE_ID as CURRENT_SERVICE_ID, index$4_EjectError as EjectError, index$4_ForgetPreimageError as ForgetPreimageError, index$4_HostCallResult as HostCallResult, index$4_MAX_U32 as MAX_U32, index$4_MAX_U32_BIG_INT as MAX_U32_BIG_INT, index$4_MachineInstance as MachineInstance, index$4_MemoryOperation as MemoryOperation, index$4_NewServiceError as NewServiceError, index$4_PagesError as PagesError, index$4_PartiallyUpdatedState as PartiallyUpdatedState, index$4_PeekPokeError as PeekPokeError, index$4_PendingTransfer as PendingTransfer, index$4_PreimageStatusKind as PreimageStatusKind, index$4_ProvidePreimageError as ProvidePreimageError, index$4_RequestPreimageError as RequestPreimageError, index$4_SERVICE_ID_BYTES as SERVICE_ID_BYTES, index$4_TransferError as TransferError, index$4_UpdatePrivilegesError as UpdatePrivilegesError, index$4_ZeroVoidError as ZeroVoidError, index$4_clampU64ToU32 as clampU64ToU32, index$4_deepCloneMapWithArray as deepCloneMapWithArray, index$4_emptyRegistersBuffer as emptyRegistersBuffer, index$4_getServiceId as getServiceId, index$4_getServiceIdOrCurrent as getServiceIdOrCurrent, index$4_preimageLenAsU32 as preimageLenAsU32, index$4_slotsToPreimageStatus as slotsToPreimageStatus, index$4_toMemoryOperation as toMemoryOperation, index$4_tryAsMachineId as tryAsMachineId, index$4_tryAsProgramCounter as tryAsProgramCounter, index$4_writeServiceIdAsLeBytes as writeServiceIdAsLeBytes };
19337
- export type { index$4_InsufficientFundsError as InsufficientFundsError, index$4_MachineId as MachineId, index$4_MachineResult as MachineResult, index$4_MachineStatus as MachineStatus, index$4_NoMachineError as NoMachineError, index$4_PartialState as PartialState, index$4_PreimageStatus as PreimageStatus, index$4_ProgramCounter as ProgramCounter, index$4_RefineExternalities as RefineExternalities, index$4_SegmentExportError as SegmentExportError, index$4_ServiceStateUpdate as ServiceStateUpdate, index$4_StateSlice as StateSlice, index$4_TRANSFER_MEMO_BYTES as TRANSFER_MEMO_BYTES, index$4_UnprivilegedError as UnprivilegedError };
19408
+ /**
19409
+ * Service account details with threshold balance.
19410
+ *
19411
+ * Used exclusively by `info` host call.
19412
+ *
19413
+ * https://graypaper.fluffylabs.dev/#/ab2cdbd/33920033b500?v=0.7.2
19414
+ */
19415
+ declare const codecServiceAccountInfoWithThresholdBalance = codec.object(
19416
+ {
19417
+ codeHash: codec.bytes(HASH_SIZE),
19418
+ balance: codec.u64,
19419
+ thresholdBalance: codec.u64,
19420
+ accumulateMinGas: codec.u64.convert((i) => i, tryAsServiceGas),
19421
+ onTransferMinGas: codec.u64.convert((i) => i, tryAsServiceGas),
19422
+ storageUtilisationBytes: codec.u64,
19423
+ storageUtilisationCount: codec.u32,
19424
+ gratisStorage: codec.u64,
19425
+ created: codec.u32.convert((x) => x, tryAsTimeSlot),
19426
+ lastAccumulation: codec.u32.convert((x) => x, tryAsTimeSlot),
19427
+ parentService: codec.u32.convert((x) => x, tryAsServiceId),
19428
+ },
19429
+ "ServiceAccountInfoWithThresholdBalance",
19430
+ );
19431
+
19432
+ type index$5_AccumulationStateUpdate = AccumulationStateUpdate;
19433
+ declare const index$5_AccumulationStateUpdate: typeof AccumulationStateUpdate;
19434
+ declare const index$5_CURRENT_SERVICE_ID: typeof CURRENT_SERVICE_ID;
19435
+ type index$5_EjectError = EjectError;
19436
+ declare const index$5_EjectError: typeof EjectError;
19437
+ type index$5_ForgetPreimageError = ForgetPreimageError;
19438
+ declare const index$5_ForgetPreimageError: typeof ForgetPreimageError;
19439
+ declare const index$5_HostCallResult: typeof HostCallResult;
19440
+ type index$5_InsufficientFundsError = InsufficientFundsError;
19441
+ declare const index$5_MAX_U32: typeof MAX_U32;
19442
+ declare const index$5_MAX_U32_BIG_INT: typeof MAX_U32_BIG_INT;
19443
+ type index$5_MachineId = MachineId;
19444
+ type index$5_MachineInstance = MachineInstance;
19445
+ declare const index$5_MachineInstance: typeof MachineInstance;
19446
+ type index$5_MachineResult = MachineResult;
19447
+ type index$5_MachineStatus = MachineStatus;
19448
+ type index$5_MemoryOperation = MemoryOperation;
19449
+ declare const index$5_MemoryOperation: typeof MemoryOperation;
19450
+ type index$5_NewServiceError = NewServiceError;
19451
+ declare const index$5_NewServiceError: typeof NewServiceError;
19452
+ type index$5_NoMachineError = NoMachineError;
19453
+ type index$5_PagesError = PagesError;
19454
+ declare const index$5_PagesError: typeof PagesError;
19455
+ type index$5_PartialState = PartialState;
19456
+ type index$5_PartiallyUpdatedState<T extends StateSlice = StateSlice> = PartiallyUpdatedState<T>;
19457
+ declare const index$5_PartiallyUpdatedState: typeof PartiallyUpdatedState;
19458
+ type index$5_PeekPokeError = PeekPokeError;
19459
+ declare const index$5_PeekPokeError: typeof PeekPokeError;
19460
+ type index$5_PendingTransfer = PendingTransfer;
19461
+ declare const index$5_PendingTransfer: typeof PendingTransfer;
19462
+ type index$5_PreimageStatus = PreimageStatus;
19463
+ type index$5_PreimageStatusKind = PreimageStatusKind;
19464
+ declare const index$5_PreimageStatusKind: typeof PreimageStatusKind;
19465
+ type index$5_ProgramCounter = ProgramCounter;
19466
+ type index$5_ProvidePreimageError = ProvidePreimageError;
19467
+ declare const index$5_ProvidePreimageError: typeof ProvidePreimageError;
19468
+ type index$5_RefineExternalities = RefineExternalities;
19469
+ type index$5_RequestPreimageError = RequestPreimageError;
19470
+ declare const index$5_RequestPreimageError: typeof RequestPreimageError;
19471
+ declare const index$5_SERVICE_ID_BYTES: typeof SERVICE_ID_BYTES;
19472
+ type index$5_SegmentExportError = SegmentExportError;
19473
+ type index$5_ServiceStateUpdate = ServiceStateUpdate;
19474
+ type index$5_StateSlice = StateSlice;
19475
+ type index$5_TRANSFER_MEMO_BYTES = TRANSFER_MEMO_BYTES;
19476
+ type index$5_TransferError = TransferError;
19477
+ declare const index$5_TransferError: typeof TransferError;
19478
+ type index$5_UnprivilegedError = UnprivilegedError;
19479
+ type index$5_UpdatePrivilegesError = UpdatePrivilegesError;
19480
+ declare const index$5_UpdatePrivilegesError: typeof UpdatePrivilegesError;
19481
+ type index$5_ZeroVoidError = ZeroVoidError;
19482
+ declare const index$5_ZeroVoidError: typeof ZeroVoidError;
19483
+ declare const index$5_clampU64ToU32: typeof clampU64ToU32;
19484
+ declare const index$5_deepCloneMapWithArray: typeof deepCloneMapWithArray;
19485
+ declare const index$5_emptyRegistersBuffer: typeof emptyRegistersBuffer;
19486
+ declare const index$5_getServiceId: typeof getServiceId;
19487
+ declare const index$5_getServiceIdOrCurrent: typeof getServiceIdOrCurrent;
19488
+ declare const index$5_preimageLenAsU32: typeof preimageLenAsU32;
19489
+ declare const index$5_slotsToPreimageStatus: typeof slotsToPreimageStatus;
19490
+ declare const index$5_toMemoryOperation: typeof toMemoryOperation;
19491
+ declare const index$5_tryAsMachineId: typeof tryAsMachineId;
19492
+ declare const index$5_tryAsProgramCounter: typeof tryAsProgramCounter;
19493
+ declare const index$5_writeServiceIdAsLeBytes: typeof writeServiceIdAsLeBytes;
19494
+ declare namespace index$5 {
19495
+ export { index$5_AccumulationStateUpdate as AccumulationStateUpdate, index$5_CURRENT_SERVICE_ID as CURRENT_SERVICE_ID, index$5_EjectError as EjectError, index$5_ForgetPreimageError as ForgetPreimageError, index$5_HostCallResult as HostCallResult, index$5_MAX_U32 as MAX_U32, index$5_MAX_U32_BIG_INT as MAX_U32_BIG_INT, index$5_MachineInstance as MachineInstance, index$5_MemoryOperation as MemoryOperation, index$5_NewServiceError as NewServiceError, index$5_PagesError as PagesError, index$5_PartiallyUpdatedState as PartiallyUpdatedState, index$5_PeekPokeError as PeekPokeError, index$5_PendingTransfer as PendingTransfer, index$5_PreimageStatusKind as PreimageStatusKind, index$5_ProvidePreimageError as ProvidePreimageError, index$5_RequestPreimageError as RequestPreimageError, index$5_SERVICE_ID_BYTES as SERVICE_ID_BYTES, index$5_TransferError as TransferError, index$5_UpdatePrivilegesError as UpdatePrivilegesError, index$5_ZeroVoidError as ZeroVoidError, index$5_clampU64ToU32 as clampU64ToU32, index$5_deepCloneMapWithArray as deepCloneMapWithArray, index$5_emptyRegistersBuffer as emptyRegistersBuffer, index$5_getServiceId as getServiceId, index$5_getServiceIdOrCurrent as getServiceIdOrCurrent, codecServiceAccountInfoWithThresholdBalance as hostCallInfoAccount, index$5_preimageLenAsU32 as preimageLenAsU32, index$5_slotsToPreimageStatus as slotsToPreimageStatus, index$5_toMemoryOperation as toMemoryOperation, index$5_tryAsMachineId as tryAsMachineId, index$5_tryAsProgramCounter as tryAsProgramCounter, index$5_writeServiceIdAsLeBytes as writeServiceIdAsLeBytes };
19496
+ export type { index$5_InsufficientFundsError as InsufficientFundsError, index$5_MachineId as MachineId, index$5_MachineResult as MachineResult, index$5_MachineStatus as MachineStatus, index$5_NoMachineError as NoMachineError, index$5_PartialState as PartialState, index$5_PreimageStatus as PreimageStatus, index$5_ProgramCounter as ProgramCounter, index$5_RefineExternalities as RefineExternalities, index$5_SegmentExportError as SegmentExportError, index$5_ServiceStateUpdate as ServiceStateUpdate, index$5_StateSlice as StateSlice, index$5_TRANSFER_MEMO_BYTES as TRANSFER_MEMO_BYTES, index$5_UnprivilegedError as UnprivilegedError };
19338
19497
  }
19339
19498
 
19340
19499
  declare class DebuggerAdapter {
@@ -19344,11 +19503,6 @@ declare class DebuggerAdapter {
19344
19503
  this.pvm = new Interpreter({ useSbrkGas });
19345
19504
  }
19346
19505
 
19347
- // TODO [MaSi]: a temporary solution that is needed to implement host calls in PVM debugger
19348
- getInterpreter() {
19349
- return this.pvm;
19350
- }
19351
-
19352
19506
  resetGeneric(rawProgram: Uint8Array, flatRegisters: Uint8Array, initialGas: bigint) {
19353
19507
  this.pvm.resetGeneric(rawProgram, 0, tryAsGas(initialGas), new Registers(flatRegisters));
19354
19508
  }
@@ -19428,132 +19582,133 @@ declare class DebuggerAdapter {
19428
19582
  }
19429
19583
  }
19430
19584
 
19431
- type index$3_AccumulationStateUpdate = AccumulationStateUpdate;
19432
- declare const index$3_AccumulationStateUpdate: typeof AccumulationStateUpdate;
19433
- type index$3_Args = Args;
19434
- type index$3_ArgsDecoder = ArgsDecoder;
19435
- declare const index$3_ArgsDecoder: typeof ArgsDecoder;
19436
- type index$3_ArgumentType = ArgumentType;
19437
- declare const index$3_ArgumentType: typeof ArgumentType;
19438
- type index$3_BasicBlocks = BasicBlocks;
19439
- declare const index$3_BasicBlocks: typeof BasicBlocks;
19440
- declare const index$3_CURRENT_SERVICE_ID: typeof CURRENT_SERVICE_ID;
19441
- type index$3_EjectError = EjectError;
19442
- declare const index$3_EjectError: typeof EjectError;
19443
- type index$3_EnumMapping = EnumMapping;
19444
- type index$3_ErrorResult<Error> = ErrorResult<Error>;
19445
- type index$3_ExtendedWitdthImmediateDecoder = ExtendedWitdthImmediateDecoder;
19446
- declare const index$3_ExtendedWitdthImmediateDecoder: typeof ExtendedWitdthImmediateDecoder;
19447
- type index$3_ForgetPreimageError = ForgetPreimageError;
19448
- declare const index$3_ForgetPreimageError: typeof ForgetPreimageError;
19449
- type index$3_HostCallMemory = HostCallMemory;
19450
- declare const index$3_HostCallMemory: typeof HostCallMemory;
19451
- type index$3_HostCallRegisters = HostCallRegisters;
19452
- declare const index$3_HostCallRegisters: typeof HostCallRegisters;
19453
- declare const index$3_HostCallResult: typeof HostCallResult;
19454
- type index$3_ImmediateDecoder = ImmediateDecoder;
19455
- declare const index$3_ImmediateDecoder: typeof ImmediateDecoder;
19456
- type index$3_InsufficientFundsError = InsufficientFundsError;
19457
- declare const index$3_MAX_U32: typeof MAX_U32;
19458
- declare const index$3_MAX_U32_BIG_INT: typeof MAX_U32_BIG_INT;
19459
- type index$3_MachineId = MachineId;
19460
- type index$3_MachineInstance = MachineInstance;
19461
- declare const index$3_MachineInstance: typeof MachineInstance;
19462
- type index$3_MachineResult = MachineResult;
19463
- type index$3_MachineStatus = MachineStatus;
19464
- type index$3_Mask = Mask;
19465
- declare const index$3_Mask: typeof Mask;
19466
- type index$3_MemoryOperation = MemoryOperation;
19467
- declare const index$3_MemoryOperation: typeof MemoryOperation;
19468
- type index$3_MemorySegment = MemorySegment;
19469
- declare const index$3_MemorySegment: typeof MemorySegment;
19470
- type index$3_NewServiceError = NewServiceError;
19471
- declare const index$3_NewServiceError: typeof NewServiceError;
19472
- type index$3_NibblesDecoder = NibblesDecoder;
19473
- declare const index$3_NibblesDecoder: typeof NibblesDecoder;
19474
- type index$3_NoMachineError = NoMachineError;
19475
- type index$3_OK = OK;
19476
- type index$3_OkResult<Ok> = OkResult<Ok>;
19477
- type index$3_Opaque<Type, Token extends string> = Opaque<Type, Token>;
19478
- type index$3_PagesError = PagesError;
19479
- declare const index$3_PagesError: typeof PagesError;
19480
- type index$3_PartialState = PartialState;
19481
- type index$3_PartiallyUpdatedState<T extends StateSlice = StateSlice> = PartiallyUpdatedState<T>;
19482
- declare const index$3_PartiallyUpdatedState: typeof PartiallyUpdatedState;
19483
- type index$3_PeekPokeError = PeekPokeError;
19484
- declare const index$3_PeekPokeError: typeof PeekPokeError;
19485
- type index$3_PendingTransfer = PendingTransfer;
19486
- declare const index$3_PendingTransfer: typeof PendingTransfer;
19487
- type index$3_PreimageStatus = PreimageStatus;
19488
- type index$3_PreimageStatusKind = PreimageStatusKind;
19489
- declare const index$3_PreimageStatusKind: typeof PreimageStatusKind;
19490
- type index$3_Program = Program;
19491
- declare const index$3_Program: typeof Program;
19492
- type index$3_ProgramCounter = ProgramCounter;
19493
- type index$3_ProgramDecoder = ProgramDecoder;
19494
- declare const index$3_ProgramDecoder: typeof ProgramDecoder;
19495
- type index$3_ProvidePreimageError = ProvidePreimageError;
19496
- declare const index$3_ProvidePreimageError: typeof ProvidePreimageError;
19497
- type index$3_RefineExternalities = RefineExternalities;
19498
- type index$3_Registers = Registers;
19499
- declare const index$3_Registers: typeof Registers;
19500
- type index$3_RequestPreimageError = RequestPreimageError;
19501
- declare const index$3_RequestPreimageError: typeof RequestPreimageError;
19502
- type index$3_RichTaggedError<Kind extends string | number, Nested> = RichTaggedError<Kind, Nested>;
19503
- declare const index$3_RichTaggedError: typeof RichTaggedError;
19504
- declare const index$3_SERVICE_ID_BYTES: typeof SERVICE_ID_BYTES;
19505
- type index$3_SegmentExportError = SegmentExportError;
19506
- type index$3_ServiceStateUpdate = ServiceStateUpdate;
19507
- type index$3_SpiMemory = SpiMemory;
19508
- declare const index$3_SpiMemory: typeof SpiMemory;
19509
- type index$3_SpiProgram = SpiProgram;
19510
- declare const index$3_SpiProgram: typeof SpiProgram;
19511
- type index$3_StateSlice = StateSlice;
19512
- type index$3_StringLiteral<Type> = StringLiteral<Type>;
19513
- type index$3_TRANSFER_MEMO_BYTES = TRANSFER_MEMO_BYTES;
19514
- type index$3_TaggedError<Kind, Nested> = TaggedError<Kind, Nested>;
19515
- type index$3_TokenOf<OpaqueType, Type> = TokenOf<OpaqueType, Type>;
19516
- type index$3_TransferError = TransferError;
19517
- declare const index$3_TransferError: typeof TransferError;
19518
- type index$3_Uninstantiable = Uninstantiable;
19519
- type index$3_UnprivilegedError = UnprivilegedError;
19520
- type index$3_UpdatePrivilegesError = UpdatePrivilegesError;
19521
- declare const index$3_UpdatePrivilegesError: typeof UpdatePrivilegesError;
19522
- type index$3_WithDebug = WithDebug;
19523
- declare const index$3_WithDebug: typeof WithDebug;
19524
- type index$3_WithOpaque<Token extends string> = WithOpaque<Token>;
19525
- type index$3_ZeroVoidError = ZeroVoidError;
19526
- declare const index$3_ZeroVoidError: typeof ZeroVoidError;
19527
- declare const index$3___OPAQUE_TYPE__: typeof __OPAQUE_TYPE__;
19528
- declare const index$3_asOpaqueType: typeof asOpaqueType;
19529
- declare const index$3_assertEmpty: typeof assertEmpty;
19530
- declare const index$3_assertNever: typeof assertNever;
19531
- declare const index$3_check: typeof check;
19532
- declare const index$3_clampU64ToU32: typeof clampU64ToU32;
19533
- declare const index$3_createResults: typeof createResults;
19534
- declare const index$3_decodeStandardProgram: typeof decodeStandardProgram;
19535
- declare const index$3_deepCloneMapWithArray: typeof deepCloneMapWithArray;
19536
- declare const index$3_emptyRegistersBuffer: typeof emptyRegistersBuffer;
19537
- declare const index$3_extractCodeAndMetadata: typeof extractCodeAndMetadata;
19538
- declare const index$3_getServiceId: typeof getServiceId;
19539
- declare const index$3_getServiceIdOrCurrent: typeof getServiceIdOrCurrent;
19540
- declare const index$3_inspect: typeof inspect;
19541
- declare const index$3_instructionArgumentTypeMap: typeof instructionArgumentTypeMap;
19542
- declare const index$3_isBrowser: typeof isBrowser;
19543
- declare const index$3_isTaggedError: typeof isTaggedError;
19544
- declare const index$3_maybeTaggedErrorToString: typeof maybeTaggedErrorToString;
19545
- declare const index$3_measure: typeof measure;
19546
- declare const index$3_preimageLenAsU32: typeof preimageLenAsU32;
19547
- declare const index$3_resultToString: typeof resultToString;
19548
- declare const index$3_seeThrough: typeof seeThrough;
19549
- declare const index$3_slotsToPreimageStatus: typeof slotsToPreimageStatus;
19550
- declare const index$3_toMemoryOperation: typeof toMemoryOperation;
19551
- declare const index$3_tryAsMachineId: typeof tryAsMachineId;
19552
- declare const index$3_tryAsProgramCounter: typeof tryAsProgramCounter;
19553
- declare const index$3_writeServiceIdAsLeBytes: typeof writeServiceIdAsLeBytes;
19554
- declare namespace index$3 {
19555
- export { index$3_AccumulationStateUpdate as AccumulationStateUpdate, index$3_ArgsDecoder as ArgsDecoder, index$3_ArgumentType as ArgumentType, index$3_BasicBlocks as BasicBlocks, index$3_CURRENT_SERVICE_ID as CURRENT_SERVICE_ID, index$3_EjectError as EjectError, index$3_ExtendedWitdthImmediateDecoder as ExtendedWitdthImmediateDecoder, index$3_ForgetPreimageError as ForgetPreimageError, index$3_HostCallMemory as HostCallMemory, index$3_HostCallRegisters as HostCallRegisters, index$3_HostCallResult as HostCallResult, index$3_ImmediateDecoder as ImmediateDecoder, index$3_MAX_U32 as MAX_U32, index$3_MAX_U32_BIG_INT as MAX_U32_BIG_INT, index$3_MachineInstance as MachineInstance, index$3_Mask as Mask, index$3_MemoryOperation as MemoryOperation, index$3_MemorySegment as MemorySegment, NO_OF_REGISTERS$1 as NO_OF_REGISTERS, index$3_NewServiceError as NewServiceError, index$3_NibblesDecoder as NibblesDecoder, index$3_PagesError as PagesError, index$3_PartiallyUpdatedState as PartiallyUpdatedState, index$3_PeekPokeError as PeekPokeError, index$3_PendingTransfer as PendingTransfer, index$3_PreimageStatusKind as PreimageStatusKind, index$3_Program as Program, index$3_ProgramDecoder as ProgramDecoder, index$3_ProvidePreimageError as ProvidePreimageError, DebuggerAdapter as Pvm, index$3_Registers as Registers, index$3_RequestPreimageError as RequestPreimageError, Result$2 as Result, index$3_RichTaggedError as RichTaggedError, index$3_SERVICE_ID_BYTES as SERVICE_ID_BYTES, index$3_SpiMemory as SpiMemory, index$3_SpiProgram as SpiProgram, index$3_TransferError as TransferError, index$3_UpdatePrivilegesError as UpdatePrivilegesError, index$3_WithDebug as WithDebug, index$3_ZeroVoidError as ZeroVoidError, index$3___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$3_asOpaqueType as asOpaqueType, index$3_assertEmpty as assertEmpty, index$3_assertNever as assertNever, index$l as block, index$s as bytes, index$3_check as check, index$3_clampU64ToU32 as clampU64ToU32, index$3_createResults as createResults, index$3_decodeStandardProgram as decodeStandardProgram, index$3_deepCloneMapWithArray as deepCloneMapWithArray, index$3_emptyRegistersBuffer as emptyRegistersBuffer, index$3_extractCodeAndMetadata as extractCodeAndMetadata, index$3_getServiceId as getServiceId, index$3_getServiceIdOrCurrent as getServiceIdOrCurrent, index$p as hash, index$3_inspect as inspect, index$3_instructionArgumentTypeMap as instructionArgumentTypeMap, index$6 as interpreter, index$3_isBrowser as isBrowser, index$3_isTaggedError as isTaggedError, index$3_maybeTaggedErrorToString as maybeTaggedErrorToString, index$3_measure as measure, index$r as numbers, index$3_preimageLenAsU32 as preimageLenAsU32, index$3_resultToString as resultToString, index$3_seeThrough as seeThrough, index$3_slotsToPreimageStatus as slotsToPreimageStatus, index$3_toMemoryOperation as toMemoryOperation, index$3_tryAsMachineId as tryAsMachineId, index$3_tryAsProgramCounter as tryAsProgramCounter, index$3_writeServiceIdAsLeBytes as writeServiceIdAsLeBytes };
19556
- export type { index$3_Args as Args, index$3_EnumMapping as EnumMapping, index$3_ErrorResult as ErrorResult, index$3_InsufficientFundsError as InsufficientFundsError, index$3_MachineId as MachineId, index$3_MachineResult as MachineResult, index$3_MachineStatus as MachineStatus, index$3_NoMachineError as NoMachineError, index$3_OK as OK, index$3_OkResult as OkResult, index$3_Opaque as Opaque, index$3_PartialState as PartialState, index$3_PreimageStatus as PreimageStatus, index$3_ProgramCounter as ProgramCounter, index$3_RefineExternalities as RefineExternalities, index$3_SegmentExportError as SegmentExportError, index$3_ServiceStateUpdate as ServiceStateUpdate, index$3_StateSlice as StateSlice, index$3_StringLiteral as StringLiteral, index$3_TRANSFER_MEMO_BYTES as TRANSFER_MEMO_BYTES, index$3_TaggedError as TaggedError, index$3_TokenOf as TokenOf, index$3_Uninstantiable as Uninstantiable, index$3_UnprivilegedError as UnprivilegedError, index$3_WithOpaque as WithOpaque };
19585
+ type index$4_AccumulationStateUpdate = AccumulationStateUpdate;
19586
+ declare const index$4_AccumulationStateUpdate: typeof AccumulationStateUpdate;
19587
+ type index$4_Args = Args;
19588
+ type index$4_ArgsDecoder = ArgsDecoder;
19589
+ declare const index$4_ArgsDecoder: typeof ArgsDecoder;
19590
+ type index$4_ArgumentType = ArgumentType;
19591
+ declare const index$4_ArgumentType: typeof ArgumentType;
19592
+ type index$4_BasicBlocks = BasicBlocks;
19593
+ declare const index$4_BasicBlocks: typeof BasicBlocks;
19594
+ declare const index$4_CURRENT_SERVICE_ID: typeof CURRENT_SERVICE_ID;
19595
+ type index$4_EjectError = EjectError;
19596
+ declare const index$4_EjectError: typeof EjectError;
19597
+ type index$4_EnumMapping = EnumMapping;
19598
+ type index$4_ErrorResult<Error> = ErrorResult<Error>;
19599
+ type index$4_ExtendedWitdthImmediateDecoder = ExtendedWitdthImmediateDecoder;
19600
+ declare const index$4_ExtendedWitdthImmediateDecoder: typeof ExtendedWitdthImmediateDecoder;
19601
+ type index$4_ForgetPreimageError = ForgetPreimageError;
19602
+ declare const index$4_ForgetPreimageError: typeof ForgetPreimageError;
19603
+ type index$4_HostCallMemory = HostCallMemory;
19604
+ declare const index$4_HostCallMemory: typeof HostCallMemory;
19605
+ type index$4_HostCallRegisters = HostCallRegisters;
19606
+ declare const index$4_HostCallRegisters: typeof HostCallRegisters;
19607
+ declare const index$4_HostCallResult: typeof HostCallResult;
19608
+ type index$4_ImmediateDecoder = ImmediateDecoder;
19609
+ declare const index$4_ImmediateDecoder: typeof ImmediateDecoder;
19610
+ type index$4_InsufficientFundsError = InsufficientFundsError;
19611
+ declare const index$4_MAX_U32: typeof MAX_U32;
19612
+ declare const index$4_MAX_U32_BIG_INT: typeof MAX_U32_BIG_INT;
19613
+ type index$4_MachineId = MachineId;
19614
+ type index$4_MachineInstance = MachineInstance;
19615
+ declare const index$4_MachineInstance: typeof MachineInstance;
19616
+ type index$4_MachineResult = MachineResult;
19617
+ type index$4_MachineStatus = MachineStatus;
19618
+ type index$4_Mask = Mask;
19619
+ declare const index$4_Mask: typeof Mask;
19620
+ type index$4_MemoryOperation = MemoryOperation;
19621
+ declare const index$4_MemoryOperation: typeof MemoryOperation;
19622
+ type index$4_MemorySegment = MemorySegment;
19623
+ declare const index$4_MemorySegment: typeof MemorySegment;
19624
+ type index$4_NewServiceError = NewServiceError;
19625
+ declare const index$4_NewServiceError: typeof NewServiceError;
19626
+ type index$4_NibblesDecoder = NibblesDecoder;
19627
+ declare const index$4_NibblesDecoder: typeof NibblesDecoder;
19628
+ type index$4_NoMachineError = NoMachineError;
19629
+ type index$4_OK = OK;
19630
+ type index$4_OkResult<Ok> = OkResult<Ok>;
19631
+ type index$4_Opaque<Type, Token extends string> = Opaque<Type, Token>;
19632
+ type index$4_PagesError = PagesError;
19633
+ declare const index$4_PagesError: typeof PagesError;
19634
+ type index$4_PartialState = PartialState;
19635
+ type index$4_PartiallyUpdatedState<T extends StateSlice = StateSlice> = PartiallyUpdatedState<T>;
19636
+ declare const index$4_PartiallyUpdatedState: typeof PartiallyUpdatedState;
19637
+ type index$4_PeekPokeError = PeekPokeError;
19638
+ declare const index$4_PeekPokeError: typeof PeekPokeError;
19639
+ type index$4_PendingTransfer = PendingTransfer;
19640
+ declare const index$4_PendingTransfer: typeof PendingTransfer;
19641
+ type index$4_PreimageStatus = PreimageStatus;
19642
+ type index$4_PreimageStatusKind = PreimageStatusKind;
19643
+ declare const index$4_PreimageStatusKind: typeof PreimageStatusKind;
19644
+ type index$4_Program = Program;
19645
+ declare const index$4_Program: typeof Program;
19646
+ type index$4_ProgramCounter = ProgramCounter;
19647
+ type index$4_ProgramDecoder = ProgramDecoder;
19648
+ declare const index$4_ProgramDecoder: typeof ProgramDecoder;
19649
+ type index$4_ProvidePreimageError = ProvidePreimageError;
19650
+ declare const index$4_ProvidePreimageError: typeof ProvidePreimageError;
19651
+ type index$4_RefineExternalities = RefineExternalities;
19652
+ type index$4_Registers = Registers;
19653
+ declare const index$4_Registers: typeof Registers;
19654
+ type index$4_RequestPreimageError = RequestPreimageError;
19655
+ declare const index$4_RequestPreimageError: typeof RequestPreimageError;
19656
+ type index$4_RichTaggedError<Kind extends string | number, Nested> = RichTaggedError<Kind, Nested>;
19657
+ declare const index$4_RichTaggedError: typeof RichTaggedError;
19658
+ declare const index$4_SERVICE_ID_BYTES: typeof SERVICE_ID_BYTES;
19659
+ type index$4_SegmentExportError = SegmentExportError;
19660
+ type index$4_ServiceStateUpdate = ServiceStateUpdate;
19661
+ type index$4_SpiMemory = SpiMemory;
19662
+ declare const index$4_SpiMemory: typeof SpiMemory;
19663
+ type index$4_SpiProgram = SpiProgram;
19664
+ declare const index$4_SpiProgram: typeof SpiProgram;
19665
+ type index$4_StateSlice = StateSlice;
19666
+ type index$4_StringLiteral<Type> = StringLiteral<Type>;
19667
+ type index$4_TRANSFER_MEMO_BYTES = TRANSFER_MEMO_BYTES;
19668
+ type index$4_TaggedError<Kind, Nested> = TaggedError<Kind, Nested>;
19669
+ type index$4_TokenOf<OpaqueType, Type> = TokenOf<OpaqueType, Type>;
19670
+ type index$4_TransferError = TransferError;
19671
+ declare const index$4_TransferError: typeof TransferError;
19672
+ type index$4_Uninstantiable = Uninstantiable;
19673
+ type index$4_UnprivilegedError = UnprivilegedError;
19674
+ type index$4_UpdatePrivilegesError = UpdatePrivilegesError;
19675
+ declare const index$4_UpdatePrivilegesError: typeof UpdatePrivilegesError;
19676
+ type index$4_WithDebug = WithDebug;
19677
+ declare const index$4_WithDebug: typeof WithDebug;
19678
+ type index$4_WithOpaque<Token extends string> = WithOpaque<Token>;
19679
+ type index$4_ZeroVoidError = ZeroVoidError;
19680
+ declare const index$4_ZeroVoidError: typeof ZeroVoidError;
19681
+ declare const index$4___OPAQUE_TYPE__: typeof __OPAQUE_TYPE__;
19682
+ declare const index$4_asOpaqueType: typeof asOpaqueType;
19683
+ declare const index$4_assertEmpty: typeof assertEmpty;
19684
+ declare const index$4_assertNever: typeof assertNever;
19685
+ declare const index$4_check: typeof check;
19686
+ declare const index$4_clampU64ToU32: typeof clampU64ToU32;
19687
+ declare const index$4_createResults: typeof createResults;
19688
+ declare const index$4_decodeStandardProgram: typeof decodeStandardProgram;
19689
+ declare const index$4_deepCloneMapWithArray: typeof deepCloneMapWithArray;
19690
+ declare const index$4_emptyRegistersBuffer: typeof emptyRegistersBuffer;
19691
+ declare const index$4_extractCodeAndMetadata: typeof extractCodeAndMetadata;
19692
+ declare const index$4_getServiceId: typeof getServiceId;
19693
+ declare const index$4_getServiceIdOrCurrent: typeof getServiceIdOrCurrent;
19694
+ declare const index$4_inspect: typeof inspect;
19695
+ declare const index$4_instructionArgumentTypeMap: typeof instructionArgumentTypeMap;
19696
+ declare const index$4_isBrowser: typeof isBrowser;
19697
+ declare const index$4_isTaggedError: typeof isTaggedError;
19698
+ declare const index$4_lazyInspect: typeof lazyInspect;
19699
+ declare const index$4_maybeTaggedErrorToString: typeof maybeTaggedErrorToString;
19700
+ declare const index$4_measure: typeof measure;
19701
+ declare const index$4_preimageLenAsU32: typeof preimageLenAsU32;
19702
+ declare const index$4_resultToString: typeof resultToString;
19703
+ declare const index$4_seeThrough: typeof seeThrough;
19704
+ declare const index$4_slotsToPreimageStatus: typeof slotsToPreimageStatus;
19705
+ declare const index$4_toMemoryOperation: typeof toMemoryOperation;
19706
+ declare const index$4_tryAsMachineId: typeof tryAsMachineId;
19707
+ declare const index$4_tryAsProgramCounter: typeof tryAsProgramCounter;
19708
+ declare const index$4_writeServiceIdAsLeBytes: typeof writeServiceIdAsLeBytes;
19709
+ declare namespace index$4 {
19710
+ export { index$4_AccumulationStateUpdate as AccumulationStateUpdate, index$4_ArgsDecoder as ArgsDecoder, index$4_ArgumentType as ArgumentType, index$4_BasicBlocks as BasicBlocks, index$4_CURRENT_SERVICE_ID as CURRENT_SERVICE_ID, index$4_EjectError as EjectError, index$4_ExtendedWitdthImmediateDecoder as ExtendedWitdthImmediateDecoder, index$4_ForgetPreimageError as ForgetPreimageError, index$4_HostCallMemory as HostCallMemory, index$4_HostCallRegisters as HostCallRegisters, index$4_HostCallResult as HostCallResult, index$4_ImmediateDecoder as ImmediateDecoder, index$4_MAX_U32 as MAX_U32, index$4_MAX_U32_BIG_INT as MAX_U32_BIG_INT, index$4_MachineInstance as MachineInstance, index$4_Mask as Mask, index$4_MemoryOperation as MemoryOperation, index$4_MemorySegment as MemorySegment, NO_OF_REGISTERS$1 as NO_OF_REGISTERS, index$4_NewServiceError as NewServiceError, index$4_NibblesDecoder as NibblesDecoder, index$4_PagesError as PagesError, index$4_PartiallyUpdatedState as PartiallyUpdatedState, index$4_PeekPokeError as PeekPokeError, index$4_PendingTransfer as PendingTransfer, index$4_PreimageStatusKind as PreimageStatusKind, index$4_Program as Program, index$4_ProgramDecoder as ProgramDecoder, index$4_ProvidePreimageError as ProvidePreimageError, DebuggerAdapter as Pvm, index$4_Registers as Registers, index$4_RequestPreimageError as RequestPreimageError, Result$2 as Result, index$4_RichTaggedError as RichTaggedError, index$4_SERVICE_ID_BYTES as SERVICE_ID_BYTES, index$4_SpiMemory as SpiMemory, index$4_SpiProgram as SpiProgram, index$4_TransferError as TransferError, index$4_UpdatePrivilegesError as UpdatePrivilegesError, index$4_WithDebug as WithDebug, index$4_ZeroVoidError as ZeroVoidError, index$4___OPAQUE_TYPE__ as __OPAQUE_TYPE__, index$4_asOpaqueType as asOpaqueType, index$4_assertEmpty as assertEmpty, index$4_assertNever as assertNever, index$m as block, index$t as bytes, index$4_check as check, index$4_clampU64ToU32 as clampU64ToU32, index$4_createResults as createResults, index$4_decodeStandardProgram as decodeStandardProgram, index$4_deepCloneMapWithArray as deepCloneMapWithArray, index$4_emptyRegistersBuffer as emptyRegistersBuffer, index$4_extractCodeAndMetadata as extractCodeAndMetadata, index$4_getServiceId as getServiceId, index$4_getServiceIdOrCurrent as getServiceIdOrCurrent, index$q as hash, codecServiceAccountInfoWithThresholdBalance as hostCallInfoAccount, index$4_inspect as inspect, index$4_instructionArgumentTypeMap as instructionArgumentTypeMap, index$7 as interpreter, index$4_isBrowser as isBrowser, index$4_isTaggedError as isTaggedError, index$4_lazyInspect as lazyInspect, index$4_maybeTaggedErrorToString as maybeTaggedErrorToString, index$4_measure as measure, index$s as numbers, index$4_preimageLenAsU32 as preimageLenAsU32, index$4_resultToString as resultToString, index$4_seeThrough as seeThrough, index$4_slotsToPreimageStatus as slotsToPreimageStatus, index$4_toMemoryOperation as toMemoryOperation, index$4_tryAsMachineId as tryAsMachineId, index$4_tryAsProgramCounter as tryAsProgramCounter, index$4_writeServiceIdAsLeBytes as writeServiceIdAsLeBytes };
19711
+ export type { index$4_Args as Args, index$4_EnumMapping as EnumMapping, index$4_ErrorResult as ErrorResult, index$4_InsufficientFundsError as InsufficientFundsError, index$4_MachineId as MachineId, index$4_MachineResult as MachineResult, index$4_MachineStatus as MachineStatus, index$4_NoMachineError as NoMachineError, index$4_OK as OK, index$4_OkResult as OkResult, index$4_Opaque as Opaque, index$4_PartialState as PartialState, index$4_PreimageStatus as PreimageStatus, index$4_ProgramCounter as ProgramCounter, index$4_RefineExternalities as RefineExternalities, index$4_SegmentExportError as SegmentExportError, index$4_ServiceStateUpdate as ServiceStateUpdate, index$4_StateSlice as StateSlice, index$4_StringLiteral as StringLiteral, index$4_TRANSFER_MEMO_BYTES as TRANSFER_MEMO_BYTES, index$4_TaggedError as TaggedError, index$4_TokenOf as TokenOf, index$4_Uninstantiable as Uninstantiable, index$4_UnprivilegedError as UnprivilegedError, index$4_WithOpaque as WithOpaque };
19557
19712
  }
19558
19713
 
19559
19714
  declare const ENTROPY_BYTES = 32;
@@ -19583,10 +19738,10 @@ declare function fisherYatesShuffle<T>(blake2b: Blake2b, arr: T[], entropy: Byte
19583
19738
  return result;
19584
19739
  }
19585
19740
 
19586
- declare const index$2_fisherYatesShuffle: typeof fisherYatesShuffle;
19587
- declare namespace index$2 {
19741
+ declare const index$3_fisherYatesShuffle: typeof fisherYatesShuffle;
19742
+ declare namespace index$3 {
19588
19743
  export {
19589
- index$2_fisherYatesShuffle as fisherYatesShuffle,
19744
+ index$3_fisherYatesShuffle as fisherYatesShuffle,
19590
19745
  };
19591
19746
  }
19592
19747
 
@@ -20146,10 +20301,10 @@ declare const fullStateDumpFromJson = (spec: ChainSpec) =>
20146
20301
  chi_v: "number",
20147
20302
  chi_r: json.optional("number"),
20148
20303
  chi_g: json.nullable(
20149
- json.array({
20150
- service: "number",
20151
- gasLimit: json.fromNumber((v) => tryAsServiceGas(v)),
20152
- }),
20304
+ json.map(
20305
+ "number",
20306
+ json.fromNumber((v) => tryAsServiceGas(v)),
20307
+ ),
20153
20308
  ),
20154
20309
  },
20155
20310
  pi: JsonStatisticsData.fromJson,
@@ -20216,7 +20371,7 @@ declare const fullStateDumpFromJson = (spec: ChainSpec) =>
20216
20371
  assigners: chi.chi_a,
20217
20372
  delegator: chi.chi_v,
20218
20373
  registrar: chi.chi_r ?? tryAsServiceId(2 ** 32 - 1),
20219
- autoAccumulateServices: chi.chi_g ?? [],
20374
+ autoAccumulateServices: chi.chi_g ?? new Map(),
20220
20375
  }),
20221
20376
  statistics: JsonStatisticsData.toStatisticsData(spec, pi),
20222
20377
  accumulationQueue: omega,
@@ -20230,49 +20385,128 @@ declare const fullStateDumpFromJson = (spec: ChainSpec) =>
20230
20385
  },
20231
20386
  );
20232
20387
 
20233
- type index$1_JsonAvailabilityAssignment = JsonAvailabilityAssignment;
20234
- type index$1_JsonCoreStatistics = JsonCoreStatistics;
20235
- declare const index$1_JsonCoreStatistics: typeof JsonCoreStatistics;
20236
- type index$1_JsonDisputesRecords = JsonDisputesRecords;
20237
- declare const index$1_JsonDisputesRecords: typeof JsonDisputesRecords;
20238
- type index$1_JsonLookupMeta = JsonLookupMeta;
20239
- type index$1_JsonPreimageItem = JsonPreimageItem;
20240
- declare const index$1_JsonPreimageItem: typeof JsonPreimageItem;
20241
- type index$1_JsonPreimageStatus = JsonPreimageStatus;
20242
- type index$1_JsonRecentBlockState = JsonRecentBlockState;
20243
- type index$1_JsonRecentBlocks = JsonRecentBlocks;
20244
- type index$1_JsonReportedWorkPackageInfo = JsonReportedWorkPackageInfo;
20245
- type index$1_JsonService = JsonService;
20246
- declare const index$1_JsonService: typeof JsonService;
20247
- type index$1_JsonServiceInfo = JsonServiceInfo;
20248
- declare const index$1_JsonServiceInfo: typeof JsonServiceInfo;
20249
- type index$1_JsonServiceStatistics = JsonServiceStatistics;
20250
- declare const index$1_JsonServiceStatistics: typeof JsonServiceStatistics;
20251
- type index$1_JsonStateDump = JsonStateDump;
20252
- type index$1_JsonStatisticsData = JsonStatisticsData;
20253
- declare const index$1_JsonStatisticsData: typeof JsonStatisticsData;
20254
- type index$1_JsonStorageItem = JsonStorageItem;
20255
- declare const index$1_JsonStorageItem: typeof JsonStorageItem;
20256
- type index$1_JsonValidatorStatistics = JsonValidatorStatistics;
20257
- declare const index$1_JsonValidatorStatistics: typeof JsonValidatorStatistics;
20258
- type index$1_ServiceStatisticsEntry = ServiceStatisticsEntry;
20259
- type index$1_TicketsOrKeys = TicketsOrKeys;
20260
- declare const index$1_TicketsOrKeys: typeof TicketsOrKeys;
20261
- declare const index$1_availabilityAssignmentFromJson: typeof availabilityAssignmentFromJson;
20262
- declare const index$1_disputesRecordsFromJson: typeof disputesRecordsFromJson;
20263
- declare const index$1_fullStateDumpFromJson: typeof fullStateDumpFromJson;
20264
- declare const index$1_lookupMetaFromJson: typeof lookupMetaFromJson;
20265
- declare const index$1_notYetAccumulatedFromJson: typeof notYetAccumulatedFromJson;
20266
- declare const index$1_preimageStatusFromJson: typeof preimageStatusFromJson;
20267
- declare const index$1_recentBlockStateFromJson: typeof recentBlockStateFromJson;
20268
- declare const index$1_recentBlocksHistoryFromJson: typeof recentBlocksHistoryFromJson;
20269
- declare const index$1_reportedWorkPackageFromJson: typeof reportedWorkPackageFromJson;
20270
- declare const index$1_serviceStatisticsEntryFromJson: typeof serviceStatisticsEntryFromJson;
20271
- declare const index$1_ticketFromJson: typeof ticketFromJson;
20272
- declare const index$1_validatorDataFromJson: typeof validatorDataFromJson;
20388
+ type index$2_JsonAvailabilityAssignment = JsonAvailabilityAssignment;
20389
+ type index$2_JsonCoreStatistics = JsonCoreStatistics;
20390
+ declare const index$2_JsonCoreStatistics: typeof JsonCoreStatistics;
20391
+ type index$2_JsonDisputesRecords = JsonDisputesRecords;
20392
+ declare const index$2_JsonDisputesRecords: typeof JsonDisputesRecords;
20393
+ type index$2_JsonLookupMeta = JsonLookupMeta;
20394
+ type index$2_JsonPreimageItem = JsonPreimageItem;
20395
+ declare const index$2_JsonPreimageItem: typeof JsonPreimageItem;
20396
+ type index$2_JsonPreimageStatus = JsonPreimageStatus;
20397
+ type index$2_JsonRecentBlockState = JsonRecentBlockState;
20398
+ type index$2_JsonRecentBlocks = JsonRecentBlocks;
20399
+ type index$2_JsonReportedWorkPackageInfo = JsonReportedWorkPackageInfo;
20400
+ type index$2_JsonService = JsonService;
20401
+ declare const index$2_JsonService: typeof JsonService;
20402
+ type index$2_JsonServiceInfo = JsonServiceInfo;
20403
+ declare const index$2_JsonServiceInfo: typeof JsonServiceInfo;
20404
+ type index$2_JsonServiceStatistics = JsonServiceStatistics;
20405
+ declare const index$2_JsonServiceStatistics: typeof JsonServiceStatistics;
20406
+ type index$2_JsonStateDump = JsonStateDump;
20407
+ type index$2_JsonStatisticsData = JsonStatisticsData;
20408
+ declare const index$2_JsonStatisticsData: typeof JsonStatisticsData;
20409
+ type index$2_JsonStorageItem = JsonStorageItem;
20410
+ declare const index$2_JsonStorageItem: typeof JsonStorageItem;
20411
+ type index$2_JsonValidatorStatistics = JsonValidatorStatistics;
20412
+ declare const index$2_JsonValidatorStatistics: typeof JsonValidatorStatistics;
20413
+ type index$2_ServiceStatisticsEntry = ServiceStatisticsEntry;
20414
+ type index$2_TicketsOrKeys = TicketsOrKeys;
20415
+ declare const index$2_TicketsOrKeys: typeof TicketsOrKeys;
20416
+ declare const index$2_availabilityAssignmentFromJson: typeof availabilityAssignmentFromJson;
20417
+ declare const index$2_disputesRecordsFromJson: typeof disputesRecordsFromJson;
20418
+ declare const index$2_fullStateDumpFromJson: typeof fullStateDumpFromJson;
20419
+ declare const index$2_lookupMetaFromJson: typeof lookupMetaFromJson;
20420
+ declare const index$2_notYetAccumulatedFromJson: typeof notYetAccumulatedFromJson;
20421
+ declare const index$2_preimageStatusFromJson: typeof preimageStatusFromJson;
20422
+ declare const index$2_recentBlockStateFromJson: typeof recentBlockStateFromJson;
20423
+ declare const index$2_recentBlocksHistoryFromJson: typeof recentBlocksHistoryFromJson;
20424
+ declare const index$2_reportedWorkPackageFromJson: typeof reportedWorkPackageFromJson;
20425
+ declare const index$2_serviceStatisticsEntryFromJson: typeof serviceStatisticsEntryFromJson;
20426
+ declare const index$2_ticketFromJson: typeof ticketFromJson;
20427
+ declare const index$2_validatorDataFromJson: typeof validatorDataFromJson;
20428
+ declare namespace index$2 {
20429
+ export { index$2_JsonCoreStatistics as JsonCoreStatistics, index$2_JsonDisputesRecords as JsonDisputesRecords, index$2_JsonPreimageItem as JsonPreimageItem, index$2_JsonService as JsonService, index$2_JsonServiceInfo as JsonServiceInfo, index$2_JsonServiceStatistics as JsonServiceStatistics, index$2_JsonStatisticsData as JsonStatisticsData, index$2_JsonStorageItem as JsonStorageItem, index$2_JsonValidatorStatistics as JsonValidatorStatistics, index$2_TicketsOrKeys as TicketsOrKeys, index$2_availabilityAssignmentFromJson as availabilityAssignmentFromJson, index$2_disputesRecordsFromJson as disputesRecordsFromJson, index$2_fullStateDumpFromJson as fullStateDumpFromJson, index$2_lookupMetaFromJson as lookupMetaFromJson, index$2_notYetAccumulatedFromJson as notYetAccumulatedFromJson, index$2_preimageStatusFromJson as preimageStatusFromJson, index$2_recentBlockStateFromJson as recentBlockStateFromJson, index$2_recentBlocksHistoryFromJson as recentBlocksHistoryFromJson, index$2_reportedWorkPackageFromJson as reportedWorkPackageFromJson, index$2_serviceStatisticsEntryFromJson as serviceStatisticsEntryFromJson, index$2_ticketFromJson as ticketFromJson, index$2_validatorDataFromJson as validatorDataFromJson };
20430
+ export type { index$2_JsonAvailabilityAssignment as JsonAvailabilityAssignment, index$2_JsonLookupMeta as JsonLookupMeta, index$2_JsonPreimageStatus as JsonPreimageStatus, index$2_JsonRecentBlockState as JsonRecentBlockState, index$2_JsonRecentBlocks as JsonRecentBlocks, index$2_JsonReportedWorkPackageInfo as JsonReportedWorkPackageInfo, index$2_JsonStateDump as JsonStateDump, index$2_ServiceStatisticsEntry as ServiceStatisticsEntry };
20431
+ }
20432
+
20433
+ declare class StateKeyVal {
20434
+ static fromJson: FromJson<StateKeyVal> = {
20435
+ key: fromJson.bytesN(TRUNCATED_HASH_SIZE),
20436
+ value: fromJson.bytesBlob,
20437
+ };
20438
+ key!: TruncatedHash;
20439
+ value!: BytesBlob;
20440
+ }
20441
+
20442
+ declare class TestState {
20443
+ static fromJson: FromJson<TestState> = {
20444
+ state_root: fromJson.bytes32(),
20445
+ keyvals: json.array(StateKeyVal.fromJson),
20446
+ };
20447
+
20448
+ static Codec = codec.object({
20449
+ state_root: codec.bytes(HASH_SIZE).asOpaque<StateRootHash>(),
20450
+ keyvals: codec.sequenceVarLen(
20451
+ codec.object({
20452
+ key: codec.bytes(TRUNCATED_HASH_SIZE),
20453
+ value: codec.blob,
20454
+ }),
20455
+ ),
20456
+ });
20457
+
20458
+ state_root!: StateRootHash;
20459
+ keyvals!: StateKeyVal[];
20460
+ }
20461
+
20462
+ declare class StateTransitionGenesis {
20463
+ static fromJson: FromJson<StateTransitionGenesis> = {
20464
+ header: headerFromJson,
20465
+ state: TestState.fromJson,
20466
+ };
20467
+
20468
+ static Codec = codec.object({
20469
+ header: Header.Codec,
20470
+ state: TestState.Codec,
20471
+ });
20472
+
20473
+ header!: Header;
20474
+ state!: TestState;
20475
+ }
20476
+
20477
+ declare class StateTransition {
20478
+ static fromJson: FromJson<StateTransition> = {
20479
+ pre_state: TestState.fromJson,
20480
+ post_state: TestState.fromJson,
20481
+ block: blockFromJson(tinyChainSpec),
20482
+ };
20483
+
20484
+ static Codec = codec.object({
20485
+ pre_state: TestState.Codec,
20486
+ block: Block.Codec,
20487
+ post_state: TestState.Codec,
20488
+ });
20489
+
20490
+ pre_state!: TestState;
20491
+ post_state!: TestState;
20492
+ block!: Block;
20493
+ }
20494
+
20495
+ type index$1_StateKeyVal = StateKeyVal;
20496
+ declare const index$1_StateKeyVal: typeof StateKeyVal;
20497
+ type index$1_StateTransition = StateTransition;
20498
+ declare const index$1_StateTransition: typeof StateTransition;
20499
+ type index$1_StateTransitionGenesis = StateTransitionGenesis;
20500
+ declare const index$1_StateTransitionGenesis: typeof StateTransitionGenesis;
20501
+ type index$1_TestState = TestState;
20502
+ declare const index$1_TestState: typeof TestState;
20273
20503
  declare namespace index$1 {
20274
- export { index$1_JsonCoreStatistics as JsonCoreStatistics, index$1_JsonDisputesRecords as JsonDisputesRecords, index$1_JsonPreimageItem as JsonPreimageItem, index$1_JsonService as JsonService, index$1_JsonServiceInfo as JsonServiceInfo, index$1_JsonServiceStatistics as JsonServiceStatistics, index$1_JsonStatisticsData as JsonStatisticsData, index$1_JsonStorageItem as JsonStorageItem, index$1_JsonValidatorStatistics as JsonValidatorStatistics, index$1_TicketsOrKeys as TicketsOrKeys, index$1_availabilityAssignmentFromJson as availabilityAssignmentFromJson, index$1_disputesRecordsFromJson as disputesRecordsFromJson, index$1_fullStateDumpFromJson as fullStateDumpFromJson, index$1_lookupMetaFromJson as lookupMetaFromJson, index$1_notYetAccumulatedFromJson as notYetAccumulatedFromJson, index$1_preimageStatusFromJson as preimageStatusFromJson, index$1_recentBlockStateFromJson as recentBlockStateFromJson, index$1_recentBlocksHistoryFromJson as recentBlocksHistoryFromJson, index$1_reportedWorkPackageFromJson as reportedWorkPackageFromJson, index$1_serviceStatisticsEntryFromJson as serviceStatisticsEntryFromJson, index$1_ticketFromJson as ticketFromJson, index$1_validatorDataFromJson as validatorDataFromJson };
20275
- export type { index$1_JsonAvailabilityAssignment as JsonAvailabilityAssignment, index$1_JsonLookupMeta as JsonLookupMeta, index$1_JsonPreimageStatus as JsonPreimageStatus, index$1_JsonRecentBlockState as JsonRecentBlockState, index$1_JsonRecentBlocks as JsonRecentBlocks, index$1_JsonReportedWorkPackageInfo as JsonReportedWorkPackageInfo, index$1_JsonStateDump as JsonStateDump, index$1_ServiceStatisticsEntry as ServiceStatisticsEntry };
20504
+ export {
20505
+ index$1_StateKeyVal as StateKeyVal,
20506
+ index$1_StateTransition as StateTransition,
20507
+ index$1_StateTransitionGenesis as StateTransitionGenesis,
20508
+ index$1_TestState as TestState,
20509
+ };
20276
20510
  }
20277
20511
 
20278
20512
  /** Helper function to create most used hashes in the block */
@@ -20330,17 +20564,6 @@ declare class TransitionHasher implements MmrHasher<KeccakHash> {
20330
20564
 
20331
20565
  return new WithHashAndBytes(this.blake2b.hashBytes(encoded).asOpaque(), extrinsicView, encoded);
20332
20566
  }
20333
-
20334
- /** Creates hash for given WorkPackage */
20335
- workPackage(workPackage: WorkPackage): WithHashAndBytes<WorkPackageHash, WorkPackage> {
20336
- return this.encode(WorkPackage.Codec, workPackage);
20337
- }
20338
-
20339
- private encode<T, THash extends OpaqueHash>(codec: Codec<T>, data: T): WithHashAndBytes<THash, T> {
20340
- // TODO [ToDr] Use already allocated encoding destination and hash bytes from some arena.
20341
- const encoded = Encoder.encodeObject(codec, data, this.context);
20342
- return new WithHashAndBytes(this.blake2b.hashBytes(encoded).asOpaque(), data, encoded);
20343
- }
20344
20567
  }
20345
20568
 
20346
20569
  type PreimagesState = Pick<State, "getService">;
@@ -20358,7 +20581,6 @@ declare enum PreimagesErrorCode {
20358
20581
  AccountNotFound = "account_not_found",
20359
20582
  }
20360
20583
 
20361
- // TODO [SeKo] consider whether this module is the right place to remove expired preimages
20362
20584
  declare class Preimages {
20363
20585
  constructor(
20364
20586
  public readonly state: PreimagesState,
@@ -20445,4 +20667,4 @@ declare namespace index {
20445
20667
  export type { index_PreimagesInput as PreimagesInput, index_PreimagesState as PreimagesState, index_PreimagesStateUpdate as PreimagesStateUpdate };
20446
20668
  }
20447
20669
 
20448
- export { index$l as block, index$j as block_json, index$s as bytes, index$q as codec, index$o as collections, index$m as config, index$h as config_node, index$n as crypto, index$c as database, index$b as erasure_coding, index$9 as fuzz_proto, index$p as hash, index$4 as jam_host_calls, index$k as json_parser, index$i as logger, index$f as mmr, index$r as numbers, index$t as ordering, index$3 as pvm, index$5 as pvm_host_calls, index$6 as pvm_interpreter, index$7 as pvm_program, index$8 as pvm_spi_decoder, index$2 as shuffling, index$e as state, index$1 as state_json, index$d as state_merkleization, index as transition, index$g as trie, index$u as utils };
20670
+ export { index$m as block, index$k as block_json, index$t as bytes, index$r as codec, index$p as collections, index$n as config, index$i as config_node, index$o as crypto, index$d as database, index$c as erasure_coding, index$a as fuzz_proto, index$q as hash, index$5 as jam_host_calls, index$l as json_parser, index$j as logger, index$g as mmr, index$s as numbers, index$u as ordering, index$4 as pvm, index$6 as pvm_host_calls, index$7 as pvm_interpreter, index$8 as pvm_program, index$9 as pvm_spi_decoder, index$3 as shuffling, index$f as state, index$2 as state_json, index$e as state_merkleization, index$1 as state_vectors, index as transition, index$h as trie, index$v as utils };