schemas: make required fields match the code
What changed, and why it matters
This commit is a large cleanup of Core Lightning's API schemas, generated RPC bindings, and related plugin code. The stated goal is to make the documented 'required' fields match what the C code actually always produces or expects. In practice it mostly removes 'optional' markers from fields that were already unconditionally emitted, and makes a few truly conditional fields optional. It also changes one plugin hook response schema so that a plugin can reject a payment by returning only a custom failure_message, without a result field. The changes are broad but are described by the project as a schema consistency fix, not a security fix. There is no direct evidence in the commit of an exploitable vulnerability.
Treat this as a routine API/schema consistency update. Reviewers should verify that each newly-required field is indeed unconditionally present in the referenced C source, and that clients using the gRPC/JSON-RPC bindings can handle the new required fields. Pay particular attention to the invoice_payment hook schema change to ensure the new conditional logic (result absent => failure_message required) is handled correctly by both Core Lightning and plugin implementations. No emergency action is indicated by the commit itself.
Security signals we found
Large schema-only change with no accompanying security advisory or CVE
One semantic change to plugin hook response: invoice_payment hook can now reject with only failure_message and no result
Many fields change from optional to required in public RPC/protobuf interfaces
A few fields change from required to optional where code makes them conditional
No changes to cryptographic operations, authentication, authorization, or network parsing visible in the diff
Evidence from the diff
The patch synchronizes JSON schemas, protobuf definitions, and Rust model code with the actual implementation. Many response fields become required (e.g., listpeers.features, listchannels.htlc_maximum_msat, pay.destination, datastore.generation/hex, splice responses). A few request/response fields become optional where the code makes them conditional (e.g., invoicerequest.description, createinvoice.description, splice_signed channel_id, bkpr-editdescriptionbypaymentid description). The invoice_payment hook response schema is restructured: result is no longer required, and if result is absent then failure_message is required, allowing custom BOLT4 failure messages without a result field. The commit updates generated/derived code (cln-grpc proto, cln-rpc model.rs/hooks.rs, msggen schema, plugins) and tests accordingly. No runtime logic changes that would obviously introduce a security flaw are visible in the diff.
Changed components
doc/schemas/*.jsoncln-grpc/proto/node.protocln-rpc/src/model.rscln-rpc/src/hooks.rscln-rpc/src/test.rscontrib/msggen/msggen/schema.jsoncontrib/pyln-grpc-proto/pyln/grpc/node_pb2.pyplugins/lsps-plugin/src/client.rsplugins/wss-proxy-plugin/src/options.rsInspect captured patch +1786 / −1739
### cln-grpc/proto/node.proto
@@ -271,7 +271,7 @@ message ListpeersPeers {
bool connected = 2;
repeated ListpeersPeersLog log = 3;
repeated string netaddr = 5;
- optional bytes features = 6;
+ bytes features = 6;
optional string remote_addr = 7;
uint32 num_channels = 8;
}
@@ -359,7 +359,7 @@ message SendpayResponse {
COMPLETE = 1;
}
uint64 id = 1;
- optional uint64 groupid = 2;
+ uint64 groupid = 2;
bytes payment_hash = 3;
SendpayStatus status = 4;
optional Amount amount_msat = 5;
@@ -412,7 +412,7 @@ message ListchannelsChannels {
uint32 fee_per_millionth = 11;
uint32 delay = 12;
Amount htlc_minimum_msat = 13;
- optional Amount htlc_maximum_msat = 14;
+ Amount htlc_maximum_msat = 14;
bytes features = 15;
uint32 direction = 16;
}
@@ -636,7 +636,7 @@ message CreateinvoiceResponse {
bytes payment_hash = 4;
optional Amount amount_msat = 5;
CreateinvoiceStatus status = 6;
- string description = 7;
+ optional string description = 7;
uint64 expires_at = 8;
optional uint64 pay_index = 9;
optional Amount amount_received_msat = 10;
@@ -670,8 +670,8 @@ message DatastoreRequest {
}
message DatastoreResponse {
- optional uint64 generation = 2;
- optional bytes hex = 3;
+ uint64 generation = 2;
+ bytes hex = 3;
optional string string = 4;
repeated string key = 5;
}
@@ -712,8 +712,8 @@ message DeldatastoreRequest {
}
message DeldatastoreResponse {
- optional uint64 generation = 2;
- optional bytes hex = 3;
+ uint64 generation = 2;
+ bytes hex = 3;
optional string string = 4;
repeated string key = 5;
}
@@ -842,7 +842,7 @@ message InvoiceResponse {
message InvoicerequestRequest {
Amount amount = 1;
- string description = 2;
+ optional string description = 2;
optional string issuer = 3;
optional string label = 4;
optional uint64 absolute_expiry = 5;
@@ -1113,7 +1113,7 @@ message PayResponse {
FAILED = 2 [deprecated = true];
}
bytes payment_preimage = 1 [deprecated = true];
- optional bytes destination = 2 [deprecated = true];
+ bytes destination = 2 [deprecated = true];
bytes payment_hash = 3 [deprecated = true];
double created_at = 4 [deprecated = true];
uint32 parts = 5 [deprecated = true];
@@ -1242,7 +1242,7 @@ message WaitsendpayResponse {
COMPLETE = 0;
}
uint64 id = 1;
- optional uint64 groupid = 2;
+ uint64 groupid = 2;
bytes payment_hash = 3;
WaitsendpayStatus status = 4;
optional Amount amount_msat = 5;
@@ -1443,7 +1443,7 @@ message ListpeerchannelsChannels {
bool peer_connected = 2;
ChannelState state = 3;
optional bytes scratch_txid = 4;
- optional ListpeerchannelsChannelsChannelType channel_type = 5;
+ ListpeerchannelsChannelsChannelType channel_type = 5;
optional ListpeerchannelsChannelsFeerate feerate = 6;
optional string owner = 7;
optional string short_channel_id = 8;
@@ -1616,7 +1616,7 @@ message ListclosedchannelsClosedchannels {
ChannelSide opener = 5;
optional ChannelSide closer = 6;
bool private = 7;
- optional ListclosedchannelsClosedchannelsChannelType channel_type = 8;
+ ListclosedchannelsClosedchannelsChannelType channel_type = 8;
uint64 total_local_commitments = 9;
uint64 total_remote_commitments = 10;
uint64 total_htlcs_sent = 11;
@@ -1919,7 +1919,7 @@ message DelpayPayments {
uint64 created_at = 9;
optional uint64 updated_index = 10;
optional uint64 completed_at = 11;
- optional uint64 groupid = 12;
+ uint64 groupid = 12;
optional bytes payment_preimage = 13;
optional string label = 14;
optional string bolt11 = 15;
@@ -2002,7 +2002,7 @@ message FeeratesOnchainFeeEstimates {
uint64 unilateral_close_satoshis = 3;
uint64 htlc_timeout_satoshis = 4;
uint64 htlc_success_satoshis = 5;
- optional uint64 unilateral_close_nonanchor_satoshis = 6;
+ uint64 unilateral_close_nonanchor_satoshis = 6;
}
message FeeratesPerkb {
@@ -2173,7 +2173,7 @@ message FundchannelStartRequest {
message FundchannelStartResponse {
string funding_address = 1;
bytes scriptpubkey = 2;
- optional FundchannelStartChannelType channel_type = 3;
+ FundchannelStartChannelType channel_type = 3;
optional bytes close_to = 4;
string warning_usage = 5;
optional uint32 mindepth = 6;
@@ -2434,7 +2434,7 @@ message ListpaysPays {
optional string bolt11 = 6;
optional string bolt12 = 7;
optional Amount amount_msat = 8;
- optional Amount amount_sent_msat = 9;
+ Amount amount_sent_msat = 9;
optional bytes erroronion = 10;
optional string description = 11;
optional uint64 completed_at = 12;
@@ -2599,7 +2599,7 @@ message OpenchannelBumpResponse {
string psbt = 3;
bool commitments_secured = 4;
uint64 funding_serial = 5;
- optional bool requires_confirmed_inputs = 6;
+ bool requires_confirmed_inputs = 6;
}
message OpenchannelBumpChannelType {
@@ -2626,7 +2626,7 @@ message OpenchannelInitResponse {
OpenchannelInitChannelType channel_type = 3;
bool commitments_secured = 4;
uint64 funding_serial = 5;
- optional bool requires_confirmed_inputs = 6;
+ bool requires_confirmed_inputs = 6;
}
message OpenchannelInitChannelType {
@@ -2714,11 +2714,11 @@ message RenepaystatusPaystatus {
bytes payment_hash = 3 [deprecated = true];
double created_at = 4 [deprecated = true];
uint32 groupid = 5 [deprecated = true];
- optional uint32 parts = 6 [deprecated = true];
+ uint32 parts = 6 [deprecated = true];
Amount amount_msat = 7 [deprecated = true];
optional Amount amount_sent_msat = 8 [deprecated = true];
RenepaystatusPaystatusStatus status = 9 [deprecated = true];
- optional bytes destination = 10 [deprecated = true];
+ bytes destination = 10 [deprecated = true];
repeated string notes = 11 [deprecated = true];
}
@@ -2748,10 +2748,10 @@ message RenepayResponse {
Amount amount_msat = 5 [deprecated = true];
Amount amount_sent_msat = 6 [deprecated = true];
RenepayStatus status = 7 [deprecated = true];
- optional bytes destination = 8 [deprecated = true];
+ bytes destination = 8 [deprecated = true];
optional string bolt11 = 9 [deprecated = true];
optional string bolt12 = 10 [deprecated = true];
- optional uint64 groupid = 11 [deprecated = true];
+ uint64 groupid = 11 [deprecated = true];
}
message ReserveinputsRequest {
@@ -2797,7 +2797,7 @@ message SendinvoiceResponse {
EXPIRED = 2;
}
string label = 1;
- string description = 2;
+ optional string description = 2;
bytes payment_hash = 3;
SendinvoiceStatus status = 4;
uint64 expires_at = 5;
@@ -2902,15 +2902,15 @@ message SpliceInitResponse {
}
message SpliceSignedRequest {
- bytes channel_id = 1;
+ optional bytes channel_id = 1;
string psbt = 2;
optional bool sign_first = 3;
}
message SpliceSignedResponse {
bytes tx = 1;
bytes txid = 2;
- optional uint32 outnum = 3;
+ uint32 outnum = 3;
string psbt = 4;
}
@@ -2931,9 +2931,9 @@ message SpliceinRequest {
}
message SpliceinResponse {
- optional string psbt = 1;
+ string psbt = 1;
optional string tx = 2;
- optional string txid = 3;
+ string txid = 3;
}
message SpliceoutRequest {
@@ -2944,9 +2944,9 @@ message SpliceoutRequest {
}
message SpliceoutResponse {
- optional string psbt = 1;
+ string psbt = 1;
optional string tx = 2;
- optional string txid = 3;
+ string txid = 3;
}
message DevspliceRequest {
@@ -3164,7 +3164,7 @@ message ListconfigsRequest {
}
message ListconfigsResponse {
- optional ListconfigsConfigs configs = 1;
+ ListconfigsConfigs configs = 1;
}
message ListconfigsConfigs {
@@ -3680,7 +3680,7 @@ message HelpResponse {
SIMPLE = 0;
}
repeated HelpHelp help = 1;
- optional HelpFormathint format_hint = 2;
+ HelpFormathint format_hint = 2;
}
message HelpHelp {
@@ -3730,7 +3730,7 @@ message BkprchannelsapyChannelsApy {
Amount our_start_balance_msat = 8;
Amount channel_start_balance_msat = 9;
Amount fees_out_msat = 10;
- optional Amount fees_in_msat = 11;
+ Amount fees_in_msat = 11;
string utilization_out = 12;
optional string utilization_out_initial = 13;
string utilization_in = 14;
@@ -3895,7 +3895,7 @@ message BkpreditdescriptionbypaymentidUpdated {
Amount debit_msat = 5;
string currency = 6;
uint32 timestamp = 7;
- string description = 8;
+ optional string description = 8;
optional string outpoint = 9;
optional uint32 blockheight = 10;
optional string origin = 11;
@@ -3940,7 +3940,7 @@ message BkpreditdescriptionbyoutpointUpdated {
}
message BkprreportRequest {
- optional string format = 1;
+ string format = 1;
repeated string headers = 2;
optional string escape = 3;
optional uint32 start_time = 4;
### cln-grpc/src/convert.rs
@@ -97,7 +97,7 @@ impl From<responses::ListpeersPeers> for pb::ListpeersPeers {
fn from(c: responses::ListpeersPeers) -> Self {
Self {
connected: c.connected, // Rule #2 for type boolean
- features: c.features.map(|v| hex::decode(v).unwrap()), // Rule #2 for type hex?
+ features: hex::decode(&c.features).unwrap(), // Rule #2 for type hex
id: c.id.serialize().to_vec(), // Rule #2 for type pubkey
// Field: ListPeers.peers[].log[]
log: c.log.map(|arr| arr.into_iter().map(|i| i.into()).collect()).unwrap_or(vec![]), // Rule #3
@@ -178,7 +178,7 @@ impl From<responses::SendpayResponse> for pb::SendpayResponse {
created_at: c.created_at, // Rule #2 for type u64
created_index: c.created_index, // Rule #2 for type u64
destination: c.destination.map(|v| v.serialize().to_vec()), // Rule #2 for type pubkey?
- groupid: c.groupid, // Rule #2 for type u64?
+ groupid: c.groupid, // Rule #2 for type u64
id: c.id, // Rule #2 for type u64
label: c.label, // Rule #2 for type string?
message: c.message, // Rule #2 for type string?
@@ -204,7 +204,7 @@ impl From<responses::ListchannelsChannels> for pb::ListchannelsChannels {
direction: c.direction, // Rule #2 for type u32
features: hex::decode(&c.features).unwrap(), // Rule #2 for type hex
fee_per_millionth: c.fee_per_millionth, // Rule #2 for type u32
- htlc_maximum_msat: c.htlc_maximum_msat.map(|f| f.into()), // Rule #2 for type msat?
+ htlc_maximum_msat: Some(c.htlc_maximum_msat.into()), // Rule #2 for type msat
htlc_minimum_msat: Some(c.htlc_minimum_msat.into()), // Rule #2 for type msat
last_update: c.last_update, // Rule #2 for type u32
message_flags: c.message_flags.into(), // Rule #2 for type u8
@@ -505,7 +505,7 @@ impl From<responses::CreateinvoiceResponse> for pb::CreateinvoiceResponse {
bolt11: c.bolt11, // Rule #2 for type string?
bolt12: c.bolt12, // Rule #2 for type string?
created_index: c.created_index, // Rule #2 for type u64
- description: c.description, // Rule #2 for type string
+ description: c.description, // Rule #2 for type string?
expires_at: c.expires_at, // Rule #2 for type u64
invreq_payer_note: c.invreq_payer_note, // Rule #2 for type string?
label: c.label, // Rule #2 for type string
@@ -524,8 +524,8 @@ impl From<responses::CreateinvoiceResponse> for pb::CreateinvoiceResponse {
impl From<responses::DatastoreResponse> for pb::DatastoreResponse {
fn from(c: responses::DatastoreResponse) -> Self {
Self {
- generation: c.generation, // Rule #2 for type u64?
- hex: c.hex.map(|v| hex::decode(v).unwrap()), // Rule #2 for type hex?
+ generation: c.generation, // Rule #2 for type u64
+ hex: hex::decode(&c.hex).unwrap(), // Rule #2 for type hex
// Field: Datastore.key
key: c.key.into_iter().map(|i| i.into()).collect(), // Rule #3 for type string
string: c.string, // Rule #2 for type string?
@@ -567,8 +567,8 @@ impl From<responses::CreateonionResponse> for pb::CreateonionResponse {
impl From<responses::DeldatastoreResponse> for pb::DeldatastoreResponse {
fn from(c: responses::DeldatastoreResponse) -> Self {
Self {
- generation: c.generation, // Rule #2 for type u64?
- hex: c.hex.map(|v| hex::decode(v).unwrap()), // Rule #2 for type hex?
+ generation: c.generation, // Rule #2 for type u64
+ hex: hex::decode(&c.hex).unwrap(), // Rule #2 for type hex
// Field: DelDatastore.key
key: c.key.into_iter().map(|i| i.into()).collect(), // Rule #3 for type string
string: c.string, // Rule #2 for type string?
@@ -930,7 +930,7 @@ impl From<responses::PayResponse> for pb::PayResponse {
#[allow(deprecated)]
created_at: c.created_at, // Rule #2 for type number
#[allow(deprecated)]
- destination: c.destination.map(|v| v.serialize().to_vec()), // Rule #2 for type pubkey?
+ destination: c.destination.serialize().to_vec(), // Rule #2 for type pubkey
#[allow(deprecated)]
parts: c.parts, // Rule #2 for type u32
#[allow(deprecated)]
@@ -1073,7 +1073,7 @@ impl From<responses::WaitsendpayResponse> for pb::WaitsendpayResponse {
created_at: c.created_at, // Rule #2 for type u64
created_index: c.created_index, // Rule #2 for type u64
destination: c.destination.map(|v| v.serialize().to_vec()), // Rule #2 for type pubkey?
- groupid: c.groupid, // Rule #2 for type u64?
+ groupid: c.groupid, // Rule #2 for type u64
id: c.id, // Rule #2 for type u64
label: c.label, // Rule #2 for type string?
partid: c.partid, // Rule #2 for type u64?
@@ -1371,7 +1371,7 @@ impl From<responses::ListpeerchannelsChannels> for pb::ListpeerchannelsChannels
Self {
alias: c.alias.map(|v| v.into()),
channel_id: c.channel_id.map(|v| <Sha256 as AsRef<[u8]>>::as_ref(&v).to_vec()), // Rule #2 for type hash?
- channel_type: c.channel_type.map(|v| v.into()),
+ channel_type: Some(c.channel_type.into()),
close_to: c.close_to.map(|v| hex::decode(v).unwrap()), // Rule #2 for type hex?
close_to_addr: c.close_to_addr, // Rule #2 for type string?
closer: c.closer.map(|v| v as i32),
@@ -1477,7 +1477,7 @@ impl From<responses::ListclosedchannelsClosedchannels> for pb::Listclosedchannel
Self {
alias: c.alias.map(|v| v.into()),
channel_id: <Sha256 as AsRef<[u8]>>::as_ref(&c.channel_id).to_vec(), // Rule #2 for type hash
- channel_type: c.channel_type.map(|v| v.into()),
+ channel_type: Some(c.channel_type.into()),
close_cause: c.close_cause as i32,
closer: c.closer.map(|v| v as i32),
final_to_us_msat: Some(c.final_to_us_msat.into()), // Rule #2 for type msat
@@ -1858,7 +1858,7 @@ impl From<responses::DelpayPayments> for pb::DelpayPayments {
created_index: c.created_index, // Rule #2 for type u64
destination: c.destination.map(|v| v.serialize().to_vec()), // Rule #2 for type pubkey?
erroronion: c.erroronion.map(|v| hex::decode(v).unwrap()), // Rule #2 for type hex?
- groupid: c.groupid, // Rule #2 for type u64?
+ groupid: c.groupid, // Rule #2 for type u64
id: c.id, // Rule #2 for type u64
label: c.label, // Rule #2 for type string?
partid: c.partid, // Rule #2 for type u64?
@@ -1936,7 +1936,7 @@ impl From<responses::FeeratesOnchainFeeEstimates> for pb::FeeratesOnchainFeeEsti
htlc_timeout_satoshis: c.htlc_timeout_satoshis, // Rule #2 for type u64
mutual_close_satoshis: c.mutual_close_satoshis, // Rule #2 for type u64
opening_channel_satoshis: c.opening_channel_satoshis, // Rule #2 for type u64
- unilateral_close_nonanchor_satoshis: c.unilateral_close_nonanchor_satoshis, // Rule #2 for type u64?
+ unilateral_close_nonanchor_satoshis: c.unilateral_close_nonanchor_satoshis, // Rule #2 for type u64
unilateral_close_satoshis: c.unilateral_close_satoshis, // Rule #2 for type u64
}
}
@@ -2146,7 +2146,7 @@ impl From<responses::FundchannelStartChannelType> for pb::FundchannelStartChanne
impl From<responses::FundchannelStartResponse> for pb::FundchannelStartResponse {
fn from(c: responses::FundchannelStartResponse) -> Self {
Self {
- channel_type: c.channel_type.map(|v| v.into()),
+ channel_type: Some(c.channel_type.into()),
close_to: c.close_to.map(|v| hex::decode(v).unwrap()), // Rule #2 for type hex?
funding_address: c.funding_address, // Rule #2 for type string
mindepth: c.mindepth, // Rule #2 for type u32?
@@ -2323,7 +2323,7 @@ impl From<responses::ListpaysPays> for pb::ListpaysPays {
fn from(c: responses::ListpaysPays) -> Self {
Self {
amount_msat: c.amount_msat.map(|f| f.into()), // Rule #2 for type msat?
- amount_sent_msat: c.amount_sent_msat.map(|f| f.into()), // Rule #2 for type msat?
+ amount_sent_msat: Some(c.amount_sent_msat.into()), // Rule #2 for type msat
bolt11: c.bolt11, // Rule #2 for type string?
bolt12: c.bolt12, // Rule #2 for type string?
completed_at: c.completed_at, // Rule #2 for type u64?
@@ -2432,7 +2432,7 @@ impl From<responses::MultifundchannelResponse> for pb::MultifundchannelResponse
// Field: MultiFundChannel.channel_ids[]
channel_ids: c.channel_ids.into_iter().map(|i| i.into()).collect(), // Rule #3 for type MultifundchannelChannelIds
// Field: MultiFundChannel.failed[]
- failed: c.failed.map(|arr| arr.into_iter().map(|i| i.into()).collect()).unwrap_or(vec![]), // Rule #3
+ failed: c.failed.into_iter().map(|i| i.into()).collect(), // Rule #3 for type MultifundchannelFailed
tx: hex::decode(&c.tx).unwrap(), // Rule #2 for type hex
txid: hex::decode(&c.txid).unwrap(), // Rule #2 for type txid
}
@@ -2497,7 +2497,7 @@ impl From<responses::OpenchannelBumpResponse> for pb::OpenchannelBumpResponse {
commitments_secured: c.commitments_secured, // Rule #2 for type boolean
funding_serial: c.funding_serial, // Rule #2 for type u64
psbt: c.psbt, // Rule #2 for type string
- requires_confirmed_inputs: c.requires_confirmed_inputs, // Rule #2 for type boolean?
+ requires_confirmed_inputs: c.requires_confirmed_inputs, // Rule #2 for type boolean
}
}
}
@@ -2523,7 +2523,7 @@ impl From<responses::OpenchannelInitResponse> for pb::OpenchannelInitResponse {
commitments_secured: c.commitments_secured, // Rule #2 for type boolean
funding_serial: c.funding_serial, // Rule #2 for type u64
psbt: c.psbt, // Rule #2 for type string
- requires_confirmed_inputs: c.requires_confirmed_inputs, // Rule #2 for type boolean?
+ requires_confirmed_inputs: c.requires_confirmed_inputs, // Rule #2 for type boolean
}
}
}
@@ -2611,13 +2611,13 @@ impl From<responses::RenepaystatusPaystatus> for pb::RenepaystatusPaystatus {
#[allow(deprecated)]
created_at: c.created_at, // Rule #2 for type number
#[allow(deprecated)]
- destination: c.destination.map(|v| v.serialize().to_vec()), // Rule #2 for type pubkey?
+ destination: c.destination.serialize().to_vec(), // Rule #2 for type pubkey
#[allow(deprecated)]
groupid: c.groupid, // Rule #2 for type u32
// Field: RenePayStatus.paystatus[].notes[]
notes: c.notes.map(|arr| arr.into_iter().map(|i| i.into()).collect()).unwrap_or(vec![]), // Rule #3
#[allow(deprecated)]
- parts: c.parts, // Rule #2 for type u32?
+ parts: c.parts, // Rule #2 for type u32
#[allow(deprecated)]
payment_hash: <Sha256 as AsRef<[u8]>>::as_ref(&c.payment_hash).to_vec(), // Rule #2 for type hash
#[allow(deprecated)]
@@ -2652,9 +2652,9 @@ impl From<responses::RenepayResponse> for pb::RenepayResponse {
#[allow(deprecated)]
created_at: c.created_at, // Rule #2 for type number
#[allow(deprecated)]
- destination: c.destination.map(|v| v.serialize().to_vec()), // Rule #2 for type pubkey?
+ destination: c.destination.serialize().to_vec(), // Rule #2 for type pubkey
#[allow(deprecated)]
- groupid: c.groupid, // Rule #2 for type u64?
+ groupid: c.groupid, // Rule #2 for type u64
#[allow(deprecated)]
parts: c.parts, // Rule #2 for type u32
#[allow(deprecated)]
@@ -2706,7 +2706,7 @@ impl From<responses::SendinvoiceResponse> for pb::SendinvoiceResponse {
amount_received_msat: c.amount_received_msat.map(|f| f.into()), // Rule #2 for type msat?
bolt12: c.bolt12, // Rule #2 for type string?
created_index: c.created_index, // Rule #2 for type u64
- description: c.description, // Rule #2 for type string
+ description: c.description, // Rule #2 for type string?
expires_at: c.expires_at, // Rule #2 for type u64
label: c.label, // Rule #2 for type string
paid_at: c.paid_at, // Rule #2 for type u64?
@@ -2819,7 +2819,7 @@ impl From<responses::SpliceInitResponse> for pb::SpliceInitResponse {
impl From<responses::SpliceSignedResponse> for pb::SpliceSignedResponse {
fn from(c: responses::SpliceSignedResponse) -> Self {
Self {
- outnum: c.outnum, // Rule #2 for type u32?
+ outnum: c.outnum, // Rule #2 for type u32
psbt: c.psbt, // Rule #2 for type string
tx: hex::decode(&c.tx).unwrap(), // Rule #2 for type hex
txid: hex::decode(&c.txid).unwrap(), // Rule #2 for type txid
@@ -2842,9 +2842,9 @@ impl From<responses::SpliceUpdateResponse> for pb::SpliceUpdateResponse {
impl From<responses::SpliceinResponse> for pb::SpliceinResponse {
fn from(c: responses::SpliceinResponse) -> Self {
Self {
- psbt: c.psbt, // Rule #2 for type string?
+ psbt: c.psbt, // Rule #2 for type string
tx: c.tx, // Rule #2 for type string?
- txid: c.txid, // Rule #2 for type string?
+ txid: c.txid, // Rule #2 for type string
}
}
}
@@ -2853,9 +2853,9 @@ impl From<responses::SpliceinResponse> for pb::SpliceinResponse {
impl From<responses::SpliceoutResponse> for pb::SpliceoutResponse {
fn from(c: responses::SpliceoutResponse) -> Self {
Self {
- psbt: c.psbt, // Rule #2 for type string?
+ psbt: c.psbt, // Rule #2 for type string
tx: c.tx, // Rule #2 for type string?
- txid: c.txid, // Rule #2 for type string?
+ txid: c.txid, // Rule #2 for type string
}
}
}
@@ -3980,7 +3980,7 @@ impl From<responses::ListconfigsConfigs> for pb::ListconfigsConfigs {
impl From<responses::ListconfigsResponse> for pb::ListconfigsResponse {
fn from(c: responses::ListconfigsResponse) -> Self {
Self {
- configs: c.configs.map(|v| v.into()),
+ configs: Some(c.configs.into()),
}
}
}
@@ -4007,7 +4007,7 @@ impl From<responses::HelpHelp> for pb::HelpHelp {
impl From<responses::HelpResponse> for pb::HelpResponse {
fn from(c: responses::HelpResponse) -> Self {
Self {
- format_hint: c.format_hint.map(|v| v as i32),
+ format_hint: c.format_hint as i32,
// Field: Help.help[]
help: c.help.into_iter().map(|i| i.into()).collect(), // Rule #3 for type HelpHelp
}
@@ -4053,7 +4053,7 @@ impl From<responses::BkprchannelsapyChannelsApy> for pb::BkprchannelsapyChannels
apy_total: c.apy_total, // Rule #2 for type string
apy_total_initial: c.apy_total_initial, // Rule #2 for type string?
channel_start_balance_msat: Some(c.channel_start_balance_msat.into()), // Rule #2 for type msat
- fees_in_msat: c.fees_in_msat.map(|f| f.into()), // Rule #2 for type msat?
+ fees_in_msat: Some(c.fees_in_msat.into()), // Rule #2 for type msat
fees_out_msat: Some(c.fees_out_msat.into()), // Rule #2 for type msat
lease_fee_earned_msat: Some(c.lease_fee_earned_msat.into()), // Rule #2 for type msat
lease_fee_paid_msat: Some(c.lease_fee_paid_msat.into()), // Rule #2 for type msat
@@ -4240,7 +4240,7 @@ impl From<responses::BkpreditdescriptionbypaymentidUpdated> for pb::Bkpreditdesc
credit_msat: Some(c.credit_msat.into()), // Rule #2 for type msat
currency: c.currency, // Rule #2 for type string
debit_msat: Some(c.debit_msat.into()), // Rule #2 for type msat
- description: c.description, // Rule #2 for type string
+ description: c.description, // Rule #2 for type string?
fees_msat: c.fees_msat.map(|f| f.into()), // Rule #2 for type msat?
is_rebalance: c.is_rebalance, // Rule #2 for type boolean?
origin: c.origin, // Rule #2 for type string?
@@ -4487,7 +4487,7 @@ impl From<responses::AskrenelistlayersLayers> for pb::AskrenelistlayersLayers {
fn from(c: responses::AskrenelistlayersLayers) -> Self {
Self {
// Field: AskRene-ListLayers.layers[].biases[]
- biases: c.biases.map(|arr| arr.into_iter().map(|i| i.into()).collect()).unwrap_or(vec![]), // Rule #3
+ biases: c.biases.into_iter().map(|i| i.into()).collect(), // Rule #3 for type AskrenelistlayersLayersBiases
// Field: AskRene-ListLayers.layers[].channel_updates[]
channel_updates: c.channel_updates.into_iter().map(|i| i.into()).collect(), // Rule #3 for type AskrenelistlayersLayersChannelUpdates
// Field: AskRene-ListLayers.layers[].constraints[]
@@ -4596,7 +4596,7 @@ impl From<responses::AskrenecreatelayerLayers> for pb::AskrenecreatelayerLayers
fn from(c: responses::AskrenecreatelayerLayers) -> Self {
Self {
// Field: AskRene-Create-Layer.layers[].biases[]
- biases: c.biases.map(|arr| arr.into_iter().map(|i| i.into()).collect()).unwrap_or(vec![]), // Rule #3
+ biases: c.biases.into_iter().map(|i| i.into()).collect(), // Rule #3 for type AskrenecreatelayerLayersBiases
// Field: AskRene-Create-Layer.layers[].channel_updates[]
channel_updates: c.channel_updates.into_iter().map(|i| i.into()).collect(), // Rule #3 for type AskrenecreatelayerLayersChannelUpdates
// Field: AskRene-Create-Layer.layers[].constraints[]
@@ -5804,7 +5804,7 @@ impl From<requests::InvoicerequestRequest> for pb::InvoicerequestRequest {
Self {
absolute_expiry: c.absolute_expiry, // Rule #2 for type u64?
amount: Some(c.amount.into()), // Rule #2 for type msat
- description: c.description, // Rule #2 for type string
+ description: c.description, // Rule #2 for type string?
issuer: c.issuer, // Rule #2 for type string?
label: c.label, // Rule #2 for type string?
single_use: c.single_use, // Rule #2 for type boolean?
@@ -6740,7 +6740,7 @@ impl From<requests::SpliceInitRequest> for pb::SpliceInitRequest {
impl From<requests::SpliceSignedRequest> for pb::SpliceSignedRequest {
fn from(c: requests::SpliceSignedRequest) -> Self {
Self {
- channel_id: <Sha256 as AsRef<[u8]>>::as_ref(&c.channel_id).to_vec(), // Rule #2 for type hash
+ channel_id: c.channel_id.map(|v| <Sha256 as AsRef<[u8]>>::as_ref(&v).to_vec()), // Rule #2 for type hash?
psbt: c.psbt, // Rule #2 for type string
sign_first: c.sign_first, // Rule #2 for type boolean?
}
@@ -6974,7 +6974,7 @@ impl From<requests::BkprreportRequest> for pb::BkprreportRequest {
Self {
end_time: c.end_time, // Rule #2 for type u32?
escape: c.escape, // Rule #2 for type string?
- format: c.format, // Rule #2 for type string?
+ format: c.format, // Rule #2 for type string
// Field: Bkpr-Report.headers[]
headers: c.headers.map(|arr| arr.into_iter().map(|i| i.into()).collect()).unwrap_or(vec![]), // Rule #3
start_time: c.start_time, // Rule #2 for type u32?
@@ -7928,7 +7928,7 @@ impl From<pb::InvoicerequestRequest> for requests::InvoicerequestRequest {
Self {
absolute_expiry: c.absolute_expiry, // Rule #1 for type u64?
amount: c.amount.unwrap().into(), // Rule #1 for type msat
- description: c.description, // Rule #1 for type string
+ description: c.description, // Rule #1 for type string?
issuer: c.issuer, // Rule #1 for type string?
label: c.label, // Rule #1 for type string?
single_use: c.single_use, // Rule #1 for type boolean?
@@ -8806,7 +8806,7 @@ impl From<pb::SpliceInitRequest> for requests::SpliceInitRequest {
impl From<pb::SpliceSignedRequest> for requests::SpliceSignedRequest {
fn from(c: pb::SpliceSignedRequest) -> Self {
Self {
- channel_id: Sha256::from_slice(&c.channel_id).unwrap(), // Rule #1 for type hash
+ channel_id: c.channel_id.map(|v| Sha256::from_slice(&v).unwrap()), // Rule #1 for type hash?
psbt: c.psbt, // Rule #1 for type string
sign_first: c.sign_first, // Rule #1 for type boolean?
}
@@ -9040,7 +9040,7 @@ impl From<pb::BkprreportRequest> for requests::BkprreportRequest {
Self {
end_time: c.end_time, // Rule #1 for type u32?
escape: c.escape, // Rule #1 for type string?
- format: c.format, // Rule #1 for type string?
+ format: c.format, // Rule #1 for type string
headers: Some(c.headers.into_iter().map(|s| s.into()).collect()), // Rule #4
start_time: c.start_time, // Rule #1 for type u32?
}
### cln-rpc/src/hooks.rs
@@ -341,8 +341,7 @@ pub mod events{
pub first_scid: Option<ShortChannelId>,
#[serde(skip_serializing_if = "Option::is_none")]
pub first_scid_dir: Option<u32>,
- #[serde(skip_serializing_if = "crate::is_none_or_empty")]
- pub hops: Option<Vec<OnionMessageRecvOnionMessageReplyBlindedpathHops>>,
+ pub hops: Vec<OnionMessageRecvOnionMessageReplyBlindedpathHops>,
}
#[derive(Clone, Debug, Deserialize, Serialize)]
@@ -361,8 +360,7 @@ pub mod events{
pub invoice_request: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reply_blindedpath: Option<OnionMessageRecvOnionMessageReplyBlindedpath>,
- #[serde(skip_serializing_if = "crate::is_none_or_empty")]
- pub unknown_fields: Option<Vec<OnionMessageRecvOnionMessageUnknownFields>>,
+ pub unknown_fields: Vec<OnionMessageRecvOnionMessageUnknownFields>,
}
#[derive(Clone, Debug, Deserialize, Serialize)]
@@ -386,8 +384,7 @@ pub mod events{
pub first_scid: Option<ShortChannelId>,
#[serde(skip_serializing_if = "Option::is_none")]
pub first_scid_dir: Option<u32>,
- #[serde(skip_serializing_if = "crate::is_none_or_empty")]
- pub hops: Option<Vec<OnionMessageRecvSecretOnionMessageReplyBlindedpathHops>>,
+ pub hops: Vec<OnionMessageRecvSecretOnionMessageReplyBlindedpathHops>,
}
#[derive(Clone, Debug, Deserialize, Serialize)]
@@ -406,9 +403,8 @@ pub mod events{
pub invoice_request: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub reply_blindedpath: Option<OnionMessageRecvSecretOnionMessageReplyBlindedpath>,
- #[serde(skip_serializing_if = "crate::is_none_or_empty")]
- pub unknown_fields: Option<Vec<OnionMessageRecvSecretOnionMessageUnknownFields>>,
pub pathsecret: Secret,
+ pub unknown_fields: Vec<OnionMessageRecvSecretOnionMessageUnknownFields>,
}
#[derive(Clone, Debug, Deserialize, Serialize)]
@@ -555,7 +551,7 @@ pub mod actions{
pub result: DbWriteResult,
}
- /// ['Controls whether the payment is accepted or rejected.', '"continue" accepts the payment.', '"reject" fails the payment.']
+ /// ['Controls whether the payment is accepted or rejected.', '"continue" accepts the payment.', '"reject" fails the payment with `incorrect_or_unknown_payment_details`.']
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
#[allow(non_camel_case_types)]
pub enum InvoicePaymentHookResult {
@@ -589,8 +585,8 @@ pub mod actions{
pub struct InvoicePaymentHookAction {
#[serde(skip_serializing_if = "Option::is_none")]
pub failure_message: Option<String>,
- // Path `invoice_payment_hook.result`
- pub result: InvoicePaymentHookResult,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub result: Option<InvoicePaymentHookResult>,
}
/// ['Whether to accept or reject the channel opening request.']
### cln-rpc/src/model.rs
@@ -1228,13 +1228,14 @@ pub mod requests {
#[serde(skip_serializing_if = "Option::is_none")]
pub absolute_expiry: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
+ pub description: Option<String>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub issuer: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub single_use: Option<bool>,
pub amount: Amount,
- pub description: String,
}
impl From<InvoicerequestRequest> for Request {
@@ -3735,9 +3736,10 @@ pub mod requests {
}
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct SpliceSignedRequest {
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub channel_id: Option<Sha256>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sign_first: Option<bool>,
- pub channel_id: Sha256,
pub psbt: String,
}
@@ -4382,11 +4384,10 @@ pub mod requests {
#[serde(skip_serializing_if = "Option::is_none")]
pub escape: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
- pub format: Option<String>,
- #[serde(skip_serializing_if = "Option::is_none")]
pub start_time: Option<u32>,
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
pub headers: Option<Vec<String>>,
+ pub format: String,
}
impl From<BkprreportRequest> for Request {
@@ -5716,15 +5717,14 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ListpeersPeers {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub features: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub remote_addr: Option<String>,
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
pub log: Option<Vec<ListpeersPeersLog>>,
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
pub netaddr: Option<Vec<String>>,
pub connected: bool,
+ pub features: String,
pub id: PublicKey,
pub num_channels: u32,
}
@@ -5876,8 +5876,6 @@ pub mod responses {
#[serde(skip_serializing_if = "Option::is_none")]
pub destination: Option<PublicKey>,
#[serde(skip_serializing_if = "Option::is_none")]
- pub groupid: Option<u64>,
- #[serde(skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
@@ -5892,6 +5890,7 @@ pub mod responses {
pub amount_sent_msat: Amount,
pub created_at: u64,
pub created_index: u64,
+ pub groupid: u64,
pub id: u64,
pub payment_hash: Sha256,
}
@@ -5909,8 +5908,6 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ListchannelsChannels {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub htlc_maximum_msat: Option<Amount>,
pub active: bool,
pub amount_msat: Amount,
pub base_fee_millisatoshi: u32,
@@ -5920,6 +5917,7 @@ pub mod responses {
pub direction: u32,
pub features: String,
pub fee_per_millionth: u32,
+ pub htlc_maximum_msat: Amount,
pub htlc_minimum_msat: Amount,
pub last_update: u32,
pub message_flags: u8,
@@ -6372,6 +6370,8 @@ pub mod responses {
#[serde(skip_serializing_if = "Option::is_none")]
pub bolt12: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
+ pub description: Option<String>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub invreq_payer_note: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub local_offer_id: Option<String>,
@@ -6386,7 +6386,6 @@ pub mod responses {
// Path `CreateInvoice.status`
pub status: CreateinvoiceStatus,
pub created_index: u64,
- pub description: String,
pub expires_at: u64,
pub label: String,
pub payment_hash: Sha256,
@@ -6405,12 +6404,10 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct DatastoreResponse {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub generation: Option<u64>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub hex: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub string: Option<String>,
+ pub generation: u64,
+ pub hex: String,
pub key: Vec<String>,
}
@@ -6466,12 +6463,10 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct DeldatastoreResponse {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub generation: Option<u64>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub hex: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub string: Option<String>,
+ pub generation: u64,
+ pub hex: String,
pub key: Vec<String>,
}
@@ -7163,9 +7158,6 @@ pub mod responses {
#[deprecated = "deprecated since CLN v26.06"]
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct PayResponse {
- #[deprecated]
- #[serde(skip_serializing_if = "Option::is_none")]
- pub destination: Option<PublicKey>,
#[deprecated]
#[serde(skip_serializing_if = "Option::is_none")]
pub warning_partial_completion: Option<String>,
@@ -7176,6 +7168,8 @@ pub mod responses {
#[deprecated]
pub created_at: f64,
#[deprecated]
+ pub destination: PublicKey,
+ #[deprecated]
pub parts: u32,
#[deprecated]
pub payment_hash: Sha256,
@@ -7484,8 +7478,6 @@ pub mod responses {
#[serde(skip_serializing_if = "Option::is_none")]
pub destination: Option<PublicKey>,
#[serde(skip_serializing_if = "Option::is_none")]
- pub groupid: Option<u64>,
- #[serde(skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub partid: Option<u64>,
@@ -7498,6 +7490,7 @@ pub mod responses {
pub amount_sent_msat: Amount,
pub created_at: u64,
pub created_index: u64,
+ pub groupid: u64,
pub id: u64,
pub payment_hash: Sha256,
}
@@ -7771,12 +7764,6 @@ pub mod responses {
pub remote: Option<ShortChannelId>,
}
- #[derive(Clone, Debug, Deserialize, Serialize)]
- pub struct ListpeerchannelsChannelsChannelType {
- pub bits: Vec<u32>,
- pub names: Vec<ChannelTypeName>,
- }
-
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ListpeerchannelsChannelsFeerate {
pub perkb: u32,
@@ -7940,15 +7927,19 @@ pub mod responses {
pub timestamp: String,
}
+ #[derive(Clone, Debug, Deserialize, Serialize)]
+ pub struct ListpeerchannelsChannelsChannelType {
+ pub bits: Vec<u32>,
+ pub names: Vec<ChannelTypeName>,
+ }
+
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ListpeerchannelsChannels {
#[serde(skip_serializing_if = "Option::is_none")]
pub alias: Option<ListpeerchannelsChannelsAlias>,
#[serde(skip_serializing_if = "Option::is_none")]
pub channel_id: Option<Sha256>,
#[serde(skip_serializing_if = "Option::is_none")]
- pub channel_type: Option<ListpeerchannelsChannelsChannelType>,
- #[serde(skip_serializing_if = "Option::is_none")]
pub close_to: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub close_to_addr: Option<String>,
@@ -8058,6 +8049,7 @@ pub mod responses {
pub opener: ChannelSide,
// Path `ListPeerChannels.channels[].state`
pub state: ChannelState,
+ pub channel_type: ListpeerchannelsChannelsChannelType,
pub features: Vec<String>,
pub peer_connected: bool,
pub peer_id: PublicKey,
@@ -8087,12 +8079,6 @@ pub mod responses {
pub remote: Option<ShortChannelId>,
}
- #[derive(Clone, Debug, Deserialize, Serialize)]
- pub struct ListclosedchannelsClosedchannelsChannelType {
- pub bits: Vec<u32>,
- pub names: Vec<ChannelTypeName>,
- }
-
/// ['What caused the channel to close.']
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
#[allow(non_camel_case_types)]
@@ -8139,13 +8125,17 @@ pub mod responses {
}
}
+ #[derive(Clone, Debug, Deserialize, Serialize)]
+ pub struct ListclosedchannelsClosedchannelsChannelType {
+ pub bits: Vec<u32>,
+ pub names: Vec<ChannelTypeName>,
+ }
+
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ListclosedchannelsClosedchannels {
#[serde(skip_serializing_if = "Option::is_none")]
pub alias: Option<ListclosedchannelsClosedchannelsAlias>,
#[serde(skip_serializing_if = "Option::is_none")]
- pub channel_type: Option<ListclosedchannelsClosedchannelsChannelType>,
- #[serde(skip_serializing_if = "Option::is_none")]
pub closer: Option<ChannelSide>,
#[serde(skip_serializing_if = "Option::is_none")]
pub funding_fee_paid_msat: Option<Amount>,
@@ -8172,6 +8162,7 @@ pub mod responses {
// Path `ListClosedChannels.closedchannels[].opener`
pub opener: ChannelSide,
pub channel_id: Sha256,
+ pub channel_type: ListclosedchannelsClosedchannelsChannelType,
pub final_to_us_msat: Amount,
pub funding_outnum: u32,
pub funding_txid: String,
@@ -8713,8 +8704,6 @@ pub mod responses {
#[serde(skip_serializing_if = "Option::is_none")]
pub erroronion: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
- pub groupid: Option<u64>,
- #[serde(skip_serializing_if = "Option::is_none")]
pub label: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub partid: Option<u64>,
@@ -8727,6 +8716,7 @@ pub mod responses {
pub amount_sent_msat: Amount,
pub created_at: u64,
pub created_index: u64,
+ pub groupid: u64,
pub id: u64,
pub payment_hash: Sha256,
}
@@ -8831,12 +8821,11 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct FeeratesOnchainFeeEstimates {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub unilateral_close_nonanchor_satoshis: Option<u64>,
pub htlc_success_satoshis: u64,
pub htlc_timeout_satoshis: u64,
pub mutual_close_satoshis: u64,
pub opening_channel_satoshis: u64,
+ pub unilateral_close_nonanchor_satoshis: u64,
pub unilateral_close_satoshis: u64,
}
@@ -9077,12 +9066,11 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct FundchannelStartResponse {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub channel_type: Option<FundchannelStartChannelType>,
#[serde(skip_serializing_if = "Option::is_none")]
pub close_to: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub mindepth: Option<u32>,
+ pub channel_type: FundchannelStartChannelType,
pub funding_address: String,
pub scriptpubkey: String,
pub warning_usage: String,
@@ -9534,8 +9522,6 @@ pub mod responses {
#[serde(skip_serializing_if = "Option::is_none")]
pub amount_msat: Option<Amount>,
#[serde(skip_serializing_if = "Option::is_none")]
- pub amount_sent_msat: Option<Amount>,
- #[serde(skip_serializing_if = "Option::is_none")]
pub bolt11: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub bolt12: Option<String>,
@@ -9559,6 +9545,7 @@ pub mod responses {
pub updated_index: Option<u64>,
// Path `ListPays.pays[].status`
pub status: ListpaysPaysStatus,
+ pub amount_sent_msat: Amount,
pub created_at: u64,
pub payment_hash: Sha256,
}
@@ -9642,6 +9629,22 @@ pub mod responses {
}
}
+ #[derive(Clone, Debug, Deserialize, Serialize)]
+ pub struct MultifundchannelChannelIdsChannelType {
+ pub bits: Vec<u32>,
+ pub names: Vec<ChannelTypeName>,
+ }
+
+ #[derive(Clone, Debug, Deserialize, Serialize)]
+ pub struct MultifundchannelChannelIds {
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub close_to: Option<String>,
+ pub channel_id: Sha256,
+ pub channel_type: MultifundchannelChannelIdsChannelType,
+ pub id: PublicKey,
+ pub outnum: u32,
+ }
+
/// ['What stage we failed at.']
#[derive(Copy, Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
#[allow(non_camel_case_types)]
@@ -9694,27 +9697,10 @@ pub mod responses {
pub id: PublicKey,
}
- #[derive(Clone, Debug, Deserialize, Serialize)]
- pub struct MultifundchannelChannelIdsChannelType {
- pub bits: Vec<u32>,
- pub names: Vec<ChannelTypeName>,
- }
-
- #[derive(Clone, Debug, Deserialize, Serialize)]
- pub struct MultifundchannelChannelIds {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub close_to: Option<String>,
- pub channel_id: Sha256,
- pub channel_type: MultifundchannelChannelIdsChannelType,
- pub id: PublicKey,
- pub outnum: u32,
- }
-
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct MultifundchannelResponse {
- #[serde(skip_serializing_if = "crate::is_none_or_empty")]
- pub failed: Option<Vec<MultifundchannelFailed>>,
pub channel_ids: Vec<MultifundchannelChannelIds>,
+ pub failed: Vec<MultifundchannelFailed>,
pub tx: String,
pub txid: String,
}
@@ -9798,13 +9784,12 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct OpenchannelBumpResponse {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub requires_confirmed_inputs: Option<bool>,
pub channel_id: Sha256,
pub channel_type: OpenchannelBumpChannelType,
pub commitments_secured: bool,
pub funding_serial: u64,
pub psbt: String,
+ pub requires_confirmed_inputs: bool,
}
impl TryFrom<Response> for OpenchannelBumpResponse {
@@ -9826,13 +9811,12 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct OpenchannelInitResponse {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub requires_confirmed_inputs: Option<bool>,
pub channel_id: Sha256,
pub channel_type: OpenchannelInitChannelType,
pub commitments_secured: bool,
pub funding_serial: u64,
pub psbt: String,
+ pub requires_confirmed_inputs: bool,
}
impl TryFrom<Response> for OpenchannelInitResponse {
@@ -9981,12 +9965,6 @@ pub mod responses {
pub amount_sent_msat: Option<Amount>,
#[deprecated]
#[serde(skip_serializing_if = "Option::is_none")]
- pub destination: Option<PublicKey>,
- #[deprecated]
- #[serde(skip_serializing_if = "Option::is_none")]
- pub parts: Option<u32>,
- #[deprecated]
- #[serde(skip_serializing_if = "Option::is_none")]
pub payment_preimage: Option<Secret>,
#[deprecated]
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
@@ -9998,8 +9976,12 @@ pub mod responses {
#[deprecated]
pub created_at: f64,
#[deprecated]
+ pub destination: PublicKey,
+ #[deprecated]
pub groupid: u32,
#[deprecated]
+ pub parts: u32,
+ #[deprecated]
pub payment_hash: Sha256,
// Path `RenePayStatus.paystatus[].status`
pub status: RenepaystatusPaystatusStatus,
@@ -10068,18 +10050,16 @@ pub mod responses {
#[serde(skip_serializing_if = "Option::is_none")]
pub bolt12: Option<String>,
#[deprecated]
- #[serde(skip_serializing_if = "Option::is_none")]
- pub destination: Option<PublicKey>,
- #[deprecated]
- #[serde(skip_serializing_if = "Option::is_none")]
- pub groupid: Option<u64>,
- #[deprecated]
pub amount_msat: Amount,
#[deprecated]
pub amount_sent_msat: Amount,
#[deprecated]
pub created_at: f64,
#[deprecated]
+ pub destination: PublicKey,
+ #[deprecated]
+ pub groupid: u64,
+ #[deprecated]
pub parts: u32,
#[deprecated]
pub payment_hash: Sha256,
@@ -10184,6 +10164,8 @@ pub mod responses {
#[serde(skip_serializing_if = "Option::is_none")]
pub bolt12: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
+ pub description: Option<String>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub paid_at: Option<u64>,
#[serde(skip_serializing_if = "Option::is_none")]
pub pay_index: Option<u64>,
@@ -10194,7 +10176,6 @@ pub mod responses {
// Path `SendInvoice.status`
pub status: SendinvoiceStatus,
pub created_index: u64,
- pub description: String,
pub expires_at: u64,
pub label: String,
pub payment_hash: Sha256,
@@ -10352,8 +10333,7 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct SpliceSignedResponse {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub outnum: Option<u32>,
+ pub outnum: u32,
pub psbt: String,
pub tx: String,
pub txid: String,
@@ -10391,12 +10371,10 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct SpliceinResponse {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub psbt: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub tx: Option<String>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub txid: Option<String>,
+ pub psbt: String,
+ pub txid: String,
}
impl TryFrom<Response> for SpliceinResponse {
@@ -10412,12 +10390,10 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct SpliceoutResponse {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub psbt: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub tx: Option<String>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub txid: Option<String>,
+ pub psbt: String,
+ pub txid: String,
}
impl TryFrom<Response> for SpliceoutResponse {
@@ -11754,8 +11730,7 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct ListconfigsResponse {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub configs: Option<ListconfigsConfigs>,
+ pub configs: ListconfigsConfigs,
}
impl TryFrom<Response> for ListconfigsResponse {
@@ -11844,8 +11819,9 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct HelpResponse {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub format_hint: Option<HelpFormathint>,
+ // Path `Help.format-hint`
+ #[serde(rename = "format-hint")]
+ pub format_hint: HelpFormathint,
pub help: Vec<HelpHelp>,
}
@@ -11917,8 +11893,6 @@ pub mod responses {
#[serde(skip_serializing_if = "Option::is_none")]
pub apy_total_initial: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
- pub fees_in_msat: Option<Amount>,
- #[serde(skip_serializing_if = "Option::is_none")]
pub utilization_in_initial: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub utilization_out_initial: Option<String>,
@@ -11927,6 +11901,7 @@ pub mod responses {
pub apy_out: String,
pub apy_total: String,
pub channel_start_balance_msat: Amount,
+ pub fees_in_msat: Amount,
pub fees_out_msat: Amount,
pub lease_fee_earned_msat: Amount,
pub lease_fee_paid_msat: Amount,
@@ -12248,6 +12223,8 @@ pub mod responses {
#[serde(skip_serializing_if = "Option::is_none")]
pub blockheight: Option<u32>,
#[serde(skip_serializing_if = "Option::is_none")]
+ pub description: Option<String>,
+ #[serde(skip_serializing_if = "Option::is_none")]
pub fees_msat: Option<Amount>,
#[serde(skip_serializing_if = "Option::is_none")]
pub is_rebalance: Option<bool>,
@@ -12268,7 +12245,6 @@ pub mod responses {
pub credit_msat: Amount,
pub currency: String,
pub debit_msat: Amount,
- pub description: String,
pub tag: String,
pub timestamp: u32,
}
@@ -12499,16 +12475,6 @@ pub mod responses {
}
}
- #[derive(Clone, Debug, Deserialize, Serialize)]
- pub struct AskrenelistlayersLayersBiases {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub description: Option<String>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub timestamp: Option<u64>,
- pub bias: i64,
- pub short_channel_id_dir: ShortChannelIdDir,
- }
-
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct AskrenelistlayersLayersImpressions {
pub amount_msat: Amount,
@@ -12526,6 +12492,16 @@ pub mod responses {
pub timestamp: u64,
}
+ #[derive(Clone, Debug, Deserialize, Serialize)]
+ pub struct AskrenelistlayersLayersBiases {
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub description: Option<String>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub timestamp: Option<u64>,
+ pub bias: i64,
+ pub short_channel_id_dir: ShortChannelIdDir,
+ }
+
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct AskrenelistlayersLayersChannelUpdates {
#[serde(skip_serializing_if = "Option::is_none")]
@@ -12564,14 +12540,13 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct AskrenelistlayersLayers {
- #[serde(skip_serializing_if = "crate::is_none_or_empty")]
- pub biases: Option<Vec<AskrenelistlayersLayersBiases>>,
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
pub disabled_channels: Option<Vec<ShortChannelIdDir>>,
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
pub impressions: Option<Vec<AskrenelistlayersLayersImpressions>>,
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
pub node_biases: Option<Vec<AskrenelistlayersLayersNodeBiases>>,
+ pub biases: Vec<AskrenelistlayersLayersBiases>,
pub channel_updates: Vec<AskrenelistlayersLayersChannelUpdates>,
pub constraints: Vec<AskrenelistlayersLayersConstraints>,
pub created_channels: Vec<AskrenelistlayersLayersCreatedChannels>,
@@ -12596,16 +12571,6 @@ pub mod responses {
}
}
- #[derive(Clone, Debug, Deserialize, Serialize)]
- pub struct AskrenecreatelayerLayersBiases {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub description: Option<String>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub timestamp: Option<u64>,
- pub bias: i64,
- pub short_channel_id_dir: ShortChannelIdDir,
- }
-
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct AskrenecreatelayerLayersImpressions {
pub amount_msat: Amount,
@@ -12623,6 +12588,16 @@ pub mod responses {
pub timestamp: u64,
}
+ #[derive(Clone, Debug, Deserialize, Serialize)]
+ pub struct AskrenecreatelayerLayersBiases {
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub description: Option<String>,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ pub timestamp: Option<u64>,
+ pub bias: i64,
+ pub short_channel_id_dir: ShortChannelIdDir,
+ }
+
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct AskrenecreatelayerLayersChannelUpdates {
#[serde(skip_serializing_if = "Option::is_none")]
@@ -12657,14 +12632,13 @@ pub mod responses {
#[derive(Clone, Debug, Deserialize, Serialize)]
pub struct AskrenecreatelayerLayers {
- #[serde(skip_serializing_if = "crate::is_none_or_empty")]
- pub biases: Option<Vec<AskrenecreatelayerLayersBiases>>,
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
pub disabled_channels: Option<Vec<ShortChannelIdDir>>,
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
pub impressions: Option<Vec<AskrenecreatelayerLayersImpressions>>,
#[serde(skip_serializing_if = "crate::is_none_or_empty")]
pub node_biases: Option<Vec<AskrenecreatelayerLayersNodeBiases>>,
+ pub biases: Vec<AskrenecreatelayerLayersBiases>,
pub channel_updates: Vec<AskrenecreatelayerLayersChannelUpdates>,
pub constraints: Vec<AskrenecreatelayerLayersConstraints>,
pub created_channels: Vec<AskrenecreatelayerLayersCreatedChannels>,
### cln-rpc/src/test.rs
@@ -887,8 +887,6 @@ fn test_onionmessage_recv() {
.as_ref()
.unwrap()
.hops
- .as_ref()
- .unwrap()
.len(),
1
);
@@ -898,8 +896,6 @@ fn test_onionmessage_recv() {
.as_ref()
.unwrap()
.hops
- .as_ref()
- .unwrap()
.first()
.unwrap()
.blinded_node_id
@@ -912,8 +908,6 @@ fn test_onionmessage_recv() {
.as_ref()
.unwrap()
.hops
- .as_ref()
- .unwrap()
.first()
.unwrap()
.encrypted_recipient_data,
@@ -925,25 +919,13 @@ fn test_onionmessage_recv() {
);
assert_eq!(d.onion_message.invoice.as_ref().unwrap(), "0a020d0dc");
assert_eq!(d.onion_message.invoice_error.as_ref().unwrap(), "0a020d0dd");
- assert_eq!(d.onion_message.unknown_fields.as_ref().unwrap().len(), 1);
+ assert_eq!(d.onion_message.unknown_fields.len(), 1);
assert_eq!(
- d.onion_message
- .unknown_fields
- .as_ref()
- .unwrap()
- .first()
- .unwrap()
- .number,
+ d.onion_message.unknown_fields.first().unwrap().number,
12345
);
assert_eq!(
- d.onion_message
- .unknown_fields
- .as_ref()
- .unwrap()
- .first()
- .unwrap()
- .value,
+ d.onion_message.unknown_fields.first().unwrap().value,
"0a020d0de"
);
assert_serde_roundtrip!(d, OnionMessageRecvEvent);
@@ -1031,8 +1013,6 @@ fn test_onionmessage_recv_secret() {
.as_ref()
.unwrap()
.hops
- .as_ref()
- .unwrap()
.len(),
1
);
@@ -1042,8 +1022,6 @@ fn test_onionmessage_recv_secret() {
.as_ref()
.unwrap()
.hops
- .as_ref()
- .unwrap()
.first()
.unwrap()
.blinded_node_id
@@ -1056,8 +1034,6 @@ fn test_onionmessage_recv_secret() {
.as_ref()
.unwrap()
.hops
- .as_ref()
- .unwrap()
.first()
.unwrap()
.encrypted_recipient_data,
@@ -1069,25 +1045,13 @@ fn test_onionmessage_recv_secret() {
);
assert_eq!(d.onion_message.invoice.as_ref().unwrap(), "0a020d0dc");
assert_eq!(d.onion_message.invoice_error.as_ref().unwrap(), "0a020d0dd");
- assert_eq!(d.onion_message.unknown_fields.as_ref().unwrap().len(), 1);
+ assert_eq!(d.onion_message.unknown_fields.len(), 1);
assert_eq!(
- d.onion_message
- .unknown_fields
- .as_ref()
- .unwrap()
- .first()
- .unwrap()
- .number,
+ d.onion_message.unknown_fields.first().unwrap().number,
12345
);
assert_eq!(
- d.onion_message
- .unknown_fields
- .as_ref()
- .unwrap()
- .first()
- .unwrap()
- .value,
+ d.onion_message.unknown_fields.first().unwrap().value,
"0a020d0de"
);
assert_serde_roundtrip!(d, OnionMessageRecvSecretEvent);
### contrib/msggen/msggen/schema.json
@@ -756,7 +756,9 @@
"created_channels",
"channel_updates",
"constraints",
- "impressions"
+ "impressions",
+ "biases",
+ "node_biases"
],
"properties": {
"layer": {
@@ -1359,7 +1361,9 @@
"created_channels",
"channel_updates",
"impressions",
- "constraints"
+ "constraints",
+ "biases",
+ "node_biases"
],
"properties": {
"layer": {
@@ -3258,6 +3262,7 @@
"our_start_balance_msat",
"channel_start_balance_msat",
"fees_out_msat",
+ "fees_in_msat",
"utilization_out",
"utilization_in",
"apy_out",
@@ -3977,8 +3982,7 @@
"credit_msat",
"debit_msat",
"currency",
- "timestamp",
- "description"
+ "timestamp"
],
"properties": {
"account": {
@@ -5898,7 +5902,9 @@
"It has the useful property that when used with `lightning-cli` and the `escape=csv` it can directly produce valid CSV files."
],
"request": {
- "required": [],
+ "required": [
+ "format"
+ ],
"additionalProperties": false,
"properties": {
"format": {
@@ -5985,6 +5991,7 @@
},
"response": {
"required": [
+ "format-hint",
"report"
],
"additionalProperties": false,
@@ -7384,7 +7391,6 @@
"created_index",
"payment_hash",
"status",
- "description",
"expires_at"
],
"additionalProperties": false,
@@ -8571,7 +8577,9 @@
},
"response": {
"required": [
- "key"
+ "key",
+ "generation",
+ "hex"
],
"additionalProperties": false,
"properties": {
@@ -9463,7 +9471,8 @@
],
"required": [
"period",
- "time_unit"
+ "time_unit",
+ "compulsory_field"
],
"additionalProperties": false,
"properties": {
@@ -10095,7 +10104,8 @@
],
"required": [
"period",
- "time_unit"
+ "time_unit",
+ "compulsory_field"
],
"additionalProperties": false,
"properties": {
@@ -11867,7 +11877,9 @@
},
"response": {
"required": [
- "key"
+ "key",
+ "generation",
+ "hex"
],
"additionalProperties": false,
"properties": {
@@ -12503,7 +12515,8 @@
"payment_hash",
"status",
"amount_sent_msat",
- "created_at"
+ "created_at",
+ "groupid"
],
"properties": {
"created_index": {
@@ -14244,6 +14257,7 @@
"opening_channel_satoshis",
"mutual_close_satoshis",
"unilateral_close_satoshis",
+ "unilateral_close_nonanchor_satoshis",
"htlc_timeout_satoshis",
"htlc_success_satoshis"
],
@@ -15392,6 +15406,7 @@
"required": [
"funding_address",
"scriptpubkey",
+ "channel_type",
"warning_usage"
],
"additionalProperties": false,
@@ -17607,7 +17622,8 @@
},
"response": {
"required": [
- "help"
+ "help",
+ "format-hint"
],
"additionalProperties": false,
"properties": {
@@ -18173,8 +18189,7 @@
],
"request": {
"required": [
- "amount",
- "description"
+ "amount"
],
"additionalProperties": false,
"properties": {
@@ -19797,6 +19812,7 @@
"fee_per_millionth",
"delay",
"htlc_minimum_msat",
+ "htlc_maximum_msat",
"features"
],
"properties": {
@@ -20203,6 +20219,7 @@
"channel_id",
"opener",
"private",
+ "channel_type",
"total_msat",
"total_local_commitments",
"total_remote_commitments",
@@ -20583,7 +20600,9 @@
}
},
"response": {
- "required": [],
+ "required": [
+ "configs"
+ ],
"additionalProperties": false,
"properties": {
"configs": {
@@ -26316,7 +26335,8 @@
"payment_hash",
"status",
"created_at",
- "created_index"
+ "created_index",
+ "amount_sent_msat"
],
"properties": {
"payment_hash": {
@@ -26409,7 +26429,6 @@
"then": {
"additionalProperties": false,
"required": [
- "amount_sent_msat",
"preimage"
],
"properties": {
@@ -26465,9 +26484,7 @@
},
"then": {
"additionalProperties": false,
- "required": [
- "amount_sent_msat"
- ],
+ "required": [],
"properties": {
"created_index": {},
"updated_index": {},
@@ -26679,11 +26696,12 @@
"type": "object",
"additionalProperties": true,
"required": [
+ "peer_id",
+ "peer_connected",
"state",
+ "channel_type",
"opener",
- "features",
- "peer_connected",
- "peer_id"
+ "features"
],
"properties": {
"peer_id": {
@@ -28669,7 +28687,8 @@
"required": [
"id",
"connected",
- "num_channels"
+ "num_channels",
+ "features"
],
"properties": {
"id": {
@@ -30508,7 +30527,8 @@
"required": [
"tx",
"txid",
- "channel_ids"
+ "channel_ids",
+ "failed"
],
"additionalProperties": false,
"properties": {
@@ -31335,6 +31355,7 @@
"single_use",
"bolt12",
"used",
+ "force_paths",
"created"
],
"additionalProperties": false,
@@ -31599,7 +31620,8 @@
"channel_type",
"psbt",
"commitments_secured",
- "funding_serial"
+ "funding_serial",
+ "requires_confirmed_inputs"
],
"additionalProperties": false,
"properties": {
@@ -31902,7 +31924,8 @@
"psbt",
"channel_type",
"commitments_secured",
- "funding_serial"
+ "funding_serial",
+ "requires_confirmed_inputs"
],
"additionalProperties": false,
"properties": {
@@ -32495,7 +32518,9 @@
}
},
"response": {
- "required": [],
+ "required": [
+ "perkw"
+ ],
"additionalProperties": false,
"properties": {
"perkw": {
@@ -32694,6 +32719,7 @@
"response": {
"required": [
"payment_preimage",
+ "destination",
"payment_hash",
"created_at",
"parts",
@@ -33595,7 +33621,8 @@
],
"request": {
"required": [
- "command"
+ "command",
+ "target/subcommand"
],
"additionalProperties": false,
"properties": {
@@ -34035,10 +34062,12 @@
"payment_preimage",
"payment_hash",
"created_at",
+ "groupid",
"parts",
"amount_msat",
"amount_sent_msat",
- "status"
+ "status",
+ "destination"
],
"additionalProperties": false,
"properties": {
@@ -34254,8 +34283,10 @@
"payment_hash",
"created_at",
"groupid",
+ "parts",
"amount_msat",
- "status"
+ "status",
+ "destination"
],
"properties": {
"bolt11": {
@@ -34798,7 +34829,6 @@
"response": {
"required": [
"label",
- "description",
"payment_hash",
"status",
"created_index",
@@ -35123,6 +35153,7 @@
"required": [
"created_index",
"id",
+ "groupid",
"payment_hash",
"status",
"created_at",
@@ -35272,7 +35303,9 @@
},
"then": {
"additionalProperties": false,
- "required": [],
+ "required": [
+ "message"
+ ],
"properties": {
"created_index": {},
"id": {},
@@ -35506,6 +35539,7 @@
"required": [
"id",
"created_index",
+ "groupid",
"payment_hash",
"status",
"created_at",
@@ -37410,7 +37444,6 @@
],
"request": {
"required": [
- "channel_id",
"psbt"
],
"additionalProperties": false,
@@ -37439,7 +37472,8 @@
"required": [
"tx",
"txid",
- "psbt"
+ "psbt",
+ "outnum"
],
"additionalProperties": false,
"properties": {
@@ -37760,7 +37794,10 @@
}
},
"response": {
- "required": [],
+ "required": [
+ "psbt",
+ "txid"
+ ],
"properties": {
"psbt": {
"type": "string",
@@ -37838,7 +37875,10 @@
}
},
"response": {
- "required": [],
+ "required": [
+ "psbt",
+ "txid"
+ ],
"properties": {
"psbt": {
"type": "string",
@@ -40664,6 +40704,7 @@
"required": [
"id",
"created_index",
+ "groupid",
"payment_hash",
"status",
"created_at",
@@ -41656,7 +41697,8 @@
"credit_msat",
"debit_msat",
"timestamp",
- "primary_tag"
+ "primary_tag",
+ "extra_tags"
],
"properties": {
"version": {
@@ -43751,11 +43793,11 @@
"The plugin can:",
"- accept the payment by returning `{\"result\": \"continue\"}`",
"- reject the payment with a generic error using `{\"result\": \"reject\"}`",
- "- reject the payment with a custom BOLT 4 failure message using the `failure_message` field",
+ "- reject the payment with a custom BOLT 4 failure message by returning only the `failure_message` field (i.e. without `result`)",
"",
- "If `failure_message` is provided, the payment will be failed with that message.",
- "If result is \"reject\" and no `failure_message` is provided, the payment fails with `incorrect_or_unknown_payment_details`.",
- "`failure_message` must NOT be provided when result is \"continue\".",
+ "If only `failure_message` is provided, the payment will be failed with that message.",
+ "If `result` is \"reject\"and no `failure_message` is provided, the payment fails with `incorrect_or_unknown_payment_details`.",
+ "`failure_message` is ignored if `result` is provided.",
"",
"Before version 23.11 the msat field was encoded as a string with an 'msat' suffix."
],
@@ -43802,9 +43844,7 @@
},
"response": {
"additionalProperties": false,
- "required": [
- "result"
- ],
+ "required": [],
"properties": {
"result": {
"type": "string",
@@ -43815,35 +43855,39 @@
"description": [
"Controls whether the payment is accepted or rejected.",
"\"continue\" accepts the payment.",
- "\"reject\" fails the payment."
+ "\"reject\" fails the payment with `incorrect_or_unknown_payment_details`."
]
},
"failure_message": {
"type": "hex",
"description": [
"Optional BOLT 4 failure message.",
- "Used to provide a specific failure reason when rejecting the payment."
+ "Only used when `result` is absent: the payment is rejected with this failure message.",
+ "Ignored if `result` is present."
]
}
},
"if": {
- "properties": {
- "result": {
- "type": "string",
- "enum": [
- "reject"
- ]
- }
- },
"required": [
"result"
]
},
"then": {
+ "additionalProperties": false,
+ "required": [],
"properties": {
- "failure_message": {
- "type": "hex"
- }
+ "result": {},
+ "failure_message": {}
+ }
+ },
+ "else": {
+ "additionalProperties": false,
+ "required": [
+ "failure_message"
+ ],
+ "properties": {
+ "result": {},
+ "failure_message": {}
}
}
},
@@ -43873,6 +43917,9 @@
"onion_message": {
"type": "object",
"additionalProperties": false,
+ "required": [
+ "unknown_fields"
+ ],
"properties": {
"reply_blindedpath": {
"type": "object",
@@ -43883,6 +43930,10 @@
"If present, plugins must use this path if they construct a reply onion message."
],
"additionalProperties": false,
+ "required": [
+ "first_path_key",
+ "hops"
+ ],
"properties": {
"first_node_id": {
"type": "pubkey",
@@ -44046,7 +44097,8 @@
"onion_message": {
"type": "object",
"required": [
- "pathsecret"
+ "pathsecret",
+ "unknown_fields"
],
"additionalProperties": false,
"properties": {
@@ -44068,6 +44120,10 @@
"If present, plugins must use this path if they construct a reply onion message."
],
"additionalProperties": false,
+ "required": [
+ "first_path_key",
+ "hops"
+ ],
"properties": {
"first_node_id": {
"type": "pubkey",
### contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py
[binary or diff unavailable]
### doc/reckless.7.md
@@ -4,7 +4,7 @@ reckless -- Issue a command to the reckless plugin manager utility
SYNOPSIS
--------
-**reckless** *command* [*target/subcommand*] [*target*]
+**reckless** *command* *target/subcommand* [*target*]
DESCRIPTION
-----------
@@ -16,7 +16,7 @@ The **reckless** RPC starts a reckless process with the *command* and *target* p
- *command* **uninstall** takes a *plugin\_name* and attempts to uninstall a plugin of the same name.
- *command* **search** takes a *plugin\_name* to search for a named plugin.
...
-- **target/subcommand** (one of, optional): Target of a reckless command or a subcommand.:
+- **target/subcommand** (one of): Target of a reckless command or a subcommand.:
- (string)
- (array)
- **target** (one of, optional): *name* of a plugin to install/uninstall/search/enable/disable or source to add/remove.:
### doc/schemas/askrene-create-layer.json
@@ -46,7 +46,9 @@
"created_channels",
"channel_updates",
"constraints",
- "impressions"
+ "impressions",
+ "biases",
+ "node_biases"
],
"properties": {
"layer": {
### doc/schemas/askrene-listlayers.json
@@ -37,7 +37,9 @@
"created_channels",
"channel_updates",
"impressions",
- "constraints"
+ "constraints",
+ "biases",
+ "node_biases"
],
"properties": {
"layer": {
### doc/schemas/bkpr-channelsapy.json
@@ -48,6 +48,7 @@
"our_start_balance_msat",
"channel_start_balance_msat",
"fees_out_msat",
+ "fees_in_msat",
"utilization_out",
"utilization_in",
"apy_out",
### doc/schemas/bkpr-editdescriptionbypaymentid.json
@@ -45,8 +45,7 @@
"credit_msat",
"debit_msat",
"currency",
- "timestamp",
- "description"
+ "timestamp"
],
"properties": {
"account": {
### doc/schemas/bkpr-report.json
@@ -10,7 +10,9 @@
"It has the useful property that when used with `lightning-cli` and the `escape=csv` it can directly produce valid CSV files."
],
"request": {
- "required": [],
+ "required": [
+ "format"
+ ],
"additionalProperties": false,
"properties": {
"format": {
@@ -97,6 +99,7 @@
},
"response": {
"required": [
+ "format-hint",
"report"
],
"additionalProperties": false,
### doc/schemas/createinvoice.json
@@ -47,7 +47,6 @@
"created_index",
"payment_hash",
"status",
- "description",
"expires_at"
],
"additionalProperties": false,
### doc/schemas/datastore.json
@@ -72,7 +72,9 @@
},
"response": {
"required": [
- "key"
+ "key",
+ "generation",
+ "hex"
],
"additionalProperties": false,
"properties": {
### doc/schemas/decode.json
@@ -646,7 +646,8 @@
],
"required": [
"period",
- "time_unit"
+ "time_unit",
+ "compulsory_field"
],
"additionalProperties": false,
"properties": {
@@ -1278,7 +1279,8 @@
],
"required": [
"period",
- "time_unit"
+ "time_unit",
+ "compulsory_field"
],
"additionalProperties": false,
"properties": {
### doc/schemas/deldatastore.json
@@ -40,7 +40,9 @@
},
"response": {
"required": [
- "key"
+ "key",
+ "generation",
+ "hex"
],
"additionalProperties": false,
"properties": {
### doc/schemas/delpay.json
@@ -66,7 +66,8 @@
"payment_hash",
"status",
"amount_sent_msat",
- "created_at"
+ "created_at",
+ "groupid"
],
"properties": {
"created_index": {
### doc/schemas/feerates.json
@@ -277,6 +277,7 @@
"opening_channel_satoshis",
"mutual_close_satoshis",
"unilateral_close_satoshis",
+ "unilateral_close_nonanchor_satoshis",
"htlc_timeout_satoshis",
"htlc_success_satoshis"
],
### doc/schemas/fundchannel_start.json
@@ -92,6 +92,7 @@
"required": [
"funding_address",
"scriptpubkey",
+ "channel_type",
"warning_usage"
],
"additionalProperties": false,
### doc/schemas/help.json
@@ -22,7 +22,8 @@
},
"response": {
"required": [
- "help"
+ "help",
+ "format-hint"
],
"additionalProperties": false,
"properties": {
### doc/schemas/hook/invoice_payment.json
@@ -12,11 +12,11 @@
"The plugin can:",
"- accept the payment by returning `{\"result\": \"continue\"}`",
"- reject the payment with a generic error using `{\"result\": \"reject\"}`",
- "- reject the payment with a custom BOLT 4 failure message using the `failure_message` field",
+ "- reject the payment with a custom BOLT 4 failure message by returning only the `failure_message` field (i.e. without `result`)",
"",
- "If `failure_message` is provided, the payment will be failed with that message.",
- "If result is \"reject\" and no `failure_message` is provided, the payment fails with `incorrect_or_unknown_payment_details`.",
- "`failure_message` must NOT be provided when result is \"continue\".",
+ "If only `failure_message` is provided, the payment will be failed with that message.",
+ "If `result` is \"reject\"and no `failure_message` is provided, the payment fails with `incorrect_or_unknown_payment_details`.",
+ "`failure_message` is ignored if `result` is provided.",
"",
"Before version 23.11 the msat field was encoded as a string with an 'msat' suffix."
],
@@ -63,9 +63,7 @@
},
"response": {
"additionalProperties": false,
- "required": [
- "result"
- ],
+ "required": [],
"properties": {
"result": {
"type": "string",
@@ -76,35 +74,39 @@
"description": [
"Controls whether the payment is accepted or rejected.",
"\"continue\" accepts the payment.",
- "\"reject\" fails the payment."
+ "\"reject\" fails the payment with `incorrect_or_unknown_payment_details`."
]
},
"failure_message": {
"type": "hex",
"description": [
"Optional BOLT 4 failure message.",
- "Used to provide a specific failure reason when rejecting the payment."
+ "Only used when `result` is absent: the payment is rejected with this failure message.",
+ "Ignored if `result` is present."
]
}
},
"if": {
- "properties": {
- "result": {
- "type": "string",
- "enum": [
- "reject"
- ]
- }
- },
"required": [
"result"
]
},
"then": {
+ "additionalProperties": false,
+ "required": [],
+ "properties": {
+ "result": {},
+ "failure_message": {}
+ }
+ },
+ "else": {
+ "additionalProperties": false,
+ "required": [
+ "failure_message"
+ ],
"properties": {
- "failure_message": {
- "type": "hex"
- }
+ "result": {},
+ "failure_message": {}
}
}
},
### doc/schemas/hook/onion_message_recv.json
@@ -20,6 +20,9 @@
"onion_message": {
"type": "object",
"additionalProperties": false,
+ "required": [
+ "unknown_fields"
+ ],
"properties": {
"reply_blindedpath": {
"type": "object",
@@ -30,6 +33,10 @@
"If present, plugins must use this path if they construct a reply onion message."
],
"additionalProperties": false,
+ "required": [
+ "first_path_key",
+ "hops"
+ ],
"properties": {
"first_node_id": {
"type": "pubkey",
### doc/schemas/hook/onion_message_recv_secret.json
@@ -22,7 +22,8 @@
"onion_message": {
"type": "object",
"required": [
- "pathsecret"
+ "pathsecret",
+ "unknown_fields"
],
"additionalProperties": false,
"properties": {
@@ -44,6 +45,10 @@
"If present, plugins must use this path if they construct a reply onion message."
],
"additionalProperties": false,
+ "required": [
+ "first_path_key",
+ "hops"
+ ],
"properties": {
"first_node_id": {
"type": "pubkey",
### doc/schemas/invoicerequest.json
@@ -9,8 +9,7 @@
],
"request": {
"required": [
- "amount",
- "description"
+ "amount"
],
"additionalProperties": false,
"properties": {
### doc/schemas/listchannels.json
@@ -61,6 +61,7 @@
"fee_per_millionth",
"delay",
"htlc_minimum_msat",
+ "htlc_maximum_msat",
"features"
],
"properties": {
### doc/schemas/listclosedchannels.json
@@ -37,6 +37,7 @@
"channel_id",
"opener",
"private",
+ "channel_type",
"total_msat",
"total_local_commitments",
"total_remote_commitments",
### doc/schemas/listconfigs.json
@@ -22,7 +22,9 @@
}
},
"response": {
- "required": [],
+ "required": [
+ "configs"
+ ],
"additionalProperties": false,
"properties": {
"configs": {
### doc/schemas/listpays.json
@@ -81,7 +81,8 @@
"payment_hash",
"status",
"created_at",
- "created_index"
+ "created_index",
+ "amount_sent_msat"
],
"properties": {
"payment_hash": {
@@ -174,7 +175,6 @@
"then": {
"additionalProperties": false,
"required": [
- "amount_sent_msat",
"preimage"
],
"properties": {
@@ -230,9 +230,7 @@
},
"then": {
"additionalProperties": false,
- "required": [
- "amount_sent_msat"
- ],
+ "required": [],
"properties": {
"created_index": {},
"updated_index": {},
### doc/schemas/listpeerchannels.json
@@ -52,11 +52,12 @@
"type": "object",
"additionalProperties": true,
"required": [
+ "peer_id",
+ "peer_connected",
"state",
+ "channel_type",
"opener",
- "features",
- "peer_connected",
- "peer_id"
+ "features"
],
"properties": {
"peer_id": {
### doc/schemas/listpeers.json
@@ -56,7 +56,8 @@
"required": [
"id",
"connected",
- "num_channels"
+ "num_channels",
+ "features"
],
"properties": {
"id": {
### doc/schemas/multifundchannel.json
@@ -129,7 +129,8 @@
"required": [
"tx",
"txid",
- "channel_ids"
+ "channel_ids",
+ "failed"
],
"additionalProperties": false,
"properties": {
### doc/schemas/notification/coin_movement.json
@@ -20,7 +20,8 @@
"credit_msat",
"debit_msat",
"timestamp",
- "primary_tag"
+ "primary_tag",
+ "extra_tags"
],
"properties": {
"version": {
### doc/schemas/offer.json
@@ -126,6 +126,7 @@
"single_use",
"bolt12",
"used",
+ "force_paths",
"created"
],
"additionalProperties": false,
### doc/schemas/openchannel_bump.json
@@ -49,7 +49,8 @@
"channel_type",
"psbt",
"commitments_secured",
- "funding_serial"
+ "funding_serial",
+ "requires_confirmed_inputs"
],
"additionalProperties": false,
"properties": {
### doc/schemas/openchannel_init.json
@@ -89,7 +89,8 @@
"psbt",
"channel_type",
"commitments_secured",
- "funding_serial"
+ "funding_serial",
+ "requires_confirmed_inputs"
],
"additionalProperties": false,
"properties": {
### doc/schemas/parsefeerate.json
@@ -21,7 +21,9 @@
}
},
"response": {
- "required": [],
+ "required": [
+ "perkw"
+ ],
"additionalProperties": false,
"properties": {
"perkw": {
### doc/schemas/pay.json
@@ -123,6 +123,7 @@
"response": {
"required": [
"payment_preimage",
+ "destination",
"payment_hash",
"created_at",
"parts",
### doc/schemas/reckless.json
@@ -8,7 +8,8 @@
],
"request": {
"required": [
- "command"
+ "command",
+ "target/subcommand"
],
"additionalProperties": false,
"properties": {
### doc/schemas/renepay.json
@@ -95,10 +95,12 @@
"payment_preimage",
"payment_hash",
"created_at",
+ "groupid",
"parts",
"amount_msat",
"amount_sent_msat",
- "status"
+ "status",
+ "destination"
],
"additionalProperties": false,
"properties": {
### doc/schemas/renepaystatus.json
@@ -46,8 +46,10 @@
"payment_hash",
"created_at",
"groupid",
+ "parts",
"amount_msat",
- "status"
+ "status",
+ "destination"
],
"properties": {
"bolt11": {
### doc/schemas/sendinvoice.json
@@ -52,7 +52,6 @@
"response": {
"required": [
"label",
- "description",
"payment_hash",
"status",
"created_index",
### doc/schemas/sendonion.json
@@ -142,6 +142,7 @@
"required": [
"created_index",
"id",
+ "groupid",
"payment_hash",
"status",
"created_at",
@@ -291,7 +292,9 @@
},
"then": {
"additionalProperties": false,
- "required": [],
+ "required": [
+ "message"
+ ],
"properties": {
"created_index": {},
"id": {},
### doc/schemas/sendpay.json
@@ -152,6 +152,7 @@
"required": [
"id",
"created_index",
+ "groupid",
"payment_hash",
"status",
"created_at",
### doc/schemas/splice_signed.json
@@ -11,7 +11,6 @@
],
"request": {
"required": [
- "channel_id",
"psbt"
],
"additionalProperties": false,
@@ -40,7 +39,8 @@
"required": [
"tx",
"txid",
- "psbt"
+ "psbt",
+ "outnum"
],
"additionalProperties": false,
"properties": {
### doc/schemas/splicein.json
@@ -29,7 +29,10 @@
}
},
"response": {
- "required": [],
+ "required": [
+ "psbt",
+ "txid"
+ ],
"properties": {
"psbt": {
"type": "string",
### doc/schemas/spliceout.json
@@ -41,7 +41,10 @@
}
},
"response": {
- "required": [],
+ "required": [
+ "psbt",
+ "txid"
+ ],
"properties": {
"psbt": {
"type": "string",
### doc/schemas/waitsendpay.json
@@ -50,6 +50,7 @@
"required": [
"id",
"created_index",
+ "groupid",
"payment_hash",
"status",
"created_at",
### plugins/lsps-plugin/src/client.rs
@@ -788,12 +788,14 @@ async fn check_peer_lsp_status(
};
let connected = peer.connected;
- let has_lsp_feature = if let Some(f_str) = &peer.features {
- let feature_bits = hex::decode(f_str)
- .map_err(|e| anyhow!("Invalid feature bits hex for peer {peer_id}, {f_str}: {e}"))?;
+ let has_lsp_feature = {
+ let feature_bits = hex::decode(&peer.features).map_err(|e| {
+ anyhow!(
+ "Invalid feature bits hex for peer {peer_id}, {}: {e}",
+ peer.features
+ )
+ })?;
is_feature_bit_set_reversed(&feature_bits, LSP_FEATURE_BIT)
- } else {
- false
};
Ok(PeerLspStatus {
### plugins/wss-proxy-plugin/src/options.rs
@@ -81,7 +81,6 @@ pub async fn parse_options(
})
.await?
.configs
- .ok_or_else(|| anyhow!("Could not get configs object. CLN version too old?"))?
.bind_addr;
let mut ws_address: Option<SocketAddr> = None;Why this scored 37/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.