import { executeCommand } from '../execute/execute' ; import Transport from '../../transport' ; import { commands } from "../execute/command" ; import { target } from '../../config/param' ; import { SDKError } from '../../error/errorHandle' ; param { Transport } transport export const cancelAPDU = async ( transport ) => { const { statusCode , msg } = await executeCommand ( transport , commands . CANCEL_APDU , target . MCU ) ; } ; param { Transport } return { Promise < boolean > } export const powerOff = async ( transport ) : Promise < boolean > => { try { await executeCommand ( transport , commands . PWR_OFF , target . MCU ) ; return true ; } catch ( e ) { throw new SDKError ( powerOff . name , 'powerOff error' ) ; } } ;