bnb

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	rpc.Client
}

func NewClient

func NewClient(rpcApi *url.URL, network types.ChainNetwork, period time.Duration) *Client

func (*Client) GetBlockTimeStamp

func (c *Client) GetBlockTimeStamp(height int64) (time.Time, error)

func (*Client) GetBlockTransactions

func (c *Client) GetBlockTransactions(page int, minHeight int64, maxHeight int64, perPage int) ([]common.Transaction, int, error)

func (*Client) GetLatestBlockHeight

func (c *Client) GetLatestBlockHeight() (int64, *time.Time, error)

func (*Client) ResultBlockToComTxs

func (c *Client) ResultBlockToComTxs(resultTxSearch *rpc.ResultTxSearch, maxHeight int64) []common.Transaction

type Keeper

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

func NewKeeper

func NewKeeper(urlStr string, isTestnet bool, dirPath string, pruneHours int64) *Keeper

func (*Keeper) BroadcastTx

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

func (*Keeper) GetBlockTimeStampWithCache

func (k *Keeper) GetBlockTimeStampWithCache(height int64) (time.Time, error)

func (*Keeper) GetMemoTxs

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

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) StartReScanAddr

func (k *Keeper) StartReScanAddr(addr string, timestamp int64) error

func (*Keeper) Stop

func (k *Keeper) Stop()

func (*Keeper) StoreTxs

func (k *Keeper) StoreTxs(txs []common.Transaction)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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