hypercore-signing-request 4.0.1 → 5.0.0

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.
Files changed (2) hide show
  1. package/index.js +1 -4
  2. package/package.json +4 -5
package/index.js CHANGED
@@ -108,10 +108,7 @@ async function generateDrive (drive, { length = drive.core.length, fork = drive.
108
108
  if (!manifest) manifest = drive.core.manifest
109
109
  if (manifest < 1) throw new Error('Only v1 manifests are supported')
110
110
 
111
- const last = await drive.db.getBySeq(length - 1)
112
- const { blockOffset, blockLength } = last.value.blob
113
-
114
- const contentLength = blockOffset + blockLength
111
+ const contentLength = await drive.getBlobsLength(length)
115
112
  const content = {
116
113
  length: contentLength,
117
114
  treeHash: await drive.blobs.core.treeHash(contentLength)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore-signing-request",
3
- "version": "4.0.1",
3
+ "version": "5.0.0",
4
4
  "description": "Generate shareable signing requests for Hypercore",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -11,9 +11,9 @@
11
11
  ],
12
12
  "dependencies": {
13
13
  "compact-encoding": "^2.13.0",
14
- "hypercore": "^10.32.8",
14
+ "hypercore": "^11.0.0",
15
15
  "hypercore-id-encoding": "^1.2.0",
16
- "hyperdrive": "^11.8.1"
16
+ "hyperdrive": "^12.0.0"
17
17
  },
18
18
  "repository": {
19
19
  "type": "git",
@@ -27,8 +27,7 @@
27
27
  "homepage": "https://github.com/holepunchto/hypercore-signing-request",
28
28
  "devDependencies": {
29
29
  "brittle": "^3.4.0",
30
- "corestore": "^6.17.0",
31
- "random-access-memory": "^6.2.0",
30
+ "corestore": "^7.0.0",
32
31
  "standard": "^17.1.0"
33
32
  }
34
33
  }