UNPKG

ts-ssp

Version:

NodeJS library to work with coin and bill acceptors under SSP protocol. Written in Typescript.

19 lines (18 loc) 637 B
/// <reference types="node" /> import serialport from "serialport"; import commands from "./commands"; import { SSPType } from "./types"; declare class SSPCommands<Type extends SSPType> { commandsList: typeof commands[Type]; private execStack; private socket; private sspId; private sequence; private sequenceNumber; constructor(socket: serialport, type: Type, sspId: number, sequence: number); exec(commandName?: keyof typeof commands[Type], ...args: number[]): Promise<void>; crc16(commandLine: number[] | Buffer): number[]; private getSequence; private stack; } export default SSPCommands;