This is a Rust library to interface with the eHSM and MIRkey Hardware Security Modules
Example usage
...
let lib_name = ehsm_library_name;
let ehsm = new.expect;
let session = get_logged_in_session.expect;
let mut oh: CK_OBJECT_HANDLE = CK_INVALID_HANDLE;
if ehsm.has_bitcoin_key.unwrap else
// empty index vector is the root key or "m"
// for "m/0", just add 0 to indexes, i.e. indexes.push(0) etc. to build the BIP32 path
let mut indexes: = Vec new;
let net: u32 = 0x0488B21Eu32;
let xpub = ehsm.get_bitcoin_pub.expect;
...
// sign a 32 byte transaction hash
let sig = ehsm.sign_bitcoin_hash.expect;
Also see the integration tests here: