cln-grpc: Final generation of derived files

Didn't want to pollute each commit with the changes in the derived
files so here are all the changes in one commit :-)
This commit is contained in:
Christian Decker 2022-04-01 14:43:35 +10:30 committed by Rusty Russell
parent be04f25666
commit aae5e3d070
5 changed files with 1687 additions and 360 deletions

View file

@ -33,6 +33,10 @@
"paid": 0,
"unpaid": 2
},
"FeeratesStyle": {
"perkb": 0,
"perkw": 1
},
"GetinfoAddressType": {
"dns": 0,
"ipv4": 1,
@ -48,9 +52,28 @@
"torv2": 3,
"torv3": 4
},
"GetrouteRouteStyle": {
"tlv": 0
},
"KeysendStatus": {
"complete": 0
},
"ListforwardsForwardsStatus": {
"failed": 3,
"local_failed": 2,
"offered": 0,
"settled": 1
},
"ListforwardsForwardsStyle": {
"legacy": 0,
"tlv": 1
},
"ListforwardsStatus": {
"failed": 3,
"local_failed": 2,
"offered": 0,
"settled": 1
},
"ListfundsOutputsStatus": {
"confirmed": 1,
"spent": 2,
@ -69,6 +92,16 @@
"torv3": 4,
"websocket": 5
},
"ListpaysPaysStatus": {
"complete": 2,
"failed": 1,
"pending": 0
},
"ListpaysStatus": {
"complete": 1,
"failed": 2,
"pending": 0
},
"ListpeersPeersChannelsHtlcsDirection": {
"in": 0,
"out": 1
@ -144,6 +177,7 @@
"withdraw": 2
},
"NewaddrAddresstype": {
"all": 2,
"bech32": 0,
"p2sh-segwit": 1
},
@ -197,6 +231,7 @@
"CloseRequest": {
"Close.destination": 3,
"Close.fee_negotiation_step": 4,
"Close.feerange[]": 7,
"Close.force_lease_closed": 6,
"Close.id": 1,
"Close.unilateraltimeout": 2,
@ -262,22 +297,27 @@
"DatastoreRequest": {
"Datastore.generation": 4,
"Datastore.hex": 2,
"Datastore.key": 5,
"Datastore.key[]": 1,
"Datastore.mode": 3
"Datastore.mode": 3,
"Datastore.string": 6
},
"DatastoreResponse": {
"Datastore.generation": 2,
"Datastore.hex": 3,
"Datastore.key": 5,
"Datastore.key[]": 1,
"Datastore.string": 4
},
"DeldatastoreRequest": {
"DelDatastore.generation": 2,
"DelDatastore.key": 3,
"DelDatastore.key[]": 1
},
"DeldatastoreResponse": {
"DelDatastore.generation": 2,
"DelDatastore.hex": 3,
"DelDatastore.key": 5,
"DelDatastore.key[]": 1,
"DelDatastore.string": 4
},
@ -285,6 +325,7 @@
"DelExpiredInvoice.maxexpirytime": 1
},
"DelinvoiceRequest": {
"DelInvoice.desconly": 3,
"DelInvoice.label": 1,
"DelInvoice.status": 2
},
@ -300,7 +341,48 @@
"DelInvoice.payment_hash": 6,
"DelInvoice.status": 7
},
"DisconnectRequest": {
"Disconnect.force": 2,
"Disconnect.id": 1
},
"FeeratesOnchain_fee_estimates": {
"Feerates.onchain_fee_estimates.htlc_success_satoshis": 5,
"Feerates.onchain_fee_estimates.htlc_timeout_satoshis": 4,
"Feerates.onchain_fee_estimates.mutual_close_satoshis": 2,
"Feerates.onchain_fee_estimates.opening_channel_satoshis": 1,
"Feerates.onchain_fee_estimates.unilateral_close_satoshis": 3
},
"FeeratesPerkb": {
"Feerates.perkb.delayed_to_us": 6,
"Feerates.perkb.htlc_resolution": 7,
"Feerates.perkb.max_acceptable": 2,
"Feerates.perkb.min_acceptable": 1,
"Feerates.perkb.mutual_close": 4,
"Feerates.perkb.opening": 3,
"Feerates.perkb.penalty": 8,
"Feerates.perkb.unilateral_close": 5
},
"FeeratesPerkw": {
"Feerates.perkw.delayed_to_us": 6,
"Feerates.perkw.htlc_resolution": 7,
"Feerates.perkw.max_acceptable": 2,
"Feerates.perkw.min_acceptable": 1,
"Feerates.perkw.mutual_close": 4,
"Feerates.perkw.opening": 3,
"Feerates.perkw.penalty": 8,
"Feerates.perkw.unilateral_close": 5
},
"FeeratesRequest": {
"Feerates.style": 1
},
"FeeratesResponse": {
"Feerates.onchain_fee_estimates": 4,
"Feerates.perkb": 2,
"Feerates.perkw": 3,
"Feerates.warning_missing_feerates": 1
},
"FundpsbtRequest": {
"FundPsbt.excess_as_change": 8,
"FundPsbt.feerate": 2,
"FundPsbt.locktime": 6,
"FundPsbt.min_witness_weight": 7,
@ -360,9 +442,33 @@
"Getinfo.warning_bitcoind_sync": 16,
"Getinfo.warning_lightningd_sync": 17
},
"GetrouteRequest": {
"GetRoute.cltv": 4,
"GetRoute.exclude[]": 7,
"GetRoute.fromid": 5,
"GetRoute.fuzzpercent": 6,
"GetRoute.id": 1,
"GetRoute.maxhops": 8,
"GetRoute.msatoshi": 2,
"GetRoute.riskfactor": 3
},
"GetrouteResponse": {
"GetRoute.route[]": 1
},
"GetrouteRoute": {
"GetRoute.route[].amount_msat": 4,
"GetRoute.route[].channel": 2,
"GetRoute.route[].delay": 5,
"GetRoute.route[].direction": 3,
"GetRoute.route[].id": 1,
"GetRoute.route[].style": 6
},
"InvoiceRequest": {
"Invoice.cltv": 6,
"Invoice.deschashonly": 9,
"Invoice.description": 2,
"Invoice.expiry": 7,
"Invoice.exposeprivatechannels": 8,
"Invoice.fallbacks[]": 4,
"Invoice.label": 3,
"Invoice.msatoshi": 1,
@ -382,11 +488,13 @@
"KeysendRequest": {
"KeySend.destination": 1,
"KeySend.exemptfee": 7,
"KeySend.extratlvs": 9,
"KeySend.label": 3,
"KeySend.maxdelay": 6,
"KeySend.maxfeepercent": 4,
"KeySend.msatoshi": 2,
"KeySend.retry_for": 5
"KeySend.retry_for": 5,
"KeySend.routehints": 8
},
"KeysendResponse": {
"KeySend.amount_msat": 6,
@ -431,11 +539,31 @@
"ListDatastore.datastore[].string": 4
},
"ListdatastoreRequest": {
"ListDatastore.key": 2,
"ListDatastore.key[]": 1
},
"ListdatastoreResponse": {
"ListDatastore.datastore[]": 1
},
"ListforwardsForwards": {
"ListForwards.forwards[].fee_msat": 7,
"ListForwards.forwards[].in_channel": 1,
"ListForwards.forwards[].in_msat": 2,
"ListForwards.forwards[].out_channel": 5,
"ListForwards.forwards[].out_msat": 8,
"ListForwards.forwards[].payment_hash": 6,
"ListForwards.forwards[].received_time": 4,
"ListForwards.forwards[].status": 3,
"ListForwards.forwards[].style": 9
},
"ListforwardsRequest": {
"ListForwards.in_channel": 2,
"ListForwards.out_channel": 3,
"ListForwards.status": 1
},
"ListforwardsResponse": {
"ListForwards.forwards[]": 1
},
"ListfundsChannels": {
"ListFunds.channels[].amount_msat": 3,
"ListFunds.channels[].connected": 6,
@ -507,6 +635,26 @@
"ListnodesResponse": {
"ListNodes.nodes[]": 1
},
"ListpaysPays": {
"ListPays.pays[].amount_msat": 8,
"ListPays.pays[].amount_sent_msat": 9,
"ListPays.pays[].bolt11": 6,
"ListPays.pays[].bolt12": 7,
"ListPays.pays[].created_at": 4,
"ListPays.pays[].destination": 3,
"ListPays.pays[].erroronion": 10,
"ListPays.pays[].label": 5,
"ListPays.pays[].payment_hash": 1,
"ListPays.pays[].status": 2
},
"ListpaysRequest": {
"ListPays.bolt11": 1,
"ListPays.payment_hash": 2,
"ListPays.status": 3
},
"ListpaysResponse": {
"ListPays.pays[]": 1
},
"ListpeersPeers": {
"ListPeers.peers[].channels[]": 4,
"ListPeers.peers[].connected": 2,
@ -539,8 +687,10 @@
"ListPeers.peers[].channels[].max_accepted_htlcs": 35,
"ListPeers.peers[].channels[].max_to_us_msat": 22,
"ListPeers.peers[].channels[].max_total_htlc_in_msat": 27,
"ListPeers.peers[].channels[].maximum_htlc_out_msat": 49,
"ListPeers.peers[].channels[].min_to_us_msat": 21,
"ListPeers.peers[].channels[].minimum_htlc_in_msat": 32,
"ListPeers.peers[].channels[].minimum_htlc_out_msat": 48,
"ListPeers.peers[].channels[].next_fee_step": 12,
"ListPeers.peers[].channels[].next_feerate": 11,
"ListPeers.peers[].channels[].opener": 16,
@ -668,8 +818,10 @@
},
"PayRequest": {
"Pay.bolt11": 1,
"Pay.exclude": 10,
"Pay.exemptfee": 7,
"Pay.label": 3,
"Pay.localofferid": 9,
"Pay.maxdelay": 6,
"Pay.maxfeepercent": 4,
"Pay.msatoshi": 2,
@ -687,14 +839,31 @@
"Pay.status": 9,
"Pay.warning_partial_completion": 8
},
"PingRequest": {
"Ping.id": 1,
"Ping.len": 2,
"Ping.pongbytes": 3
},
"PingResponse": {
"Ping.totlen": 1
},
"SendonionFirst_hop": {
"SendOnion.first_hop.amount_msat": 2,
"SendOnion.first_hop.delay": 3,
"SendOnion.first_hop.id": 1
},
"SendonionRequest": {
"SendOnion.bolt11": 7,
"SendOnion.destination": 9,
"SendOnion.first_hop": 2,
"SendOnion.onion": 1
"SendOnion.groupid": 11,
"SendOnion.label": 4,
"SendOnion.localofferid": 10,
"SendOnion.msatoshi": 8,
"SendOnion.onion": 1,
"SendOnion.partid": 6,
"SendOnion.payment_hash": 3,
"SendOnion.shared_secrets[]": 5
},
"SendonionResponse": {
"SendOnion.amount_msat": 4,
@ -706,13 +875,16 @@
"SendOnion.id": 1,
"SendOnion.label": 8,
"SendOnion.message": 12,
"SendOnion.partid": 13,
"SendOnion.payment_hash": 2,
"SendOnion.payment_preimage": 11,
"SendOnion.status": 3
},
"SendpayRequest": {
"SendPay.bolt11": 5,
"SendPay.groupid": 9,
"SendPay.label": 3,
"SendPay.localofferid": 8,
"SendPay.msatoshi": 4,
"SendPay.partid": 7,
"SendPay.payment_hash": 2,
@ -742,12 +914,21 @@
"SendPay.route[].msatoshi": 1
},
"SendpsbtRequest": {
"SendPsbt.psbt": 1
"SendPsbt.psbt": 1,
"SendPsbt.reserve": 2
},
"SendpsbtResponse": {
"SendPsbt.tx": 1,
"SendPsbt.txid": 2
},
"SignmessageRequest": {
"SignMessage.message": 1
},
"SignmessageResponse": {
"SignMessage.recid": 2,
"SignMessage.signature": 1,
"SignMessage.zbase": 3
},
"SignpsbtRequest": {
"SignPsbt.psbt": 1,
"SignPsbt.signonly[]": 2
@ -766,6 +947,7 @@
"TxPrepare.feerate": 2,
"TxPrepare.minconf": 3,
"TxPrepare.outptus[]": 1,
"TxPrepare.outputs[]": 5,
"TxPrepare.utxos[]": 4
},
"TxprepareResponse": {
@ -782,10 +964,12 @@
"TxSend.txid": 3
},
"UtxopsbtRequest": {
"UtxoPsbt.excess_as_change": 9,
"UtxoPsbt.feerate": 2,
"UtxoPsbt.locktime": 6,
"UtxoPsbt.min_witness_weight": 7,
"UtxoPsbt.reserve": 5,
"UtxoPsbt.reservedok": 8,
"UtxoPsbt.satoshi": 1,
"UtxoPsbt.startweight": 3,
"UtxoPsbt.utxos[]": 4
@ -841,6 +1025,7 @@
"WaitInvoice.status": 4
},
"WaitsendpayRequest": {
"WaitSendPay.groupid": 4,
"WaitSendPay.partid": 2,
"WaitSendPay.payment_hash": 1,
"WaitSendPay.timeout": 3

View file

@ -45,6 +45,13 @@ service Node {
rpc TxDiscard(TxdiscardRequest) returns (TxdiscardResponse) {}
rpc TxPrepare(TxprepareRequest) returns (TxprepareResponse) {}
rpc TxSend(TxsendRequest) returns (TxsendResponse) {}
rpc Disconnect(DisconnectRequest) returns (DisconnectResponse) {}
rpc Feerates(FeeratesRequest) returns (FeeratesResponse) {}
rpc GetRoute(GetrouteRequest) returns (GetrouteResponse) {}
rpc ListForwards(ListforwardsRequest) returns (ListforwardsResponse) {}
rpc ListPays(ListpaysRequest) returns (ListpaysResponse) {}
rpc Ping(PingRequest) returns (PingResponse) {}
rpc SignMessage(SignmessageRequest) returns (SignmessageResponse) {}
}
message GetinfoRequest {
@ -174,7 +181,6 @@ message ListpeersPeersChannels {
optional bytes close_to = 14;
optional bool private = 15;
ChannelSide opener = 16;
optional ChannelSide closer = 17;
repeated string features = 18;
optional Amount to_us_msat = 20;
optional Amount min_to_us_msat = 21;
@ -189,6 +195,8 @@ message ListpeersPeersChannels {
optional Amount spendable_msat = 30;
optional Amount receivable_msat = 31;
optional Amount minimum_htlc_in_msat = 32;
optional Amount minimum_htlc_out_msat = 48;
optional Amount maximum_htlc_out_msat = 49;
optional uint32 their_to_self_delay = 33;
optional uint32 our_to_self_delay = 34;
optional uint32 max_accepted_htlcs = 35;
@ -231,19 +239,6 @@ message ListpeersPeersChannelsHtlcs {
IN = 0;
OUT = 1;
}
// ListPeers.peers[].channels[].htlcs[].state
enum ListpeersPeersChannelsHtlcsState {
SENT_ADD_HTLC = 0;
SENT_ADD_COMMIT = 1;
RCVD_ADD_REVOCATION = 2;
RCVD_ADD_ACK_COMMIT = 3;
SENT_ADD_ACK_REVOCATION = 4;
RCVD_REMOVE_HTLC = 5;
RCVD_REMOVE_COMMIT = 6;
SENT_REMOVE_REVOCATION = 7;
SENT_REMOVE_ACK_COMMIT = 8;
RCVD_REMOVE_ACK_REVOCATION = 9;
}
ListpeersPeersChannelsHtlcsDirection direction = 1;
uint64 id = 2;
Amount amount_msat = 3;
@ -251,7 +246,6 @@ message ListpeersPeersChannelsHtlcs {
bytes payment_hash = 5;
optional bool local_trimmed = 6;
optional string status = 7;
ListpeersPeersChannelsHtlcsState state = 8;
}
message ListfundsRequest {
@ -299,6 +293,8 @@ message SendpayRequest {
optional string bolt11 = 5;
optional bytes payment_secret = 6;
optional uint32 partid = 7;
optional bytes localofferid = 8;
optional uint64 groupid = 9;
}
message SendpayResponse {
@ -388,12 +384,13 @@ message CheckmessageResponse {
}
message CloseRequest {
bytes id = 1;
string id = 1;
optional uint32 unilateraltimeout = 2;
optional string destination = 3;
optional string fee_negotiation_step = 4;
optional bytes wrong_funding = 5;
optional bool force_lease_closed = 6;
repeated Feerate feerange = 7;
}
message CloseResponse {
@ -409,7 +406,7 @@ message CloseResponse {
}
message ConnectRequest {
bytes id = 1;
string id = 1;
optional string host = 2;
optional uint32 port = 3;
}
@ -478,14 +475,15 @@ message DatastoreRequest {
MUST_APPEND = 3;
CREATE_OR_APPEND = 4;
}
repeated string key = 1;
repeated string key = 5;
optional string string = 6;
optional bytes hex = 2;
optional DatastoreMode mode = 3;
optional uint64 generation = 4;
}
message DatastoreResponse {
repeated string key = 1;
repeated string key = 5;
optional uint64 generation = 2;
optional bytes hex = 3;
optional string string = 4;
@ -509,19 +507,19 @@ message CreateonionHops {
}
message DeldatastoreRequest {
repeated string key = 1;
repeated string key = 3;
optional uint64 generation = 2;
}
message DeldatastoreResponse {
repeated string key = 1;
repeated string key = 5;
optional uint64 generation = 2;
optional bytes hex = 3;
optional string string = 4;
}
message DelexpiredinvoiceRequest {
uint32 maxexpirytime = 1;
optional uint64 maxexpirytime = 1;
}
message DelexpiredinvoiceResponse {
@ -536,6 +534,7 @@ message DelinvoiceRequest {
}
string label = 1;
DelinvoiceStatus status = 2;
optional bool desconly = 3;
}
message DelinvoiceResponse {
@ -561,9 +560,12 @@ message InvoiceRequest {
AmountOrAny msatoshi = 1;
string description = 2;
string label = 3;
optional uint64 expiry = 7;
repeated string fallbacks = 4;
optional bytes preimage = 5;
optional bool exposeprivatechannels = 8;
optional uint32 cltv = 6;
optional bool deschashonly = 9;
}
message InvoiceResponse {
@ -579,7 +581,7 @@ message InvoiceResponse {
}
message ListdatastoreRequest {
repeated string key = 1;
repeated string key = 2;
}
message ListdatastoreResponse {
@ -612,7 +614,7 @@ message ListinvoicesInvoices {
EXPIRED = 2;
}
string label = 1;
string description = 2;
optional string description = 2;
bytes payment_hash = 3;
ListinvoicesInvoicesStatus status = 4;
uint64 expires_at = 5;
@ -629,6 +631,15 @@ message ListinvoicesInvoices {
message SendonionRequest {
bytes onion = 1;
bytes payment_hash = 3;
optional string label = 4;
repeated bytes shared_secrets = 5;
optional uint32 partid = 6;
optional string bolt11 = 7;
optional Amount msatoshi = 8;
optional bytes destination = 9;
optional bytes localofferid = 10;
optional uint64 groupid = 11;
}
message SendonionResponse {
@ -647,6 +658,7 @@ message SendonionResponse {
optional string label = 8;
optional string bolt11 = 9;
optional string bolt12 = 10;
optional uint64 partid = 13;
optional bytes payment_preimage = 11;
optional string message = 12;
}
@ -762,11 +774,13 @@ message PayRequest {
string bolt11 = 1;
optional Amount msatoshi = 2;
optional string label = 3;
optional float riskfactor = 8;
optional float maxfeepercent = 4;
optional double riskfactor = 8;
optional double maxfeepercent = 4;
optional uint32 retry_for = 5;
optional uint32 maxdelay = 6;
optional float exemptfee = 7;
optional Amount exemptfee = 7;
optional bytes localofferid = 9;
repeated string exclude = 10;
}
message PayResponse {
@ -779,7 +793,7 @@ message PayResponse {
bytes payment_preimage = 1;
optional bytes destination = 2;
bytes payment_hash = 3;
sint64 created_at = 4;
double created_at = 4;
uint32 parts = 5;
Amount amount_msat = 6;
Amount amount_sent_msat = 7;
@ -820,8 +834,8 @@ message ListnodesNodesAddresses {
}
message WaitanyinvoiceRequest {
optional sint64 lastpay_index = 1;
optional sint64 timeout = 2;
optional uint64 lastpay_index = 1;
optional uint64 timeout = 2;
}
message WaitanyinvoiceResponse {
@ -870,8 +884,9 @@ message WaitinvoiceResponse {
message WaitsendpayRequest {
bytes payment_hash = 1;
optional uint32 partid = 2;
optional uint32 timeout = 3;
optional uint64 partid = 2;
optional uint64 groupid = 4;
}
message WaitsendpayResponse {
@ -899,6 +914,7 @@ message NewaddrRequest {
enum NewaddrAddresstype {
BECH32 = 0;
P2SH_SEGWIT = 1;
ALL = 2;
}
optional NewaddrAddresstype addresstype = 1;
}
@ -909,11 +925,11 @@ message NewaddrResponse {
}
message WithdrawRequest {
bytes destination = 1;
string destination = 1;
optional AmountOrAll satoshi = 2;
optional Feerate feerate = 5;
optional uint32 minconf = 3;
repeated Utxo utxos = 4;
repeated Outpoint utxos = 4;
}
message WithdrawResponse {
@ -926,10 +942,11 @@ message KeysendRequest {
bytes destination = 1;
Amount msatoshi = 2;
optional string label = 3;
optional float maxfeepercent = 4;
optional sint64 retry_for = 5;
optional sint64 maxdelay = 6;
optional double maxfeepercent = 4;
optional uint32 retry_for = 5;
optional uint32 maxdelay = 6;
optional Amount exemptfee = 7;
optional RoutehintList routehints = 8;
}
message KeysendResponse {
@ -940,7 +957,7 @@ message KeysendResponse {
bytes payment_preimage = 1;
optional bytes destination = 2;
bytes payment_hash = 3;
sint64 created_at = 4;
double created_at = 4;
uint32 parts = 5;
Amount amount_msat = 6;
Amount amount_sent_msat = 7;
@ -948,14 +965,18 @@ message KeysendResponse {
KeysendStatus status = 9;
}
message KeysendExtratlvs {
}
message FundpsbtRequest {
Amount satoshi = 1;
Feerate feerate = 2;
sint64 startweight = 3;
optional sint64 minconf = 4;
optional sint64 reserve = 5;
optional sint64 locktime = 6;
uint32 startweight = 3;
optional uint32 minconf = 4;
optional uint32 reserve = 5;
optional uint32 locktime = 6;
optional uint32 min_witness_weight = 7;
optional bool excess_as_change = 8;
}
message FundpsbtResponse {
@ -977,6 +998,7 @@ message FundpsbtReservations {
message SendpsbtRequest {
string psbt = 1;
optional bool reserve = 2;
}
message SendpsbtResponse {
@ -986,6 +1008,7 @@ message SendpsbtResponse {
message SignpsbtRequest {
string psbt = 1;
repeated uint32 signonly = 2;
}
message SignpsbtResponse {
@ -995,11 +1018,13 @@ message SignpsbtResponse {
message UtxopsbtRequest {
Amount satoshi = 1;
Feerate feerate = 2;
sint64 startweight = 3;
repeated Utxo utxos = 4;
optional sint64 reserve = 5;
optional sint64 locktime = 6;
uint32 startweight = 3;
repeated Outpoint utxos = 4;
optional uint32 reserve = 5;
optional bool reservedok = 8;
optional uint32 locktime = 6;
optional uint32 min_witness_weight = 7;
optional bool excess_as_change = 9;
}
message UtxopsbtResponse {
@ -1029,10 +1054,10 @@ message TxdiscardResponse {
}
message TxprepareRequest {
repeated OutputDesc outptus = 1;
repeated OutputDesc outputs = 5;
optional Feerate feerate = 2;
optional uint32 minconf = 3;
repeated Utxo utxos = 4;
repeated Outpoint utxos = 4;
}
message TxprepareResponse {
@ -1050,3 +1075,178 @@ message TxsendResponse {
bytes tx = 2;
bytes txid = 3;
}
message DisconnectRequest {
bytes id = 1;
optional bool force = 2;
}
message DisconnectResponse {
}
message FeeratesRequest {
// Feerates.style
enum FeeratesStyle {
PERKB = 0;
PERKW = 1;
}
FeeratesStyle style = 1;
}
message FeeratesResponse {
optional string warning_missing_feerates = 1;
}
message FeeratesPerkb {
uint32 min_acceptable = 1;
uint32 max_acceptable = 2;
optional uint32 opening = 3;
optional uint32 mutual_close = 4;
optional uint32 unilateral_close = 5;
optional uint32 delayed_to_us = 6;
optional uint32 htlc_resolution = 7;
optional uint32 penalty = 8;
}
message FeeratesPerkw {
uint32 min_acceptable = 1;
uint32 max_acceptable = 2;
optional uint32 opening = 3;
optional uint32 mutual_close = 4;
optional uint32 unilateral_close = 5;
optional uint32 delayed_to_us = 6;
optional uint32 htlc_resolution = 7;
optional uint32 penalty = 8;
}
message FeeratesOnchain_fee_estimates {
uint64 opening_channel_satoshis = 1;
uint64 mutual_close_satoshis = 2;
uint64 unilateral_close_satoshis = 3;
uint64 htlc_timeout_satoshis = 4;
uint64 htlc_success_satoshis = 5;
}
message GetrouteRequest {
bytes id = 1;
Amount msatoshi = 2;
uint64 riskfactor = 3;
optional double cltv = 4;
optional bytes fromid = 5;
optional uint32 fuzzpercent = 6;
repeated string exclude = 7;
optional uint32 maxhops = 8;
}
message GetrouteResponse {
repeated GetrouteRoute route = 1;
}
message GetrouteRoute {
// GetRoute.route[].style
enum GetrouteRouteStyle {
TLV = 0;
}
bytes id = 1;
string channel = 2;
uint32 direction = 3;
Amount amount_msat = 4;
uint32 delay = 5;
GetrouteRouteStyle style = 6;
}
message ListforwardsRequest {
// ListForwards.status
enum ListforwardsStatus {
OFFERED = 0;
SETTLED = 1;
LOCAL_FAILED = 2;
FAILED = 3;
}
optional ListforwardsStatus status = 1;
optional string in_channel = 2;
optional string out_channel = 3;
}
message ListforwardsResponse {
repeated ListforwardsForwards forwards = 1;
}
message ListforwardsForwards {
// ListForwards.forwards[].status
enum ListforwardsForwardsStatus {
OFFERED = 0;
SETTLED = 1;
LOCAL_FAILED = 2;
FAILED = 3;
}
// ListForwards.forwards[].style
enum ListforwardsForwardsStyle {
LEGACY = 0;
TLV = 1;
}
string in_channel = 1;
Amount in_msat = 2;
ListforwardsForwardsStatus status = 3;
double received_time = 4;
optional string out_channel = 5;
optional bytes payment_hash = 6;
optional ListforwardsForwardsStyle style = 9;
optional Amount fee_msat = 7;
optional Amount out_msat = 8;
}
message ListpaysRequest {
// ListPays.status
enum ListpaysStatus {
PENDING = 0;
COMPLETE = 1;
FAILED = 2;
}
optional string bolt11 = 1;
optional bytes payment_hash = 2;
optional ListpaysStatus status = 3;
}
message ListpaysResponse {
repeated ListpaysPays pays = 1;
}
message ListpaysPays {
// ListPays.pays[].status
enum ListpaysPaysStatus {
PENDING = 0;
FAILED = 1;
COMPLETE = 2;
}
bytes payment_hash = 1;
ListpaysPaysStatus status = 2;
optional bytes destination = 3;
uint64 created_at = 4;
optional string label = 5;
optional string bolt11 = 6;
optional string bolt12 = 7;
optional Amount amount_msat = 8;
optional Amount amount_sent_msat = 9;
optional bytes erroronion = 10;
}
message PingRequest {
bytes id = 1;
optional double len = 2;
optional double pongbytes = 3;
}
message PingResponse {
uint32 totlen = 1;
}
message SignmessageRequest {
string message = 1;
}
message SignmessageResponse {
bytes signature = 1;
bytes recid = 2;
string zbase = 3;
}

File diff suppressed because it is too large Load diff

View file

@ -1210,4 +1210,228 @@ async fn tx_send(
}
async fn disconnect(
&self,
request: tonic::Request<pb::DisconnectRequest>,
) -> Result<tonic::Response<pb::DisconnectResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::DisconnectRequest = (&req).into();
debug!("Client asked for disconnect");
trace!("disconnect 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::Disconnect(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method Disconnect: {:?}", e)))?;
match result {
Response::Disconnect(r) => {
trace!("disconnect response: {:?}", r);
Ok(tonic::Response::new((&r).into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call Disconnect",
r
)
)),
}
}
async fn feerates(
&self,
request: tonic::Request<pb::FeeratesRequest>,
) -> Result<tonic::Response<pb::FeeratesResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::FeeratesRequest = (&req).into();
debug!("Client asked for feerates");
trace!("feerates 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::Feerates(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method Feerates: {:?}", e)))?;
match result {
Response::Feerates(r) => {
trace!("feerates response: {:?}", r);
Ok(tonic::Response::new((&r).into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call Feerates",
r
)
)),
}
}
async fn get_route(
&self,
request: tonic::Request<pb::GetrouteRequest>,
) -> Result<tonic::Response<pb::GetrouteResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::GetrouteRequest = (&req).into();
debug!("Client asked for get_route");
trace!("get_route 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::GetRoute(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method GetRoute: {:?}", e)))?;
match result {
Response::GetRoute(r) => {
trace!("get_route response: {:?}", r);
Ok(tonic::Response::new((&r).into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call GetRoute",
r
)
)),
}
}
async fn list_forwards(
&self,
request: tonic::Request<pb::ListforwardsRequest>,
) -> Result<tonic::Response<pb::ListforwardsResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::ListforwardsRequest = (&req).into();
debug!("Client asked for list_forwards");
trace!("list_forwards 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::ListForwards(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method ListForwards: {:?}", e)))?;
match result {
Response::ListForwards(r) => {
trace!("list_forwards response: {:?}", r);
Ok(tonic::Response::new((&r).into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call ListForwards",
r
)
)),
}
}
async fn list_pays(
&self,
request: tonic::Request<pb::ListpaysRequest>,
) -> Result<tonic::Response<pb::ListpaysResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::ListpaysRequest = (&req).into();
debug!("Client asked for list_pays");
trace!("list_pays 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::ListPays(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method ListPays: {:?}", e)))?;
match result {
Response::ListPays(r) => {
trace!("list_pays response: {:?}", r);
Ok(tonic::Response::new((&r).into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call ListPays",
r
)
)),
}
}
async fn ping(
&self,
request: tonic::Request<pb::PingRequest>,
) -> Result<tonic::Response<pb::PingResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::PingRequest = (&req).into();
debug!("Client asked for ping");
trace!("ping 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::Ping(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method Ping: {:?}", e)))?;
match result {
Response::Ping(r) => {
trace!("ping response: {:?}", r);
Ok(tonic::Response::new((&r).into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call Ping",
r
)
)),
}
}
async fn sign_message(
&self,
request: tonic::Request<pb::SignmessageRequest>,
) -> Result<tonic::Response<pb::SignmessageResponse>, tonic::Status> {
let req = request.into_inner();
let req: requests::SignmessageRequest = (&req).into();
debug!("Client asked for sign_message");
trace!("sign_message 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::SignMessage(req))
.await
.map_err(|e| Status::new(
Code::Unknown,
format!("Error calling method SignMessage: {:?}", e)))?;
match result {
Response::SignMessage(r) => {
trace!("sign_message response: {:?}", r);
Ok(tonic::Response::new((&r).into()))
},
r => Err(Status::new(
Code::Internal,
format!(
"Unexpected result {:?} to method call SignMessage",
r
)
)),
}
}
}

File diff suppressed because it is too large Load diff