Skip to main content

SubscribeOptions

Struct SubscribeOptions 

Source
pub struct SubscribeOptions {
    pub categories: u32,
    pub from_cursor: Option<Cursor>,
    pub since_seq: Option<u64>,
    pub tweak_dust_limit: Option<u64>,
    pub tweaks_only: bool,
    pub mempool_tweaks: bool,
    pub tweak_outputs: bool,
    pub tweak_unspent_only: bool,
}
Expand description

Options for a StreamClient::subscribe firehose.

Fields§

§categories: u32

Category bitfield; 0 = all. See Categories.

§from_cursor: Option<Cursor>

Durable replay anchor. When set, the server replays confirmed history forward from this cursor, then joins live with no gap or duplicate.

§since_seq: Option<u64>

Forward-only dedup filter: drop events with seq <= since_seq. Use after a brief reconnect within the broadcast window — not for durable replay.

§tweak_dust_limit: Option<u64>

Silent-payment tweak dust floor (satoshis): drop TweakEntry whose max_value is below this, and flag the block filtered. Only meaningful with the TWEAKS category. None = keep every tweak.

§tweaks_only: bool

Compact tweak form: when true, tweak entries carry only the 33-byte tweak (no txid/max_value), minimizing bytes for a pure client-side scan. Only meaningful with the TWEAKS category.

§mempool_tweaks: bool

Mempool-time tweaks (“Tier 1.5”): when true, the server additionally streams an Event::MempoolTweak at each SP-eligible transaction’s admission, for mempool-latency detection without uploading a scan key. A modifier on the TWEAKS category — the server rejects it if that bit is not set. false (default) = block tweaks only. Ephemeral and best-effort: mempool tweaks are not replayable, so a missed admission is caught at confirmation via Event::BlockTweaks.

§tweak_outputs: bool

Include the transaction’s taproot outputs on each Event::BlockTweaks entry (TweakEntry::taproot_outputs), so a match is confirmed against the on-chain output without fetching the block. false (default) keeps the confirmed firehose lean. A modifier on the TWEAKS category — the server rejects it if that bit is not set, or if the node has no block source. A MempoolTweak carries its outputs regardless of this flag.

§tweak_unspent_only: bool

Cut-through: drop Event::BlockTweaks entries whose taproot outputs are all already spent on the confirmed chain. A balance scan then never runs ECDH against a coin that is already gone. A surviving entry carries its full taproot output set — spentness decides whether an entry survives, never which outputs it carries, so BIP 352 k enumeration is never truncated.

A restore that needs transaction history must leave this false: a payment received and later spent is omitted entirely, so the balance is right and the history is not. Spentness is evaluated at serve time, so the same historical block can yield fewer entries on a later scan. Dropped entries set the block’s filtered flag. A modifier on the TWEAKS category — the server rejects it without that bit, or on a node with no block source. Never applies to MempoolTweak.

Trait Implementations§

Source§

impl Clone for SubscribeOptions

Source§

fn clone(&self) -> Self

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

impl Debug for SubscribeOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SubscribeOptions

Source§

fn default() -> Self

Returns the “default value” for a type. 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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
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