diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a7c395..f341285 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.0.1-alpha.63](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.62...v0.0.1-alpha.63) (2024-09-23) + + +### Bug Fixes + +* manifest ([bb3eb79](https://github.com/DIG-Network/dig-chia-sdk/commit/bb3eb79cb96f4907438eca174d0802d380256e60)) + ### [0.0.1-alpha.62](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.61...v0.0.1-alpha.62) (2024-09-22) diff --git a/package-lock.json b/package-lock.json index ed2bf12..21e3137 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.62", + "version": "0.0.1-alpha.63", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.62", + "version": "0.0.1-alpha.63", "license": "ISC", "dependencies": { "@dignetwork/datalayer-driver": "^0.1.24", diff --git a/package.json b/package.json index efbaf74..53dc8a4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.62", + "version": "0.0.1-alpha.63", "description": "", "type": "commonjs", "main": "./dist/index.js", diff --git a/src/DataIntegrityTree/DataIntegrityTree.ts b/src/DataIntegrityTree/DataIntegrityTree.ts index 139843e..34f0f40 100644 --- a/src/DataIntegrityTree/DataIntegrityTree.ts +++ b/src/DataIntegrityTree/DataIntegrityTree.ts @@ -142,7 +142,10 @@ class DataIntegrityTree { const manifest = this._loadManifest(); if (manifest.length > 0) { const latestRootHash = manifest[manifest.length - 1]; - return this.deserializeTree(latestRootHash); + if (latestRootHash.length === 64) { + return this.deserializeTree(latestRootHash); + } + return new MerkleTree([], SHA256, { sortPairs: true }); } else { return new MerkleTree([], SHA256, { sortPairs: true }); } diff --git a/src/DigNetwork/PropagationServer.ts b/src/DigNetwork/PropagationServer.ts index 5c86cb9..2c1e56a 100644 --- a/src/DigNetwork/PropagationServer.ts +++ b/src/DigNetwork/PropagationServer.ts @@ -561,7 +561,7 @@ export class PropagationServer { await propagationServer.downloadFile(dataPath); } - const dataStore = new DataStore(storeId); + const dataStore = DataStore.from(storeId); await dataStore.generateManifestFile(); console.log(green(`✔ All files have been downloaded to ${storeId}.`));