hyper-multisig 1.0.0 → 1.0.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/index.js +9 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -37,6 +37,8 @@ class HyperMultisig {
|
|
|
37
37
|
this.swarm = swarm
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
static getCoreKey = MultisigUtil.getCoreKey
|
|
41
|
+
|
|
40
42
|
/**
|
|
41
43
|
* @param {string[]} publicKeys
|
|
42
44
|
* @param {string} namespace
|
|
@@ -96,21 +98,28 @@ class HyperMultisig {
|
|
|
96
98
|
return new HyperMultisigRunner(async (runner) => {
|
|
97
99
|
await srcDrive.ready()
|
|
98
100
|
this.swarm.join(srcDrive.discoveryKey, { client: true, server: false })
|
|
101
|
+
runner.emit('getting-src-blobs')
|
|
99
102
|
await srcDrive.getBlobs()
|
|
100
103
|
length = length || srcDrive.core.length
|
|
101
104
|
|
|
102
105
|
if (!force) {
|
|
106
|
+
runner.emit('verify-db-requestable-start')
|
|
103
107
|
await MultisigUtil.verifyCoreRequestable(srcDrive.core, length, {
|
|
104
108
|
peerUpdateTimeout,
|
|
105
109
|
coreId: 'db'
|
|
106
110
|
})
|
|
111
|
+
|
|
112
|
+
runner.emit('getting-blobs-length')
|
|
107
113
|
const contentLength = await srcDrive.getBlobsLength(length)
|
|
114
|
+
|
|
115
|
+
runner.emit('verify-blobs-requestable-start')
|
|
108
116
|
await MultisigUtil.verifyCoreRequestable(srcDrive.blobs.core, contentLength, {
|
|
109
117
|
peerUpdateTimeout,
|
|
110
118
|
coreId: 'blobs'
|
|
111
119
|
})
|
|
112
120
|
}
|
|
113
121
|
|
|
122
|
+
runner.emit('creating-drive')
|
|
114
123
|
const manifest = MultisigUtil.getManifest(publicKeys, namespace, { quorum })
|
|
115
124
|
const request = await SignRequest.generateDrive(srcDrive, { manifest, length })
|
|
116
125
|
return { manifest, request }
|