# decentralized-key-management

> A framework for HotPocket clusters to manage their XRPL account signer keys in order to use the XRP Ledger in a decentralized manner. The `DKM` framework facilitates the management of a dApp's XRPL multi-sig account.

Latest version **0.4.4** (published 2023-09-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install decentralized-key-management
pnpm add decentralized-key-management
yarn add decentralized-key-management
bun add decentralized-key-management
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.4 |
| Published | 2023-09-03 |
| First published | 2023-03-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 2.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Wo Jake |
| Maintainers | wojake |
| Keywords | Decentralized Key Management, XRPL, HotPocket, Evernode |

## Links

- npm: https://www.npmjs.com/package/decentralized-key-management
- Repository: https://github.com/wojake/DKM
- Issues: https://github.com/wojake/DKM/issues
- npm.io page: https://npm.io/package/decentralized-key-management

## Dependencies (2)

- [underscore](https://npm.io/package/underscore.md) ^1.13.6
- [@transia/xrpl](https://npm.io/package/@transia/xrpl.md) ^2.7.3-alpha.9

## Recent versions

- 0.4.4 (latest) — 2023-09-03
- 0.4.3 — 2023-08-07
- 0.4.2 — 2023-08-06
- 0.4.1 — 2023-08-05
- 0.4.0 — 2023-08-05
- 0.3.0 — 2023-08-03
- 0.2.0 — 2023-06-09
- 0.1.0 — 2023-03-26

## README

# Decentralized Key Management (DKM)

A NodeJS library for HotPocket clusters to manage their XRPL account in a decentralized manner. The `DKM` library facilitates the management of a dApp's XRPL multi-sig account.

`DKM` is available for installation on [npm](https://www.npmjs.com/package/decentralized-key-management):
```
npm install decentralized-key-management
```

# Understanding DKM

## How it works

Since the HotPocket Consensus Engine facilitates the transfer of data from and to nodes, nodes could distribute addresses, proposals and signatures. `DKM` leverages the HotPocket Consensus Engine to facilitate key management in a decentralized manner as each node would own and manage its own signer key. When signing a transaction, nodes that are participating signers will sign the transaction and distribute their signature via NPL.

DKM provides the foundational functionalities to sign, distribute and collect transaction signatures. DKM does **not** manage a cluster's consensus protocol or a node's UNL. Please ensure that the cluster's nodes have high and stable connectivity amongst each other in order for the participating signers to distribute and collect sufficient amounts of signatures. DKM may not work due to low node connectivity.

HotPocket nodes would locally generate and store their own unique cryptographic keypair (`ed25519` or `secp256k1`).

In ledger intervals, nodes would perform a `signer-status-checkup` NPL round to analyze and audit the liveliness of participating signers. If a node is active and stable, it would distribute its signer address (ie. `rLnoAQgC9wEnSfLpnFpFgu8hz6V27aAAdL`) to its peers. If a signer address apart of the dApp's SignerList is not present during the NPL round, it is deemed inactive during that round and its removal from the signer list is advisable if it persist.

# Testing

`/test` includes some general HP dApps that showcases `DKM`.

```md
1. sudo npm link
2. cd test/(TEST-NAME)/mycontract/src
3. node ../generate-account.js
4. sudo npm link decentralized-key-management
5. sudo HP_CLUSTER_SIZE=10 npm start
```

---
_Source: https://npm.io/package/decentralized-key-management · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
