hyper-multisig-cli 1.5.0 → 1.6.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.
- package/bin.js +9 -3
- package/package.json +1 -1
package/bin.js
CHANGED
|
@@ -33,6 +33,8 @@ const cmdVerify = command(
|
|
|
33
33
|
'--first-commit',
|
|
34
34
|
'Set when this is the first commit to the multisig target, so it skips those checks'
|
|
35
35
|
),
|
|
36
|
+
flag('--skip-target-well-seeded', 'Skip checking multisig target is well seeded'),
|
|
37
|
+
|
|
36
38
|
flag('--peer-update-timeout <ms>', 'Peer update timeout in ms'),
|
|
37
39
|
arg('request', 'Signing request'),
|
|
38
40
|
rest('[...responses]', 'Signing responses'),
|
|
@@ -139,11 +141,11 @@ async function request() {
|
|
|
139
141
|
}
|
|
140
142
|
|
|
141
143
|
async function verify() {
|
|
142
|
-
const { firstCommit, peerUpdateTimeout } = cmdVerify.flags
|
|
144
|
+
const { firstCommit, peerUpdateTimeout, skipTargetWellSeeded } = cmdVerify.flags
|
|
143
145
|
const request = cmdVerify.args.request
|
|
144
146
|
const responses = cmdVerify.rest || []
|
|
145
147
|
if (!request) throw new Error('Invalid command')
|
|
146
|
-
console.info(`
|
|
148
|
+
console.info(`Verifying request ${request}`)
|
|
147
149
|
console.info(`Responses:\n -${responses.join('\n -')}`)
|
|
148
150
|
|
|
149
151
|
const { type, publicKeys, namespace, srcKey, quorum, store, swarm } = await setup()
|
|
@@ -155,7 +157,9 @@ async function verify() {
|
|
|
155
157
|
runner = multisig.commitCore(publicKeys, namespace, srcCore, request, responses, {
|
|
156
158
|
dryRun: true,
|
|
157
159
|
skipTargetChecks: firstCommit,
|
|
160
|
+
skipTargetWellSeeded,
|
|
158
161
|
peerUpdateTimeout: peerUpdateTimeout,
|
|
162
|
+
swarmAsServer: false,
|
|
159
163
|
quorum
|
|
160
164
|
})
|
|
161
165
|
} else {
|
|
@@ -163,7 +167,9 @@ async function verify() {
|
|
|
163
167
|
runner = multisig.commitDrive(publicKeys, namespace, srcDrive, request, responses, {
|
|
164
168
|
dryRun: true,
|
|
165
169
|
skipTargetChecks: firstCommit,
|
|
170
|
+
skipTargetWellSeeded,
|
|
166
171
|
peerUpdateTimeout: peerUpdateTimeout,
|
|
172
|
+
swarmAsServer: false,
|
|
167
173
|
quorum
|
|
168
174
|
})
|
|
169
175
|
}
|
|
@@ -316,7 +322,7 @@ function setupProgressLogs(req, name, firstCommit, dryRun) {
|
|
|
316
322
|
)
|
|
317
323
|
})
|
|
318
324
|
req.on('commit-start', () => {
|
|
319
|
-
console.log(dryRun ? `Dry
|
|
325
|
+
console.log(dryRun ? `Dry running the ${name} commit` : `Committing the ${name}...`)
|
|
320
326
|
})
|
|
321
327
|
req.on('verify-committed-start', (key) => {
|
|
322
328
|
console.log(`Committed the ${name}, key ${idEnc.normalize(key)} (hex: ${key.toString('hex')})`)
|