Library for Merkle tree based authorization on the web.
import {MerkleAuth} from "merkle-auth";
const merkleAuth = new MerkleAuth(options);
const {rootHash, signingProperties} = merkleAuth.build(claims);
const JWT = jwt.sign({rootHash}, ...) // Sign the root hash
const proofTree = arrayMerkleAuth.getProofTree(claims);
const proof = proofTree.getProof(...); // Specify values to be proven.
const {rootHash} = jwt.verify(JWT, ...) // Receive signed root hash from the JWT.
const claims = merkleAuth.verify(proof, actualRootHash => actualRootHash === rootHash);
const options = {};
import {withObjectClaims} from "merkle-auth-object";
const options = withObjectClaims({});
import {withSalt} from "merkle-auth-salt";
const options = withSalt({});
import {withObjectClaims} from "merkle-auth-object";
import {withSalt} from "merkle-auth-salt";
const options = withSalt(withObjectClaims({}));