pub struct TaprootAssetsProtocol { /* private fields */ }Expand description
Taproot Assets protocol implementation
Implementations§
Source§impl TaprootAssetsProtocol
impl TaprootAssetsProtocol
Sourcepub fn new(config: TaprootAssetsConfig) -> Self
pub fn new(config: TaprootAssetsConfig) -> Self
Create a new Taproot Assets protocol instance
Sourcepub fn get_config(&self) -> &TaprootAssetsConfig
pub fn get_config(&self) -> &TaprootAssetsConfig
Get Taproot Assets-specific configuration
Trait Implementations§
Source§impl Debug for TaprootAssetsProtocol
impl Debug for TaprootAssetsProtocol
Source§impl Default for TaprootAssetsProtocol
impl Default for TaprootAssetsProtocol
Source§impl Layer2Protocol for TaprootAssetsProtocol
Implementation of async Layer2Protocol trait for TaprootAssetsProtocol
impl Layer2Protocol for TaprootAssetsProtocol
Implementation of async Layer2Protocol trait for TaprootAssetsProtocol
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 TaprootAssetsProtocol
impl Layer2ProtocolTrait for TaprootAssetsProtocol
Source§fn initialize(&self) -> Result<(), Box<dyn Error + Send + Sync>>
fn initialize(&self) -> Result<(), Box<dyn Error + Send + Sync>>
Initialize the Taproot Assets 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 (asset transfer)
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 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 a new Taproot asset
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 a Taproot asset
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 Merkle proof for Taproot assets
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 Taproot Assets state
Auto Trait Implementations§
impl Freeze for TaprootAssetsProtocol
impl RefUnwindSafe for TaprootAssetsProtocol
impl Send for TaprootAssetsProtocol
impl Sync for TaprootAssetsProtocol
impl Unpin for TaprootAssetsProtocol
impl UnwindSafe for TaprootAssetsProtocol
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> 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