@ledgerhq/live-cli 22.6.8-next.0 → 22.7.0-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 +68 -30
- package/lib/commands-index.d.ts +0 -57
- package/lib/commands-index.d.ts.map +1 -1
- package/lib/commands-index.js +0 -2
- package/lib/commands-index.js.map +1 -1
- package/package.json +3 -3
- package/lib/commands/makeCompoundSummary.d.ts +0 -54
- package/lib/commands/makeCompoundSummary.d.ts.map +0 -1
- package/lib/commands/makeCompoundSummary.js +0 -190
- package/lib/commands/makeCompoundSummary.js.map +0 -1
package/README.md
CHANGED
|
@@ -66,14 +66,11 @@ pnpm build:cli
|
|
|
66
66
|
`````
|
|
67
67
|
Usage: ledger-live <command> ...
|
|
68
68
|
|
|
69
|
+
Usage: ledger-live celoValidatorGroups
|
|
70
|
+
|
|
69
71
|
Usage: ledger-live cosmosValidators
|
|
70
72
|
--format <String> : json | default
|
|
71
73
|
|
|
72
|
-
Usage: ledger-live polkadotValidators
|
|
73
|
-
--format <String> : json|csv|default
|
|
74
|
-
--status <String> : The status of the validators to fetch (all|elected|waiting)
|
|
75
|
-
--validator <String> : address of recipient validator that will receive the delegate
|
|
76
|
-
|
|
77
74
|
Usage: ledger-live tezosListBakers
|
|
78
75
|
--whitelist : filter whitelist
|
|
79
76
|
--format <String> : json | default
|
|
@@ -82,6 +79,11 @@ Usage: ledger-live tronSuperRepresentative
|
|
|
82
79
|
--max <Number> : max number of super representatives to return
|
|
83
80
|
--format <String> : json | default
|
|
84
81
|
|
|
82
|
+
Usage: ledger-live polkadotValidators
|
|
83
|
+
--format <String> : json|csv|default
|
|
84
|
+
--status <String> : The status of the validators to fetch (all|elected|waiting)
|
|
85
|
+
--validator <String> : address of recipient validator that will receive the delegate
|
|
86
|
+
|
|
85
87
|
Usage: ledger-live app # Manage Ledger device's apps
|
|
86
88
|
-d, --device <String> : provide a specific HID path of a device
|
|
87
89
|
-v, --verbose : enable verbose logs
|
|
@@ -143,6 +145,10 @@ Usage: ledger-live broadcast # Broadcast signed operation(s)
|
|
|
143
145
|
|
|
144
146
|
Usage: ledger-live cleanSpeculos # clean all docker instance of speculos
|
|
145
147
|
|
|
148
|
+
Usage: ledger-live confirmOp # Quickly verify if an operation id exists with our explorers (by synchronising the parent account)
|
|
149
|
+
--id <String> : operation id to search
|
|
150
|
+
-f, --format <json | text> : how to display the data
|
|
151
|
+
|
|
146
152
|
Usage: ledger-live countervalues # Get the balance history for accounts
|
|
147
153
|
-c, --currency <String> : ticker of a currency
|
|
148
154
|
-C, --countervalue <String> : ticker of a currency
|
|
@@ -167,6 +173,15 @@ Usage: ledger-live deviceAppVersion
|
|
|
167
173
|
Usage: ledger-live deviceInfo
|
|
168
174
|
-d, --device <String> : provide a specific HID path of a device
|
|
169
175
|
|
|
176
|
+
Usage: ledger-live deviceSDKFirmwareUpdate # Perform a firmware update
|
|
177
|
+
-d, --device <String> : provide a specific HID path of a device
|
|
178
|
+
--to-my-own-risk : this is a developer feature that allow to flash anything, we are not responsible of your actions, by flashing your device you might reset your seed or block your device
|
|
179
|
+
--osuVersion <String> : (to your own risk) provide yourself an OSU version to flash the device with
|
|
180
|
+
--listOSUs : list all available OSUs (for all devices, beta and prod versions)
|
|
181
|
+
|
|
182
|
+
Usage: ledger-live deviceSDKGetDeviceInfo # Device SDK: get device info
|
|
183
|
+
-d, --device <String> : provide a specific HID path of a device
|
|
184
|
+
|
|
170
185
|
Usage: ledger-live deviceVersion
|
|
171
186
|
-d, --device <String> : provide a specific HID path of a device
|
|
172
187
|
|
|
@@ -249,10 +264,10 @@ Usage: ledger-live generateTestTransaction # Generate a test for transaction (li
|
|
|
249
264
|
--memo <String> : set a memo
|
|
250
265
|
-t, --token <String> : use an token account children of the account
|
|
251
266
|
--feePerByte <String> : how much fee per byte
|
|
252
|
-
--pickUnconfirmedRBF : also pick unconfirmed replaceable txs
|
|
253
267
|
-E, --excludeUTXO <String> : exclude utxo by their txhash@index (example: -E hash@3 -E hash@0)
|
|
254
268
|
--rbf : enable replace-by-fee
|
|
255
269
|
--bitcoin-pick-strategy <String>: utxo picking strategy, one of: DEEP_OUTPUTS_FIRST | OPTIMIZE_SIZE | MERGE_OUTPUTS
|
|
270
|
+
--transactionIndex <String>: transaction index of a pending withdraw in case of withdraw mode
|
|
256
271
|
--sourceValidator <String>: for redelegate, add a source validator
|
|
257
272
|
--cosmosValidator <String>: address of recipient validator that will receive the delegate
|
|
258
273
|
--cosmosAmountValidator <String>: Amount that the validator will receive
|
|
@@ -260,21 +275,23 @@ Usage: ledger-live generateTestTransaction # Generate a test for transaction (li
|
|
|
260
275
|
--gasPrice <String> : how much gasPrice. default is 2gwei. (example format: 2gwei, 0.000001eth, in wei if no unit precised)
|
|
261
276
|
--nonce <String> : set a nonce for this transaction
|
|
262
277
|
--data <String> : set the transaction data to use for signing the ETH transaction
|
|
263
|
-
--validator <String> : address of recipient validator that will receive the delegate
|
|
264
|
-
--era <String> : Era of when to claim rewards
|
|
265
|
-
--rewardDestination <String>: Reward destination
|
|
266
278
|
--fee <String> : how much fee
|
|
267
279
|
--tag <Number> : ripple tag
|
|
268
280
|
--solanaValidator <String>: validator address to delegate to
|
|
269
281
|
--solanaStakeAccount <String>: stake account address to use in the transaction
|
|
270
282
|
--memoType <String> : stellar memo type
|
|
271
283
|
--memoValue <String> : stellar memo value
|
|
284
|
+
--assetIssuer <String> : Asset issuer
|
|
285
|
+
--assetCode <String> : Same as token
|
|
272
286
|
--storageLimit <String> : how much storageLimit. default is estimated with the recipient
|
|
273
287
|
--subAccount <String> : use a sub account instead of the parent by index
|
|
274
288
|
--duration <String> : duration in day
|
|
275
289
|
--resource <String> : reward ENERGY or BANDWIDTH
|
|
276
290
|
--tronVoteAddress <String>: address of the super representative voting
|
|
277
291
|
--tronVoteCount <String> : number of votes for the vote address
|
|
292
|
+
--validator <String> : address of recipient validator that will receive the delegate
|
|
293
|
+
--era <String> : Era of when to claim rewards
|
|
294
|
+
--rewardDestination <String>: Reward destination
|
|
278
295
|
|
|
279
296
|
Usage: ledger-live genuineCheck # Perform a genuine check with Ledger's HSM
|
|
280
297
|
-d, --device <String> : provide a specific HID path of a device
|
|
@@ -286,6 +303,16 @@ Usage: ledger-live getAddress # Get an address with the device on specific deriv
|
|
|
286
303
|
--derivationMode <String>: derivationMode to use
|
|
287
304
|
-v, --verify : also ask verification on device
|
|
288
305
|
|
|
306
|
+
Usage: ledger-live getBatteryStatus # Get the battery status of the current device
|
|
307
|
+
-c, --currency <String> : Currency name or ticker. If not provided, it will be inferred from the device.
|
|
308
|
+
-d, --device <String> : provide a specific HID path of a device
|
|
309
|
+
--p2 <String> : What type of request to run (00-04)
|
|
310
|
+
|
|
311
|
+
Usage: ledger-live getDeviceRunningMode # Get the mode (bootloader, main, locked-device, disconnected-or-locked-device) in which the device is
|
|
312
|
+
-r, --nbUnresponsiveRetry <Number>: Number of received CantOpenDevice errors while retrying before considering the device as maybe disconnected or cold-started-locked
|
|
313
|
+
-t, --unresponsiveTimeoutMs <Number>: Time in ms of the timeout before considering the device unresponsive
|
|
314
|
+
-d, --device <String> : provide a specific HID path of a device
|
|
315
|
+
|
|
289
316
|
Usage: ledger-live getTransactionStatus # Prepare a transaction and returns 'TransactionStatus' meta information
|
|
290
317
|
-d, --device <String> : provide a specific HID path of a device
|
|
291
318
|
--xpub <String> : use an xpub (alternatively to --device) [DEPRECATED: prefer use of id]
|
|
@@ -311,10 +338,10 @@ Usage: ledger-live getTransactionStatus # Prepare a transaction and returns 'Tra
|
|
|
311
338
|
--memo <String> : set a memo
|
|
312
339
|
-t, --token <String> : use an token account children of the account
|
|
313
340
|
--feePerByte <String> : how much fee per byte
|
|
314
|
-
--pickUnconfirmedRBF : also pick unconfirmed replaceable txs
|
|
315
341
|
-E, --excludeUTXO <String> : exclude utxo by their txhash@index (example: -E hash@3 -E hash@0)
|
|
316
342
|
--rbf : enable replace-by-fee
|
|
317
343
|
--bitcoin-pick-strategy <String>: utxo picking strategy, one of: DEEP_OUTPUTS_FIRST | OPTIMIZE_SIZE | MERGE_OUTPUTS
|
|
344
|
+
--transactionIndex <String>: transaction index of a pending withdraw in case of withdraw mode
|
|
318
345
|
--sourceValidator <String>: for redelegate, add a source validator
|
|
319
346
|
--cosmosValidator <String>: address of recipient validator that will receive the delegate
|
|
320
347
|
--cosmosAmountValidator <String>: Amount that the validator will receive
|
|
@@ -322,23 +349,30 @@ Usage: ledger-live getTransactionStatus # Prepare a transaction and returns 'Tra
|
|
|
322
349
|
--gasPrice <String> : how much gasPrice. default is 2gwei. (example format: 2gwei, 0.000001eth, in wei if no unit precised)
|
|
323
350
|
--nonce <String> : set a nonce for this transaction
|
|
324
351
|
--data <String> : set the transaction data to use for signing the ETH transaction
|
|
325
|
-
--validator <String> : address of recipient validator that will receive the delegate
|
|
326
|
-
--era <String> : Era of when to claim rewards
|
|
327
|
-
--rewardDestination <String>: Reward destination
|
|
328
352
|
--fee <String> : how much fee
|
|
329
353
|
--tag <Number> : ripple tag
|
|
330
354
|
--solanaValidator <String>: validator address to delegate to
|
|
331
355
|
--solanaStakeAccount <String>: stake account address to use in the transaction
|
|
332
356
|
--memoType <String> : stellar memo type
|
|
333
357
|
--memoValue <String> : stellar memo value
|
|
358
|
+
--assetIssuer <String> : Asset issuer
|
|
359
|
+
--assetCode <String> : Same as token
|
|
334
360
|
--storageLimit <String> : how much storageLimit. default is estimated with the recipient
|
|
335
361
|
--subAccount <String> : use a sub account instead of the parent by index
|
|
336
362
|
--duration <String> : duration in day
|
|
337
363
|
--resource <String> : reward ENERGY or BANDWIDTH
|
|
338
364
|
--tronVoteAddress <String>: address of the super representative voting
|
|
339
365
|
--tronVoteCount <String> : number of votes for the vote address
|
|
366
|
+
--validator <String> : address of recipient validator that will receive the delegate
|
|
367
|
+
--era <String> : Era of when to claim rewards
|
|
368
|
+
--rewardDestination <String>: Reward destination
|
|
340
369
|
-f, --format <default | json>: how to display the data
|
|
341
370
|
|
|
371
|
+
Usage: ledger-live i18n # Test e2e functionality for device localization support
|
|
372
|
+
-d, --device <String> : provide a specific HID path of a device
|
|
373
|
+
-i, --install <String> : install a language pack by its id
|
|
374
|
+
-u, --uninstall <String> : uninstall a language pack by its id
|
|
375
|
+
|
|
342
376
|
Usage: ledger-live liveData # utility for Ledger Live app.json file
|
|
343
377
|
-d, --device <String> : provide a specific HID path of a device
|
|
344
378
|
--xpub <String> : use an xpub (alternatively to --device) [DEPRECATED: prefer use of id]
|
|
@@ -353,19 +387,6 @@ Usage: ledger-live liveData # utility for Ledger Live app.json file
|
|
|
353
387
|
--appjson <filename> : path to a live desktop app.json
|
|
354
388
|
-a, --add : add accounts to live data
|
|
355
389
|
|
|
356
|
-
Usage: ledger-live makeCompoundSummary # Create a summary of compound operations (ETH)
|
|
357
|
-
-d, --device <String> : provide a specific HID path of a device
|
|
358
|
-
--xpub <String> : use an xpub (alternatively to --device) [DEPRECATED: prefer use of id]
|
|
359
|
-
--id <String> : restore an account id (or a partial version of an id) (alternatively to --device)
|
|
360
|
-
--file <filename> : use a JSON account file or '-' for stdin (alternatively to --device)
|
|
361
|
-
--appjsonFile <filename> : use a desktop app.json (alternatively to --device)
|
|
362
|
-
-c, --currency <String> : Currency name or ticker. If not provided, it will be inferred from the device.
|
|
363
|
-
-s, --scheme <String> : if provided, filter the derivation path that are scanned by a given sceme. Providing '' empty string will only use the default standard derivation scheme.
|
|
364
|
-
-i, --index <Number> : select the account by index
|
|
365
|
-
-l, --length <Number> : set the number of accounts after the index. Defaults to 1 if index was provided, Infinity otherwise.
|
|
366
|
-
--paginateOperations <Number>: if defined, will paginate operations
|
|
367
|
-
-f, --format <summary | default>: how to display the data
|
|
368
|
-
|
|
369
390
|
Usage: ledger-live managerListApps # List apps that can be installed on the device
|
|
370
391
|
-d, --device <String> : provide a specific HID path of a device
|
|
371
392
|
-f, --format <raw | json | default>
|
|
@@ -454,10 +475,10 @@ Usage: ledger-live send # Send crypto-assets
|
|
|
454
475
|
--memo <String> : set a memo
|
|
455
476
|
-t, --token <String> : use an token account children of the account
|
|
456
477
|
--feePerByte <String> : how much fee per byte
|
|
457
|
-
--pickUnconfirmedRBF : also pick unconfirmed replaceable txs
|
|
458
478
|
-E, --excludeUTXO <String> : exclude utxo by their txhash@index (example: -E hash@3 -E hash@0)
|
|
459
479
|
--rbf : enable replace-by-fee
|
|
460
480
|
--bitcoin-pick-strategy <String>: utxo picking strategy, one of: DEEP_OUTPUTS_FIRST | OPTIMIZE_SIZE | MERGE_OUTPUTS
|
|
481
|
+
--transactionIndex <String>: transaction index of a pending withdraw in case of withdraw mode
|
|
461
482
|
--sourceValidator <String>: for redelegate, add a source validator
|
|
462
483
|
--cosmosValidator <String>: address of recipient validator that will receive the delegate
|
|
463
484
|
--cosmosAmountValidator <String>: Amount that the validator will receive
|
|
@@ -465,21 +486,23 @@ Usage: ledger-live send # Send crypto-assets
|
|
|
465
486
|
--gasPrice <String> : how much gasPrice. default is 2gwei. (example format: 2gwei, 0.000001eth, in wei if no unit precised)
|
|
466
487
|
--nonce <String> : set a nonce for this transaction
|
|
467
488
|
--data <String> : set the transaction data to use for signing the ETH transaction
|
|
468
|
-
--validator <String> : address of recipient validator that will receive the delegate
|
|
469
|
-
--era <String> : Era of when to claim rewards
|
|
470
|
-
--rewardDestination <String>: Reward destination
|
|
471
489
|
--fee <String> : how much fee
|
|
472
490
|
--tag <Number> : ripple tag
|
|
473
491
|
--solanaValidator <String>: validator address to delegate to
|
|
474
492
|
--solanaStakeAccount <String>: stake account address to use in the transaction
|
|
475
493
|
--memoType <String> : stellar memo type
|
|
476
494
|
--memoValue <String> : stellar memo value
|
|
495
|
+
--assetIssuer <String> : Asset issuer
|
|
496
|
+
--assetCode <String> : Same as token
|
|
477
497
|
--storageLimit <String> : how much storageLimit. default is estimated with the recipient
|
|
478
498
|
--subAccount <String> : use a sub account instead of the parent by index
|
|
479
499
|
--duration <String> : duration in day
|
|
480
500
|
--resource <String> : reward ENERGY or BANDWIDTH
|
|
481
501
|
--tronVoteAddress <String>: address of the super representative voting
|
|
482
502
|
--tronVoteCount <String> : number of votes for the vote address
|
|
503
|
+
--validator <String> : address of recipient validator that will receive the delegate
|
|
504
|
+
--era <String> : Era of when to claim rewards
|
|
505
|
+
--rewardDestination <String>: Reward destination
|
|
483
506
|
--ignore-errors : when using multiple transactions, an error won't stop the flow
|
|
484
507
|
--disable-broadcast : do not broadcast the transaction
|
|
485
508
|
--format <String> : default | json | silent
|
|
@@ -493,6 +516,21 @@ Usage: ledger-live signMessage # Sign a message with the device on specific deri
|
|
|
493
516
|
|
|
494
517
|
Usage: ledger-live speculosList # list apps available for speculos
|
|
495
518
|
|
|
519
|
+
Usage: ledger-live staxFetchAndRestoreDemo # Conditionally backup, delete, and restore a custom image on Stax
|
|
520
|
+
-d, --device <String> : provide a specific HID path of a device
|
|
521
|
+
-i, --fileInput <String> : Text file containing the hex data of the image to load on Stax
|
|
522
|
+
|
|
523
|
+
Usage: ledger-live staxFetchImage # Test functionality lock screen customization on Stax for fetching an image
|
|
524
|
+
-d, --device <String> : provide a specific HID path of a device
|
|
525
|
+
-o, --fileOutput <String> : Output file path in case you want to save Hex string image
|
|
526
|
+
|
|
527
|
+
Usage: ledger-live staxFetchImageHash # Fetch the hash of the custom image
|
|
528
|
+
-d, --device <String> : provide a specific HID path of a device
|
|
529
|
+
|
|
530
|
+
Usage: ledger-live staxLoadImage # Test functionality lock screen customization on Stax for loading an image
|
|
531
|
+
-d, --device <String> : provide a specific HID path of a device
|
|
532
|
+
-i, --fileInput <String> : Text file containing the hex data of the image to load on Stax
|
|
533
|
+
|
|
496
534
|
Usage: ledger-live swap # Perform an arbitrary swap between two currencies on the same seed
|
|
497
535
|
-m, --mock : Whether or not to use the real backend or a mocked version
|
|
498
536
|
-a, --amount <Number> : Amount in satoshi units to send
|
package/lib/commands-index.d.ts
CHANGED
|
@@ -968,63 +968,6 @@ declare const _default: {
|
|
|
968
968
|
add: boolean;
|
|
969
969
|
}>) => import("rxjs").Observable<string>;
|
|
970
970
|
};
|
|
971
|
-
makeCompoundSummary: {
|
|
972
|
-
description: string;
|
|
973
|
-
args: ({
|
|
974
|
-
name: string;
|
|
975
|
-
alias: string;
|
|
976
|
-
type: StringConstructor;
|
|
977
|
-
desc: string;
|
|
978
|
-
} | {
|
|
979
|
-
name: string;
|
|
980
|
-
type: StringConstructor;
|
|
981
|
-
desc: string;
|
|
982
|
-
multiple: boolean;
|
|
983
|
-
typeDesc?: undefined;
|
|
984
|
-
alias?: undefined;
|
|
985
|
-
} | {
|
|
986
|
-
name: string;
|
|
987
|
-
type: StringConstructor;
|
|
988
|
-
typeDesc: string;
|
|
989
|
-
desc: string;
|
|
990
|
-
multiple?: undefined;
|
|
991
|
-
alias?: undefined;
|
|
992
|
-
} | {
|
|
993
|
-
name: string;
|
|
994
|
-
alias: string;
|
|
995
|
-
type: NumberConstructor;
|
|
996
|
-
desc: string;
|
|
997
|
-
multiple?: undefined;
|
|
998
|
-
typeDesc?: undefined;
|
|
999
|
-
} | {
|
|
1000
|
-
name: string;
|
|
1001
|
-
type: NumberConstructor;
|
|
1002
|
-
desc: string;
|
|
1003
|
-
multiple?: undefined;
|
|
1004
|
-
typeDesc?: undefined;
|
|
1005
|
-
alias?: undefined;
|
|
1006
|
-
} | {
|
|
1007
|
-
name: string;
|
|
1008
|
-
alias: string;
|
|
1009
|
-
type: StringConstructor;
|
|
1010
|
-
typeDesc: string;
|
|
1011
|
-
desc: string;
|
|
1012
|
-
})[];
|
|
1013
|
-
job: (opts: Partial<{
|
|
1014
|
-
device: string;
|
|
1015
|
-
id: string[];
|
|
1016
|
-
xpub: string[];
|
|
1017
|
-
file: string;
|
|
1018
|
-
appjsonFile: string;
|
|
1019
|
-
currency: string;
|
|
1020
|
-
scheme: string;
|
|
1021
|
-
index: number;
|
|
1022
|
-
length: number;
|
|
1023
|
-
paginateOperations: number;
|
|
1024
|
-
}> & {
|
|
1025
|
-
format: "default" | "summary";
|
|
1026
|
-
}) => import("rxjs").Observable<string>;
|
|
1027
|
-
};
|
|
1028
971
|
managerListApps: {
|
|
1029
972
|
description: string;
|
|
1030
973
|
args: ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands-index.d.ts","sourceRoot":"","sources":["../src/commands-index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"commands-index.d.ts","sourceRoot":"","sources":["../src/commands-index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2DA,wBA2DE"}
|
package/lib/commands-index.js
CHANGED
|
@@ -38,7 +38,6 @@ var getDeviceRunningMode_1 = __importDefault(require("./commands/getDeviceRunnin
|
|
|
38
38
|
var getTransactionStatus_1 = __importDefault(require("./commands/getTransactionStatus"));
|
|
39
39
|
var i18n_1 = __importDefault(require("./commands/i18n"));
|
|
40
40
|
var liveData_1 = __importDefault(require("./commands/liveData"));
|
|
41
|
-
var makeCompoundSummary_1 = __importDefault(require("./commands/makeCompoundSummary"));
|
|
42
41
|
var managerListApps_1 = __importDefault(require("./commands/managerListApps"));
|
|
43
42
|
var portfolio_1 = __importDefault(require("./commands/portfolio"));
|
|
44
43
|
var proxy_1 = __importDefault(require("./commands/proxy"));
|
|
@@ -98,7 +97,6 @@ exports["default"] = {
|
|
|
98
97
|
getTransactionStatus: getTransactionStatus_1["default"],
|
|
99
98
|
i18n: i18n_1["default"],
|
|
100
99
|
liveData: liveData_1["default"],
|
|
101
|
-
makeCompoundSummary: makeCompoundSummary_1["default"],
|
|
102
100
|
managerListApps: managerListApps_1["default"],
|
|
103
101
|
portfolio: portfolio_1["default"],
|
|
104
102
|
proxy: proxy_1["default"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands-index.js","sourceRoot":"","sources":["../src/commands-index.ts"],"names":[],"mappings":";;;;;AAAA,uDAAiC;AACjC,+EAAyD;AACzD,+FAAyE;AACzE,6EAAuD;AACvD,mFAA6D;AAC7D,6EAAuD;AACvD,uDAAiC;AACjC,yEAAmD;AACnD,uEAAiD;AACjD,mEAA6C;AAC7C,2EAAqD;AACrD,mEAA6C;AAC7C,2EAAqD;AACrD,qEAA+C;AAC/C,2FAAqE;AACrE,iFAA2D;AAC3D,qEAA+C;AAC/C,+FAAyE;AACzE,6FAAuE;AACvE,2EAAqD;AACrD,+EAAyD;AACzD,yDAAmC;AACnC,yFAAmE;AACnE,6EAAuD;AACvD,6EAAuD;AACvD,6EAAuD;AACvD,iGAA2E;AAC3E,+FAAyE;AACzE,yEAAmD;AACnD,qEAA+C;AAC/C,iFAA2D;AAC3D,yFAAmE;AACnE,yFAAmE;AACnE,yDAAmC;AACnC,iEAA2C;AAC3C
|
|
1
|
+
{"version":3,"file":"commands-index.js","sourceRoot":"","sources":["../src/commands-index.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IACvB,sBAAsB,qCAAA;IACtB,aAAa,4BAAA;IACb,eAAe,8BAAA;IACf,IAAI,mBAAA;IACJ,oBAAoB,mCAAA;IACpB,cAAc,6BAAA;IACd,cAAc,6BAAA;IACd,cAAc,6BAAA;IACd,wBAAwB,uCAAA;IACxB,uBAAuB,sCAAA;IACvB,YAAY,2BAAA;IACZ,UAAU,yBAAA;IACV,gBAAgB,+BAAA;IAChB,oBAAoB,mCAAA;IACpB,oBAAoB,mCAAA;IACpB,IAAI,mBAAA;IACJ,QAAQ,uBAAA;IACR,eAAe,8BAAA;IACf,SAAS,wBAAA;IACT,KAAK,oBAAA;IACL,OAAO,sBAAA;IACP,IAAI,mBAAA;IACJ,QAAQ,uBAAA;IACR,cAAc,6BAAA;IACd,eAAe,8BAAA;IACf,IAAI,mBAAA;IACJ,WAAW,0BAAA;IACX,YAAY,2BAAA;IACZ,uBAAuB,sCAAA;IACvB,cAAc,6BAAA;IACd,kBAAkB,iCAAA;IAClB,aAAa,4BAAA;IACb,IAAI,mBAAA;IACJ,IAAI,mBAAA;IACJ,qBAAqB,oCAAA;IACrB,qBAAqB,oCAAA;IACrB,6BAA6B,4CAAA;IAC7B,IAAI,mBAAA;IACJ,OAAO,sBAAA;IACP,aAAa,4BAAA;CACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/live-cli",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.7.0-next.0",
|
|
4
4
|
"description": "ledger-live CLI version",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"rxjs": "^6.6.7",
|
|
43
43
|
"winston": "^3.5.1",
|
|
44
44
|
"ws": "^8.6.0",
|
|
45
|
-
"@ledgerhq/coin-framework": "^0.
|
|
45
|
+
"@ledgerhq/coin-framework": "^0.3.0-next.0",
|
|
46
46
|
"@ledgerhq/cryptoassets": "^9.3.0-next.0",
|
|
47
47
|
"@ledgerhq/errors": "^6.12.4",
|
|
48
48
|
"@ledgerhq/hw-app-btc": "^10.0.1",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@types/pako": "^2.0.0",
|
|
63
63
|
"ts-node": "^10.4.0",
|
|
64
64
|
"typescript": "^4.8.3",
|
|
65
|
-
"@ledgerhq/types-cryptoassets": "^7.0.0",
|
|
65
|
+
"@ledgerhq/types-cryptoassets": "^7.1.0-next.0",
|
|
66
66
|
"@ledgerhq/types-live": "^6.32.0-next.0"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import type { CompoundAccountSummary } from "@ledgerhq/live-common/compound/types";
|
|
2
|
-
import type { ScanCommonOpts } from "../scan";
|
|
3
|
-
declare const compoundSummaryFormatter: {
|
|
4
|
-
summary: (summary: CompoundAccountSummary) => string;
|
|
5
|
-
default: (summary: CompoundAccountSummary) => string;
|
|
6
|
-
};
|
|
7
|
-
declare const _default: {
|
|
8
|
-
description: string;
|
|
9
|
-
args: ({
|
|
10
|
-
name: string;
|
|
11
|
-
alias: string;
|
|
12
|
-
type: StringConstructor;
|
|
13
|
-
desc: string;
|
|
14
|
-
} | {
|
|
15
|
-
name: string;
|
|
16
|
-
type: StringConstructor;
|
|
17
|
-
desc: string;
|
|
18
|
-
multiple: boolean;
|
|
19
|
-
typeDesc?: undefined;
|
|
20
|
-
alias?: undefined;
|
|
21
|
-
} | {
|
|
22
|
-
name: string;
|
|
23
|
-
type: StringConstructor;
|
|
24
|
-
typeDesc: string;
|
|
25
|
-
desc: string;
|
|
26
|
-
multiple?: undefined;
|
|
27
|
-
alias?: undefined;
|
|
28
|
-
} | {
|
|
29
|
-
name: string;
|
|
30
|
-
alias: string;
|
|
31
|
-
type: NumberConstructor;
|
|
32
|
-
desc: string;
|
|
33
|
-
multiple?: undefined;
|
|
34
|
-
typeDesc?: undefined;
|
|
35
|
-
} | {
|
|
36
|
-
name: string;
|
|
37
|
-
type: NumberConstructor;
|
|
38
|
-
desc: string;
|
|
39
|
-
multiple?: undefined;
|
|
40
|
-
typeDesc?: undefined;
|
|
41
|
-
alias?: undefined;
|
|
42
|
-
} | {
|
|
43
|
-
name: string;
|
|
44
|
-
alias: string;
|
|
45
|
-
type: StringConstructor;
|
|
46
|
-
typeDesc: string;
|
|
47
|
-
desc: string;
|
|
48
|
-
})[];
|
|
49
|
-
job: (opts: ScanCommonOpts & {
|
|
50
|
-
format: keyof typeof compoundSummaryFormatter;
|
|
51
|
-
}) => import("rxjs").Observable<string>;
|
|
52
|
-
};
|
|
53
|
-
export default _default;
|
|
54
|
-
//# sourceMappingURL=makeCompoundSummary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"makeCompoundSummary.d.ts","sourceRoot":"","sources":["../../src/commands/makeCompoundSummary.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EAEvB,MAAM,sCAAsC,CAAC;AAQ9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAgH9C,QAAA,MAAM,wBAAwB;uBACT,sBAAsB,KAAG,MAAM;uBA6B/B,sBAAsB,KAAG,MAAM;CAUnD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAcQ,cAAc,GAAG;QACrB,MAAM,EAAE,MAAM,+BAA+B,CAAC;KAC/C;;AAfL,wBAiCE"}
|
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
-
var t = {};
|
|
4
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
-
t[p] = s[p];
|
|
6
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
-
t[p[i]] = s[p[i]];
|
|
10
|
-
}
|
|
11
|
-
return t;
|
|
12
|
-
};
|
|
13
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
14
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
15
|
-
if (!m) return o;
|
|
16
|
-
var i = m.call(o), r, ar = [], e;
|
|
17
|
-
try {
|
|
18
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
19
|
-
}
|
|
20
|
-
catch (error) { e = { error: error }; }
|
|
21
|
-
finally {
|
|
22
|
-
try {
|
|
23
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
24
|
-
}
|
|
25
|
-
finally { if (e) throw e.error; }
|
|
26
|
-
}
|
|
27
|
-
return ar;
|
|
28
|
-
};
|
|
29
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
30
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
31
|
-
if (ar || !(i in from)) {
|
|
32
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
33
|
-
ar[i] = from[i];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
37
|
-
};
|
|
38
|
-
exports.__esModule = true;
|
|
39
|
-
var operators_1 = require("rxjs/operators");
|
|
40
|
-
var index_1 = require("@ledgerhq/live-common/currencies/index");
|
|
41
|
-
var logic_1 = require("@ledgerhq/live-common/compound/logic");
|
|
42
|
-
var scan_1 = require("../scan");
|
|
43
|
-
var formatDate = function (date) {
|
|
44
|
-
var ye = new Intl.DateTimeFormat("en", {
|
|
45
|
-
year: "numeric"
|
|
46
|
-
}).format(date);
|
|
47
|
-
var mo = new Intl.DateTimeFormat("en", {
|
|
48
|
-
month: "short"
|
|
49
|
-
}).format(date);
|
|
50
|
-
var da = new Intl.DateTimeFormat("en", {
|
|
51
|
-
day: "2-digit"
|
|
52
|
-
}).format(date);
|
|
53
|
-
return "".concat(da, "-").concat(mo, "-").concat(ye);
|
|
54
|
-
};
|
|
55
|
-
var createLoanHeader = function (summary, strings, account, parentAccount) {
|
|
56
|
-
var totalSupplied = summary.totalSupplied, allTimeEarned = summary.allTimeEarned, status = summary.status;
|
|
57
|
-
strings.push("\n");
|
|
58
|
-
strings.push("Compound Summary for account ".concat(parentAccount ? parentAccount.id : account ? account.id : ""));
|
|
59
|
-
strings.push("\n");
|
|
60
|
-
if (status) {
|
|
61
|
-
strings.push("Status: ".concat(status));
|
|
62
|
-
strings.push("\n");
|
|
63
|
-
}
|
|
64
|
-
strings.push("-------------------------------");
|
|
65
|
-
strings.push("\n");
|
|
66
|
-
strings.push("".concat(account.token.ticker, " supplied").padStart(16));
|
|
67
|
-
strings.push(" | ");
|
|
68
|
-
strings.push("".concat(account.token.ticker, " earned").padStart(16));
|
|
69
|
-
strings.push(" | ");
|
|
70
|
-
strings.push("\n");
|
|
71
|
-
strings.push("".concat((0, index_1.formatCurrencyUnit)(account.token.units[0], totalSupplied)).padStart(16));
|
|
72
|
-
strings.push(" | ");
|
|
73
|
-
strings.push("".concat((0, index_1.formatCurrencyUnit)(account.token.units[0], allTimeEarned)).padStart(16));
|
|
74
|
-
strings.push(" | ");
|
|
75
|
-
strings.push("\n");
|
|
76
|
-
strings.push("-------------------------------");
|
|
77
|
-
strings.push("\n");
|
|
78
|
-
return strings;
|
|
79
|
-
};
|
|
80
|
-
var createLoanDisplay = function (loans, strings, title, account) {
|
|
81
|
-
strings.push(title);
|
|
82
|
-
strings.push("\n");
|
|
83
|
-
strings.push("Starting Date".padStart(16));
|
|
84
|
-
strings.push(" | ");
|
|
85
|
-
strings.push("Ending Date".padStart(16));
|
|
86
|
-
strings.push(" | ");
|
|
87
|
-
strings.push("".concat(account.token.ticker).padStart(16));
|
|
88
|
-
strings.push(" | ");
|
|
89
|
-
strings.push("".concat(account.token.ticker, " Earned").padStart(16));
|
|
90
|
-
strings.push(" | ");
|
|
91
|
-
strings.push("Interests Accrued (%)".padStart(22));
|
|
92
|
-
strings.push(" | ");
|
|
93
|
-
strings.push("\n");
|
|
94
|
-
loans.forEach(function (_a) {
|
|
95
|
-
var startingDate = _a.startingDate,
|
|
96
|
-
// @ts-expect-error composite type, endDate doesn't exist on one subtype
|
|
97
|
-
endDate = _a.endDate, amountSupplied = _a.amountSupplied, interestsEarned = _a.interestsEarned, percentageEarned = _a.percentageEarned;
|
|
98
|
-
strings.push(formatDate(startingDate).padStart(16));
|
|
99
|
-
strings.push(" | ");
|
|
100
|
-
strings.push((endDate ? formatDate(endDate) : "-").padStart(16));
|
|
101
|
-
strings.push(" | ");
|
|
102
|
-
strings.push("".concat((0, index_1.formatCurrencyUnit)(account.token.units[0], amountSupplied)).padStart(16));
|
|
103
|
-
strings.push(" | ");
|
|
104
|
-
strings.push("".concat((0, index_1.formatCurrencyUnit)(account.token.units[0], interestsEarned)).padStart(16));
|
|
105
|
-
strings.push(" | ");
|
|
106
|
-
strings.push("".concat(Math.round(percentageEarned * 100) / 100).padStart(22));
|
|
107
|
-
strings.push(" | ");
|
|
108
|
-
strings.push("\n");
|
|
109
|
-
});
|
|
110
|
-
strings.push("-------------------------------");
|
|
111
|
-
strings.push("\n");
|
|
112
|
-
return strings;
|
|
113
|
-
};
|
|
114
|
-
var compoundSummaryFormatter = {
|
|
115
|
-
summary: function (summary) {
|
|
116
|
-
if (!summary)
|
|
117
|
-
return "";
|
|
118
|
-
var account = summary.account, totalSupplied = summary.totalSupplied, allTimeEarned = summary.allTimeEarned, accruedInterests = summary.accruedInterests, opened = summary.opened, closed = summary.closed;
|
|
119
|
-
return JSON.stringify({
|
|
120
|
-
accountId: account.id,
|
|
121
|
-
totalSupplied: totalSupplied.toString(),
|
|
122
|
-
allTimeEarned: allTimeEarned.toString(),
|
|
123
|
-
accruedInterests: accruedInterests.toString(),
|
|
124
|
-
opened: opened.map(function (_a) {
|
|
125
|
-
var op = __rest(_a, []);
|
|
126
|
-
return ({
|
|
127
|
-
startingDate: op.startingDate.toString(),
|
|
128
|
-
interestsEarned: op.interestsEarned.toString(),
|
|
129
|
-
amountSupplied: op.amountSupplied.toString(),
|
|
130
|
-
percentageEarned: op.percentageEarned.toString()
|
|
131
|
-
});
|
|
132
|
-
}),
|
|
133
|
-
closed: closed.map(function (_a) {
|
|
134
|
-
var op = __rest(_a, []);
|
|
135
|
-
return ({
|
|
136
|
-
startingDate: op.startingDate.toString(),
|
|
137
|
-
amountSupplied: op.amountSupplied.toString(),
|
|
138
|
-
interestsEarned: op.interestsEarned.toString(),
|
|
139
|
-
percentageEarned: op.percentageEarned.toString()
|
|
140
|
-
});
|
|
141
|
-
})
|
|
142
|
-
});
|
|
143
|
-
},
|
|
144
|
-
"default": function (summary) {
|
|
145
|
-
var opened = summary.opened, closed = summary.closed, account = summary.account, parentAccount = summary.parentAccount;
|
|
146
|
-
if (opened.length === 0 && closed.length === 0)
|
|
147
|
-
return "";
|
|
148
|
-
if (account.type !== "TokenAccount")
|
|
149
|
-
return "";
|
|
150
|
-
var strings = [];
|
|
151
|
-
createLoanHeader(summary, strings, account, parentAccount);
|
|
152
|
-
createLoanDisplay(opened, strings, "OPENED LOANS", account);
|
|
153
|
-
createLoanDisplay(closed, strings, "CLOSED LOANS", account);
|
|
154
|
-
return strings.join("");
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
exports["default"] = {
|
|
158
|
-
description: "Create a summary of compound operations (ETH)",
|
|
159
|
-
args: __spreadArray(__spreadArray([], __read(scan_1.scanCommonOpts), false), [
|
|
160
|
-
{
|
|
161
|
-
name: "format",
|
|
162
|
-
alias: "f",
|
|
163
|
-
type: String,
|
|
164
|
-
typeDesc: Object.keys(compoundSummaryFormatter).join(" | "),
|
|
165
|
-
desc: "how to display the data"
|
|
166
|
-
},
|
|
167
|
-
], false),
|
|
168
|
-
job: function (opts) {
|
|
169
|
-
return (0, scan_1.scan)(opts).pipe((0, operators_1.map)(function (account) {
|
|
170
|
-
var _a;
|
|
171
|
-
var result = [];
|
|
172
|
-
if (!((_a = account === null || account === void 0 ? void 0 : account.subAccounts) === null || _a === void 0 ? void 0 : _a.length))
|
|
173
|
-
return "";
|
|
174
|
-
var formatter = compoundSummaryFormatter[opts.format || "default"];
|
|
175
|
-
account.subAccounts.forEach(function (s) {
|
|
176
|
-
if (s.type !== "TokenAccount")
|
|
177
|
-
return;
|
|
178
|
-
if (!(0, index_1.findCompoundToken)(s.token))
|
|
179
|
-
return;
|
|
180
|
-
var sum = (0, logic_1.makeCompoundSummaryForAccount)(s, account);
|
|
181
|
-
if (!sum)
|
|
182
|
-
return;
|
|
183
|
-
var summary = formatter(sum);
|
|
184
|
-
result.push(summary);
|
|
185
|
-
});
|
|
186
|
-
return result.join("");
|
|
187
|
-
}));
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
//# sourceMappingURL=makeCompoundSummary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"makeCompoundSummary.js","sourceRoot":"","sources":["../../src/commands/makeCompoundSummary.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAAqC;AAKrC,gEAGgD;AAChD,8DAAqF;AAErF,gCAA+C;AAG/C,IAAM,UAAU,GAAG,UAAC,IAAU;IAC5B,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE;QACvC,IAAI,EAAE,SAAS;KAChB,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChB,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE;QACvC,KAAK,EAAE,OAAO;KACf,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChB,IAAM,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE;QACvC,GAAG,EAAE,SAAS;KACf,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