mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
perms: move perms.go into looprpc
The Lightning Node Connect (LNC) WASM client currently imports both `looprpc` and the entire `loop` module to access `perms.go`. This creates problems because `loop` imports `taproot-assets`, resulting in too many symbols for the WASM build. To fix this, we will move `perms.go`—which defines RPC endpoint permissions—into `looprpc`. After this change, the LNC WASM client will import only `looprpc`, while the rest of `loop` can continue importing `taproot-assets` without affecting the LNC WASM build.
This commit is contained in:
parent
7e81916829
commit
64e6bbd451
6 changed files with 74 additions and 33 deletions
|
|
@ -18,7 +18,6 @@ import (
|
|||
"github.com/lightninglabs/loop/assets"
|
||||
"github.com/lightninglabs/loop/instantout"
|
||||
"github.com/lightninglabs/loop/instantout/reservation"
|
||||
"github.com/lightninglabs/loop/loopd/perms"
|
||||
"github.com/lightninglabs/loop/loopdb"
|
||||
loop_looprpc "github.com/lightninglabs/loop/looprpc"
|
||||
"github.com/lightninglabs/loop/notifications"
|
||||
|
|
@ -502,7 +501,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
// Add our debug permissions to our main set of required permissions
|
||||
// if compiled in.
|
||||
for endpoint, perm := range debugRequiredPermissions {
|
||||
perms.RequiredPermissions[endpoint] = perm
|
||||
loop_looprpc.RequiredPermissions[endpoint] = perm
|
||||
}
|
||||
|
||||
rks, db, err := lndclient.NewBoltMacaroonStore(
|
||||
|
|
@ -530,7 +529,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error {
|
|||
Checkers: []macaroons.Checker{
|
||||
macaroons.IPLockChecker,
|
||||
},
|
||||
RequiredPerms: perms.RequiredPermissions,
|
||||
RequiredPerms: loop_looprpc.RequiredPermissions,
|
||||
DBPassword: macDbDefaultPw,
|
||||
LndClient: &d.lnd.LndServices,
|
||||
EphemeralKey: lndclient.SharedKeyNUMS,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue