pub enum ChainSourceSpec {
Bitcoind {
url: String,
auth: Auth,
},
Esplora {
url: String,
},
}Expand description
Configuration for the onchain data source.
ChainSource selects which backend to use for blockchain data and transaction broadcasting:
- Bitcoind: uses a Bitcoin Core node via JSON-RPC
- Esplora: uses the HTTP API endpoint of esplora-electrs
Typical usage is to construct a ChainSource from configuration and pass it to ChainSource::new along with the expected Network.
Notes:
- For ChainSourceSpec::Bitcoind, authentication must be provided (cookie file or user/pass).
Variants§
Bitcoind
Fields
§
url: StringRPC URL of the Bitcoin Core node (e.g. http://127.0.0.1:8332).
Esplora
Fields
§
url: StringBase URL of the esplora-electrs instance (e.g. https://esplora.signet.2nd.dev).
Trait Implementations§
Source§impl Clone for ChainSourceSpec
impl Clone for ChainSourceSpec
Source§fn clone(&self) -> ChainSourceSpec
fn clone(&self) -> ChainSourceSpec
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ChainSourceSpec
impl RefUnwindSafe for ChainSourceSpec
impl Send for ChainSourceSpec
impl Sync for ChainSourceSpec
impl Unpin for ChainSourceSpec
impl UnwindSafe for ChainSourceSpec
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
Mutably borrows from an owned value. Read more
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request