59 lines
3.3 KiB
TypeScript
59 lines
3.3 KiB
TypeScript
|
|
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 Transport_Missing: "Transport is missing";
|
||
|
|
readonly Transport_InvalidProtobuf: "";
|
||
|
|
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_FirmwareUpdate_DownloadFailed: "Failed to download firmware binary";
|
||
|
|
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 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
|