UNPKG

ts-mls

Version:

[![CI](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml/badge.svg)](https://github.com/LukaJCB/ts-mls/actions/workflows/ci.yml) [![npm version](https://badge.fury.io/js/ts-mls.svg)](https://badge.fury.io/js/ts-mls) [![Coverage Status](https://co

12 lines (11 loc) 671 B
import { Kdf } from "./crypto/kdf.js"; import { RatchetTree } from "./ratchetTree.js"; import { NodeIndex } from "./treemath.js"; import { PathSecret } from "./updatePath.js"; /** * PathSecrets is a record with nodeIndex as keys and the path secret as values */ export type PathSecrets = Record<number, Uint8Array>; export declare function pathToPathSecrets(pathSecrets: PathSecret[]): PathSecrets; export declare function getCommitSecret(tree: RatchetTree, nodeIndex: NodeIndex, pathSecret: Uint8Array, kdf: Kdf): Promise<Uint8Array>; export declare function pathToRoot(tree: RatchetTree, nodeIndex: NodeIndex, pathSecret: Uint8Array, kdf: Kdf): Promise<PathSecrets>;