mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
msggen: add splice_signed method
This commit is contained in:
parent
9f9b59d45b
commit
04a2ad6f8b
33
.msggen.json
33
.msggen.json
@ -2372,6 +2372,15 @@
|
||||
"Splice_initResponse": {
|
||||
"Splice_Init.psbt": 1
|
||||
},
|
||||
"Splice_signedRequest": {
|
||||
"Splice_Signed.channel_id": 1,
|
||||
"Splice_Signed.psbt": 2,
|
||||
"Splice_Signed.sign_first": 3
|
||||
},
|
||||
"Splice_signedResponse": {
|
||||
"Splice_Signed.tx": 1,
|
||||
"Splice_Signed.txid": 2
|
||||
},
|
||||
"StaticbackupResponse": {
|
||||
"StaticBackup.scb[]": 1
|
||||
},
|
||||
@ -8262,6 +8271,30 @@
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Splice_Signed": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": null
|
||||
},
|
||||
"Splice_Signed.channel_id": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Splice_Signed.psbt": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Splice_Signed.sign_first": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Splice_Signed.tx": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"Splice_Signed.txid": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"StaticBackup": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": null
|
||||
|
BIN
cln-grpc/proto/node.proto
generated
BIN
cln-grpc/proto/node.proto
generated
Binary file not shown.
BIN
cln-grpc/src/convert.rs
generated
BIN
cln-grpc/src/convert.rs
generated
Binary file not shown.
@ -2490,6 +2490,38 @@ async fn splice_init(
|
||||
|
||||
}
|
||||
|
||||
async fn splice_signed(
|
||||
&self,
|
||||
request: tonic::Request<pb::SpliceSignedRequest>,
|
||||
) -> Result<tonic::Response<pb::SpliceSignedResponse>, tonic::Status> {
|
||||
let req = request.into_inner();
|
||||
let req: requests::Splice_signedRequest = req.into();
|
||||
debug!("Client asked for splice_signed");
|
||||
trace!("splice_signed request: {:?}", req);
|
||||
let mut rpc = ClnRpc::new(&self.rpc_path)
|
||||
.await
|
||||
.map_err(|e| Status::new(Code::Internal, e.to_string()))?;
|
||||
let result = rpc.call(Request::Splice_Signed(req))
|
||||
.await
|
||||
.map_err(|e| Status::new(
|
||||
Code::Unknown,
|
||||
format!("Error calling method Splice_Signed: {:?}", e)))?;
|
||||
match result {
|
||||
Response::Splice_Signed(r) => {
|
||||
trace!("splice_signed response: {:?}", r);
|
||||
Ok(tonic::Response::new(r.into()))
|
||||
},
|
||||
r => Err(Status::new(
|
||||
Code::Internal,
|
||||
format!(
|
||||
"Unexpected result {:?} to method call Splice_Signed",
|
||||
r
|
||||
)
|
||||
)),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async fn unreserve_inputs(
|
||||
&self,
|
||||
request: tonic::Request<pb::UnreserveinputsRequest>,
|
||||
|
BIN
cln-rpc/src/model.rs
generated
BIN
cln-rpc/src/model.rs
generated
Binary file not shown.
@ -139,6 +139,7 @@ def load_jsonrpc_service():
|
||||
"SignInvoice",
|
||||
"SignMessage",
|
||||
"Splice_Init",
|
||||
"Splice_Signed",
|
||||
"UnreserveInputs",
|
||||
"WaitBlockHeight",
|
||||
"Wait",
|
||||
|
File diff suppressed because one or more lines are too long
@ -399,6 +399,11 @@ class NodeStub(object):
|
||||
request_serializer=node__pb2.Splice_initRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.Splice_initResponse.FromString,
|
||||
)
|
||||
self.Splice_Signed = channel.unary_unary(
|
||||
'/cln.Node/Splice_Signed',
|
||||
request_serializer=node__pb2.Splice_signedRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.Splice_signedResponse.FromString,
|
||||
)
|
||||
self.UnreserveInputs = channel.unary_unary(
|
||||
'/cln.Node/UnreserveInputs',
|
||||
request_serializer=node__pb2.UnreserveinputsRequest.SerializeToString,
|
||||
@ -931,6 +936,12 @@ class NodeServicer(object):
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def Splice_Signed(self, request, context):
|
||||
"""Missing associated documentation comment in .proto file."""
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def UnreserveInputs(self, request, context):
|
||||
"""Missing associated documentation comment in .proto file."""
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
@ -1397,6 +1408,11 @@ def add_NodeServicer_to_server(servicer, server):
|
||||
request_deserializer=node__pb2.Splice_initRequest.FromString,
|
||||
response_serializer=node__pb2.Splice_initResponse.SerializeToString,
|
||||
),
|
||||
'Splice_Signed': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.Splice_Signed,
|
||||
request_deserializer=node__pb2.Splice_signedRequest.FromString,
|
||||
response_serializer=node__pb2.Splice_signedResponse.SerializeToString,
|
||||
),
|
||||
'UnreserveInputs': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.UnreserveInputs,
|
||||
request_deserializer=node__pb2.UnreserveinputsRequest.FromString,
|
||||
@ -2781,6 +2797,23 @@ class Node(object):
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def Splice_Signed(request,
|
||||
target,
|
||||
options=(),
|
||||
channel_credentials=None,
|
||||
call_credentials=None,
|
||||
insecure=False,
|
||||
compression=None,
|
||||
wait_for_ready=None,
|
||||
timeout=None,
|
||||
metadata=None):
|
||||
return grpc.experimental.unary_unary(request, target, '/cln.Node/Splice_Signed',
|
||||
node__pb2.Splice_signedRequest.SerializeToString,
|
||||
node__pb2.Splice_signedResponse.FromString,
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def UnreserveInputs(request,
|
||||
target,
|
||||
|
@ -1831,6 +1831,13 @@ def splice_init2py(m):
|
||||
})
|
||||
|
||||
|
||||
def splice_signed2py(m):
|
||||
return remove_default({
|
||||
"tx": hexlify(m.tx), # PrimitiveField in generate_composite
|
||||
"txid": hexlify(m.txid), # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def unreserveinputs_reservations2py(m):
|
||||
return remove_default({
|
||||
"reserved": m.reserved, # PrimitiveField in generate_composite
|
||||
|
Loading…
Reference in New Issue
Block a user