Skip to content

Commit 9821d18

Browse files
Merge pull request #19 from DIG-Network/release/v0.0.1-alpha.19
Release/v0.0.1 alpha.19
2 parents 8477abf + a6e0655 commit 9821d18

File tree

5 files changed

+17
-7
lines changed

5 files changed

+17
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
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.
44

5+
### [0.0.1-alpha.19](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.18...v0.0.1-alpha.19) (2024-09-16)
6+
7+
8+
### Features
9+
10+
* query if the content server has a roothash ([24ba222](https://github.com/DIG-Network/dig-chia-sdk/commit/24ba2227b59e55d874b618fe074d71a61bb63b47))
11+
512
### [0.0.1-alpha.18](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.17...v0.0.1-alpha.18) (2024-09-16)
613

714

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dignetwork/dig-sdk",
3-
"version": "0.0.1-alpha.18",
3+
"version": "0.0.1-alpha.19",
44
"description": "",
55
"type": "commonjs",
66
"main": "./dist/index.js",

src/DigNetwork/ContentServer.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,16 @@ export class ContentServer {
8383
}
8484

8585
// Method to check if a specific store exists (HEAD request)
86-
public async headStore(): Promise<{
86+
public async headStore(options?: { hasRootHash: boolean}): Promise<{
8787
success: boolean;
8888
headers?: http.IncomingHttpHeaders;
8989
}> {
90-
const url = `https://${this.ipAddress}/${this.storeId}`;
91-
console.log({ url });
90+
let url = `https://${this.ipAddress}/${this.storeId}`;
91+
92+
if (options?.hasRootHash) {
93+
url += `hasRootHash=${options.hasRootHash}`;
94+
}
95+
9296
return this.head(url); // Return the object from head method
9397
}
9498

src/blockchain/DataStore.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ import { CreateStoreUserInputs } from "../types";
3636
import { askForStoreDetails } from "../prompts";
3737
import { FileCache } from "../utils/FileCache";
3838
import { DataStoreSerializer } from "./DataStoreSerializer";
39-
import { h } from "chia-bls";
4039

4140
const stat = promisify(fs.stat);
4241
const readdir = promisify(fs.readdir);

0 commit comments

Comments
 (0)