eosmanager

package
v0.0.0-...-fc865ac Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("resource not found")

Functions

This section is empty.

Types

type EosClient

type EosClient struct {
	HttpClient *http.Client
	EosAPI     *eos.API
	BaseURL    string
	ChainID    []byte
}

func NewEosClient

func NewEosClient(baseURL string) *EosClient

func (*EosClient) BlockRespDecodeTrx

func (ec *EosClient) BlockRespDecodeTrx(blockResp *model.BlockResp) (out *model.BlockResp, err error)

func (*EosClient) GetBlockByID

func (ec *EosClient) GetBlockByID(query uint32) (resp *model.BlockResp, err error)

func (*EosClient) GetCurrencyBalance

func (ec *EosClient) GetCurrencyBalance(account string, symbol string) (out []eos.Asset, err error)

func (*EosClient) GetInfo

func (ec *EosClient) GetInfo() (out *eos.InfoResp, err error)

func (*EosClient) GetIrreversibleBlockHeight

func (ec *EosClient) GetIrreversibleBlockHeight() uint32

func (*EosClient) GetNewestBlockHeight

func (ec *EosClient) GetNewestBlockHeight() uint32

func (*EosClient) GetTransaction

func (ec *EosClient) GetTransaction(id string) (out interface{}, err error)

func (*EosClient) GetTransactionFormat

func (ec *EosClient) GetTransactionFormat(id string) (out *eos.TransactionResp, err error)

func (*EosClient) PushSignedTransaction

func (ec *EosClient) PushSignedTransaction(tx *eos.PackedTransaction) (out *eos.PushTransactionFullResp, err error)

func (*EosClient) SetChainID

func (ec *EosClient) SetChainID()

type EosWatcher

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

func NewEosWatcher

func NewEosWatcher(baseURL string, scanHeight uint32, redisPool *redis.Pool) *EosWatcher

func (*EosWatcher) CheckConfirmOfTx

func (ew *EosWatcher) CheckConfirmOfTx(txid string) bool

func (*EosWatcher) GetEosClient

func (ew *EosWatcher) GetEosClient() *EosClient

func (*EosWatcher) GetIrreversibleBlockChan

func (ew *EosWatcher) GetIrreversibleBlockChan() <-chan *model.BlockResp

func (*EosWatcher) GetScanHeightFromRedis

func (ew *EosWatcher) GetScanHeightFromRedis() uint32

func (*EosWatcher) GetUnConfirmBlockChan

func (ew *EosWatcher) GetUnConfirmBlockChan() <-chan *model.BlockResp

func (*EosWatcher) UpdateScanHeightToRedis

func (ew *EosWatcher) UpdateScanHeightToRedis(height uint32) bool

func (*EosWatcher) WatchAllBlock

func (ew *EosWatcher) WatchAllBlock()

链上数据分为已确认和未确认的写入chan

Jump to

Keyboard shortcuts

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