on_chain_tx

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown int32 = 0
	P2WPKH  int32 = 1
	P2WKH   int32 = 2
	NP2WKH  int32 = 3
	P2TR    int32 = 4
)

Variables

This section is empty.

Functions

func NewAddress added in v0.8.19

func NewAddress(
	eventChannel chan interface{},
	db *sqlx.DB,
	context *gin.Context,
	newAddressRequest NewAddressRequest,
	reqId string,
) (err error)

func PayOnChain added in v0.9.0

func PayOnChain(db *sqlx.DB, req PayOnChainRequest) (r string, err error)

func RegisterOnChainTxsRoutes

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

Types

type NewAddressRequest added in v0.8.19

type NewAddressRequest struct {
	NodeId int   `json:"nodeId"`
	Type   int32 `json:"type"`
	//The name of the account to generate a new address for. If empty, the default wallet account is used.
	Account string `json:"account"`
}

type NewAddressResponse added in v0.8.19

type NewAddressResponse struct {
	ReqId   string `json:"reqId"`
	Type    string `json:"type"`
	Address string `json:"address"`
}

type PayOnChainRequest added in v0.9.0

type PayOnChainRequest struct {
	NodeId           int     `json:"nodeId"`
	Address          string  `json:"address"`
	AmountSat        int64   `json:"amountSat"`
	TargetConf       *int32  `json:"targetConf"`
	SatPerVbyte      *uint64 `json:"satPerVbyte"`
	SendAll          *bool   `json:"sendAll"`
	Label            *string `json:"label"`
	MinConfs         *int32  `json:"minConfs"`
	SpendUnconfirmed *bool   `json:"spendUnconfirmed"`
}

type PayOnChainResponse added in v0.9.0

type PayOnChainResponse struct {
	TxId string `json:"txId"`
}

type Transaction

type Transaction struct {
	Date               time.Time      `json:"date" db:"date"`
	TxHash             string         `json:"txHash" db:"tx_hash"`
	DestAddresses      pq.StringArray `json:"destAddresses" db:"dest_addresses"`
	DestAddressesCount string         `json:"destAddressesCount" db:"dest_addresses_count"`
	AmountMsat         int64          `json:"amount" db:"amount"`
	TotalFeesMsat      int64          `json:"totalFees" db:"total_fees"`
	Label              *string        `json:"label" db:"label"`
	LndTxTypeLabel     *string        `json:"lndTxTypeLabel" db:"lnd_tx_type_label"`
	LndShortChannelId  *string        `json:"lndShortChanId" db:"lnd_short_chan_id"`
}

Jump to

Keyboard shortcuts

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