mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-21 14:24:09 +01:00
msggen: add methods autoclean-once and autoclean-status, fix bkpr-listincome
Changelog-None
This commit is contained in:
parent
e418d0c08c
commit
c80a70de25
13 changed files with 1589 additions and 470 deletions
279
.msggen.json
279
.msggen.json
|
@ -401,6 +401,89 @@
|
|||
"AddgossipRequest": {
|
||||
"AddGossip.message": 1
|
||||
},
|
||||
"Autoclean-onceAutoclean": {
|
||||
"AutoClean-Once.autoclean.expiredinvoices": 6,
|
||||
"AutoClean-Once.autoclean.failedforwards": 2,
|
||||
"AutoClean-Once.autoclean.failedpays": 4,
|
||||
"AutoClean-Once.autoclean.paidinvoices": 5,
|
||||
"AutoClean-Once.autoclean.succeededforwards": 1,
|
||||
"AutoClean-Once.autoclean.succeededpays": 3
|
||||
},
|
||||
"Autoclean-onceAutocleanExpiredinvoices": {
|
||||
"AutoClean-Once.autoclean.expiredinvoices.cleaned": 1,
|
||||
"AutoClean-Once.autoclean.expiredinvoices.uncleaned": 2
|
||||
},
|
||||
"Autoclean-onceAutocleanFailedforwards": {
|
||||
"AutoClean-Once.autoclean.failedforwards.cleaned": 1,
|
||||
"AutoClean-Once.autoclean.failedforwards.uncleaned": 2
|
||||
},
|
||||
"Autoclean-onceAutocleanFailedpays": {
|
||||
"AutoClean-Once.autoclean.failedpays.cleaned": 1,
|
||||
"AutoClean-Once.autoclean.failedpays.uncleaned": 2
|
||||
},
|
||||
"Autoclean-onceAutocleanPaidinvoices": {
|
||||
"AutoClean-Once.autoclean.paidinvoices.cleaned": 1,
|
||||
"AutoClean-Once.autoclean.paidinvoices.uncleaned": 2
|
||||
},
|
||||
"Autoclean-onceAutocleanSucceededforwards": {
|
||||
"AutoClean-Once.autoclean.succeededforwards.cleaned": 1,
|
||||
"AutoClean-Once.autoclean.succeededforwards.uncleaned": 2
|
||||
},
|
||||
"Autoclean-onceAutocleanSucceededpays": {
|
||||
"AutoClean-Once.autoclean.succeededpays.cleaned": 1,
|
||||
"AutoClean-Once.autoclean.succeededpays.uncleaned": 2
|
||||
},
|
||||
"Autoclean-onceRequest": {
|
||||
"AutoClean-Once.age": 2,
|
||||
"AutoClean-Once.subsystem": 1
|
||||
},
|
||||
"Autoclean-onceResponse": {
|
||||
"AutoClean-Once.autoclean": 1
|
||||
},
|
||||
"Autoclean-statusAutoclean": {
|
||||
"AutoClean-Status.autoclean.expiredinvoices": 6,
|
||||
"AutoClean-Status.autoclean.failedforwards": 2,
|
||||
"AutoClean-Status.autoclean.failedpays": 4,
|
||||
"AutoClean-Status.autoclean.paidinvoices": 5,
|
||||
"AutoClean-Status.autoclean.succeededforwards": 1,
|
||||
"AutoClean-Status.autoclean.succeededpays": 3
|
||||
},
|
||||
"Autoclean-statusAutocleanExpiredinvoices": {
|
||||
"AutoClean-Status.autoclean.expiredinvoices.age": 3,
|
||||
"AutoClean-Status.autoclean.expiredinvoices.cleaned": 2,
|
||||
"AutoClean-Status.autoclean.expiredinvoices.enabled": 1
|
||||
},
|
||||
"Autoclean-statusAutocleanFailedforwards": {
|
||||
"AutoClean-Status.autoclean.failedforwards.age": 3,
|
||||
"AutoClean-Status.autoclean.failedforwards.cleaned": 2,
|
||||
"AutoClean-Status.autoclean.failedforwards.enabled": 1
|
||||
},
|
||||
"Autoclean-statusAutocleanFailedpays": {
|
||||
"AutoClean-Status.autoclean.failedpays.age": 3,
|
||||
"AutoClean-Status.autoclean.failedpays.cleaned": 2,
|
||||
"AutoClean-Status.autoclean.failedpays.enabled": 1
|
||||
},
|
||||
"Autoclean-statusAutocleanPaidinvoices": {
|
||||
"AutoClean-Status.autoclean.paidinvoices.age": 3,
|
||||
"AutoClean-Status.autoclean.paidinvoices.cleaned": 2,
|
||||
"AutoClean-Status.autoclean.paidinvoices.enabled": 1
|
||||
},
|
||||
"Autoclean-statusAutocleanSucceededforwards": {
|
||||
"AutoClean-Status.autoclean.succeededforwards.age": 3,
|
||||
"AutoClean-Status.autoclean.succeededforwards.cleaned": 2,
|
||||
"AutoClean-Status.autoclean.succeededforwards.enabled": 1
|
||||
},
|
||||
"Autoclean-statusAutocleanSucceededpays": {
|
||||
"AutoClean-Status.autoclean.succeededpays.age": 3,
|
||||
"AutoClean-Status.autoclean.succeededpays.cleaned": 2,
|
||||
"AutoClean-Status.autoclean.succeededpays.enabled": 1
|
||||
},
|
||||
"Autoclean-statusRequest": {
|
||||
"AutoClean-Status.subsystem": 1
|
||||
},
|
||||
"Autoclean-statusResponse": {
|
||||
"AutoClean-Status.autoclean": 1
|
||||
},
|
||||
"AutocleaninvoiceRequest": {
|
||||
"AutoCleanInvoice.cycle_seconds": 2,
|
||||
"AutoCleanInvoice.expired_by": 1
|
||||
|
@ -2129,6 +2212,202 @@
|
|||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": null
|
||||
},
|
||||
"AutoClean-Once.age": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.expiredinvoices": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.expiredinvoices.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.expiredinvoices.uncleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.failedforwards": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.failedforwards.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.failedforwards.uncleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.failedpays": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.failedpays.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.failedpays.uncleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.paidinvoices": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.paidinvoices.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.paidinvoices.uncleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.succeededforwards": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.succeededforwards.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.succeededforwards.uncleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.succeededpays": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.succeededpays.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.autoclean.succeededpays.uncleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Once.subsystem": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": null
|
||||
},
|
||||
"AutoClean-Status.autoclean": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.expiredinvoices": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.expiredinvoices.age": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.expiredinvoices.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.expiredinvoices.enabled": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.failedforwards": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.failedforwards.age": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.failedforwards.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.failedforwards.enabled": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.failedpays": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.failedpays.age": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.failedpays.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.failedpays.enabled": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.paidinvoices": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.paidinvoices.age": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.paidinvoices.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.paidinvoices.enabled": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.succeededforwards": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.succeededforwards.age": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.succeededforwards.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.succeededforwards.enabled": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.succeededpays": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.succeededpays.age": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.succeededpays.cleaned": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.autoclean.succeededpays.enabled": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoClean-Status.subsystem": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": false
|
||||
},
|
||||
"AutoCleanInvoice": {
|
||||
"added": "pre-v0.10.1",
|
||||
"deprecated": null
|
||||
|
|
103
cln-grpc/proto/node.proto
generated
103
cln-grpc/proto/node.proto
generated
|
@ -15,6 +15,8 @@ service Node {
|
|||
rpc ListChannels(ListchannelsRequest) returns (ListchannelsResponse) {}
|
||||
rpc AddGossip(AddgossipRequest) returns (AddgossipResponse) {}
|
||||
rpc AutoCleanInvoice(AutocleaninvoiceRequest) returns (AutocleaninvoiceResponse) {}
|
||||
rpc AutoCleanOnce(AutocleanonceRequest) returns (AutocleanonceResponse) {}
|
||||
rpc AutoCleanStatus(AutocleanstatusRequest) returns (AutocleanstatusResponse) {}
|
||||
rpc CheckMessage(CheckmessageRequest) returns (CheckmessageResponse) {}
|
||||
rpc Close(CloseRequest) returns (CloseResponse) {}
|
||||
rpc ConnectPeer(ConnectRequest) returns (ConnectResponse) {}
|
||||
|
@ -321,6 +323,107 @@ message AutocleaninvoiceResponse {
|
|||
optional uint64 cycle_seconds = 3;
|
||||
}
|
||||
|
||||
message AutocleanonceRequest {
|
||||
AutocleanSubsystem subsystem = 1;
|
||||
uint64 age = 2;
|
||||
}
|
||||
|
||||
message AutocleanonceResponse {
|
||||
AutocleanonceAutoclean autoclean = 1;
|
||||
}
|
||||
|
||||
message AutocleanonceAutoclean {
|
||||
optional AutocleanonceAutocleanSucceededforwards succeededforwards = 1;
|
||||
optional AutocleanonceAutocleanFailedforwards failedforwards = 2;
|
||||
optional AutocleanonceAutocleanSucceededpays succeededpays = 3;
|
||||
optional AutocleanonceAutocleanFailedpays failedpays = 4;
|
||||
optional AutocleanonceAutocleanPaidinvoices paidinvoices = 5;
|
||||
optional AutocleanonceAutocleanExpiredinvoices expiredinvoices = 6;
|
||||
}
|
||||
|
||||
message AutocleanonceAutocleanSucceededforwards {
|
||||
uint64 cleaned = 1;
|
||||
uint64 uncleaned = 2;
|
||||
}
|
||||
|
||||
message AutocleanonceAutocleanFailedforwards {
|
||||
uint64 cleaned = 1;
|
||||
uint64 uncleaned = 2;
|
||||
}
|
||||
|
||||
message AutocleanonceAutocleanSucceededpays {
|
||||
uint64 cleaned = 1;
|
||||
uint64 uncleaned = 2;
|
||||
}
|
||||
|
||||
message AutocleanonceAutocleanFailedpays {
|
||||
uint64 cleaned = 1;
|
||||
uint64 uncleaned = 2;
|
||||
}
|
||||
|
||||
message AutocleanonceAutocleanPaidinvoices {
|
||||
uint64 cleaned = 1;
|
||||
uint64 uncleaned = 2;
|
||||
}
|
||||
|
||||
message AutocleanonceAutocleanExpiredinvoices {
|
||||
uint64 cleaned = 1;
|
||||
uint64 uncleaned = 2;
|
||||
}
|
||||
|
||||
message AutocleanstatusRequest {
|
||||
optional AutocleanSubsystem subsystem = 1;
|
||||
}
|
||||
|
||||
message AutocleanstatusResponse {
|
||||
AutocleanstatusAutoclean autoclean = 1;
|
||||
}
|
||||
|
||||
message AutocleanstatusAutoclean {
|
||||
optional AutocleanstatusAutocleanSucceededforwards succeededforwards = 1;
|
||||
optional AutocleanstatusAutocleanFailedforwards failedforwards = 2;
|
||||
optional AutocleanstatusAutocleanSucceededpays succeededpays = 3;
|
||||
optional AutocleanstatusAutocleanFailedpays failedpays = 4;
|
||||
optional AutocleanstatusAutocleanPaidinvoices paidinvoices = 5;
|
||||
optional AutocleanstatusAutocleanExpiredinvoices expiredinvoices = 6;
|
||||
}
|
||||
|
||||
message AutocleanstatusAutocleanSucceededforwards {
|
||||
bool enabled = 1;
|
||||
uint64 cleaned = 2;
|
||||
optional uint64 age = 3;
|
||||
}
|
||||
|
||||
message AutocleanstatusAutocleanFailedforwards {
|
||||
bool enabled = 1;
|
||||
uint64 cleaned = 2;
|
||||
optional uint64 age = 3;
|
||||
}
|
||||
|
||||
message AutocleanstatusAutocleanSucceededpays {
|
||||
bool enabled = 1;
|
||||
uint64 cleaned = 2;
|
||||
optional uint64 age = 3;
|
||||
}
|
||||
|
||||
message AutocleanstatusAutocleanFailedpays {
|
||||
bool enabled = 1;
|
||||
uint64 cleaned = 2;
|
||||
optional uint64 age = 3;
|
||||
}
|
||||
|
||||
message AutocleanstatusAutocleanPaidinvoices {
|
||||
bool enabled = 1;
|
||||
uint64 cleaned = 2;
|
||||
optional uint64 age = 3;
|
||||
}
|
||||
|
||||
message AutocleanstatusAutocleanExpiredinvoices {
|
||||
bool enabled = 1;
|
||||
uint64 cleaned = 2;
|
||||
optional uint64 age = 3;
|
||||
}
|
||||
|
||||
message CheckmessageRequest {
|
||||
string message = 1;
|
||||
string zbase = 2;
|
||||
|
|
|
@ -115,3 +115,12 @@ enum ChannelTypeName {
|
|||
scid_alias_even = 3;
|
||||
zeroconf_even = 4;
|
||||
}
|
||||
|
||||
enum AutocleanSubsystem {
|
||||
SUCCEEDEDFORWARDS = 0;
|
||||
FAILEDFORWARDS = 1;
|
||||
SUCCEEDEDPAYS = 2;
|
||||
FAILEDPAYS = 3;
|
||||
PAIDINVOICES = 4;
|
||||
EXPIREDINVOICES = 5;
|
||||
}
|
||||
|
|
210
cln-grpc/src/convert.rs
generated
210
cln-grpc/src/convert.rs
generated
|
@ -242,6 +242,178 @@ impl From<responses::AutocleaninvoiceResponse> for pb::AutocleaninvoiceResponse
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanonceAutocleanExpiredinvoices> for pb::AutocleanonceAutocleanExpiredinvoices {
|
||||
fn from(c: responses::AutocleanonceAutocleanExpiredinvoices) -> Self {
|
||||
Self {
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
uncleaned: c.uncleaned, // Rule #2 for type u64
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanonceAutocleanFailedforwards> for pb::AutocleanonceAutocleanFailedforwards {
|
||||
fn from(c: responses::AutocleanonceAutocleanFailedforwards) -> Self {
|
||||
Self {
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
uncleaned: c.uncleaned, // Rule #2 for type u64
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanonceAutocleanFailedpays> for pb::AutocleanonceAutocleanFailedpays {
|
||||
fn from(c: responses::AutocleanonceAutocleanFailedpays) -> Self {
|
||||
Self {
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
uncleaned: c.uncleaned, // Rule #2 for type u64
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanonceAutocleanPaidinvoices> for pb::AutocleanonceAutocleanPaidinvoices {
|
||||
fn from(c: responses::AutocleanonceAutocleanPaidinvoices) -> Self {
|
||||
Self {
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
uncleaned: c.uncleaned, // Rule #2 for type u64
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanonceAutocleanSucceededforwards> for pb::AutocleanonceAutocleanSucceededforwards {
|
||||
fn from(c: responses::AutocleanonceAutocleanSucceededforwards) -> Self {
|
||||
Self {
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
uncleaned: c.uncleaned, // Rule #2 for type u64
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanonceAutocleanSucceededpays> for pb::AutocleanonceAutocleanSucceededpays {
|
||||
fn from(c: responses::AutocleanonceAutocleanSucceededpays) -> Self {
|
||||
Self {
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
uncleaned: c.uncleaned, // Rule #2 for type u64
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanonceAutoclean> for pb::AutocleanonceAutoclean {
|
||||
fn from(c: responses::AutocleanonceAutoclean) -> Self {
|
||||
Self {
|
||||
expiredinvoices: c.expiredinvoices.map(|v| v.into()),
|
||||
failedforwards: c.failedforwards.map(|v| v.into()),
|
||||
failedpays: c.failedpays.map(|v| v.into()),
|
||||
paidinvoices: c.paidinvoices.map(|v| v.into()),
|
||||
succeededforwards: c.succeededforwards.map(|v| v.into()),
|
||||
succeededpays: c.succeededpays.map(|v| v.into()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanonceResponse> for pb::AutocleanonceResponse {
|
||||
fn from(c: responses::AutocleanonceResponse) -> Self {
|
||||
Self {
|
||||
autoclean: Some(c.autoclean.into()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanstatusAutocleanExpiredinvoices> for pb::AutocleanstatusAutocleanExpiredinvoices {
|
||||
fn from(c: responses::AutocleanstatusAutocleanExpiredinvoices) -> Self {
|
||||
Self {
|
||||
age: c.age, // Rule #2 for type u64?
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
enabled: c.enabled, // Rule #2 for type boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanstatusAutocleanFailedforwards> for pb::AutocleanstatusAutocleanFailedforwards {
|
||||
fn from(c: responses::AutocleanstatusAutocleanFailedforwards) -> Self {
|
||||
Self {
|
||||
age: c.age, // Rule #2 for type u64?
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
enabled: c.enabled, // Rule #2 for type boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanstatusAutocleanFailedpays> for pb::AutocleanstatusAutocleanFailedpays {
|
||||
fn from(c: responses::AutocleanstatusAutocleanFailedpays) -> Self {
|
||||
Self {
|
||||
age: c.age, // Rule #2 for type u64?
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
enabled: c.enabled, // Rule #2 for type boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanstatusAutocleanPaidinvoices> for pb::AutocleanstatusAutocleanPaidinvoices {
|
||||
fn from(c: responses::AutocleanstatusAutocleanPaidinvoices) -> Self {
|
||||
Self {
|
||||
age: c.age, // Rule #2 for type u64?
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
enabled: c.enabled, // Rule #2 for type boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanstatusAutocleanSucceededforwards> for pb::AutocleanstatusAutocleanSucceededforwards {
|
||||
fn from(c: responses::AutocleanstatusAutocleanSucceededforwards) -> Self {
|
||||
Self {
|
||||
age: c.age, // Rule #2 for type u64?
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
enabled: c.enabled, // Rule #2 for type boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanstatusAutocleanSucceededpays> for pb::AutocleanstatusAutocleanSucceededpays {
|
||||
fn from(c: responses::AutocleanstatusAutocleanSucceededpays) -> Self {
|
||||
Self {
|
||||
age: c.age, // Rule #2 for type u64?
|
||||
cleaned: c.cleaned, // Rule #2 for type u64
|
||||
enabled: c.enabled, // Rule #2 for type boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanstatusAutoclean> for pb::AutocleanstatusAutoclean {
|
||||
fn from(c: responses::AutocleanstatusAutoclean) -> Self {
|
||||
Self {
|
||||
expiredinvoices: c.expiredinvoices.map(|v| v.into()),
|
||||
failedforwards: c.failedforwards.map(|v| v.into()),
|
||||
failedpays: c.failedpays.map(|v| v.into()),
|
||||
paidinvoices: c.paidinvoices.map(|v| v.into()),
|
||||
succeededforwards: c.succeededforwards.map(|v| v.into()),
|
||||
succeededpays: c.succeededpays.map(|v| v.into()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::AutocleanstatusResponse> for pb::AutocleanstatusResponse {
|
||||
fn from(c: responses::AutocleanstatusResponse) -> Self {
|
||||
Self {
|
||||
autoclean: Some(c.autoclean.into()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<responses::CheckmessageResponse> for pb::CheckmessageResponse {
|
||||
fn from(c: responses::CheckmessageResponse) -> Self {
|
||||
|
@ -2091,6 +2263,25 @@ impl From<requests::AutocleaninvoiceRequest> for pb::AutocleaninvoiceRequest {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<requests::AutocleanonceRequest> for pb::AutocleanonceRequest {
|
||||
fn from(c: requests::AutocleanonceRequest) -> Self {
|
||||
Self {
|
||||
age: c.age, // Rule #2 for type u64
|
||||
subsystem: c.subsystem as i32,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<requests::AutocleanstatusRequest> for pb::AutocleanstatusRequest {
|
||||
fn from(c: requests::AutocleanstatusRequest) -> Self {
|
||||
Self {
|
||||
subsystem: c.subsystem.map(|v| v as i32),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<requests::CheckmessageRequest> for pb::CheckmessageRequest {
|
||||
fn from(c: requests::CheckmessageRequest) -> Self {
|
||||
|
@ -2988,6 +3179,25 @@ impl From<pb::AutocleaninvoiceRequest> for requests::AutocleaninvoiceRequest {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<pb::AutocleanonceRequest> for requests::AutocleanonceRequest {
|
||||
fn from(c: pb::AutocleanonceRequest) -> Self {
|
||||
Self {
|
||||
age: c.age, // Rule #1 for type u64
|
||||
subsystem: c.subsystem.try_into().unwrap(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<pb::AutocleanstatusRequest> for requests::AutocleanstatusRequest {
|
||||
fn from(c: pb::AutocleanstatusRequest) -> Self {
|
||||
Self {
|
||||
subsystem: c.subsystem.map(|v| v.try_into().unwrap()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unused_variables)]
|
||||
impl From<pb::CheckmessageRequest> for requests::CheckmessageRequest {
|
||||
fn from(c: pb::CheckmessageRequest) -> Self {
|
||||
|
|
|
@ -250,6 +250,70 @@ async fn auto_clean_invoice(
|
|||
|
||||
}
|
||||
|
||||
async fn auto_clean_once(
|
||||
&self,
|
||||
request: tonic::Request<pb::AutocleanonceRequest>,
|
||||
) -> Result<tonic::Response<pb::AutocleanonceResponse>, tonic::Status> {
|
||||
let req = request.into_inner();
|
||||
let req: requests::AutocleanonceRequest = req.into();
|
||||
debug!("Client asked for auto_clean_once");
|
||||
trace!("auto_clean_once 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::AutoCleanOnce(req))
|
||||
.await
|
||||
.map_err(|e| Status::new(
|
||||
Code::Unknown,
|
||||
format!("Error calling method AutoCleanOnce: {:?}", e)))?;
|
||||
match result {
|
||||
Response::AutoCleanOnce(r) => {
|
||||
trace!("auto_clean_once response: {:?}", r);
|
||||
Ok(tonic::Response::new(r.into()))
|
||||
},
|
||||
r => Err(Status::new(
|
||||
Code::Internal,
|
||||
format!(
|
||||
"Unexpected result {:?} to method call AutoCleanOnce",
|
||||
r
|
||||
)
|
||||
)),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async fn auto_clean_status(
|
||||
&self,
|
||||
request: tonic::Request<pb::AutocleanstatusRequest>,
|
||||
) -> Result<tonic::Response<pb::AutocleanstatusResponse>, tonic::Status> {
|
||||
let req = request.into_inner();
|
||||
let req: requests::AutocleanstatusRequest = req.into();
|
||||
debug!("Client asked for auto_clean_status");
|
||||
trace!("auto_clean_status 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::AutoCleanStatus(req))
|
||||
.await
|
||||
.map_err(|e| Status::new(
|
||||
Code::Unknown,
|
||||
format!("Error calling method AutoCleanStatus: {:?}", e)))?;
|
||||
match result {
|
||||
Response::AutoCleanStatus(r) => {
|
||||
trace!("auto_clean_status response: {:?}", r);
|
||||
Ok(tonic::Response::new(r.into()))
|
||||
},
|
||||
r => Err(Status::new(
|
||||
Code::Internal,
|
||||
format!(
|
||||
"Unexpected result {:?} to method call AutoCleanStatus",
|
||||
r
|
||||
)
|
||||
)),
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async fn check_message(
|
||||
&self,
|
||||
request: tonic::Request<pb::CheckmessageRequest>,
|
||||
|
|
203
cln-rpc/src/model.rs
generated
203
cln-rpc/src/model.rs
generated
|
@ -24,6 +24,10 @@ pub enum Request {
|
|||
ListChannels(requests::ListchannelsRequest),
|
||||
AddGossip(requests::AddgossipRequest),
|
||||
AutoCleanInvoice(requests::AutocleaninvoiceRequest),
|
||||
#[serde(rename = "autoclean-once")]
|
||||
AutoCleanOnce(requests::AutocleanonceRequest),
|
||||
#[serde(rename = "autoclean-status")]
|
||||
AutoCleanStatus(requests::AutocleanstatusRequest),
|
||||
CheckMessage(requests::CheckmessageRequest),
|
||||
Close(requests::CloseRequest),
|
||||
Connect(requests::ConnectRequest),
|
||||
|
@ -101,6 +105,10 @@ pub enum Response {
|
|||
ListChannels(responses::ListchannelsResponse),
|
||||
AddGossip(responses::AddgossipResponse),
|
||||
AutoCleanInvoice(responses::AutocleaninvoiceResponse),
|
||||
#[serde(rename = "autoclean-once")]
|
||||
AutoCleanOnce(responses::AutocleanonceResponse),
|
||||
#[serde(rename = "autoclean-status")]
|
||||
AutoCleanStatus(responses::AutocleanstatusResponse),
|
||||
CheckMessage(responses::CheckmessageResponse),
|
||||
Close(responses::CloseResponse),
|
||||
Connect(responses::ConnectResponse),
|
||||
|
@ -418,6 +426,53 @@ pub mod requests {
|
|||
}
|
||||
}
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanonceRequest {
|
||||
// Path `AutoClean-Once.subsystem`
|
||||
pub subsystem: AutocleanSubsystem,
|
||||
pub age: u64,
|
||||
}
|
||||
|
||||
impl From<AutocleanonceRequest> for Request {
|
||||
fn from(r: AutocleanonceRequest) -> Self {
|
||||
Request::AutoCleanOnce(r)
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoRequest for AutocleanonceRequest {
|
||||
type Response = super::responses::AutocleanonceResponse;
|
||||
}
|
||||
|
||||
impl TypedRequest for AutocleanonceRequest {
|
||||
type Response = super::responses::AutocleanonceResponse;
|
||||
|
||||
fn method(&self) -> &str {
|
||||
"autoclean-once"
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanstatusRequest {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub subsystem: Option<AutocleanSubsystem>,
|
||||
}
|
||||
|
||||
impl From<AutocleanstatusRequest> for Request {
|
||||
fn from(r: AutocleanstatusRequest) -> Self {
|
||||
Request::AutoCleanStatus(r)
|
||||
}
|
||||
}
|
||||
|
||||
impl IntoRequest for AutocleanstatusRequest {
|
||||
type Response = super::responses::AutocleanstatusResponse;
|
||||
}
|
||||
|
||||
impl TypedRequest for AutocleanstatusRequest {
|
||||
type Response = super::responses::AutocleanstatusResponse;
|
||||
|
||||
fn method(&self) -> &str {
|
||||
"autoclean-status"
|
||||
}
|
||||
}
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct CheckmessageRequest {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub pubkey: Option<PublicKey>,
|
||||
|
@ -3118,6 +3173,154 @@ pub mod responses {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanonceAutocleanExpiredinvoices {
|
||||
pub cleaned: u64,
|
||||
pub uncleaned: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanonceAutocleanFailedforwards {
|
||||
pub cleaned: u64,
|
||||
pub uncleaned: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanonceAutocleanFailedpays {
|
||||
pub cleaned: u64,
|
||||
pub uncleaned: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanonceAutocleanPaidinvoices {
|
||||
pub cleaned: u64,
|
||||
pub uncleaned: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanonceAutocleanSucceededforwards {
|
||||
pub cleaned: u64,
|
||||
pub uncleaned: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanonceAutocleanSucceededpays {
|
||||
pub cleaned: u64,
|
||||
pub uncleaned: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanonceAutoclean {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub expiredinvoices: Option<AutocleanonceAutocleanExpiredinvoices>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub failedforwards: Option<AutocleanonceAutocleanFailedforwards>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub failedpays: Option<AutocleanonceAutocleanFailedpays>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub paidinvoices: Option<AutocleanonceAutocleanPaidinvoices>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub succeededforwards: Option<AutocleanonceAutocleanSucceededforwards>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub succeededpays: Option<AutocleanonceAutocleanSucceededpays>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanonceResponse {
|
||||
pub autoclean: AutocleanonceAutoclean,
|
||||
}
|
||||
|
||||
impl TryFrom<Response> for AutocleanonceResponse {
|
||||
type Error = super::TryFromResponseError;
|
||||
|
||||
fn try_from(response: Response) -> Result<Self, Self::Error> {
|
||||
match response {
|
||||
Response::AutoCleanOnce(response) => Ok(response),
|
||||
_ => Err(TryFromResponseError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanstatusAutocleanExpiredinvoices {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub age: Option<u64>,
|
||||
pub cleaned: u64,
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanstatusAutocleanFailedforwards {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub age: Option<u64>,
|
||||
pub cleaned: u64,
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanstatusAutocleanFailedpays {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub age: Option<u64>,
|
||||
pub cleaned: u64,
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanstatusAutocleanPaidinvoices {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub age: Option<u64>,
|
||||
pub cleaned: u64,
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanstatusAutocleanSucceededforwards {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub age: Option<u64>,
|
||||
pub cleaned: u64,
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanstatusAutocleanSucceededpays {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub age: Option<u64>,
|
||||
pub cleaned: u64,
|
||||
pub enabled: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanstatusAutoclean {
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub expiredinvoices: Option<AutocleanstatusAutocleanExpiredinvoices>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub failedforwards: Option<AutocleanstatusAutocleanFailedforwards>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub failedpays: Option<AutocleanstatusAutocleanFailedpays>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub paidinvoices: Option<AutocleanstatusAutocleanPaidinvoices>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub succeededforwards: Option<AutocleanstatusAutocleanSucceededforwards>,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub succeededpays: Option<AutocleanstatusAutocleanSucceededpays>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct AutocleanstatusResponse {
|
||||
pub autoclean: AutocleanstatusAutoclean,
|
||||
}
|
||||
|
||||
impl TryFrom<Response> for AutocleanstatusResponse {
|
||||
type Error = super::TryFromResponseError;
|
||||
|
||||
fn try_from(response: Response) -> Result<Self, Self::Error> {
|
||||
match response {
|
||||
Response::AutoCleanStatus(response) => Ok(response),
|
||||
_ => Err(TryFromResponseError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
pub struct CheckmessageResponse {
|
||||
pub pubkey: PublicKey,
|
||||
|
|
|
@ -81,6 +81,39 @@ pub enum ChannelStateChangeCause {
|
|||
ONCHAIN,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Serialize, Deserialize, Debug)]
|
||||
#[allow(non_camel_case_types)]
|
||||
pub enum AutocleanSubsystem {
|
||||
#[serde(rename = "succeededforwards")]
|
||||
SUCCEEDEDFORWARDS = 0,
|
||||
#[serde(rename = "failedforwards")]
|
||||
FAILEDFORWARDS = 1,
|
||||
#[serde(rename = "succeededpays")]
|
||||
SUCCEEDEDPAYS = 2,
|
||||
#[serde(rename = "failedpays")]
|
||||
FAILEDPAYS = 3,
|
||||
#[serde(rename = "paidinvoices")]
|
||||
PAIDINVOICES = 4,
|
||||
#[serde(rename = "expiredinvoices")]
|
||||
EXPIREDINVOICES = 5,
|
||||
}
|
||||
|
||||
impl TryFrom<i32> for AutocleanSubsystem {
|
||||
type Error = crate::Error;
|
||||
|
||||
fn try_from(value: i32) -> std::result::Result<Self, Self::Error> {
|
||||
match value {
|
||||
0 => Ok(AutocleanSubsystem::SUCCEEDEDFORWARDS),
|
||||
1 => Ok(AutocleanSubsystem::FAILEDFORWARDS),
|
||||
2 => Ok(AutocleanSubsystem::SUCCEEDEDPAYS),
|
||||
3 => Ok(AutocleanSubsystem::FAILEDPAYS),
|
||||
4 => Ok(AutocleanSubsystem::PAIDINVOICES),
|
||||
5 => Ok(AutocleanSubsystem::EXPIREDINVOICES),
|
||||
_ => Err(anyhow!("Invalid AutocleanSubsystem {}", value)),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// An `Amount` that can also be `any`. Useful for cases in which you
|
||||
/// want to delegate the Amount selection so someone else, e.g., an
|
||||
/// amountless invoice.
|
||||
|
|
|
@ -186,6 +186,8 @@ class OverridePatch(Patch):
|
|||
'OpenChannel_Init.channel_type.names[]': 'ChannelTypeName',
|
||||
'OpenChannel_Bump.channel_type.names[]': 'ChannelTypeName',
|
||||
'OpenChannel_Update.channel_type.names[]': 'ChannelTypeName',
|
||||
'AutoClean-Once.subsystem': "AutocleanSubsystem",
|
||||
'AutoClean-Status.subsystem': "AutocleanSubsystem",
|
||||
}
|
||||
|
||||
def visit(self, f: model.Field) -> None:
|
||||
|
|
|
@ -65,6 +65,8 @@ def load_jsonrpc_service():
|
|||
"ListChannels",
|
||||
"AddGossip",
|
||||
"AutoCleanInvoice",
|
||||
"AutoClean-Once",
|
||||
"AutoClean-Status",
|
||||
"CheckMessage",
|
||||
"Close",
|
||||
"Connect",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -49,6 +49,16 @@ class NodeStub(object):
|
|||
request_serializer=node__pb2.AutocleaninvoiceRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.AutocleaninvoiceResponse.FromString,
|
||||
)
|
||||
self.AutoCleanOnce = channel.unary_unary(
|
||||
'/cln.Node/AutoCleanOnce',
|
||||
request_serializer=node__pb2.AutocleanonceRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.AutocleanonceResponse.FromString,
|
||||
)
|
||||
self.AutoCleanStatus = channel.unary_unary(
|
||||
'/cln.Node/AutoCleanStatus',
|
||||
request_serializer=node__pb2.AutocleanstatusRequest.SerializeToString,
|
||||
response_deserializer=node__pb2.AutocleanstatusResponse.FromString,
|
||||
)
|
||||
self.CheckMessage = channel.unary_unary(
|
||||
'/cln.Node/CheckMessage',
|
||||
request_serializer=node__pb2.CheckmessageRequest.SerializeToString,
|
||||
|
@ -411,6 +421,18 @@ class NodeServicer(object):
|
|||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def AutoCleanOnce(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 AutoCleanStatus(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 CheckMessage(self, request, context):
|
||||
"""Missing associated documentation comment in .proto file."""
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
|
@ -827,6 +849,16 @@ def add_NodeServicer_to_server(servicer, server):
|
|||
request_deserializer=node__pb2.AutocleaninvoiceRequest.FromString,
|
||||
response_serializer=node__pb2.AutocleaninvoiceResponse.SerializeToString,
|
||||
),
|
||||
'AutoCleanOnce': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.AutoCleanOnce,
|
||||
request_deserializer=node__pb2.AutocleanonceRequest.FromString,
|
||||
response_serializer=node__pb2.AutocleanonceResponse.SerializeToString,
|
||||
),
|
||||
'AutoCleanStatus': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.AutoCleanStatus,
|
||||
request_deserializer=node__pb2.AutocleanstatusRequest.FromString,
|
||||
response_serializer=node__pb2.AutocleanstatusResponse.SerializeToString,
|
||||
),
|
||||
'CheckMessage': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.CheckMessage,
|
||||
request_deserializer=node__pb2.CheckmessageRequest.FromString,
|
||||
|
@ -1271,6 +1303,40 @@ class Node(object):
|
|||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def AutoCleanOnce(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/AutoCleanOnce',
|
||||
node__pb2.AutocleanonceRequest.SerializeToString,
|
||||
node__pb2.AutocleanonceResponse.FromString,
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def AutoCleanStatus(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/AutoCleanStatus',
|
||||
node__pb2.AutocleanstatusRequest.SerializeToString,
|
||||
node__pb2.AutocleanstatusResponse.FromString,
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def CheckMessage(request,
|
||||
target,
|
||||
|
|
|
@ -13,7 +13,7 @@ _sym_db = _symbol_database.Default()
|
|||
|
||||
|
||||
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10primitives.proto\x12\x03\x63ln\"\x16\n\x06\x41mount\x12\x0c\n\x04msat\x18\x01 \x01(\x04\"D\n\x0b\x41mountOrAll\x12\x1d\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0b.cln.AmountH\x00\x12\r\n\x03\x61ll\x18\x02 \x01(\x08H\x00\x42\x07\n\x05value\"D\n\x0b\x41mountOrAny\x12\x1d\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0b.cln.AmountH\x00\x12\r\n\x03\x61ny\x18\x02 \x01(\x08H\x00\x42\x07\n\x05value\"\x19\n\x17\x43hannelStateChangeCause\"(\n\x08Outpoint\x12\x0c\n\x04txid\x18\x01 \x01(\x0c\x12\x0e\n\x06outnum\x18\x02 \x01(\r\"h\n\x07\x46\x65\x65rate\x12\x0e\n\x04slow\x18\x01 \x01(\x08H\x00\x12\x10\n\x06normal\x18\x02 \x01(\x08H\x00\x12\x10\n\x06urgent\x18\x03 \x01(\x08H\x00\x12\x0f\n\x05perkb\x18\x04 \x01(\rH\x00\x12\x0f\n\x05perkw\x18\x05 \x01(\rH\x00\x42\x07\n\x05style\":\n\nOutputDesc\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x1b\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x0b.cln.Amount\"t\n\x08RouteHop\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x10short_channel_id\x18\x02 \x01(\t\x12\x1c\n\x07\x66\x65\x65\x62\x61se\x18\x03 \x01(\x0b\x32\x0b.cln.Amount\x12\x0f\n\x07\x66\x65\x65prop\x18\x04 \x01(\r\x12\x13\n\x0b\x65xpirydelta\x18\x05 \x01(\r\"(\n\tRoutehint\x12\x1b\n\x04hops\x18\x01 \x03(\x0b\x32\r.cln.RouteHop\".\n\rRoutehintList\x12\x1d\n\x05hints\x18\x02 \x03(\x0b\x32\x0e.cln.Routehint\"\'\n\x08TlvEntry\x12\x0c\n\x04type\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x0c\"+\n\tTlvStream\x12\x1e\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\r.cln.TlvEntry*$\n\x0b\x43hannelSide\x12\t\n\x05LOCAL\x10\x00\x12\n\n\x06REMOTE\x10\x01*\xa0\x02\n\x0c\x43hannelState\x12\x0c\n\x08Openingd\x10\x00\x12\x1a\n\x16\x43hanneldAwaitingLockin\x10\x01\x12\x12\n\x0e\x43hanneldNormal\x10\x02\x12\x18\n\x14\x43hanneldShuttingDown\x10\x03\x12\x17\n\x13\x43losingdSigexchange\x10\x04\x12\x14\n\x10\x43losingdComplete\x10\x05\x12\x16\n\x12\x41waitingUnilateral\x10\x06\x12\x14\n\x10\x46undingSpendSeen\x10\x07\x12\x0b\n\x07Onchain\x10\x08\x12\x15\n\x11\x44ualopendOpenInit\x10\t\x12\x1b\n\x17\x44ualopendAwaitingLockin\x10\n\x12\x1a\n\x16\x43hanneldAwaitingSplice\x10\x0b*\xd5\x03\n\tHtlcState\x12\x0f\n\x0bSentAddHtlc\x10\x00\x12\x11\n\rSentAddCommit\x10\x01\x12\x15\n\x11RcvdAddRevocation\x10\x02\x12\x14\n\x10RcvdAddAckCommit\x10\x03\x12\x18\n\x14SentAddAckRevocation\x10\x04\x12\x18\n\x14RcvdAddAckRevocation\x10\x05\x12\x12\n\x0eRcvdRemoveHtlc\x10\x06\x12\x14\n\x10RcvdRemoveCommit\x10\x07\x12\x18\n\x14SentRemoveRevocation\x10\x08\x12\x17\n\x13SentRemoveAckCommit\x10\t\x12\x1b\n\x17RcvdRemoveAckRevocation\x10\n\x12\x0f\n\x0bRcvdAddHtlc\x10\x0b\x12\x11\n\rRcvdAddCommit\x10\x0c\x12\x15\n\x11SentAddRevocation\x10\r\x12\x14\n\x10SentAddAckCommit\x10\x0e\x12\x12\n\x0eSentRemoveHtlc\x10\x0f\x12\x14\n\x10SentRemoveCommit\x10\x10\x12\x18\n\x14RcvdRemoveRevocation\x10\x11\x12\x17\n\x13RcvdRemoveAckCommit\x10\x12\x12\x1b\n\x17SentRemoveAckRevocation\x10\x13*\x90\x01\n\x0f\x43hannelTypeName\x12\x19\n\x15static_remotekey_even\x10\x00\x12\x17\n\x13\x61nchor_outputs_even\x10\x01\x12!\n\x1d\x61nchors_zero_fee_htlc_tx_even\x10\x02\x12\x13\n\x0fscid_alias_even\x10\x03\x12\x11\n\rzeroconf_even\x10\x04\x62\x06proto3')
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10primitives.proto\x12\x03\x63ln\"\x16\n\x06\x41mount\x12\x0c\n\x04msat\x18\x01 \x01(\x04\"D\n\x0b\x41mountOrAll\x12\x1d\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0b.cln.AmountH\x00\x12\r\n\x03\x61ll\x18\x02 \x01(\x08H\x00\x42\x07\n\x05value\"D\n\x0b\x41mountOrAny\x12\x1d\n\x06\x61mount\x18\x01 \x01(\x0b\x32\x0b.cln.AmountH\x00\x12\r\n\x03\x61ny\x18\x02 \x01(\x08H\x00\x42\x07\n\x05value\"\x19\n\x17\x43hannelStateChangeCause\"(\n\x08Outpoint\x12\x0c\n\x04txid\x18\x01 \x01(\x0c\x12\x0e\n\x06outnum\x18\x02 \x01(\r\"h\n\x07\x46\x65\x65rate\x12\x0e\n\x04slow\x18\x01 \x01(\x08H\x00\x12\x10\n\x06normal\x18\x02 \x01(\x08H\x00\x12\x10\n\x06urgent\x18\x03 \x01(\x08H\x00\x12\x0f\n\x05perkb\x18\x04 \x01(\rH\x00\x12\x0f\n\x05perkw\x18\x05 \x01(\rH\x00\x42\x07\n\x05style\":\n\nOutputDesc\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\t\x12\x1b\n\x06\x61mount\x18\x02 \x01(\x0b\x32\x0b.cln.Amount\"t\n\x08RouteHop\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x10short_channel_id\x18\x02 \x01(\t\x12\x1c\n\x07\x66\x65\x65\x62\x61se\x18\x03 \x01(\x0b\x32\x0b.cln.Amount\x12\x0f\n\x07\x66\x65\x65prop\x18\x04 \x01(\r\x12\x13\n\x0b\x65xpirydelta\x18\x05 \x01(\r\"(\n\tRoutehint\x12\x1b\n\x04hops\x18\x01 \x03(\x0b\x32\r.cln.RouteHop\".\n\rRoutehintList\x12\x1d\n\x05hints\x18\x02 \x03(\x0b\x32\x0e.cln.Routehint\"\'\n\x08TlvEntry\x12\x0c\n\x04type\x18\x01 \x01(\x04\x12\r\n\x05value\x18\x02 \x01(\x0c\"+\n\tTlvStream\x12\x1e\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\r.cln.TlvEntry*$\n\x0b\x43hannelSide\x12\t\n\x05LOCAL\x10\x00\x12\n\n\x06REMOTE\x10\x01*\xa0\x02\n\x0c\x43hannelState\x12\x0c\n\x08Openingd\x10\x00\x12\x1a\n\x16\x43hanneldAwaitingLockin\x10\x01\x12\x12\n\x0e\x43hanneldNormal\x10\x02\x12\x18\n\x14\x43hanneldShuttingDown\x10\x03\x12\x17\n\x13\x43losingdSigexchange\x10\x04\x12\x14\n\x10\x43losingdComplete\x10\x05\x12\x16\n\x12\x41waitingUnilateral\x10\x06\x12\x14\n\x10\x46undingSpendSeen\x10\x07\x12\x0b\n\x07Onchain\x10\x08\x12\x15\n\x11\x44ualopendOpenInit\x10\t\x12\x1b\n\x17\x44ualopendAwaitingLockin\x10\n\x12\x1a\n\x16\x43hanneldAwaitingSplice\x10\x0b*\xd5\x03\n\tHtlcState\x12\x0f\n\x0bSentAddHtlc\x10\x00\x12\x11\n\rSentAddCommit\x10\x01\x12\x15\n\x11RcvdAddRevocation\x10\x02\x12\x14\n\x10RcvdAddAckCommit\x10\x03\x12\x18\n\x14SentAddAckRevocation\x10\x04\x12\x18\n\x14RcvdAddAckRevocation\x10\x05\x12\x12\n\x0eRcvdRemoveHtlc\x10\x06\x12\x14\n\x10RcvdRemoveCommit\x10\x07\x12\x18\n\x14SentRemoveRevocation\x10\x08\x12\x17\n\x13SentRemoveAckCommit\x10\t\x12\x1b\n\x17RcvdRemoveAckRevocation\x10\n\x12\x0f\n\x0bRcvdAddHtlc\x10\x0b\x12\x11\n\rRcvdAddCommit\x10\x0c\x12\x15\n\x11SentAddRevocation\x10\r\x12\x14\n\x10SentAddAckCommit\x10\x0e\x12\x12\n\x0eSentRemoveHtlc\x10\x0f\x12\x14\n\x10SentRemoveCommit\x10\x10\x12\x18\n\x14RcvdRemoveRevocation\x10\x11\x12\x17\n\x13RcvdRemoveAckCommit\x10\x12\x12\x1b\n\x17SentRemoveAckRevocation\x10\x13*\x90\x01\n\x0f\x43hannelTypeName\x12\x19\n\x15static_remotekey_even\x10\x00\x12\x17\n\x13\x61nchor_outputs_even\x10\x01\x12!\n\x1d\x61nchors_zero_fee_htlc_tx_even\x10\x02\x12\x13\n\x0fscid_alias_even\x10\x03\x12\x11\n\rzeroconf_even\x10\x04*\x89\x01\n\x12\x41utocleanSubsystem\x12\x15\n\x11SUCCEEDEDFORWARDS\x10\x00\x12\x12\n\x0e\x46\x41ILEDFORWARDS\x10\x01\x12\x11\n\rSUCCEEDEDPAYS\x10\x02\x12\x0e\n\nFAILEDPAYS\x10\x03\x12\x10\n\x0cPAIDINVOICES\x10\x04\x12\x13\n\x0f\x45XPIREDINVOICES\x10\x05\x62\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
|
@ -28,6 +28,8 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|||
_globals['_HTLCSTATE']._serialized_end=1517
|
||||
_globals['_CHANNELTYPENAME']._serialized_start=1520
|
||||
_globals['_CHANNELTYPENAME']._serialized_end=1664
|
||||
_globals['_AUTOCLEANSUBSYSTEM']._serialized_start=1667
|
||||
_globals['_AUTOCLEANSUBSYSTEM']._serialized_end=1804
|
||||
_globals['_AMOUNT']._serialized_start=25
|
||||
_globals['_AMOUNT']._serialized_end=47
|
||||
_globals['_AMOUNTORALL']._serialized_start=49
|
||||
|
|
|
@ -194,6 +194,116 @@ def autocleaninvoice2py(m):
|
|||
})
|
||||
|
||||
|
||||
def autoclean_once_autoclean_expiredinvoices2py(m):
|
||||
return remove_default({
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"uncleaned": m.uncleaned, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_once_autoclean_failedforwards2py(m):
|
||||
return remove_default({
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"uncleaned": m.uncleaned, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_once_autoclean_failedpays2py(m):
|
||||
return remove_default({
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"uncleaned": m.uncleaned, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_once_autoclean_paidinvoices2py(m):
|
||||
return remove_default({
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"uncleaned": m.uncleaned, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_once_autoclean_succeededforwards2py(m):
|
||||
return remove_default({
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"uncleaned": m.uncleaned, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_once_autoclean_succeededpays2py(m):
|
||||
return remove_default({
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"uncleaned": m.uncleaned, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_once_autoclean2py(m):
|
||||
return remove_default({
|
||||
})
|
||||
|
||||
|
||||
def autoclean_once2py(m):
|
||||
return remove_default({
|
||||
})
|
||||
|
||||
|
||||
def autoclean_status_autoclean_expiredinvoices2py(m):
|
||||
return remove_default({
|
||||
"age": m.age, # PrimitiveField in generate_composite
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"enabled": m.enabled, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_status_autoclean_failedforwards2py(m):
|
||||
return remove_default({
|
||||
"age": m.age, # PrimitiveField in generate_composite
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"enabled": m.enabled, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_status_autoclean_failedpays2py(m):
|
||||
return remove_default({
|
||||
"age": m.age, # PrimitiveField in generate_composite
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"enabled": m.enabled, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_status_autoclean_paidinvoices2py(m):
|
||||
return remove_default({
|
||||
"age": m.age, # PrimitiveField in generate_composite
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"enabled": m.enabled, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_status_autoclean_succeededforwards2py(m):
|
||||
return remove_default({
|
||||
"age": m.age, # PrimitiveField in generate_composite
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"enabled": m.enabled, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_status_autoclean_succeededpays2py(m):
|
||||
return remove_default({
|
||||
"age": m.age, # PrimitiveField in generate_composite
|
||||
"cleaned": m.cleaned, # PrimitiveField in generate_composite
|
||||
"enabled": m.enabled, # PrimitiveField in generate_composite
|
||||
})
|
||||
|
||||
|
||||
def autoclean_status_autoclean2py(m):
|
||||
return remove_default({
|
||||
})
|
||||
|
||||
|
||||
def autoclean_status2py(m):
|
||||
return remove_default({
|
||||
})
|
||||
|
||||
|
||||
def checkmessage2py(m):
|
||||
return remove_default({
|
||||
"pubkey": hexlify(m.pubkey), # PrimitiveField in generate_composite
|
||||
|
|
Loading…
Add table
Reference in a new issue