@@ -34,10 +34,10 @@ pub type BitcoinAddress = String;
34
34
/// Block Hash.
35
35
pub type BlockHash = Vec < u8 > ;
36
36
37
- /// Element in the Response of [bitcoin_get_current_fee_percentiles](super::bitcoin_get_current_fee_percentiles).
37
+ /// Element in the Response of [` bitcoin_get_current_fee_percentiles` ](super::bitcoin_get_current_fee_percentiles).
38
38
pub type MillisatoshiPerByte = u64 ;
39
39
40
- /// Identifier of [Utxo].
40
+ /// Identifier of [` Utxo` ].
41
41
#[ derive(
42
42
CandidType , Serialize , Deserialize , Debug , PartialEq , Eq , PartialOrd , Ord , Hash , Clone , Default ,
43
43
) ]
@@ -53,7 +53,7 @@ pub struct Outpoint {
53
53
CandidType , Serialize , Deserialize , Debug , PartialEq , Eq , PartialOrd , Ord , Hash , Clone , Default ,
54
54
) ]
55
55
pub struct Utxo {
56
- /// See [Outpoint].
56
+ /// See [` Outpoint` ].
57
57
pub outpoint : Outpoint ,
58
58
/// Value in the units of satoshi.
59
59
pub value : Satoshi ,
@@ -72,38 +72,38 @@ pub enum UtxoFilter {
72
72
/// Page reference.
73
73
///
74
74
/// DON'T construct it from scratch.
75
- /// Only get it from the `next_page` field of [GetUtxosResponse].
75
+ /// Only get it from the `next_page` field of [` GetUtxosResponse` ].
76
76
#[ serde( rename = "page" ) ]
77
77
Page ( Vec < u8 > ) ,
78
78
}
79
79
80
- /// Argument type of [bitcoin_get_balance](super::bitcoin_get_balance).
80
+ /// Argument type of [` bitcoin_get_balance` ](super::bitcoin_get_balance).
81
81
#[ derive(
82
82
CandidType , Serialize , Deserialize , Debug , PartialEq , Eq , PartialOrd , Ord , Hash , Clone , Default ,
83
83
) ]
84
84
pub struct GetBalanceRequest {
85
- /// See [BitcoinAddress].
85
+ /// See [` BitcoinAddress` ].
86
86
pub address : BitcoinAddress ,
87
- /// See [BitcoinNetwork].
87
+ /// See [` BitcoinNetwork` ].
88
88
pub network : BitcoinNetwork ,
89
89
/// Minimum number of confirmations. There is an upper bound of 144. Typically set to a value around 6 in practice.
90
90
pub min_confirmations : Option < u32 > ,
91
91
}
92
92
93
- /// Argument type of [bitcoin_get_utxos](super::bitcoin_get_utxos).
93
+ /// Argument type of [` bitcoin_get_utxos` ](super::bitcoin_get_utxos).
94
94
#[ derive(
95
95
CandidType , Serialize , Deserialize , Debug , PartialEq , Eq , PartialOrd , Ord , Hash , Clone , Default ,
96
96
) ]
97
97
pub struct GetUtxosRequest {
98
- /// See [BitcoinAddress].
98
+ /// See [` BitcoinAddress` ].
99
99
pub address : BitcoinAddress ,
100
- /// See [BitcoinNetwork].
100
+ /// See [` BitcoinNetwork` ].
101
101
pub network : BitcoinNetwork ,
102
- /// See [UtxoFilter].
102
+ /// See [` UtxoFilter` ].
103
103
pub filter : Option < UtxoFilter > ,
104
104
}
105
105
106
- /// Response type of [bitcoin_get_utxos](super::bitcoin_get_utxos).
106
+ /// Response type of [` bitcoin_get_utxos` ](super::bitcoin_get_utxos).
107
107
#[ derive(
108
108
CandidType , Serialize , Deserialize , Debug , PartialEq , Eq , PartialOrd , Ord , Hash , Clone , Default ,
109
109
) ]
@@ -116,11 +116,11 @@ pub struct GetUtxosResponse {
116
116
pub tip_height : u32 ,
117
117
/// Page reference when the response needs to be paginated.
118
118
///
119
- /// To be used in [UtxoFilter::Page].
119
+ /// To be used in [` UtxoFilter::Page` ].
120
120
pub next_page : Option < Vec < u8 > > ,
121
121
}
122
122
123
- /// Argument type of [bitcoin_send_transaction](super::bitcoin_send_transaction).
123
+ /// Argument type of [` bitcoin_send_transaction` ](super::bitcoin_send_transaction).
124
124
#[ derive(
125
125
CandidType , Serialize , Deserialize , Debug , PartialEq , Eq , PartialOrd , Ord , Hash , Clone , Default ,
126
126
) ]
@@ -130,11 +130,11 @@ pub struct SendTransactionRequest {
130
130
/// Several checks are performed.
131
131
/// See [IC method `bitcoin_send_transaction`](https://internetcomputer.org/docs/current/references/ic-interface-spec/#ic-bitcoin_send_transaction).
132
132
pub transaction : Vec < u8 > ,
133
- /// See [BitcoinNetwork].
133
+ /// See [` BitcoinNetwork` ].
134
134
pub network : BitcoinNetwork ,
135
135
}
136
136
137
- /// Argument type of [bitcoin_get_current_fee_percentiles](super::bitcoin_get_current_fee_percentiles).
137
+ /// Argument type of [` bitcoin_get_current_fee_percentiles` ](super::bitcoin_get_current_fee_percentiles).
138
138
#[ derive(
139
139
CandidType ,
140
140
Serialize ,
@@ -150,6 +150,41 @@ pub struct SendTransactionRequest {
150
150
Default ,
151
151
) ]
152
152
pub struct GetCurrentFeePercentilesRequest {
153
- /// See [BitcoinNetwork].
153
+ /// See [` BitcoinNetwork` ].
154
154
pub network : BitcoinNetwork ,
155
155
}
156
+
157
+ /// Argument type of [`bitcoin_get_block_headers`](super::bitcoin_get_block_headers).
158
+ #[ derive(
159
+ CandidType ,
160
+ Serialize ,
161
+ Deserialize ,
162
+ Debug ,
163
+ PartialEq ,
164
+ Eq ,
165
+ PartialOrd ,
166
+ Ord ,
167
+ Hash ,
168
+ Clone ,
169
+ Copy ,
170
+ Default ,
171
+ ) ]
172
+ pub struct GetBlockHeadersRequest {
173
+ /// The starting block height for the request.
174
+ pub start_height : u32 ,
175
+ /// The ending block height for the request, or `None` for the current tip.
176
+ pub end_height : Option < u32 > ,
177
+ /// See [`BitcoinNetwork`].
178
+ pub network : BitcoinNetwork ,
179
+ }
180
+
181
+ /// Response type of [`bitcoin_get_block_headers`](super::bitcoin_get_block_headers).
182
+ #[ derive(
183
+ CandidType , Serialize , Deserialize , Debug , PartialEq , Eq , PartialOrd , Ord , Hash , Clone , Default ,
184
+ ) ]
185
+ pub struct GetBlockHeadersResponse {
186
+ /// The tip of the blockchain when this request was filled.
187
+ pub tip_height : u32 ,
188
+ /// The requested block headers.
189
+ pub block_headers : Vec < Vec < u8 > > ,
190
+ }
0 commit comments