@ledgerhq/live-cli 24.21.0-nightly.5 → 24.21.1-nightly.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.
Files changed (2) hide show
  1. package/lib/cli.js +54 -15
  2. package/package.json +3 -3
package/lib/cli.js CHANGED
@@ -516704,7 +516704,7 @@ var require_package8 = __commonJS({
516704
516704
  module2.exports = {
516705
516705
  name: "@ledgerhq/live-common",
516706
516706
  description: "Common ground for the Ledger Live apps",
516707
- version: "34.44.0-nightly.5",
516707
+ version: "34.45.0-nightly.0",
516708
516708
  repository: {
516709
516709
  type: "git",
516710
516710
  url: "https://github.com/LedgerHQ/ledger-live.git"
@@ -523507,7 +523507,7 @@ var require_package9 = __commonJS({
523507
523507
  "package.json"(exports2, module2) {
523508
523508
  module2.exports = {
523509
523509
  name: "@ledgerhq/live-cli",
523510
- version: "24.21.0-nightly.5",
523510
+ version: "24.21.1-nightly.0",
523511
523511
  description: "ledger-live CLI version",
523512
523512
  repository: {
523513
523513
  type: "git",
@@ -528266,6 +528266,11 @@ var envDefinitions = {
528266
528266
  def: "https://earn.api.live.ledger.com/v0/network/solana/validator-details",
528267
528267
  desc: "base url for validators.app validator list"
528268
528268
  },
528269
+ SOLANA_VALIDATORS_SUMMARY_BASE_URL: {
528270
+ parser: stringParser,
528271
+ def: "https://earn-dashboard.aws.stg.ldg-tech.com/figment/solana/validators_summary",
528272
+ desc: "base url for validators.app validator summary"
528273
+ },
528269
528274
  SOLANA_TESTNET_VALIDATORS_APP_BASE_URL: {
528270
528275
  parser: stringParser,
528271
528276
  def: "https://validators-solana.coin.ledger.com/api/v1/validators",
@@ -762452,18 +762457,20 @@ var LEDGER_VALIDATOR_BY_FIGMENT = {
762452
762457
  name: "Ledger by Figment",
762453
762458
  avatarUrl: "https://s3.amazonaws.com/keybase_processed_uploads/3c47b62f3d28ecfd821536f69be82905_360_360.jpg",
762454
762459
  wwwUrl: "https://www.ledger.com/staking",
762455
- activeStake: 9079057178046828,
762460
+ activeStake: 8860644178046828,
762456
762461
  commission: 7,
762457
- totalScore: 6
762462
+ totalScore: 6,
762463
+ apy: 0.078107
762458
762464
  };
762459
762465
  var LEDGER_VALIDATOR_BY_CHORUS_ONE = {
762460
762466
  voteAccount: "CpfvLiiPALdzZTP3fUrALg2TXwEDSAknRh1sn5JCt9Sr",
762461
762467
  name: "Ledger by Chorus One",
762462
762468
  avatarUrl: "https://s3.amazonaws.com/keybase_processed_uploads/3c47b62f3d28ecfd821536f69be82905_360_360.jpg",
762463
762469
  wwwUrl: "https://www.ledger.com/staking",
762464
- activeStake: 10001001000098,
762470
+ activeStake: 110738001000098,
762465
762471
  commission: 7,
762466
- totalScore: 7
762472
+ totalScore: 7,
762473
+ apy: 0.07228
762467
762474
  };
762468
762475
  var LEDGER_VALIDATOR_DEFAULT = LEDGER_VALIDATOR_BY_FIGMENT;
762469
762476
  var LEDGER_VALIDATOR_LIST = [
@@ -764016,6 +764023,9 @@ var buildTransactionWithAPI = async (address4, transaction, api7) => {
764016
764023
  let web3SolanaTransaction;
764017
764024
  if (transaction.raw) {
764018
764025
  web3SolanaTransaction = VersionedTransaction.deserialize(Buffer.from(transaction.raw, "base64"));
764026
+ if (web3SolanaTransaction.message) {
764027
+ web3SolanaTransaction.message.recentBlockhash = recentBlockhash.blockhash;
764028
+ }
764019
764029
  } else {
764020
764030
  const instructions = await buildInstructions(api7, transaction);
764021
764031
  const transactionMessage = new TransactionMessage({
@@ -765172,14 +765182,36 @@ var URLS = {
765172
765182
  }
765173
765183
  const baseUrl = getEnv("SOLANA_VALIDATORS_APP_BASE_URL");
765174
765184
  return baseUrl;
765175
- }
765185
+ },
765186
+ validatorApylist: getEnv("SOLANA_VALIDATORS_SUMMARY_BASE_URL")
765176
765187
  };
765188
+ async function fetchFigmentApy(cluster) {
765189
+ if (cluster !== "mainnet-beta")
765190
+ return {};
765191
+ try {
765192
+ const response = await lib_es_default({
765193
+ method: "GET",
765194
+ url: URLS.validatorApylist
765195
+ });
765196
+ if (response.status === 200 && Array.isArray(response.data)) {
765197
+ return response.data.reduce((acc, item) => {
765198
+ if (typeof item.address === "string" && typeof item.delegator_apy === "number") {
765199
+ acc[item.address] = item.delegator_apy;
765200
+ }
765201
+ return acc;
765202
+ }, {});
765203
+ }
765204
+ } catch (error) {
765205
+ console.warn("Failed to fetch Figment APY", error);
765206
+ }
765207
+ return {};
765208
+ }
765177
765209
  async function getValidators4(cluster) {
765178
- const response = await network_default({
765179
- method: "GET",
765180
- url: URLS.validatorList(cluster)
765181
- });
765182
- const allRawValidators = response.status === 200 ? response.data : [];
765210
+ const [validatorsResponse, apyMap] = await Promise.all([
765211
+ lib_es_default({ method: "GET", url: URLS.validatorList(cluster) }),
765212
+ fetchFigmentApy(cluster)
765213
+ ]);
765214
+ const allRawValidators = validatorsResponse.status === 200 ? validatorsResponse.data : [];
765183
765215
  const tryFromRawValidator = (validator2) => {
765184
765216
  if (typeof validator2.active_stake === "number" && typeof validator2.commission === "number" && typeof validator2.total_score === "number" && typeof validator2.vote_account === "string" && validator2.delinquent !== true) {
765185
765217
  return {
@@ -765189,7 +765221,8 @@ async function getValidators4(cluster) {
765189
765221
  voteAccount: validator2.vote_account,
765190
765222
  name: validator2.name ?? void 0,
765191
765223
  avatarUrl: validator2.avatar_url ?? void 0,
765192
- wwwUrl: validator2.www_url ?? void 0
765224
+ wwwUrl: validator2.www_url ?? void 0,
765225
+ apy: apyMap[validator2.vote_account]
765193
765226
  };
765194
765227
  }
765195
765228
  return void 0;
@@ -820882,7 +820915,10 @@ var evmConfig = {
820882
820915
  default: {
820883
820916
  status: { type: "active" },
820884
820917
  node: { type: "external", uri: "https://rpc.blast.io" },
820885
- explorer: { type: "blockscout", uri: "https://blast.blockscout.com/api" },
820918
+ explorer: {
820919
+ type: "etherscan",
820920
+ uri: "https://proxyetherscan.api.live.ledger.com/v2/api/81457"
820921
+ },
820886
820922
  showNfts: false
820887
820923
  }
820888
820924
  },
@@ -820891,7 +820927,10 @@ var evmConfig = {
820891
820927
  default: {
820892
820928
  status: { type: "active" },
820893
820929
  node: { type: "external", uri: "https://sepolia.blast.io" },
820894
- explorer: { type: "blockscout", uri: "https://blast-testnet.blockscout.com/api" },
820930
+ explorer: {
820931
+ type: "etherscan",
820932
+ uri: "https://proxyetherscan.api.live.ledger.com/v2/api/168587773"
820933
+ },
820895
820934
  showNfts: false
820896
820935
  }
820897
820936
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/live-cli",
3
- "version": "24.21.0-nightly.5",
3
+ "version": "24.21.1-nightly.0",
4
4
  "description": "ledger-live CLI version",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,8 +57,8 @@
57
57
  "@types/ws": "8.5.10",
58
58
  "ts-node": "10.9.2",
59
59
  "tsup": "7.3.0",
60
- "@ledgerhq/types-cryptoassets": "^7.24.0",
61
- "@ledgerhq/types-live": "^6.79.1-nightly.0"
60
+ "@ledgerhq/types-cryptoassets": "^7.25.0",
61
+ "@ledgerhq/types-live": "^6.80.0"
62
62
  },
63
63
  "publishConfig": {
64
64
  "directory": "dist"