@@ -77,7 +77,7 @@ use std::sync::atomic::AtomicBool;
77
77
use std:: sync:: { Arc , Mutex , RwLock } ;
78
78
use std:: time:: SystemTime ;
79
79
#[ cfg( any( vss, vss_test) ) ]
80
- use vss_client:: headers:: { LnurlAuthToJwtProvider , VssHeaderProvider } ;
80
+ use vss_client:: headers:: { FixedHeaders , LnurlAuthToJwtProvider , VssHeaderProvider } ;
81
81
82
82
#[ derive( Debug , Clone ) ]
83
83
enum ChainDataSourceConfig {
@@ -401,6 +401,17 @@ impl NodeBuilder {
401
401
self . build_with_vss_store_and_header_provider ( vss_url, store_id, header_provider)
402
402
}
403
403
404
+ /// Builds a [`Node`] instance with a [`VssStore`] backend and according to the options
405
+ /// previously configured. Uses only FixedHeaders as default method for authentication/authorization.
406
+ #[ cfg( any( vss, vss_test) ) ]
407
+ pub fn build_with_vss_store_with_fixed_headers (
408
+ & self , vss_url : String , store_id : String , fixed_headers : HashMap < String , String > ,
409
+ ) -> Result < Node , BuildError > {
410
+ let header_provider = Arc :: new ( FixedHeaders :: new ( fixed_headers) ) ;
411
+
412
+ self . build_with_vss_store_and_header_provider ( vss_url, store_id, header_provider)
413
+ }
414
+
404
415
/// Builds a [`Node`] instance with a [`VssStore`] backend and according to the options
405
416
/// previously configured. Give `header_provider` is used to attach headers to every request made
406
417
/// to [VSS](https://github.com/lightningdevkit/vss-server/blob/main/README.md) backend.
0 commit comments