@@ -15,15 +15,15 @@ pub(crate) const LSPS0_LISTPROTOCOLS_METHOD_NAME: &str = "lsps0.list_protocols";
15
15
/// specification](https://github.com/lightning/blips/blob/master/blip-0050.md#lsps-specification-support-query)
16
16
/// for more information.
17
17
#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize , Default ) ]
18
- pub struct ListProtocolsRequest { }
18
+ pub struct LSPS0ListProtocolsRequest { }
19
19
20
20
/// A response to a `list_protocols` request.
21
21
///
22
22
/// Please refer to the [bLIP-50 / LSPS0
23
23
/// specification](https://github.com/lightning/blips/blob/master/blip-0050.md#lsps-specification-support-query)
24
24
/// for more information.
25
25
#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
26
- pub struct ListProtocolsResponse {
26
+ pub struct LSPS0ListProtocolsResponse {
27
27
/// A list of supported protocols.
28
28
pub protocols : Vec < u16 > ,
29
29
}
@@ -36,7 +36,7 @@ pub struct ListProtocolsResponse {
36
36
#[ derive( Clone , Debug , PartialEq , Eq ) ]
37
37
pub enum LSPS0Request {
38
38
/// A request calling `list_protocols`.
39
- ListProtocols ( ListProtocolsRequest ) ,
39
+ ListProtocols ( LSPS0ListProtocolsRequest ) ,
40
40
}
41
41
42
42
impl LSPS0Request {
@@ -56,7 +56,7 @@ impl LSPS0Request {
56
56
#[ derive( Clone , Debug , PartialEq , Eq ) ]
57
57
pub enum LSPS0Response {
58
58
/// A response to a `list_protocols` request.
59
- ListProtocols ( ListProtocolsResponse ) ,
59
+ ListProtocols ( LSPS0ListProtocolsResponse ) ,
60
60
/// An error response to a `list_protocols` request.
61
61
ListProtocolsError ( ResponseError ) ,
62
62
}
@@ -118,7 +118,7 @@ mod tests {
118
118
msg,
119
119
LSPSMessage :: LSPS0 ( LSPS0Message :: Request (
120
120
RequestId ( "request:id:xyz123" . to_string( ) ) ,
121
- LSPS0Request :: ListProtocols ( ListProtocolsRequest { } )
121
+ LSPS0Request :: ListProtocols ( LSPS0ListProtocolsRequest { } )
122
122
) )
123
123
) ;
124
124
}
@@ -127,7 +127,7 @@ mod tests {
127
127
fn serializes_request ( ) {
128
128
let request = LSPSMessage :: LSPS0 ( LSPS0Message :: Request (
129
129
RequestId ( "request:id:xyz123" . to_string ( ) ) ,
130
- LSPS0Request :: ListProtocols ( ListProtocolsRequest { } ) ,
130
+ LSPS0Request :: ListProtocols ( LSPS0ListProtocolsRequest { } ) ,
131
131
) ) ;
132
132
let json = serde_json:: to_string ( & request) . unwrap ( ) ;
133
133
assert_eq ! (
@@ -156,7 +156,9 @@ mod tests {
156
156
response,
157
157
LSPSMessage :: LSPS0 ( LSPS0Message :: Response (
158
158
RequestId ( "request:id:xyz123" . to_string( ) ) ,
159
- LSPS0Response :: ListProtocols ( ListProtocolsResponse { protocols: vec![ 1 , 2 , 3 ] } )
159
+ LSPS0Response :: ListProtocols ( LSPS0ListProtocolsResponse {
160
+ protocols: vec![ 1 , 2 , 3 ]
161
+ } )
160
162
) )
161
163
) ;
162
164
}
@@ -212,7 +214,7 @@ mod tests {
212
214
fn serializes_response ( ) {
213
215
let response = LSPSMessage :: LSPS0 ( LSPS0Message :: Response (
214
216
RequestId ( "request:id:xyz123" . to_string ( ) ) ,
215
- LSPS0Response :: ListProtocols ( ListProtocolsResponse { protocols : vec ! [ 1 , 2 , 3 ] } ) ,
217
+ LSPS0Response :: ListProtocols ( LSPS0ListProtocolsResponse { protocols : vec ! [ 1 , 2 , 3 ] } ) ,
216
218
) ) ;
217
219
let json = serde_json:: to_string ( & response) . unwrap ( ) ;
218
220
assert_eq ! (
0 commit comments