@johnhenry/browsermesh-apps 0.4.1 → 0.4.2
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/package.json
CHANGED
|
@@ -362,7 +362,7 @@ export class EncryptedBlobStore {
|
|
|
362
362
|
|
|
363
363
|
// Upload ciphertext to peer
|
|
364
364
|
const path = `.encrypted-blobs/${cid}`
|
|
365
|
-
await this.#fileClient.writeFile(path, ciphertext)
|
|
365
|
+
await this.#fileClient.writeFile(peerId, path, ciphertext)
|
|
366
366
|
|
|
367
367
|
this.#onLog(2, `Uploaded encrypted blob ${cid} to peer ${peerId}`)
|
|
368
368
|
|
|
@@ -405,7 +405,7 @@ export class EncryptedBlobStore {
|
|
|
405
405
|
|
|
406
406
|
// Download ciphertext from peer
|
|
407
407
|
const path = `.encrypted-blobs/${cid}`
|
|
408
|
-
const result = await this.#fileClient.readFile(path)
|
|
408
|
+
const result = await this.#fileClient.readFile(peerId, path)
|
|
409
409
|
const ciphertext = result.data instanceof Uint8Array
|
|
410
410
|
? result.data
|
|
411
411
|
: new TextEncoder().encode(result.data)
|
|
@@ -440,7 +440,7 @@ export class EncryptedBlobStore {
|
|
|
440
440
|
this.#onLog(2, `Deleting blob ${cid} from peer ${peerId}`)
|
|
441
441
|
|
|
442
442
|
const path = `.encrypted-blobs/${cid}`
|
|
443
|
-
await this.#fileClient.deleteFile(path)
|
|
443
|
+
await this.#fileClient.deleteFile(peerId, path)
|
|
444
444
|
|
|
445
445
|
// Remove from manifest
|
|
446
446
|
const deleted = this.#manifest.delete(cid)
|
|
@@ -471,7 +471,7 @@ export class EncryptedBlobStore {
|
|
|
471
471
|
this.#onLog(2, `Verifying blob ${cid} on peer ${peerId}`)
|
|
472
472
|
|
|
473
473
|
const path = `.encrypted-blobs/${cid}`
|
|
474
|
-
const result = await this.#fileClient.readFile(path)
|
|
474
|
+
const result = await this.#fileClient.readFile(peerId, path)
|
|
475
475
|
const ciphertext = result.data instanceof Uint8Array
|
|
476
476
|
? result.data
|
|
477
477
|
: new TextEncoder().encode(result.data)
|