UNPKG

@fedify/fedify

Version:

An ActivityPub server framework

24 lines 835 B
import type { BaseNameOrCode } from "./types"; import type { Base } from "./base.js"; /** * Encode data with the specified base and add the multibase prefix. * * @throws {Error} Will throw if the encoding is not supported */ export declare function encode(nameOrCode: BaseNameOrCode, buf: Uint8Array): Uint8Array; /** * Takes a Uint8Array or string encoded with multibase header, decodes it and * returns the decoded buffer * * @throws {Error} Will throw if the encoding is not supported */ export declare function decode(data: Uint8Array | string): Uint8Array; /** * Get encoding from data * * @param {string|Uint8Array} data * @returns {Base} * @throws {Error} Will throw if the encoding is not supported */ export declare function encodingFromData(data: string | Uint8Array): Base; //# sourceMappingURL=index.d.ts.map