Skip to main content

BroadcastVerifier

Struct BroadcastVerifier 

Source
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

Source

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_URL select the plane probed first.
  • BSV_WALLET_SKIP_BROADCAST_VERIFY=1 disables verification entirely.
  • BSV_WALLET_BROADCAST_VERIFY_ATTEMPTS overrides the probe-round count.
  • BSV_WALLET_BROADCAST_VERIFY_DELAY_MS overrides the inter-round delay.
  • TAAL_API_KEY / MAIN_TAAL_API_KEY authenticate the TAAL ARC probe.
Source

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).

Source

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.

Source

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.

Source

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

Source§

fn clone(&self) -> BroadcastVerifier

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more