deps: use the last master version of vls

Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
This commit is contained in:
Vincenzo Palazzo 2024-03-08 18:41:43 +01:00
parent 083c0de6d3
commit 3d67118653
Signed by: vincenzopalazzo
GPG Key ID: 8B6DC2B870B80D5F
2 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,7 @@ edition = "2021"
clightningrpc-common = { git = "https://github.com/laanwj/cln4rust.git" }
clightningrpc-plugin = { git = "https://github.com/laanwj/cln4rust.git", features = [ "log" ] }
clightningrpc-plugin-macros = { git = "https://github.com/laanwj/cln4rust.git" }
vls-core = { git = "https://gitlab.com/vincenzopalazzo/validating-lightning-signer.git", branch = "macros/derivation" }
vls-core = { git = "https://gitlab.com/lightning-signer/validating-lightning-signer.git" }
log = "0.4.20"
anyhow = "1.0.79"
serde = "1.0.159"

View File

@ -7,6 +7,7 @@ use std::io;
use std::str::FromStr;
use std::sync::Arc;
use lightning_signer::bitcoin as vlsbtc;
use lightning_signer::signer::derive::KeyDerive;
use lightning_signer::signer::derive::NativeKeyDerive;
use serde::de::DeserializeOwned;
@ -84,7 +85,8 @@ pub fn build_plugin() -> anyhow::Result<Plugin<State>> {
fn read_secret(file: fs::File, network: &str) -> anyhow::Result<ExtendedPrivKey> {
let buffer = io::BufReader::new(file);
let hsmd_derive = NativeKeyDerive::new(network)?;
let network = vlsbtc::Network::from_str(network)?;
let hsmd_derive = NativeKeyDerive::new(network);
let xpriv = hsmd_derive.master_key(buffer.buffer()).to_string();
let xpriv = ExtendedPrivKey::from_str(&xpriv)?;
Ok(xpriv)