invoices

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: MIT Imports: 18 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 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:"is_known" db:"is_known"`
	IsRequired *bool   `json:"is_required" db:"is_required"`
}

type FeatureMap

type FeatureMap map[string]Feature

type HopHint

type HopHint struct {
	LNDShortChannelId *uint64 `json:"chan_id" db:"lnd_short_channel_id"`
	NodeId            *string `json:"node_id" db:"node_id"`
	FeeBase           *uint64 `json:"fee_base" db:"fee_base"`
	CltvExpiryDelta   *uint64 `json:"cltv_expiry_delta" db:"cltv_expiry_delta"`
	FeeProportional   *uint64 `json:"fee_proportional_millionths" db:"fee_proportional_millionths"`
}

type Htlc

type Htlc struct {
	State             *uint64 `json:"state" db:"state"`
	LNDShortChannelId *uint64 `json:"chan_id" db:"lnd_short_channel_id"`
	Amt               *uint64 `json:"amt" db:"amt"`
	HtlcIndex         *uint64 `json:"htlc_index" db:"htlc_index"`
	AcceptTime        *uint64 `json:"accept_time" db:"accept_time"`
	ResolveTime       *uint64 `json:"resolve_time" db:"resolve_time"`
	AcceptHeight      *uint64 `json:"accept_height" db:"accept_height"`
	ExpiryHeight      *uint64 `json:"expiry_height" db:"expiry_height"`
	MppTotalAmt       *uint64 `json:"mpp_total_amt" db:"mpp_total_amt"`
}

type Invoice

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

type InvoiceDetails

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

type RouteHints

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

Jump to

Keyboard shortcuts

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