Crates.io Crates.io

lairkeystoreapi

Secret lair private keystore API library.

This library crate contains most of the logic for dealing with lair.

Establishing a client connection to a canonical ipc keystore binary:

```rust use lairkeystoreapi::prelude::; use lair_keystore_api::ipc_keystore::;

// create a client connection let client = ipckeystoreconnect(connection_url, passphrase) .await .unwrap();

// create a new seed let seedinfo = client.newseed("test-seed".into(), None).await.unwrap();

// sign some data let sig = client.signbypubkey( seedinfo.ed25519pubkey.clone(), None, b"test-data".to_vec().into(), ).await.unwrap();

// verify the signature assert!(seedinfo.ed25519pubkey.verifydetached( sig, b"test-data".to_vec(), ).await.unwrap()); ```