Skip to content
This repository has been archived by the owner on Jun 27, 2022. It is now read-only.

Releases: LedgerHQ/ledgerjs

v6.23.0

14 Jan 17:36
@gre gre
aa41abf
Compare
Choose a tag to compare

6.22.x

06 Jan 16:57
@gre gre
753cf3f
Compare
Choose a tag to compare

Rework hw-app-eth to split out "ledger services" from the app logic #747

eth.signTransaction(path, txHex)

becomes deprecated in favor of

eth.signTransaction(path, txHex, resolution)

where resolution is an object with following shape:

{
  erc20Tokens: Array<string>;
  nfts: Array<string>;
  externalPlugin: Array<{ payload: string; signature: string }>;
  plugin: Array<string>;
}

This object contains all the hex serialized data the device may need to clear sign information on device screen.

Hopefully we also provide a default "service" to resolve this data, example:

import ledgerService from "@ledgerhq/hw-app-eth/lib/services/ledger"
async function main() {
  ...
  const resolution = await ledgerService.resolveTransaction(txHex, loadConfig, resolutionConfig)
    .catch(() => null); // <-- up to you if you want a fallback to blind sign. (which was previous behavior)
   const result = eth.signTransaction("44'/60'/0'/0/0", txHex, resolution);
}

This allows us to decouple the transaction resolution from the device signature logic itself in order for you to have better control and for more usecases

  • an alternative service (rather than Ledger's) could be used.
  • we plan to make even more things dynamic, typically the way we load and resolve ERC20 and plugins are too monolithic. This rework pave the path to allow this even more easily.
  • you may want to load the resolve data way ahead in your "validation process" and typically inform the user if an error occurs before it reach the device phase.
  • you may want a finer control weither you allow blind sign or not. Typically, you may or may not use .catch(() => null) in the snippet above

loadConfig

loadConfig is a configuration file that allows to configure what endpoints are used for the resolution mecanism.

NFT resolution is not yet active in this current version but will be soon. That said, you need to explicitly request it in resolutionConfig.

you can set {} object and it will be fallback to default values.

resolutionConfig

This is an object that specifies what need to be resolved, if any.

Here are all the possible flag to set at the moment:

{ nft: true, externalPlugins: true, erc20: true }

you can just { erc20: true } if you just need to resolve ERC20 token signature. It gives context for the resolver to do the minimum.

You can also see:

  • nft: is the mecanics to do clear signing. (it is not yet active, unless you set the correct loadConfig API)
  • externalPlugins: is the plugin mecanics (e.g. LIDO) to see what you sign in Ledger Live apps.

New libraries in ledgerjs

  • LL-8827 Introduce types libraries (#748)
  • Add Speculos Http API transport (#746) thanks @r4mmer

Others

  • Update ERC20 list – LL-8868
  • fix: cryptoassets exchange erc20 & coins import names (#752)

v6.21.3

03 Jan 09:58
@gre gre
d40c77c
Compare
Choose a tag to compare

v6.21.1

24 Dec 15:18
@gre gre
9fb8393
Compare
Choose a tag to compare
  • cryptoassets: tezos: uses tzkt.io as explorer – LL-8818

v6.21.0

24 Dec 09:35
@gre gre
db3d505
Compare
Choose a tag to compare
  • Convert an Uint8Array returned by Buffer.subarray on browser to a Buffer instance (#742) thanks @fabenedetti
  • Add Kabuto as an explorer view for Hedera (#721) thanks @mehcode
  • (internal) update build deps

v6.20.0

24 Dec 09:17
@gre gre
8142181
Compare
Choose a tag to compare

Update tokens 40a2101

v6.19.0

24 Dec 09:17
@gre gre
37f11a9
Compare
Choose a tag to compare
  • cryptoassets list
    • Adding Internet Computer (icp) support (#707)
    • update latest erc20 list (activate some countervalues)
    • disable solana tokens (#735)
  • React Native BLE transport: LL-8068: Improve the performance of the BLE data transfers (#737)
  • Internal: Improve the importer to detect possible issues when merging contract (#732)

v6.18.0

24 Dec 09:15
@gre gre
7bfa1d5
Compare
Choose a tag to compare

ERC20 update

v6.17.0

25 Nov 13:44
@gre gre
7658f22
Compare
Choose a tag to compare
  • @ledgerhq/cryptoassets update
  • @ledgerhq/hw-app-eth: All necessary fixes to support NFT
  • @ledgerhq/hw-app-btc: LL-8255: call onDeviceSignatureRequested at a more accurate time

v6.16.0

23 Nov 10:54
@gre gre
4936919
Compare
Choose a tag to compare
  • add solana test currencies (#719)
  • update ERC20 list