# 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;
    ```
