BatchBuilder

Struct BatchBuilder 

Source
pub struct BatchBuilder { /* private fields */ }
Expand description

Fluent builder for batching multiple RPC calls

Implementations§

Source§

impl BatchBuilder

Source

pub fn new(inner: Arc<dyn TransportTrait>) -> Self

Wraps a transport and begins a batch

Source

pub fn abandontransaction(self, txid: Value) -> Self

Queue a abandontransaction RPC call

Source

pub fn abortrescan(self) -> Self

Queue a abortrescan RPC call

Source

pub fn addconnection( self, address: Value, connection_type: Value, v2transport: Value, ) -> Self

Queue a addconnection RPC call

Source

pub fn addnode(self, node: Value, command: Value, v2transport: Value) -> Self

Queue a addnode RPC call

Source

pub fn addpeeraddress(self, address: Value, port: Value, tried: Value) -> Self

Queue a addpeeraddress RPC call

Source

pub fn analyzepsbt(self, psbt: Value) -> Self

Queue a analyzepsbt RPC call

Source

pub fn backupwallet(self, destination: Value) -> Self

Queue a backupwallet RPC call

Source

pub fn bumpfee(self, txid: Value, options: Value) -> Self

Queue a bumpfee RPC call

Source

pub fn clearbanned(self) -> Self

Queue a clearbanned RPC call

Source

pub fn combinepsbt(self, txs: Value) -> Self

Queue a combinepsbt RPC call

Source

pub fn combinerawtransaction(self, txs: Value) -> Self

Queue a combinerawtransaction RPC call

Source

pub fn converttopsbt( self, hexstring: Value, permitsigdata: Value, iswitness: Value, ) -> Self

Queue a converttopsbt RPC call

Source

pub fn createmultisig( self, nrequired: Value, keys: Value, address_type: Value, ) -> Self

Queue a createmultisig RPC call

Source

pub fn createpsbt( self, inputs: Value, outputs: Value, locktime: Value, replaceable: Value, version: Value, ) -> Self

Queue a createpsbt RPC call

Source

pub fn createrawtransaction( self, inputs: Value, outputs: Value, locktime: Value, replaceable: Value, version: Value, ) -> Self

Queue a createrawtransaction RPC call

Source

pub fn createwallet( self, wallet_name: Value, disable_private_keys: Value, blank: Value, passphrase: Value, avoid_reuse: Value, descriptors: Value, load_on_startup: Value, external_signer: Value, ) -> Self

Queue a createwallet RPC call

Source

pub fn createwalletdescriptor(self, type: Value, options: Value) -> Self

Queue a createwalletdescriptor RPC call

Source

pub fn decodepsbt(self, psbt: Value) -> Self

Queue a decodepsbt RPC call

Source

pub fn decoderawtransaction(self, hexstring: Value, iswitness: Value) -> Self

Queue a decoderawtransaction RPC call

Source

pub fn decodescript(self, hexstring: Value) -> Self

Queue a decodescript RPC call

Source

pub fn deriveaddresses(self, descriptor: Value, range: Value) -> Self

Queue a deriveaddresses RPC call

Source

pub fn descriptorprocesspsbt( self, psbt: Value, descriptors: Value, sighashtype: Value, bip32derivs: Value, finalize: Value, ) -> Self

Queue a descriptorprocesspsbt RPC call

Source

pub fn disconnectnode(self, address: Value, nodeid: Value) -> Self

Queue a disconnectnode RPC call

Source

pub fn dumptxoutset(self, path: Value, type: Value, options: Value) -> Self

Queue a dumptxoutset RPC call

Source

pub fn echo( self, arg0: Value, arg1: Value, arg2: Value, arg3: Value, arg4: Value, arg5: Value, arg6: Value, arg7: Value, arg8: Value, arg9: Value, ) -> Self

Queue a echo RPC call

Source

pub fn echoipc(self, arg: Value) -> Self

Queue a echoipc RPC call

Source

pub fn echojson( self, arg0: Value, arg1: Value, arg2: Value, arg3: Value, arg4: Value, arg5: Value, arg6: Value, arg7: Value, arg8: Value, arg9: Value, ) -> Self

Queue a echojson RPC call

Source

pub fn encryptwallet(self, passphrase: Value) -> Self

Queue a encryptwallet RPC call

Source

pub fn enumeratesigners(self) -> Self

Queue a enumeratesigners RPC call

Source

pub fn estimaterawfee(self, conf_target: Value, threshold: Value) -> Self

Queue a estimaterawfee RPC call

Source

pub fn estimatesmartfee(self, conf_target: Value, estimate_mode: Value) -> Self

Queue a estimatesmartfee RPC call

Source

pub fn finalizepsbt(self, psbt: Value, extract: Value) -> Self

Queue a finalizepsbt RPC call

Source

pub fn fundrawtransaction( self, hexstring: Value, options: Value, iswitness: Value, ) -> Self

Queue a fundrawtransaction RPC call

Source

pub fn generate(self) -> Self

Queue a generate RPC call

Source

pub fn generateblock( self, output: Value, transactions: Value, submit: Value, ) -> Self

Queue a generateblock RPC call

Source

pub fn generatetoaddress( self, nblocks: Value, address: Value, maxtries: Value, ) -> Self

Queue a generatetoaddress RPC call

Source

pub fn generatetodescriptor( self, num_blocks: Value, descriptor: Value, maxtries: Value, ) -> Self

Queue a generatetodescriptor RPC call

Source

pub fn getaddednodeinfo(self, node: Value) -> Self

Queue a getaddednodeinfo RPC call

Source

pub fn getaddressesbylabel(self, label: Value) -> Self

Queue a getaddressesbylabel RPC call

Source

pub fn getaddressinfo(self, address: Value) -> Self

Queue a getaddressinfo RPC call

Source

pub fn getaddrmaninfo(self) -> Self

Queue a getaddrmaninfo RPC call

Source

pub fn getbalance( self, dummy: Value, minconf: Value, include_watchonly: Value, avoid_reuse: Value, ) -> Self

Queue a getbalance RPC call

Source

pub fn getbalances(self) -> Self

Queue a getbalances RPC call

Source

pub fn getbestblockhash(self) -> Self

Queue a getbestblockhash RPC call

Source

pub fn getblock(self, blockhash: Value, verbosity: Value) -> Self

Queue a getblock RPC call

Source

pub fn getblockchaininfo(self) -> Self

Queue a getblockchaininfo RPC call

Source

pub fn getblockcount(self) -> Self

Queue a getblockcount RPC call

Source

pub fn getblockfilter(self, blockhash: Value, filtertype: Value) -> Self

Queue a getblockfilter RPC call

Source

pub fn getblockfrompeer(self, blockhash: Value, peer_id: Value) -> Self

Queue a getblockfrompeer RPC call

Source

pub fn getblockhash(self, height: Value) -> Self

Queue a getblockhash RPC call

Source

pub fn getblockheader(self, blockhash: Value, verbose: Value) -> Self

Queue a getblockheader RPC call

Source

pub fn getblockstats(self, hash_or_height: Value, stats: Value) -> Self

Queue a getblockstats RPC call

Source

pub fn getblocktemplate(self, template_request: Value) -> Self

Queue a getblocktemplate RPC call

Source

pub fn getchainstates(self) -> Self

Queue a getchainstates RPC call

Source

pub fn getchaintips(self) -> Self

Queue a getchaintips RPC call

Source

pub fn getchaintxstats(self, nblocks: Value, blockhash: Value) -> Self

Queue a getchaintxstats RPC call

Source

pub fn getconnectioncount(self) -> Self

Queue a getconnectioncount RPC call

Source

pub fn getdeploymentinfo(self, blockhash: Value) -> Self

Queue a getdeploymentinfo RPC call

Source

pub fn getdescriptoractivity( self, blockhashes: Value, scanobjects: Value, include_mempool: Value, ) -> Self

Queue a getdescriptoractivity RPC call

Source

pub fn getdescriptorinfo(self, descriptor: Value) -> Self

Queue a getdescriptorinfo RPC call

Source

pub fn getdifficulty(self) -> Self

Queue a getdifficulty RPC call

Source

pub fn gethdkeys(self, options: Value) -> Self

Queue a gethdkeys RPC call

Source

pub fn getindexinfo(self, index_name: Value) -> Self

Queue a getindexinfo RPC call

Source

pub fn getmemoryinfo(self, mode: Value) -> Self

Queue a getmemoryinfo RPC call

Source

pub fn getmempoolancestors(self, txid: Value, verbose: Value) -> Self

Queue a getmempoolancestors RPC call

Source

pub fn getmempooldescendants(self, txid: Value, verbose: Value) -> Self

Queue a getmempooldescendants RPC call

Source

pub fn getmempoolentry(self, txid: Value) -> Self

Queue a getmempoolentry RPC call

Source

pub fn getmempoolinfo(self) -> Self

Queue a getmempoolinfo RPC call

Source

pub fn getmininginfo(self) -> Self

Queue a getmininginfo RPC call

Source

pub fn getnettotals(self) -> Self

Queue a getnettotals RPC call

Source

pub fn getnetworkhashps(self, nblocks: Value, height: Value) -> Self

Queue a getnetworkhashps RPC call

Source

pub fn getnetworkinfo(self) -> Self

Queue a getnetworkinfo RPC call

Source

pub fn getnewaddress(self, label: Value, address_type: Value) -> Self

Queue a getnewaddress RPC call

Source

pub fn getnodeaddresses(self, count: Value, network: Value) -> Self

Queue a getnodeaddresses RPC call

Source

pub fn getorphantxs(self, verbosity: Value) -> Self

Queue a getorphantxs RPC call

Source

pub fn getpeerinfo(self) -> Self

Queue a getpeerinfo RPC call

Source

pub fn getprioritisedtransactions(self) -> Self

Queue a getprioritisedtransactions RPC call

Source

pub fn getrawaddrman(self) -> Self

Queue a getrawaddrman RPC call

Source

pub fn getrawchangeaddress(self, address_type: Value) -> Self

Queue a getrawchangeaddress RPC call

Source

pub fn getrawmempool(self, verbose: Value, mempool_sequence: Value) -> Self

Queue a getrawmempool RPC call

Source

pub fn getrawtransaction( self, txid: Value, verbosity: Value, blockhash: Value, ) -> Self

Queue a getrawtransaction RPC call

Source

pub fn getreceivedbyaddress( self, address: Value, minconf: Value, include_immature_coinbase: Value, ) -> Self

Queue a getreceivedbyaddress RPC call

Source

pub fn getreceivedbylabel( self, label: Value, minconf: Value, include_immature_coinbase: Value, ) -> Self

Queue a getreceivedbylabel RPC call

Source

pub fn getrpcinfo(self) -> Self

Queue a getrpcinfo RPC call

Source

pub fn gettransaction( self, txid: Value, include_watchonly: Value, verbose: Value, ) -> Self

Queue a gettransaction RPC call

Source

pub fn gettxout(self, txid: Value, n: Value, include_mempool: Value) -> Self

Queue a gettxout RPC call

Source

pub fn gettxoutproof(self, txids: Value, blockhash: Value) -> Self

Queue a gettxoutproof RPC call

Source

pub fn gettxoutsetinfo( self, hash_type: Value, hash_or_height: Value, use_index: Value, ) -> Self

Queue a gettxoutsetinfo RPC call

Source

pub fn gettxspendingprevout(self, outputs: Value) -> Self

Queue a gettxspendingprevout RPC call

Source

pub fn getwalletinfo(self) -> Self

Queue a getwalletinfo RPC call

Source

pub fn getzmqnotifications(self) -> Self

Queue a getzmqnotifications RPC call

Source

pub fn help(self, command: Value) -> Self

Queue a help RPC call

Source

pub fn importdescriptors(self, requests: Value) -> Self

Queue a importdescriptors RPC call

Source

pub fn importmempool(self, filepath: Value, options: Value) -> Self

Queue a importmempool RPC call

Source

pub fn importprunedfunds(self, rawtransaction: Value, txoutproof: Value) -> Self

Queue a importprunedfunds RPC call

Source

pub fn invalidateblock(self, blockhash: Value) -> Self

Queue a invalidateblock RPC call

Source

pub fn joinpsbts(self, txs: Value) -> Self

Queue a joinpsbts RPC call

Source

pub fn keypoolrefill(self, newsize: Value) -> Self

Queue a keypoolrefill RPC call

Source

pub fn listaddressgroupings(self) -> Self

Queue a listaddressgroupings RPC call

Source

pub fn listbanned(self) -> Self

Queue a listbanned RPC call

Source

pub fn listdescriptors(self, private: Value) -> Self

Queue a listdescriptors RPC call

Source

pub fn listlabels(self, purpose: Value) -> Self

Queue a listlabels RPC call

Source

pub fn listlockunspent(self) -> Self

Queue a listlockunspent RPC call

Source

pub fn listreceivedbyaddress( self, minconf: Value, include_empty: Value, include_watchonly: Value, address_filter: Value, include_immature_coinbase: Value, ) -> Self

Queue a listreceivedbyaddress RPC call

Source

pub fn listreceivedbylabel( self, minconf: Value, include_empty: Value, include_watchonly: Value, include_immature_coinbase: Value, ) -> Self

Queue a listreceivedbylabel RPC call

Source

pub fn listsinceblock( self, blockhash: Value, target_confirmations: Value, include_watchonly: Value, include_removed: Value, include_change: Value, label: Value, ) -> Self

Queue a listsinceblock RPC call

Source

pub fn listtransactions( self, label: Value, count: Value, skip: Value, include_watchonly: Value, ) -> Self

Queue a listtransactions RPC call

Source

pub fn listunspent( self, minconf: Value, maxconf: Value, addresses: Value, include_unsafe: Value, query_options: Value, ) -> Self

Queue a listunspent RPC call

Source

pub fn listwalletdir(self) -> Self

Queue a listwalletdir RPC call

Source

pub fn listwallets(self) -> Self

Queue a listwallets RPC call

Source

pub fn loadtxoutset(self, path: Value) -> Self

Queue a loadtxoutset RPC call

Source

pub fn loadwallet(self, filename: Value, load_on_startup: Value) -> Self

Queue a loadwallet RPC call

Source

pub fn lockunspent( self, unlock: Value, transactions: Value, persistent: Value, ) -> Self

Queue a lockunspent RPC call

Source

pub fn logging(self, include: Value, exclude: Value) -> Self

Queue a logging RPC call

Source

pub fn migratewallet(self, wallet_name: Value, passphrase: Value) -> Self

Queue a migratewallet RPC call

Source

pub fn mockscheduler(self, delta_time: Value) -> Self

Queue a mockscheduler RPC call

Source

pub fn ping(self) -> Self

Queue a ping RPC call

Source

pub fn preciousblock(self, blockhash: Value) -> Self

Queue a preciousblock RPC call

Source

pub fn prioritisetransaction( self, txid: Value, dummy: Value, fee_delta: Value, ) -> Self

Queue a prioritisetransaction RPC call

Source

pub fn pruneblockchain(self, height: Value) -> Self

Queue a pruneblockchain RPC call

Source

pub fn psbtbumpfee(self, txid: Value, options: Value) -> Self

Queue a psbtbumpfee RPC call

Source

pub fn reconsiderblock(self, blockhash: Value) -> Self

Queue a reconsiderblock RPC call

Source

pub fn removeprunedfunds(self, txid: Value) -> Self

Queue a removeprunedfunds RPC call

Source

pub fn rescanblockchain(self, start_height: Value, stop_height: Value) -> Self

Queue a rescanblockchain RPC call

Source

pub fn restorewallet( self, wallet_name: Value, backup_file: Value, load_on_startup: Value, ) -> Self

Queue a restorewallet RPC call

Source

pub fn savemempool(self) -> Self

Queue a savemempool RPC call

Source

pub fn scanblocks( self, action: Value, scanobjects: Value, start_height: Value, stop_height: Value, filtertype: Value, options: Value, ) -> Self

Queue a scanblocks RPC call

Source

pub fn scantxoutset(self, action: Value, scanobjects: Value) -> Self

Queue a scantxoutset RPC call

Source

pub fn schema(self) -> Self

Queue a schema RPC call

Source

pub fn send( self, outputs: Value, conf_target: Value, estimate_mode: Value, fee_rate: Value, options: Value, version: Value, ) -> Self

Queue a send RPC call

Source

pub fn sendall( self, recipients: Value, conf_target: Value, estimate_mode: Value, fee_rate: Value, options: Value, ) -> Self

Queue a sendall RPC call

Source

pub fn sendmany( self, dummy: Value, amounts: Value, minconf: Value, comment: Value, subtractfeefrom: Value, replaceable: Value, conf_target: Value, estimate_mode: Value, fee_rate: Value, verbose: Value, ) -> Self

Queue a sendmany RPC call

Source

pub fn sendmsgtopeer(self, peer_id: Value, msg_type: Value, msg: Value) -> Self

Queue a sendmsgtopeer RPC call

Source

pub fn sendrawtransaction( self, hexstring: Value, maxfeerate: Value, maxburnamount: Value, ) -> Self

Queue a sendrawtransaction RPC call

Source

pub fn sendtoaddress( self, address: Value, amount: Value, comment: Value, comment_to: Value, subtractfeefromamount: Value, replaceable: Value, conf_target: Value, estimate_mode: Value, avoid_reuse: Value, fee_rate: Value, verbose: Value, ) -> Self

Queue a sendtoaddress RPC call

Source

pub fn setban( self, subnet: Value, command: Value, bantime: Value, absolute: Value, ) -> Self

Queue a setban RPC call

Source

pub fn setlabel(self, address: Value, label: Value) -> Self

Queue a setlabel RPC call

Source

pub fn setmocktime(self, timestamp: Value) -> Self

Queue a setmocktime RPC call

Source

pub fn setnetworkactive(self, state: Value) -> Self

Queue a setnetworkactive RPC call

Source

pub fn settxfee(self, amount: Value) -> Self

Queue a settxfee RPC call

Source

pub fn setwalletflag(self, flag: Value, value: Value) -> Self

Queue a setwalletflag RPC call

Source

pub fn signmessage(self, address: Value, message: Value) -> Self

Queue a signmessage RPC call

Source

pub fn signmessagewithprivkey(self, privkey: Value, message: Value) -> Self

Queue a signmessagewithprivkey RPC call

Source

pub fn signrawtransactionwithkey( self, hexstring: Value, privkeys: Value, prevtxs: Value, sighashtype: Value, ) -> Self

Queue a signrawtransactionwithkey RPC call

Source

pub fn signrawtransactionwithwallet( self, hexstring: Value, prevtxs: Value, sighashtype: Value, ) -> Self

Queue a signrawtransactionwithwallet RPC call

Source

pub fn simulaterawtransaction(self, rawtxs: Value, options: Value) -> Self

Queue a simulaterawtransaction RPC call

Source

pub fn stop(self, wait: Value) -> Self

Queue a stop RPC call

Source

pub fn submitblock(self, hexdata: Value, dummy: Value) -> Self

Queue a submitblock RPC call

Source

pub fn submitheader(self, hexdata: Value) -> Self

Queue a submitheader RPC call

Source

pub fn submitpackage( self, package: Value, maxfeerate: Value, maxburnamount: Value, ) -> Self

Queue a submitpackage RPC call

Source

pub fn syncwithvalidationinterfacequeue(self) -> Self

Queue a syncwithvalidationinterfacequeue RPC call

Source

pub fn testmempoolaccept(self, rawtxs: Value, maxfeerate: Value) -> Self

Queue a testmempoolaccept RPC call

Source

pub fn unloadwallet(self, wallet_name: Value, load_on_startup: Value) -> Self

Queue a unloadwallet RPC call

Source

pub fn uptime(self) -> Self

Queue a uptime RPC call

Source

pub fn utxoupdatepsbt(self, psbt: Value, descriptors: Value) -> Self

Queue a utxoupdatepsbt RPC call

Source

pub fn validateaddress(self, address: Value) -> Self

Queue a validateaddress RPC call

Source

pub fn verifychain(self, checklevel: Value, nblocks: Value) -> Self

Queue a verifychain RPC call

Source

pub fn verifymessage( self, address: Value, signature: Value, message: Value, ) -> Self

Queue a verifymessage RPC call

Source

pub fn verifytxoutproof(self, proof: Value) -> Self

Queue a verifytxoutproof RPC call

Source

pub fn waitforblock(self, blockhash: Value, timeout: Value) -> Self

Queue a waitforblock RPC call

Source

pub fn waitforblockheight(self, height: Value, timeout: Value) -> Self

Queue a waitforblockheight RPC call

Source

pub fn waitfornewblock(self, timeout: Value, current_tip: Value) -> Self

Queue a waitfornewblock RPC call

Source

pub fn walletcreatefundedpsbt( self, inputs: Value, outputs: Value, locktime: Value, options: Value, bip32derivs: Value, version: Value, ) -> Self

Queue a walletcreatefundedpsbt RPC call

Source

pub fn walletdisplayaddress(self, address: Value) -> Self

Queue a walletdisplayaddress RPC call

Source

pub fn walletlock(self) -> Self

Queue a walletlock RPC call

Source

pub fn walletpassphrase(self, passphrase: Value, timeout: Value) -> Self

Queue a walletpassphrase RPC call

Source

pub fn walletpassphrasechange( self, oldpassphrase: Value, newpassphrase: Value, ) -> Self

Queue a walletpassphrasechange RPC call

Source

pub fn walletprocesspsbt( self, psbt: Value, sign: Value, sighashtype: Value, bip32derivs: Value, finalize: Value, ) -> Self

Queue a walletprocesspsbt RPC call

Source

pub async fn execute(self) -> Result<BatchResults, TransportError>

Executes the batch and returns typed results

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,