pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new(url: String) -> Self
pub async fn connect(&mut self) -> Result<(), Error>
pub async fn get_info(&mut self) -> Result<Info, Error>
Sourcepub async fn list_vtxos(
&self,
request: GetVtxosRequest,
) -> Result<ListVtxosResponse, Error>
pub async fn list_vtxos( &self, request: GetVtxosRequest, ) -> Result<ListVtxosResponse, Error>
List VTXOs with pagination support. Returns a single page of results along with pagination info.
pub async fn register_intent(&self, intent: Intent) -> Result<String, Error>
pub async fn submit_offchain_transaction_request( &self, ark_tx: Psbt, checkpoint_txs: Vec<Psbt>, ) -> Result<SubmitOffchainTxResponse, Error>
pub async fn finalize_offchain_transaction( &self, txid: Txid, checkpoint_txs: Vec<Psbt>, ) -> Result<FinalizeOffchainTxResponse, Error>
pub async fn get_pending_tx( &self, intent: Intent, ) -> Result<Vec<PendingTx>, Error>
pub async fn confirm_registration(&self, intent_id: String) -> Result<(), Error>
pub async fn submit_tree_nonces( &self, batch_id: &str, cosigner_pubkey: PublicKey, pub_nonce_tree: NoncePks, ) -> Result<(), Error>
pub async fn submit_tree_signatures( &self, batch_id: &str, cosigner_pk: PublicKey, partial_sig_tree: PartialSigTree, ) -> Result<(), Error>
pub async fn submit_signed_forfeit_txs( &self, signed_forfeit_txs: Vec<Psbt>, signed_commitment_tx: Option<Psbt>, ) -> Result<(), Error>
pub async fn get_event_stream( &self, topics: Vec<String>, ) -> Result<impl Stream<Item = Result<StreamEvent, Error>> + Unpin, Error>
pub async fn get_tx_stream( &self, ) -> Result<impl Stream<Item = Result<StreamTransactionData, Error>> + Unpin, Error>
pub async fn get_vtxo_chain( &self, outpoint: Option<OutPoint>, size_and_index: Option<(i32, i32)>, ) -> Result<VtxoChainResponse, Error>
pub async fn get_virtual_txs( &self, txids: Vec<String>, size_and_index: Option<(i32, i32)>, ) -> Result<VirtualTxsResponse, Error>
Sourcepub async fn subscribe_to_scripts(
&self,
scripts: Vec<ArkAddress>,
subscription_id: Option<String>,
) -> Result<String, Error>
pub async fn subscribe_to_scripts( &self, scripts: Vec<ArkAddress>, subscription_id: Option<String>, ) -> Result<String, Error>
Allows to subscribe for tx notifications related to the provided vtxo scripts.
It can also be used to update an existing subscriptions by adding new scripts to it.
Note: for new subscriptions, don’t provide a subscription_id
Returns the subscription id if successful
Sourcepub async fn unsubscribe_from_scripts(
&self,
scripts: Vec<ArkAddress>,
subscription_id: String,
) -> Result<(), Error>
pub async fn unsubscribe_from_scripts( &self, scripts: Vec<ArkAddress>, subscription_id: String, ) -> Result<(), Error>
Allows to remove scripts from an existing subscription.
Sourcepub async fn get_subscription(
&self,
subscription_id: String,
) -> Result<impl Stream<Item = Result<SubscriptionResponse, Error>> + Unpin, Error>
pub async fn get_subscription( &self, subscription_id: String, ) -> Result<impl Stream<Item = Result<SubscriptionResponse, Error>> + Unpin, Error>
Gets a subscription stream that returns subscription responses.
pub async fn estimate_fees(&self, intent: Intent) -> Result<SignedAmount, Error>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin for Client
impl !UnwindSafe for Client
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