| Crates.io | signer-stronghold |
| lib.rs | signer-stronghold |
| version | 0.1.2 |
| created_at | 2025-04-25 21:27:26.547425+00 |
| updated_at | 2025-05-19 14:31:09.098566+00 |
| description | An Ethereum signer for a Stronghold |
| homepage | |
| repository | https://github.com/tuddman/signer-stronghold |
| max_upload_size | |
| id | 1649537 |
| size | 140,394 |
An Ethereum signer for a Stronghold.
From the documentation:
The Stronghold is a secure storage for sensitive data. Secrets that are stored inside a Stronghold can never be read, but only be accessed via cryptographic procedures. Data inside a Stronghold is heavily protected by the
Runtimeby either being encrypted at rest, having kernel supplied memory guards, that prevent memory dumps, or a combination of both. The Stronghold also persists data written into a Stronghold by creating Snapshots of the current state. The Snapshot itself is encrypted and can be accessed by a key.
## treat this environment variable with the same care as a private key
export PASSPHRASE=$(openssl rand -hex 48) # or whatever you want
use signer_stronghold::StrongholdSigner;
let chain_id = Some(1);
let signer = StrongholdSigner::new(chain_id).unwrap();
let message = vec![0, 1, 2, 3];
let sig = signer.sign_message(&message).await.unwrap();
assert_eq!(sig.recover_address_from_msg(message).unwrap(), signer.address());
use signer_stronghold::StrongholdSigner;
use std::path::PathBuf;
let chain_id = Some(1);
let custom_path = PathBuf::from("/path/to/my_custom.stronghold");
let signer = StrongholdSigner::new_from_path(custom_path, chain_id).unwrap();
// Use signer just like the default one
let message = vec![0, 1, 2, 3];
let sig = signer.sign_message(&message).await.unwrap();
This project is licensed under the MIT License - see the LICENSE-MIT file for details.