Function polkadot_node_subsystem_util::sign
source · pub fn sign(
keystore: &KeystorePtr,
key: &ValidatorId,
data: &[u8],
) -> Result<Option<ValidatorSignature>, Error>
Expand description
Sign the given data with the given validator ID.
Returns Ok(None)
if the private key that corresponds to that validator ID is not found in the
given keystore. Returns an error if the key could not be used for signing.