/**
 * See more
 * https://fidoalliance.org/specs/fido-v2.1-rd-20210309/#usb-hid-error
 */ import { Ctap2InvalidCommand } from "../../../errors/ctap2" ; import { Payload } from "../../transport" ; import { IUsbCmd } from "../usb" ; export const CtapHidErrorCmd = 0x3f ; export enum CtapHidErrorCode { InvalidCmd = 0x1 , InvalidPar = 0x2 , InvalidLen = 0x3 , InvalidSeq = 0x4 , MsgTimeout = 0x5 , ChannelBusy = 0x6 , LockRequired = 0xa , InvalidChannel = 0xb , Other = 0x7f } export class CtapHidErrorReq implements IUsbCmd { serialize ( ) { throw new Error ( "Method not implemented." ) ; } deserialize ( payload ) { throw new Error ( "Method not implemented." ) ; } } export class CtapHidErrorRes implements IUsbCmd { code ! : CtapHidErrorCode ; serialize ( ) { throw new Error ( "Method not implemented." ) ; } deserialize ( payload ) { this . code = payload . readUInt8 ( 0 ) ; return this ; } }