# @iden3/js-jsonld-merklization

> json ld merklization library

Latest version **1.7.2** (published 2025-10-06) · MIT or Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @iden3/js-jsonld-merklization
pnpm add @iden3/js-jsonld-merklization
yarn add @iden3/js-jsonld-merklization
bun add @iden3/js-jsonld-merklization
```

## Health

**Score 50/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 1.7.2 |
| Published | 2025-10-06 |
| First published | 2023-02-15 |
| Weekly downloads | 0 |
| License | MIT or Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 3 |
| Unpacked size | 5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | obrezhniev, jbaylina |

## Links

- npm: https://www.npmjs.com/package/@iden3/js-jsonld-merklization
- Repository: https://github.com/iden3/js-jsonld-merklization
- Homepage: https://github.com/iden3/js-jsonld-merklization#readme
- Issues: https://github.com/iden3/js-jsonld-merklization/issues
- npm.io page: https://npm.io/package/@iden3/js-jsonld-merklization

## Dependencies (3)

- [n3](https://npm.io/package/n3.md) 1.26.0
- [jsonld](https://npm.io/package/jsonld.md) 8.3.3
- [@js-temporal/polyfill](https://npm.io/package/@js-temporal/polyfill.md) 0.5.1

## Recent versions

- 1.7.2 (latest) — 2025-10-06
- 1.7.1 — 2025-07-04
- 1.7.0 — 2025-07-03
- 1.6.1 — 2025-06-11
- 1.6.0 — 2025-06-10
- 1.5.2 — 2025-05-12
- 1.5.0 — 2025-04-29
- 1.4.1 — 2024-08-28
- 1.4.0 — 2024-08-27
- 1.3.1 — 2024-06-13
- 1.3.0 — 2024-05-17
- 1.2.0 — 2024-03-27
- 1.1.2 — 2023-10-31
- 1.1.1 — 2023-10-24
- 1.1.0 — 2023-10-23
- … 18 more at https://npm.io/package/@iden3/js-jsonld-merklization/versions

## README

# JS-JSONLD-MERKLIZATION

*@iden3/js-jsonld-merklization* is a library for merklizing JSON-LD documents in JavaScript. Merklization is a process that creates a Merkle tree of a JSON-LD document, which allows for efficient verification of data integrity and authenticity.

This library uses jsonld.js to serialize JSON-LD documents into a canonical form, which is then hashed using Poseidon hash. The resulting hashes are combined into a Merkle tree, which can be used to verify the integrity of the original JSON-LD document.

## Installation

To use this library, you can install it via npm:

```bash
npm install @iden3/js-jsonld-merklization
```

Alternatively, you can include it in your project via a CDN:

```html
<script src="dist/umd/index.js"></script>
```

## Usage

Here is an example of how to use this library:

```javascript
import { Merklizer } from '@iden3/js-jsonld-merklization';

const mz = await Merklizer.merklizeJSONLD(multigraphDoc);

const path = await Path.fromDocument(null, multigraphDoc, 'verifiableCredential.birthday');
```

## Contributing

Contributions to this library are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request.

## License

js-jsonld-merklization is part of the iden3 project copyright 2024 0kims association

This project is licensed under either of

- [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0) ([`LICENSE-APACHE`](LICENSE-APACHE))
- [MIT license](https://opensource.org/licenses/MIT) ([`LICENSE-MIT`](LICENSE-MIT))

at your option.

---
_Source: https://npm.io/package/@iden3/js-jsonld-merklization · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
