Class BSV::Wallet::BroadcastQueue::Inline ¶
Inherits: Object Includes: BSV::Wallet::Interface::BroadcastQueue
Synchronous broadcast queue adapter — the default for Client.
BroadcastQueue::Inline replicates the current wallet broadcast behaviour exactly:
- With a broadcaster: calls
broadcaster.broadcast, promotes UTXO state on success, rolls back on failure. - Without a broadcaster: promotes immediately and returns BEEF for the caller to broadcast manually (backwards-compatible fallback).
Because this adapter executes synchronously, async? returns false and the caller can rely on the returned hash containing the final result.
Public Instance Methods¶
async?() ¶
Returns false — this adapter executes synchronously. - @return [Boolean]
broadcast_enabled?() ¶
Returns true when a broadcaster has been configured.
Client delegates its own broadcast_enabled? to this method so the check works correctly when the broadcaster is embedded in the queue rather than passed directly to the wallet. - @return [Boolean]
enqueue(payload) ¶
Broadcasts and promotes (or just promotes) a transaction synchronously.
Dispatches to broadcast_and_promote when a broadcaster is configured, or promote_without_broadcast when none is present. - @param payload [Hash] broadcast payload (see +BroadcastQueue+ module docs) - @return [Hash] result hash containing at minimum +:txid+ and +:tx+
initialize(storage:, broadcaster: = nil) ¶
- @param
broadcaster[#broadcast, nil] broadcaster object; +nil+ disables broadcasting - @param
storage[BSV::Wallet::Store] wallet storage adapter - @return [Inline] a new instance of Inline
status(txid) ¶
Returns the broadcast status for a previously enqueued transaction.
Delegates to storage and returns the action status field, or nil if the action is not found. - @param txid [String] hex transaction identifier - @return [String, nil]