@ledgerhq/vault-cli 1.52.5 → 1.52.7

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @ledgerhq/vault-cli@1.52.5 build /home/runner/work/vault-ts/vault-ts/apps/cli
2
+ > @ledgerhq/vault-cli@1.52.7 build /home/runner/work/vault-ts/vault-ts/apps/cli
3
3
  > tsc && chmod +x bin/index.js
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @ledgerhq/vault-cli
2
2
 
3
+ ## 1.52.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [326b905]
8
+ - Updated dependencies [cc83740]
9
+ - @ledgerhq/vault-common@1.61.0
10
+
11
+ ## 1.52.6
12
+
13
+ ### Patch Changes
14
+
15
+ - 2d5ef26: refactor: export `genKeys` from vault-common
16
+ - 9e79434: fix tradelink preset
17
+ - Updated dependencies [2d5ef26]
18
+ - @ledgerhq/vault-common@1.60.2
19
+
3
20
  ## 1.52.5
4
21
 
5
22
  ### 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 output = genKeys_1.default.run();
16
- expect(output.privateKey).toBeDefined();
17
- expect(output.publicKey).toBeDefined();
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,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,kBAAkB,EAAE,CAAC;IAClD,CAAC,CAAC,CAAC;IACH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;QACvC,MAAM,MAAM,GAAG,iBAAO,CAAC,GAAG,EAAE,CAAC;QAC7B,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,WAAW,EAAE,CAAC;QACxC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;QACvC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
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":";;;;;;;;;;AAgBA,wBAwBE"}
1
+ {"version":3,"file":"genKeys.d.ts","sourceRoot":"","sources":["../../src/commands/genKeys.ts"],"names":[],"mappings":";;;;;;AAEA,wBASE"}
@@ -1,32 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const crypto_1 = require("crypto");
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 { publicKey, privateKey } = (0, crypto_1.generateKeyPairSync)("ec", {
18
- namedCurve: "P-256",
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,mCAA6C;AAE7C,SAAS,gBAAgB,CAAC,MAAc;IAGtC,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC/B,GAAG,CAAC,KAAK,EAAE,CAAC;IACZ,GAAG,CAAC,GAAG,EAAE,CAAC;IAEV,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,CAAC;IAGtD,MAAM,eAAe,GAAG,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC5C,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACzC,CAAC;AAED,kBAAe;IACb,OAAO,EAAE,SAAS;IAClB,WAAW,EAAE,wBAAwB;IACrC,OAAO,EAAE,EAAE;IACX,GAAG,EAAE,GAAG,EAAE;QACR,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,IAAA,4BAAmB,EAAC,IAAI,EAAE;YAC1D,UAAU,EAAE,OAAO;YACnB,iBAAiB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE;YAClD,kBAAkB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE;SACpD,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAE9C,MAAM,MAAM,GAAG;YACb,UAAU;YACV,SAAS;YACT,SAAS;SACV,CAAC;QAGF,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAE7C,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC"}
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"}
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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 Wintermute 15",
9
- "16": "Claus-P Compliance 16"
8
+ "15": "David Winterm 15",
9
+ "16": "Claus Comply 16"
10
10
  },
11
11
  "users": {
12
- "operators": [10, 11, 12, 13, 14, 15, 16, 17, 18, 19]
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": "mmizX66rU546AD6A5BBd7qKoyBKBwJWD4h",
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": "tb1q43fephkeus6nwm4rm9lmdj76fnvzg0zredn6zj",
57
+ "address": "tb1qa87hqcqhec3g7dv03gncherlpvfh6wwt8nevnu",
58
58
  "currency": "bitcoin_testnet"
59
59
  },
60
60
  {
61
61
  "name": "BTC Reserves n1",
62
- "address": "tb1ql9alat2s3n85ayfpnp46d8egm689ny5jkln2wp",
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": "tb1q43fephkeus6nwm4rm9lmdj76fnvzg0zredn6zj",
73
+ "address": "tb1qa87hqcqhec3g7dv03gncherlpvfh6wwt8nevnu",
74
74
  "currency": "bitcoin_testnet"
75
75
  },
76
76
  {
77
77
  "name": "Kraken n1",
78
- "address": "tb1ql9alat2s3n85ayfpnp46d8egm689ny5jkln2wp",
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": "tb1q43fephkeus6nwm4rm9lmdj76fnvzg0zredn6zj",
89
+ "address": "tb1qa87hqcqhec3g7dv03gncherlpvfh6wwt8nevnu",
90
90
  "currency": "bitcoin_testnet"
91
91
  },
92
92
  {
93
93
  "name": "Kraken n1",
94
- "address": "tb1ql9alat2s3n85ayfpnp46d8egm689ny5jkln2wp",
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": "tb1q43fephkeus6nwm4rm9lmdj76fnvzg0zredn6zj",
105
+ "address": "tb1qa87hqcqhec3g7dv03gncherlpvfh6wwt8nevnu",
106
106
  "currency": "bitcoin_testnet"
107
107
  },
108
108
  {
109
109
  "name": "Kraken n1",
110
- "address": "tb1ql9alat2s3n85ayfpnp46d8egm689ny5jkln2wp",
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.5",
3
+ "version": "1.52.7",
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.1",
38
+ "@ledgerhq/vault-common": "1.61.0",
39
39
  "@ledgerhq/vault-utils": "1.0.0"
40
40
  },
41
41
  "devDependencies": {