import { ErrorCodes , ITkeyError , TkeyError } from "@tkey/common-types" ; class SeedPhraseError extends TkeyError { protected static messages : ErrorCodes = { 6000 : "Custom" , 6010 : "Private key type is not supported" , 6011 : "validation failed" , 6012 : "Seed phrase is invalid for " , } ; code : number ; message : string ; public constructor ( code , message ? ) { super ( code , message ) ; Object . defineProperty ( this , "name" , { value : "SeedPhraseError" } ) ; } public static fromCode ( code , extraMessage = "" ) { return new SeedPhraseError ( code , `${ SeedPhraseError . messages [ code ] }${ extraMessage }` ) ; } public static notSupported ( extraMessage = "" ) { return SeedPhraseError . fromCode ( 6010 , extraMessage ) ; } public static validationFailed ( extraMessage = "" ) { return SeedPhraseError . fromCode ( 6011 , extraMessage ) ; } public static invalid ( extraMessage = "" ) { return SeedPhraseError . fromCode ( 6012 , extraMessage ) ; } } export default SeedPhraseError ;