@hardkas/localnet 0.7.6-alpha → 0.7.8-alpha

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/dist/index.d.ts CHANGED
@@ -372,7 +372,7 @@ declare function moveSink(dag: SimulatedDag, newSinkId: string, txProvider: (txI
372
372
  inputs: string[];
373
373
  } | undefined): SimulatedDag;
374
374
  /**
375
- * Deterministic Conflict Resolution (Approximation for 0.7.6-alpha)
375
+ * Deterministic Conflict Resolution (Approximation for 0.7.7-alpha)
376
376
  * Priority:
377
377
  * 1. sink ancestry priority (is part of selectedPathToSink?)
378
378
  * 2. deterministic block order (daaScore then block ID)
package/dist/index.js CHANGED
@@ -219,7 +219,15 @@ async function loadLocalnetState(filePath) {
219
219
  const content = await fs.readFile(targetPath, "utf-8");
220
220
  return JSON.parse(content);
221
221
  } catch (error) {
222
- return null;
222
+ const legacyPath = path.join(path.dirname(targetPath), "localnet-state.json");
223
+ try {
224
+ const legacyContent = await fs.readFile(legacyPath, "utf-8");
225
+ await fs.writeFile(targetPath, legacyContent, "utf-8");
226
+ console.warn(`[HardKAS] Migrated legacy localnet-state.json to localnet.json. The old file was kept for compatibility.`);
227
+ return JSON.parse(legacyContent);
228
+ } catch {
229
+ return null;
230
+ }
223
231
  }
224
232
  }
225
233
  async function loadOrCreateLocalnetState(options = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hardkas/localnet",
3
- "version": "0.7.6-alpha",
3
+ "version": "0.7.8-alpha",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -8,12 +8,12 @@
8
8
  ".": "./dist/index.js"
9
9
  },
10
10
  "dependencies": {
11
- "@hardkas/artifacts": "0.7.6-alpha",
12
- "@hardkas/query": "0.7.6-alpha",
13
- "@hardkas/tx-builder": "0.7.6-alpha",
14
- "@hardkas/simulator": "0.7.6-alpha",
15
- "@hardkas/kaspa-rpc": "0.7.6-alpha",
16
- "@hardkas/core": "0.7.6-alpha"
11
+ "@hardkas/artifacts": "0.7.8-alpha",
12
+ "@hardkas/core": "0.7.8-alpha",
13
+ "@hardkas/kaspa-rpc": "0.7.8-alpha",
14
+ "@hardkas/simulator": "0.7.8-alpha",
15
+ "@hardkas/query": "0.7.8-alpha",
16
+ "@hardkas/tx-builder": "0.7.8-alpha"
17
17
  },
18
18
  "devDependencies": {
19
19
  "fast-check": "^4.8.0",