
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@ledgerhq/client-ids
Advanced tools
Ledger Live identities management library for managing user IDs, device IDs, and analytics consent.
The main purpose of this dedicated library is to unify how Ledger Wallet manages IDs and isolate them from one another. We use ID classes that protect actual ID values by hiding them behind symbols, with strict rules that list all allowed usages.
See ids/README.md for details on the ID class pattern.
Export methods are only available in allowlisted files. The allowlist is defined in export-rules.json.
To restrict the usage of ID export methods, this configuration file defines rules with the following structure:
{
"path/to/file-definition.ts": {
"nameOfAFunctionInThatFile": [
"path/to/allowed-usage.ts"
]
}
}
Here's a real example showing how exportDeviceIdForPushDevicesService is restricted to specific API files:
{
"libs/identities/src/ids/DeviceId.ts": {
"exportDeviceIdForPushDevicesService": [
"libs/identities/src/api/api.ts"
]
}
}
This ensures that deviceId.exportDeviceIdForPushDevicesService() can only be called from the listed API files, preventing accidental exposure of device IDs in unauthorized locations.
import { pushDevicesApi } from "@ledgerhq/identities/api";
import { identitiesSlice } from "@ledgerhq/identities/store";
import { configureStore } from "@reduxjs/toolkit";
const store = configureStore({
reducer: {
identities: identitiesSlice.reducer,
[pushDevicesApi.reducerPath]: pushDevicesApi.reducer,
},
middleware: getDefaultMiddleware =>
getDefaultMiddleware().concat(pushDevicesApi.middleware),
});
import { DeviceId } from "@ledgerhq/identities/ids";
import { identitiesSlice } from "@ledgerhq/identities/store";
const deviceId = DeviceId.fromString("device-123");
dispatch(identitiesSlice.actions.addDeviceId(deviceId));
import { exportIdentitiesForPersistence, identitiesSlice } from "@ledgerhq/identities/store";
// Export for storage
const state = useSelector(state => state.identities);
const persisted = exportIdentitiesForPersistence(state);
const json = JSON.stringify(persisted);
await saveToStorage(json);
// Import from storage
const json = await loadFromStorage();
const persisted = JSON.parse(json);
dispatch(identitiesSlice.actions.initFromPersisted(persisted));
To synchronize device IDs with the backend, use the sync middleware. Note that UserId and DatadogId are managed by apps (not in the identities store), so you need to provide a selector for userId:
import { createIdentitiesSyncMiddleware } from "@ledgerhq/identities/store";
import { pushDevicesApi } from "@ledgerhq/identities/api";
const identitiesSyncMiddleware = createIdentitiesSyncMiddleware({
getIdentitiesState: (state) => state.identities,
getUserId: (state) => {
// Get userId from app storage (e.g., localStorage, async storage)
// This is managed by apps, not by the identities store
return getUserIdFromAppStorage();
},
getAnalyticsConsent: (state) => state.settings.analyticsEnabled,
});
const store = configureStore({
reducer: {
identities: identitiesSlice.reducer,
[pushDevicesApi.reducerPath]: pushDevicesApi.reducer,
// ... other reducers
},
middleware: getDefaultMiddleware =>
getDefaultMiddleware()
.concat(pushDevicesApi.middleware)
.concat(identitiesSyncMiddleware),
});
Note: UserId and DatadogId classes are available for future use but are not currently stored in the identities Redux store. They are managed by apps directly.
FAQs
Ledger Live client IDs management library
We found that @ledgerhq/client-ids demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.