@ledgerhq/coin-tester-evm 1.10.0-nightly.20251030160608 → 1.10.0-nightly.20251031094135

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/coin-tester-evm",
3
- "version": "1.10.0-nightly.20251030160608",
3
+ "version": "1.10.0-nightly.20251031094135",
4
4
  "description": "Ledger EVM Coin Tester",
5
5
  "main": "src/scenarii.test.ts",
6
6
  "keywords": [
@@ -51,15 +51,15 @@
51
51
  "dotenv": "^16.4.5",
52
52
  "ethers": "6.15.0",
53
53
  "msw": "^2.2.1",
54
- "@ledgerhq/coin-evm": "^2.34.0-nightly.20251030160608",
55
- "@ledgerhq/coin-framework": "^6.8.0-nightly.20251030160608",
56
- "@ledgerhq/coin-tester": "^0.11.0-nightly.20251030160608",
57
- "@ledgerhq/cryptoassets": "^13.32.0-nightly.20251030160608",
58
- "@ledgerhq/live-common": "^34.52.0-nightly.20251030160608",
54
+ "@ledgerhq/coin-evm": "^2.34.0-nightly.20251031094135",
55
+ "@ledgerhq/coin-tester": "^0.11.0-nightly.20251031094135",
56
+ "@ledgerhq/cryptoassets": "^13.32.0-nightly.20251031094135",
57
+ "@ledgerhq/coin-framework": "^6.8.0-nightly.20251031094135",
58
+ "@ledgerhq/live-common": "^34.52.0-nightly.20251031094135",
59
59
  "@ledgerhq/live-config": "^3.2.0",
60
- "@ledgerhq/live-signer-evm": "^0.10.0-nightly.20251030160608",
61
- "@ledgerhq/types-cryptoassets": "^7.30.0-nightly.20251030160608",
62
- "@ledgerhq/types-live": "^6.88.0-nightly.20251030160608"
60
+ "@ledgerhq/live-signer-evm": "^0.10.0-nightly.20251031094135",
61
+ "@ledgerhq/types-cryptoassets": "^7.30.0-nightly.20251031094135",
62
+ "@ledgerhq/types-live": "^6.88.0-nightly.20251031094135"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@swc/core": "1.4.11",
@@ -72,7 +72,7 @@
72
72
  "ts-jest": "^29.1.2",
73
73
  "ts-node": "^10.9.2",
74
74
  "typescript": "^5.3.3",
75
- "@ledgerhq/hw-transport": "6.31.13-nightly.20251030160608"
75
+ "@ledgerhq/hw-transport": "6.31.13-nightly.20251031094135"
76
76
  },
77
77
  "scripts": {
78
78
  "clean": "rimraf lib lib-es",
@@ -1,21 +1,16 @@
1
1
  import { makeAccount } from "../fixtures";
2
- import { buildAccountBridge, buildCurrencyBridge } from "@ledgerhq/coin-evm/bridge/js";
3
2
  import { getCoinConfig, setCoinConfig } from "@ledgerhq/coin-evm/config";
4
- import resolver from "@ledgerhq/coin-evm/hw-getAddress";
5
- import { EvmSigner } from "@ledgerhq/coin-evm/types/signer";
6
3
  import { Transaction as EvmTransaction } from "@ledgerhq/coin-evm/types/transaction";
7
4
  import { encodeTokenAccountId } from "@ledgerhq/coin-framework/account/index";
8
- import { SignerContext } from "@ledgerhq/coin-framework/signer";
9
5
  import { Scenario, ScenarioTransaction } from "@ledgerhq/coin-tester/main";
10
6
  import { killSpeculos, spawnSpeculos } from "@ledgerhq/coin-tester/signers/speculos";
11
7
  import { findTokenById } from "@ledgerhq/cryptoassets/tokens";
12
8
  import { LiveConfig } from "@ledgerhq/live-config/LiveConfig";
13
- import { LegacySignerEth } from "@ledgerhq/live-signer-evm";
14
9
  import { Account } from "@ledgerhq/types-live";
15
10
  import { BigNumber } from "bignumber.js";
16
11
  import { ethers } from "ethers";
17
12
  import { killAnvil, spawnAnvil } from "../anvil";
18
- import { VITALIK, core } from "../helpers";
13
+ import { VITALIK, core, getBridges } from "../helpers";
19
14
  import { indexBlocks, initMswHandlers, resetIndexer, setBlock } from "../indexer";
20
15
  import { defaultNanoApp } from "../constants";
21
16
 
@@ -69,13 +64,12 @@ const makeScenarioTransactions = ({ address }: { address: string }): CoreScenari
69
64
 
70
65
  export const scenarioCore: Scenario<EvmTransaction, Account> = {
71
66
  name: "Ledger Live Basic CORE Transactions",
72
- setup: async () => {
67
+ setup: async strategy => {
73
68
  const [{ transport, getOnSpeculosConfirmation }] = await Promise.all([
74
69
  spawnSpeculos(`/${defaultNanoApp.firmware}/Ethereum/app_${defaultNanoApp.version}.elf`),
75
70
  spawnAnvil("https://rpc.ankr.com/core"),
76
71
  ]);
77
72
  const provider = new ethers.JsonRpcProvider("http://127.0.0.1:8545");
78
- const signerContext: SignerContext<EvmSigner> = (_, fn) => fn(new LegacySignerEth(transport));
79
73
 
80
74
  setCoinConfig(() => ({
81
75
  info: {
@@ -114,10 +108,7 @@ export const scenarioCore: Scenario<EvmTransaction, Account> = {
114
108
  initMswHandlers(getCoinConfig(core).info);
115
109
 
116
110
  const onSignerConfirmation = getOnSpeculosConfirmation();
117
- const currencyBridge = buildCurrencyBridge(signerContext);
118
- await currencyBridge.preload(core);
119
- const accountBridge = buildAccountBridge(signerContext);
120
- const getAddress = resolver(signerContext);
111
+ const { currencyBridge, accountBridge, getAddress } = getBridges(strategy, transport, "core");
121
112
  const { address } = await getAddress("", {
122
113
  path: "44'/60'/0'/0/0",
123
114
  currency: core,