hyper-multisig-cli 1.1.0 → 1.1.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/bin.js +24 -10
- package/package.json +2 -2
package/bin.js
CHANGED
|
@@ -3,7 +3,6 @@ const Corestore = require('corestore')
|
|
|
3
3
|
const fs = require('fs').promises
|
|
4
4
|
const goodbye = require('graceful-goodbye')
|
|
5
5
|
const Multisig = require('hyper-multisig')
|
|
6
|
-
const MultisigUtil = require('hyper-multisig/lib/util')
|
|
7
6
|
const idEnc = require('hypercore-id-encoding')
|
|
8
7
|
const SignRequest = require('hypercore-signing-request')
|
|
9
8
|
const Hyperdrive = require('hyperdrive')
|
|
@@ -65,7 +64,7 @@ const cmd = command(
|
|
|
65
64
|
|
|
66
65
|
async function link() {
|
|
67
66
|
const { publicKeys, namespace } = await setup({ withReplication: false, srcKeyRequired: false })
|
|
68
|
-
const key =
|
|
67
|
+
const key = Multisig.getCoreKey(publicKeys, namespace)
|
|
69
68
|
console.info(`pear://${idEnc.normalize(key)}`)
|
|
70
69
|
}
|
|
71
70
|
|
|
@@ -75,7 +74,6 @@ async function request() {
|
|
|
75
74
|
if (!length) throw new Error('Invalid command')
|
|
76
75
|
|
|
77
76
|
const { type, publicKeys, namespace, srcKey, quorum, store, swarm } = await setup()
|
|
78
|
-
|
|
79
77
|
const multisig = new Multisig(store, swarm)
|
|
80
78
|
|
|
81
79
|
let request
|
|
@@ -91,13 +89,29 @@ async function request() {
|
|
|
91
89
|
request = res.request
|
|
92
90
|
} else {
|
|
93
91
|
const srcDrive = new Hyperdrive(store, idEnc.decode(srcKey))
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
const req = await multisig.requestDrive(publicKeys, namespace, srcDrive, length, {
|
|
93
|
+
force,
|
|
94
|
+
peerUpdateTimeout: peerUpdateTimeout,
|
|
95
|
+
quorum
|
|
96
|
+
})
|
|
97
|
+
|
|
98
|
+
req.on('getting-src-blobs', () => {
|
|
99
|
+
console.log('Getting the source blobs...')
|
|
100
|
+
})
|
|
101
|
+
req.on('verify-db-requestable-start', () => {
|
|
102
|
+
console.log('Verifying the db core is requestable....')
|
|
103
|
+
})
|
|
104
|
+
req.on('getting-blobs-length', () => {
|
|
105
|
+
console.log('Getting the blobs length (this can take a while)...')
|
|
106
|
+
})
|
|
107
|
+
req.on('verify-blobs-requestable-start', () => {
|
|
108
|
+
console.log('Verifying the blobs core is requestable...')
|
|
109
|
+
})
|
|
110
|
+
req.on('creating-drive', () => {
|
|
111
|
+
console.log('Creating the drive...')
|
|
112
|
+
})
|
|
113
|
+
|
|
114
|
+
const res = await req.done()
|
|
101
115
|
request = res.request
|
|
102
116
|
}
|
|
103
117
|
printRequest(request)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hyper-multisig-cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "CLI of hyper-multisig",
|
|
5
5
|
"main": "bin.js",
|
|
6
6
|
"bin": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"bare-fs": "^4.5.4",
|
|
22
22
|
"corestore": "^7.8.0",
|
|
23
23
|
"graceful-goodbye": "^1.3.3",
|
|
24
|
-
"hyper-multisig": "^1.0.
|
|
24
|
+
"hyper-multisig": "^1.0.2",
|
|
25
25
|
"hypercore-id-encoding": "^1.3.0",
|
|
26
26
|
"hypercore-signing-request": "^4.0.2",
|
|
27
27
|
"hyperdrive": "^13.2.1",
|