@typeberry/lib 0.4.0-5a35a0a → 0.4.0-da92f56

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 +66 -137
  2. package/index.d.ts +15 -490
  3. package/index.js +66 -137
  4. package/package.json +1 -1
package/index.js CHANGED
@@ -16,7 +16,11 @@ var TestSuite;
16
16
  })(TestSuite || (TestSuite = {}));
17
17
  const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1, GpVersion.V0_7_2];
18
18
  const DEFAULT_SUITE = TestSuite.W3F_DAVXY;
19
- const DEFAULT_VERSION = GpVersion.V0_7_2;
19
+ /**
20
+ * Current version is set to track the jam-conformance testing.
21
+ * Since we are currently at 0.7.1 not 0.7.2, we set our default version accordingly.
22
+ */
23
+ const DEFAULT_VERSION = GpVersion.V0_7_1;
20
24
  const env$1 = typeof process === "undefined" ? {} : process.env;
21
25
  let CURRENT_VERSION = parseCurrentVersion(env$1.GP_VERSION) ?? DEFAULT_VERSION;
22
26
  let CURRENT_SUITE = parseCurrentSuite(env$1.TEST_SUITE) ?? DEFAULT_SUITE;
@@ -75,8 +79,8 @@ class Compatibility {
75
79
  /**
76
80
  * Allows selecting different values for different Gray Paper versions from one record.
77
81
  *
78
- * @param fallback The default value to return if no value is found for the current.
79
- * @param record A record mapping versions to values, checking if the version is greater or equal to the current version.
82
+ * fallback The default value to return if no value is found for the current.
83
+ * versions A record mapping versions to values, checking if the version is greater or equal to the current version.
80
84
  * @returns The value for the current version, or the default value.
81
85
  */
82
86
  static selectIfGreaterOrEqual({ fallback, versions, }) {
@@ -236,7 +240,7 @@ const workspacePathFix = env.NODE_ENV === "development"
236
240
  : () => (p) => p;
237
241
 
238
242
  /**
239
- * @fileoverview `Opaque<Type, Token>` constructs a unique type which is a subset of Type with a
243
+ * `Opaque<Type, Token>` constructs a unique type which is a subset of Type with a
240
244
  * specified unique token Token. It means that base type cannot be assigned to unique type by accident.
241
245
  * Good examples of opaque types include:
242
246
  * - JWTs or other tokens - these are special kinds of string used for authorization purposes.
@@ -6709,6 +6713,8 @@ var index$m = /*#__PURE__*/Object.freeze({
6709
6713
  SEGMENT_BYTES: SEGMENT_BYTES,
6710
6714
  TicketsMarker: TicketsMarker,
6711
6715
  ValidatorKeys: ValidatorKeys,
6716
+ W_E: W_E,
6717
+ W_S: W_S,
6712
6718
  assurances: assurances,
6713
6719
  codecPerEpochBlock: codecPerEpochBlock,
6714
6720
  codecPerValidator: codecPerValidator,
@@ -7097,12 +7103,12 @@ const workRefineLoadFromJson = json.object({
7097
7103
  extrinsic_count: "number",
7098
7104
  extrinsic_size: "number",
7099
7105
  exports: "number",
7100
- }, ({ gas_used, imports, extrinsic_count, extrinsic_size, exports }) => WorkRefineLoad.create({
7106
+ }, ({ gas_used, imports, extrinsic_count, extrinsic_size, exports: exports$1 }) => WorkRefineLoad.create({
7101
7107
  gasUsed: tryAsServiceGas(gas_used),
7102
7108
  importedSegments: tryAsU32(imports),
7103
7109
  extrinsicCount: tryAsU32(extrinsic_count),
7104
7110
  extrinsicSize: tryAsU32(extrinsic_size),
7105
- exportedSegments: tryAsU32(exports),
7111
+ exportedSegments: tryAsU32(exports$1),
7106
7112
  }));
7107
7113
  const workResultFromJson = json.object({
7108
7114
  service_id: "number",
@@ -7264,7 +7270,7 @@ function parseBootnode(v) {
7264
7270
  if (name === "" || ip === "" || port === "") {
7265
7271
  throw new Error(`Invalid bootnode format, expected: <name>@<ip>:<port>, got: "${v}"`);
7266
7272
  }
7267
- const portNumber = Number.parseInt(port);
7273
+ const portNumber = Number.parseInt(port, 10);
7268
7274
  if (!isU16(portNumber)) {
7269
7275
  throw new Error(`Invalid port number: "${port}"`);
7270
7276
  }
@@ -8869,7 +8875,7 @@ class CoreStatistics {
8869
8875
  /** `i` */
8870
8876
  imports,
8871
8877
  /** `e` */
8872
- exports,
8878
+ exports$1,
8873
8879
  /** `z` */
8874
8880
  extrinsicSize,
8875
8881
  /** `x` */
@@ -8881,7 +8887,7 @@ class CoreStatistics {
8881
8887
  this.dataAvailabilityLoad = dataAvailabilityLoad;
8882
8888
  this.popularity = popularity;
8883
8889
  this.imports = imports;
8884
- this.exports = exports;
8890
+ this.exports = exports$1;
8885
8891
  this.extrinsicSize = extrinsicSize;
8886
8892
  this.extrinsicCount = extrinsicCount;
8887
8893
  this.bundleSize = bundleSize;
@@ -8974,7 +8980,7 @@ class ServiceStatistics {
8974
8980
  /** `i` */
8975
8981
  imports,
8976
8982
  /** `e` */
8977
- exports,
8983
+ exports$1,
8978
8984
  /** `z` */
8979
8985
  extrinsicSize,
8980
8986
  /** `x` */
@@ -8992,7 +8998,7 @@ class ServiceStatistics {
8992
8998
  this.refinementCount = refinementCount;
8993
8999
  this.refinementGasUsed = refinementGasUsed;
8994
9000
  this.imports = imports;
8995
- this.exports = exports;
9001
+ this.exports = exports$1;
8996
9002
  this.extrinsicSize = extrinsicSize;
8997
9003
  this.extrinsicCount = extrinsicCount;
8998
9004
  this.accumulateCount = accumulateCount;
@@ -10373,7 +10379,6 @@ class LeafNode {
10373
10379
  /**
10374
10380
  * Get the byte length of embedded value.
10375
10381
  *
10376
- * @remark
10377
10382
  * Note in case this node only contains hash this is going to be 0.
10378
10383
  */
10379
10384
  getValueLength() {
@@ -10384,7 +10389,6 @@ class LeafNode {
10384
10389
  /**
10385
10390
  * Returns the embedded value.
10386
10391
  *
10387
- * @remark
10388
10392
  * Note that this is going to be empty for a regular leaf node (i.e. containing a hash).
10389
10393
  */
10390
10394
  getValue() {
@@ -10394,7 +10398,6 @@ class LeafNode {
10394
10398
  /**
10395
10399
  * Returns contained value hash.
10396
10400
  *
10397
- * @remark
10398
10401
  * Note that for embedded value this is going to be full 0-padded 32 bytes.
10399
10402
  */
10400
10403
  getValueHash() {
@@ -16834,18 +16837,18 @@ async function instantiate$1(module, imports = {}) {
16834
16837
  },
16835
16838
  }, Object.assign(Object.create(globalThis), imports.env || {})),
16836
16839
  };
16837
- const { exports } = await WebAssembly.instantiate(module, adaptedImports);
16838
- const memory = exports.memory || imports.env.memory;
16840
+ const { exports: exports$1 } = await WebAssembly.instantiate(module, adaptedImports);
16841
+ const memory = exports$1.memory || imports.env.memory;
16839
16842
  const adaptedExports = Object.setPrototypeOf({
16840
16843
  getAssembly(p) {
16841
16844
  // assembly/api-internal/getAssembly(assembly/program/Program) => ~lib/string/String
16842
16845
  p = __lowerInternref(p) || __notnull();
16843
- return __liftString(exports.getAssembly(p) >>> 0);
16846
+ return __liftString(exports$1.getAssembly(p) >>> 0);
16844
16847
  },
16845
16848
  wrapAsProgram(bytecode) {
16846
16849
  // assembly/program-build/wrapAsProgram(~lib/typedarray/Uint8Array) => ~lib/typedarray/Uint8Array
16847
16850
  bytecode = __lowerTypedArray(Uint8Array, 10, 0, bytecode) || __notnull();
16848
- return __liftTypedArray(Uint8Array, exports.wrapAsProgram(bytecode) >>> 0);
16851
+ return __liftTypedArray(Uint8Array, exports$1.wrapAsProgram(bytecode) >>> 0);
16849
16852
  },
16850
16853
  resetJAM(program, pc, initialGas, args, hasMetadata) {
16851
16854
  // assembly/api-debugger/resetJAM(~lib/array/Array<u8>, f64, i64, ~lib/array/Array<u8>, bool?) => void
@@ -16854,8 +16857,8 @@ async function instantiate$1(module, imports = {}) {
16854
16857
  args = __lowerArray(__setU8, 6, 0, args) || __notnull();
16855
16858
  hasMetadata = hasMetadata ? 1 : 0;
16856
16859
  try {
16857
- exports.__setArgumentsLength(arguments.length);
16858
- exports.resetJAM(program, pc, initialGas, args, hasMetadata);
16860
+ exports$1.__setArgumentsLength(arguments.length);
16861
+ exports$1.resetJAM(program, pc, initialGas, args, hasMetadata);
16859
16862
  } finally {
16860
16863
  __release(program);
16861
16864
  }
@@ -16867,8 +16870,8 @@ async function instantiate$1(module, imports = {}) {
16867
16870
  initialGas = initialGas || 0n;
16868
16871
  hasMetadata = hasMetadata ? 1 : 0;
16869
16872
  try {
16870
- exports.__setArgumentsLength(arguments.length);
16871
- exports.resetGeneric(program, flatRegisters, initialGas, hasMetadata);
16873
+ exports$1.__setArgumentsLength(arguments.length);
16874
+ exports$1.resetGeneric(program, flatRegisters, initialGas, hasMetadata);
16872
16875
  } finally {
16873
16876
  __release(program);
16874
16877
  }
@@ -16882,8 +16885,8 @@ async function instantiate$1(module, imports = {}) {
16882
16885
  initialGas = initialGas || 0n;
16883
16886
  hasMetadata = hasMetadata ? 1 : 0;
16884
16887
  try {
16885
- exports.__setArgumentsLength(arguments.length);
16886
- exports.resetGenericWithMemory(program, flatRegisters, pageMap, chunks, initialGas, hasMetadata);
16888
+ exports$1.__setArgumentsLength(arguments.length);
16889
+ exports$1.resetGenericWithMemory(program, flatRegisters, pageMap, chunks, initialGas, hasMetadata);
16887
16890
  } finally {
16888
16891
  __release(program);
16889
16892
  __release(flatRegisters);
@@ -16892,68 +16895,68 @@ async function instantiate$1(module, imports = {}) {
16892
16895
  },
16893
16896
  nextStep() {
16894
16897
  // assembly/api-debugger/nextStep() => bool
16895
- return exports.nextStep() != 0;
16898
+ return exports$1.nextStep() != 0;
16896
16899
  },
16897
16900
  nSteps(steps) {
16898
16901
  // assembly/api-debugger/nSteps(u32) => bool
16899
- return exports.nSteps(steps) != 0;
16902
+ return exports$1.nSteps(steps) != 0;
16900
16903
  },
16901
16904
  getProgramCounter() {
16902
16905
  // assembly/api-debugger/getProgramCounter() => u32
16903
- return exports.getProgramCounter() >>> 0;
16906
+ return exports$1.getProgramCounter() >>> 0;
16904
16907
  },
16905
16908
  getExitArg() {
16906
16909
  // assembly/api-debugger/getExitArg() => u32
16907
- return exports.getExitArg() >>> 0;
16910
+ return exports$1.getExitArg() >>> 0;
16908
16911
  },
16909
16912
  setGasLeft(gas) {
16910
16913
  // assembly/api-debugger/setGasLeft(i64) => void
16911
16914
  gas = gas || 0n;
16912
- exports.setGasLeft(gas);
16915
+ exports$1.setGasLeft(gas);
16913
16916
  },
16914
16917
  getRegisters() {
16915
16918
  // assembly/api-debugger/getRegisters() => ~lib/typedarray/Uint8Array
16916
- return __liftTypedArray(Uint8Array, exports.getRegisters() >>> 0);
16919
+ return __liftTypedArray(Uint8Array, exports$1.getRegisters() >>> 0);
16917
16920
  },
16918
16921
  setRegisters(flatRegisters) {
16919
16922
  // assembly/api-debugger/setRegisters(~lib/array/Array<u8>) => void
16920
16923
  flatRegisters = __lowerArray(__setU8, 6, 0, flatRegisters) || __notnull();
16921
- exports.setRegisters(flatRegisters);
16924
+ exports$1.setRegisters(flatRegisters);
16922
16925
  },
16923
16926
  getPageDump(index) {
16924
16927
  // assembly/api-debugger/getPageDump(u32) => ~lib/typedarray/Uint8Array
16925
- return __liftTypedArray(Uint8Array, exports.getPageDump(index) >>> 0);
16928
+ return __liftTypedArray(Uint8Array, exports$1.getPageDump(index) >>> 0);
16926
16929
  },
16927
16930
  getMemory(address, length) {
16928
16931
  // assembly/api-debugger/getMemory(u32, u32) => ~lib/typedarray/Uint8Array | null
16929
- return __liftTypedArray(Uint8Array, exports.getMemory(address, length) >>> 0);
16932
+ return __liftTypedArray(Uint8Array, exports$1.getMemory(address, length) >>> 0);
16930
16933
  },
16931
16934
  setMemory(address, data) {
16932
16935
  // assembly/api-debugger/setMemory(u32, ~lib/typedarray/Uint8Array) => bool
16933
16936
  data = __lowerTypedArray(Uint8Array, 10, 0, data) || __notnull();
16934
- return exports.setMemory(address, data) != 0;
16937
+ return exports$1.setMemory(address, data) != 0;
16935
16938
  },
16936
16939
  InputKind: (values => (
16937
16940
  // assembly/api-utils/InputKind
16938
- values[values.Generic = exports["InputKind.Generic"].valueOf()] = "Generic",
16939
- values[values.SPI = exports["InputKind.SPI"].valueOf()] = "SPI",
16941
+ values[values.Generic = exports$1["InputKind.Generic"].valueOf()] = "Generic",
16942
+ values[values.SPI = exports$1["InputKind.SPI"].valueOf()] = "SPI",
16940
16943
  values
16941
16944
  ))({}),
16942
16945
  HasMetadata: (values => (
16943
16946
  // assembly/api-utils/HasMetadata
16944
- values[values.Yes = exports["HasMetadata.Yes"].valueOf()] = "Yes",
16945
- values[values.No = exports["HasMetadata.No"].valueOf()] = "No",
16947
+ values[values.Yes = exports$1["HasMetadata.Yes"].valueOf()] = "Yes",
16948
+ values[values.No = exports$1["HasMetadata.No"].valueOf()] = "No",
16946
16949
  values
16947
16950
  ))({}),
16948
16951
  getGasCosts(input, kind, withMetadata) {
16949
16952
  // assembly/api-utils/getGasCosts(~lib/array/Array<u8>, i32, i32) => ~lib/array/Array<assembly/gas-costs/BlockGasCost>
16950
16953
  input = __lowerArray(__setU8, 6, 0, input) || __notnull();
16951
- return __liftArray(pointer => __liftRecord50(__getU32(pointer)), 2, exports.getGasCosts(input, kind, withMetadata) >>> 0);
16954
+ return __liftArray(pointer => __liftRecord50(__getU32(pointer)), 2, exports$1.getGasCosts(input, kind, withMetadata) >>> 0);
16952
16955
  },
16953
16956
  disassemble(input, kind, withMetadata) {
16954
16957
  // assembly/api-utils/disassemble(~lib/array/Array<u8>, i32, i32) => ~lib/string/String
16955
16958
  input = __lowerArray(__setU8, 6, 0, input) || __notnull();
16956
- return __liftString(exports.disassemble(input, kind, withMetadata) >>> 0);
16959
+ return __liftString(exports$1.disassemble(input, kind, withMetadata) >>> 0);
16957
16960
  },
16958
16961
  prepareProgram(kind, hasMetadata, program, initialRegisters, initialPageMap, initialMemory, args) {
16959
16962
  // assembly/api-utils/prepareProgram(i32, i32, ~lib/array/Array<u8>, ~lib/array/Array<u64>, ~lib/array/Array<assembly/api-internal/InitialPage>, ~lib/array/Array<assembly/api-internal/InitialChunk>, ~lib/array/Array<u8>) => assembly/spi/StandardProgram
@@ -16963,7 +16966,7 @@ async function instantiate$1(module, imports = {}) {
16963
16966
  initialMemory = __retain(__lowerArray((pointer, value) => { __setU32(pointer, __lowerRecord48(value) || __notnull()); }, 49, 2, initialMemory) || __notnull());
16964
16967
  args = __lowerArray(__setU8, 6, 0, args) || __notnull();
16965
16968
  try {
16966
- return __liftInternref(exports.prepareProgram(kind, hasMetadata, program, initialRegisters, initialPageMap, initialMemory, args) >>> 0);
16969
+ return __liftInternref(exports$1.prepareProgram(kind, hasMetadata, program, initialRegisters, initialPageMap, initialMemory, args) >>> 0);
16967
16970
  } finally {
16968
16971
  __release(program);
16969
16972
  __release(initialRegisters);
@@ -16977,10 +16980,10 @@ async function instantiate$1(module, imports = {}) {
16977
16980
  initialGas = initialGas || 0n;
16978
16981
  logs = logs ? 1 : 0;
16979
16982
  useSbrkGas = useSbrkGas ? 1 : 0;
16980
- exports.__setArgumentsLength(arguments.length);
16981
- return __liftRecord55(exports.runProgram(program, initialGas, programCounter, logs, useSbrkGas) >>> 0);
16983
+ exports$1.__setArgumentsLength(arguments.length);
16984
+ return __liftRecord55(exports$1.runProgram(program, initialGas, programCounter, logs, useSbrkGas) >>> 0);
16982
16985
  },
16983
- }, exports);
16986
+ }, exports$1);
16984
16987
  function __liftRecord50(pointer) {
16985
16988
  // assembly/gas-costs/BlockGasCost
16986
16989
  // Hint: Opt-out from lifting as a record by providing an empty constructor
@@ -16994,21 +16997,21 @@ async function instantiate$1(module, imports = {}) {
16994
16997
  // assembly/api-internal/InitialPage
16995
16998
  // Hint: Opt-out from lowering as a record by providing an empty constructor
16996
16999
  if (value == null) return 0;
16997
- const pointer = exports.__pin(exports.__new(12, 46));
17000
+ const pointer = exports$1.__pin(exports$1.__new(12, 46));
16998
17001
  __setU32(pointer + 0, value.address);
16999
17002
  __setU32(pointer + 4, value.length);
17000
17003
  __setU32(pointer + 8, value.access);
17001
- exports.__unpin(pointer);
17004
+ exports$1.__unpin(pointer);
17002
17005
  return pointer;
17003
17006
  }
17004
17007
  function __lowerRecord48(value) {
17005
17008
  // assembly/api-internal/InitialChunk
17006
17009
  // Hint: Opt-out from lowering as a record by providing an empty constructor
17007
17010
  if (value == null) return 0;
17008
- const pointer = exports.__pin(exports.__new(8, 48));
17011
+ const pointer = exports$1.__pin(exports$1.__new(8, 48));
17009
17012
  __setU32(pointer + 0, value.address);
17010
17013
  __setU32(pointer + 4, __lowerArray(__setU8, 6, 0, value.data) || __notnull());
17011
- exports.__unpin(pointer);
17014
+ exports$1.__unpin(pointer);
17012
17015
  return pointer;
17013
17016
  }
17014
17017
  function __liftRecord48(pointer) {
@@ -17057,15 +17060,15 @@ async function instantiate$1(module, imports = {}) {
17057
17060
  if (values == null) return 0;
17058
17061
  const
17059
17062
  length = values.length,
17060
- buffer = exports.__pin(exports.__new(length << align, 1)) >>> 0,
17061
- header = exports.__pin(exports.__new(16, id)) >>> 0;
17063
+ buffer = exports$1.__pin(exports$1.__new(length << align, 1)) >>> 0,
17064
+ header = exports$1.__pin(exports$1.__new(16, id)) >>> 0;
17062
17065
  __setU32(header + 0, buffer);
17063
17066
  __dataview.setUint32(header + 4, buffer, true);
17064
17067
  __dataview.setUint32(header + 8, length << align, true);
17065
17068
  __dataview.setUint32(header + 12, length, true);
17066
17069
  for (let i = 0; i < length; ++i) lowerElement(buffer + (i << align >>> 0), values[i]);
17067
- exports.__unpin(buffer);
17068
- exports.__unpin(header);
17070
+ exports$1.__unpin(buffer);
17071
+ exports$1.__unpin(header);
17069
17072
  return header;
17070
17073
  }
17071
17074
  function __liftTypedArray(constructor, pointer) {
@@ -17080,13 +17083,13 @@ async function instantiate$1(module, imports = {}) {
17080
17083
  if (values == null) return 0;
17081
17084
  const
17082
17085
  length = values.length,
17083
- buffer = exports.__pin(exports.__new(length << align, 1)) >>> 0,
17084
- header = exports.__new(12, id) >>> 0;
17086
+ buffer = exports$1.__pin(exports$1.__new(length << align, 1)) >>> 0,
17087
+ header = exports$1.__new(12, id) >>> 0;
17085
17088
  __setU32(header + 0, buffer);
17086
17089
  __dataview.setUint32(header + 4, buffer, true);
17087
17090
  __dataview.setUint32(header + 8, length << align, true);
17088
17091
  new constructor(memory.buffer, buffer, length).set(values);
17089
- exports.__unpin(buffer);
17092
+ exports$1.__unpin(buffer);
17090
17093
  return header;
17091
17094
  }
17092
17095
  class Internref extends Number {}
@@ -17107,14 +17110,14 @@ async function instantiate$1(module, imports = {}) {
17107
17110
  if (pointer) {
17108
17111
  const refcount = refcounts.get(pointer);
17109
17112
  if (refcount) refcounts.set(pointer, refcount + 1);
17110
- else refcounts.set(exports.__pin(pointer), 1);
17113
+ else refcounts.set(exports$1.__pin(pointer), 1);
17111
17114
  }
17112
17115
  return pointer;
17113
17116
  }
17114
17117
  function __release(pointer) {
17115
17118
  if (pointer) {
17116
17119
  const refcount = refcounts.get(pointer);
17117
- if (refcount === 1) exports.__unpin(pointer), refcounts.delete(pointer);
17120
+ if (refcount === 1) exports$1.__unpin(pointer), refcounts.delete(pointer);
17118
17121
  else if (refcount) refcounts.set(pointer, refcount - 1);
17119
17122
  else throw Error(`invalid refcount '${refcount}' for reference '${pointer}'`);
17120
17123
  }
@@ -17716,79 +17719,7 @@ class DebuggerAdapter {
17716
17719
 
17717
17720
  var index$4 = /*#__PURE__*/Object.freeze({
17718
17721
  __proto__: null,
17719
- AccumulationStateUpdate: AccumulationStateUpdate,
17720
- ArgsDecoder: ArgsDecoder,
17721
- get ArgumentType () { return ArgumentType; },
17722
- BasicBlocks: BasicBlocks,
17723
- CURRENT_SERVICE_ID: CURRENT_SERVICE_ID,
17724
- get EjectError () { return EjectError; },
17725
- ExtendedWitdthImmediateDecoder: ExtendedWitdthImmediateDecoder,
17726
- get ForgetPreimageError () { return ForgetPreimageError; },
17727
- HostCallMemory: HostCallMemory,
17728
- HostCallRegisters: HostCallRegisters,
17729
- HostCallResult: HostCallResult,
17730
- ImmediateDecoder: ImmediateDecoder,
17731
- InsufficientFundsError: InsufficientFundsError,
17732
- MachineInstance: MachineInstance,
17733
- Mask: Mask,
17734
- get MemoryOperation () { return MemoryOperation; },
17735
- MemorySegment: MemorySegment,
17736
- NO_OF_REGISTERS: NO_OF_REGISTERS$1,
17737
- get NewServiceError () { return NewServiceError; },
17738
- NibblesDecoder: NibblesDecoder,
17739
- NoMachineError: NoMachineError,
17740
- OK: OK,
17741
- get PagesError () { return PagesError; },
17742
- PartiallyUpdatedState: PartiallyUpdatedState,
17743
- get PeekPokeError () { return PeekPokeError; },
17744
- PendingTransfer: PendingTransfer,
17745
- get PreimageStatusKind () { return PreimageStatusKind; },
17746
- Program: Program,
17747
- ProgramDecoder: ProgramDecoder,
17748
- get ProvidePreimageError () { return ProvidePreimageError; },
17749
- Pvm: DebuggerAdapter,
17750
- Registers: Registers,
17751
- get RequestPreimageError () { return RequestPreimageError; },
17752
- Result: Result$1,
17753
- SERVICE_ID_BYTES: SERVICE_ID_BYTES,
17754
- SegmentExportError: SegmentExportError,
17755
- SpiMemory: SpiMemory,
17756
- SpiProgram: SpiProgram,
17757
- TRANSFER_MEMO_BYTES: TRANSFER_MEMO_BYTES,
17758
- get TransferError () { return TransferError; },
17759
- UnprivilegedError: UnprivilegedError,
17760
- get UpdatePrivilegesError () { return UpdatePrivilegesError; },
17761
- WithDebug: WithDebug,
17762
- get ZeroVoidError () { return ZeroVoidError; },
17763
- asOpaqueType: asOpaqueType,
17764
- assertEmpty: assertEmpty,
17765
- assertNever: assertNever,
17766
- block: index$m,
17767
- bytes: index$t,
17768
- check: check,
17769
- clampU64ToU32: clampU64ToU32,
17770
- createResults: createResults,
17771
- decodeStandardProgram: decodeStandardProgram,
17772
- emptyRegistersBuffer: emptyRegistersBuffer,
17773
- extractCodeAndMetadata: extractCodeAndMetadata,
17774
- getServiceId: getServiceId,
17775
- getServiceIdOrCurrent: getServiceIdOrCurrent,
17776
- hash: index$p,
17777
- hostCallInfoAccount: codecServiceAccountInfoWithThresholdBalance,
17778
- inspect: inspect,
17779
- instructionArgumentTypeMap: instructionArgumentTypeMap,
17780
- interpreter: index$8,
17781
- isBrowser: isBrowser,
17782
- lazyInspect: lazyInspect,
17783
- measure: measure,
17784
- numbers: index$s,
17785
- resultToString: resultToString,
17786
- seeThrough: seeThrough,
17787
- slotsToPreimageStatus: slotsToPreimageStatus,
17788
- toMemoryOperation: toMemoryOperation,
17789
- tryAsMachineId: tryAsMachineId,
17790
- tryAsProgramCounter: tryAsProgramCounter,
17791
- writeServiceIdAsLeBytes: writeServiceIdAsLeBytes
17722
+ Pvm: DebuggerAdapter
17792
17723
  });
17793
17724
 
17794
17725
  const ENTROPY_BYTES = 32;
@@ -18062,12 +17993,12 @@ class JsonCoreStatistics {
18062
17993
  extrinsic_count: "number",
18063
17994
  bundle_size: "number",
18064
17995
  gas_used: json.fromBigInt(tryAsServiceGas),
18065
- }, ({ da_load, popularity, imports, exports, extrinsic_size, extrinsic_count, bundle_size, gas_used }) => {
17996
+ }, ({ da_load, popularity, imports, exports: exports$1, extrinsic_size, extrinsic_count, bundle_size, gas_used }) => {
18066
17997
  return CoreStatistics.create({
18067
17998
  dataAvailabilityLoad: da_load,
18068
17999
  popularity,
18069
18000
  imports,
18070
- exports,
18001
+ exports: exports$1,
18071
18002
  extrinsicSize: extrinsic_size,
18072
18003
  extrinsicCount: extrinsic_count,
18073
18004
  bundleSize: bundle_size,
@@ -18101,14 +18032,14 @@ class JsonServiceStatistics {
18101
18032
  on_transfers_gas_used: json.fromBigInt(tryAsServiceGas),
18102
18033
  }
18103
18034
  : {}),
18104
- }, ({ provided_count, provided_size, refinement_count, refinement_gas_used, imports, exports, extrinsic_size, extrinsic_count, accumulate_count, accumulate_gas_used, on_transfers_count, on_transfers_gas_used, }) => {
18035
+ }, ({ provided_count, provided_size, refinement_count, refinement_gas_used, imports, exports: exports$1, extrinsic_size, extrinsic_count, accumulate_count, accumulate_gas_used, on_transfers_count, on_transfers_gas_used, }) => {
18105
18036
  return ServiceStatistics.create({
18106
18037
  providedCount: provided_count,
18107
18038
  providedSize: provided_size,
18108
18039
  refinementCount: refinement_count,
18109
18040
  refinementGasUsed: refinement_gas_used,
18110
18041
  imports,
18111
- exports,
18042
+ exports: exports$1,
18112
18043
  extrinsicSize: extrinsic_size,
18113
18044
  extrinsicCount: extrinsic_count,
18114
18045
  accumulateCount: accumulate_count,
@@ -18316,11 +18247,9 @@ var index$1 = /*#__PURE__*/Object.freeze({
18316
18247
 
18317
18248
  /** Helper function to create most used hashes in the block */
18318
18249
  class TransitionHasher {
18319
- context;
18320
18250
  keccakHasher;
18321
18251
  blake2b;
18322
- constructor(context, keccakHasher, blake2b) {
18323
- this.context = context;
18252
+ constructor(keccakHasher, blake2b) {
18324
18253
  this.keccakHasher = keccakHasher;
18325
18254
  this.blake2b = blake2b;
18326
18255
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typeberry/lib",
3
- "version": "0.4.0-5a35a0a",
3
+ "version": "0.4.0-da92f56",
4
4
  "main": "index.js",
5
5
  "author": "Fluffy Labs",
6
6
  "license": "MPL-2.0",