pub struct Batch { /* private fields */ }Expand description
Helper structure that caches all the requests before they are actually sent to the server.
Calls on this function are stored and run when batch_call
is run on a Client.
This structure can be used to make multiple different calls in one single run. For batch
calls of the same type, there are shorthands methods defined on the
Client, like
batch_script_get_balance to ask the
server for the balance of multiple scripts with a single request.
Implementations§
Source§impl Batch
impl Batch
Sourcepub fn script_list_unspent(&mut self, script: &Script)
pub fn script_list_unspent(&mut self, script: &Script)
Add one blockchain.scripthash.listunspent request to the batch queue
Sourcepub fn script_get_history(&mut self, script: &Script)
pub fn script_get_history(&mut self, script: &Script)
Add one blockchain.scripthash.get_history request to the batch queue
Sourcepub fn script_get_balance(&mut self, script: &Script)
pub fn script_get_balance(&mut self, script: &Script)
Add one blockchain.scripthash.get_balance request to the batch queue
Sourcepub fn script_subscribe(&mut self, script: &Script)
pub fn script_subscribe(&mut self, script: &Script)
Add one blockchain.scripthash.listunspent request to the batch queue
Sourcepub fn transaction_get(&mut self, tx_hash: &Txid)
pub fn transaction_get(&mut self, tx_hash: &Txid)
Add one blockchain.transaction.get request to the batch queue
Sourcepub fn transaction_get_merkle(&mut self, tx_hash_and_height: &(Txid, usize))
pub fn transaction_get_merkle(&mut self, tx_hash_and_height: &(Txid, usize))
Add one blockchain.transaction.get_merkle request to the batch queue
Sourcepub fn estimate_fee(&mut self, number: usize)
pub fn estimate_fee(&mut self, number: usize)
Add one blockchain.estimatefee request to the batch queue
Sourcepub fn block_header(&mut self, height: u32)
pub fn block_header(&mut self, height: u32)
Add one blockchain.block.get_header request to the batch queue