@@ -166,7 +166,9 @@ pub trait MiniscriptKey: Clone + Eq + Ord + fmt::Debug + fmt::Display + hash::Ha
166
166
167
167
/// Returns the number of different derivation paths in this key. Only >1 for keys
168
168
/// in BIP389 multipath descriptors.
169
- fn num_der_paths ( & self ) -> usize ;
169
+ fn num_der_paths ( & self ) -> usize {
170
+ 0
171
+ }
170
172
171
173
/// The associated [`bitcoin::hashes::sha256::Hash`] for this [`MiniscriptKey`], used in the
172
174
/// sha256 fragment.
@@ -190,10 +192,6 @@ impl MiniscriptKey for bitcoin::secp256k1::PublicKey {
190
192
type Hash256 = hash256:: Hash ;
191
193
type Ripemd160 = ripemd160:: Hash ;
192
194
type Hash160 = hash160:: Hash ;
193
-
194
- fn num_der_paths ( & self ) -> usize {
195
- 0
196
- }
197
195
}
198
196
199
197
impl MiniscriptKey for bitcoin:: PublicKey {
@@ -202,10 +200,6 @@ impl MiniscriptKey for bitcoin::PublicKey {
202
200
!self . compressed
203
201
}
204
202
205
- fn num_der_paths ( & self ) -> usize {
206
- 0
207
- }
208
-
209
203
type Sha256 = sha256:: Hash ;
210
204
type Hash256 = hash256:: Hash ;
211
205
type Ripemd160 = ripemd160:: Hash ;
@@ -221,21 +215,13 @@ impl MiniscriptKey for bitcoin::secp256k1::XOnlyPublicKey {
221
215
fn is_x_only_key ( & self ) -> bool {
222
216
true
223
217
}
224
-
225
- fn num_der_paths ( & self ) -> usize {
226
- 0
227
- }
228
218
}
229
219
230
220
impl MiniscriptKey for String {
231
221
type Sha256 = String ; // specify hashes as string
232
222
type Hash256 = String ;
233
223
type Ripemd160 = String ;
234
224
type Hash160 = String ;
235
-
236
- fn num_der_paths ( & self ) -> usize {
237
- 0
238
- }
239
225
}
240
226
241
227
/// Trait describing public key types which can be converted to bitcoin pubkeys
0 commit comments