@typeberry/jam 0.2.0-c96e8ef → 0.2.0-eae807e

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.
@@ -24033,44 +24033,40 @@ var GpVersion;
24033
24033
  GpVersion["V0_6_7"] = "0.6.7";
24034
24034
  GpVersion["V0_7_0"] = "0.7.0";
24035
24035
  GpVersion["V0_7_1"] = "0.7.1";
24036
- GpVersion["V0_7_2"] = "0.7.2-preview";
24036
+ GpVersion["V0_7_2"] = "0.7.2";
24037
24037
  })(GpVersion || (GpVersion = {}));
24038
24038
  var TestSuite;
24039
24039
  (function (TestSuite) {
24040
24040
  TestSuite["W3F_DAVXY"] = "w3f-davxy";
24041
24041
  TestSuite["JAMDUNA"] = "jamduna";
24042
24042
  })(TestSuite || (TestSuite = {}));
24043
+ const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1, GpVersion.V0_7_2];
24043
24044
  const DEFAULT_SUITE = TestSuite.W3F_DAVXY;
24044
- const DEFAULT_VERSION = GpVersion.V0_7_1;
24045
+ const DEFAULT_VERSION = GpVersion.V0_7_2;
24045
24046
  const env = typeof process === "undefined" ? {} : process.env;
24046
24047
  let CURRENT_VERSION = parseCurrentVersion(env.GP_VERSION) ?? DEFAULT_VERSION;
24047
24048
  let CURRENT_SUITE = parseCurrentSuite(env.TEST_SUITE) ?? DEFAULT_SUITE;
24048
- const ALL_VERSIONS_IN_ORDER = [GpVersion.V0_6_7, GpVersion.V0_7_0, GpVersion.V0_7_1, GpVersion.V0_7_2];
24049
24049
  function parseCurrentVersion(env) {
24050
24050
  if (env === undefined) {
24051
24051
  return undefined;
24052
24052
  }
24053
- switch (env) {
24054
- case GpVersion.V0_6_7:
24055
- case GpVersion.V0_7_0:
24056
- case GpVersion.V0_7_1:
24057
- case GpVersion.V0_7_2:
24058
- return env;
24059
- default:
24060
- throw new Error(`Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`);
24053
+ for (const v of Object.values(GpVersion)) {
24054
+ if (env === v) {
24055
+ return v;
24056
+ }
24061
24057
  }
24058
+ throw new Error(`Configured environment variable GP_VERSION is unknown: '${env}'. Use one of: ${ALL_VERSIONS_IN_ORDER}`);
24062
24059
  }
24063
24060
  function parseCurrentSuite(env) {
24064
24061
  if (env === undefined) {
24065
24062
  return undefined;
24066
24063
  }
24067
- switch (env) {
24068
- case TestSuite.W3F_DAVXY:
24069
- case TestSuite.JAMDUNA:
24070
- return env;
24071
- default:
24072
- throw new Error(`Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`);
24064
+ for (const s of Object.values(TestSuite)) {
24065
+ if (env === s) {
24066
+ return s;
24067
+ }
24073
24068
  }
24069
+ throw new Error(`Configured environment variable TEST_SUITE is unknown: '${env}'. Use one of: ${Object.values(TestSuite)}`);
24074
24070
  }
24075
24071
  class Compatibility {
24076
24072
  static override(version) {
@@ -28744,10 +28740,23 @@ class Bootnode {
28744
28740
  }
28745
28741
  }
28746
28742
 
28743
+ ;// CONCATENATED MODULE: ./packages/jam/config/pvm-backend.ts
28744
+ /** Implemented PVM Backends names in THE SAME ORDER as enum. */
28745
+ const PvmBackendNames = (/* unused pure expression or super */ null && (["built-in", "ananas"]));
28746
+ /** Implemented PVM Backends to choose from. */
28747
+ var PvmBackend;
28748
+ (function (PvmBackend) {
28749
+ /** Built-in aka. Typeberry 🫐 interpreter. */
28750
+ PvmBackend[PvmBackend["BuiltIn"] = 0] = "BuiltIn";
28751
+ /** Ananas 🍍 interpreter. */
28752
+ PvmBackend[PvmBackend["Ananas"] = 1] = "Ananas";
28753
+ })(PvmBackend || (PvmBackend = {}));
28754
+
28747
28755
  ;// CONCATENATED MODULE: ./packages/jam/config/index.ts
28748
28756
 
28749
28757
 
28750
28758
 
28759
+
28751
28760
  ;// CONCATENATED MODULE: ./packages/jam/block/codec.ts
28752
28761
 
28753
28762
 
@@ -31300,6 +31309,7 @@ class AuthorshipOptions {
31300
31309
 
31301
31310
 
31302
31311
 
31312
+
31303
31313
  const logger = Logger.new(import.meta.filename, "config");
31304
31314
  /** Development config. Will accept unsealed blocks for now. */
31305
31315
  const DEV_CONFIG = "dev";
@@ -31308,6 +31318,7 @@ const DEFAULT_CONFIG = "default";
31308
31318
  const NODE_DEFAULTS = {
31309
31319
  name: isBrowser() ? "browser" : external_node_os_default().hostname(),
31310
31320
  config: DEFAULT_CONFIG,
31321
+ pvm: PvmBackend.BuiltIn,
31311
31322
  };
31312
31323
  /** Chain spec chooser. */
31313
31324
  var KnownChainSpec;