/** * LibHaLo - Programmatically interact with HaLo tags from the web browser, mobile application or the desktop. * Copyright by Arx Research, Inc., a Delaware corporation * License: MIT */ import { Buffer } from 'buffer/index.js'; interface HaloTagErrorArgs { name: string; message: string; payload?: Buffer | null; stackOnExecutor?: string; } /** * This error is thrown when there is an error response from the tag itself. * The "name" property will contain the exact error name (e.g. ERROR_CODE_INVALID_KEY_NO). */ declare class HaloTagError extends Error { errorName: string; payload: Buffer | null; stackOnExecutor: string | undefined; constructor({ name, message, payload, stackOnExecutor }: HaloTagErrorArgs); } /** * There is an unexpected logic error while processing information on the client's side. * Check "message" property for the detailed information. */ declare class HaloLogicError extends Error { errorName: string; stackOnExecutor: string | undefined; constructor(message: string, stackOnExecutor?: string); } /** * The user has denied NFC access permission. */ declare class NFCPermissionRequestDenied extends Error { errorName: string; constructor(message: string); } /** * This NFC access method is not supported by the user's browser * or the method is invoked incorrectly. Check "message" property * for the detailed explanation. */ declare class NFCMethodNotSupported extends Error { errorName: string; constructor(message: string); } /** * When executeNFCCommand() is concurrently executed multiple times, * all calls except one will fail with NFCAbortedError. * This error should be ignored on the frontend. */ declare class NFCAbortedError extends Error { errorName: string; constructor(message: string); } /** * There was a low-level failure of the NFC command execution mechanism. * Check "message" property for more details. */ declare class NFCOperationError extends Error { errorName: string; stackOnExecutor: string | undefined; constructor(message: string, stackOnExecutor?: string); } /** * The currently used transport (HaLo Bridge/Gateway) has failed permanently (for instance due to disconnect), * and can no longer be used without creating a completely new instance first. */ declare class NFCBadTransportError extends Error { errorName: string; constructor(message: string); } /** * The current origin is not on the HaLo Bridge's allow list. */ declare class NFCBridgeConsentError extends Error { errorName: string; constructor(message: string); } /** * Bridge has encountered an internal unexpected error. */ declare class NFCBridgeUnexpectedError extends Error { errorName: string; stackOnExecutor: string; constructor(message: string, stackOnExecutor: string); } /** * Gateway has encountered an internal unexpected error. */ declare class NFCGatewayUnexpectedError extends Error { errorName: string; stackOnExecutor: string; constructor(message: string, stackOnExecutor: string); } export { HaloTagError, HaloLogicError, NFCPermissionRequestDenied, NFCMethodNotSupported, NFCAbortedError, NFCOperationError, NFCBadTransportError, NFCBridgeConsentError, NFCBridgeUnexpectedError, NFCGatewayUnexpectedError, }; //# sourceMappingURL=exceptions.d.ts.map