Skip to content

Commit ddf6375

Browse files
🔖 (release) [NO-ISSUE]: Release Signer ETH 1.6.0, Hyperliquid 1.0.2 (#1388)
2 parents 40912eb + 3bbf441 commit ddf6375

115 files changed

Lines changed: 2504 additions & 278 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ledgerhq/device-signer-kit-zcash": minor
3+
---
4+
5+
Scaffold for Zcash signer
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"@ledgerhq/device-signer-kit-ethereum": patch
2+
"@ledgerhq/device-signer-kit-solana": patch
33
---
44

55
Extract hardcoded appName string literals into shared APP_NAME constants

‎apps/clear-signing-tester/src/application/usecases/TestBatchContractFromFileUseCase.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { inject, injectable } from "inversify";
33

44
import { TYPES } from "@root/src/di/types";
55
import { type ContractInput } from "@root/src/domain/models/ContractInput";
6+
import { SignableInputKind } from "@root/src/domain/models/SignableInputKind";
67
import { type DataFileRepository } from "@root/src/domain/repositories/DataFileRepository";
78
import { type TestResult } from "@root/src/domain/types/TestStatus";
89
import {
@@ -100,6 +101,7 @@ export class TestBatchContractFromFileUseCase {
100101
const enhancedResults = batchResult.resultsTable.map((row) => {
101102
const testResult: TestResult = {
102103
input: {
104+
kind: SignableInputKind.Transaction,
103105
rawTx: "",
104106
description: `[${contract.name}/${contract.owner}/Chain ${chainId}] ${row.Description}`,
105107
},
@@ -120,6 +122,7 @@ export class TestBatchContractFromFileUseCase {
120122
// Create error result
121123
const errorResult: TestResult = {
122124
input: {
125+
kind: SignableInputKind.Transaction,
123126
rawTx: "",
124127
description: `${contract.name} (${contract.owner}) on chain ${chainId}`,
125128
},

‎apps/clear-signing-tester/src/application/usecases/TestBatchFromFileUseCase.ts‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import { LoggerPublisherService } from "@ledgerhq/device-management-kit";
22
import { inject, injectable } from "inversify";
33

44
import { TYPES } from "@root/src/di/types";
5-
import { TransactionInput } from "@root/src/domain/models/TransactionInput";
6-
import { TypedDataInput } from "@root/src/domain/models/TypedDataInput";
5+
import { type SignableInput } from "@root/src/domain/models/SignableInput";
76
import { type DataFileRepository } from "@root/src/domain/repositories/DataFileRepository";
87
import { type DeviceRepository } from "@root/src/domain/repositories/DeviceRepository";
98
import { TestResult } from "@root/src/domain/types/TestStatus";
@@ -33,9 +32,7 @@ export type TestFormattingConfig = {
3332
* Works with any data type T through the DataFileRepository interface
3433
*/
3534
@injectable()
36-
export class TestBatchFromFileUseCase<
37-
T extends TransactionInput | TypedDataInput,
38-
> {
35+
export class TestBatchFromFileUseCase<T extends SignableInput> {
3936
private readonly logger: LoggerPublisherService;
4037

4138
constructor(

‎apps/clear-signing-tester/src/application/usecases/TestBatchTransactionFromFileUseCase.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class TestBatchTransactionFromFileUseCase extends TestBatchFromFileUseCas
3232
transactionFileRepository,
3333
deviceRepository,
3434
(deviceRepo, input, derivationPath) =>
35-
deviceRepo.performSignTransaction(input, derivationPath),
35+
deviceRepo.performSign(input, derivationPath),
3636
{
3737
title: "📋 TRANSACTION TEST RESULTS",
3838
summaryTitle: "📊 TRANSACTION BATCH SUMMARY",

‎apps/clear-signing-tester/src/application/usecases/TestBatchTypedDataFromFileUseCase.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class TestBatchTypedDataFromFileUseCase extends TestBatchFromFileUseCase<
3232
typedDataFileRepository,
3333
deviceRepository,
3434
(deviceRepo, input, derivationPath) =>
35-
deviceRepo.performSignTypedData(input, derivationPath),
35+
deviceRepo.performSign(input, derivationPath),
3636
{
3737
title: "📋 TYPED DATA TEST RESULTS",
3838
summaryTitle: "📊 TYPED DATA BATCH SUMMARY",

‎apps/clear-signing-tester/src/application/usecases/TestContractUseCase.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { LoggerPublisherService } from "@ledgerhq/device-management-kit";
22
import { inject, injectable } from "inversify";
33

44
import { TYPES } from "@root/src/di/types";
5+
import { SignableInputKind } from "@root/src/domain/models/SignableInputKind";
6+
import { type TransactionInput } from "@root/src/domain/models/TransactionInput";
57
import { type DeviceRepository } from "@root/src/domain/repositories/DeviceRepository";
68
import { type TransactionContractRepository } from "@root/src/domain/repositories/TransactionContractRepository";
79
import { TestResult } from "@root/src/domain/types/TestStatus";
@@ -49,15 +51,16 @@ export class TestContractUseCase {
4951
// Test each transaction
5052
for (const [index, tx] of txs.entries()) {
5153
const { selector, hash } = tx.transactionData;
52-
const transaction = {
54+
const transaction: TransactionInput = {
55+
kind: SignableInputKind.Transaction,
5356
rawTx: tx.rawTx!,
5457
description: selector,
5558
};
5659

5760
this.logger.info(`Testing transaction ${index + 1}/${txs.length}`);
5861

5962
try {
60-
const result = await this.deviceRepository.performSignTransaction(
63+
const result = await this.deviceRepository.performSign(
6164
transaction,
6265
config.derivationPath,
6366
);

‎apps/clear-signing-tester/src/application/usecases/TestTransactionUseCase.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class TestTransactionUseCase {
4343
data: { description: transaction.description },
4444
});
4545

46-
const result = await this.deviceRepository.performSignTransaction(
46+
const result = await this.deviceRepository.performSign(
4747
transaction,
4848
config.derivationPath,
4949
);

‎apps/clear-signing-tester/src/application/usecases/TestTypedDataUseCase.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export class TestTypedDataUseCase {
4343
data: { typedData, description: "single typed data" },
4444
});
4545

46-
const result = await this.deviceRepository.performSignTypedData(
46+
const result = await this.deviceRepository.performSign(
4747
typedData,
4848
config.derivationPath,
4949
);

‎apps/clear-signing-tester/src/cli/EthereumTransactionTesterCli.ts‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
type CliLogLevel,
1919
} from "@root/src/domain/models/config/LoggerConfig";
2020
import { type SpeculosConfig } from "@root/src/domain/models/config/SpeculosConfig";
21+
import { SignableInputKind } from "@root/src/domain/models/SignableInputKind";
2122
import { type ServiceController } from "@root/src/domain/services/ServiceController";
2223
import { ERC7730InterceptorService } from "@root/src/infrastructure/services/ERC7730InterceptorService";
2324

@@ -35,6 +36,7 @@ export type CliConfig = {
3536
screenshotFolderPath?: string;
3637
customApp?: string;
3738
forcePull?: boolean;
39+
externalSpeculos?: boolean;
3840

3941
// config.signer
4042
skipCal?: boolean;
@@ -91,6 +93,7 @@ export class EthereumTransactionTesterCli {
9193
screenshotPath: config.screenshotFolderPath,
9294
customAppPath: config.customApp,
9395
forcePull: config.forcePull,
96+
externalSpeculos: config.externalSpeculos,
9497
},
9598
signer: {
9699
originToken: process.env["GATING_TOKEN"] || "test-origin-token",
@@ -291,6 +294,11 @@ export class EthereumTransactionTesterCli {
291294
"Force pulling the Docker image even if it already exists locally",
292295
false,
293296
)
297+
.option(
298+
"--external-speculos",
299+
"Skip Docker Speculos lifecycle and connect to an already-running Speculos instance on the configured --speculos-port.",
300+
false,
301+
)
294302
.option(
295303
"--log-level <level>",
296304
`Console log level: ${CLI_LOG_LEVELS.join(", ")} (default: info)`,
@@ -330,8 +338,16 @@ export class EthereumTransactionTesterCli {
330338

331339
program.hook("preAction", async (_, command) => {
332340
const config = command.parent!.opts() as CliConfig;
333-
// Set onlySpeculos flag when running start-speculos command
334341
config.onlySpeculos = command.name() === "start-speculos";
342+
343+
if (config.onlySpeculos && config.externalSpeculos) {
344+
throw new Error(
345+
"--external-speculos cannot be used with start-speculos. " +
346+
"Use start-speculos to let cs-tester manage Speculos, " +
347+
"or use other commands with --external-speculos to connect to an already-running instance.",
348+
);
349+
}
350+
335351
cli = new EthereumTransactionTesterCli(config);
336352
await cli.initialize();
337353
});
@@ -433,6 +449,7 @@ export class EthereumTransactionTesterCli {
433449

434450
const result = await testTransactionUseCase.execute(
435451
{
452+
kind: SignableInputKind.Transaction,
436453
rawTx: transaction,
437454
description: "Single transaction test",
438455
},
@@ -475,7 +492,11 @@ export class EthereumTransactionTesterCli {
475492
);
476493

477494
const result = await testTypedDataUseCase.execute(
478-
{ data, description: "single typed data" },
495+
{
496+
kind: SignableInputKind.TypedData,
497+
data,
498+
description: "single typed data",
499+
},
479500
{ derivationPath: this.config.derivationPath },
480501
);
481502

0 commit comments

Comments
 (0)