admin channels
This commit is contained in:
parent
03d4bfc28f
commit
70dc928f1b
16 changed files with 590 additions and 109 deletions
|
|
@ -144,6 +144,27 @@ service LightningPub {
|
|||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc AddPeer(structs.AddPeerRequest) returns (structs.Empty) {
|
||||
option (auth_type) = "Admin";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/admin/peer";
|
||||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc OpenChannel(structs.OpenChannelRequest) returns (structs.OpenChannelResponse) {
|
||||
option (auth_type) = "Admin";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/admin/channel/open";
|
||||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc CloseChannel(structs.CloseChannelRequest) returns (structs.CloseChannelResponse) {
|
||||
option (auth_type) = "Admin";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/admin/channel/close";
|
||||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc GetUsageMetrics(structs.Empty) returns (structs.UsageMetrics) {
|
||||
option (auth_type) = "Metrics";
|
||||
option (http_method) = "post";
|
||||
|
|
@ -419,13 +440,6 @@ service LightningPub {
|
|||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc OpenChannel(structs.OpenChannelRequest) returns (structs.OpenChannelResponse){
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "post";
|
||||
option (http_route) = "/api/user/open/channel";
|
||||
option (nostr) = true;
|
||||
}
|
||||
|
||||
rpc GetLnurlWithdrawLink(structs.Empty) returns (structs.LnurlLinkResponse){
|
||||
option (auth_type) = "User";
|
||||
option (http_method) = "get";
|
||||
|
|
|
|||
|
|
@ -131,6 +131,41 @@ message LndChannels {
|
|||
repeated OpenChannel open_channels = 1;
|
||||
}
|
||||
|
||||
message GetChannelPolicyRequest {
|
||||
string channel_id = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
message OpenChannelRequest{
|
||||
string node_pubkey = 1;
|
||||
int64 local_funding_amount = 2;
|
||||
int64 sat_per_v_byte = 3;
|
||||
optional int64 push_sat = 5;
|
||||
optional string close_address = 6;
|
||||
}
|
||||
|
||||
message OpenChannelResponse{
|
||||
string channel_id = 1;
|
||||
}
|
||||
|
||||
message CloseChannelRequest{
|
||||
bool force = 2;
|
||||
int64 sat_per_v_byte = 3;
|
||||
string funding_txid = 4;
|
||||
int64 output_index = 5;
|
||||
}
|
||||
|
||||
message CloseChannelResponse{
|
||||
string closing_txid = 1;
|
||||
}
|
||||
|
||||
message AddPeerRequest {
|
||||
string pubkey = 1;
|
||||
string host = 2;
|
||||
int64 port = 3;
|
||||
}
|
||||
|
||||
message LndGetInfoRequest {
|
||||
int64 nodeId = 1;
|
||||
}
|
||||
|
|
@ -308,17 +343,6 @@ message PaymentState{
|
|||
int64 network_fee = 4;
|
||||
}
|
||||
|
||||
message OpenChannelRequest{
|
||||
string destination = 1;
|
||||
int64 fundingAmount = 2;
|
||||
int64 pushAmount = 3;
|
||||
string closeAddress = 4;
|
||||
}
|
||||
|
||||
message OpenChannelResponse{
|
||||
string channelId = 1;
|
||||
}
|
||||
|
||||
message LnurlLinkResponse{
|
||||
string lnurl = 1;
|
||||
string k1 = 2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue