pub struct BroadcastVerifier { /* private fields */ }Expand description
Verifies that a broadcast tx actually reached the network.
Cheap to clone (shares the reqwest connection pool). Built once and shared via an axum extension on the served path, or per-command on the CLI path.
Implementations§
Source§impl BroadcastVerifier
impl BroadcastVerifier
Sourcepub fn from_env(chain: Chain) -> Self
pub fn from_env(chain: Chain) -> Self
Build a verifier for chain, reading the broadcast plane and optional
overrides from the env:
ARC_MODE=arcade/ARCADE=1+ARC_URLselect the plane probed first.BSV_WALLET_SKIP_BROADCAST_VERIFY=1disables verification entirely.BSV_WALLET_BROADCAST_VERIFY_ATTEMPTSoverrides the probe-round count.BSV_WALLET_BROADCAST_VERIFY_DELAY_MSoverrides the inter-round delay.TAAL_API_KEY/MAIN_TAAL_API_KEYauthenticate the TAAL ARC probe.
Sourcepub fn single_pass(chain: Chain) -> Self
pub fn single_pass(chain: Chain) -> Self
Wall-clock ceiling for the absence determination. A source that hangs
must not be able to stretch the window without bound, so rounds stop once
the nominal window (plus one probe timeout of slack) has elapsed.
ONE probe pass over every source (no retry window) — the verdict the
abandoned-tx reconcile needs (2026-08-29, THE RELEASE RULE): a
transaction is abandoned ONLY on DEFINITIVE absence (the broadcaster
it was submitted to answers a JSON 404 AND the chain index answers
404, with no other source holding it). A lone index miss is
Inconclusive and must keep the tx: a fresh Arcade/GorillaPool-only
tx is a WoC 404 for minutes while a peer’s orphan pool still holds it.
Honours BSV_WALLET_SKIP_BROADCAST_VERIFY like from_env — under it
every verdict is Inconclusive, so nothing is ever abandoned (the
fail-safe direction).
Sourcepub async fn verify(&self, txid: &str) -> BroadcastVerification
pub async fn verify(&self, txid: &str) -> BroadcastVerification
Probe the network for txid, returning as soon as any source reports it
present, otherwise after the full probe window.
Sourcepub async fn verify_report(&self, txid: &str) -> PresenceReport
pub async fn verify_report(&self, txid: &str) -> PresenceReport
BroadcastVerifier::verify with everything the probes learned: the
network evidence (and which plane gave it), the chain index’s own
answer, a fatal verdict from the broadcaster, and whether the
transaction is absent from the network right now.
A chain-index hit ends the verification at once (chain evidence
settles everything). A round in which a store holds or has seen the
tx ends the verification too (the verdict is Confirmed and cannot
become Rejected), but only after the chain index has been asked in
that round: a broadcaster’s SEEN never stands in for the chain
index. Absence keeps probing until the window ends.
Sourcepub fn explicit(
arcade: bool,
broadcaster_base: &str,
chain_index_base: Option<&str>,
) -> Self
pub fn explicit( arcade: bool, broadcaster_base: &str, chain_index_base: Option<&str>, ) -> Self
A verifier over an explicit broadcaster and chain index (tests and
tools; the binary reaches it through the library): one round, no
delay. arcade selects the Arcade status
path ({base}/tx/{txid}) and body vocabulary; classic ARC uses
{base}/v1/tx/{txid}. The chain index is probed at
{base}/tx/hash/{txid}.
Trait Implementations§
Source§impl Clone for BroadcastVerifier
impl Clone for BroadcastVerifier
Source§fn clone(&self) -> BroadcastVerifier
fn clone(&self) -> BroadcastVerifier
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for BroadcastVerifier
impl !UnwindSafe for BroadcastVerifier
impl Freeze for BroadcastVerifier
impl Send for BroadcastVerifier
impl Sync for BroadcastVerifier
impl Unpin for BroadcastVerifier
impl UnsafeUnpin for BroadcastVerifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more