invoicesrpc

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2019 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRPCInvoice

func CreateRPCInvoice(invoice *channeldb.Invoice,
	activeNetParams *chaincfg.Params) (*lnrpc.Invoice, error)

CreateRPCInvoice creates an *lnrpc.Invoice from the *channeldb.Invoice.

func CreateRPCRouteHints

func CreateRPCRouteHints(routeHints [][]routing.HopHint) []*lnrpc.RouteHint

CreateRPCRouteHints takes in the decoded form of an invoice's route hints and converts them into the lnrpc type.

func DisableLog

func DisableLog()

DisableLog disables all library log output. Logging output is disabled by by default until UseLogger is called.

func RegisterInvoicesServer

func RegisterInvoicesServer(s *grpc.Server, srv InvoicesServer)

func UseLogger

func UseLogger(logger btclog.Logger)

UseLogger uses a specified Logger to output package logging info. This should be used in preference to SetLogWriter if the caller is also using btclog.

Types

type CancelInvoiceMsg

type CancelInvoiceMsg struct {
	// / Hash corresponding to the invoice to cancel.
	PaymentHash          []byte   `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CancelInvoiceMsg) Descriptor

func (*CancelInvoiceMsg) Descriptor() ([]byte, []int)

func (*CancelInvoiceMsg) GetPaymentHash

func (m *CancelInvoiceMsg) GetPaymentHash() []byte

func (*CancelInvoiceMsg) ProtoMessage

func (*CancelInvoiceMsg) ProtoMessage()

func (*CancelInvoiceMsg) Reset

func (m *CancelInvoiceMsg) Reset()

func (*CancelInvoiceMsg) String

func (m *CancelInvoiceMsg) String() string

func (*CancelInvoiceMsg) XXX_DiscardUnknown

func (m *CancelInvoiceMsg) XXX_DiscardUnknown()

func (*CancelInvoiceMsg) XXX_Marshal

func (m *CancelInvoiceMsg) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CancelInvoiceMsg) XXX_Merge

func (dst *CancelInvoiceMsg) XXX_Merge(src proto.Message)

func (*CancelInvoiceMsg) XXX_Size

func (m *CancelInvoiceMsg) XXX_Size() int

func (*CancelInvoiceMsg) XXX_Unmarshal

func (m *CancelInvoiceMsg) XXX_Unmarshal(b []byte) error

type CancelInvoiceResp

type CancelInvoiceResp struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CancelInvoiceResp) Descriptor

func (*CancelInvoiceResp) Descriptor() ([]byte, []int)

func (*CancelInvoiceResp) ProtoMessage

func (*CancelInvoiceResp) ProtoMessage()

func (*CancelInvoiceResp) Reset

func (m *CancelInvoiceResp) Reset()

func (*CancelInvoiceResp) String

func (m *CancelInvoiceResp) String() string

func (*CancelInvoiceResp) XXX_DiscardUnknown

func (m *CancelInvoiceResp) XXX_DiscardUnknown()

func (*CancelInvoiceResp) XXX_Marshal

func (m *CancelInvoiceResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CancelInvoiceResp) XXX_Merge

func (dst *CancelInvoiceResp) XXX_Merge(src proto.Message)

func (*CancelInvoiceResp) XXX_Size

func (m *CancelInvoiceResp) XXX_Size() int

func (*CancelInvoiceResp) XXX_Unmarshal

func (m *CancelInvoiceResp) XXX_Unmarshal(b []byte) error

type Config

type Config struct{}

Config is empty for non-invoicesrpc builds.

type InvoicesClient

type InvoicesClient interface {
	// *
	// SubscribeSingleInvoice returns a uni-directional stream (server -> client)
	// to notify the client of state transitions of the specified invoice.
	// Initially the current invoice state is always sent out.
	SubscribeSingleInvoice(ctx context.Context, in *lnrpc.PaymentHash, opts ...grpc.CallOption) (Invoices_SubscribeSingleInvoiceClient, error)
	// *
	// CancelInvoice cancels a currently open invoice. If the invoice is already
	// canceled, this call will succeed. If the invoice is already settled, it will
	// fail.
	CancelInvoice(ctx context.Context, in *CancelInvoiceMsg, opts ...grpc.CallOption) (*CancelInvoiceResp, error)
}

InvoicesClient is the client API for Invoices service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewInvoicesClient

func NewInvoicesClient(cc *grpc.ClientConn) InvoicesClient

type InvoicesServer

type InvoicesServer interface {
	// *
	// SubscribeSingleInvoice returns a uni-directional stream (server -> client)
	// to notify the client of state transitions of the specified invoice.
	// Initially the current invoice state is always sent out.
	SubscribeSingleInvoice(*lnrpc.PaymentHash, Invoices_SubscribeSingleInvoiceServer) error
	// *
	// CancelInvoice cancels a currently open invoice. If the invoice is already
	// canceled, this call will succeed. If the invoice is already settled, it will
	// fail.
	CancelInvoice(context.Context, *CancelInvoiceMsg) (*CancelInvoiceResp, error)
}

InvoicesServer is the server API for Invoices service.

type Invoices_SubscribeSingleInvoiceClient

type Invoices_SubscribeSingleInvoiceClient interface {
	Recv() (*lnrpc.Invoice, error)
	grpc.ClientStream
}

type Invoices_SubscribeSingleInvoiceServer

type Invoices_SubscribeSingleInvoiceServer interface {
	Send(*lnrpc.Invoice) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL