Observed since 20 Oct, 22:48 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Implementation of basic functions of binary Merkle tree.
Implementation of basic functions of a binary Merkle tree.
This module handles binary trees like this (v = value, n = node, r = nonce):
n0
|
---------
| |
n1 n2
| |
|-----| |
v0 r0 |
---------
| |
n3 n4
| |
|-----| |
v1 r1 r2
A user defines an array of values where these values are hashed into an imprint, which is a Merkle root tree hash. A user can expose selected values to a third-party by providing the evidence file which includes a recipe of values and nodes. This file holds enough information for a third-party to recreate the imprint.
import { sha } from '@0xcert/utils';
import { Merkle } from '@0xcert/merkle';
const merkle = new Merkle({
hasher: (v, p, k) => sha(256, v),
noncer: (p) => Math.random().toString(36).substring(7),
});
const values = ['A', 'B', 'C', 'D', 'E'];
const expose = [2, 3];
const fullRecipe = await merkle.notarize(values);
const minRecipe = await merkle.disclose(fullRecipe, expose);
const imprint = await merkle.imprint(minRecipe);
The 0xcert Framework is a free and open-source JavaScript library that provides tools for building powerful decentralized applications. Please refer to the official documentation for more details.
This module is one of the bricks of the 0xcert Framework. It's written with TypeScript and it's actively maintained. The source code is available on GitHub where you can also find our issue tracker.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 2.1.1Registry latest | 15 Mar 2021 | 13 | |
| 2.1.0 | 14 Jan 2021 | 13 | |
| 2.0.3 | 12 Aug 2020 | 13 | |
| 2.0.2 | 4 May 2020 | 7 | |
| 2.0.1 | 6 Mar 2020 | 7 | |
| 2.0.1-beta0 | 5 Mar 2020 | 7 | |
| 2.0.0 | 2 Mar 2020 | 7 | |
| 2.0.0-beta5 | 22 Feb 2020 | 7 | |
| 2.0.0-beta4 | 19 Feb 2020 | 7 | |
| 2.0.0-beta3 | 5 Feb 2020 | 7 | |
| 2.0.0-beta2 | 30 Jan 2020 | 7 | |
| 2.0.0-beta1 | 20 Jan 2020 | 7 | |
| 2.0.0-beta | 17 Jan 2020 | 7 | |
| 2.0.0-alpha17 | 14 Jan 2020 | 7 | |
| 2.0.0-alpha16 | 13 Jan 2020 | 7 | |
| 2.0.0-alpha15 | 8 Jan 2020 | 7 | |
| 2.0.0-alpha14 | 12 Dec 2019 | 7 | |
| 2.0.0-alpha13 | 6 Dec 2019 | 7 | |
| 2.0.0-alpha12 | 29 Nov 2019 | 7 | |
| 2.0.0-alpha11 | 6 Nov 2019 | 7 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 22:48 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:630d1b966472cb9c43828a0c3107b55bda0858ae22fb8849da006044eab14534