Plugin

Trait Plugin 

Source
pub trait Plugin: Send + Sync {
Show 16 methods // Required methods fn currency(&self) -> &str; fn chain(&self) -> &str; fn decimals(&self) -> u8; fn build_signed_payment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, payment_option: &'life1 PaymentOption, mnemonic: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn verify_payment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, payment_option: &'life1 PaymentOption, transaction: &'life2 Transaction, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn validate_address<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_transaction<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn broadcast_tx<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, txhex: &'life1 str, txid: Option<&'life2 str>, txkey: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait; fn get_new_address<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, account: &'life1 Account, address: &'life2 Address, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn transform_address<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_confirmation<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Confirmation>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_payments<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Payment>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn parse_payments<'life0, 'life1, 'async_trait>( &'life0 self, transaction: &'life1 Transaction, ) -> Pin<Box<dyn Future<Output = Result<Vec<Payment>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn get_price<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Price>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn satoshis_to_decimal(&self, satoshis: i64) -> BigDecimal { ... } fn decimal_to_satoshis(&self, decimal: &BigDecimal) -> i64 { ... }
}

Required Methods§

Source

fn currency(&self) -> &str

Source

fn chain(&self) -> &str

Source

fn decimals(&self) -> u8

Source

fn build_signed_payment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, payment_option: &'life1 PaymentOption, mnemonic: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn verify_payment<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, payment_option: &'life1 PaymentOption, transaction: &'life2 Transaction, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn validate_address<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_transaction<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn broadcast_tx<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, txhex: &'life1 str, txid: Option<&'life2 str>, txkey: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<Transaction>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn get_new_address<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, account: &'life1 Account, address: &'life2 Address, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn transform_address<'life0, 'life1, 'async_trait>( &'life0 self, address: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_confirmation<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Confirmation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_payments<'life0, 'life1, 'async_trait>( &'life0 self, txid: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<Payment>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn parse_payments<'life0, 'life1, 'async_trait>( &'life0 self, transaction: &'life1 Transaction, ) -> Pin<Box<dyn Future<Output = Result<Vec<Payment>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_price<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Price>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn satoshis_to_decimal(&self, satoshis: i64) -> BigDecimal

Source

fn decimal_to_satoshis(&self, decimal: &BigDecimal) -> i64

Implementors§