@typeberry/convert 0.2.0-c96e8ef → 0.2.0-ee4e637

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -27017,7 +27017,7 @@ const SUPPORTED_TYPES = [
27017
27017
  decode: StateTransition.Codec,
27018
27018
  json: () => StateTransition.fromJson,
27019
27019
  process: {
27020
- options: ["as-pre-state", "as-post-state", "as-fuzz-message"],
27020
+ options: ["as-pre-state", "as-post-state", "as-fuzz-message", "as-block"],
27021
27021
  run(spec, data, option, blake2b) {
27022
27022
  const test = data;
27023
27023
  if (option === "as-pre-state") {
@@ -27030,6 +27030,12 @@ const SUPPORTED_TYPES = [
27030
27030
  value: stateFromKeyvals(spec, blake2b, test.post_state),
27031
27031
  });
27032
27032
  }
27033
+ if (option === "as-block") {
27034
+ return looseType({
27035
+ encode: block_Block.Codec,
27036
+ value: test.block,
27037
+ });
27038
+ }
27033
27039
  if (option === "as-fuzz-message") {
27034
27040
  const encoded = encoder_Encoder.encodeObject(block_Block.Codec, test.block, spec);
27035
27041
  const blockView = decoder_Decoder.decodeObject(block_Block.Codec.View, encoded, spec);