DefaultTransport

Struct DefaultTransport 

Source
pub struct DefaultTransport { /* private fields */ }

Implementations§

Source§

impl DefaultTransport

Source

pub fn new(url: impl Into<String>, auth: Option<(String, String)>) -> Self

Source

pub fn with_wallet(self, wallet_name: impl Into<String>) -> Self

Trait Implementations§

Source§

impl Clone for DefaultTransport

Source§

fn clone(&self) -> DefaultTransport

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DefaultTransport

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TransportTrait for DefaultTransport

Source§

fn send_request<'a>( &'a self, method: &'a str, params: &'a [Value], ) -> Pin<Box<dyn Future<Output = Result<Value, TransportError>> + Send + 'a>>

Source§

fn send_batch<'a>( &'a self, bodies: &'a [Value], ) -> Pin<Box<dyn Future<Output = Result<Vec<Value>, TransportError>> + Send + 'a>>

Send a batch of raw JSON-RPC objects in one HTTP call. Read more
Source§

fn url(&self) -> &str

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> BitcoinClientV30 for T

Source§

fn abandontransaction<'life0, 'async_trait>( &'life0 self, _txid: Txid, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Mark in-wallet transaction as abandoned This will mark this transaction and all its in-wallet descendants as abandoned which will allow for their inputs to be respent. It can be used to replace “stuck” or evicted transactions. It only works on transactions which are not included in a block and are not currently in the mempool. It has no effect on transactions which are already abandoned.

Source§

fn abortrescan<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<AbortrescanResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Stops current wallet rescan triggered by an RPC call, e.g. by a rescanblockchain call. Note: Use “getwalletinfo” to query the scanning progress.

Source§

fn addconnection<'life0, 'async_trait>( &'life0 self, _address: String, _connection_type: String, _v2transport: bool, ) -> Pin<Box<dyn Future<Output = Result<AddconnectionResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Open an outbound connection to a specified node. This RPC is for testing only.

Source§

fn addnode<'life0, 'async_trait>( &'life0 self, _node: String, _command: String, _v2transport: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Attempts to add or remove a node from the addnode list. Or try a connection to a node once. Nodes added using addnode (or -connect) are protected from DoS disconnection and are not required to be full nodes/support SegWit as other outbound peers are (though such peers will not be synced from). Addnode connections are limited to 8 at a time and are counted separately from the -maxconnections limit.

Source§

fn addpeeraddress<'life0, 'async_trait>( &'life0 self, _address: String, _port: u16, _tried: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<AddpeeraddressResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Add the address of a potential peer to an address manager table. This RPC is for testing only.

Source§

fn analyzepsbt<'life0, 'async_trait>( &'life0 self, _psbt: String, ) -> Pin<Box<dyn Future<Output = Result<AnalyzepsbtResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Analyzes and provides information about the current status of a PSBT and its inputs

Source§

fn backupwallet<'life0, 'async_trait>( &'life0 self, _destination: String, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Safely copies the current wallet file to the specified destination, which can either be a directory or a path with a filename.

Source§

fn bumpfee<'life0, 'async_trait>( &'life0 self, _txid: Txid, _options: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<BumpfeeResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Bumps the fee of a transaction T, replacing it with a new transaction B. A transaction with the given txid must be in the wallet. The command will pay the additional fee by reducing change outputs or adding inputs when necessary. It may add a new change output if one does not already exist. All inputs in the original transaction will be included in the replacement transaction. The command will fail if the wallet or mempool contains a transaction that spends one of T’s outputs. By default, the new fee will be calculated automatically using the estimatesmartfee RPC. The user can specify a confirmation target for estimatesmartfee. Alternatively, the user can specify a fee rate in sat/vB for the new transaction. At a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee returned by getnetworkinfo) to enter the node’s mempool.

  • WARNING: before version 0.21, fee_rate was in BTC/kvB. As of 0.21, fee_rate is in sat/vB. *
Source§

fn clearbanned<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Clear all banned IPs.

Source§

fn combinepsbt<'life0, 'async_trait>( &'life0 self, _txs: Vec<Value>, ) -> Pin<Box<dyn Future<Output = Result<CombinepsbtResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Combine multiple partially signed Bitcoin transactions into one transaction. Implements the Combiner role.

Source§

fn combinerawtransaction<'life0, 'async_trait>( &'life0 self, _txs: Vec<Value>, ) -> Pin<Box<dyn Future<Output = Result<CombinerawtransactionResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Combine multiple partially signed transactions into one transaction. The combined transaction may be another partially signed transaction or a fully signed transaction.

Source§

fn converttopsbt<'life0, 'async_trait>( &'life0 self, _hexstring: String, _permitsigdata: Option<bool>, _iswitness: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<ConverttopsbtResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Converts a network serialized transaction to a PSBT. This should be used only with createrawtransaction and fundrawtransaction createpsbt and walletcreatefundedpsbt should be used for new applications.

Source§

fn createmultisig<'life0, 'async_trait>( &'life0 self, _nrequired: u32, _keys: Vec<String>, _address_type: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<CreatemultisigResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Creates a multi-signature address with n signatures of m keys required. It returns a json object with the address and redeemScript.

Source§

fn createpsbt<'life0, 'async_trait>( &'life0 self, _inputs: Vec<Value>, _outputs: Vec<Value>, _locktime: Option<u32>, _replaceable: Option<bool>, _version: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<CreatepsbtResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Creates a transaction in the Partially Signed Transaction format. Implements the Creator role. Note that the transaction’s inputs are not signed, and it is not stored in the wallet or transmitted to the network.

Source§

fn createrawtransaction<'life0, 'async_trait>( &'life0 self, _inputs: Vec<Value>, _outputs: Vec<Value>, _locktime: Option<u32>, _replaceable: Option<bool>, _version: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<CreaterawtransactionResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Create a transaction spending the given inputs and creating new outputs. Outputs can be addresses or data. Returns hex-encoded raw transaction. Note that the transaction’s inputs are not signed, and it is not stored in the wallet or transmitted to the network.

Source§

fn createwallet<'life0, 'async_trait>( &'life0 self, _wallet_name: String, _disable_private_keys: Option<bool>, _blank: Option<bool>, _passphrase: Option<String>, _avoid_reuse: Option<bool>, _descriptors: Option<bool>, _load_on_startup: Option<bool>, _external_signer: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<CreatewalletResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Creates and loads a new wallet.

Source§

fn createwalletdescriptor<'life0, 'async_trait>( &'life0 self, _type: String, _options: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<CreatewalletdescriptorResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Creates the wallet’s descriptor for the given address type. The address type must be one that the wallet does not already have a descriptor for. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

Source§

fn decodepsbt<'life0, 'async_trait>( &'life0 self, _psbt: String, ) -> Pin<Box<dyn Future<Output = Result<DecodepsbtResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return a JSON object representing the serialized, base64-encoded partially signed Bitcoin transaction.

Source§

fn decoderawtransaction<'life0, 'async_trait>( &'life0 self, _hexstring: String, _iswitness: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<DecoderawtransactionResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return a JSON object representing the serialized, hex-encoded transaction.

Source§

fn decodescript<'life0, 'async_trait>( &'life0 self, _hexstring: String, ) -> Pin<Box<dyn Future<Output = Result<DecodescriptResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Decode a hex-encoded script.

Source§

fn deriveaddresses<'life0, 'async_trait>( &'life0 self, _descriptor: String, _range: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<DeriveaddressesResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Derives one or more addresses corresponding to an output descriptor. Examples of output descriptors are: pkh() P2PKH outputs for the given pubkey wpkh() Native segwit P2PKH outputs for the given pubkey sh(multi(,,,…)) P2SH-multisig outputs for the given threshold and pubkeys raw() Outputs whose output script equals the specified hex-encoded bytes tr(,multi_a(,,,…)) P2TR-multisig outputs for the given threshold and pubkeys

In the above, either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one or more path elements separated by “/”, where “h” represents a hardened child key. For more information on output descriptors, see the documentation in the doc/descriptors.md file.

Source§

fn descriptorprocesspsbt<'life0, 'async_trait>( &'life0 self, _psbt: String, _descriptors: Vec<Value>, _sighashtype: Option<String>, _bip32derivs: Option<bool>, _finalize: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<DescriptorprocesspsbtResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Update all segwit inputs in a PSBT with information from output descriptors, the UTXO set or the mempool. Then, sign the inputs we are able to with information from the output descriptors.

Source§

fn disconnectnode<'life0, 'async_trait>( &'life0 self, _address: Option<String>, _nodeid: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Immediately disconnects from the specified peer node.

Strictly one out of ‘address’ and ‘nodeid’ can be provided to identify the node.

To disconnect by nodeid, either set ‘address’ to the empty string, or call using the named ‘nodeid’ argument only.

Source§

fn dumptxoutset<'life0, 'async_trait>( &'life0 self, _path: String, _type: Option<String>, _options: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<DumptxoutsetResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Write the serialized UTXO set to a file. This can be used in loadtxoutset afterwards if this snapshot height is supported in the chainparams as well.

Unless the “latest” type is requested, the node will roll back to the requested height and network activity will be suspended during this process. Because of this it is discouraged to interact with the node in any other way during the execution of this call to avoid inconsistent results and race conditions, particularly RPCs that interact with blockstorage.

This call may take several minutes. Make sure to use no RPC timeout (bitcoin-cli -rpcclienttimeout=0)

Source§

fn echo<'life0, 'async_trait>( &'life0 self, _arg0: Option<String>, _arg1: Option<String>, _arg2: Option<String>, _arg3: Option<String>, _arg4: Option<String>, _arg5: Option<String>, _arg6: Option<String>, _arg7: Option<String>, _arg8: Option<String>, _arg9: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<EchoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Simply echo back the input arguments. This command is for testing.

It will return an internal bug report when arg9=‘trigger_internal_bug’ is passed.

The difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in bitcoin-cli and the GUI. There is no server-side difference.

Source§

fn echoipc<'life0, 'async_trait>( &'life0 self, _arg: String, ) -> Pin<Box<dyn Future<Output = Result<EchoipcResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Echo back the input argument, passing it through a spawned process in a multiprocess build. This command is for testing.

Source§

fn echojson<'life0, 'async_trait>( &'life0 self, _arg0: Option<String>, _arg1: Option<String>, _arg2: Option<String>, _arg3: Option<String>, _arg4: Option<String>, _arg5: Option<String>, _arg6: Option<String>, _arg7: Option<String>, _arg8: Option<String>, _arg9: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<EchojsonResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Simply echo back the input arguments. This command is for testing.

It will return an internal bug report when arg9=‘trigger_internal_bug’ is passed.

The difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in bitcoin-cli and the GUI. There is no server-side difference.

Source§

fn encryptwallet<'life0, 'async_trait>( &'life0 self, _passphrase: String, ) -> Pin<Box<dyn Future<Output = Result<EncryptwalletResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Encrypts the wallet with ‘passphrase’. This is for first time encryption. After this, any calls that interact with private keys such as sending or signing will require the passphrase to be set prior to making these calls. Use the walletpassphrase call for this, and then walletlock call. If the wallet is already encrypted, use the walletpassphrasechange call. ** IMPORTANT ** For security reasons, the encryption process will generate a new HD seed, resulting in the creation of a fresh set of active descriptors. Therefore, it is crucial to securely back up the newly generated wallet file using the backupwallet RPC.

Source§

fn enumeratesigners<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<EnumeratesignersResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns a list of external signers from -signer.

Source§

fn estimaterawfee<'life0, 'async_trait>( &'life0 self, _conf_target: u64, _threshold: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<EstimaterawfeeResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

WARNING: This interface is unstable and may disappear or change!

WARNING: This is an advanced API call that is tightly coupled to the specific implementation of fee estimation. The parameters it can be called with and the results it returns will change if the internal implementation changes.

Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks if possible. Uses virtual transaction size as defined in BIP 141 (witness data is discounted).

Source§

fn estimatesmartfee<'life0, 'async_trait>( &'life0 self, _conf_target: u64, _estimate_mode: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<EstimatesmartfeeResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Estimates the approximate fee per kilobyte needed for a transaction to begin confirmation within conf_target blocks if possible and return the number of blocks for which the estimate is valid. Uses virtual transaction size as defined in BIP 141 (witness data is discounted).

Source§

fn finalizepsbt<'life0, 'async_trait>( &'life0 self, _psbt: String, _extract: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<FinalizepsbtResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Finalize the inputs of a PSBT. If the transaction is fully signed, it will produce a network serialized transaction which can be broadcast with sendrawtransaction. Otherwise a PSBT will be created which has the final_scriptSig and final_scriptwitness fields filled for inputs that are complete. Implements the Finalizer and Extractor roles.

Source§

fn fundrawtransaction<'life0, 'async_trait>( &'life0 self, _hexstring: String, _options: Option<Value>, _iswitness: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<FundrawtransactionResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

If the transaction has no inputs, they will be automatically selected to meet its out value. It will add at most one change output to the outputs. No existing outputs will be modified unless “subtractFeeFromOutputs” is specified. Note that inputs which were signed may need to be resigned after completion since in/outputs have been added. The inputs added will not be signed, use signrawtransactionwithkey or signrawtransactionwithwallet for that. All existing inputs must either have their previous output transaction be in the wallet or be in the UTXO set. Solving data must be provided for non-wallet inputs. Note that all inputs selected must be of standard form and P2SH scripts must be in the wallet using importdescriptors (to calculate fees). You can see whether this is the case by checking the “solvable” field in the listunspent output. Note that if specifying an exact fee rate, the resulting transaction may have a higher fee rate if the transaction has unconfirmed inputs. This is because the wallet will attempt to make the entire package have the given fee rate, not the resulting transaction.

Source§

fn generate<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

has been replaced by the -generate cli option. Refer to -help for more information.

Source§

fn generateblock<'life0, 'async_trait>( &'life0 self, _output: String, _transactions: Vec<Value>, _submit: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GenerateblockResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Mine a set of ordered transactions to a specified address or descriptor and return the block hash.

Source§

fn generatetoaddress<'life0, 'async_trait>( &'life0 self, _nblocks: u64, _address: String, _maxtries: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<GeneratetoaddressResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Mine to a specified address and return the block hashes.

Source§

fn generatetodescriptor<'life0, 'async_trait>( &'life0 self, _num_blocks: u64, _descriptor: String, _maxtries: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<GeneratetodescriptorResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Mine to a specified descriptor and return the block hashes.

Source§

fn getaddednodeinfo<'life0, 'async_trait>( &'life0 self, _node: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<GetaddednodeinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns information about the given added node, or all added nodes (note that onetry addnodes are not listed here)

Source§

fn getaddressesbylabel<'life0, 'async_trait>( &'life0 self, _label: String, ) -> Pin<Box<dyn Future<Output = Result<GetaddressesbylabelResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the list of addresses assigned the specified label.

Source§

fn getaddressinfo<'life0, 'async_trait>( &'life0 self, _address: String, ) -> Pin<Box<dyn Future<Output = Result<GetaddressinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return information about the given bitcoin address. Some of the information will only be present if the address is in the active wallet.

Source§

fn getaddrmaninfo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetaddrmaninfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Provides information about the node’s address manager by returning the number of addresses in the new and tried tables and their sum for all networks.

Source§

fn getbalance<'life0, 'async_trait>( &'life0 self, _dummy: Option<String>, _minconf: Option<u32>, _include_watchonly: Option<bool>, _avoid_reuse: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetbalanceResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the total available balance. The available balance is what the wallet considers currently spendable, and is thus affected by options which limit spendability such as -spendzeroconfchange.

Source§

fn getbalances<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetbalancesResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns an object with all balances in BTC.

Source§

fn getbestblockhash<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetbestblockhashResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the hash of the best (tip) block in the most-work fully-validated chain.

Source§

fn getblock<'life0, 'async_trait>( &'life0 self, _blockhash: BlockHash, _verbosity: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<GetblockResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

If verbosity is 0, returns a string that is serialized, hex-encoded data for block ‘hash’. If verbosity is 1, returns an Object with information about block . If verbosity is 2, returns an Object with information about block and information about each transaction. If verbosity is 3, returns an Object with information about block and information about each transaction, including prevout information for inputs (only for unpruned blocks in the current best chain).

Source§

fn getblockchaininfo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetblockchaininfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns an object containing various state info regarding blockchain processing.

Source§

fn getblockcount<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetblockcountResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the height of the most-work fully-validated chain. The genesis block has height 0.

Source§

fn getblockfilter<'life0, 'async_trait>( &'life0 self, _blockhash: BlockHash, _filtertype: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<GetblockfilterResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Retrieve a BIP 157 content filter for a particular block.

Source§

fn getblockfrompeer<'life0, 'async_trait>( &'life0 self, _blockhash: BlockHash, _peer_id: u64, ) -> Pin<Box<dyn Future<Output = Result<GetblockfrompeerResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Attempt to fetch block from a given peer.

We must have the header for this block, e.g. using submitheader. The block will not have any undo data which can limit the usage of the block data in a context where the undo data is needed. Subsequent calls for the same block may cause the response from the previous peer to be ignored. Peers generally ignore requests for a stale block that they never fully verified, or one that is more than a month old. When a peer does not respond with a block, we will disconnect. Note: The block could be re-pruned as soon as it is received.

Returns an empty JSON object if the request was successfully scheduled.

Source§

fn getblockhash<'life0, 'async_trait>( &'life0 self, _height: u64, ) -> Pin<Box<dyn Future<Output = Result<GetblockhashResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns hash of block in best-block-chain at height provided.

Source§

fn getblockheader<'life0, 'async_trait>( &'life0 self, _blockhash: BlockHash, _verbose: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetblockheaderResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

If verbose is false, returns a string that is serialized, hex-encoded data for blockheader ‘hash’. If verbose is true, returns an Object with information about blockheader .

Source§

fn getblockstats<'life0, 'async_trait>( &'life0 self, _hash_or_height: HashOrHeight, _stats: Option<Vec<String>>, ) -> Pin<Box<dyn Future<Output = Result<GetblockstatsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Compute per block statistics for a given window. All amounts are in satoshis. It won’t work for some heights with pruning.

Source§

fn getblocktemplate<'life0, 'async_trait>( &'life0 self, _template_request: Value, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

If the request parameters include a ‘mode’ key, that is used to explicitly select between the default ‘template’ request or a ‘proposal’. It returns data needed to construct a block to work on. For full specification, see BIPs 22, 23, 9, and 145: https://github.com/bitcoin/bips/blob/master/bip-0022.mediawiki https://github.com/bitcoin/bips/blob/master/bip-0023.mediawiki https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki#getblocktemplate_changes https://github.com/bitcoin/bips/blob/master/bip-0145.mediawiki

Source§

fn getchainstates<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetchainstatesResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return information about chainstates.

Source§

fn getchaintips<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetchaintipsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return information about all known tips in the block tree, including the main chain as well as orphaned branches.

Source§

fn getchaintxstats<'life0, 'async_trait>( &'life0 self, _nblocks: Option<u64>, _blockhash: Option<BlockHash>, ) -> Pin<Box<dyn Future<Output = Result<GetchaintxstatsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Compute statistics about the total number and rate of transactions in the chain.

Source§

fn getconnectioncount<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetconnectioncountResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the number of connections to other nodes.

Source§

fn getdeploymentinfo<'life0, 'async_trait>( &'life0 self, _blockhash: Option<BlockHash>, ) -> Pin<Box<dyn Future<Output = Result<GetdeploymentinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns an object containing various state info regarding deployments of consensus changes.

Source§

fn getdescriptoractivity<'life0, 'async_trait>( &'life0 self, _blockhashes: Vec<Value>, _scanobjects: Vec<Value>, _include_mempool: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetdescriptoractivityResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Get spend and receive activity associated with a set of descriptors for a set of blocks. This command pairs well with the relevant_blocks output of scanblocks(). This call may take several minutes. If you encounter timeouts, try specifying no RPC timeout (bitcoin-cli -rpcclienttimeout=0)

Source§

fn getdescriptorinfo<'life0, 'async_trait>( &'life0 self, _descriptor: String, ) -> Pin<Box<dyn Future<Output = Result<GetdescriptorinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Analyses a descriptor.

Source§

fn getdifficulty<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetdifficultyResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the proof-of-work difficulty as a multiple of the minimum difficulty.

Source§

fn gethdkeys<'life0, 'async_trait>( &'life0 self, _options: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<GethdkeysResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

List all BIP 32 HD keys in the wallet and which descriptors use them.

Source§

fn getindexinfo<'life0, 'async_trait>( &'life0 self, _index_name: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<GetindexinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the status of one or all available indices currently running in the node.

Source§

fn getmemoryinfo<'life0, 'async_trait>( &'life0 self, _mode: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<GetmemoryinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns an object containing information about memory usage.

Source§

fn getmempoolancestors<'life0, 'async_trait>( &'life0 self, _txid: Txid, _verbose: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetmempoolancestorsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

If txid is in the mempool, returns all in-mempool ancestors.

Source§

fn getmempooldescendants<'life0, 'async_trait>( &'life0 self, _txid: Txid, _verbose: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetmempooldescendantsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

If txid is in the mempool, returns all in-mempool descendants.

Source§

fn getmempoolentry<'life0, 'async_trait>( &'life0 self, _txid: Txid, ) -> Pin<Box<dyn Future<Output = Result<GetmempoolentryResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns mempool data for given transaction

Source§

fn getmempoolinfo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetmempoolinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns details on the active state of the TX memory pool.

Source§

fn getmininginfo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetmininginfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns a json object containing mining-related information.

Source§

fn getnettotals<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetnettotalsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns information about network traffic, including bytes in, bytes out, and current system time.

Source§

fn getnetworkhashps<'life0, 'async_trait>( &'life0 self, _nblocks: Option<u64>, _height: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<GetnetworkhashpsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the estimated network hashes per second based on the last n blocks. Pass in [blocks] to override # of blocks, -1 specifies since last difficulty change. Pass in [height] to estimate the network speed at the time when a certain block was found.

Source§

fn getnetworkinfo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetnetworkinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns an object containing various state info regarding P2P networking.

Source§

fn getnewaddress<'life0, 'async_trait>( &'life0 self, _label: Option<String>, _address_type: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<GetnewaddressResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns a new Bitcoin address for receiving payments. If ‘label’ is specified, it is added to the address book so payments received with the address will be associated with ‘label’.

Source§

fn getnodeaddresses<'life0, 'async_trait>( &'life0 self, _count: Option<u64>, _network: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<GetnodeaddressesResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return known addresses, after filtering for quality and recency. These can potentially be used to find new peers in the network. The total number of addresses known to the node may be higher.

Source§

fn getorphantxs<'life0, 'async_trait>( &'life0 self, _verbosity: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<GetorphantxsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Shows transactions in the tx orphanage.

EXPERIMENTAL warning: this call may be changed in future releases.

Source§

fn getpeerinfo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetpeerinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns data about each connected network peer as a json array of objects.

Source§

fn getprioritisedtransactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetprioritisedtransactionsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns a map of all user-created (see prioritisetransaction) fee deltas by txid, and whether the tx is present in mempool.

Source§

fn getrawaddrman<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetrawaddrmanResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

EXPERIMENTAL warning: this call may be changed in future releases.

Returns information on all address manager entries for the new and tried tables.

Source§

fn getrawchangeaddress<'life0, 'async_trait>( &'life0 self, _address_type: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<GetrawchangeaddressResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns a new Bitcoin address, for receiving change. This is for use with raw transactions, NOT normal use.

Source§

fn getrawmempool<'life0, 'async_trait>( &'life0 self, _verbose: Option<bool>, _mempool_sequence: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetrawmempoolResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns all transaction ids in memory pool as a json array of string transaction ids.

Hint: use getmempoolentry to fetch a specific transaction from the mempool.

Source§

fn getrawtransaction<'life0, 'async_trait>( &'life0 self, _txid: Txid, _verbosity: Option<u32>, _blockhash: Option<BlockHash>, ) -> Pin<Box<dyn Future<Output = Result<GetrawtransactionResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

By default, this call only returns a transaction if it is in the mempool. If -txindex is enabled and no blockhash argument is passed, it will return the transaction if it is in the mempool or any block. If a blockhash argument is passed, it will return the transaction if the specified block is available and the transaction is in that block.

Hint: Use gettransaction for wallet transactions.

If verbosity is 0 or omitted, returns the serialized transaction as a hex-encoded string. If verbosity is 1, returns a JSON Object with information about the transaction. If verbosity is 2, returns a JSON Object with information about the transaction, including fee and prevout information.

Source§

fn getreceivedbyaddress<'life0, 'async_trait>( &'life0 self, _address: String, _minconf: Option<u32>, _include_immature_coinbase: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetreceivedbyaddressResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the total amount received by the given address in transactions with at least minconf confirmations.

Source§

fn getreceivedbylabel<'life0, 'async_trait>( &'life0 self, _label: String, _minconf: Option<u32>, _include_immature_coinbase: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GetreceivedbylabelResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the total amount received by addresses with

Source§

fn getrpcinfo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetrpcinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns details of the RPC server.

Source§

fn gettransaction<'life0, 'async_trait>( &'life0 self, _txid: Txid, _include_watchonly: Option<bool>, _verbose: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GettransactionResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Get detailed information about in-wallet transaction

Source§

fn gettxout<'life0, 'async_trait>( &'life0 self, _txid: Txid, _n: u32, _include_mempool: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns details about an unspent transaction output.

Source§

fn gettxoutproof<'life0, 'async_trait>( &'life0 self, _txids: Vec<Txid>, _blockhash: Option<BlockHash>, ) -> Pin<Box<dyn Future<Output = Result<GettxoutproofResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns a hex-encoded proof that “txid” was included in a block.

NOTE: By default this function only works sometimes. This is when there is an unspent output in the utxo for this transaction. To make it always work, you need to maintain a transaction index, using the -txindex command line option or specify the block in which the transaction is included manually (by blockhash).

Source§

fn gettxoutsetinfo<'life0, 'async_trait>( &'life0 self, _hash_type: Option<String>, _hash_or_height: Option<HashOrHeight>, _use_index: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<GettxoutsetinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns statistics about the unspent transaction output set. Note this call may take some time if you are not using coinstatsindex.

Source§

fn gettxspendingprevout<'life0, 'async_trait>( &'life0 self, _outputs: Vec<Value>, ) -> Pin<Box<dyn Future<Output = Result<GettxspendingprevoutResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Scans the mempool to find transactions spending any of the given outputs

Source§

fn getwalletinfo<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetwalletinfoResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns an object containing various wallet state info.

Source§

fn getzmqnotifications<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<GetzmqnotificationsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns information about the active ZeroMQ notifications.

Source§

fn help<'life0, 'async_trait>( &'life0 self, _command: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<HelpResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

List all commands, or get help for a specified command.

Source§

fn importdescriptors<'life0, 'async_trait>( &'life0 self, _requests: Vec<Value>, ) -> Pin<Box<dyn Future<Output = Result<ImportdescriptorsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Import descriptors. This will trigger a rescan of the blockchain based on the earliest timestamp of all descriptors being imported. Requires a new wallet backup. When importing descriptors with multipath key expressions, if the multipath specifier contains exactly two elements, the descriptor produced from the second element will be imported as an internal descriptor.

Note: This call can take over an hour to complete if using an early timestamp; during that time, other rpc calls may report that the imported keys, addresses or scripts exist but related transactions are still missing. The rescan is significantly faster if block filters are available (using startup option “-blockfilterindex=1”).

Source§

fn importmempool<'life0, 'async_trait>( &'life0 self, _filepath: String, _options: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<ImportmempoolResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Import a mempool.dat file and attempt to add its contents to the mempool. Warning: Importing untrusted files is dangerous, especially if metadata from the file is taken over.

Source§

fn importprunedfunds<'life0, 'async_trait>( &'life0 self, _rawtransaction: String, _txoutproof: String, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Imports funds without rescan. Corresponding address or script must previously be included in wallet. Aimed towards pruned wallets. The end-user is responsible to import additional transactions that subsequently spend the imported outputs or rescan after the point in the blockchain the transaction is included.

Source§

fn invalidateblock<'life0, 'async_trait>( &'life0 self, _blockhash: BlockHash, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Permanently marks a block as invalid, as if it violated a consensus rule.

Source§

fn joinpsbts<'life0, 'async_trait>( &'life0 self, _txs: Vec<Value>, ) -> Pin<Box<dyn Future<Output = Result<JoinpsbtsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Joins multiple distinct PSBTs with different inputs and outputs into one PSBT with inputs and outputs from all of the PSBTs No input in any of the PSBTs can be in more than one of the PSBTs.

Source§

fn keypoolrefill<'life0, 'async_trait>( &'life0 self, _newsize: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Refills each descriptor keypool in the wallet up to the specified number of new keys. By default, descriptor wallets have 4 active ranged descriptors (“legacy”, “p2sh-segwit”, “bech32”, “bech32m”), each with 1000 entries.

Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

Source§

fn listaddressgroupings<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ListaddressgroupingsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Lists groups of addresses which have had their common ownership made public by common use as inputs or as the resulting change in past transactions

Source§

fn listbanned<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ListbannedResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

List all manually banned IPs/Subnets.

Source§

fn listdescriptors<'life0, 'async_trait>( &'life0 self, _private: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<ListdescriptorsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

List all descriptors present in a wallet.

Source§

fn listlabels<'life0, 'async_trait>( &'life0 self, _purpose: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<ListlabelsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the list of all labels, or labels that are assigned to addresses with a specific purpose.

Source§

fn listlockunspent<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ListlockunspentResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns list of temporarily unspendable outputs. See the lockunspent call to lock and unlock transactions for spending.

Source§

fn listreceivedbyaddress<'life0, 'async_trait>( &'life0 self, _minconf: Option<u32>, _include_empty: Option<bool>, _include_watchonly: Option<bool>, _address_filter: Option<String>, _include_immature_coinbase: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<ListreceivedbyaddressResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

List balances by receiving address.

Source§

fn listreceivedbylabel<'life0, 'async_trait>( &'life0 self, _minconf: Option<u32>, _include_empty: Option<bool>, _include_watchonly: Option<bool>, _include_immature_coinbase: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<ListreceivedbylabelResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

List received transactions by label.

Source§

fn listsinceblock<'life0, 'async_trait>( &'life0 self, _blockhash: Option<BlockHash>, _target_confirmations: Option<u64>, _include_watchonly: Option<bool>, _include_removed: Option<bool>, _include_change: Option<bool>, _label: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<ListsinceblockResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Get all transactions in blocks since block [blockhash], or all transactions if omitted. If “blockhash” is no longer a part of the main chain, transactions from the fork point onward are included. Additionally, if include_removed is set, transactions affecting the wallet which were removed are returned in the “removed” array.

Source§

fn listtransactions<'life0, 'async_trait>( &'life0 self, _label: Option<String>, _count: Option<u64>, _skip: Option<u64>, _include_watchonly: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<ListtransactionsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

If a label name is provided, this will return only incoming transactions paying to addresses with the specified label.

Returns up to ‘count’ most recent transactions skipping the first ‘from’ transactions.

Source§

fn listunspent<'life0, 'async_trait>( &'life0 self, _minconf: Option<u32>, _maxconf: Option<u32>, _addresses: Option<Vec<String>>, _include_unsafe: Option<bool>, _query_options: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<ListunspentResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations. Optionally filter to only include txouts paid to specified addresses.

Source§

fn listwalletdir<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ListwalletdirResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns a list of wallets in the wallet directory.

Source§

fn listwallets<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<ListwalletsResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns a list of currently loaded wallets. For full information on the wallet, use “getwalletinfo”

Source§

fn loadtxoutset<'life0, 'async_trait>( &'life0 self, _path: String, ) -> Pin<Box<dyn Future<Output = Result<LoadtxoutsetResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Load the serialized UTXO set from a file. Once this snapshot is loaded, its contents will be deserialized into a second chainstate data structure, which is then used to sync to the network’s tip. Meanwhile, the original chainstate will complete the initial block download process in the background, eventually validating up to the block that the snapshot is based upon.

The result is a usable bitcoind instance that is current with the network tip in a matter of minutes rather than hours. UTXO snapshot are typically obtained from third-party sources (HTTP, torrent, etc.) which is reasonable since their contents are always checked by hash.

You can find more information on this process in the assumeutxo design document (https://github.com/bitcoin/bitcoin/blob/master/doc/design/assumeutxo.md).

Source§

fn loadwallet<'life0, 'async_trait>( &'life0 self, _filename: String, _load_on_startup: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<LoadwalletResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Loads a wallet from a wallet file or directory. Note that all wallet command-line options used when starting bitcoind will be applied to the new wallet.

Source§

fn lockunspent<'life0, 'async_trait>( &'life0 self, _unlock: bool, _transactions: Option<Vec<Value>>, _persistent: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<LockunspentResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Updates list of temporarily unspendable outputs. Temporarily lock (unlock=false) or unlock (unlock=true) specified transaction outputs. If no transaction outputs are specified when unlocking then all current locked transaction outputs are unlocked. A locked transaction output will not be chosen by automatic coin selection, when spending bitcoins. Manually selected coins are automatically unlocked. Locks are stored in memory only, unless persistent=true, in which case they will be written to the wallet database and loaded on node start. Unwritten (persistent=false) locks are always cleared (by virtue of process exit) when a node stops or fails. Unlocking will clear both persistent and not. Also see the listunspent call

Source§

fn logging<'life0, 'async_trait>( &'life0 self, _include: Option<Vec<Value>>, _exclude: Option<Vec<Value>>, ) -> Pin<Box<dyn Future<Output = Result<LoggingResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Gets and sets the logging configuration. When called without an argument, returns the list of categories with status that are currently being debug logged or not. When called with arguments, adds or removes categories from debug logging and return the lists above. The arguments are evaluated in order “include”, “exclude”. If an item is both included and excluded, it will thus end up being excluded. The valid logging categories are: addrman, bench, blockstorage, cmpctblock, coindb, estimatefee, http, i2p, ipc, leveldb, libevent, mempool, mempoolrej, net, proxy, prune, qt, rand, reindex, rpc, scan, selectcoins, tor, txpackages, txreconciliation, validation, walletdb, zmq In addition, the following are available as category names with special meanings:

  • “all”, “1” : represent all logging categories.
Source§

fn migratewallet<'life0, 'async_trait>( &'life0 self, _wallet_name: Option<String>, _passphrase: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<MigratewalletResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Migrate the wallet to a descriptor wallet. A new wallet backup will need to be made.

The migration process will create a backup of the wallet before migrating. This backup file will be named -.legacy.bak and can be found in the directory for this wallet. In the event of an incorrect migration, the backup can be restored using restorewallet. Encrypted wallets must have the passphrase provided as an argument to this call.

This RPC may take a long time to complete. Increasing the RPC client timeout is recommended.

Source§

fn mockscheduler<'life0, 'async_trait>( &'life0 self, _delta_time: u64, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Bump the scheduler into the future (-regtest only)

Source§

fn ping<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Requests that a ping be sent to all other nodes, to measure ping time. Results are provided in getpeerinfo. Ping command is handled in queue with all other commands, so it measures processing backlog, not just network ping.

Source§

fn preciousblock<'life0, 'async_trait>( &'life0 self, _blockhash: BlockHash, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Treats a block as if it were received before others with the same work.

A later preciousblock call can override the effect of an earlier one.

The effects of preciousblock are not retained across restarts.

Source§

fn prioritisetransaction<'life0, 'async_trait>( &'life0 self, params: PrioritisetransactionParams, ) -> Pin<Box<dyn Future<Output = Result<PrioritisetransactionResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Accepts the transaction into mined blocks at a higher (or lower) priority

Source§

fn pruneblockchain<'life0, 'async_trait>( &'life0 self, _height: u64, ) -> Pin<Box<dyn Future<Output = Result<PruneblockchainResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Attempts to delete block and undo data up to a specified height or timestamp, if eligible for pruning. Requires -prune to be enabled at startup. While pruned data may be re-fetched in some cases (e.g., via getblockfrompeer), local deletion is irreversible.

Source§

fn psbtbumpfee<'life0, 'async_trait>( &'life0 self, _txid: Txid, _options: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<PsbtbumpfeeResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Bumps the fee of a transaction T, replacing it with a new transaction B. Returns a PSBT instead of creating and signing a new transaction. A transaction with the given txid must be in the wallet. The command will pay the additional fee by reducing change outputs or adding inputs when necessary. It may add a new change output if one does not already exist. All inputs in the original transaction will be included in the replacement transaction. The command will fail if the wallet or mempool contains a transaction that spends one of T’s outputs. By default, the new fee will be calculated automatically using the estimatesmartfee RPC. The user can specify a confirmation target for estimatesmartfee. Alternatively, the user can specify a fee rate in sat/vB for the new transaction. At a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee returned by getnetworkinfo) to enter the node’s mempool.

  • WARNING: before version 0.21, fee_rate was in BTC/kvB. As of 0.21, fee_rate is in sat/vB. *
Source§

fn reconsiderblock<'life0, 'async_trait>( &'life0 self, _blockhash: BlockHash, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Removes invalidity status of a block, its ancestors and its descendants, reconsider them for activation. This can be used to undo the effects of invalidateblock.

Source§

fn removeprunedfunds<'life0, 'async_trait>( &'life0 self, _txid: Txid, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Deletes the specified transaction from the wallet. Meant for use with pruned wallets and as a companion to importprunedfunds. This will affect wallet balances.

Source§

fn rescanblockchain<'life0, 'async_trait>( &'life0 self, _start_height: Option<u64>, _stop_height: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<RescanblockchainResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Rescan the local blockchain for wallet related transactions. Note: Use “getwalletinfo” to query the scanning progress. The rescan is significantly faster if block filters are available (using startup option “-blockfilterindex=1”).

Source§

fn restorewallet<'life0, 'async_trait>( &'life0 self, _wallet_name: String, _backup_file: String, _load_on_startup: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<RestorewalletResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Restores and loads a wallet from backup.

The rescan is significantly faster if block filters are available (using startup option “-blockfilterindex=1”).

Source§

fn savemempool<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SavemempoolResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Dumps the mempool to disk. It will fail until the previous dump is fully loaded.

Source§

fn scanblocks<'life0, 'async_trait>( &'life0 self, _action: String, _scanobjects: Option<Vec<Value>>, _start_height: Option<u64>, _stop_height: Option<u64>, _filtertype: Option<String>, _options: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return relevant blockhashes for given descriptors (requires blockfilterindex). This call may take several minutes. Make sure to use no RPC timeout (bitcoin-cli -rpcclienttimeout=0)

Source§

fn scantxoutset<'life0, 'async_trait>( &'life0 self, _action: String, _scanobjects: Option<Vec<Value>>, ) -> Pin<Box<dyn Future<Output = Result<ScantxoutsetResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Scans the unspent transaction output set for entries that match certain output descriptors. Examples of output descriptors are: addr(

) Outputs whose output script corresponds to the specified address (does not include P2PK) raw() Outputs whose output script equals the specified hex-encoded bytes combo() P2PK, P2PKH, P2WPKH, and P2SH-P2WPKH outputs for the given pubkey pkh() P2PKH outputs for the given pubkey sh(multi(,,,…)) P2SH-multisig outputs for the given threshold and pubkeys tr() P2TR tr(,{pk()}) P2TR with single fallback pubkey in tapscript rawtr() P2TR with the specified key as output key rather than inner wsh(and_v(v:pk(),after(2))) P2WSH miniscript with mandatory pubkey and a timelock

In the above, either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one or more path elements separated by “/”, and optionally ending in “/” (unhardened), or “/’” or “/*h” (hardened) to specify all unhardened or hardened child keys. In the latter case, a range needs to be specified by below if different from 1000. For more information on output descriptors, see the documentation in the doc/descriptors.md file.

Source§

fn schema<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SchemaResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return RPC command JSON Schema descriptions.

Source§

fn send<'life0, 'async_trait>( &'life0 self, _outputs: Vec<Value>, _conf_target: Option<u64>, _estimate_mode: Option<String>, _fee_rate: Option<f64>, _options: Option<Value>, _version: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<SendResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

EXPERIMENTAL warning: this call may be changed in future releases.

Send a transaction.

Source§

fn sendall<'life0, 'async_trait>( &'life0 self, _recipients: Vec<Value>, _conf_target: Option<u64>, _estimate_mode: Option<String>, _fee_rate: Option<f64>, _options: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<SendallResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

EXPERIMENTAL warning: this call may be changed in future releases.

Spend the value of all (or specific) confirmed UTXOs and unconfirmed change in the wallet to one or more recipients. Unconfirmed inbound UTXOs and locked UTXOs will not be spent. Sendall will respect the avoid_reuse wallet flag. If your wallet contains many small inputs, either because it received tiny payments or as a result of accumulating change, consider using send_max to exclude inputs that are worth less than the fees needed to spend them.

Source§

fn sendmany<'life0, 'async_trait>( &'life0 self, params: SendmanyParams, ) -> Pin<Box<dyn Future<Output = Result<SendmanyResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Send multiple times. Amounts are double-precision floating point numbers. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

Source§

fn sendmsgtopeer<'life0, 'async_trait>( &'life0 self, _peer_id: u64, _msg_type: String, _msg: String, ) -> Pin<Box<dyn Future<Output = Result<SendmsgtopeerResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Send a p2p message to a peer specified by id. The message type and body must be provided, the message header will be generated. This RPC is for testing only.

Source§

fn sendrawtransaction<'life0, 'async_trait>( &'life0 self, _hexstring: String, _maxfeerate: Option<f64>, _maxburnamount: Option<f64>, ) -> Pin<Box<dyn Future<Output = Result<SendrawtransactionResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Submit a raw transaction (serialized, hex-encoded) to local node and network.

The transaction will be sent unconditionally to all peers, so using sendrawtransaction for manual rebroadcast may degrade privacy by leaking the transaction’s origin, as nodes will normally not rebroadcast non-wallet transactions already in their mempool.

A specific exception, RPC_TRANSACTION_ALREADY_IN_UTXO_SET, may throw if the transaction cannot be added to the mempool.

Related RPCs: createrawtransaction, signrawtransactionwithkey

Source§

fn sendtoaddress<'life0, 'async_trait>( &'life0 self, _address: String, _amount: Amount, _comment: Option<String>, _comment_to: Option<String>, _subtractfeefromamount: Option<bool>, _replaceable: Option<bool>, _conf_target: Option<u64>, _estimate_mode: Option<String>, _avoid_reuse: Option<bool>, _fee_rate: Option<f64>, _verbose: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<SendtoaddressResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Send an amount to a given address. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

Source§

fn setban<'life0, 'async_trait>( &'life0 self, _subnet: String, _command: String, _bantime: Option<u64>, _absolute: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Attempts to add or remove an IP/Subnet from the banned list.

Source§

fn setlabel<'life0, 'async_trait>( &'life0 self, _address: String, _label: String, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Sets the label associated with the given address.

Source§

fn setmocktime<'life0, 'async_trait>( &'life0 self, _timestamp: u64, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Set the local time to given timestamp (-regtest only)

Source§

fn setnetworkactive<'life0, 'async_trait>( &'life0 self, _state: bool, ) -> Pin<Box<dyn Future<Output = Result<SetnetworkactiveResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Disable/enable all p2p network activity.

Source§

fn settxfee<'life0, 'async_trait>( &'life0 self, _amount: Amount, ) -> Pin<Box<dyn Future<Output = Result<SettxfeeResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

(DEPRECATED) Set the transaction fee rate in BTC/kvB for this wallet. Overrides the global -paytxfee command line parameter. Can be deactivated by passing 0 as the fee. In that case automatic fee selection will be used by default.

Source§

fn setwalletflag<'life0, 'async_trait>( &'life0 self, _flag: String, _value: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<SetwalletflagResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Change the state of the given wallet flag for a wallet.

Source§

fn signmessage<'life0, 'async_trait>( &'life0 self, _address: String, _message: String, ) -> Pin<Box<dyn Future<Output = Result<SignmessageResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Sign a message with the private key of an address Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

Source§

fn signmessagewithprivkey<'life0, 'async_trait>( &'life0 self, _privkey: String, _message: String, ) -> Pin<Box<dyn Future<Output = Result<SignmessagewithprivkeyResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Sign a message with the private key of an address

Source§

fn signrawtransactionwithkey<'life0, 'async_trait>( &'life0 self, _hexstring: String, _privkeys: Vec<String>, _prevtxs: Option<Vec<Value>>, _sighashtype: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<SignrawtransactionwithkeyResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Sign inputs for raw transaction (serialized, hex-encoded). The second argument is an array of base58-encoded private keys that will be the only keys used to sign the transaction. The third optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain.

Source§

fn signrawtransactionwithwallet<'life0, 'async_trait>( &'life0 self, _hexstring: String, _prevtxs: Option<Vec<Value>>, _sighashtype: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<SignrawtransactionwithwalletResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Sign inputs for raw transaction (serialized, hex-encoded). The second optional argument (may be null) is an array of previous transaction outputs that this transaction depends on but may not yet be in the block chain. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

Source§

fn simulaterawtransaction<'life0, 'async_trait>( &'life0 self, _rawtxs: Option<Vec<Value>>, _options: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<SimulaterawtransactionResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Calculate the balance change resulting in the signing and broadcasting of the given transaction(s).

Source§

fn stop<'life0, 'async_trait>( &'life0 self, _wait: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<StopResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Request a graceful shutdown of Bitcoin Core.

Source§

fn submitblock<'life0, 'async_trait>( &'life0 self, _hexdata: String, _dummy: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Attempts to submit new block to network. See https://en.bitcoin.it/wiki/BIP_0022 for full specification.

Source§

fn submitheader<'life0, 'async_trait>( &'life0 self, _hexdata: String, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Decode the given hexdata as a header and submit it as a candidate chain tip if valid. Throws when the header is invalid.

Source§

fn submitpackage<'life0, 'async_trait>( &'life0 self, _package: Vec<Value>, _maxfeerate: Option<f64>, _maxburnamount: Option<f64>, ) -> Pin<Box<dyn Future<Output = Result<SubmitpackageResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Submit a package of raw transactions (serialized, hex-encoded) to local node. The package will be validated according to consensus and mempool policy rules. If any transaction passes, it will be accepted to mempool. This RPC is experimental and the interface may be unstable. Refer to doc/policy/packages.md for documentation on package policies. Warning: successful submission does not mean the transactions will propagate throughout the network.

Source§

fn syncwithvalidationinterfacequeue<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Waits for the validation interface queue to catch up on everything that was there when we entered this function.

Source§

fn testmempoolaccept<'life0, 'async_trait>( &'life0 self, _rawtxs: Vec<Value>, _maxfeerate: Option<f64>, ) -> Pin<Box<dyn Future<Output = Result<TestmempoolacceptResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns result of mempool acceptance tests indicating if raw transaction(s) (serialized, hex-encoded) would be accepted by mempool.

If multiple transactions are passed in, parents must come before children and package policies apply: the transactions cannot conflict with any mempool transactions or each other.

If one transaction fails, other transactions may not be fully validated (the ‘allowed’ key will be blank).

The maximum number of transactions allowed is 25.

This checks if transactions violate the consensus or policy rules.

See sendrawtransaction call.

Source§

fn unloadwallet<'life0, 'async_trait>( &'life0 self, _wallet_name: Option<String>, _load_on_startup: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<UnloadwalletResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Unloads the wallet referenced by the request endpoint or the wallet_name argument. If both are specified, they must be identical.

Source§

fn uptime<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<UptimeResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Returns the total uptime of the server.

Source§

fn utxoupdatepsbt<'life0, 'async_trait>( &'life0 self, _psbt: String, _descriptors: Option<Vec<Value>>, ) -> Pin<Box<dyn Future<Output = Result<UtxoupdatepsbtResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Updates all segwit inputs and outputs in a PSBT with data from output descriptors, the UTXO set, txindex, or the mempool.

Source§

fn validateaddress<'life0, 'async_trait>( &'life0 self, _address: String, ) -> Pin<Box<dyn Future<Output = Result<ValidateaddressResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Return information about the given bitcoin address.

Source§

fn verifychain<'life0, 'async_trait>( &'life0 self, _checklevel: Option<u32>, _nblocks: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<VerifychainResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Verifies blockchain database.

Source§

fn verifymessage<'life0, 'async_trait>( &'life0 self, _address: String, _signature: String, _message: String, ) -> Pin<Box<dyn Future<Output = Result<VerifymessageResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Verify a signed message.

Source§

fn verifytxoutproof<'life0, 'async_trait>( &'life0 self, _proof: String, ) -> Pin<Box<dyn Future<Output = Result<VerifytxoutproofResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Verifies that a proof points to a transaction in a block, returning the transaction it commits to and throwing an RPC error if the block is not in our best chain

Source§

fn waitforblock<'life0, 'async_trait>( &'life0 self, _blockhash: BlockHash, _timeout: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<WaitforblockResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Waits for a specific new block and returns useful info about it.

Returns the current block on timeout or exit.

Make sure to use no RPC timeout (bitcoin-cli -rpcclienttimeout=0)

Source§

fn waitforblockheight<'life0, 'async_trait>( &'life0 self, _height: u64, _timeout: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<WaitforblockheightResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Waits for (at least) block height and returns the height and hash of the current tip.

Returns the current block on timeout or exit.

Make sure to use no RPC timeout (bitcoin-cli -rpcclienttimeout=0)

Source§

fn waitfornewblock<'life0, 'async_trait>( &'life0 self, _timeout: Option<u64>, _current_tip: Option<String>, ) -> Pin<Box<dyn Future<Output = Result<WaitfornewblockResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Waits for any new block and returns useful info about it.

Returns the current block on timeout or exit.

Make sure to use no RPC timeout (bitcoin-cli -rpcclienttimeout=0)

Source§

fn walletcreatefundedpsbt<'life0, 'async_trait>( &'life0 self, params: WalletcreatefundedpsbtParams, ) -> Pin<Box<dyn Future<Output = Result<WalletcreatefundedpsbtResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Creates and funds a transaction in the Partially Signed Transaction format. Implements the Creator and Updater roles. All existing inputs must either have their previous output transaction be in the wallet or be in the UTXO set. Solving data must be provided for non-wallet inputs.

Source§

fn walletdisplayaddress<'life0, 'async_trait>( &'life0 self, _address: String, ) -> Pin<Box<dyn Future<Output = Result<WalletdisplayaddressResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Display address on an external signer for verification.

Source§

fn walletlock<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Removes the wallet encryption key from memory, locking the wallet. After calling this method, you will need to call walletpassphrase again before being able to call any methods which require the wallet to be unlocked.

Source§

fn walletpassphrase<'life0, 'async_trait>( &'life0 self, _passphrase: String, _timeout: u64, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Stores the wallet decryption key in memory for ‘timeout’ seconds. This is needed prior to performing transactions related to private keys such as sending bitcoins

Note: Issuing the walletpassphrase command while the wallet is already unlocked will set a new unlock time that overrides the old one.

Source§

fn walletpassphrasechange<'life0, 'async_trait>( &'life0 self, _oldpassphrase: String, _newpassphrase: String, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Changes the wallet passphrase from ‘oldpassphrase’ to ‘newpassphrase’.

Source§

fn walletprocesspsbt<'life0, 'async_trait>( &'life0 self, _psbt: String, _sign: Option<bool>, _sighashtype: Option<String>, _bip32derivs: Option<bool>, _finalize: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<WalletprocesspsbtResponse, TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, T: 'async_trait,

Update a PSBT with input information from our wallet and then sign inputs that we can sign for. Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted.

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> RpcDispatchExt for T

Source§

fn dispatch_json<R: DeserializeOwned>( &self, method: &str, params: &[Value], ) -> impl Future<Output = Result<R, TransportError>> + Send

Dispatch JSON-RPC methods by name.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TransportExt for T
where T: TransportTrait,

Source§

fn call<'a, T2>( &'a self, method: &'a str, params: &'a [Value], ) -> Pin<Box<dyn Future<Output = Result<T2, TransportError>> + Send + 'a>>
where T2: DeserializeOwned,

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> WalletTransportExt for T

Source§

fn wallet_call<T: Serialize + Sync, R: DeserializeOwned>( &self, method: &str, params: &[T], ) -> impl Future<Output = Result<R, TransportError>> + Send

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,