Submit Idle Space Proof

/// Submits an idle proof to the blockchain.
/// 
/// This asynchronous function submits a proof of idleness to the network. The proof is provided 
/// as a bounded vector of bytes. The function returns a tuple containing the transaction hash 
/// and a `SubmitIdleProof` structure.
/// 
/// # Parameters
/// 
/// - `idle_prove`: A `BoundedVec<u8>` representing the proof of idleness. This bounded vector 
///   contains the proof data and has a pre-defined maximum length to ensure it does not exceed 
///   the network's limits.
/// 
/// # Returns
/// 
/// This function returns a `Result<(TxHash, SubmitIdleProof), Box<dyn std::error::Error>>`.
/// 
/// - On success, it returns a tuple `(TxHash, SubmitIdleProof)`, where `TxHash` is the hash of 
///   the transaction generated by submitting the idle proof, and `SubmitIdleProof` is a 
///   structure containing details about the submitted proof.
/// 
/// - On failure, it returns an `Err` with a boxed dynamic error type, allowing for various kinds 
///   of errors to be returned.
/// 

pub async fn submit_idle_proof(
    &self,
    idle_prove: BoundedVec<u8>,
) -> Result<(TxHash, SubmitIdleProof), Box<dyn std::error::Error>>

Last updated