pub struct HTTPNodeClient { /* private fields */ }Implementations§
Source§impl HTTPNodeClient
impl HTTPNodeClient
Sourcepub fn new(
node_url: &str,
node_api_secret: Option<String>,
) -> Result<HTTPNodeClient, Error>
pub fn new( node_url: &str, node_api_secret: Option<String>, ) -> Result<HTTPNodeClient, Error>
Create a new client that will communicate with the given grin node
Trait Implementations§
Source§impl Clone for HTTPNodeClient
impl Clone for HTTPNodeClient
Source§fn clone(&self) -> HTTPNodeClient
fn clone(&self) -> HTTPNodeClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl NodeClient for HTTPNodeClient
impl NodeClient for HTTPNodeClient
Source§fn post_tx(&self, tx: &Transaction, fluff: bool) -> Result<(), Error>
fn post_tx(&self, tx: &Transaction, fluff: bool) -> Result<(), Error>
Posts a transaction to a grin node
Source§fn get_chain_tip(&self) -> Result<(u64, String), Error>
fn get_chain_tip(&self) -> Result<(u64, String), Error>
Return the chain tip from a given node
Source§fn get_kernel(
&mut self,
excess: &Commitment,
min_height: Option<u64>,
max_height: Option<u64>,
) -> Result<Option<(TxKernel, u64, u64)>, Error>
fn get_kernel( &mut self, excess: &Commitment, min_height: Option<u64>, max_height: Option<u64>, ) -> Result<Option<(TxKernel, u64, u64)>, Error>
Get kernel implementation
Source§fn get_outputs_from_node(
&self,
wallet_outputs: Vec<Commitment>,
) -> Result<HashMap<Commitment, (String, u64, u64)>, Error>
fn get_outputs_from_node( &self, wallet_outputs: Vec<Commitment>, ) -> Result<HashMap<Commitment, (String, u64, u64)>, Error>
Retrieve outputs from node
Source§fn node_api_secret(&self) -> Option<String>
fn node_api_secret(&self) -> Option<String>
Return the node api secret
Source§fn set_node_url(&mut self, node_url: &str)
fn set_node_url(&mut self, node_url: &str)
Set the node URL
Source§fn set_node_api_secret(&mut self, node_api_secret: Option<String>)
fn set_node_api_secret(&mut self, node_api_secret: Option<String>)
Change the API secret
Source§fn get_version_info(&mut self) -> Option<NodeVersionInfo>
fn get_version_info(&mut self) -> Option<NodeVersionInfo>
Returns the api version string and block header version as reported
by the node. Result can be cached for later use
Source§fn get_outputs_by_pmmr_index(
&self,
start_index: u64,
end_index: Option<u64>,
max_outputs: u64,
) -> Result<(u64, u64, Vec<(Commitment, RangeProof, bool, u64, u64)>), Error>
fn get_outputs_by_pmmr_index( &self, start_index: u64, end_index: Option<u64>, max_outputs: u64, ) -> Result<(u64, u64, Vec<(Commitment, RangeProof, bool, u64, u64)>), Error>
Get a list of outputs from the node by traversing the UTXO
set in PMMR index order.
Returns
(last available output index, last insertion index retrieved,
outputs(commit, proof, is_coinbase, height, mmr_index))
Auto Trait Implementations§
impl !RefUnwindSafe for HTTPNodeClient
impl !UnwindSafe for HTTPNodeClient
impl Freeze for HTTPNodeClient
impl Send for HTTPNodeClient
impl Sync for HTTPNodeClient
impl Unpin for HTTPNodeClient
impl UnsafeUnpin for HTTPNodeClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'a, T> DefaultFeatures<'a> for T
impl<'a, T> DefaultFeatures<'a> for T
Source§fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a>>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for Twhere
T: 'a + Clone,
Source§fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a>>
Clone this value, and then immediately put it into a
Box
behind a trait object of this trait.