# fixed-merkle-tree-backup

> Fixed depth merkle tree implementation with sequential inserts

Latest version **0.6.5** (published 2022-08-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install fixed-merkle-tree-backup
pnpm add fixed-merkle-tree-backup
yarn add fixed-merkle-tree-backup
bun add fixed-merkle-tree-backup
```

## 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.6.5 |
| Published | 2022-08-12 |
| First published | 2022-08-11 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | Roman Semenov |
| Maintainers | carole |
| Keywords | merkle, tree, merkleTree |

## Links

- npm: https://www.npmjs.com/package/fixed-merkle-tree-backup
- Repository: https://github.com/tornadocash/fixed-merkle-tree
- Homepage: https://github.com/tornadocash/fixed-merkle-tree#readme
- Issues: https://github.com/tornadocash/fixed-merkle-tree/issues
- npm.io page: https://npm.io/package/fixed-merkle-tree-backup

## Dependencies (2)

- [snarkjs-backup](https://npm.io/package/snarkjs-backup.md) ^0.1.21
- [circomlib-backup](https://npm.io/package/circomlib-backup.md) ^0.0.23

## Recent versions

- 0.6.5 (latest) — 2022-08-12
- 0.6.4 — 2022-08-12
- 0.6.3 — 2022-08-12
- 0.6.2 — 2022-08-12
- 0.6.1 — 2022-08-12
- 0.6.0 — 2022-08-11

## README

# Merkle Tree [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/tornadocash/fixed-merkle-tree/build)](https://github.com/tornadocash/fixed-merkle-tree/actions) [![npm](https://img.shields.io/npm/v/fixed-merkle-tree)](https://www.npmjs.com/package/fixed-merkle-tree)

This is a fixed depth merkle tree implementation with sequential inserts

## Usage

```javascript
const MerkleTree = require('MerkleTree')
const tree = new MerkleTree(10, [1, 2, 3, 4, 5])
tree.insert(6)
tree.update(3, 42)
const path = tree.path(tree.indexOf(2))
console.log(path)

// output:
{
  pathIndex: [0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
  pathElements: [
    '42',
    '19814528709687996974327303300007262407299502847885145507292406548098437687919',
    '11545490348087423460235196042660837039811055736960842865648632633825765931887',
    '14506027710748750947258687001455876266559341618222612722926156490737302846427',
    '4766583705360062980279572762279781527342845808161105063909171241304075622345',
    '16640205414190175414380077665118269450294358858897019640557533278896634808665',
    '13024477302430254842915163302704885770955784224100349847438808884122720088412',
    '11345696205391376769769683860277269518617256738724086786512014734609753488820',
    '17235543131546745471991808272245772046758360534180976603221801364506032471936',
    '155962837046691114236524362966874066300454611955781275944230309195800494087'
  ]
}
```

---
_Source: https://npm.io/package/fixed-merkle-tree-backup · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
