0.4.7 • Published 21 days ago

@ledgerhq/hw-app-exchange v0.4.7

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
21 days ago

GitHub, Ledger Devs Discord, Developer Portal

@ledgerhq/hw-app-exchange

Ledger Hardware Wallet Exchange app.

API

Table of Contents

resolveTransactionType

Adapt ExchangeTypes following partner info. For "legacy" partner, we don't change the provided type. For new one, we call the new APDU commands (Ng, Next Gen).

Parameters

  • type ExchangeTypes
  • partnerVersion number?

Returns ExchangeTypes

OkStatus

Those values map the one defined in the app-exchange code (@see protocol.md and swap_errors.h)

Type: number

Integration test

1. Prerequisite

Download latest version of Ledger SDK.

docker pull ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest

The rest of the documentation is about testing on NanoSP.

2. Compile app-exchange

docker run --privileged -v '<ABSOLUTE_PATH_TO_APP_EXCHANGE_SRC>:/app' -t -d --name ledger-app-dev-tools ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools

docker exec -it ledger-app-dev-tools bash -c 'export BOLOS_SDK="$NANOSP_SDK" && make -j DEBUG=1 TESTING=1 TEST_PUBLIC_KEY=1'

It is important to set the value of DEBUG to 1, as we need the fake Ledger private key in our test.

3. Launch speculos

You can compile only the app-exchange, but it can be useful to compile a coin-app like app-ethereum.

In the documentation, we assume the following name for the apps binary:

  • app-exchange: exchange_nanosp.elf
  • app-ethereum: ethereum_nanosp.elf
docker run -v '<ABSOLUTE_PATH_TO_ELFS>:/app' -p 5000:5000 -t -d --name speculos ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools

docker exec -it speculos bash -c 'speculos --model "nanosp" /app/exchange_nanosp.elf -l /app/ethereum_nanosp.elf --display headless'

4. Launch integration tests

From Ledger Live root directory:

pnpm ljs:hw-app-exchange test-integ
0.4.7

21 days ago

0.4.7-next.0

1 month ago

0.4.7-nightly.0

1 month ago

0.4.6-nightly.4

1 month ago

0.4.6-nightly.3

2 months ago

0.4.6-nightly.2

2 months ago

0.4.6

2 months ago

0.4.6-nightly.1

2 months ago

0.4.6-nightly.0

2 months ago

0.4.6-next.0

2 months ago

0.4.5-new-wc.0

3 months ago

0.4.5

3 months ago

0.4.5-wc-test.0

3 months ago

0.4.5-next.0

3 months ago

0.4.5-nightly.2

3 months ago

0.4.5-nightly.1

3 months ago

0.4.5-nightly.0

3 months ago

0.4.4

3 months ago

0.4.4-next.0

4 months ago

0.4.3

4 months ago

0.4.3-nightly.0

4 months ago

0.4.3-next.0

4 months ago

0.4.2

4 months ago

0.4.2-nightly.0

5 months ago

0.4.2-next.0

5 months ago

0.4.1

5 months ago

0.4.1-nightly.1

5 months ago

0.4.1-next.0

5 months ago

0.4.1-nightly.0

5 months ago

0.3.1-nightly.0

6 months ago

0.3.1-nightly.1

6 months ago

0.2.1-nightly.0

10 months ago

0.4.0-next.0

6 months ago

0.3.0-nightly.3

6 months ago

0.2.3-next.0

9 months ago

0.2.2-nightly.0

10 months ago

0.2.2-nightly.1

9 months ago

0.2.2-nightly.2

9 months ago

0.3.0-nightly.2

7 months ago

0.2.1-next.0

10 months ago

0.4.0-nightly.3

6 months ago

0.4.0-nightly.2

6 months ago

0.2.2-next.0

9 months ago

0.3.0

6 months ago

0.2.1

10 months ago

0.2.0

10 months ago

0.3.0-next.0

6 months ago

0.2.4-tag-word.0

7 months ago

0.2.4-nightly.1

7 months ago

0.2.4-nightly.0

8 months ago

0.2.3

9 months ago

0.4.0

6 months ago

0.2.2

9 months ago

0.2.0-next.0

11 months ago

0.2.0-nightly.0

11 months ago

0.1.1-next.0

1 year ago

0.1.3-nightly.0

11 months ago

0.1.2-next.0

12 months ago

0.1.3-next.0

11 months ago

0.1.2-nightly.0

12 months ago

0.1.1-nightly.0

1 year ago

0.1.2

12 months ago

0.1.1

1 year ago

0.1.3-notarizer.0

11 months ago

0.1.3

11 months ago

0.1.0

1 year ago