import jspb from 'google-protobuf';
import eventemitter2 from 'eventemitter2';
import ByteBuffer from 'bytebuffer';
export default abstract class Device {
    abstract events: eventemitter2.EventEmitter2;
    abstract readonly isInitialized: boolean;
    abstract initialize(): Promise<void>;
    abstract disconnect(): Promise<void>;
    abstract getEntropy(length: number): Uint8Array;
    protected abstract interface: Interface;
    exchange(msgTypeEnum: number, msg: jspb.Message): Promise<[number, jspb.Message]>;
    abstract sendRaw(buffer: ByteBuffer): Promise<ByteBuffer>;
    protected toMessageBuffer(msgTypeEnum: number, msg: jspb.Message): ByteBuffer;
    protected fromMessageBuffer(buff: ByteBuffer): [number, jspb.Message];
}
