/** * All possible error codes gathered in a single object. */ export declare const ErrorCodes: { /** The dapp connector wasn't able to process the request */ readonly InternalError: "InternalError"; /** The user rejected the request */ readonly Rejected: "Rejected"; /** Can be thrown in various circumstances, e.g. one being a malformed transaction */ readonly InvalidRequest: "InvalidRequest"; /** Permission to perform action was rejected. */ readonly PermissionRejected: "PermissionRejected"; /** The connection to the wallet was lost */ readonly Disconnected: "Disconnected"; }; /** * All possible error codes gathered in a single union type. They are defined in {@link ErrorCodes}. */ export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes]; /** * Declaration of the error type thrown by the DApp Connector. * * It is not a class extending the base `Error` type, because * it would make it difficult to implement in a way where `instanceof APIError` would work. * Instead a check like `error.type === 'DAppConnectorAPIError'` should be used. */ export type APIError = Error & { /** indication it is a DApp Connector Error */ type: 'DAppConnectorAPIError'; /** The code of the error that's thrown */ code: ErrorCode; /** The reason the error is thrown */ reason: string; }; //# sourceMappingURL=errors.d.ts.map