# LoginKeyStore · FT4 TypeScript client · Chromia Docs (concept)

> Holds disposable keys associated with various accounts. interface LoginKeyStore { clear (accountId: Buffer): Promise<void>; generateKey (accountId: Buffer)

Source: https://docs.chromia.com/pages/ft4-ts-client/interfaces/authentication.LoginKeyStore/

Interface

# LoginKeyStore

On this page

* [Methods](#methods)
* [clear](#clear)
* [generateKey](#generatekey)
* [getKeyStore](#getkeystore)

Holds disposable keys associated with various accounts.

```signature
interface LoginKeyStore {
    clear(accountId: Buffer): Promise<void>;
    generateKey(accountId: Buffer): Promise<FtKeyStore>;
    getKeyStore(accountId: Buffer): Promise<FtKeyStore | null>;
}
```

## Methods

### clear

* ```signature
  clear(accountId: Buffer): Promise<void>
  ```

  Removes the stored keypair for a specified account

  #### Parameters

  + accountId: Buffer

    the id of the account for which to remove the keypair

  #### Returns Promise<void>

### generateKey

* ```signature
  generateKey(accountId: Buffer): Promise<FtKeyStore>
  ```

  Generates a new key for the specified account id and stores
  it in this login key store. It does not add the key to the
  account on the blockchain.

  #### Parameters

  + accountId: Buffer

    the id of the account for which to generate a new key

  #### Returns Promise<[FtKeyStore](https://docs.chromia.com/pages/ft4-ts-client/interfaces/authentication.FtKeyStore/)>

### getKeyStore

* ```signature
  getKeyStore(accountId: Buffer): Promise<FtKeyStore | null>
  ```

  Returns a keystore which contains the stored key
  for this account id.

  #### Parameters

  + accountId: Buffer

    the id of the account of which to get the keystore for

  #### Returns Promise<[FtKeyStore](https://docs.chromia.com/pages/ft4-ts-client/interfaces/authentication.FtKeyStore/) | null>

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-ts-client/interfaces/authentication.LoginKeyStore.html)Generated API reference, mirrored from the live docs
