hypercore 11.0.30 → 11.0.31
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/index.js +8 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -935,11 +935,18 @@ class Hypercore extends EventEmitter {
|
|
|
935
935
|
async proof (opts) {
|
|
936
936
|
if (this.opened === false) await this.opening
|
|
937
937
|
const rx = this.state.storage.read()
|
|
938
|
-
const promise = MerkleTree.proof(this.state, rx)
|
|
938
|
+
const promise = MerkleTree.proof(this.state, rx, opts)
|
|
939
939
|
rx.tryFlush()
|
|
940
940
|
return promise
|
|
941
941
|
}
|
|
942
942
|
|
|
943
|
+
async verifyFullyRemote (proof) {
|
|
944
|
+
if (this.opened === false) await this.opening
|
|
945
|
+
const batch = await MerkleTree.verifyFullyRemote(this.state, proof)
|
|
946
|
+
await this.core._verifyBatchUpgrade(batch, proof.manifest)
|
|
947
|
+
return batch
|
|
948
|
+
}
|
|
949
|
+
|
|
943
950
|
registerExtension (name, handlers = {}) {
|
|
944
951
|
if (this.extensions.has(name)) {
|
|
945
952
|
const ext = this.extensions.get(name)
|