@ledgerhq/live-cli 24.7.0 → 24.7.1-next.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/README.md CHANGED
@@ -376,6 +376,40 @@ Usage: ledger-live i18n # Test e2e functionality for device localization s
376
376
  Usage: ledger-live listApps # list all installed apps on the device
377
377
  -d, --device <String> : provide a specific HID path of a device
378
378
 
379
+ Usage: ledger-live ledgerKeyRingProtocol # Ledger Key Ring Protocol command
380
+ -d, --device <String> : provide a specific HID path of a device
381
+ --initMemberCredentials : Init member credentials for Ledger Key Ring Protocol
382
+ --getKeyRingTree : Get or create a Ledger Key Ring Protocol Tree
383
+ --encryptUserData : Encrypt user data with the current private key secured by the Ledger Key Ring Protocol
384
+ --decryptUserData : Encrypt user data with the current private key secured by the Ledger Key Ring Protocol
385
+ --getMembers : Get members of the Ledger Key Ring Protocol Tree
386
+ --restoreKeyRingTree : Restore a Ledger Key Ring Protocol Tree
387
+ --destroyKeyRingTree : Destroy a Ledger Key Ring Protocol Tree
388
+ --pubKey <String> : pubkey for Ledger Key Ring Protocol Tree retrieved from initMemberCredentials result
389
+ --privateKey <String> : privatekey for Ledger Key Ring Protocol Tree retrieved from initMemberCredentials result
390
+ --rootId <String> : The immutable id of the Tree root retrieved from getKeyRingTree result
391
+ --walletSyncEncryptionKey <String>: The secret used to encrypt/decrypt the wallet sync data retrieved from getKeyRingTree result
392
+ --applicationPath <String>: privatekey for Ledger Key Ring Protocol Tree from initMemberCredentials result
393
+ --message <String> : message to be encrypted/decrypted
394
+ --applicationId <Number> : application identifier
395
+ --name <String> : name of the instance
396
+ --apiBaseUrl <String> : api base url for Ledger Key Ring Protocol
397
+
398
+ Usage: ledger-live ledgerSync # Ledger Sync command
399
+ --push : Init member credentials for Ledger Key Ring Protocol
400
+ --pull : Get or create a Ledger Key Ring Protocol Tree
401
+ --pubKey <String> : pubkey for Ledger Key Ring Protocol Tree retrieved from initMemberCredentials result
402
+ --privateKey <String> : privatekey for Ledger Key Ring Protocol Tree retrieved from initMemberCredentials result
403
+ --rootId <String> : The immutable id of the Tree root retrieved from getKeyRingTree result
404
+ --walletSyncEncryptionKey <String>: The secret used to encrypt/decrypt the wallet sync data retrieved from getKeyRingTree result
405
+ --applicationPath <String>: privatekey for Ledger Key Ring Protocol Tree from initMemberCredentials result
406
+ --data <String> : data to be pushed to Ledger Sync
407
+ --version <Number> : version of the data
408
+ --applicationId <Number> : application identifier
409
+ --name <String> : name of the instance
410
+ --apiBaseUrl <String> : api base url for Ledger Key Ring Protocol
411
+ --cloudSyncApiBaseUrl <String>: api base url for Cloud Sync
412
+
379
413
  Usage: ledger-live liveData # utility for Ledger Live app.json file
380
414
  -d, --device <String> : provide a specific HID path of a device
381
415
  --xpub <String> : use an xpub (alternatively to --device) [DEPRECATED: prefer use of id]
@@ -0,0 +1,51 @@
1
+ declare const _default: {
2
+ description: string;
3
+ args: ({
4
+ name: string;
5
+ alias: string;
6
+ type: StringConstructor;
7
+ descOpt: string;
8
+ desc: string;
9
+ } | {
10
+ name: string;
11
+ type: BooleanConstructor;
12
+ desc: string;
13
+ default?: undefined;
14
+ } | {
15
+ name: string;
16
+ type: StringConstructor;
17
+ desc: string;
18
+ default?: undefined;
19
+ } | {
20
+ name: string;
21
+ type: NumberConstructor;
22
+ default: number;
23
+ desc: string;
24
+ } | {
25
+ name: string;
26
+ type: StringConstructor;
27
+ default: string;
28
+ desc: string;
29
+ })[];
30
+ job: ({ device, initMemberCredentials, getKeyRingTree, encryptUserData, decryptUserData, getMembers, restoreKeyRingTree, destroyKeyRingTree, pubKey, privateKey, rootId, walletSyncEncryptionKey, applicationPath, message, applicationId, name, apiBaseUrl, }: Partial<{
31
+ device: string;
32
+ initMemberCredentials: boolean;
33
+ getKeyRingTree: boolean;
34
+ getMembers: boolean;
35
+ encryptUserData: boolean;
36
+ decryptUserData: boolean;
37
+ restoreKeyRingTree: boolean;
38
+ destroyKeyRingTree: boolean;
39
+ pubKey: string;
40
+ privateKey: string;
41
+ rootId: string;
42
+ walletSyncEncryptionKey: string;
43
+ applicationPath: string;
44
+ message: string;
45
+ applicationId: number;
46
+ name: string;
47
+ apiBaseUrl: string;
48
+ }>) => Promise<string> | Promise<void> | "applicationId is required" | "name is required" | "apiBaseUrl is required" | Promise<import("@ledgerhq/ledger-key-ring-protocol/types").MemberCredentials> | "pubKey and privateKey are required" | Promise<import("@ledgerhq/ledger-key-ring-protocol/types").Trustchain> | "walletSyncEncryptionKey is required" | "applicationPath is required" | Promise<import("@ledgerhq/ledger-key-ring-protocol/types").TrustchainMember[]> | "rootId is required" | "message is required" | "command does not exist";
49
+ };
50
+ export default _default;
51
+ //# sourceMappingURL=ledgerKeyRingProtocol.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ledgerKeyRingProtocol.d.ts","sourceRoot":"","sources":["../../../src/commands/live/ledgerKeyRingProtocol.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAiHY,MAAM;+BACS,OAAO;wBACd,OAAO;oBACX,OAAO;yBACF,OAAO;yBACP,OAAO;4BACJ,OAAO;4BACP,OAAO;gBACnB,MAAM;oBACF,MAAM;gBACV,MAAM;iCACW,MAAM;yBACd,MAAM;iBACd,MAAM;uBACA,MAAM;cACf,MAAM;oBACA,MAAM;;;AA3HtB,wBA4LE"}
@@ -0,0 +1,157 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var index_1 = require("@ledgerhq/ledger-key-ring-protocol/index");
4
+ var hw_ledger_key_ring_protocol_1 = require("@ledgerhq/hw-ledger-key-ring-protocol");
5
+ var deviceAccess_1 = require("@ledgerhq/live-common/hw/deviceAccess");
6
+ var live_env_1 = require("@ledgerhq/live-env");
7
+ var scan_1 = require("../../scan");
8
+ exports.default = {
9
+ description: "Ledger Key Ring Protocol command",
10
+ args: [
11
+ scan_1.deviceOpt,
12
+ {
13
+ name: "initMemberCredentials",
14
+ type: Boolean,
15
+ desc: "Init member credentials for Ledger Key Ring Protocol",
16
+ },
17
+ {
18
+ name: "getKeyRingTree",
19
+ type: Boolean,
20
+ desc: "Get or create a Ledger Key Ring Protocol Tree",
21
+ },
22
+ {
23
+ name: "encryptUserData",
24
+ type: Boolean,
25
+ desc: "Encrypt user data with the current private key secured by the Ledger Key Ring Protocol",
26
+ },
27
+ {
28
+ name: "decryptUserData",
29
+ type: Boolean,
30
+ desc: "Encrypt user data with the current private key secured by the Ledger Key Ring Protocol",
31
+ },
32
+ {
33
+ name: "getMembers",
34
+ type: Boolean,
35
+ desc: "Get members of the Ledger Key Ring Protocol Tree",
36
+ },
37
+ {
38
+ name: "restoreKeyRingTree",
39
+ type: Boolean,
40
+ desc: "Restore a Ledger Key Ring Protocol Tree",
41
+ },
42
+ {
43
+ name: "destroyKeyRingTree",
44
+ type: Boolean,
45
+ desc: "Destroy a Ledger Key Ring Protocol Tree",
46
+ },
47
+ {
48
+ name: "pubKey",
49
+ type: String,
50
+ desc: "pubkey for Ledger Key Ring Protocol Tree retrieved from initMemberCredentials result",
51
+ },
52
+ {
53
+ name: "privateKey",
54
+ type: String,
55
+ desc: "privatekey for Ledger Key Ring Protocol Tree retrieved from initMemberCredentials result",
56
+ },
57
+ {
58
+ name: "rootId",
59
+ type: String,
60
+ desc: "The immutable id of the Tree root retrieved from getKeyRingTree result",
61
+ },
62
+ {
63
+ name: "walletSyncEncryptionKey",
64
+ type: String,
65
+ desc: "The secret used to encrypt/decrypt the wallet sync data retrieved from getKeyRingTree result",
66
+ },
67
+ {
68
+ name: "applicationPath",
69
+ type: String,
70
+ desc: "privatekey for Ledger Key Ring Protocol Tree from initMemberCredentials result",
71
+ },
72
+ {
73
+ name: "message",
74
+ type: String,
75
+ desc: "message to be encrypted/decrypted",
76
+ },
77
+ {
78
+ name: "applicationId",
79
+ type: Number,
80
+ default: 16,
81
+ desc: "application identifier",
82
+ },
83
+ {
84
+ name: "name",
85
+ type: String,
86
+ default: "CLI",
87
+ desc: "name of the instance",
88
+ },
89
+ {
90
+ name: "apiBaseUrl",
91
+ type: String,
92
+ default: (0, live_env_1.getEnv)("TRUSTCHAIN_API_STAGING"),
93
+ desc: "api base url for Ledger Key Ring Protocol",
94
+ },
95
+ ],
96
+ job: function (_a) {
97
+ var device = _a.device, initMemberCredentials = _a.initMemberCredentials, getKeyRingTree = _a.getKeyRingTree, encryptUserData = _a.encryptUserData, decryptUserData = _a.decryptUserData, getMembers = _a.getMembers, restoreKeyRingTree = _a.restoreKeyRingTree, destroyKeyRingTree = _a.destroyKeyRingTree, pubKey = _a.pubKey, privateKey = _a.privateKey, rootId = _a.rootId, walletSyncEncryptionKey = _a.walletSyncEncryptionKey, applicationPath = _a.applicationPath, message = _a.message, _b = _a.applicationId, applicationId = _b === void 0 ? 16 : _b, _c = _a.name, name = _c === void 0 ? "CLI" : _c, _d = _a.apiBaseUrl, apiBaseUrl = _d === void 0 ? (0, live_env_1.getEnv)("TRUSTCHAIN_API_STAGING") : _d;
98
+ if (!applicationId)
99
+ return "applicationId is required";
100
+ if (!name)
101
+ return "name is required";
102
+ if (!apiBaseUrl)
103
+ return "apiBaseUrl is required";
104
+ var context = {
105
+ applicationId: applicationId,
106
+ name: name,
107
+ apiBaseUrl: apiBaseUrl,
108
+ };
109
+ var sdk = (0, index_1.getSdk)(false, context, deviceAccess_1.withDevice);
110
+ if (initMemberCredentials) {
111
+ return sdk.initMemberCredentials();
112
+ }
113
+ if (getKeyRingTree) {
114
+ if (!pubKey || !privateKey)
115
+ return "pubKey and privateKey are required";
116
+ return sdk
117
+ .getOrCreateTrustchain(device || "", { pubkey: pubKey, privatekey: privateKey })
118
+ .then(function (result) { return result.trustchain; });
119
+ }
120
+ if (getMembers || restoreKeyRingTree || destroyKeyRingTree) {
121
+ if (!pubKey || !privateKey)
122
+ return "pubKey and privateKey are required";
123
+ if (!rootId)
124
+ return "pubKey and privateKey are required";
125
+ if (!walletSyncEncryptionKey)
126
+ return "walletSyncEncryptionKey is required";
127
+ if (!applicationPath)
128
+ return "applicationPath is required";
129
+ var sdkMethod = getMembers
130
+ ? "getMembers"
131
+ : restoreKeyRingTree
132
+ ? "restoreTrustchain"
133
+ : "destroyTrustchain";
134
+ return sdk[sdkMethod]({ rootId: rootId, walletSyncEncryptionKey: walletSyncEncryptionKey, applicationPath: applicationPath }, { pubkey: pubKey, privatekey: privateKey });
135
+ }
136
+ if (encryptUserData || decryptUserData) {
137
+ if (!rootId)
138
+ return "rootId is required";
139
+ if (!walletSyncEncryptionKey)
140
+ return "walletSyncEncryptionKey is required";
141
+ if (!applicationPath)
142
+ return "applicationPath is required";
143
+ if (!message)
144
+ return "message is required";
145
+ if (encryptUserData) {
146
+ return sdk
147
+ .encryptUserData({ rootId: rootId, walletSyncEncryptionKey: walletSyncEncryptionKey, applicationPath: applicationPath }, new TextEncoder().encode(message))
148
+ .then(function (array) { return Buffer.from(array).toString("hex"); });
149
+ }
150
+ return sdk
151
+ .decryptUserData({ rootId: rootId, walletSyncEncryptionKey: walletSyncEncryptionKey, applicationPath: applicationPath }, hw_ledger_key_ring_protocol_1.crypto.from_hex(message))
152
+ .then(function (array) { return new TextDecoder().decode(array); });
153
+ }
154
+ return "command does not exist";
155
+ },
156
+ };
157
+ //# sourceMappingURL=ledgerKeyRingProtocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ledgerKeyRingProtocol.js","sourceRoot":"","sources":["../../../src/commands/live/ledgerKeyRingProtocol.ts"],"names":[],"mappings":";;AAAA,kEAAkE;AAClE,qFAA+D;AAC/D,sEAAmE;AACnE,+CAA4C;AAC5C,mCAAuC;AAEvC,kBAAe;IACb,WAAW,EAAE,kCAAkC;IAC/C,IAAI,EAAE;QACJ,gBAAS;QACT;YACE,IAAI,EAAE,uBAAuB;YAC7B,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,sDAAsD;SAC7D;QACD;YACE,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,+CAA+C;SACtD;QAC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AAC,CAAC;YACvD,CAAC;YACD,OAAO,GAAG;iBACP,eAAe,CACd,EAAE,MAAM,QAAA,EAAE,uBAAuB,yBAAA,EAAE,eAAe,iBAAA,EAAE,EACpD,oCAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CACzB;iBACA,IAAI,CAAC,UAAA,KAAK,IAAI,OAAA,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,EAA/B,CAA+B,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,wBAAwB,CAAC;IAClC,CAAC;CACF,CAAC"}
@@ -0,0 +1,46 @@
1
+ declare const _default: {
2
+ description: string;
3
+ args: ({
4
+ name: string;
5
+ type: BooleanConstructor;
6
+ desc: string;
7
+ default?: undefined;
8
+ } | {
9
+ name: string;
10
+ type: StringConstructor;
11
+ desc: string;
12
+ default?: undefined;
13
+ } | {
14
+ name: string;
15
+ type: NumberConstructor;
16
+ desc: string;
17
+ default?: undefined;
18
+ } | {
19
+ name: string;
20
+ type: NumberConstructor;
21
+ default: number;
22
+ desc: string;
23
+ } | {
24
+ name: string;
25
+ type: StringConstructor;
26
+ default: string;
27
+ desc: string;
28
+ })[];
29
+ job: ({ push, pull, pubKey, privateKey, rootId, walletSyncEncryptionKey, applicationPath, data, version, applicationId, name, apiBaseUrl, cloudSyncApiBaseUrl, }: Partial<{
30
+ push: boolean;
31
+ pull: boolean;
32
+ pubKey: string;
33
+ privateKey: string;
34
+ rootId: string;
35
+ walletSyncEncryptionKey: string;
36
+ applicationPath: string;
37
+ data: string;
38
+ version: number;
39
+ applicationId: number;
40
+ name: string;
41
+ apiBaseUrl: string;
42
+ cloudSyncApiBaseUrl: string;
43
+ }>) => Promise<string> | "applicationId is required" | "name is required" | "apiBaseUrl is required" | "pubKey and privateKey are required" | "walletSyncEncryptionKey is required" | "applicationPath is required" | "command does not exist" | "data is required";
44
+ };
45
+ export default _default;
46
+ //# sourceMappingURL=ledgerSync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ledgerSync.d.ts","sourceRoot":"","sources":["../../../src/commands/live/ledgerSync.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiGU,OAAO;cACP,OAAO;gBACL,MAAM;oBACF,MAAM;gBACV,MAAM;iCACW,MAAM;yBACd,MAAM;cACjB,MAAM;iBACH,MAAM;uBACA,MAAM;cACf,MAAM;oBACA,MAAM;6BACG,MAAM;;;AApG/B,wBAsJE"}
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __generator = (this && this.__generator) || function (thisArg, body) {
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
+ function verb(n) { return function (v) { return step([n, v]); }; }
38
+ function step(op) {
39
+ if (f) throw new TypeError("Generator is already executing.");
40
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
+ if (y = 0, t) op = [op[0] & 2, t.value];
43
+ switch (op[0]) {
44
+ case 0: case 1: t = op; break;
45
+ case 4: _.label++; return { value: op[1], done: false };
46
+ case 5: _.label++; y = op[1]; op = [0]; continue;
47
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
+ default:
49
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
+ if (t[2]) _.ops.pop();
54
+ _.trys.pop(); continue;
55
+ }
56
+ op = body.call(thisArg, _);
57
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
+ }
60
+ };
61
+ Object.defineProperty(exports, "__esModule", { value: true });
62
+ var index_1 = require("@ledgerhq/ledger-key-ring-protocol/index");
63
+ var index_2 = require("@ledgerhq/live-wallet/cloudsync/index");
64
+ var index_3 = __importStar(require("@ledgerhq/live-wallet/walletsync/index"));
65
+ var deviceAccess_1 = require("@ledgerhq/live-common/hw/deviceAccess");
66
+ var live_env_1 = require("@ledgerhq/live-env");
67
+ exports.default = {
68
+ description: "Ledger Sync command",
69
+ args: [
70
+ {
71
+ name: "push",
72
+ type: Boolean,
73
+ desc: "Init member credentials for Ledger Key Ring Protocol",
74
+ },
75
+ {
76
+ name: "pull",
77
+ type: Boolean,
78
+ desc: "Get or create a Ledger Key Ring Protocol Tree",
79
+ },
80
+ {
81
+ name: "pubKey",
82
+ type: String,
83
+ desc: "pubkey for Ledger Key Ring Protocol Tree retrieved from initMemberCredentials result",
84
+ },
85
+ {
86
+ name: "privateKey",
87
+ type: String,
88
+ desc: "privatekey for Ledger Key Ring Protocol Tree retrieved from initMemberCredentials result",
89
+ },
90
+ {
91
+ name: "rootId",
92
+ type: String,
93
+ desc: "The immutable id of the Tree root retrieved from getKeyRingTree result",
94
+ },
95
+ {
96
+ name: "walletSyncEncryptionKey",
97
+ type: String,
98
+ desc: "The secret used to encrypt/decrypt the wallet sync data retrieved from getKeyRingTree result",
99
+ },
100
+ {
101
+ name: "applicationPath",
102
+ type: String,
103
+ desc: "privatekey for Ledger Key Ring Protocol Tree from initMemberCredentials result",
104
+ },
105
+ {
106
+ name: "data",
107
+ type: String,
108
+ desc: "data to be pushed to Ledger Sync",
109
+ },
110
+ {
111
+ name: "version",
112
+ type: Number,
113
+ desc: "version of the data",
114
+ },
115
+ {
116
+ name: "applicationId",
117
+ type: Number,
118
+ default: 16,
119
+ desc: "application identifier",
120
+ },
121
+ {
122
+ name: "name",
123
+ type: String,
124
+ default: "CLI",
125
+ desc: "name of the instance",
126
+ },
127
+ {
128
+ name: "apiBaseUrl",
129
+ type: String,
130
+ default: (0, live_env_1.getEnv)("TRUSTCHAIN_API_STAGING"),
131
+ desc: "api base url for Ledger Key Ring Protocol",
132
+ },
133
+ {
134
+ name: "cloudSyncApiBaseUrl",
135
+ type: String,
136
+ default: (0, live_env_1.getEnv)("CLOUD_SYNC_API_STAGING"),
137
+ desc: "api base url for Cloud Sync",
138
+ },
139
+ ],
140
+ job: function (_a) {
141
+ var push = _a.push, pull = _a.pull, pubKey = _a.pubKey, privateKey = _a.privateKey, rootId = _a.rootId, walletSyncEncryptionKey = _a.walletSyncEncryptionKey, applicationPath = _a.applicationPath, data = _a.data, version = _a.version, _b = _a.applicationId, applicationId = _b === void 0 ? 16 : _b, _c = _a.name, name = _c === void 0 ? "CLI" : _c, _d = _a.apiBaseUrl, apiBaseUrl = _d === void 0 ? (0, live_env_1.getEnv)("TRUSTCHAIN_API_STAGING") : _d, _e = _a.cloudSyncApiBaseUrl, cloudSyncApiBaseUrl = _e === void 0 ? (0, live_env_1.getEnv)("CLOUD_SYNC_API_STAGING") : _e;
142
+ if (!applicationId)
143
+ return "applicationId is required";
144
+ if (!name)
145
+ return "name is required";
146
+ if (!apiBaseUrl)
147
+ return "apiBaseUrl is required";
148
+ if (!pubKey || !privateKey)
149
+ return "pubKey and privateKey are required";
150
+ if (!rootId)
151
+ return "pubKey and privateKey are required";
152
+ if (!walletSyncEncryptionKey)
153
+ return "walletSyncEncryptionKey is required";
154
+ if (!applicationPath)
155
+ return "applicationPath is required";
156
+ if (push && !data)
157
+ return "data is required";
158
+ var context = {
159
+ applicationId: applicationId,
160
+ name: name,
161
+ apiBaseUrl: apiBaseUrl,
162
+ };
163
+ var ledgerKeyRingProtocolSDK = (0, index_1.getSdk)(false, context, deviceAccess_1.withDevice);
164
+ var cloudSyncSDK = new index_2.CloudSyncSDK({
165
+ apiBaseUrl: cloudSyncApiBaseUrl,
166
+ slug: index_3.liveSlug,
167
+ schema: index_3.default.schema,
168
+ trustchainSdk: ledgerKeyRingProtocolSDK,
169
+ getCurrentVersion: function () { return version || 1; },
170
+ saveNewUpdate: function (event) { return __awaiter(void 0, void 0, void 0, function () {
171
+ return __generator(this, function (_a) {
172
+ console.log(event);
173
+ return [2 /*return*/];
174
+ });
175
+ }); },
176
+ });
177
+ if (push) {
178
+ return cloudSyncSDK
179
+ .push({ rootId: rootId, walletSyncEncryptionKey: walletSyncEncryptionKey, applicationPath: applicationPath }, { pubkey: pubKey, privatekey: privateKey }, JSON.parse(data))
180
+ .then(function (result) { return JSON.stringify(result, null, 2); });
181
+ }
182
+ if (pull) {
183
+ return cloudSyncSDK
184
+ .pull({ rootId: rootId, walletSyncEncryptionKey: walletSyncEncryptionKey, applicationPath: applicationPath }, { pubkey: pubKey, privatekey: privateKey })
185
+ .then(function (result) { return JSON.stringify(result, null, 2); });
186
+ }
187
+ return "command does not exist";
188
+ },
189
+ };
190
+ //# sourceMappingURL=ledgerSync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ledgerSync.js","sourceRoot":"","sources":["../../../src/commands/live/ledgerSync.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kEAAkE;AAClE,+DAAkF;AAClF,8EAGgD;AAChD,sEAAmE;AACnE,+CAA4C;AAE5C,kBAAe;IACb,WAAW,EAAE,qBAAqB;IAClC,IAAI,EAAE;QACJ;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,sDAAsD;SAC7D;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,OAAO;YACb,IAAI,EAAE,+CAA+C;SACtD;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,sFAAsF;SAC7F;QACD;YACE,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,0FAA0F;SACjG;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,wEAAwE;SAC/E;QACD;YACE,IAAI,EAAE,yBAAyB;YAC/B,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,8FAA8F;SACrG;QAC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AE,CAAC,CAAC,EAA/B,CAA+B,CAAC,CAAC;QACrD,CAAC;QAED,IAAI,IAAI,EAAE,CAAC;YACT,OAAO,YAAY;iBAChB,IAAI,CACH,EAAE,MAAM,QAAA,EAAE,uBAAuB,yBAAA,EAAE,eAAe,iBAAA,EAAE,EACpD,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,CAC3C;iBACA,IAAI,CAAC,UAAA,MAAM,IAAI,OAAA,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAA/B,CAA+B,CAAC,CAAC;QACrD,CAAC;QAED,OAAO,wBAAwB,CAAC;IAClC,CAAC;CACF,CAAC"}
@@ -1561,6 +1561,99 @@ declare const _default: {
1561
1561
  out: boolean;
1562
1562
  }>) => import("rxjs").Observable<string>;
1563
1563
  };
1564
+ ledgerKeyRingProtocol: {
1565
+ description: string;
1566
+ args: ({
1567
+ name: string;
1568
+ alias: string;
1569
+ type: StringConstructor;
1570
+ descOpt: string;
1571
+ desc: string;
1572
+ } | {
1573
+ name: string;
1574
+ type: BooleanConstructor;
1575
+ desc: string;
1576
+ default?: undefined;
1577
+ } | {
1578
+ name: string;
1579
+ type: StringConstructor;
1580
+ desc: string;
1581
+ default?: undefined;
1582
+ } | {
1583
+ name: string;
1584
+ type: NumberConstructor;
1585
+ default: number;
1586
+ desc: string;
1587
+ } | {
1588
+ name: string;
1589
+ type: StringConstructor;
1590
+ default: string;
1591
+ desc: string;
1592
+ })[];
1593
+ job: ({ device, initMemberCredentials, getKeyRingTree, encryptUserData, decryptUserData, getMembers, restoreKeyRingTree, destroyKeyRingTree, pubKey, privateKey, rootId, walletSyncEncryptionKey, applicationPath, message, applicationId, name, apiBaseUrl, }: Partial<{
1594
+ device: string;
1595
+ initMemberCredentials: boolean;
1596
+ getKeyRingTree: boolean;
1597
+ getMembers: boolean;
1598
+ encryptUserData: boolean;
1599
+ decryptUserData: boolean;
1600
+ restoreKeyRingTree: boolean;
1601
+ destroyKeyRingTree: boolean;
1602
+ pubKey: string;
1603
+ privateKey: string;
1604
+ rootId: string;
1605
+ walletSyncEncryptionKey: string;
1606
+ applicationPath: string;
1607
+ message: string;
1608
+ applicationId: number;
1609
+ name: string;
1610
+ apiBaseUrl: string;
1611
+ }>) => Promise<string> | Promise<void> | "applicationId is required" | "name is required" | "apiBaseUrl is required" | Promise<import("@ledgerhq/ledger-key-ring-protocol/types").MemberCredentials> | "pubKey and privateKey are required" | Promise<import("@ledgerhq/ledger-key-ring-protocol/types").Trustchain> | "walletSyncEncryptionKey is required" | "applicationPath is required" | Promise<import("@ledgerhq/ledger-key-ring-protocol/types").TrustchainMember[]> | "rootId is required" | "message is required" | "command does not exist";
1612
+ };
1613
+ ledgerSync: {
1614
+ description: string;
1615
+ args: ({
1616
+ name: string;
1617
+ type: BooleanConstructor;
1618
+ desc: string;
1619
+ default?: undefined;
1620
+ } | {
1621
+ name: string;
1622
+ type: StringConstructor;
1623
+ desc: string;
1624
+ default?: undefined;
1625
+ } | {
1626
+ name: string;
1627
+ type: NumberConstructor;
1628
+ desc: string;
1629
+ default?: undefined;
1630
+ } | {
1631
+ name: string;
1632
+ type: NumberConstructor;
1633
+ default: number;
1634
+ desc: string;
1635
+ } | {
1636
+ name: string;
1637
+ type: StringConstructor;
1638
+ default: string;
1639
+ desc: string;
1640
+ })[];
1641
+ job: ({ push, pull, pubKey, privateKey, rootId, walletSyncEncryptionKey, applicationPath, data, version, applicationId, name, apiBaseUrl, cloudSyncApiBaseUrl, }: Partial<{
1642
+ push: boolean;
1643
+ pull: boolean;
1644
+ pubKey: string;
1645
+ privateKey: string;
1646
+ rootId: string;
1647
+ walletSyncEncryptionKey: string;
1648
+ applicationPath: string;
1649
+ data: string;
1650
+ version: number;
1651
+ applicationId: number;
1652
+ name: string;
1653
+ apiBaseUrl: string;
1654
+ cloudSyncApiBaseUrl: string;
1655
+ }>) => Promise<string> | "applicationId is required" | "name is required" | "apiBaseUrl is required" | "pubKey and privateKey are required" | "walletSyncEncryptionKey is required" | "applicationPath is required" | "command does not exist" | "data is required";
1656
+ };
1564
1657
  liveData: {
1565
1658
  description: string;
1566
1659
  args: ({
@@ -1 +1 @@
1
- {"version":3,"file":"commands-index.d.ts","sourceRoot":"","sources":["../src/commands-index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,wBAiEE"}
@@ -59,6 +59,8 @@ var balanceHistory_1 = __importDefault(require("./commands/live/balanceHistory")
59
59
  var countervalues_1 = __importDefault(require("./commands/live/countervalues"));
60
60
  var envs_1 = __importDefault(require("./commands/live/envs"));
61
61
  var exportAccounts_1 = __importDefault(require("./commands/live/exportAccounts"));
62
+ var ledgerKeyRingProtocol_1 = __importDefault(require("./commands/live/ledgerKeyRingProtocol"));
63
+ var ledgerSync_1 = __importDefault(require("./commands/live/ledgerSync"));
62
64
  var liveData_1 = __importDefault(require("./commands/live/liveData"));
63
65
  var portfolio_1 = __importDefault(require("./commands/live/portfolio"));
64
66
  var synchronousOnboarding_1 = __importDefault(require("./commands/live/synchronousOnboarding"));
@@ -122,6 +124,8 @@ exports.default = {
122
124
  countervalues: countervalues_1.default,
123
125
  envs: envs_1.default,
124
126
  exportAccounts: exportAccounts_1.default,
127
+ ledgerKeyRingProtocol: ledgerKeyRingProtocol_1.default,
128
+ ledgerSync: ledgerSync_1.default,
125
129
  liveData: liveData_1.default,
126
130
  portfolio: portfolio_1.default,
127
131
  synchronousOnboarding: synchronousOnboarding_1.default,
@@ -1 +1 @@
1
- {"version":3,"file":"commands-index.js","sourceRoot":"","sources":["../src/commands-index.ts"],"names":[],"mappings":";;;;;AAAA,kEAA4C;AAC5C,oFAA8D;AAC9D,kFAA4D;AAC5D,8EAAwD;AACxD,8EAAwD;AACxD,gFAA0D;AAC1D,oGAA8E;AAC9E,4GAAsF;AACtF,0GAAoF;AACpF,gFAA0D;AAC1D,oGAA8E;AAC9E,0EAAoD;AACpD,4EAAsD;AACtD,wFAAkE;AAClE,0FAAoE;AACpE,oEAA8C;AAC9C,kFAA4D;AAC5D,oEAA8C;AAC9C,sGAAgF;AAChF,sHAAgG;AAChG,8DAAwC;AACxC,sFAAgE;AAChE,sGAAgF;AAChF,oFAA8D;AAC9D,0FAAoE;AACpE,kFAA4D;AAC5D,kGAA4E;AAC5E,sHAAgG;AAChG,0GAAoF;AACpF,gGAA0E;AAC1E,oGAA8E;AAC9E,kGAA4E;AAC5E,wFAAkE;AAClE,4EAAsD;AACtD,sGAAgF;AAChF,8GAAwF;AACxF,oGAA8E;AAC9E,8HAAwG;AACxG,kFAA4D;AAC5D,sFAAgE;AAChE,oFAA8D;AAC9D,oFAA8D;AAC9D,gFAA0D;AAC1D,wFAAkE;AAClE,gGAA0E;AAC1E,gEAA0C;AAC1C,wEAAkD;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AS,qBAAA;IACT,qBAAqB,iCAAA;IACrB,IAAI,gBAAA;IACJ,OAAO,mBAAA;IACP,IAAI,gBAAA;CACL,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/live-cli",
3
- "version": "24.7.0",
3
+ "version": "24.7.1-next.0",
4
4
  "description": "ledger-live CLI version",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,24 +34,26 @@
34
34
  "rxjs": "^7.8.1",
35
35
  "winston": "^3.5.1",
36
36
  "ws": "^8.6.0",
37
- "@ledgerhq/coin-bitcoin": "^0.8.2",
38
- "@ledgerhq/coin-framework": "^0.18.2",
39
- "@ledgerhq/cryptoassets": "^13.6.0",
40
- "@ledgerhq/device-core": "^0.4.1",
37
+ "@ledgerhq/coin-bitcoin": "^0.8.3-next.0",
38
+ "@ledgerhq/coin-framework": "^0.18.3-next.0",
39
+ "@ledgerhq/cryptoassets": "^13.6.1-next.0",
40
+ "@ledgerhq/device-core": "^0.4.2-next.0",
41
41
  "@ledgerhq/devices": "^8.4.4",
42
42
  "@ledgerhq/errors": "^6.19.1",
43
+ "@ledgerhq/ledger-key-ring-protocol": "^0.5.0-next.0",
43
44
  "@ledgerhq/hw-app-btc": "^10.4.3",
45
+ "@ledgerhq/hw-ledger-key-ring-protocol": "^0.2.0-next.0",
44
46
  "@ledgerhq/hw-transport": "^6.31.4",
45
47
  "@ledgerhq/hw-transport-http": "^6.30.4",
46
48
  "@ledgerhq/hw-transport-mocker": "^6.29.4",
47
49
  "@ledgerhq/hw-transport-node-hid": "^6.29.5",
48
50
  "@ledgerhq/hw-transport-node-speculos": "^6.29.4",
49
- "@ledgerhq/live-common": "^34.10.0",
51
+ "@ledgerhq/live-common": "^34.11.0-next.0",
50
52
  "@ledgerhq/live-config": "^3.1.0",
51
- "@ledgerhq/live-countervalues": "^0.2.7",
52
- "@ledgerhq/live-env": "^2.3.0",
53
- "@ledgerhq/live-wallet": "^0.6.2",
54
- "@ledgerhq/live-network": "^2.0.1",
53
+ "@ledgerhq/live-countervalues": "^0.2.8-next.0",
54
+ "@ledgerhq/live-env": "^2.4.0-next.0",
55
+ "@ledgerhq/live-wallet": "^0.7.0-next.0",
56
+ "@ledgerhq/live-network": "^2.0.2-next.0",
55
57
  "@ledgerhq/logs": "^6.12.0",
56
58
  "@ledgerhq/types-devices": "^6.25.3"
57
59
  },
@@ -62,7 +64,7 @@
62
64
  "@types/pako": "^2.0.0",
63
65
  "ts-node": "^10.4.0",
64
66
  "@ledgerhq/types-cryptoassets": "^7.16.0",
65
- "@ledgerhq/types-live": "^6.52.0"
67
+ "@ledgerhq/types-live": "^6.52.1-next.0"
66
68
  },
67
69
  "scripts": {
68
70
  "prebuild": "zx ./scripts/gen.mjs",