For Wallets

Integrate Clear Signing into your wallet to provide human-readable transaction information for your users.

Partner Program: Clear Signing for wallets requires enrollment in Ledger’s partner program.
Contact our team
to discuss integration.

How It Works

Wallet providers implement Clear Signing through Ledger’s Device Management Kit (DMK) and Device Signer Kit (DSK), which automatically fetch and display human-readable transaction information when metadata is available in the registry.

Why DMK? Built from the ground up with Clear Signing in mind, DMK provides observable-based patterns, TypeScript-first design, and automatic metadata fetching for all EVM-compatible chains.

Quick Start Guide

Install Required Packages

# Core DMK and transport
npm install @ledgerhq/device-management-kit \
            @ledgerhq/device-transport-kit-web-hid
 
# Ethereum signer for Clear Signing
npm install @ledgerhq/device-signer-kit-ethereum

Initialize DMK

dmk-setup.ts
import {
  DeviceManagementKitBuilder,
  ConsoleLogger
} from "@ledgerhq/device-management-kit";
import { webHidTransportFactory } from "@ledgerhq/device-transport-kit-web-hid";
 
const dmk = new DeviceManagementKitBuilder()
  .addLogger(new ConsoleLogger())
  .addTransport(webHidTransportFactory)
  .build();

Connect to Device

device-connection.ts
// Discover available devices
const discoveredDevices = await dmk.startDiscovering();
 
// User selects a device
const device = discoveredDevices[0]; // In practice, show UI for selection
 
// Connect to the selected device
const sessionId = await dmk.connect({
  deviceId: device.id,
});

Initialize Ethereum Signer with Clear Signing

signer-setup.ts
import { SignerEthBuilder } from "@ledgerhq/device-signer-kit-ethereum";
 
const signerEth = new SignerEthBuilder({
  dmk,
  sessionId,
  originToken: "your-origin-token", // Required for Clear Signing
}).build();

The originToken is provided through Ledger’s partner program and enables Clear Signing functionality.

Sign Transaction with Clear Signing

transaction-signing.ts
// Prepare your transaction
const transaction = {
  to: "0x...",
  value: "0x...",
  data: "0x...",
  // ... other transaction fields
};
 
// Sign with automatic Clear Signing
const signature = await signerEth.signTransaction(transaction);
 
// Clear Signing happens automatically!
// The device will display human-readable information
// instead of raw hex data

For detailed implementation including device discovery, connection management, error handling, and advanced configuration, refer to the Device Interaction documentation.

Implementation Checklist

Set up DMK with appropriate transport layer
Implement device discovery and connection UI
Configure signer with origin token
Handle transaction and message signing flows
Test Clear Signing display on actual devices
Add error handling for connection issues

Best Practices

Security First
Always verify device authenticity before signing operations
Clear UI
Show users when Clear Signing is active vs. blind signing
Error Handling
Gracefully handle connection issues and signing rejections

Common Issues

Clear Signing not appearing

Verify that:

  • • Origin token is correctly configured
  • • Metadata exists for the contract in the registry
  • • You’re using the latest DMK/DSK versions
  • • The transaction is for a supported EVM chain

Device connection issues

Common solutions:

  • • Ensure WebHID/WebUSB is supported in the browser
  • • Check device is unlocked and Ethereum app is open
  • • Verify transport permissions are granted
  • • Try disconnecting and reconnecting the device

Resources

Start Protecting Your Users

With Clear Signing integrated, your wallet will automatically display human-readable information for thousands of dApps and protocols, protecting users from blind signing attacks.

Ledger
Copyright © Ledger SAS. All rights reserved. Ledger, Ledger Stax, Ledger Nano S, Ledger Vault, Bolos are trademarks owned by Ledger SAS