@@ -28,16 +28,7 @@ macro_rules! impl_from_tree {
28
28
) => {
29
29
impl <Pk $( , $gen) * > $crate:: expression:: FromTree for $name
30
30
where
31
- Pk : MiniscriptKey + core:: str :: FromStr ,
32
- Pk :: Sha256 : core:: str :: FromStr ,
33
- Pk :: Hash256 : core:: str :: FromStr ,
34
- Pk :: Ripemd160 : core:: str :: FromStr ,
35
- Pk :: Hash160 : core:: str :: FromStr ,
36
- <Pk as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
37
- <<Pk as MiniscriptKey >:: Sha256 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
38
- <<Pk as MiniscriptKey >:: Hash256 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
39
- <<Pk as MiniscriptKey >:: Ripemd160 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
40
- <<Pk as MiniscriptKey >:: Hash160 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
31
+ Pk : $crate:: FromStrKey ,
41
32
$( $gen : $gen_con, ) *
42
33
{
43
34
@@ -60,16 +51,7 @@ macro_rules! impl_from_str {
60
51
) => {
61
52
impl <Pk $( , $gen) * > core:: str :: FromStr for $name
62
53
where
63
- Pk : MiniscriptKey + core:: str :: FromStr ,
64
- Pk :: Sha256 : core:: str :: FromStr ,
65
- Pk :: Hash256 : core:: str :: FromStr ,
66
- Pk :: Ripemd160 : core:: str :: FromStr ,
67
- Pk :: Hash160 : core:: str :: FromStr ,
68
- <Pk as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
69
- <<Pk as MiniscriptKey >:: Sha256 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
70
- <<Pk as MiniscriptKey >:: Hash256 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
71
- <<Pk as MiniscriptKey >:: Ripemd160 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
72
- <<Pk as MiniscriptKey >:: Hash160 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
54
+ Pk : $crate:: FromStrKey ,
73
55
$( $gen : $gen_con, ) *
74
56
{
75
57
type Err = $err_ty;
@@ -92,16 +74,7 @@ macro_rules! impl_block_str {
92
74
) => {
93
75
impl <Pk $( , $gen) * > $name
94
76
where
95
- Pk : MiniscriptKey + core:: str :: FromStr ,
96
- Pk :: Sha256 : core:: str :: FromStr ,
97
- Pk :: Hash256 : core:: str :: FromStr ,
98
- Pk :: Ripemd160 : core:: str :: FromStr ,
99
- Pk :: Hash160 : core:: str :: FromStr ,
100
- <Pk as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
101
- <<Pk as MiniscriptKey >:: Sha256 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
102
- <<Pk as MiniscriptKey >:: Hash256 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
103
- <<Pk as MiniscriptKey >:: Ripemd160 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
104
- <<Pk as MiniscriptKey >:: Hash160 as core:: str :: FromStr >:: Err : $crate:: prelude:: ToString ,
77
+ Pk : $crate:: FromStrKey ,
105
78
$( $gen : $gen_con, ) *
106
79
{
107
80
$( #[ $meta] ) *
@@ -119,20 +92,7 @@ macro_rules! serde_string_impl_pk {
119
92
#[ cfg( feature = "serde" ) ]
120
93
impl <' de, Pk $( , $gen) * > $crate:: serde:: Deserialize <' de> for $name<Pk $( , $gen) * >
121
94
where
122
- Pk : $crate:: MiniscriptKey + core:: str :: FromStr ,
123
- Pk :: Sha256 : core:: str :: FromStr ,
124
- Pk :: Hash256 : core:: str :: FromStr ,
125
- Pk :: Ripemd160 : core:: str :: FromStr ,
126
- Pk :: Hash160 : core:: str :: FromStr ,
127
- <Pk as core:: str :: FromStr >:: Err : core:: fmt:: Display ,
128
- <<Pk as $crate:: MiniscriptKey >:: Sha256 as core:: str :: FromStr >:: Err :
129
- core:: fmt:: Display ,
130
- <<Pk as $crate:: MiniscriptKey >:: Hash256 as core:: str :: FromStr >:: Err :
131
- core:: fmt:: Display ,
132
- <<Pk as $crate:: MiniscriptKey >:: Ripemd160 as core:: str :: FromStr >:: Err :
133
- core:: fmt:: Display ,
134
- <<Pk as $crate:: MiniscriptKey >:: Hash160 as core:: str :: FromStr >:: Err :
135
- core:: fmt:: Display ,
95
+ Pk : $crate:: FromStrKey ,
136
96
$( $gen : $gen_con, ) *
137
97
{
138
98
fn deserialize<D >( deserializer: D ) -> Result <$name<Pk $( , $gen) * >, D :: Error >
@@ -147,20 +107,7 @@ macro_rules! serde_string_impl_pk {
147
107
struct Visitor <Pk $( , $gen) * >( PhantomData <( Pk $( , $gen) * ) >) ;
148
108
impl <' de, Pk $( , $gen) * > $crate:: serde:: de:: Visitor <' de> for Visitor <Pk $( , $gen) * >
149
109
where
150
- Pk : $crate:: MiniscriptKey + core:: str :: FromStr ,
151
- Pk :: Sha256 : core:: str :: FromStr ,
152
- Pk :: Hash256 : core:: str :: FromStr ,
153
- Pk :: Ripemd160 : core:: str :: FromStr ,
154
- Pk :: Hash160 : core:: str :: FromStr ,
155
- <Pk as core:: str :: FromStr >:: Err : core:: fmt:: Display ,
156
- <<Pk as $crate:: MiniscriptKey >:: Sha256 as core:: str :: FromStr >:: Err :
157
- core:: fmt:: Display ,
158
- <<Pk as $crate:: MiniscriptKey >:: Hash256 as core:: str :: FromStr >:: Err :
159
- core:: fmt:: Display ,
160
- <<Pk as $crate:: MiniscriptKey >:: Ripemd160 as core:: str :: FromStr >:: Err :
161
- core:: fmt:: Display ,
162
- <<Pk as $crate:: MiniscriptKey >:: Hash160 as core:: str :: FromStr >:: Err :
163
- core:: fmt:: Display ,
110
+ Pk : $crate:: FromStrKey ,
164
111
$( $gen: $gen_con, ) *
165
112
{
166
113
type Value = $name<Pk $( , $gen) * >;
0 commit comments