btc

package
v0.0.0-...-e54d674 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxTypeReceived = "receive"
	TxTypeSend     = "send"
	MinMempoolFees = int64(300)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*rpcclient.Client
	// contains filtered or unexported fields
}

func NewBtcClient

func NewBtcClient(path string) (*Client, error)

func (*Client) GetBlockTxs

func (c *Client) GetBlockTxs(testNet bool, depth int) (int64, []*types.Tx)

func (*Client) GetTxByTxID

func (c *Client) GetTxByTxID(txid string, testNet bool) (*types.Tx, error)

func (*Client) TxtoCommonTx

func (c *Client) TxtoCommonTx(tx *types.Tx, testNet bool) ([]common.Transaction, error)

type Keeper

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

func NewKeeper

func NewKeeper(url string, isTestnet bool, dirPath string, pruneTime int64) *Keeper

func (*Keeper) BroadcastTx

func (k *Keeper) BroadcastTx(w rest.ResponseWriter, r *rest.Request)

func (*Keeper) GetPendings

func (k *Keeper) GetPendings() map[string]int

func (*Keeper) GetTx

func (k *Keeper) GetTx(w rest.ResponseWriter, r *rest.Request)

func (*Keeper) GetTxs

func (k *Keeper) GetTxs(w rest.ResponseWriter, r *rest.Request)

func (*Keeper) Start

func (k *Keeper) Start()

func (*Keeper) StartNode

func (k *Keeper) StartNode()

func (*Keeper) UpdateMemPoolTxs

func (k *Keeper) UpdateMemPoolTxs()

func (*Keeper) UpdateTx

func (k *Keeper) UpdateTx(txid string, count int)

type MempoolTx

type MempoolTx struct {
	common.Transaction
	// contains filtered or unexported fields
}

type Rest

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

func NewRest

func NewRest(uri string) *Rest

func (*Rest) GetBlock

func (r *Rest) GetBlock(hash string) (*types.Block, error)

func (*Rest) GetBlockChainInfo

func (r *Rest) GetBlockChainInfo() (*types.ChainInfo, error)

func (*Rest) GetBlockHash

func (r *Rest) GetBlockHash(blockNum int) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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