{"record":{"id":"e3f3a4f6b96dcf14","repo":"FuelLabs/fuels-ts","slug":"not-implemented-e3f3a4","errorCode":"NOT_IMPLEMENTED","errorMessage":"Not implemented.","messagePattern":"Not implemented\\.","errorType":"exception","errorClass":"FuelError","httpStatus":null,"severity":"error","filePath":"packages/account/src/wallet-manager/types.ts","lineNumber":38,"sourceCode":"  secret?: string;\n};\n\nexport type VaultsState = Array<{\n  type: string;\n  title?: string;\n  data?: VaultConfig;\n  vault: Vault;\n}>;\n\nexport interface WalletManagerState {\n  vaults: VaultsState;\n}\n\nexport abstract class Vault<TOptions = { secret?: string }> {\n  static readonly type: string;\n\n  constructor(_options: TOptions) {\n    throw new FuelError(ErrorCode.NOT_IMPLEMENTED, 'Not implemented.');\n  }\n\n  serialize(): TOptions {\n    throw new FuelError(ErrorCode.NOT_IMPLEMENTED, 'Not implemented.');\n  }\n\n  getAccounts(): WalletManagerAccount[] {\n    throw new FuelError(ErrorCode.NOT_IMPLEMENTED, 'Not implemented.');\n  }\n\n  addAccount(): WalletManagerAccount {\n    throw new FuelError(ErrorCode.NOT_IMPLEMENTED, 'Not implemented.');\n  }\n\n  exportAccount(_address: Address): string {\n    throw new FuelError(ErrorCode.NOT_IMPLEMENTED, 'Not implemented.');\n  }\n","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/FuelLabs/fuels-ts/blob/b3f37c91aca4aa9d5e4c0d3967f66237190826ea/packages/account/src/wallet-manager/types.ts#L20-L56","documentation":"Thrown by the abstract Vault base class constructor (wallet-manager/types.ts) when invoked directly. The Vault class defines stub methods that always throw NOT_IMPLEMENTED; concrete vaults (MnemonicVault, PrivateKeyVault) override them. Instantiating Vault itself or calling an un-overridden constructor path triggers this.","triggerScenarios":"Constructing `new Vault(options)` directly, or a custom subclass that extends Vault without supplying its own constructor implementation that avoids falling through to the base. The base constructor unconditionally throws.","commonSituations":"Creating a custom vault type and forgetting to override the constructor; importing Vault and instantiating it by mistake instead of MnemonicVault/PrivateKeyVault; TypeScript allowing `new Vault()` because the class isn't declared abstract.","solutions":["Use a concrete vault: new MnemonicVault(...) or new PrivateKeyVault(...).","If writing a custom vault, implement the constructor to set up state and NOT call super() in a way that reaches the throwing body — or restructure so the base constructor does not throw.","Do not instantiate the Vault base class directly."],"exampleFix":"// before\nconst vault = new Vault({ secret: '...' });\n// after\nconst vault = new MnemonicVault({ secret: '...' });","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"import { MnemonicVault, PrivateKeyVault } from '@fuel-ts/account/wallet-manager';\nfunction isConcreteVault(v: unknown): v is MnemonicVault | PrivateKeyVault {\n  return v instanceof MnemonicVault || v instanceof PrivateKeyVault;\n}","tryCatchPattern":null,"preventionTips":["Never instantiate the Vault base class directly.","When subclassing, fully reimplement the constructor without falling through to the throwing base."],"tags":["wallet-manager","vault","abstract","not-implemented","typescript"],"backgroundTag":null,"analyzedSha":"b3f37c91aca4aa9d5e4c0d3967f66237190826ea","analyzedAt":"2026-08-12T20:30:56.448Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}