From 3d6711865344146a5d34f520f2f93d6d30b97c26 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Fri, 8 Mar 2024 18:41:43 +0100 Subject: [PATCH] deps: use the last master version of vls Signed-off-by: Vincenzo Palazzo --- rgb-cln/Cargo.toml | 2 +- rgb-cln/src/plugin.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rgb-cln/Cargo.toml b/rgb-cln/Cargo.toml index 430b54a..4bcd3cf 100644 --- a/rgb-cln/Cargo.toml +++ b/rgb-cln/Cargo.toml @@ -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" diff --git a/rgb-cln/src/plugin.rs b/rgb-cln/src/plugin.rs index f08470f..48ab4fb 100644 --- a/rgb-cln/src/plugin.rs +++ b/rgb-cln/src/plugin.rs @@ -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> { fn read_secret(file: fs::File, network: &str) -> anyhow::Result { 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)