Documentation ¶
Index ¶
- Constants
- type Client
- type FakeBackend
- func (fb *FakeBackend) ConnectionStatus() error
- func (fb *FakeBackend) CreateInvoice(amount uint64) (Invoice, error)
- func (fb *FakeBackend) FeeReserve(amount uint64) uint64
- func (fb *FakeBackend) InvoiceStatus(hash string) (Invoice, error)
- func (fb *FakeBackend) OutgoingPaymentStatus(ctx context.Context, hash string) (PaymentStatus, error)
- func (fb *FakeBackend) SendPayment(ctx context.Context, request string, amount uint64) (PaymentStatus, error)
- type Invoice
- type LndClient
- func (lnd *LndClient) ConnectionStatus() error
- func (lnd *LndClient) CreateInvoice(amount uint64) (Invoice, error)
- func (lnd *LndClient) FeeReserve(amount uint64) uint64
- func (lnd *LndClient) InvoiceStatus(hash string) (Invoice, error)
- func (lnd *LndClient) OutgoingPaymentStatus(ctx context.Context, hash string) (PaymentStatus, error)
- func (lnd *LndClient) SendPayment(ctx context.Context, request string, amount uint64) (PaymentStatus, error)
- type LndConfig
- type PaymentStatus
- type State
Constants ¶
View Source
const ( InvoiceExpiryMins = 10 FeePercent float64 = 0.01 )
View Source
const (
FakePreimage = "0000000000000000"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { ConnectionStatus() error CreateInvoice(amount uint64) (Invoice, error) InvoiceStatus(hash string) (Invoice, error) SendPayment(ctx context.Context, request string, amount uint64) (PaymentStatus, error) OutgoingPaymentStatus(ctx context.Context, hash string) (PaymentStatus, error) FeeReserve(amount uint64) uint64 }
Client interface to interact with a Lightning backend
type FakeBackend ¶ added in v0.3.0
type FakeBackend struct {
// contains filtered or unexported fields
}
func (*FakeBackend) ConnectionStatus ¶ added in v0.3.0
func (fb *FakeBackend) ConnectionStatus() error
func (*FakeBackend) CreateInvoice ¶ added in v0.3.0
func (fb *FakeBackend) CreateInvoice(amount uint64) (Invoice, error)
func (*FakeBackend) FeeReserve ¶ added in v0.3.0
func (fb *FakeBackend) FeeReserve(amount uint64) uint64
func (*FakeBackend) InvoiceStatus ¶ added in v0.3.0
func (fb *FakeBackend) InvoiceStatus(hash string) (Invoice, error)
func (*FakeBackend) OutgoingPaymentStatus ¶ added in v0.3.0
func (fb *FakeBackend) OutgoingPaymentStatus(ctx context.Context, hash string) (PaymentStatus, error)
func (*FakeBackend) SendPayment ¶ added in v0.3.0
func (fb *FakeBackend) SendPayment(ctx context.Context, request string, amount uint64) (PaymentStatus, error)
type LndClient ¶
type LndClient struct {
// contains filtered or unexported fields
}
func SetupLndClient ¶ added in v0.2.0
func (*LndClient) ConnectionStatus ¶ added in v0.3.0
func (*LndClient) CreateInvoice ¶
func (*LndClient) FeeReserve ¶
func (*LndClient) InvoiceStatus ¶ added in v0.2.0
func (*LndClient) OutgoingPaymentStatus ¶ added in v0.3.0
func (*LndClient) SendPayment ¶
type LndConfig ¶ added in v0.2.0
type LndConfig struct { GRPCHost string Cert credentials.TransportCredentials Macaroon macaroons.MacaroonCredential }
type PaymentStatus ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.