Versions in this module Expand all Collapse all v0 v0.15.10001 Jan 16, 2023 v0.15.101 Jan 16, 2023 Changes in this version + const Subsystem + var ErrNoWallet = fmt.Errorf(...) + var ErrRPCStarting = fmt.Errorf(...) + var ErrShuttingDown = errors.New("server shutting down") + var ErrTimeoutReached = errors.New("intercept timeout reached") + var ErrWaitingToStart = fmt.Errorf(...) + var ErrWalletLocked = fmt.Errorf(...) + var ErrWalletUnlocked = fmt.Errorf(...) + func DisableLog() + func UseLogger(logger btclog.Logger) + type InterceptType uint8 + const TypeRequest + const TypeResponse + const TypeStreamAuth + type InterceptionRequest struct + CustomCaveatCondition string + CustomCaveatName string + FullURI string + IsError bool + Macaroon *macaroon.Macaroon + ProtoSerialized []byte + ProtoTypeName string + RawMacaroon []byte + StreamRPC bool + Type InterceptType + func NewMessageInterceptionRequest(ctx context.Context, authType InterceptType, isStream bool, fullMethod string, ...) (*InterceptionRequest, error) + func NewStreamAuthInterceptionRequest(ctx context.Context, fullMethod string) (*InterceptionRequest, error) + func (r *InterceptionRequest) ToRPC(requestID, msgID uint64) (*lnrpc.RPCMiddlewareRequest, error) + type InterceptorChain struct + func NewInterceptorChain(log btclog.Logger, noMacaroons bool, mandatoryMiddleware []string) *InterceptorChain + func (r *InterceptorChain) AddMacaroonService(svc *macaroons.Service) + func (r *InterceptorChain) AddPermission(method string, ops []bakery.Op) error + func (r *InterceptorChain) CreateServerOpts() []grpc.ServerOption + func (r *InterceptorChain) CustomCaveatSupported(customCaveatName string) error + func (r *InterceptorChain) GetState(_ context.Context, _ *lnrpc.GetStateRequest) (*lnrpc.GetStateResponse, error) + func (r *InterceptorChain) MacaroonService() *macaroons.Service + func (r *InterceptorChain) MacaroonStreamServerInterceptor() grpc.StreamServerInterceptor + func (r *InterceptorChain) MacaroonUnaryServerInterceptor() grpc.UnaryServerInterceptor + func (r *InterceptorChain) Permissions() map[string][]bakery.Op + func (r *InterceptorChain) RegisterMiddleware(mw *MiddlewareHandler) error + func (r *InterceptorChain) RemoveMiddleware(middlewareName string) + func (r *InterceptorChain) SetRPCActive() + func (r *InterceptorChain) SetServerActive() + func (r *InterceptorChain) SetWalletLocked() + func (r *InterceptorChain) SetWalletNotCreated() + func (r *InterceptorChain) SetWalletUnlocked() + func (r *InterceptorChain) Start() error + func (r *InterceptorChain) Stop() error + func (r *InterceptorChain) SubscribeState(_ *lnrpc.SubscribeStateRequest, stream lnrpc.State_SubscribeStateServer) error + type MiddlewareHandler struct + func NewMiddlewareHandler(name, customCaveatName string, readOnly bool, ...) *MiddlewareHandler + func (h *MiddlewareHandler) Run() error