# Certify Idle Space

The `cert_idle_space` is used to authenticate transactions for idle space. The miner's certification of idle space requires the tee to challenge it. When successful, the miner can update the new space proof data on the chain.

```rust
/// Asynchronously certifies idle storage space.
///
/// This function is used to certify the idle storage space by processing the provided signature information
/// and TEE (Trusted Execution Environment) data. The certification involves verifying the provided TEE signature,
/// and upon successful certification, it returns the transaction hash and idle space certification details.
///
/// # Arguments
///
/// * `idle_sig_info` - The information related to the idle signature.
/// * `tee_sig_need_verify` - The TEE signature that needs to be verified.
/// * `tee_sig` - The TEE signature.
/// * `tee_puk` - The public key associated with the TEE signature.
///
/// # Returns
///
/// * `Result<(TxHash, IdleSpaceCert), Box<dyn std::error::Error>>` -
///   If successful, returns a tuple containing the transaction hash (`TxHash`) and the idle space certification
///   details (`IdleSpaceCert`). In case of an error, returns an error wrapped in a `Box`.
///
pub async fn cert_idle_space(
    &self,
    idle_sig_info: IdleSigInfo,
    tee_sig_need_verify: TeeSigNeedVerify,
    tee_sig: TeeSig,
    tee_puk: TeePuk,
) -> Result<(TxHash, IdleSpaceCert), Box<dyn std::error::Error>>
```


---

# 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://doc.cess.network/developer/cess-sdk/sdk-rust/chain/file_bank/cert_idle_space.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.
