Skip to content

Commit 92628a9

Browse files
committed
fix: couple blobber interface issues
1 parent 41fcc73 commit 92628a9

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

crates/blobber/src/config.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@ pub struct BlockExtractorConfig {
1919
}
2020

2121
impl BlockExtractorConfig {
22+
/// Create a new `BlockExtractorConfig` with default values.
23+
pub const fn new(blob_explorer_url: Cow<'static, str>) -> Self {
24+
Self { blob_explorer_url, cl_url: None, pylon_url: None }
25+
}
26+
27+
/// Get the blob explorer URL.
28+
pub fn set_blob_explorer_url(&mut self, blob_explorer_url: Cow<'static, str>) {
29+
self.blob_explorer_url = blob_explorer_url;
30+
}
31+
32+
/// Get the blob explorer URL.
33+
pub fn set_cl_url(&mut self, cl_url: Cow<'static, str>) {
34+
self.cl_url = Some(cl_url);
35+
}
36+
37+
/// Set the Pylon URL.
38+
pub fn set_pylon_url(&mut self, pylon_url: Cow<'static, str>) {
39+
self.pylon_url = Some(pylon_url);
40+
}
41+
2242
/// Create a new `BlockExtractorConfig` with the provided CL URL, Pylon URL,
2343
pub fn cl_url(&self) -> Option<&str> {
2444
self.cl_url.as_deref()

crates/blobber/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ mod block_data;
1515
pub use block_data::{Blobs, BlockExtractor};
1616

1717
mod builder;
18-
pub use builder::BlockExtractorBuilder;
18+
pub use builder::{BlockExtractorBuilder, BuilderError as BlockExtractorBuilderError};
1919

2020
mod config;
2121
pub use config::BlockExtractorConfig;

0 commit comments

Comments
 (0)