UNPKG

@trezor/connect

Version:

High-level javascript interface for Trezor hardware wallet.

60 lines 3.41 kB
export declare const ERROR_CODES: { readonly Init_NotInitialized: "TrezorConnect not initialized"; readonly Init_AlreadyInitialized: "TrezorConnect has been already initialized"; readonly Init_IframeBlocked: "Iframe blocked"; readonly Init_IframeTimeout: "Iframe timeout"; readonly Init_ManifestMissing: "Manifest not set. Read more at https://github.com/trezor/trezor-suite/blob/develop/docs/packages/connect/index.md"; readonly Popup_ConnectionMissing: "Unable to establish connection with iframe"; readonly Desktop_ConnectionMissing: "Unable to establish connection with Suite"; readonly Transport_Missing: "Transport is missing"; readonly Method_InvalidPackage: "This package is not suitable to work with browser. Use @trezor/connect-web package instead"; readonly Method_InvalidParameter: ""; readonly Method_NotAllowed: "Method not allowed for this configuration"; readonly Method_PermissionsNotGranted: "Permissions not granted"; readonly Method_Cancel: "Cancelled"; readonly Method_Interrupted: "Popup closed"; readonly Method_UnknownCoin: "Coin not found"; readonly Method_AddressNotMatch: "Addresses do not match"; readonly Method_Discovery_BundleException: ""; readonly Method_Override: "override"; readonly Method_NoResponse: "Call resolved without response"; readonly Backend_NotSupported: "BlockchainLink settings not found in coins.json"; readonly Backend_WorkerMissing: ""; readonly Backend_Disconnected: "Backend disconnected"; readonly Backend_Invalid: "Invalid backend"; readonly Backend_Error: ""; readonly Runtime: ""; readonly Device_NotFound: "Device not found"; readonly Device_InitializeFailed: ""; readonly Device_FwException: ""; readonly Device_ModeException: ""; readonly Device_Disconnected: "Device disconnected"; readonly Device_UsedElsewhere: "Device is used in another window"; readonly Device_InvalidState: "Passphrase is incorrect"; readonly Device_CallInProgress: "Device call in progress"; readonly Device_MultipleNotSupported: "Multiple devices are not supported"; readonly Device_MissingCapability: "Device is missing capability"; readonly Device_MissingCapabilityBtcOnly: "Device is missing capability (BTC only)"; readonly Device_ThpPairingTagInvalid: "Pairing tag mismatch"; readonly Device_ThpStateMissing: "ThpState missing"; readonly Failure_ActionCancelled: "Action cancelled by user"; readonly Failure_FirmwareError: "Firmware installation failed"; readonly Failure_UnknownCode: "Unknown error"; readonly Failure_PinCancelled: "PIN cancelled"; readonly Failure_PinInvalid: "PIN invalid"; readonly Failure_PinMismatch: "PIN mismatch"; readonly Failure_WipeCodeMismatch: "Wipe code mismatch"; readonly Failure_EntropyCheck: ""; readonly Deeplink_VersionMismatch: "Not compatible with current version of the app"; }; export type ErrorCode = keyof typeof ERROR_CODES; export declare class TrezorError extends Error { code: ErrorCode; message: string; constructor(code: ErrorCode, message: string); toString(): string; } export declare const TypedError: (id: ErrorCode, message?: string) => TrezorError; export declare const serializeError: (payload: any) => any; export declare const LIBUSB_ERROR_MESSAGE = "LIBUSB_ERROR"; //# sourceMappingURL=errors.d.ts.map