pub trait BitcoinCoreApi {
Show 31 methods
// Required methods
fn network(&self) -> Network;
fn wait_for_block<'life0, 'async_trait>(
&'life0 self,
height: u32,
num_confirmations: u32
) -> Pin<Box<dyn Future<Output = Result<Block, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_count<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_balance(
&self,
min_confirmations: Option<u32>
) -> Result<Amount, Error>;
fn list_transactions(
&self,
max_count: Option<usize>
) -> Result<Vec<ListTransactionResult>, Error>;
fn get_raw_tx<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
txid: &'life1 Txid,
block_hash: &'life2 BlockHash
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
txid: &'life1 Txid,
block_hash: Option<BlockHash>
) -> Pin<Box<dyn Future<Output = Result<Transaction, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_proof<'life0, 'life1, 'async_trait>(
&'life0 self,
txid: Txid,
block_hash: &'life1 BlockHash
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_block_hash<'life0, 'async_trait>(
&'life0 self,
height: u32
) -> Pin<Box<dyn Future<Output = Result<BlockHash, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_new_address<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Address, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_new_public_key<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<PublicKey, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn dump_derivation_key(
&self,
public_key: &PublicKey
) -> Result<PrivateKey, Error>;
fn import_derivation_key(
&self,
private_key: &PrivateKey
) -> Result<(), Error>;
fn add_new_deposit_key<'life0, 'async_trait>(
&'life0 self,
public_key: PublicKey,
secret_key: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_best_block_hash<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<BlockHash, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_pruned_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 BlockHash
) -> Pin<Box<dyn Future<Output = Result<Block, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_block_header<'life0, 'life1, 'async_trait>(
&'life0 self,
hash: &'life1 BlockHash
) -> Pin<Box<dyn Future<Output = Result<BlockHeader, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_mempool_transactions<'a, 'async_trait>(
&'a self
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Iterator<Item = Result<Transaction, Error>> + Send + 'a>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'a: 'async_trait;
fn wait_for_transaction_metadata<'life0, 'async_trait>(
&'life0 self,
txid: Txid,
num_confirmations: u32,
block_hash: Option<BlockHash>,
is_wallet: bool
) -> Pin<Box<dyn Future<Output = Result<TransactionMetadata, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn bump_fee<'life0, 'life1, 'async_trait>(
&'life0 self,
txid: &'life1 Txid,
address: Address,
fee_rate: SatPerVbyte
) -> Pin<Box<dyn Future<Output = Result<Txid, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn create_and_send_transaction<'life0, 'async_trait>(
&'life0 self,
address: Address,
sat: u64,
fee_rate: SatPerVbyte,
request_id: Option<H256>
) -> Pin<Box<dyn Future<Output = Result<Txid, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send_to_address<'life0, 'async_trait>(
&'life0 self,
address: Address,
sat: u64,
request_id: Option<H256>,
fee_rate: SatPerVbyte,
num_confirmations: u32
) -> Pin<Box<dyn Future<Output = Result<TransactionMetadata, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_or_load_wallet<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn rescan_blockchain<'life0, 'async_trait>(
&'life0 self,
start_height: usize,
end_height: usize
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn rescan_electrs_for_addresses<'life0, 'async_trait>(
&'life0 self,
addresses: Vec<Address>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_utxo_count(&self) -> Result<usize, Error>;
fn is_in_mempool<'life0, 'async_trait>(
&'life0 self,
txid: Txid
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn fee_rate<'life0, 'async_trait>(
&'life0 self,
txid: Txid
) -> Pin<Box<dyn Future<Output = Result<SatPerVbyte, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_tx_for_op_return<'life0, 'async_trait>(
&'life0 self,
address: Address,
amount: u128,
data: H256
) -> Pin<Box<dyn Future<Output = Result<Option<Txid>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn is_full_node(&self) -> bool { ... }
}