pub struct EngineBuilder { /* private fields */ }Expand description
Builder for constructing an Engine with composable configuration.
§Example
let engine = EngineBuilder::new(Box::new(MemoryStorage::new()))
.with_topic("tm_ship", Box::new(SHIPTopicManager::new()))
.with_lookup("ls_ship", Box::new(SHIPLookupService::new(storage)))
.with_hosting_url("https://my-overlay.example.com")
.with_ship_trackers(vec!["https://overlay-us-1.bsvb.tech".into()])
.build();Implementations§
Source§impl EngineBuilder
impl EngineBuilder
Sourcepub fn new(storage: Box<dyn Storage>) -> Self
pub fn new(storage: Box<dyn Storage>) -> Self
Create a new builder with the given storage backend.
Sourcepub fn with_topic(
self,
name: impl Into<String>,
manager: Box<dyn TopicManager>,
) -> Self
pub fn with_topic( self, name: impl Into<String>, manager: Box<dyn TopicManager>, ) -> Self
Register a topic manager.
Sourcepub fn with_lookup(
self,
name: impl Into<String>,
service: Box<dyn LookupService>,
) -> Self
pub fn with_lookup( self, name: impl Into<String>, service: Box<dyn LookupService>, ) -> Self
Register a lookup service.
Sourcepub fn with_advertiser(self, advertiser: Box<dyn Advertiser>) -> Self
pub fn with_advertiser(self, advertiser: Box<dyn Advertiser>) -> Self
Set the advertiser for SHIP/SLAP advertisement management.
Sourcepub fn with_broadcaster(self, broadcaster: Box<dyn Broadcaster>) -> Self
pub fn with_broadcaster(self, broadcaster: Box<dyn Broadcaster>) -> Self
Set the broadcaster for SHIP propagation to peer nodes.
Sourcepub fn with_arc_broadcaster(self, arc: Box<dyn ArcBroadcaster>) -> Self
pub fn with_arc_broadcaster(self, arc: Box<dyn ArcBroadcaster>) -> Self
Set the ARC broadcaster for network broadcast to miners.
Sourcepub fn with_chain_tracker(self, tracker: Box<dyn ChainTracker>) -> Self
pub fn with_chain_tracker(self, tracker: Box<dyn ChainTracker>) -> Self
Set the chain tracker for SPV verification.
Sourcepub fn with_hosting_url(self, url: impl Into<String>) -> Self
pub fn with_hosting_url(self, url: impl Into<String>) -> Self
Set the hosting URL for this overlay node.
Sourcepub fn with_ship_trackers(self, trackers: Vec<String>) -> Self
pub fn with_ship_trackers(self, trackers: Vec<String>) -> Self
Add SHIP tracker URLs for bootstrapping peer discovery.
Sourcepub fn with_slap_trackers(self, trackers: Vec<String>) -> Self
pub fn with_slap_trackers(self, trackers: Vec<String>) -> Self
Add SLAP tracker URLs for bootstrapping service discovery.
Sourcepub fn suppress_default_sync_advertisements(self, suppress: bool) -> Self
pub fn suppress_default_sync_advertisements(self, suppress: bool) -> Self
Control whether default SHIP/SLAP sync advertisements are suppressed.
Sourcepub fn with_script_verification(self, enabled: bool) -> Self
pub fn with_script_verification(self, enabled: bool) -> Self
Reference-parity script verification on submit, DEFAULT ON.
On, every submit outside HistoricalTxNoSpv runs the reference’s
tx.verify(chainTracker) walk: merkle paths against the chain tracker
AND every unproven input’s unlocking script EXECUTED against its
source output, recursively over the ancestry in the BEEF; with no chain
tracker the walk is the ts-sdk’s 'scripts only'. A spend the
interpreter refuses is crate::engine::EngineError::ScriptVerificationFailed.
false is an ESCAPE HATCH, not a mode: for an operator who must admit
a body the interpreter wrongly refuses while the defect is fixed. It
restores the pre-2026-09-08 structural check (BEEF validity + roots,
tracker permitting; nothing without a tracker), under which an invalid
spend no broadcaster had yet refused was admitted on structure alone.
Sourcepub fn with_walk_budget(self, budget: DoorBudget) -> Self
pub fn with_walk_budget(self, budget: DoorBudget) -> Self
The budget of the submit’s own script walk (bsv-low #592): the door’s
two limbs, crate::engine::DoorBudget::DEFAULT unless set. See
Engine::set_walk_budget.