invoices

package
v0.13.1-rc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterInvoicesRoutes

func RegisterInvoicesRoutes(r *gin.RouterGroup, db *sqlx.DB)

Types

type DecodedInvoice added in v0.8.6

type DecodedInvoice struct {
	NodeAlias         string      `json:"nodeAlias"`
	PaymentRequest    string      `json:"paymentRequest"`
	DestinationPubKey string      `json:"destinationPubKey"`
	RHash             string      `json:"rHash"`
	Memo              string      `json:"memo"`
	ValueMsat         int64       `json:"valueMsat"`
	PaymentAddr       string      `json:"paymentAddr"`
	FallbackAddr      string      `json:"fallbackAddr"`
	Expiry            int64       `json:"expiry"`
	CreatedAt         int64       `json:"createdAt"`
	CltvExpiry        int64       `json:"cltvExpiry"`
	Private           bool        `json:"private"`
	Features          featureMap  `json:"features"`
	RouteHints        []routeHint `json:"routeHints"`
}

type ErrInvoiceNotFound

type ErrInvoiceNotFound struct {
	Identifier string
}

func (ErrInvoiceNotFound) Error

func (e ErrInvoiceNotFound) Error() string

type Feature

type Feature struct {
	Name       *string `json:"name" db:"name"`
	IsKnown    *bool   `json:"isKnown" db:"is_known"`
	IsRequired *bool   `json:"isRequired" db:"is_required"`
}

type FeatureMap

type FeatureMap map[string]Feature

type HopHint

type HopHint struct {
	LNDShortChannelId *uint64 `json:"lndShortChannelId" db:"lnd_short_channel_id"`
	NodeId            *string `json:"localNodeId" db:"node_id"`
	FeeBase           *uint64 `json:"feeBase" db:"fee_base"`
	CltvExpiryDelta   *uint64 `json:"cltvExpiryDelta" db:"cltv_expiry_delta"`
	FeeProportional   *uint64 `json:"feeProportionalMillionths" db:"fee_proportional_millionths"`
}

type Htlc

type Htlc struct {
	State             *uint64 `json:"state" db:"state"`
	LNDShortChannelId *uint64 `json:"lndShortChannelId" db:"lnd_short_channel_id"`
	Amt               *uint64 `json:"amt" db:"amt"`
	HtlcIndex         *uint64 `json:"htlcIndex" db:"htlc_index"`
	AcceptTime        *uint64 `json:"acceptTime" db:"accept_time"`
	ResolveTime       *uint64 `json:"resolveTime" db:"resolve_time"`
	AcceptHeight      *uint64 `json:"acceptHeight" db:"accept_height"`
	ExpiryHeight      *uint64 `json:"expiryHeight" db:"expiry_height"`
	MppTotalAmt       *uint64 `json:"mppTotalAmt" db:"mpp_total_amt"`
}

type Invoice

type Invoice struct {
	CreationDate      *time.Time `json:"creationDate" db:"creation_date"`
	SettleDate        *time.Time `json:"settleDate" db:"settle_date"`
	AddIndex          uint64     `json:"addIndex" db:"add_index"`
	SettleIndex       *uint64    `json:"settleIndex" db:"settle_index"`
	PaymentRequest    *string    `json:"paymentRequest" db:"payment_request"`
	DestinationPubKey *string    `json:"destinationPubKey" db:"destination_pub_key"`
	RHash             *string    `json:"rHash" db:"r_hash"`
	RPreimage         *string    `json:"rPreimage" db:"r_preimage"`
	Memo              *string    `json:"memo" db:"memo"`
	Value             *float64   `json:"value" db:"value"`
	AmountPaid        *float64   `json:"amtPaid" db:"amt_paid"`
	InvoiceState      *string    `json:"invoiceState" db:"invoice_state"`
	IsRebalance       *bool      `json:"isRebalance" db:"is_rebalance"`
	IsKeysend         *bool      `json:"isKeysend" db:"is_keysend"`
	IsAmp             *bool      `json:"isAmp" db:"is_amp"`
	PaymentAddr       *string    `json:"paymentAddr" db:"payment_addr"`
	FallbackAddr      *string    `json:"fallbackAddr" db:"fallback_addr"`
	UpdatedOn         *time.Time `json:"updatedOn" db:"updated_on"` // Generated by Torq if the status has changed
	Expiry            *uint32    `json:"expiry" db:"expiry"`
	CltvExpiry        *uint32    `json:"cltvExpiry" db:"cltv_expiry"`
	Private           *bool      `json:"private" db:"private"`
}

type InvoiceDetails

type InvoiceDetails struct {
	Invoice
	DescriptionHash []byte       `json:"descriptionHash" db:"description_hash"`
	Htlcs           []Htlc       `json:"htlcs" db:"htlcs"`
	Features        FeatureMap   `json:"features" db:"features"`
	RouteHints      []RouteHints `json:"routeHints" db:"route_hints"`
}

type RouteHints

type RouteHints struct {
	HopHints []HopHint `json:"hopHints" db:"hop_hints"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL