@hamstudy/flamp
Version:
JavaScript Amateur Multicast Protocol AMP-2 Version 3 Implemented from specification document http://www.w1hkj.com/files/flamp/Amp-2.V3.0.Protocol.pdf • Version 1.0.0 - W5ALT, Walt Fair, Jr. (Derived From) • Version 2.0.0 - W1HKJ, Dave Freese, w
33 lines (32 loc) • 901 B
TypeScript
import { LTypes, ControlWord } from './amp';
interface MakeBlockStandardOptions {
keyword: LTypes.PROG | LTypes.FILE | LTypes.ID | LTypes.SIZE | LTypes.DESC;
hash: string;
data: string;
}
interface MakeBlockControlOptions {
keyword: LTypes.CNTL;
hash: string;
controlWord: ControlWord;
}
interface MakeBlockDataOptions {
keyword: LTypes.DATA;
hash: string;
data: string;
blockNum: number;
}
export type MakeBlockOptions = MakeBlockStandardOptions | MakeBlockControlOptions | MakeBlockDataOptions;
export declare class Block {
keyword: LTypes;
data: string;
hash: string;
controlWord?: ControlWord;
blockNum?: number;
constructor(keyword: LTypes, data: string);
static MakeBlock(opts: MakeBlockOptions): Block;
get checksum(): string;
get byteCount(): number;
getHashString(): string;
toString(): string;
}
export {};