# Class VaultInstance

Base class for all SDK objects.

This class provides a base implementation for all SDK objects. It handles event emission, promise management, and initialization.

This object is used to ensure that an SRE instance is initialized, and if not, create one with default settings.

#### Hierarchy (View Summary)

- SDKObject
  - VaultInstance

- Defined in src/Vault/VaultInstance.class.ts:5

##### Index

### Constructors

constructor

### Properties

_readyPromise

### Accessors

ready

### Methods

emit
get
init
initSignal
listKeys
off
on
once
removeListener

## Constructors

### constructor

- new VaultInstance(candidate?: AccessCandidate): VaultInstance

  #### Parameters

  - `Optional` candidate: AccessCandidate

  #### Returns VaultInstance

  Overrides SDKObject.constructor

  - Defined in src/Vault/VaultInstance.class.ts:8

## Properties

### `Protected`_readyPromise

_readyPromise: ControlledPromise<any>

Inherited from SDKObject._readyPromise

- Defined in src/Core/SDKObject.class.ts:17

## Accessors

### ready

- get ready(): ControlledPromise<any>

  #### Returns ControlledPromise<any>

  Inherited from SDKObject.ready

  - Defined in src/Core/SDKObject.class.ts:19

## Methods

### emit

- emit(event: string, ...args: any[]): void

  #### Parameters

  - event: string
  - ...args: any[]

  #### Returns void

  Inherited from SDKObject.emit

  - Defined in src/Core/SDKObject.class.ts:45

### get

- get(key: string): Promise<string>

  Get a value from the vault

  #### Parameters

  - key: string

    The key to get the value for

  #### Returns Promise<string>

  The value of the key

  - Defined in src/Vault/VaultInstance.class.ts:28

### `Protected` init

- init(): Promise<void>

  #### Returns Promise<void>

  Overrides SDKObject.init

  - Defined in src/Vault/VaultInstance.class.ts:13

### `Protected` initSignal

- initSignal(): Promise<void>

  #### Returns Promise<void>

  Inherited from SDKObject.initSignal

  - Defined in src/Core/SDKObject.class.ts:37

### listKeys

- listKeys(): Promise<string[]>

  List all keys in the vault

  #### Returns Promise<string[]>

  An array of keys

  - Defined in src/Vault/VaultInstance.class.ts:37

### off

- off(event: string, listener: (...args: any[]) => void): void

  #### Parameters

  - event: string
  - listener: (...args: any[]) => void

  #### Returns void

  Inherited from SDKObject.off

  - Defined in src/Core/SDKObject.class.ts:49

### on

- on(event: string, listener: (...args: any[]) => void): void

  #### Parameters

  - event: string
  - listener: (...args: any[]) => void

  #### Returns void

  Inherited from SDKObject.on

  - Defined in src/Core/SDKObject.class.ts:41

### once

- once(event: string, listener: (...args: any[]) => void): void

  #### Parameters

  - event: string
  - listener: (...args: any[]) => void

  #### Returns void

  Inherited from SDKObject.once

  - Defined in src/Core/SDKObject.class.ts:53

### removeListener

- removeListener(event: string, listener: (...args: any[]) => void): void

  #### Parameters

  - event: string
  - listener: (...args: any[]) => void

  #### Returns void

  Inherited from SDKObject.removeListener

  - Defined in src/Core/SDKObject.class.ts:56