Client ids

From LedgerHQ/ledger-live · View interactive version

Client ids is an AI agent skill from the GitHub repository LedgerHQ/ledger-live. Handle device, user and Datadog identifiers through the redacted `DeviceId`, `UserId` and `DatadogId` classes of `@domain/entity-client-identity`, reading a raw value only through an export method allowlisted in `export-rules.json`. Use when reading, storing or sending a device id, user id or Datado

How to use this skill

Skill file

Client Identity Domain (`@domain/entity-client-identity`)

Privacy & Security

Sensitive identifiers (DeviceId, UserId, DatadogId) must always use the domain entity package:


Package layout

| Package | Location | What it contains |

|---|---|---|

| @domain/entity-client-identity | domain/entity/client-identity/ | DeviceId, UserId, DatadogId classes + Redux slice, selectors, persistence |

| @domain/api-push-devices | domain/api/push-devices/ | RTK Query mutation + Redux sync middleware |

Core Principles

1. All ID Usage Must Go Through This Package

2. Privacy Protection

3. Explicit Use Cases

Usage Requirements

Using an existing ID for a new use case

```json

{

"domain/entity/client-identity/src/ids/UserId.ts": {

"exportUserIdForSomethingSomething": [

"your/new/file/path.ts"

]

}

}

```

Introducing a new kind of ID

import { DeviceId } from "@domain/entity-client-identity";

// ✅ Correct: Use the domain entity
const deviceId = DeviceId.fromString("device-123");

// ❌ Wrong: Don't use raw strings
const deviceId = "device-123"; // BAD
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.