import { ErrorCodes , ITkeyError , TkeyError } from "@tkey/common-types" ; class PrivateKeysError extends TkeyError { protected static messages : ErrorCodes = { 5000 : "Custom" , 5010 : "Private key type is not supported" , 5011 : "validation failed" , 5012 : "Invalid private key" , } ; public constructor ( code , message ? ) { super ( code , message ) ; Object . defineProperty ( this , "name" , { value : "PrivateKeysError" } ) ; } public static fromCode ( code , extraMessage = "" ) { return new PrivateKeysError ( code , `${ PrivateKeysError . messages [ code ] }${ extraMessage }` ) ; } public static notSupported ( extraMessage = "" ) { return PrivateKeysError . fromCode ( 5010 , extraMessage ) ; } public static validationFailed ( extraMessage = "" ) { return PrivateKeysError . fromCode ( 5011 , extraMessage ) ; } public static invalidPrivateKey ( extraMessage = "" ) { return PrivateKeysError . fromCode ( 5012 , extraMessage ) ; } } export default PrivateKeysError ;