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

9 lines 758 B
import { decodeOptional, encodeOptional } from "./codec/optional"; import { mapDecoders } from "./codec/tlsDecoder"; import { contramapEncoders } from "./codec/tlsEncoder"; import { decodeVarLenType, encodeVarLenType } from "./codec/variableLength"; import { decodeProposalOrRef, encodeProposalOrRef } from "./proposalOrRefType"; import { decodeUpdatePath, encodeUpdatePath } from "./updatePath"; export const encodeCommit = contramapEncoders([encodeVarLenType(encodeProposalOrRef), encodeOptional(encodeUpdatePath)], (commit) => [commit.proposals, commit.path]); export const decodeCommit = mapDecoders([decodeVarLenType(decodeProposalOrRef), decodeOptional(decodeUpdatePath)], (proposals, path) => ({ proposals, path })); //# sourceMappingURL=commit.js.map