msggen: add low level openchannel methods

Changelog-None
This commit is contained in:
daywalker90 2024-04-16 18:10:49 +02:00 committed by Rusty Russell
parent 70faab55e4
commit fe180e189c
13 changed files with 774 additions and 76 deletions

View File

@ -1645,6 +1645,82 @@
"Offer.single_use": 3,
"Offer.used": 5
},
"Openchannel_abortRequest": {
"OpenChannel_Abort.channel_id": 1
},
"Openchannel_abortResponse": {
"OpenChannel_Abort.channel_canceled": 2,
"OpenChannel_Abort.channel_id": 1,
"OpenChannel_Abort.reason": 3
},
"Openchannel_bumpChannel_type": {
"OpenChannel_Bump.channel_type.bits[]": 1,
"OpenChannel_Bump.channel_type.names[]": 2
},
"Openchannel_bumpRequest": {
"OpenChannel_Bump.amount": 4,
"OpenChannel_Bump.channel_id": 1,
"OpenChannel_Bump.funding_feerate": 3,
"OpenChannel_Bump.initialpsbt": 2
},
"Openchannel_bumpResponse": {
"OpenChannel_Bump.channel_id": 1,
"OpenChannel_Bump.channel_type": 2,
"OpenChannel_Bump.commitments_secured": 4,
"OpenChannel_Bump.funding_serial": 5,
"OpenChannel_Bump.psbt": 3,
"OpenChannel_Bump.requires_confirmed_inputs": 6
},
"Openchannel_initChannel_type": {
"OpenChannel_Init.channel_type.bits[]": 1,
"OpenChannel_Init.channel_type.names[]": 2
},
"Openchannel_initRequest": {
"OpenChannel_Init.amount": 10,
"OpenChannel_Init.announce": 5,
"OpenChannel_Init.channel_type[]": 9,
"OpenChannel_Init.close_to": 6,
"OpenChannel_Init.commitment_feerate": 3,
"OpenChannel_Init.compact_lease": 8,
"OpenChannel_Init.funding_feerate": 4,
"OpenChannel_Init.id": 1,
"OpenChannel_Init.initialpsbt": 2,
"OpenChannel_Init.request_amt": 7
},
"Openchannel_initResponse": {
"OpenChannel_Init.channel_id": 1,
"OpenChannel_Init.channel_type": 3,
"OpenChannel_Init.commitments_secured": 4,
"OpenChannel_Init.funding_serial": 5,
"OpenChannel_Init.psbt": 2,
"OpenChannel_Init.requires_confirmed_inputs": 6
},
"Openchannel_signedRequest": {
"OpenChannel_Signed.channel_id": 1,
"OpenChannel_Signed.signed_psbt": 2
},
"Openchannel_signedResponse": {
"OpenChannel_Signed.channel_id": 1,
"OpenChannel_Signed.tx": 2,
"OpenChannel_Signed.txid": 3
},
"Openchannel_updateChannel_type": {
"OpenChannel_Update.channel_type.bits[]": 1,
"OpenChannel_Update.channel_type.names[]": 2
},
"Openchannel_updateRequest": {
"OpenChannel_Update.channel_id": 1,
"OpenChannel_Update.psbt": 2
},
"Openchannel_updateResponse": {
"OpenChannel_Update.channel_id": 1,
"OpenChannel_Update.channel_type": 2,
"OpenChannel_Update.close_to": 6,
"OpenChannel_Update.commitments_secured": 4,
"OpenChannel_Update.funding_outnum": 5,
"OpenChannel_Update.psbt": 3,
"OpenChannel_Update.requires_confirmed_inputs": 7
},
"PayRequest": {
"Pay.amount_msat": 13,
"Pay.bolt11": 1,
@ -5888,6 +5964,206 @@
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Abort": {
"added": "pre-v0.10.1",
"deprecated": null
},
"OpenChannel_Abort.channel_canceled": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Abort.channel_id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Abort.reason": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Bump": {
"added": "pre-v0.10.1",
"deprecated": null
},
"OpenChannel_Bump.amount": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Bump.channel_id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Bump.channel_type": {
"added": "v24.02",
"deprecated": false
},
"OpenChannel_Bump.channel_type.bits[]": {
"added": "v24.02",
"deprecated": false
},
"OpenChannel_Bump.channel_type.names[]": {
"added": "v24.02",
"deprecated": false
},
"OpenChannel_Bump.commitments_secured": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Bump.funding_feerate": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Bump.funding_serial": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Bump.initialpsbt": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Bump.psbt": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Bump.requires_confirmed_inputs": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init": {
"added": "pre-v0.10.1",
"deprecated": null
},
"OpenChannel_Init.amount": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.announce": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.channel_id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.channel_type": {
"added": "v24.02",
"deprecated": false
},
"OpenChannel_Init.channel_type.bits[]": {
"added": "v24.02",
"deprecated": false
},
"OpenChannel_Init.channel_type.names[]": {
"added": "v24.02",
"deprecated": false
},
"OpenChannel_Init.channel_type[]": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.close_to": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.commitment_feerate": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.commitments_secured": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.compact_lease": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.funding_feerate": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.funding_serial": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.initialpsbt": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.psbt": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.request_amt": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Init.requires_confirmed_inputs": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Signed": {
"added": "pre-v0.10.1",
"deprecated": null
},
"OpenChannel_Signed.channel_id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Signed.signed_psbt": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Signed.tx": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Signed.txid": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Update": {
"added": "pre-v0.10.1",
"deprecated": null
},
"OpenChannel_Update.channel_id": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Update.channel_type": {
"added": "v24.02",
"deprecated": false
},
"OpenChannel_Update.channel_type.bits[]": {
"added": "v24.02",
"deprecated": false
},
"OpenChannel_Update.channel_type.names[]": {
"added": "v24.02",
"deprecated": false
},
"OpenChannel_Update.close_to": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Update.commitments_secured": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Update.funding_outnum": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Update.psbt": {
"added": "pre-v0.10.1",
"deprecated": false
},
"OpenChannel_Update.requires_confirmed_inputs": {
"added": "pre-v0.10.1",
"deprecated": false
},
"Pay": {
"added": "pre-v0.10.1",
"deprecated": null

Binary file not shown.

BIN
cln-grpc/src/convert.rs generated

Binary file not shown.

View File

@ -1690,6 +1690,166 @@ async fn offer(
}
async fn open_channel_abort(
&self,
request: tonic::Request<pb::OpenchannelAbortRequest>,
) -> Result<tonic::Response<pb::OpenchannelAbortResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::Openchannel_abortRequest = req.into();
debug!("Client asked for open_channel_abort");
trace!("open_channel_abort 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::OpenChannel_Abort(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method OpenChannel_Abort: {:?}", e)))?;
match result {
Response::OpenChannel_Abort(r) => {
trace!("open_channel_abort response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call OpenChannel_Abort",
r
)
)),
}
}
async fn open_channel_bump(
&self,
request: tonic::Request<pb::OpenchannelBumpRequest>,
) -> Result<tonic::Response<pb::OpenchannelBumpResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::Openchannel_bumpRequest = req.into();
debug!("Client asked for open_channel_bump");
trace!("open_channel_bump 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::OpenChannel_Bump(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method OpenChannel_Bump: {:?}", e)))?;
match result {
Response::OpenChannel_Bump(r) => {
trace!("open_channel_bump response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call OpenChannel_Bump",
r
)
)),
}
}
async fn open_channel_init(
&self,
request: tonic::Request<pb::OpenchannelInitRequest>,
) -> Result<tonic::Response<pb::OpenchannelInitResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::Openchannel_initRequest = req.into();
debug!("Client asked for open_channel_init");
trace!("open_channel_init 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::OpenChannel_Init(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method OpenChannel_Init: {:?}", e)))?;
match result {
Response::OpenChannel_Init(r) => {
trace!("open_channel_init response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call OpenChannel_Init",
r
)
)),
}
}
async fn open_channel_signed(
&self,
request: tonic::Request<pb::OpenchannelSignedRequest>,
) -> Result<tonic::Response<pb::OpenchannelSignedResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::Openchannel_signedRequest = req.into();
debug!("Client asked for open_channel_signed");
trace!("open_channel_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::OpenChannel_Signed(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method OpenChannel_Signed: {:?}", e)))?;
match result {
Response::OpenChannel_Signed(r) => {
trace!("open_channel_signed response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call OpenChannel_Signed",
r
)
)),
}
}
async fn open_channel_update(
&self,
request: tonic::Request<pb::OpenchannelUpdateRequest>,
) -> Result<tonic::Response<pb::OpenchannelUpdateResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::Openchannel_updateRequest = req.into();
debug!("Client asked for open_channel_update");
trace!("open_channel_update 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::OpenChannel_Update(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method OpenChannel_Update: {:?}", e)))?;
match result {
Response::OpenChannel_Update(r) => {
trace!("open_channel_update response: {:?}", r);
Ok(tonic::Response::new(r.into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call OpenChannel_Update",
r
)
)),
}
}
async fn ping(
&self,
request: tonic::Request<pb::PingRequest>,

BIN
cln-rpc/src/model.rs generated

Binary file not shown.

View File

@ -183,6 +183,9 @@ class OverridePatch(Patch):
'ListHtlcs.htlcs[].state': "HtlcState",
'FundChannel.channel_type.names[]': 'ChannelTypeName',
'MultiFundChannel.channel_ids[].channel_type.names[]': 'ChannelTypeName',
'OpenChannel_Init.channel_type.names[]': 'ChannelTypeName',
'OpenChannel_Bump.channel_type.names[]': 'ChannelTypeName',
'OpenChannel_Update.channel_type.names[]': 'ChannelTypeName',
}
def visit(self, f: model.Field) -> None:

View File

@ -23330,7 +23330,7 @@
]
},
"amount": {
"type": "sat",
"type": "msat",
"description": [
"Satoshi value that we will contribute to the channel. This value will be _added_ to the provided PSBT in the output which is encumbered by the 2-of-2 script for this channel."
]
@ -23500,7 +23500,7 @@
]
},
"amount": {
"type": "sat",
"type": "msat",
"description": [
"Satoshi value that we will contribute to the channel. This value will be _added_ to the provided PSBT in the output which is encumbered by the 2-of-2 script for this channel."
]

View File

@ -118,11 +118,11 @@ def load_jsonrpc_service():
"MultiFundChannel",
# "multiwithdraw",
"Offer",
# "openchannel_abort",
# "openchannel_bump",
# "openchannel_init",
# "openchannel_signed",
# "openchannel_update",
"OpenChannel_Abort",
"OpenChannel_Bump",
"OpenChannel_Init",
"OpenChannel_Signed",
"OpenChannel_Update",
# "parsefeerate",
"Ping",
# "plugin",

File diff suppressed because one or more lines are too long

View File

@ -274,6 +274,31 @@ class NodeStub(object):
request_serializer=node__pb2.OfferRequest.SerializeToString,
response_deserializer=node__pb2.OfferResponse.FromString,
)
self.OpenChannel_Abort = channel.unary_unary(
'/cln.Node/OpenChannel_Abort',
request_serializer=node__pb2.Openchannel_abortRequest.SerializeToString,
response_deserializer=node__pb2.Openchannel_abortResponse.FromString,
)
self.OpenChannel_Bump = channel.unary_unary(
'/cln.Node/OpenChannel_Bump',
request_serializer=node__pb2.Openchannel_bumpRequest.SerializeToString,
response_deserializer=node__pb2.Openchannel_bumpResponse.FromString,
)
self.OpenChannel_Init = channel.unary_unary(
'/cln.Node/OpenChannel_Init',
request_serializer=node__pb2.Openchannel_initRequest.SerializeToString,
response_deserializer=node__pb2.Openchannel_initResponse.FromString,
)
self.OpenChannel_Signed = channel.unary_unary(
'/cln.Node/OpenChannel_Signed',
request_serializer=node__pb2.Openchannel_signedRequest.SerializeToString,
response_deserializer=node__pb2.Openchannel_signedResponse.FromString,
)
self.OpenChannel_Update = channel.unary_unary(
'/cln.Node/OpenChannel_Update',
request_serializer=node__pb2.Openchannel_updateRequest.SerializeToString,
response_deserializer=node__pb2.Openchannel_updateResponse.FromString,
)
self.Ping = channel.unary_unary(
'/cln.Node/Ping',
request_serializer=node__pb2.PingRequest.SerializeToString,
@ -651,6 +676,36 @@ class NodeServicer(object):
context.set_details('Method not implemented!')
raise NotImplementedError('Method not implemented!')
def OpenChannel_Abort(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 OpenChannel_Bump(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 OpenChannel_Init(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 OpenChannel_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 OpenChannel_Update(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 Ping(self, request, context):
"""Missing associated documentation comment in .proto file."""
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@ -986,6 +1041,31 @@ def add_NodeServicer_to_server(servicer, server):
request_deserializer=node__pb2.OfferRequest.FromString,
response_serializer=node__pb2.OfferResponse.SerializeToString,
),
'OpenChannel_Abort': grpc.unary_unary_rpc_method_handler(
servicer.OpenChannel_Abort,
request_deserializer=node__pb2.Openchannel_abortRequest.FromString,
response_serializer=node__pb2.Openchannel_abortResponse.SerializeToString,
),
'OpenChannel_Bump': grpc.unary_unary_rpc_method_handler(
servicer.OpenChannel_Bump,
request_deserializer=node__pb2.Openchannel_bumpRequest.FromString,
response_serializer=node__pb2.Openchannel_bumpResponse.SerializeToString,
),
'OpenChannel_Init': grpc.unary_unary_rpc_method_handler(
servicer.OpenChannel_Init,
request_deserializer=node__pb2.Openchannel_initRequest.FromString,
response_serializer=node__pb2.Openchannel_initResponse.SerializeToString,
),
'OpenChannel_Signed': grpc.unary_unary_rpc_method_handler(
servicer.OpenChannel_Signed,
request_deserializer=node__pb2.Openchannel_signedRequest.FromString,
response_serializer=node__pb2.Openchannel_signedResponse.SerializeToString,
),
'OpenChannel_Update': grpc.unary_unary_rpc_method_handler(
servicer.OpenChannel_Update,
request_deserializer=node__pb2.Openchannel_updateRequest.FromString,
response_serializer=node__pb2.Openchannel_updateResponse.SerializeToString,
),
'Ping': grpc.unary_unary_rpc_method_handler(
servicer.Ping,
request_deserializer=node__pb2.PingRequest.FromString,
@ -1940,6 +2020,91 @@ class Node(object):
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def OpenChannel_Abort(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/OpenChannel_Abort',
node__pb2.Openchannel_abortRequest.SerializeToString,
node__pb2.Openchannel_abortResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def OpenChannel_Bump(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/OpenChannel_Bump',
node__pb2.Openchannel_bumpRequest.SerializeToString,
node__pb2.Openchannel_bumpResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def OpenChannel_Init(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/OpenChannel_Init',
node__pb2.Openchannel_initRequest.SerializeToString,
node__pb2.Openchannel_initResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def OpenChannel_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/OpenChannel_Signed',
node__pb2.Openchannel_signedRequest.SerializeToString,
node__pb2.Openchannel_signedResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def OpenChannel_Update(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/OpenChannel_Update',
node__pb2.Openchannel_updateRequest.SerializeToString,
node__pb2.Openchannel_updateResponse.FromString,
options, channel_credentials,
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@staticmethod
def Ping(request,
target,

View File

@ -1416,6 +1416,74 @@ def offer2py(m):
})
def openchannel_abort2py(m):
return remove_default({
"channel_canceled": m.channel_canceled, # PrimitiveField in generate_composite
"channel_id": hexlify(m.channel_id), # PrimitiveField in generate_composite
"reason": m.reason, # PrimitiveField in generate_composite
})
def openchannel_bump_channel_type2py(m):
return remove_default({
"bits": [m.bits for i in m.bits], # ArrayField[primitive] in generate_composite
"names": [str(i) for i in m.names], # ArrayField[composite] in generate_composite
})
def openchannel_bump2py(m):
return remove_default({
"channel_id": hexlify(m.channel_id), # PrimitiveField in generate_composite
"commitments_secured": m.commitments_secured, # PrimitiveField in generate_composite
"funding_serial": m.funding_serial, # PrimitiveField in generate_composite
"psbt": m.psbt, # PrimitiveField in generate_composite
"requires_confirmed_inputs": m.requires_confirmed_inputs, # PrimitiveField in generate_composite
})
def openchannel_init_channel_type2py(m):
return remove_default({
"bits": [m.bits for i in m.bits], # ArrayField[primitive] in generate_composite
"names": [str(i) for i in m.names], # ArrayField[composite] in generate_composite
})
def openchannel_init2py(m):
return remove_default({
"channel_id": hexlify(m.channel_id), # PrimitiveField in generate_composite
"commitments_secured": m.commitments_secured, # PrimitiveField in generate_composite
"funding_serial": m.funding_serial, # PrimitiveField in generate_composite
"psbt": m.psbt, # PrimitiveField in generate_composite
"requires_confirmed_inputs": m.requires_confirmed_inputs, # PrimitiveField in generate_composite
})
def openchannel_signed2py(m):
return remove_default({
"channel_id": hexlify(m.channel_id), # PrimitiveField in generate_composite
"tx": hexlify(m.tx), # PrimitiveField in generate_composite
"txid": hexlify(m.txid), # PrimitiveField in generate_composite
})
def openchannel_update_channel_type2py(m):
return remove_default({
"bits": [m.bits for i in m.bits], # ArrayField[primitive] in generate_composite
"names": [str(i) for i in m.names], # ArrayField[composite] in generate_composite
})
def openchannel_update2py(m):
return remove_default({
"channel_id": hexlify(m.channel_id), # PrimitiveField in generate_composite
"close_to": hexlify(m.close_to), # PrimitiveField in generate_composite
"commitments_secured": m.commitments_secured, # PrimitiveField in generate_composite
"funding_outnum": m.funding_outnum, # PrimitiveField in generate_composite
"psbt": m.psbt, # PrimitiveField in generate_composite
"requires_confirmed_inputs": m.requires_confirmed_inputs, # PrimitiveField in generate_composite
})
def ping2py(m):
return remove_default({
"totlen": m.totlen, # PrimitiveField in generate_composite

View File

@ -23,7 +23,7 @@
]
},
"amount": {
"type": "sat",
"type": "msat",
"description": [
"Satoshi value that we will contribute to the channel. This value will be _added_ to the provided PSBT in the output which is encumbered by the 2-of-2 script for this channel."
]

View File

@ -21,7 +21,7 @@
]
},
"amount": {
"type": "sat",
"type": "msat",
"description": [
"Satoshi value that we will contribute to the channel. This value will be _added_ to the provided PSBT in the output which is encumbered by the 2-of-2 script for this channel."
]