Skip to content

Commit b7c0700

Browse files
authored
support more possible inputs for relay key config (#703)
the relay secret key configuration option was not compatible with BIP44 input, e.g. the output of a mnemonic seed phrase and a given path in the tree this PR now supports this feature which was simplest by just exposing a BIP44 compatible API the underlying ethereum-consensus dependency ## ✅ I have completed the following steps: * [X] Run `make lint` * [X] Run `make test` * [ ] Added tests (if applicable)
1 parent 3e178cf commit b7c0700

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/rbuilder/src/live_builder/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ use crate::{
5454
};
5555
use alloy_chains::ChainKind;
5656
use alloy_primitives::{
57+
hex,
5758
utils::{format_ether, parse_ether},
5859
FixedBytes, B256, U256,
5960
};
@@ -320,7 +321,8 @@ impl L1Config {
320321

321322
let relay_secret_key = if let Some(secret_key) = &self.relay_secret_key {
322323
let resolved_key = secret_key.value()?;
323-
SecretKey::try_from(resolved_key)?
324+
let input = hex::decode(resolved_key)?;
325+
SecretKey::from_bytes(&input)?
324326
} else {
325327
warn!("No relay secret key provided. A random key will be generated.");
326328
SecretKey::random(&mut rand::thread_rng())?

0 commit comments

Comments
 (0)