Documentation
¶
Index ¶
- func ParseInt(s string) uint64
- type Block
- type GenesisObject
- type WsClient
- func (client *WsClient) AddTransactionReceiptData(trx *transaction) (err error)
- func (client *WsClient) Close()
- func (client *WsClient) GetBlockByNumber(number uint64) (blk *Block, err error)
- func (client *WsClient) GetChainStats() (ns *storage.FinalizationData, err error)
- func (client *WsClient) GetDagBlockByHash(hash string) (dag *dagBlock, err error)
- func (client *WsClient) GetGenesis() (genesis *GenesisObject, err error)
- func (client *WsClient) GetLatestPeriod() (uint64, error)
- func (client *WsClient) GetPbftBlockWithDagBlocks(period uint64) (pbftWithDags *pbftBlockWithDags, err error)
- func (client *WsClient) GetTransactionByHash(hash string) (trx *transaction, err error)
- func (client *WsClient) SubscribeNewHeads() (chan *Block, *rpc.ClientSubscription, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Block ¶
type GenesisObject ¶
type GenesisObject struct { DagGenesisBlock dagBlock `json:"dag_genesis_block"` InitialBalances map[string]string `json:"initial_balances"` // TODO[45]: Old genesis structure. Remove FinalChain struct { State struct { GenesisBalances map[string]string `json:"genesis_balances"` } `json:"state"` } `json:"final_chain"` }
type WsClient ¶
type WsClient struct {
// contains filtered or unexported fields
}
WsClient is a struct that connects to a Taraxa node.
func NewWsClient ¶
NewWsClient creates a new instance of the WsClient struct.
func (*WsClient) AddTransactionReceiptData ¶
func (*WsClient) GetBlockByNumber ¶
func (*WsClient) GetChainStats ¶
func (client *WsClient) GetChainStats() (ns *storage.FinalizationData, err error)
func (*WsClient) GetDagBlockByHash ¶
func (*WsClient) GetGenesis ¶
func (client *WsClient) GetGenesis() (genesis *GenesisObject, err error)
func (*WsClient) GetLatestPeriod ¶
func (*WsClient) GetPbftBlockWithDagBlocks ¶
func (*WsClient) GetTransactionByHash ¶
TODO: Optimize this. We are making two requests here, so its pretty slow
func (*WsClient) SubscribeNewHeads ¶
func (client *WsClient) SubscribeNewHeads() (chan *Block, *rpc.ClientSubscription, error)
Click to show internal directories.
Click to hide internal directories.