mempool

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0, GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MempoolClient

type MempoolClient struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(netParams *chaincfg.Params) *MempoolClient

func (*MempoolClient) BroadcastTx

func (c *MempoolClient) BroadcastTx(tx *wire.MsgTx) (*chainhash.Hash, error)

func (*MempoolClient) GetRawTransaction

func (c *MempoolClient) GetRawTransaction(txHash *chainhash.Hash) (*wire.MsgTx, error)

func (*MempoolClient) GetTxsFromAddress

func (c *MempoolClient) GetTxsFromAddress(address string) ([]*SimTx, error)

func (*MempoolClient) ListUnspent

func (c *MempoolClient) ListUnspent(address btcutil.Address) ([]*btcapi.UnspentOutput, error)

func (*MempoolClient) RecommendedFees

func (c *MempoolClient) RecommendedFees() (*RecommendedFeesResponse, error)

func (*MempoolClient) TransactionStatus

func (c *MempoolClient) TransactionStatus(txHash *chainhash.Hash) (*TransactionStatusResponse, error)

type RecommendedFeesResponse

type RecommendedFeesResponse struct {
	FastestFee  int64 `json:"fastestFee"`
	HalfHourFee int64 `json:"halfHourFee"`
	HourFee     int64 `json:"hourFee"`
	EconomyFee  int64 `json:"economyFee"`
	MinimumFee  int64 `json:"minimumFee"`
}

type SimTx

type SimTx struct {
	Txid    chainhash.Hash
	Sender  string
	OutPuts []*VoutItem
}

type TransactionStatusResponse

type TransactionStatusResponse struct {
	Confirmed   bool   `json:"confirmed"`
	BlockHeight uint64 `json:"block_height"`
	BlockHash   string `json:"block_hash"`
	BlockTime   uint64 `json:"block_time"`
}

type TxItem

type TxItem struct {
	Txid     string      `json:"txid"`
	Version  int         `json:"version"`
	Locktime int64       `json:"locktime"`
	Vin      []*VinItem  `json:"vin"`
	Vout     []*VoutItem `json:"vout"`
	Size     int         `json:"size"`
	Weight   int         `json:"weight"`
	Sigops   int         `json:"sigops"`
	Fee      int         `json:"fee"`
	Status   struct {
		Confirmed   bool   `json:"confirmed"`
		BlockHeight int    `json:"block_height"`
		BlockHash   string `json:"block_hash"`
		BlockTime   int64  `json:"block_time"`
	} `json:"status"`
}

type TxItems

type TxItems []TxItem

type UTXO

type UTXO struct {
	Txid   string `json:"txid"`
	Vout   int    `json:"vout"`
	Status struct {
		Confirmed   bool   `json:"confirmed"`
		BlockHeight int    `json:"block_height"`
		BlockHash   string `json:"block_hash"`
		BlockTime   int64  `json:"block_time"`
	} `json:"status"`
	Value int64 `json:"value"`
}

type UTXOs

type UTXOs []UTXO

UTXOs is a slice of UTXO

type VinItem

type VinItem struct {
	Txid          string   `json:"txid"`
	Vout          int      `json:"vout"`
	Prevout       VoutItem `json:"prevout"`
	Scriptsig     string   `json:"scriptsig"`
	Scriptsig_asm string   `json:"scriptsig_asm"`
	Witness       []string `json:"witness"`
	Is_coinbase   bool     `json:"is_coinbase"`
	Sequence      int64    `json:"sequence"`
}

type VoutItem

type VoutItem struct {
	Scriptpubkey         string `json:"scriptpubkey"`
	Scriptpubkey_asm     string `json:"scriptpubkey_asm"`
	Scriptpubkey_type    string `json:"scriptpubkey_type"`
	Scriptpubkey_address string `json:"scriptpubkey_address"`
	Value                int    `json:"value"`
}

Jump to

Keyboard shortcuts

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