# Wallet

## ConfidentialWallet Contract

The `ConfidentialWallet` contract is a key part of the NotVault SDK which is responsible for confidential management of keys, files, credentials, and value storage. Let's dive into each function present in this contract:

### Key Management Functions

* **registerKeys**: This function associates the sender's Ethereum address with their public key, encrypted private key, encrypted secret, contact ID, and an encrypted contact ID.

  ```solidity
  function registerKeys(
      string memory publicKey, 
      string memory encryptedPrivateKey, 
      string memory encryptedSecret, 
      string memory contactId, 
      string memory encContactId
  );
  ```
* **getPublicKey**: This function returns the public key associated with a given Ethereum address.

  ```solidity
  function getPublicKey(
      address account
  ) public view returns (string memory);
  ```

### File Index Management Functions

* **getFileIndex**: Returns the file index associated with a given Ethereum address.

  ```solidity
  function getFileIndex(
      address account
  ) public view returns (string memory);
  ```
* **setFileIndex**: This function allows the sender to set the file index associated with their Ethereum address.

  ```solidity
  function setFileIndex(
      string memory value
  ) public;
  ```

### Credential Management Functions

* **getCredentialIndex**: Returns the credential index associated with a given Ethereum address.

  ```solidity
  function getCredentialIndex(
      address account
  ) public view returns (string memory);
  ```
* **setCredentialIndex**: This function allows the sender to set the credential index associated with their Ethereum address.

  ```solidity
  function setCredentialIndex(
      string memory value
  ) public;
  ```
* **getCredentialStatus**: Returns the status of a specific credential for a given Ethereum address.

  ```solidity
  function getCredentialStatus(
      address account, 
      string memory id
  ) public view returns (bool);
  ```
* **setCredentialStatus**: This function allows the sender to set the status of a specific credential associated with their Ethereum address.

  ```solidity
  function setCredentialStatus(
      string memory id, 
      bool status
  ) public;
  ```

### Value Store Management Functions

* **getValue**: Returns the value associated with a specific key for a given Ethereum address.

  ```solidity
  function getValue(
      address account, 
      string memory key
  ) public view returns (string memory);
  ```
* **setValue**: This function allows the sender to set a value for a specific key associated with their Ethereum address.

  ```solidity
  function setValue(
      string memory key, 
      string memory value
  ) public;
  ```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.notcentralised.com/contracts/wallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
