@ledgerhq/vault-cli 1.52.4 → 1.52.6
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +16 -0
- package/bin/__tests__/genKeys.test.js +3 -7
- package/bin/__tests__/genKeys.test.js.map +1 -1
- package/bin/commands/genKeys.d.ts +1 -5
- package/bin/commands/genKeys.d.ts.map +1 -1
- package/bin/commands/genKeys.js +3 -22
- package/bin/commands/genKeys.js.map +1 -1
- package/bin/commands/index.d.ts +1 -5
- package/bin/commands/index.d.ts.map +1 -1
- package/bin/manifests/tradelink.json +12 -12
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @ledgerhq/vault-cli
|
|
2
2
|
|
|
3
|
+
## 1.52.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2d5ef26: refactor: export `genKeys` from vault-common
|
|
8
|
+
- 9e79434: fix tradelink preset
|
|
9
|
+
- Updated dependencies [2d5ef26]
|
|
10
|
+
- @ledgerhq/vault-common@1.60.2
|
|
11
|
+
|
|
12
|
+
## 1.52.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [9d77f64]
|
|
17
|
+
- @ledgerhq/vault-common@1.60.1
|
|
18
|
+
|
|
3
19
|
## 1.52.4
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -5,17 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const genKeys_1 = __importDefault(require("../commands/genKeys"));
|
|
7
7
|
describe("genKeys", () => {
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
jest.spyOn(console, "log").mockImplementation();
|
|
10
|
-
});
|
|
11
8
|
afterEach(() => {
|
|
12
9
|
jest.restoreAllMocks();
|
|
13
10
|
});
|
|
14
11
|
it("should generate priv/pub keys", () => {
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
expect(
|
|
18
|
-
expect(output.hexPubKey).toBeDefined();
|
|
12
|
+
const spyConsole = jest.spyOn(console, "log").mockImplementation();
|
|
13
|
+
genKeys_1.default.run();
|
|
14
|
+
expect(spyConsole).toHaveBeenCalledWith(expect.any(String));
|
|
19
15
|
});
|
|
20
16
|
});
|
|
21
17
|
//# sourceMappingURL=genKeys.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genKeys.test.js","sourceRoot":"","sources":["../../src/__tests__/genKeys.test.ts"],"names":[],"mappings":";;;;;AAAA,kEAA0C;AAE1C,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,
|
|
1
|
+
{"version":3,"file":"genKeys.test.js","sourceRoot":"","sources":["../../src/__tests__/genKeys.test.ts"],"names":[],"mappings":";;;;;AAAA,kEAA0C;AAE1C,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACvC,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,kBAAkB,EAAE,CAAC;QACnE,iBAAO,CAAC,GAAG,EAAE,CAAC;QACd,MAAM,CAAC,UAAU,CAAC,CAAC,oBAAoB,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -2,11 +2,7 @@ declare const _default: {
|
|
|
2
2
|
command: string;
|
|
3
3
|
description: string;
|
|
4
4
|
options: never[];
|
|
5
|
-
run: () =>
|
|
6
|
-
privateKey: string;
|
|
7
|
-
publicKey: string;
|
|
8
|
-
hexPubKey: string;
|
|
9
|
-
};
|
|
5
|
+
run: () => void;
|
|
10
6
|
};
|
|
11
7
|
export default _default;
|
|
12
8
|
//# sourceMappingURL=genKeys.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genKeys.d.ts","sourceRoot":"","sources":["../../src/commands/genKeys.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"genKeys.d.ts","sourceRoot":"","sources":["../../src/commands/genKeys.ts"],"names":[],"mappings":";;;;;;AAEA,wBASE"}
|
package/bin/commands/genKeys.js
CHANGED
|
@@ -1,32 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
function extractPublicKey(pemKey) {
|
|
5
|
-
const pem = pemKey.split("\n");
|
|
6
|
-
pem.shift();
|
|
7
|
-
pem.pop();
|
|
8
|
-
const keyBuffer = Buffer.from(pem.join(""), "base64");
|
|
9
|
-
const actualKeyBuffer = keyBuffer.slice(26);
|
|
10
|
-
return actualKeyBuffer.toString("hex");
|
|
11
|
-
}
|
|
3
|
+
const utils_1 = require("@ledgerhq/vault-common/lib/crypto/utils");
|
|
12
4
|
exports.default = {
|
|
13
5
|
command: "genKeys",
|
|
14
6
|
description: "Generate API user keys",
|
|
15
7
|
options: [],
|
|
16
8
|
run: () => {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
publicKeyEncoding: { type: "spki", format: "pem" },
|
|
20
|
-
privateKeyEncoding: { type: "sec1", format: "pem" },
|
|
21
|
-
});
|
|
22
|
-
const hexPubKey = extractPublicKey(publicKey);
|
|
23
|
-
const output = {
|
|
24
|
-
privateKey,
|
|
25
|
-
publicKey,
|
|
26
|
-
hexPubKey,
|
|
27
|
-
};
|
|
28
|
-
console.log(JSON.stringify(output, null, 2));
|
|
29
|
-
return output;
|
|
9
|
+
const keys = (0, utils_1.genKeys)();
|
|
10
|
+
console.log(JSON.stringify(keys, null, 2));
|
|
30
11
|
},
|
|
31
12
|
};
|
|
32
13
|
//# sourceMappingURL=genKeys.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genKeys.js","sourceRoot":"","sources":["../../src/commands/genKeys.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"genKeys.js","sourceRoot":"","sources":["../../src/commands/genKeys.ts"],"names":[],"mappings":";;AAAA,mEAAkE;AAElE,kBAAe;IACb,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,wBAAwB;IACrC,OAAO,EAAE,EAAE;IACX,GAAG,EAAE,GAAG,EAAE;QACR,MAAM,IAAI,GAAG,IAAA,eAAO,GAAE,CAAC;QAEvB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;CACF,CAAC"}
|
package/bin/commands/index.d.ts
CHANGED
|
@@ -600,11 +600,7 @@ declare const _default: {
|
|
|
600
600
|
command: string;
|
|
601
601
|
description: string;
|
|
602
602
|
options: never[];
|
|
603
|
-
run: () =>
|
|
604
|
-
privateKey: string;
|
|
605
|
-
publicKey: string;
|
|
606
|
-
hexPubKey: string;
|
|
607
|
-
};
|
|
603
|
+
run: () => void;
|
|
608
604
|
} | {
|
|
609
605
|
command: string;
|
|
610
606
|
description: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmEA,wBAqCE"}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
"12": "Grace Bybit 12",
|
|
6
6
|
"13": "Mileva CC 13",
|
|
7
7
|
"14": "Adi CC 14",
|
|
8
|
-
"15": "David
|
|
9
|
-
"16": "Claus
|
|
8
|
+
"15": "David Winterm 15",
|
|
9
|
+
"16": "Claus Comply 16"
|
|
10
10
|
},
|
|
11
11
|
"users": {
|
|
12
|
-
"operators": [10, 11, 12, 13, 14, 15, 16
|
|
12
|
+
"operators": [10, 11, 12, 13, 14, 15, 16]
|
|
13
13
|
},
|
|
14
14
|
"groups": [
|
|
15
15
|
{
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"name": "Oneof whitelist",
|
|
44
44
|
"addresses": [
|
|
45
45
|
{
|
|
46
|
-
"address": "
|
|
46
|
+
"address": "tb1q645fc9qjq4h9779ph2f2ade5mpqprhr2k68mtj",
|
|
47
47
|
"currency": "bitcoin_testnet"
|
|
48
48
|
}
|
|
49
49
|
]
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"addresses": [
|
|
55
55
|
{
|
|
56
56
|
"name": "BTC Liquidity n0",
|
|
57
|
-
"address": "
|
|
57
|
+
"address": "tb1qa87hqcqhec3g7dv03gncherlpvfh6wwt8nevnu",
|
|
58
58
|
"currency": "bitcoin_testnet"
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"name": "BTC Reserves n1",
|
|
62
|
-
"address": "
|
|
62
|
+
"address": "tb1q7893kjx6gemqh4jpg5kld5r0qadmemu9kt6jxg",
|
|
63
63
|
"currency": "bitcoin_testnet"
|
|
64
64
|
}
|
|
65
65
|
]
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"addresses": [
|
|
71
71
|
{
|
|
72
72
|
"name": "Binance n0",
|
|
73
|
-
"address": "
|
|
73
|
+
"address": "tb1qa87hqcqhec3g7dv03gncherlpvfh6wwt8nevnu",
|
|
74
74
|
"currency": "bitcoin_testnet"
|
|
75
75
|
},
|
|
76
76
|
{
|
|
77
77
|
"name": "Kraken n1",
|
|
78
|
-
"address": "
|
|
78
|
+
"address": "tb1q7893kjx6gemqh4jpg5kld5r0qadmemu9kt6jxg",
|
|
79
79
|
"currency": "bitcoin_testnet"
|
|
80
80
|
}
|
|
81
81
|
]
|
|
@@ -86,12 +86,12 @@
|
|
|
86
86
|
"addresses": [
|
|
87
87
|
{
|
|
88
88
|
"name": "Binance n0",
|
|
89
|
-
"address": "
|
|
89
|
+
"address": "tb1qa87hqcqhec3g7dv03gncherlpvfh6wwt8nevnu",
|
|
90
90
|
"currency": "bitcoin_testnet"
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"name": "Kraken n1",
|
|
94
|
-
"address": "
|
|
94
|
+
"address": "tb1q7893kjx6gemqh4jpg5kld5r0qadmemu9kt6jxg",
|
|
95
95
|
"currency": "bitcoin_testnet"
|
|
96
96
|
}
|
|
97
97
|
]
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
"addresses": [
|
|
103
103
|
{
|
|
104
104
|
"name": "Binance n0",
|
|
105
|
-
"address": "
|
|
105
|
+
"address": "tb1qa87hqcqhec3g7dv03gncherlpvfh6wwt8nevnu",
|
|
106
106
|
"currency": "bitcoin_testnet"
|
|
107
107
|
},
|
|
108
108
|
{
|
|
109
109
|
"name": "Kraken n1",
|
|
110
|
-
"address": "
|
|
110
|
+
"address": "tb1q7893kjx6gemqh4jpg5kld5r0qadmemu9kt6jxg",
|
|
111
111
|
"currency": "bitcoin_testnet"
|
|
112
112
|
}
|
|
113
113
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/vault-cli",
|
|
3
|
-
"version": "1.52.
|
|
3
|
+
"version": "1.52.6",
|
|
4
4
|
"description": "A various utility command-line for Vault development",
|
|
5
5
|
"homepage": "https://github.com/LedgerHQ/vault-ts",
|
|
6
6
|
"license": "BSD-2-Clause",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"qs": "^6.11.2",
|
|
36
36
|
"@ledgerhq/coin-check": "0.4.1",
|
|
37
37
|
"@ledgerhq/live-common-stub": "1.5.1",
|
|
38
|
-
"@ledgerhq/vault-common": "1.60.
|
|
38
|
+
"@ledgerhq/vault-common": "1.60.2",
|
|
39
39
|
"@ledgerhq/vault-utils": "1.0.0"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|