Skip to content

Commit 3c04b6f

Browse files
committed
lightningd: remove expermential "sendonionmessage" function.
It was only ever expermental, so I don't feel bad about just removing it. Signed-off-by: Rusty Russell <[email protected]> Changelog-Removed: JSON-RPC: `sendonionmessage` (was experimental only, use `injectonionmessage`)
1 parent 91cd689 commit 3c04b6f

File tree

14 files changed

+343
-758
lines changed

14 files changed

+343
-758
lines changed

cln-grpc/proto/node.proto

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-grpc/src/convert.rs

Lines changed: 0 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cln-grpc/src/server.rs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2738,38 +2738,6 @@ impl Node for Server
27382738

27392739
}
27402740

2741-
async fn send_onion_message(
2742-
&self,
2743-
request: tonic::Request<pb::SendonionmessageRequest>,
2744-
) -> Result<tonic::Response<pb::SendonionmessageResponse>, tonic::Status> {
2745-
let req = request.into_inner();
2746-
let req: requests::SendonionmessageRequest = req.into();
2747-
debug!("Client asked for send_onion_message");
2748-
trace!("send_onion_message request: {:?}", req);
2749-
let mut rpc = ClnRpc::new(&self.rpc_path)
2750-
.await
2751-
.map_err(|e| Status::new(Code::Internal, e.to_string()))?;
2752-
let result = rpc.call(Request::SendOnionMessage(req))
2753-
.await
2754-
.map_err(|e| Status::new(
2755-
Code::Unknown,
2756-
format!("Error calling method SendOnionMessage: {:?}", e)))?;
2757-
match result {
2758-
Response::SendOnionMessage(r) => {
2759-
trace!("send_onion_message response: {:?}", r);
2760-
Ok(tonic::Response::new(r.into()))
2761-
},
2762-
r => Err(Status::new(
2763-
Code::Internal,
2764-
format!(
2765-
"Unexpected result {:?} to method call SendOnionMessage",
2766-
r
2767-
)
2768-
)),
2769-
}
2770-
2771-
}
2772-
27732741
async fn set_channel(
27742742
&self,
27752743
request: tonic::Request<pb::SetchannelRequest>,

cln-rpc/src/model.rs

Lines changed: 0 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/msggen/msggen/schema.json

Lines changed: 0 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -26341,83 +26341,6 @@
2634126341
}
2634226342
]
2634326343
},
26344-
"lightning-sendonionmessage.json": {
26345-
"$schema": "../rpc-schema-draft.json",
26346-
"type": "object",
26347-
"additionalProperties": false,
26348-
"rpc": "sendonionmessage",
26349-
"title": "low-level command to send an onion message",
26350-
"warning": "experimental-onion-messages only",
26351-
"description": [
26352-
"The **sendonionmessage** RPC command can be used to send a message via the lightning network. These are currently used by *offers* to request and receive invoices."
26353-
],
26354-
"request": {
26355-
"required": [
26356-
"first_id",
26357-
"blinding",
26358-
"hops"
26359-
],
26360-
"properties": {
26361-
"first_id": {
26362-
"type": "pubkey",
26363-
"description": [
26364-
"The (presumably well-known) public key of the start of the path."
26365-
]
26366-
},
26367-
"blinding": {
26368-
"type": "pubkey",
26369-
"description": [
26370-
"Blinding factor for this path."
26371-
]
26372-
},
26373-
"hops": {
26374-
"type": "array",
26375-
"description": [
26376-
"",
26377-
""
26378-
],
26379-
"items": {
26380-
"type": "object",
26381-
"additionalProperties": false,
26382-
"required": [
26383-
"node",
26384-
"tlv"
26385-
],
26386-
"properties": {
26387-
"node": {
26388-
"type": "pubkey",
26389-
"description": [
26390-
"Public key of the node."
26391-
]
26392-
},
26393-
"tlv": {
26394-
"type": "u8",
26395-
"description": [
26396-
"Contains a hexadecimal TLV to include."
26397-
]
26398-
}
26399-
}
26400-
}
26401-
}
26402-
}
26403-
},
26404-
"response": {
26405-
"required": [],
26406-
"properties": {}
26407-
},
26408-
"author": [
26409-
"Rusty Russell <<[email protected]>> is mainly responsible."
26410-
],
26411-
"see_also": [
26412-
"lightning-fetchinvoice(7)",
26413-
"lightning-offer(7)"
26414-
],
26415-
"resources": [
26416-
"Main web site: <https://github.com/ElementsProject/lightning>",
26417-
"",
26418-
"[bolt04]: https://github.com/lightning/bolts/blob/master/04-onion-routing.md"
26419-
]
26420-
},
2642126344
"lightning-sendpay.json": {
2642226345
"$schema": "../rpc-schema-draft.json",
2642326346
"type": "object",

contrib/msggen/msggen/utils/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
"ReserveInputs",
9191
"SendCustomMsg",
9292
"SendInvoice",
93-
"SendOnionMessage",
9493
"SetChannel",
9594
"SetConfig",
9695
"SetPsbtVersion",

contrib/pyln-grpc-proto/pyln/grpc/node_pb2.py

Lines changed: 343 additions & 349 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contrib/pyln-grpc-proto/pyln/grpc/node_pb2_grpc.py

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -429,11 +429,6 @@ def __init__(self, channel):
429429
request_serializer=node__pb2.SendinvoiceRequest.SerializeToString,
430430
response_deserializer=node__pb2.SendinvoiceResponse.FromString,
431431
)
432-
self.SendOnionMessage = channel.unary_unary(
433-
'/cln.Node/SendOnionMessage',
434-
request_serializer=node__pb2.SendonionmessageRequest.SerializeToString,
435-
response_deserializer=node__pb2.SendonionmessageResponse.FromString,
436-
)
437432
self.SetChannel = channel.unary_unary(
438433
'/cln.Node/SetChannel',
439434
request_serializer=node__pb2.SetchannelRequest.SerializeToString,
@@ -1102,12 +1097,6 @@ def SendInvoice(self, request, context):
11021097
context.set_details('Method not implemented!')
11031098
raise NotImplementedError('Method not implemented!')
11041099

1105-
def SendOnionMessage(self, request, context):
1106-
"""Missing associated documentation comment in .proto file."""
1107-
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1108-
context.set_details('Method not implemented!')
1109-
raise NotImplementedError('Method not implemented!')
1110-
11111100
def SetChannel(self, request, context):
11121101
"""Missing associated documentation comment in .proto file."""
11131102
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@@ -1724,11 +1713,6 @@ def add_NodeServicer_to_server(servicer, server):
17241713
request_deserializer=node__pb2.SendinvoiceRequest.FromString,
17251714
response_serializer=node__pb2.SendinvoiceResponse.SerializeToString,
17261715
),
1727-
'SendOnionMessage': grpc.unary_unary_rpc_method_handler(
1728-
servicer.SendOnionMessage,
1729-
request_deserializer=node__pb2.SendonionmessageRequest.FromString,
1730-
response_serializer=node__pb2.SendonionmessageResponse.SerializeToString,
1731-
),
17321716
'SetChannel': grpc.unary_unary_rpc_method_handler(
17331717
servicer.SetChannel,
17341718
request_deserializer=node__pb2.SetchannelRequest.FromString,
@@ -3315,23 +3299,6 @@ def SendInvoice(request,
33153299
options, channel_credentials,
33163300
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
33173301

3318-
@staticmethod
3319-
def SendOnionMessage(request,
3320-
target,
3321-
options=(),
3322-
channel_credentials=None,
3323-
call_credentials=None,
3324-
insecure=False,
3325-
compression=None,
3326-
wait_for_ready=None,
3327-
timeout=None,
3328-
metadata=None):
3329-
return grpc.experimental.unary_unary(request, target, '/cln.Node/SendOnionMessage',
3330-
node__pb2.SendonionmessageRequest.SerializeToString,
3331-
node__pb2.SendonionmessageResponse.FromString,
3332-
options, channel_credentials,
3333-
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
3334-
33353302
@staticmethod
33363303
def SetChannel(request,
33373304
target,

contrib/pyln-testing/pyln/testing/grpc2py.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1874,11 +1874,6 @@ def sendinvoice2py(m):
18741874
})
18751875

18761876

1877-
def sendonionmessage2py(m):
1878-
return remove_default({
1879-
})
1880-
1881-
18821877
def setchannel_channels2py(m):
18831878
return remove_default({
18841879
"channel_id": hexlify(m.channel_id), # PrimitiveField in generate_composite

doc/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ GENERATE_MARKDOWN := doc/lightning-addgossip.7 \
9898
doc/lightning-sendcustommsg.7 \
9999
doc/lightning-sendinvoice.7 \
100100
doc/lightning-sendonion.7 \
101-
doc/lightning-sendonionmessage.7 \
102101
doc/lightning-sendpay.7 \
103102
doc/lightning-sendpsbt.7 \
104103
doc/lightning-setchannel.7 \

doc/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ Core Lightning Documentation
109109
lightning-sendcustommsg <lightning-sendcustommsg.7.md>
110110
lightning-sendinvoice <lightning-sendinvoice.7.md>
111111
lightning-sendonion <lightning-sendonion.7.md>
112-
lightning-sendonionmessage <lightning-sendonionmessage.7.md>
113112
lightning-sendpay <lightning-sendpay.7.md>
114113
lightning-sendpsbt <lightning-sendpsbt.7.md>
115114
lightning-setchannel <lightning-setchannel.7.md>

0 commit comments

Comments
 (0)