mod+subservers: use taprpc module

This commit is contained in:
Oliver Gugger 2025-05-02 09:36:25 +02:00
parent 7e0b198373
commit 33bc532ce0
No known key found for this signature in database
GPG key ID: 8E4256593F177720
8 changed files with 52 additions and 1108 deletions

View file

@ -7,7 +7,6 @@ import (
"github.com/lightninglabs/lndclient"
"github.com/lightninglabs/loop"
"github.com/lightninglabs/loop/loopd"
"github.com/lightninglabs/loop/loopd/perms"
"github.com/lightninglabs/loop/looprpc"
"github.com/lightninglabs/taproot-assets/fn"
"github.com/lightningnetwork/lnd/lnrpc"
@ -127,7 +126,7 @@ func (l *loopSubServer) MacPath() string {
//
// NOTE: this is part of the SubServer interface.
func (l *loopSubServer) Permissions() map[string][]bakery.Op {
return perms.RequiredPermissions
return looprpc.RequiredPermissions
}
// WhiteListedURLs returns a map of all the sub-server's URLs that can be

View file

@ -10,7 +10,6 @@ import (
tap "github.com/lightninglabs/taproot-assets"
"github.com/lightninglabs/taproot-assets/address"
"github.com/lightninglabs/taproot-assets/fn"
"github.com/lightninglabs/taproot-assets/perms"
"github.com/lightninglabs/taproot-assets/tapcfg"
"github.com/lightninglabs/taproot-assets/taprpc"
"github.com/lightninglabs/taproot-assets/taprpc/assetwalletrpc"
@ -224,7 +223,7 @@ func (t *taprootAssetsSubServer) MacPath() string {
//
// NOTE: this is part of the SubServer interface.
func (t *taprootAssetsSubServer) Permissions() map[string][]bakery.Op {
return perms.RequiredPermissions
return taprpc.RequiredPermissions
}
// WhiteListedURLs returns a map of all the sub-server's URLs that can be
@ -248,7 +247,7 @@ func (t *taprootAssetsSubServer) WhiteListedURLs() map[string]struct{} {
string(tap.UniversePublicAccessStatusWrite),
)
return perms.MacaroonWhitelist(
return taprpc.MacaroonWhitelist(
publicUniRead || t.remote, publicUniWrite || t.remote,
t.cfg.RpcConf.AllowPublicUniProofCourier || t.remote,
t.cfg.RpcConf.AllowPublicStats || t.remote,