Crates.io | lair_keystore_api |
lib.rs | lair_keystore_api |
version | 0.6.3 |
created_at | 2020-09-01 19:25:23.910677+00 |
updated_at | 2025-09-25 16:54:04.966152+00 |
description | secret lair private keystore API library |
homepage | https://holochain.org |
repository | https://github.com/holochain/lair |
max_upload_size | |
id | 283552 |
size | 332,157 |
Secret lair private keystore API library.
This library crate contains most of the logic for dealing with lair.
use lair_keystore_api::prelude::*;
use lair_keystore_api::ipc_keystore::*;
// create a client connection
let client =
ipc_keystore_connect(connection_url, passphrase)
.await
.unwrap();
// create a new seed
let seed_info = client.new_seed(
"test-seed".into(),
None,
false,
).await.unwrap();
// sign some data
let sig = client.sign_by_pub_key(
seed_info.ed25519_pub_key.clone(),
None,
b"test-data".to_vec().into(),
).await.unwrap();
// verify the signature
assert!(seed_info.ed25519_pub_key.verify_detached(
sig,
b"test-data".to_vec().into(),
).await);
License: MIT OR Apache-2.0