macaroons+rpcserver: Add new RPC call for checking macaroon permissions

This commit is contained in:
Turtle committed 2021-09-14 16:26:28 -05:00
1 parent 1ea6db1f26
commit d10a682fa9
9 files changed
+1000 -571

No files matched your search

+18
View File
@@ -532,6 +532,14 @@ service Lightning {
*/
rpc ListPermissions (ListPermissionsRequest)
returns (ListPermissionsResponse);
/*
CheckMacaroonPermissions checks whether a request follows the constraints
imposed on the macaroon and that the macaroon is authorized to follow the
provided permissions.
*/
rpc CheckMacaroonPermissions (CheckMacPermRequest)
returns (CheckMacPermResponse);
}
message Utxo {
@@ -4006,3 +4014,13 @@ message Op {
string entity = 1;
repeated string actions = 2;
}
message CheckMacPermRequest {
bytes macaroon = 1;
repeated MacaroonPermission permissions = 2;
string fullMethod = 3;
}
message CheckMacPermResponse {
bool valid = 1;
}