[−][src]Struct ionosphere::IonosphereClient
Methods
impl IonosphereClient
[src]
pub fn new<P: AsRef<Path>>(
api_endpoint: Url,
lightning_rpc: P
) -> IonosphereClient
[src]
api_endpoint: Url,
lightning_rpc: P
) -> IonosphereClient
Creates a new API client for an arbitrary endpoint
pub fn new_blockstream_client<P: AsRef<Path>>(
lightning_rpc: P
) -> IonosphereClient
[src]
lightning_rpc: P
) -> IonosphereClient
Creates a new API client for the Blockstream API endpoint
pub fn lightning_node(&self) -> Result<LightningNode, Error>
[src]
Fetches the API's lightning node info
pub fn connect(&mut self) -> Result<Connect, Error>
[src]
Connects our lightningd to the API's lightning node
pub fn open_channel(&mut self, amount_sat: u32) -> Result<FundChannel, Error>
[src]
Opens a direct lightning channel to the API's lightning node
pub fn place_bid<P: AsRef<Path>>(
&mut self,
file_path: P,
bid_msat: u64
) -> Result<Order, Error>
[src]
&mut self,
file_path: P,
bid_msat: u64
) -> Result<Order, Error>
Places a bid for an uploaded file
pub fn place_bid_reader<T: Read + Send + 'static>(
&mut self,
data: T,
file_name: &str,
bid_msat: u64
) -> Result<Order, Error>
[src]
&mut self,
data: T,
file_name: &str,
bid_msat: u64
) -> Result<Order, Error>
Places a bid for arbitrary data supplied by a reader. If the payment fails we try to delete the bid.
pub fn delete_bid(&self, order: &Order) -> Result<(), Error>
[src]
Deletes a previously placed bid
Caution
Currently you will loose the funds you already paid for the bid.
Auto Trait Implementations
impl Send for IonosphereClient
impl Sync for IonosphereClient
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,