Documentation
¶
Index ¶
- type ChannelInfo
- type CheckPaymentResult
- type Control
- func (c *Control) Call(method string, params interface{}) (json.RawMessage, error)
- func (c *Control) CheckPayment(hash string) (result CheckPaymentResult, err error)
- func (c *Control) CreateInvoice(params CreateInvoiceParams) (result CreateInvoiceResult, err error)
- func (c *Control) GetInfo() (result GetInfoResult, err error)
- func (c *Control) ListPayments(count int) (result ListPaymentsResult, err error)
- func (c *Control) PayInvoice(params PayInvoiceParams) (result PayInvoiceResult, err error)
- func (c *Control) Start() error
- type CreateInvoiceParams
- type CreateInvoiceResult
- type GetInfoResult
- type JSONRPCNotification
- type JSONRPCRequest
- type JSONRPCResponse
- type ListPaymentsResult
- type PayInvoiceParams
- type PayInvoiceResult
- type PaymentFailedEvent
- type PaymentInfo
- type PaymentReceivedEvent
- type PaymentSucceededEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChannelInfo ¶ added in v0.2.1
type ChannelInfo struct { ID string `json:"id"` ShortChannelId string `json:"short_channel_id"` Balance int `json:"balance"` CanReceive int64 `json:"can_receive"` CanSend int64 `json:"can_send"` HostedChannel struct { OverrideProposal *struct { OurBalance int64 `json:"our_balance"` TheirBalance int64 `json:"their_balance"` } `json:"override_proposal"` ResizeProposal *int64 `json:"resize_proposal"` } `json:"hosted_channel"` Inflight struct { Incoming int `json:"incoming"` Outgoing int `json:"outgoing"` Revealed int `json:"revealed"` } `json:"inflight"` Peer struct { Addr string `json:"addr"` OurPubkey string `json:"our_pubkey"` Pubkey string `json:"pubkey"` } `json:"peer"` Policy struct { BaseFee int64 `json:"base_fee"` CltvDelta int `json:"cltv_delta"` FeePerMillionth int `json:"fee_per_millionth"` HtlcMax int64 `json:"htlc_max"` HtlcMin int64 `json:"htlc_min"` } `json:"policy,omitempty"` Status string `json:"status"` }
type CheckPaymentResult ¶
type CheckPaymentResult struct {
PaymentInfo
}
type Control ¶
type Control struct { JARPath string BinaryPath string DataDir string DontLogStderr bool DontLogStdout bool PaymentSuccesses chan PaymentSucceededEvent PaymentFailures chan PaymentFailedEvent IncomingPayments chan PaymentReceivedEvent // contains filtered or unexported fields }
func (*Control) Call ¶
func (c *Control) Call(method string, params interface{}) (json.RawMessage, error)
func (*Control) CheckPayment ¶
func (c *Control) CheckPayment(hash string) ( result CheckPaymentResult, err error, )
func (*Control) CreateInvoice ¶
func (c *Control) CreateInvoice(params CreateInvoiceParams) ( result CreateInvoiceResult, err error, )
func (*Control) GetInfo ¶
func (c *Control) GetInfo() (result GetInfoResult, err error)
func (*Control) ListPayments ¶ added in v0.2.0
func (c *Control) ListPayments(count int) ( result ListPaymentsResult, err error, )
func (*Control) PayInvoice ¶
func (c *Control) PayInvoice(params PayInvoiceParams) ( result PayInvoiceResult, err error, )
type CreateInvoiceParams ¶
type CreateInvoiceResult ¶
type GetInfoResult ¶
type GetInfoResult struct { BlockHeight int `json:"block_height"` Channels []ChannelInfo `json:"channels"` FeeRates struct { Num1 int `json:"1"` Num10 int `json:"10"` Num100 int `json:"100"` } `json:"fee_rates"` FiatRates struct { USD float64 `json:"usd"` } `json:"fiat_rates"` KnownChannels struct { Hosted int `json:"hosted"` Normal int `json:"normal"` } `json:"known_channels"` MainPubkey string `json:"main_pubkey"` OutgoingPayments []struct { Hash string `json:"hash"` Htlcs []struct { Channel string `json:"channel"` Expiry int `json:"expiry"` ID int `json:"id"` Msatoshi int64 `json:"msatoshi"` } `json:"htlcs"` } `json:"outgoing_payments"` Wallets []struct { Balance int64 `json:"balance"` Label string `json:"label"` } `json:"wallets"` }
type JSONRPCNotification ¶ added in v0.3.0
type JSONRPCNotification struct { Method string `json:"method"` Params json.RawMessage `json:"params"` }
type JSONRPCRequest ¶ added in v0.3.0
type JSONRPCResponse ¶
type JSONRPCResponse struct { Id string `json:"id"` Result json.RawMessage `json:"result,omitempty"` Error *struct { Code int `json:"code"` Message string `json:"message"` } `json:"error,omitempty"` }
type ListPaymentsResult ¶ added in v0.2.0
type ListPaymentsResult []PaymentInfo
type PayInvoiceParams ¶
type PayInvoiceResult ¶
type PaymentFailedEvent ¶
type PaymentInfo ¶ added in v0.2.0
type PaymentInfo struct { Status string `json:"status"` SeenAt int64 `json:"seen_at"` Invoice string `json:"invoice"` Preimage string `json:"preimage"` Msatoshi int64 `json:"msatoshi"` UpdatedAt int64 `json:"updated_at"` IsIncoming bool `json:"is_incoming"` FeeMsatoshi int64 `json:"fee_msatoshi"` PaymentHash string `json:"payment_hash"` }
type PaymentReceivedEvent ¶
Click to show internal directories.
Click to hide internal directories.