1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
//! mining RPC method wrappers
//!
//! This module contains transport wrappers for mining methods.
use ;
use crate;
/// 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>
///
/// # Usage
/// This method can be called using the high-level client interface:
/// - `client.getblocktemplate(...).await`
/// Or directly via the transport layer for advanced use cases:
/// - `transport::getblocktemplate(&transport, ...).await`
///
/// Calls the `getblocktemplate` RPC method.
pub async
/// Returns a json object containing mining-related information.
///
/// # Usage
/// This method can be called using the high-level client interface:
/// - `client.getmininginfo(...).await`
/// Or directly via the transport layer for advanced use cases:
/// - `transport::getmininginfo(&transport, ...).await`
///
/// Calls the `getmininginfo` RPC method.
pub async
/// 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.
///
/// # Usage
/// This method can be called using the high-level client interface:
/// - `client.getnetworkhashps(...).await`
/// Or directly via the transport layer for advanced use cases:
/// - `transport::getnetworkhashps(&transport, ...).await`
///
/// Calls the `getnetworkhashps` RPC method.
pub async
/// Returns a map of all user-created (see prioritisetransaction) fee deltas by txid, and whether the tx is present in mempool.
///
/// # Usage
/// This method can be called using the high-level client interface:
/// - `client.getprioritisedtransactions(...).await`
/// Or directly via the transport layer for advanced use cases:
/// - `transport::getprioritisedtransactions(&transport, ...).await`
///
/// Calls the `getprioritisedtransactions` RPC method.
pub async
/// Accepts the transaction into mined blocks at a higher (or lower) priority
///
/// # Usage
/// This method can be called using the high-level client interface:
/// - `client.prioritisetransaction(...).await`
/// Or directly via the transport layer for advanced use cases:
/// - `transport::prioritisetransaction(&transport, ...).await`
///
/// Calls the `prioritisetransaction` RPC method.
pub async
/// Attempts to submit new block to network.
/// See <https://en.bitcoin.it/wiki/BIP_0022> for full specification.
///
/// # Usage
/// This method can be called using the high-level client interface:
/// - `client.submitblock(...).await`
/// Or directly via the transport layer for advanced use cases:
/// - `transport::submitblock(&transport, ...).await`
///
/// Calls the `submitblock` RPC method.
pub async
/// Decode the given hexdata as a header and submit it as a candidate chain tip if valid.
/// Throws when the header is invalid.
///
/// # Usage
/// This method can be called using the high-level client interface:
/// - `client.submitheader(...).await`
/// Or directly via the transport layer for advanced use cases:
/// - `transport::submitheader(&transport, ...).await`
///
/// Calls the `submitheader` RPC method.
pub async