MCPcopy Create free account
hub / github.com/ddimaria/rust-blockchain-tutorial / get_private_key

Function get_private_key

chain/src/keys.rs:35–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33}
34
35pub(crate) fn get_private_key() -> Result<SecretKey> {
36 let key = read(PRIVATE_KEY_PATH).expect("Could not read private key");
37 SecretKey::from_slice(&key).map_err(|e| ChainError::InternalError(e.to_string()))
38}
39
40pub(crate) fn get_public_key() -> Result<PublicKey> {
41 let key = read(PUBLIC_KEY_PATH).expect("Could not read public key");

Callers 1

Calls

no outgoing calls

Tested by 1