23 releases (10 breaking)
Uses new Rust 2021
0.18.0 | Jun 24, 2022 |
---|---|
0.17.0 | May 19, 2022 |
0.15.0 | Mar 31, 2022 |
0.10.1 | Dec 13, 2021 |
0.2.0 | Mar 4, 2021 |
#241 in Magic Beans
18,961 downloads per month
620KB
16K
SLoC
ic-identity-hsm
is a crate to manage identities related to HSM (Hardware Security Module), allowing users to sign Internet Computer messages with their hardware key. Also supports SoftHSM.
Useful links
lib.rs
:
A crate to manage identities related to HSM (Hardware Security Module), allowing users to sign Internet Computer messages with their hardware key. Also supports SoftHSM.
Example
use ic_agent::agent::{Agent, http_transport::ReqwestHttpReplicaV2Transport};
use ic_identity_hsm::HardwareIdentity;
# fn main() -> Result<(), Box<dyn std::error::Error>> {
# let replica_url = "";
# let lib_path = "";
# let slot_index = 0;
# let key_id = "";
let agent = Agent::builder()
.with_transport(ReqwestHttpReplicaV2Transport::create(replica_url)?)
.with_identity(HardwareIdentity::new(lib_path, slot_index, key_id, || Ok("hunter2".to_string()))?)
.build();
# Ok(())
# }
Dependencies
~17–26MB
~576K SLoC