mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-19 14:54:22 +01:00
64 lines
1.3 KiB
Protocol Buffer
64 lines
1.3 KiB
Protocol Buffer
syntax = "proto3";
|
|
option go_package="github.com/breez/lspd/cln_plugin/proto";
|
|
|
|
service ClnPlugin {
|
|
rpc HtlcStream(stream HtlcResolution) returns (stream HtlcAccepted);
|
|
rpc CustomMsgStream(CustomMessageRequest) returns (stream CustomMessage);
|
|
}
|
|
|
|
message HtlcAccepted {
|
|
string correlationid = 1;
|
|
Onion onion = 2;
|
|
Htlc htlc = 3;
|
|
string forward_to = 4;
|
|
}
|
|
|
|
message Onion {
|
|
string payload = 1;
|
|
string short_channel_id = 2;
|
|
uint64 forward_msat = 3;
|
|
uint32 outgoing_cltv_value = 4;
|
|
string shared_secret = 5;
|
|
string next_onion = 6;
|
|
}
|
|
|
|
message Htlc {
|
|
string short_channel_id = 1;
|
|
uint64 id = 2;
|
|
uint64 amount_msat = 3;
|
|
uint32 cltv_expiry = 4;
|
|
int32 cltv_expiry_relative = 5;
|
|
string payment_hash = 6;
|
|
}
|
|
|
|
message HtlcResolution {
|
|
string correlationid = 1;
|
|
oneof outcome {
|
|
HtlcFail fail = 2;
|
|
HtlcContinue continue = 3;
|
|
HtlcResolve resolve = 4;
|
|
}
|
|
}
|
|
|
|
message HtlcContinue {
|
|
optional string payload = 1;
|
|
optional string forward_to = 2;
|
|
}
|
|
|
|
message HtlcFail {
|
|
oneof failure {
|
|
string failure_message = 1;
|
|
string failure_onion = 2;
|
|
}
|
|
}
|
|
|
|
message HtlcResolve {
|
|
string payment_key = 1;
|
|
}
|
|
|
|
message CustomMessageRequest {}
|
|
message CustomMessage {
|
|
string peer_id = 1;
|
|
string payload = 2;
|
|
}
|