Documentation ¶
Index ¶
- Constants
- Variables
- func DisableLog()
- func UseLogger(logger btclog.Logger)
- type Server
- func (s *Server) DecodeOffer(ctx context.Context, req *offersrpc.DecodeOfferRequest) (*offersrpc.DecodeOfferResponse, error)
- func (s *Server) GenerateBlindedRoute(ctx context.Context, req *offersrpc.GenerateBlindedRouteRequest) (*offersrpc.GenerateBlindedRouteResponse, error)
- func (s *Server) SendOnionMessage(ctx context.Context, req *offersrpc.SendOnionMessageRequest) (*offersrpc.SendOnionMessageResponse, error)
- func (s *Server) Start(lnd *lndclient.LndServices) error
- func (s *Server) Stop() error
- func (s *Server) SubscribeOnionPayload(req *offersrpc.SubscribeOnionPayloadRequest, ...) error
Constants ¶
View Source
const Subsystem = "B12-RPCS"
Subsystem defines the logging code for this subsystem.
Variables ¶
View Source
var ErrFeatureOverflow = errors.New("feature exceeds maximum value")
ErrFeatureOverflow is returned if a feature will overflow uint16.
View Source
var ( // ErrShuttingDown is returned when an operation is aborted because // the server is shutting down. ErrShuttingDown = status.Errorf(codes.Aborted, "server shutting down") )
View Source
var RPCServerPermissions = map[string][]bakery.Op{
"/offersrpc.Offers/SendOnionMessage": {{
Entity: "peers",
Action: "write",
}},
"/offersrpc.Offers/DecodeOffer": {{
Entity: "offchain",
Action: "read",
}},
"/offersrpc.Offers/SubscribeOnionPayload": {{
Entity: "offchain",
Action: "read",
}},
"/offersrpc.Offers/GenerateBlindedRoute": {{
Entity: "offchain",
Action: "read",
}},
}
RPCServerPermissions is the set of macaroon permissions needed for each api.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until UseLogger is called.
Types ¶
type Server ¶
type Server struct { offersrpc.UnimplementedOffersServer // contains filtered or unexported fields }
Server implements our offersrpc server.
func (*Server) DecodeOffer ¶
func (s *Server) DecodeOffer(ctx context.Context, req *offersrpc.DecodeOfferRequest) (*offersrpc.DecodeOfferResponse, error)
DecodeOffer decodes and validates the offer string provided.
func (*Server) GenerateBlindedRoute ¶
func (s *Server) GenerateBlindedRoute(ctx context.Context, req *offersrpc.GenerateBlindedRouteRequest) ( *offersrpc.GenerateBlindedRouteResponse, error)
GenerateBlindedRoute generates a blinded route to our node.
func (*Server) SendOnionMessage ¶
func (s *Server) SendOnionMessage(ctx context.Context, req *offersrpc.SendOnionMessageRequest) ( *offersrpc.SendOnionMessageResponse, error)
SendOnionMessage sends an onion message to the peer specified.
func (*Server) Start ¶
func (s *Server) Start(lnd *lndclient.LndServices) error
Start starts the offers server.
func (*Server) SubscribeOnionPayload ¶
func (s *Server) SubscribeOnionPayload( req *offersrpc.SubscribeOnionPayloadRequest, stream offersrpc.Offers_SubscribeOnionPayloadServer) error
SubscribeOnionPayload subscribes to onion message payloads
Click to show internal directories.
Click to hide internal directories.