> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# decryptKeystoreJson

```ts theme={null}
function decryptKeystoreJson(
   json, 
   _password, 
progress?): Promise<KeystoreAccount>
```

Resolves to the decrypted JSON Keystore Wallet `json` using the `password`.

If provided, `progress` will be called periodically during the decrpytion to provide feedback, and if the function
returns `false` will halt decryption.

The `progressCallback` will **always** receive `0` before decryption begins and `1` when complete.

## Parameters

| Parameter   | Type                                                             | Description                               |
| :---------- | :--------------------------------------------------------------- | :---------------------------------------- |
| `json`      | `string`                                                         | The JSON data to decrypt.                 |
| `_password` | `string` \| `Uint8Array`                                         | The password to decrypt the JSON data.    |
| `progress`? | [`ProgressCallback`](/sdk/content/type-aliases/ProgressCallback) | The callback to receive progress updates. |

## Returns

`Promise`\<[`KeystoreAccount`](/sdk/content/type-aliases/KeystoreAccount)>

The decrypted account.

## Source

[wallet/json-keystore.ts:272](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/wallet/json-keystore.ts#L272)
