mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 18:27:43 +02:00
macaroons+rpcserver: Add new RPC call for checking macaroon permissions
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user