A Keystore is a secure repository of private keys. MetaLairClient is a reference to a Keystore. MetaLairClient allows async generation of keypairs, and usage of those keypairs, reference by the public AgentPubKey.
```rust use holohash::AgentPubKey; use holochainkeystore::; use holochain_serialized_bytes::prelude::;
async fn main() { tokio::task::spawn(async move { let keystore = testkeystore::spawntestkeystore().await.unwrap(); let agentpubkey = AgentPubKey::new_random(&keystore).await.unwrap();
#[derive(Debug, serde::Serialize, serde::Deserialize, SerializedBytes)]
struct MyData(Vec<u8>);
let my_data_1 = MyData(b"signature test data 1".to_vec());
let signature = agent_pubkey.sign(&keystore, &my_data_1).await.unwrap();
assert!(agent_pubkey.verify_signature(&signature, &my_data_1).await);
}).await.unwrap();
} ```
License: CAL-1.0