[][src]Struct ionosphere::IonosphereClient

pub struct IonosphereClient { /* fields omitted */ }

Methods

impl IonosphereClient[src]

pub fn new<P: AsRef<Path>>(
    api_endpoint: Url,
    lightning_rpc: P
) -> IonosphereClient
[src]

Creates a new API client for an arbitrary endpoint

pub fn new_blockstream_client<P: AsRef<Path>>(
    lightning_rpc: P
) -> IonosphereClient
[src]

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]

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]

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

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Erased for T