Versions in this module Expand all Collapse all v0 v0.12.1 Mar 18, 2021 Changes in this version + var DefaultBuildTags = []string + var ErrBuildTagsMissing = errors.New("build tags missing") + var ErrMalformedServerResponse = errors.New("one or more invoices are malformed") + var ErrNoRouteToServer = errors.New("no off-chain route to server") + var ErrVersionCheckNotImplemented = errors.New(...) + var ErrVersionIncompatible = errors.New("version incompatible") + var PaymentResultAlreadyPaid = channeldb.ErrAlreadyPaid.Error() + var PaymentResultInFlight = channeldb.ErrPaymentInFlight.Error() + var PaymentResultSuccess = "" + var PaymentResultUnknownPaymentHash = "UnknownPaymentHash" + func NewBasicClient(lndHost, tlsPath, macDir, network string, basicOptions ...BasicClientOption) (lnrpc.LightningClient, error) + func NewBasicConn(lndHost, tlsPath, macDir, network string, basicOptions ...BasicClientOption) (*grpc.ClientConn, error) + func NewOutpointFromStr(outpoint string) (*wire.OutPoint, error) + func UseLogger(logger btclog.Logger) + func VersionString(version *verrpc.Version) string + func VersionStringShort(version *verrpc.Version) string + type BasicClientOption func(*basicClientOptions) + func MacFilename(macFilename string) BasicClientOption + type ChainNotifierClient interface + RegisterBlockEpochNtfn func(ctx context.Context) (chan int32, chan error, error) + RegisterConfirmationsNtfn func(ctx context.Context, txid *chainhash.Hash, pkScript []byte, ...) (chan *chainntnfs.TxConfirmation, chan error, error) + RegisterSpendNtfn func(ctx context.Context, outpoint *wire.OutPoint, pkScript []byte, ...) (chan *chainntnfs.SpendDetail, chan error, error) + type ChannelBalance struct + Balance vclutil.Amount + PendingBalance vclutil.Amount + type ChannelCloseUpdate struct + Capacity vclutil.Amount + ChannelID lnwire.ShortChannelID + ChannelPoint wire.OutPoint + ClosedHeight uint32 + type ChannelClosedUpdate struct + CloseTx chainhash.Hash + func (p *ChannelClosedUpdate) CloseTxid() chainhash.Hash + type ChannelConstraints struct + CsvDelay uint32 + DustLimit vclutil.Amount + MaxAcceptedHtlcs uint32 + MaxPendingAmt lnwire.MilliSatoshi + MinHtlc lnwire.MilliSatoshi + Reserve vclutil.Amount + type ChannelEdge struct + Capacity vclutil.Amount + ChannelId uint64 + ChannelPoint string + Node1 route.Vertex + Node1Policy *RoutingPolicy + Node2 route.Vertex + Node2Policy *RoutingPolicy + type ChannelEdgeUpdate struct + AdvertisingNode route.Vertex + Capacity vclutil.Amount + ChannelID lnwire.ShortChannelID + ChannelPoint wire.OutPoint + ConnectingNode route.Vertex + RoutingPolicy RoutingPolicy + type ChannelEventUpdate struct + ChannelPoint *wire.OutPoint + ClosedChannelInfo *ClosedChannel + OpenedChannelInfo *ChannelInfo + UpdateType ChannelUpdateType + type ChannelInfo struct + Active bool + CSVDelay uint64 + Capacity vclutil.Amount + ChannelID uint64 + ChannelPoint string + CommitFee vclutil.Amount + CommitWeight int64 + FeePerKw chainfee.SatPerKWeight + Initiator bool + LifeTime time.Duration + LocalBalance vclutil.Amount + LocalConstraints *ChannelConstraints + NumPendingHtlcs int + NumUpdates uint64 + PendingHtlcs []PendingHtlc + Private bool + PubKeyBytes route.Vertex + RemoteBalance vclutil.Amount + RemoteConstraints *ChannelConstraints + TotalReceived vclutil.Amount + TotalSent vclutil.Amount + UnsettledBalance vclutil.Amount + Uptime time.Duration + type ChannelUpdateType uint8 + const ActiveChannelUpdate + const ClosedChannelUpdate + const InactiveChannelUpdate + const OpenChannelUpdate + const PendingOpenChannelUpdate + type CloseChannelUpdate interface + CloseTxid func() chainhash.Hash + type CloseType uint8 + const CloseTypeAbandoned + const CloseTypeBreach + const CloseTypeCooperative + const CloseTypeFundingCancelled + const CloseTypeLocalForce + const CloseTypeRemoteForce + func (c CloseType) String() string + type ClosedChannel struct + Capacity vclutil.Amount + ChannelID uint64 + ChannelPoint string + CloseHeight uint32 + CloseInitiator Initiator + CloseType CloseType + ClosingTxHash string + OpenInitiator Initiator + PubKeyBytes route.Vertex + SettledBalance vclutil.Amount + type DialerFunc func(context.Context, string) (net.Conn, error) + type ForceCloseChannel struct + CloseTxid chainhash.Hash + type ForwardingEvent struct + AmountMsatIn lnwire.MilliSatoshi + AmountMsatOut lnwire.MilliSatoshi + ChannelIn uint64 + ChannelOut uint64 + FeeMsat lnwire.MilliSatoshi + Timestamp time.Time + type ForwardingHistoryRequest struct + EndTime time.Time + MaxEvents uint32 + Offset uint32 + StartTime time.Time + type ForwardingHistoryResponse struct + Events []ForwardingEvent + LastIndexOffset uint32 + type Graph struct + Edges []ChannelEdge + Nodes []Node + type GraphTopologyUpdate struct + ChannelCloseUpdates []ChannelCloseUpdate + ChannelEdgeUpdates []ChannelEdgeUpdate + NodeUpdates []NodeUpdate + type GrpcLndServices struct + func NewLndServices(cfg *LndServicesConfig) (*GrpcLndServices, error) + func (s *GrpcLndServices) Close() + type Info struct + ActiveChannels uint32 + Alias string + BestHeaderTimeStamp time.Time + BlockHeight uint32 + IdentityPubkey [33]byte + InactiveChannels uint32 + Network string + PendingChannels uint32 + SyncedToChain bool + SyncedToGraph bool + Uris []string + Version string + type Initiator uint8 + const InitiatorBoth + const InitiatorLocal + const InitiatorRemote + const InitiatorUnrecorded + func (c Initiator) String() string + type Invoice struct + AddIndex uint64 + Amount lnwire.MilliSatoshi + AmountPaid lnwire.MilliSatoshi + CreationDate time.Time + Hash lntypes.Hash + Htlcs []InvoiceHtlc + IsKeysend bool + Memo string + PaymentRequest string + Preimage *lntypes.Preimage + SettleDate time.Time + SettleIndex uint64 + State channeldb.ContractState + type InvoiceHtlc struct + AcceptTime time.Time + Amount lnwire.MilliSatoshi + ChannelID lnwire.ShortChannelID + CustomRecords map[uint64][]byte + ResolveTime time.Time + type InvoiceSubscriptionRequest struct + AddIndex uint64 + SettleIndex uint64 + type InvoiceUpdate struct + AmtPaid vclutil.Amount + State channeldb.ContractState + type InvoicesClient interface + AddHoldInvoice func(ctx context.Context, in *invoicesrpc.AddInvoiceData) (string, error) + CancelInvoice func(ctx context.Context, hash lntypes.Hash) error + SettleInvoice func(ctx context.Context, preimage lntypes.Preimage) error + SubscribeSingleInvoice func(ctx context.Context, hash lntypes.Hash) (<-chan InvoiceUpdate, <-chan error, error) + type LightningClient interface + AddInvoice func(ctx context.Context, in *invoicesrpc.AddInvoiceData) (lntypes.Hash, string, error) + ChannelBackup func(context.Context, wire.OutPoint) ([]byte, error) + ChannelBackups func(ctx context.Context) ([]byte, error) + ChannelBalance func(ctx context.Context) (*ChannelBalance, error) + CloseChannel func(ctx context.Context, channel *wire.OutPoint, force bool, confTarget int32, ...) (chan CloseChannelUpdate, chan error, error) + ClosedChannels func(ctx context.Context) ([]ClosedChannel, error) + Connect func(ctx context.Context, peer route.Vertex, host string, permanent bool) error + DecodePaymentRequest func(ctx context.Context, payReq string) (*PaymentRequest, error) + DescribeGraph func(ctx context.Context, includeUnannounced bool) (*Graph, error) + EstimateFeeToP2WSH func(ctx context.Context, amt vclutil.Amount, confTarget int32) (vclutil.Amount, error) + ForwardingHistory func(ctx context.Context, req ForwardingHistoryRequest) (*ForwardingHistoryResponse, error) + GetChanInfo func(ctx context.Context, chanId uint64) (*ChannelEdge, error) + GetInfo func(ctx context.Context) (*Info, error) + GetNodeInfo func(ctx context.Context, pubkey route.Vertex, includeChannels bool) (*NodeInfo, error) + ListChannels func(ctx context.Context) ([]ChannelInfo, error) + ListInvoices func(ctx context.Context, req ListInvoicesRequest) (*ListInvoicesResponse, error) + ListPayments func(ctx context.Context, req ListPaymentsRequest) (*ListPaymentsResponse, error) + ListPeers func(ctx context.Context) ([]Peer, error) + ListTransactions func(ctx context.Context, startHeight, endHeight int32) ([]Transaction, error) + LookupInvoice func(ctx context.Context, hash lntypes.Hash) (*Invoice, error) + NetworkInfo func(ctx context.Context) (*NetworkInfo, error) + OpenChannel func(ctx context.Context, peer route.Vertex, localSat, pushSat vclutil.Amount, ...) (*wire.OutPoint, error) + PayInvoice func(ctx context.Context, invoice string, maxFee vclutil.Amount, ...) chan PaymentResult + PendingChannels func(ctx context.Context) (*PendingChannels, error) + SendCoins func(ctx context.Context, addr vclutil.Address, amount vclutil.Amount, sendAll bool, ...) (string, error) + SubscribeChannelBackups func(ctx context.Context) (<-chan lnrpc.ChanBackupSnapshot, <-chan error, error) + SubscribeChannelEvents func(ctx context.Context) (<-chan *ChannelEventUpdate, <-chan error, error) + SubscribeGraph func(ctx context.Context) (<-chan *GraphTopologyUpdate, <-chan error, error) + SubscribeInvoices func(ctx context.Context, req InvoiceSubscriptionRequest) (<-chan *Invoice, <-chan error, error) + UpdateChanPolicy func(ctx context.Context, req PolicyUpdateRequest, chanPoint *wire.OutPoint) error + WalletBalance func(ctx context.Context) (*WalletBalance, error) + type ListInvoicesRequest struct + MaxInvoices uint64 + Offset uint64 + PendingOnly bool + Reversed bool + type ListInvoicesResponse struct + FirstIndexOffset uint64 + Invoices []Invoice + LastIndexOffset uint64 + type ListPaymentsRequest struct + IncludeIncomplete bool + MaxPayments uint64 + Offset uint64 + Reversed bool + type ListPaymentsResponse struct + FirstIndexOffset uint64 + LastIndexOffset uint64 + Payments []Payment + type LndServices struct + ChainNotifier ChainNotifierClient + ChainParams *chaincfg.Params + Client LightningClient + Invoices InvoicesClient + NodeAlias string + NodePubkey [33]byte + Router RouterClient + Signer SignerClient + Version *verrpc.Version + Versioner VersionerClient + WalletKit WalletKitClient + type LndServicesConfig struct + BlockUntilChainSynced bool + BlockUntilUnlocked bool + CallerCtx context.Context + CheckVersion *verrpc.Version + CustomMacaroonPath string + Dialer DialerFunc + LndAddress string + MacaroonDir string + Network Network + TLSPath string + UnlockInterval time.Duration + type Network string + const NetworkMainnet + const NetworkRegtest + const NetworkSimnet + const NetworkTestnet + func (n Network) ChainParams() (*chaincfg.Params, error) + type NetworkInfo struct + AvgChannelSize vclutil.Amount + AvgOutDegree float64 + GraphDiameter uint32 + MaxChannelSize vclutil.Amount + MaxOutDegree uint32 + MedianChannelSize vclutil.Amount + MinChannelSize vclutil.Amount + NumChannels uint32 + NumNodes uint32 + NumZombieChans uint64 + TotalNetworkCapacity vclutil.Amount + type Node struct + Addresses []string + Alias string + Color string + Features []lnwire.FeatureBit + LastUpdate time.Time + PubKey route.Vertex + type NodeInfo struct + ChannelCount int + Channels []ChannelEdge + TotalCapacity vclutil.Amount + type NodeUpdate struct + Addresses []string + Alias string + Color string + GlobalFeatures lnwire.FeatureVector + IdentityKey route.Vertex + type Payment struct + Amount lnwire.MilliSatoshi + Fee lnwire.MilliSatoshi + Hash lntypes.Hash + Htlcs []*lnrpc.HTLCAttempt + PaymentRequest string + Preimage *lntypes.Preimage + SequenceNumber uint64 + Status *PaymentStatus + type PaymentRequest struct + Description string + Destination route.Vertex + Expiry time.Time + Hash lntypes.Hash + PaymentAddress [32]byte + Timestamp time.Time + Value lnwire.MilliSatoshi + type PaymentResult struct + Err error + PaidAmt vclutil.Amount + PaidFee vclutil.Amount + Preimage lntypes.Preimage + type PaymentStatus struct + FailureReason lnrpc.PaymentFailureReason + Fee lnwire.MilliSatoshi + InFlightAmt lnwire.MilliSatoshi + InFlightHtlcs int + Preimage lntypes.Preimage + State lnrpc.Payment_PaymentStatus + Value lnwire.MilliSatoshi + func (p PaymentStatus) String() string + type Peer struct + Address string + BytesReceived uint64 + BytesSent uint64 + Inbound bool + PingTime time.Duration + Pubkey route.Vertex + Received vclutil.Amount + Sent vclutil.Amount + type PendingChannel struct + Capacity vclutil.Amount + ChannelInitiator Initiator + ChannelPoint *wire.OutPoint + PubKeyBytes route.Vertex + func NewPendingChannel(channel *lnrpc.PendingChannelsResponse_PendingChannel) (*PendingChannel, error) + type PendingChannels struct + PendingForceClose []ForceCloseChannel + PendingOpen []PendingChannel + WaitingClose []WaitingCloseChannel + type PendingCloseUpdate struct + CloseTx chainhash.Hash + func (p *PendingCloseUpdate) CloseTxid() chainhash.Hash + type PendingHtlc struct + Amount vclutil.Amount + Incoming bool + type PolicyUpdateRequest struct + BaseFeeMsat int64 + FeeRate float64 + MaxHtlcMsat uint64 + MinHtlcMsat uint64 + MinHtlcMsatSpecified bool + TimeLockDelta uint32 + type RouterClient interface + SendPayment func(ctx context.Context, request SendPaymentRequest) (chan PaymentStatus, chan error, error) + SubscribeHtlcEvents func(ctx context.Context) (<-chan *routerrpc.HtlcEvent, <-chan error, error) + TrackPayment func(ctx context.Context, hash lntypes.Hash) (chan PaymentStatus, chan error, error) + type RoutingPolicy struct + Disabled bool + FeeBaseMsat int64 + FeeRateMilliMsat int64 + LastUpdate time.Time + MaxHtlcMsat uint64 + MinHtlcMsat int64 + TimeLockDelta uint32 + type SendPaymentRequest struct + AllowSelfPayment bool + Amount vclutil.Amount + CustomRecords map[uint64][]byte + FinalCLTVDelta uint16 + Invoice string + KeySend bool + LastHopPubkey *route.Vertex + MaxCltv *int32 + MaxFee vclutil.Amount + MaxParts uint32 + OutgoingChanIds []uint64 + PaymentHash *lntypes.Hash + RouteHints [][]zpay32.HopHint + Target route.Vertex + Timeout time.Duration + type SignDescriptor struct + DoubleTweak *btcec.PrivateKey + HashType txscript.SigHashType + InputIndex int + KeyDesc keychain.KeyDescriptor + Output *wire.TxOut + SingleTweak []byte + WitnessScript []byte + type SignerClient interface + ComputeInputScript func(ctx context.Context, tx *wire.MsgTx, signDescriptors []*SignDescriptor) ([]*input.Script, error) + DeriveSharedKey func(ctx context.Context, ephemeralPubKey *btcec.PublicKey, ...) ([32]byte, error) + SignMessage func(ctx context.Context, msg []byte, locator keychain.KeyLocator) ([]byte, error) + SignOutputRaw func(ctx context.Context, tx *wire.MsgTx, signDescriptors []*SignDescriptor) ([][]byte, error) + VerifyMessage func(ctx context.Context, msg, sig []byte, pubkey [33]byte) (bool, error) + type Transaction struct + Amount vclutil.Amount + Confirmations int32 + Fee vclutil.Amount + Label string + Timestamp time.Time + Tx *wire.MsgTx + TxHash string + type VersionerClient interface + GetVersion func(ctx context.Context) (*verrpc.Version, error) + type WaitingCloseChannel struct + LocalTxid chainhash.Hash + RemotePending chainhash.Hash + RemoteTxid chainhash.Hash + type WalletBalance struct + Confirmed vclutil.Amount + Unconfirmed vclutil.Amount + type WalletKitClient interface + BumpFee func(context.Context, wire.OutPoint, chainfee.SatPerKWeight) error + DeriveKey func(ctx context.Context, locator *keychain.KeyLocator) (*keychain.KeyDescriptor, error) + DeriveNextKey func(ctx context.Context, family int32) (*keychain.KeyDescriptor, error) + EstimateFee func(ctx context.Context, confTarget int32) (chainfee.SatPerKWeight, error) + LeaseOutput func(ctx context.Context, lockID wtxmgr.LockID, op wire.OutPoint) (time.Time, error) + ListSweeps func(ctx context.Context) ([]string, error) + ListUnspent func(ctx context.Context, minConfs, maxConfs int32) ([]*lnwallet.Utxo, error) + NextAddr func(ctx context.Context) (vclutil.Address, error) + PublishTransaction func(ctx context.Context, tx *wire.MsgTx, label string) error + ReleaseOutput func(ctx context.Context, lockID wtxmgr.LockID, op wire.OutPoint) error + SendOutputs func(ctx context.Context, outputs []*wire.TxOut, feeRate chainfee.SatPerKWeight, ...) (*wire.MsgTx, error)