pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new(ark_server_url: String) -> Result<Self, Error>
pub fn set_info_refresh_hook( &mut self, hook: impl Fn(Info) -> Result<(), Box<dyn StdError + Send + Sync + 'static>> + Send + Sync + 'static, )
pub async fn get_info(&self) -> Result<Info, 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 list_vtxos( &self, request: GetVtxosRequest, ) -> Result<ListVtxosResponse, Error>
pub async fn register_intent( &self, intent_message: &IntentMessage, proof: &Psbt, ) -> Result<String, Error>
pub async fn delete_intent( &self, intent_message: &IntentMessage, proof: &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 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>
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.
pub async fn get_subscription( &self, subscription_id: String, ) -> Result<impl Stream<Item = Result<SubscriptionResponse, Error>> + Unpin, Error>
pub async fn get_virtual_txs( &self, txids: Vec<String>, size_and_index: Option<(i32, i32)>, ) -> Result<VirtualTxsResponse, Error>
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnsafeUnpin 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