pub fn sign<K, D>(key: K, data: D) -> ExternResult<Signature>where K: Into<AgentPubKey>, D: Serialize + Debug,
Sign something that is serializable using the private key for the passed public key.
Serde convenience for sign_raw .
sign_raw