UNPKG

@apocentre/bc-ur

Version:

A JS implementation of the Uniform Resources (UR) specification from Blockchain Commons

42 lines (41 loc) 1.33 kB
/// <reference types="node" /> import { FountainEncoderPart } from "./fountainEncoder"; export declare class FountainDecoderPart { private _indexes; private _fragment; constructor(_indexes: number[], _fragment: Buffer); get indexes(): number[]; get fragment(): Buffer; static fromEncoderPart(encoderPart: FountainEncoderPart): FountainDecoderPart; isSimple(): boolean; } export default class FountainDecoder { private error; private result; private expectedMessageLength; private expectedChecksum; private expectedFragmentLength; private processedPartsCount; private expectedPartIndexes; private lastPartIndexes; private queuedParts; private receivedPartIndexes; private mixedParts; private simpleParts; private validatePart; private reducePartByPart; private reduceMixedBy; private processSimplePart; private processMixedPart; private processQueuedItem; static joinFragments: (fragments: Buffer[], messageLength: number) => Buffer; receivePart(encoderPart: FountainEncoderPart): boolean; isComplete(): boolean; isSuccess(): boolean; resultMessage(): Buffer; isFailure(): boolean; resultError(): string; expectedPartCount(): number; estimatedPercentComplete(): number; getProgress(): number; }