diff --git a/CHANGELOG.md b/CHANGELOG.md index 71301d1..36ad6d1 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.52](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.51...v0.0.1-alpha.52) (2024-09-20) + + +### Features + +* phase out manifest file ([8d037e6](https://github.com/DIG-Network/dig-chia-sdk/commit/8d037e67372124120534280ddeecdf88831c4191)) + ### [0.0.1-alpha.51](https://github.com/DIG-Network/dig-chia-sdk/compare/v0.0.1-alpha.50...v0.0.1-alpha.51) (2024-09-20) diff --git a/package-lock.json b/package-lock.json index 636b43a..ddcabca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.51", + "version": "0.0.1-alpha.52", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.51", + "version": "0.0.1-alpha.52", "license": "ISC", "dependencies": { "@dignetwork/datalayer-driver": "^0.1.24", diff --git a/package.json b/package.json index 6677ec8..0df75ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dignetwork/dig-sdk", - "version": "0.0.1-alpha.51", + "version": "0.0.1-alpha.52", "description": "", "type": "commonjs", "main": "./dist/index.js", diff --git a/src/DigNetwork/PropagationServer.ts b/src/DigNetwork/PropagationServer.ts index 910f755..daf9178 100644 --- a/src/DigNetwork/PropagationServer.ts +++ b/src/DigNetwork/PropagationServer.ts @@ -125,7 +125,10 @@ export class PropagationServer { password = credentials.password; } - const uploadDetails = await this.fetchUploadDetails(username, password); + const wallet = await Wallet.load("default"); + const publicKey = await wallet.getPublicSyntheticKey(); + + const uploadDetails = await this.fetchUploadDetails(username, password, publicKey.toString("hex")); if (!uploadDetails) { throw new Error("Failed to retrieve upload details."); } @@ -177,7 +180,8 @@ export class PropagationServer { // Method to fetch upload details from the server private async fetchUploadDetails( username: string, - password: string + password: string, + publicKey: string ): Promise< { nonce: string; lastUploadedHash: string; generationIndex: number } | false > { @@ -198,6 +202,7 @@ export class PropagationServer { Authorization: `Basic ${Buffer.from( `${username}:${password}` ).toString("base64")}`, + 'X-Public-Key': publicKey, }, key: fs.readFileSync(PropagationServer.keyPath), cert: fs.readFileSync(PropagationServer.certPath),