UNPKG

cesr

Version:

[![NPM Version](https://img.shields.io/npm/v/cesr.svg?style=flat)](https://www.npmjs.com/package/cesr) [![NPM License](https://img.shields.io/npm/l/cesr.svg?style=flat)](https://github.com/lenkan/keri-js/blob/main/LICENSE) [![CI](https://github.com/lenkan

18 lines (17 loc) 607 B
import { Attachments, type AttachmentsInit } from "./attachments.ts"; import { VersionString } from "./version-string.ts"; export interface MessageBody { v: string; [key: string]: unknown; } export declare class Message<T extends MessageBody = MessageBody> { #private; readonly body: T; constructor(body: T, attachments?: AttachmentsInit); get raw(): Uint8Array; get version(): VersionString; get attachments(): Attachments; set attachments(value: AttachmentsInit); static parse(input: Uint8Array): Message | null; static encode(init: MessageBody): Uint8Array; }