Documentation
¶
Index ¶
- Constants
- Variables
- func NewTimeoutError() error
- type BalancesResponse
- type Channel
- type CloseChannelRequest
- type CloseChannelResponse
- type ConnectPeerRequest
- type CustomNodeCommandArg
- type CustomNodeCommandArgDef
- type CustomNodeCommandDef
- type CustomNodeCommandRequest
- type CustomNodeCommandResponse
- type LNClient
- type LightningBalanceResponse
- type Metadata
- type NetworkGraphResponse
- type NodeConnectionInfo
- type NodeInfo
- type NodeStatus
- type OnchainBalanceResponse
- type OpenChannelRequest
- type OpenChannelResponse
- type PayInvoiceResponse
- type PayKeysendResponse
- type PaymentFailedEventProperties
- type PeerDetails
- type PendingBalanceDetails
- type TLVRecord
- type Transaction
- type UpdateChannelRequest
Constants ¶
View Source
const DEFAULT_INVOICE_EXPIRY = 86400
default invoice expiry in seconds (1 day)
Variables ¶
View Source
var ErrUnknownCustomNodeCommand = errors.New("unknown custom node command")
Functions ¶
func NewTimeoutError ¶ added in v1.2.0
func NewTimeoutError() error
Types ¶
type BalancesResponse ¶
type BalancesResponse struct { Onchain OnchainBalanceResponse `json:"onchain"` Lightning LightningBalanceResponse `json:"lightning"` }
type Channel ¶
type Channel struct { LocalBalance int64 LocalSpendableBalance int64 RemoteBalance int64 Id string RemotePubkey string FundingTxId string FundingTxVout uint32 Active bool Public bool InternalChannel interface{} Confirmations *uint32 ConfirmationsRequired *uint32 ForwardingFeeBaseMsat uint32 UnspendablePunishmentReserve uint64 CounterpartyUnspendablePunishmentReserve uint64 Error *string IsOutbound bool }
type CloseChannelRequest ¶
type CloseChannelResponse ¶
type CloseChannelResponse struct { }
type ConnectPeerRequest ¶
type CustomNodeCommandArg ¶ added in v1.14.0
type CustomNodeCommandArgDef ¶ added in v1.14.0
type CustomNodeCommandDef ¶ added in v1.14.0
type CustomNodeCommandDef struct { Name string Description string Args []CustomNodeCommandArgDef }
type CustomNodeCommandRequest ¶ added in v1.14.0
type CustomNodeCommandRequest struct { Name string Args []CustomNodeCommandArg }
type CustomNodeCommandResponse ¶ added in v1.14.0
type CustomNodeCommandResponse struct {
Response interface{}
}
func NewCustomNodeCommandResponseEmpty ¶ added in v1.14.0
func NewCustomNodeCommandResponseEmpty() *CustomNodeCommandResponse
type LNClient ¶
type LNClient interface { SendPaymentSync(ctx context.Context, payReq string, amount *uint64) (*PayInvoiceResponse, error) SendKeysend(ctx context.Context, amount uint64, destination string, customRecords []TLVRecord, preimage string) (*PayKeysendResponse, error) GetPubkey() string GetInfo(ctx context.Context) (info *NodeInfo, err error) MakeInvoice(ctx context.Context, amount int64, description string, descriptionHash string, expiry int64) (transaction *Transaction, err error) LookupInvoice(ctx context.Context, paymentHash string) (transaction *Transaction, err error) ListTransactions(ctx context.Context, from, until, limit, offset uint64, unpaid bool, invoiceType string) (transactions []Transaction, err error) Shutdown() error ListChannels(ctx context.Context) (channels []Channel, err error) GetNodeConnectionInfo(ctx context.Context) (nodeConnectionInfo *NodeConnectionInfo, err error) GetNodeStatus(ctx context.Context) (nodeStatus *NodeStatus, err error) ConnectPeer(ctx context.Context, connectPeerRequest *ConnectPeerRequest) error OpenChannel(ctx context.Context, openChannelRequest *OpenChannelRequest) (*OpenChannelResponse, error) CloseChannel(ctx context.Context, closeChannelRequest *CloseChannelRequest) (*CloseChannelResponse, error) UpdateChannel(ctx context.Context, updateChannelRequest *UpdateChannelRequest) error DisconnectPeer(ctx context.Context, peerId string) error GetNewOnchainAddress(ctx context.Context) (string, error) ResetRouter(key string) error GetOnchainBalance(ctx context.Context) (*OnchainBalanceResponse, error) GetBalances(ctx context.Context) (*BalancesResponse, error) RedeemOnchainFunds(ctx context.Context, toAddress string, amount uint64, sendAll bool) (txId string, err error) SendPaymentProbes(ctx context.Context, invoice string) error SendSpontaneousPaymentProbes(ctx context.Context, amountMsat uint64, nodeId string) error ListPeers(ctx context.Context) ([]PeerDetails, error) GetLogOutput(ctx context.Context, maxLen int) ([]byte, error) SignMessage(ctx context.Context, message string) (string, error) GetStorageDir() (string, error) GetNetworkGraph(ctx context.Context, nodeIds []string) (NetworkGraphResponse, error) UpdateLastWalletSyncRequest() GetSupportedNIP47Methods() []string GetSupportedNIP47NotificationTypes() []string GetCustomNodeCommandDefinitions() []CustomNodeCommandDef ExecuteCustomNodeCommand(ctx context.Context, command *CustomNodeCommandRequest) (*CustomNodeCommandResponse, error) }
type LightningBalanceResponse ¶
type LightningBalanceResponse struct { TotalSpendable int64 `json:"totalSpendable"` TotalReceivable int64 `json:"totalReceivable"` NextMaxSpendable int64 `json:"nextMaxSpendable"` NextMaxReceivable int64 `json:"nextMaxReceivable"` NextMaxSpendableMPP int64 `json:"nextMaxSpendableMPP"` NextMaxReceivableMPP int64 `json:"nextMaxReceivableMPP"` }
type NetworkGraphResponse ¶
type NetworkGraphResponse = interface{}
type NodeConnectionInfo ¶
type NodeStatus ¶
type NodeStatus struct { IsReady bool `json:"isReady"` InternalNodeStatus interface{} `json:"internalNodeStatus"` }
type OnchainBalanceResponse ¶
type OnchainBalanceResponse struct { Spendable int64 `json:"spendable"` Total int64 `json:"total"` Reserved int64 `json:"reserved"` PendingBalancesFromChannelClosures uint64 `json:"pendingBalancesFromChannelClosures"` PendingBalancesDetails []PendingBalanceDetails `json:"pendingBalancesDetails"` PendingSweepBalancesDetails []PendingBalanceDetails `json:"pendingSweepBalancesDetails"` InternalBalances interface{} `json:"internalBalances"` }
type OpenChannelRequest ¶
type OpenChannelResponse ¶
type OpenChannelResponse struct {
FundingTxId string `json:"fundingTxId"`
}
type PayInvoiceResponse ¶
type PayKeysendResponse ¶ added in v1.4.1
type PayKeysendResponse struct {
Fee uint64 `json:"fee"`
}
type PaymentFailedEventProperties ¶ added in v1.6.0
type PaymentFailedEventProperties struct { Transaction *Transaction Reason string }
type PeerDetails ¶
type PendingBalanceDetails ¶ added in v1.13.0
Click to show internal directories.
Click to hide internal directories.