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

Download history 1355/week @ 2022-03-16 1173/week @ 2022-03-23 1191/week @ 2022-03-30 1191/week @ 2022-04-06 1004/week @ 2022-04-13 1494/week @ 2022-04-20 1902/week @ 2022-04-27 2679/week @ 2022-05-04 3408/week @ 2022-05-11 7187/week @ 2022-05-18 4787/week @ 2022-05-25 4225/week @ 2022-06-01 4453/week @ 2022-06-08 4409/week @ 2022-06-15 5761/week @ 2022-06-22 3352/week @ 2022-06-29

18,961 downloads per month

Apache-2.0

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