Documentation ¶
Index ¶
- func RegisterPaymentsRoutes(r *gin.RouterGroup, db *sqlx.DB)
- func SendNewPayment(eventChannel chan interface{}, db *sqlx.DB, c *gin.Context, ...) (err error)
- type ErrPaymentNotFound
- type Hop
- type MppRecord
- type NewPaymentRequest
- type NewPaymentResponse
- type Payment
- type PaymentDetails
- type PaymentDetailsRaw
- type Route
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterPaymentsRoutes ¶
func RegisterPaymentsRoutes(r *gin.RouterGroup, db *sqlx.DB)
func SendNewPayment ¶ added in v0.7.3
func SendNewPayment( eventChannel chan interface{}, db *sqlx.DB, c *gin.Context, npReq NewPaymentRequest, reqId string, ) (err error)
SendNewPayment - send new payment A new payment can be made either by providing an invoice or by providing: dest - the identity pubkey of the payment recipient amt(number of satoshi) or amt_msat(number of millisatoshi) amt and amt_msat are mutually exclusive payments hash - the hash to use within the payment's HTLC timeout seconds is mandatory
Types ¶
type ErrPaymentNotFound ¶
type ErrPaymentNotFound struct {
Identifier string
}
func (ErrPaymentNotFound) Error ¶
func (e ErrPaymentNotFound) Error() string
type Hop ¶
type Hop struct { Expiry uint64 `json:"expiry" db:"expiry"` LNDShortChannelId uint64 `json:"lndShortChannelId" db:"lnd_short_channel_id"` PubKey string `json:"pubKey" db:"pub_key"` FeeMsat uint64 `json:"feeMsat" db:"fee_msat"` TlvPayload bool `json:"tlvPayload" db:"tlv_payload"` ChanCapacity uint64 `json:"chanCapacity" db:"chan_capacity"` AmtToForwardMsat uint64 `json:"amtToForwardMsat" db:"amt_to_forward_msat"` }
type NewPaymentRequest ¶ added in v0.7.3
type NewPaymentResponse ¶ added in v0.7.3
type NewPaymentResponse struct { ReqId string `json:"reqId"` Type string `json:"type"` Status string `json:"status"` FailureReason string `json:"failureReason"` Hash string `json:"hash"` Preimage string `json:"preimage"` PaymentRequest string `json:"paymentRequest"` AmountMsat int64 `json:"amountMsat"` FeeLimitMsat int64 `json:"feeLimitMsat"` FeePaidMsat int64 `json:"feePaidMsat"` CreationDate time.Time `json:"creationDate"` Attempt attempt `json:"path"` }
type Payment ¶
type Payment struct { PaymentIndex uint64 `json:"paymentIndex" db:"payment_index"` Date time.Time `json:"date" db:"date"` DestinationPubKey *string `json:"destinationPubKey" db:"destination_pub_key"` Status string `json:"status" db:"status"` Value float64 `json:"value" db:"value"` Fee float64 `json:"fee" db:"fee"` PPM float64 `json:"ppm" db:"ppm"` FailureReason string `json:"failureReason" db:"failure_reason"` PaymentHash string `json:"paymentHash" db:"payment_hash"` PaymentPreimage string `json:"paymentPreimage" db:"payment_preimage"` PaymentRequest *string `json:"paymentRequest" db:"payment_request"` IsRebalance *bool `json:"isREebalance" db:"is_rebalance"` IsMPP bool `json:"isMpp" db:"is_mpp"` CountSuccessfulAttempts int `json:"countSuccessful_attempts" db:"count_successful_attempts"` CountFailedAttempts int `json:"countFailedAttempts" db:"count_failed_attempts"` SecondsInFlight *float32 `json:"secondsInFlight" db:"seconds_in_flight"` }
type PaymentDetails ¶
type PaymentDetailsRaw ¶
type Route ¶
type Route struct { Hops []*Hop `json:"hops" db:"hops"` TotalAmt uint64 `json:"totalAmt" db:"total_amt"` TotalFees uint64 `json:"totalFees" db:"total_fees"` TotalAmtMsat uint64 `json:"totalAmtMsat" db:"total_amt_msat"` TotalFeesMsat uint64 `json:"totalFeesMsat" db:"total_fees_msat"` TotalTimeLock uint64 `json:"totalTimeLock" db:"total_time_lock"` }
Click to show internal directories.
Click to hide internal directories.