@@ -18,7 +18,6 @@ use bitcoin::secp256k1::Secp256k1;
1818use  bitcoin:: secp256k1; 
1919use  crate :: ln:: msgs:: DecodeError ; 
2020use  crate :: util:: ser:: Readable ; 
21- use  bitcoin:: secp256k1:: constants:: PUBLIC_KEY_SIZE ; 
2221use  crate :: io; 
2322use  crate :: util:: ser:: Writer ; 
2423use  crate :: util:: ser:: Writeable ; 
@@ -80,10 +79,6 @@ macro_rules! key_read_write {
8079            fn  write<W :  Writer >( & self ,  w:  & mut  W )  -> Result <( ) ,  io:: Error > { 
8180                self . 0 . serialize( ) . write( w) 
8281            } 
83-         
84-             fn  serialized_length( & self )  -> usize  { 
85-                 PUBLIC_KEY_SIZE 
86-             } 
8782        } 
8883
8984        impl  Readable  for  $SelfT { 
@@ -99,14 +94,14 @@ macro_rules! key_read_write {
9994
10095/// Used to generate [`local_delayedpubkey`](https://github.com/lightning/bolts/blob/master/03-transactions.md#key-derivation) for the latest state of a channel. 
10196#[ derive( PartialEq ,  Eq ,  Clone ,  Copy ,  Debug ,  Hash ) ]  
102- pub  struct  DelayedPaymentBasepoint ( PublicKey ) ; 
97+ pub  struct  DelayedPaymentBasepoint ( pub   PublicKey ) ; 
10398basepoint_impl ! ( DelayedPaymentBasepoint ) ; 
10499key_read_write ! ( DelayedPaymentBasepoint ) ; 
105100
106101/// [delayedpubkey](https://github.com/lightning/bolts/blob/master/03-transactions.md#localpubkey-local_htlcpubkey-remote_htlcpubkey-local_delayedpubkey-and-remote_delayedpubkey-derivation) 
107102/// Used to regenerate the scripts required for a penalty transaction or a spend from a force closed channel. 
108103#[ derive( PartialEq ,  Eq ,  Clone ,  Copy ,  Debug ) ]  
109- pub  struct  DelayedPaymentKey ( PublicKey ) ; 
104+ pub  struct  DelayedPaymentKey ( pub   PublicKey ) ; 
110105
111106impl  DelayedPaymentKey  { 
112107    key_impl ! ( DelayedPaymentBasepoint ,  "delayedpubkey" ) ; 
@@ -115,15 +110,15 @@ key_read_write!(DelayedPaymentKey);
115110
116111/// Used to generate [localpubkey](https://github.com/lightning/bolts/blob/master/03-transactions.md#key-derivation) for the latest state of a channel. 
117112#[ derive( PartialEq ,  Eq ,  Clone ,  Copy ,  Debug ,  Hash ) ]  
118- pub  struct  PaymentBasepoint ( PublicKey ) ; 
113+ pub  struct  PaymentBasepoint ( pub   PublicKey ) ; 
119114basepoint_impl ! ( PaymentBasepoint ) ; 
120115key_read_write ! ( PaymentBasepoint ) ; 
121116
122117
123118/// [localpubkey](https://github.com/lightning/bolts/blob/master/03-transactions.md#localpubkey-local_htlcpubkey-remote_htlcpubkey-local_delayedpubkey-and-remote_delayedpubkey-derivation) 
124119/// Used to generate commitment transaction's to_remote ouput. 
125120#[ derive( PartialEq ,  Eq ,  Clone ,  Copy ,  Debug ) ]  
126- pub  struct  PaymentKey ( PublicKey ) ; 
121+ pub  struct  PaymentKey ( pub   PublicKey ) ; 
127122
128123impl  PaymentKey  { 
129124    key_impl ! ( PaymentBasepoint ,  "localpubkey" ) ; 
@@ -132,15 +127,15 @@ key_read_write!(PaymentKey);
132127
133128/// Used to generate [htlcpubkey](https://github.com/lightning/bolts/blob/master/03-transactions.md#key-derivation) for the latest state of a channel. 
134129#[ derive( PartialEq ,  Eq ,  Clone ,  Copy ,  Debug ,  Hash ) ]  
135- pub  struct  HtlcBasepoint ( PublicKey ) ; 
130+ pub  struct  HtlcBasepoint ( pub   PublicKey ) ; 
136131basepoint_impl ! ( HtlcBasepoint ) ; 
137132key_read_write ! ( HtlcBasepoint ) ; 
138133
139134
140135/// [htlcpubkey](https://github.com/lightning/bolts/blob/master/03-transactions.md#localpubkey-local_htlcpubkey-remote_htlcpubkey-local_delayedpubkey-and-remote_delayedpubkey-derivation) 
141136/// Used to generate HTLC outputs. 
142137#[ derive( PartialEq ,  Eq ,  Clone ,  Copy ,  Debug ) ]  
143- pub  struct  HtlcKey ( PublicKey ) ; 
138+ pub  struct  HtlcKey ( pub   PublicKey ) ; 
144139
145140impl  HtlcKey  { 
146141    key_impl ! ( HtlcBasepoint ,  "htlcpubkey" ) ; 
@@ -164,15 +159,15 @@ fn derive_public_key<T: secp256k1::Signing>(secp_ctx: &Secp256k1<T>, per_commitm
164159
165160/// Used to generate [htlcpubkey](https://github.com/lightning/bolts/blob/master/03-transactions.md#key-derivation) for the latest state of a channel. 
166161#[ derive( PartialEq ,  Eq ,  Clone ,  Copy ,  Debug ,  Hash ) ]  
167- pub  struct  RevocationBasepoint ( PublicKey ) ; 
162+ pub  struct  RevocationBasepoint ( pub   PublicKey ) ; 
168163basepoint_impl ! ( RevocationBasepoint ) ; 
169164key_read_write ! ( RevocationBasepoint ) ; 
170165
171166
172167/// [htlcpubkey](https://github.com/lightning/bolts/blob/master/03-transactions.md#localpubkey-local_htlcpubkey-remote_htlcpubkey-local_delayedpubkey-and-remote_delayedpubkey-derivation) 
173168/// Used to generate HTLC outputs. 
174169#[ derive( PartialEq ,  Eq ,  Clone ,  Copy ,  Debug ,  Hash ) ]  
175- pub  struct  RevocationKey ( PublicKey ) ; 
170+ pub  struct  RevocationKey ( pub   PublicKey ) ; 
176171
177172impl  RevocationKey  { 
178173    /// Derives a per-commitment-transaction revocation public key from its constituent parts. This is 
0 commit comments