ln-docker-daemons 2.2.0 → 2.2.1
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/CHANGELOG.md +1 -1
- package/lnd/spawn_lnd_docker.js +8 -20
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/lnd/spawn_lnd_docker.js
CHANGED
|
@@ -139,40 +139,28 @@ module.exports = (args, cbk) => {
|
|
|
139
139
|
cipher_seed_mnemonic: res.cipher_seed_mnemonic,
|
|
140
140
|
wallet_password: Buffer.from('password', 'utf8'),
|
|
141
141
|
},
|
|
142
|
-
err => {
|
|
142
|
+
(err, res) => {
|
|
143
143
|
if (!!err) {
|
|
144
144
|
return cbk([503, 'UnexpectedErrorInitializingWallet', {err}]);
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
return cbk();
|
|
147
|
+
return cbk(null, res.admin_macaroon);
|
|
148
148
|
});
|
|
149
149
|
});
|
|
150
150
|
},
|
|
151
151
|
cbk);
|
|
152
152
|
}],
|
|
153
153
|
|
|
154
|
-
// Get the macaroon out of the docker image
|
|
155
|
-
getMacaroon: [
|
|
156
|
-
'createWallet',
|
|
157
|
-
'spawnDocker',
|
|
158
|
-
({createWallet, spawnDocker}, cbk) =>
|
|
159
|
-
{
|
|
160
|
-
return asyncRetry({interval, times}, cbk => {
|
|
161
|
-
return spawnDocker.getFile({path: macaroonPath}, cbk);
|
|
162
|
-
},
|
|
163
|
-
cbk);
|
|
164
|
-
}],
|
|
165
|
-
|
|
166
154
|
// Wait for gRPC to respond
|
|
167
155
|
waitForRpc: [
|
|
156
|
+
'createWallet',
|
|
168
157
|
'getCertificate',
|
|
169
|
-
'getMacaroon',
|
|
170
158
|
'spawnDocker',
|
|
171
|
-
({
|
|
159
|
+
({createWallet, getCertificate, spawnDocker}, cbk) =>
|
|
172
160
|
{
|
|
173
161
|
const {lnd} = authenticatedLndGrpc({
|
|
174
162
|
cert: getCertificate.file.toString('hex'),
|
|
175
|
-
macaroon:
|
|
163
|
+
macaroon: createWallet.toString('hex'),
|
|
176
164
|
socket: `localhost:${args.rpc_port}`,
|
|
177
165
|
});
|
|
178
166
|
|
|
@@ -184,17 +172,17 @@ module.exports = (args, cbk) => {
|
|
|
184
172
|
|
|
185
173
|
// LND fully spawned
|
|
186
174
|
spawned: [
|
|
175
|
+
'createWallet',
|
|
187
176
|
'getCertificate',
|
|
188
|
-
'getMacaroon',
|
|
189
177
|
'spawnDocker',
|
|
190
178
|
'waitForRpc',
|
|
191
|
-
({
|
|
179
|
+
({createWallet, getCertificate, spawnDocker, waitForRpc}, cbk) =>
|
|
192
180
|
{
|
|
193
181
|
return cbk(null, {
|
|
194
182
|
cert: getCertificate.file.toString('base64'),
|
|
195
183
|
host: spawnDocker.host,
|
|
196
184
|
kill: spawnDocker.kill,
|
|
197
|
-
macaroon:
|
|
185
|
+
macaroon: createWallet.toString('hex'),
|
|
198
186
|
public_key: waitForRpc.public_key,
|
|
199
187
|
socket: `localhost:${args.rpc_port}`,
|
|
200
188
|
});
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"asyncjs-util": "1.2.8",
|
|
13
13
|
"dockerode": "3.3.1",
|
|
14
14
|
"find-free-ports": "3.0.0",
|
|
15
|
-
"lightning": "5.
|
|
15
|
+
"lightning": "5.4.1",
|
|
16
16
|
"tar-stream": "2.2.0"
|
|
17
17
|
},
|
|
18
18
|
"description": "Spawn and control LN Docker daemons",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"scripts": {
|
|
36
36
|
"test": "tap --branches=1 --functions=1 --lines=1 --statements=1 -j 1 test/bitcoind/*.js test/lnd/*.js"
|
|
37
37
|
},
|
|
38
|
-
"version": "2.2.
|
|
38
|
+
"version": "2.2.1"
|
|
39
39
|
}
|