pub async fn sign(
    keystore: &SyncCryptoStorePtr,
    key: &ValidatorId,
    data: &[u8]
) -> Result<Option<ValidatorSignature>, KeystoreError>
Expand description

Sign the given data with the given validator ID.

Returns Ok(None) if the private key that correponds to that validator ID is not found in the given keystore. Returns an error if the key could not be used for signing.