mirror of https://github.com/lightninglabs/loop
loopd: move RequiredPermissions to dedicated dir
This commit moves the RequiredPermissions map to its own directory so that projects importing the permissions list dont need to import all the dependencies of the loopd package.pull/507/head
parent
5b5dfc0f5e
commit
8ccd35e0c1
@ -0,0 +1,85 @@
|
||||
package perms
|
||||
|
||||
import "gopkg.in/macaroon-bakery.v2/bakery"
|
||||
|
||||
// RequiredPermissions is a map of all loop RPC methods and their
|
||||
// required macaroon permissions to access loopd.
|
||||
var RequiredPermissions = map[string][]bakery.Op{
|
||||
"/looprpc.SwapClient/LoopOut": {{
|
||||
Entity: "swap",
|
||||
Action: "execute",
|
||||
}, {
|
||||
Entity: "loop",
|
||||
Action: "out",
|
||||
}},
|
||||
"/looprpc.SwapClient/LoopIn": {{
|
||||
Entity: "swap",
|
||||
Action: "execute",
|
||||
}, {
|
||||
Entity: "loop",
|
||||
Action: "in",
|
||||
}},
|
||||
"/looprpc.SwapClient/Monitor": {{
|
||||
Entity: "swap",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/ListSwaps": {{
|
||||
Entity: "swap",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/SwapInfo": {{
|
||||
Entity: "swap",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/LoopOutTerms": {{
|
||||
Entity: "terms",
|
||||
Action: "read",
|
||||
}, {
|
||||
Entity: "loop",
|
||||
Action: "out",
|
||||
}},
|
||||
"/looprpc.SwapClient/LoopOutQuote": {{
|
||||
Entity: "swap",
|
||||
Action: "read",
|
||||
}, {
|
||||
Entity: "loop",
|
||||
Action: "out",
|
||||
}},
|
||||
"/looprpc.SwapClient/GetLoopInTerms": {{
|
||||
Entity: "terms",
|
||||
Action: "read",
|
||||
}, {
|
||||
Entity: "loop",
|
||||
Action: "in",
|
||||
}},
|
||||
"/looprpc.SwapClient/GetLoopInQuote": {{
|
||||
Entity: "swap",
|
||||
Action: "read",
|
||||
}, {
|
||||
Entity: "loop",
|
||||
Action: "in",
|
||||
}},
|
||||
"/looprpc.SwapClient/GetLsatTokens": {{
|
||||
Entity: "auth",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/SuggestSwaps": {{
|
||||
Entity: "suggestions",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/GetLiquidityParams": {{
|
||||
Entity: "suggestions",
|
||||
Action: "read",
|
||||
}},
|
||||
"/looprpc.SwapClient/SetLiquidityParams": {{
|
||||
Entity: "suggestions",
|
||||
Action: "write",
|
||||
}},
|
||||
"/looprpc.SwapClient/Probe": {{
|
||||
Entity: "swap",
|
||||
Action: "execute",
|
||||
}, {
|
||||
Entity: "loop",
|
||||
Action: "in",
|
||||
}},
|
||||
}
|
Loading…
Reference in New Issue