referrerpolicy=no-referrer-when-downgrade
sp_io::crypto

Function sr25519_sign

Source
pub fn sr25519_sign(
    id: KeyTypeId,
    pub_key: &Public,
    msg: &[u8],
) -> Option<Signature>
Expand description

Sign the given msg with the sr25519 key that corresponds to the given public key and key type in the keystore.

Returns the signature.