pub struct StacksClient { /* private fields */ }Expand description
Stacks blockchain client
Implementations§
Source§impl StacksClient
impl StacksClient
Sourcepub fn new(config: StacksConfig) -> Self
pub fn new(config: StacksConfig) -> Self
Create a new Stacks client
Sourcepub fn get_config(&self) -> &StacksConfig
pub fn get_config(&self) -> &StacksConfig
Get Stacks-specific configuration
Trait Implementations§
Source§impl Clone for StacksClient
impl Clone for StacksClient
Source§fn clone(&self) -> StacksClient
fn clone(&self) -> StacksClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StacksClient
impl Debug for StacksClient
Source§impl Default for StacksClient
impl Default for StacksClient
Source§impl Layer2Protocol for StacksClient
Implementation of async Layer2Protocol trait for StacksClient
impl Layer2Protocol for StacksClient
Implementation of async Layer2Protocol trait for StacksClient
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_state<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ProtocolState, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_transaction_status<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TransactionStatus, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sync_state<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn issue_asset<'life0, 'async_trait>(
&'life0 self,
params: AssetParams,
) -> Pin<Box<dyn Future<Output = Result<String, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transfer_asset<'life0, 'async_trait>(
&'life0 self,
transfer: AssetTransfer,
) -> Pin<Box<dyn Future<Output = Result<TransferResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn verify_proof<'life0, 'async_trait>(
&'life0 self,
proof: Proof,
) -> Pin<Box<dyn Future<Output = Result<VerificationResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn validate_state<'life0, 'life1, 'async_trait>(
&'life0 self,
state_data: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<ValidationResult, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl Layer2ProtocolTrait for StacksClient
impl Layer2ProtocolTrait for StacksClient
Source§fn initialize(&self) -> Result<(), Box<dyn Error + Send + Sync>>
fn initialize(&self) -> Result<(), Box<dyn Error + Send + Sync>>
Initialize the Stacks protocol
Source§fn get_state(&self) -> Result<ProtocolState, Box<dyn Error + Send + Sync>>
fn get_state(&self) -> Result<ProtocolState, Box<dyn Error + Send + Sync>>
Get the current state of the protocol
Source§fn submit_transaction(
&self,
tx_data: &[u8],
) -> Result<String, Box<dyn Error + Send + Sync>>
fn submit_transaction( &self, tx_data: &[u8], ) -> Result<String, Box<dyn Error + Send + Sync>>
Submit a transaction to Stacks
Source§fn check_transaction_status(
&self,
tx_id: &str,
) -> Result<TransactionStatus, Box<dyn Error + Send + Sync>>
fn check_transaction_status( &self, tx_id: &str, ) -> Result<TransactionStatus, Box<dyn Error + Send + Sync>>
Check transaction status
Source§fn sync_state(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
fn sync_state(&mut self) -> Result<(), Box<dyn Error + Send + Sync>>
Synchronize state with Stacks network
Source§fn issue_asset(
&self,
params: AssetParams,
) -> Result<String, Box<dyn Error + Send + Sync>>
fn issue_asset( &self, params: AssetParams, ) -> Result<String, Box<dyn Error + Send + Sync>>
Issue an asset on Stacks (SIP-010 fungible token)
Source§fn transfer_asset(
&self,
transfer: AssetTransfer,
) -> Result<TransferResult, Box<dyn Error + Send + Sync>>
fn transfer_asset( &self, transfer: AssetTransfer, ) -> Result<TransferResult, Box<dyn Error + Send + Sync>>
Transfer an asset on Stacks
Source§fn verify_proof(
&self,
proof: Proof,
) -> Result<VerificationResult, Box<dyn Error + Send + Sync>>
fn verify_proof( &self, proof: Proof, ) -> Result<VerificationResult, Box<dyn Error + Send + Sync>>
Verify a proof on Stacks
Source§fn validate_state(
&self,
state_data: &[u8],
) -> Result<ValidationResult, Box<dyn Error + Send + Sync>>
fn validate_state( &self, state_data: &[u8], ) -> Result<ValidationResult, Box<dyn Error + Send + Sync>>
Validate state on Stacks
Auto Trait Implementations§
impl Freeze for StacksClient
impl RefUnwindSafe for StacksClient
impl Send for StacksClient
impl Sync for StacksClient
impl Unpin for StacksClient
impl UnwindSafe for StacksClient
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> 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 more