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

11 lines (10 loc) 613 B
import { Kdf } from "./crypto/kdf"; import { RatchetTree } from "./ratchetTree"; import { PathSecret } from "./updatePath"; /** * 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: number, pathSecret: Uint8Array, kdf: Kdf): Promise<Uint8Array>; export declare function pathToRoot(tree: RatchetTree, nodeIndex: number, pathSecret: Uint8Array, kdf: Kdf): Promise<PathSecrets>;