service

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPayloadInfo

func GetPayloadInfo(p types.Payload, pVersion byte) service.PayloadInfo

func GetTransactionInfo

func GetTransactionInfo(cfg *service.Config, header *types.Header, tx *types.Transaction) *service.TransactionInfo

Types

type AssetInfo

type AssetInfo struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Precision   byte   `json:"precision"`
	Height      uint32 `json:"height"`
	ID          string `json:"assetid"`
}

type Config added in v0.1.0

type Config struct {
	service.Config
	Compile  string
	NodePort uint16
	RPCPort  uint16
	Store    *blockchain.TokenChainStore
}

type HttpService added in v0.1.0

type HttpService struct {
	*service.HttpService
	// contains filtered or unexported fields
}

func NewHttpService

func NewHttpService(cfg *Config) *HttpService

func (*HttpService) GetAssetByHash added in v0.1.0

func (s *HttpService) GetAssetByHash(param http.Params) (interface{}, error)

func (*HttpService) GetAssetList added in v0.1.0

func (s *HttpService) GetAssetList(param http.Params) (interface{}, error)

func (*HttpService) GetNodeState added in v0.1.0

func (s *HttpService) GetNodeState(param http.Params) (interface{}, error)

func (*HttpService) GetReceivedByAddress added in v0.1.0

func (s *HttpService) GetReceivedByAddress(param http.Params) (interface{}, error)

func (*HttpService) ListUnspent added in v0.1.0

func (s *HttpService) ListUnspent(param http.Params) (interface{}, error)

type PeerInfo added in v0.1.0

type PeerInfo struct {
	NetAddress     string `json:"netaddress"`
	Services       string `json:"services"`
	RelayTx        bool   `json:"relaytx"`
	LastSend       string `json:"lastsend"`
	LastRecv       string `json:"lastrecv"`
	ConnTime       string `json:"conntime"`
	TimeOffset     int64  `json:"timeoffset"`
	Version        uint32 `json:"version"`
	Inbound        bool   `json:"inbound"`
	StartingHeight uint32 `json:"startingheight"`
	LastBlock      uint32 `json:"lastblock"`
	LastPingTime   string `json:"lastpingtime"`
	LastPingMicros int64  `json:"lastpingmicros"`
}

type ServerInfo added in v0.1.0

type ServerInfo struct {
	Compile   string      `json:"compile"`   // The compile version of this server node
	Height    uint32      `json:"height"`    // The ServerNode latest block height
	Version   uint32      `json:"version"`   // The network protocol the ServerNode used
	Services  string      `json:"services"`  // The services the server supports
	Port      uint16      `json:"port"`      // The nodes's port
	RPCPort   uint16      `json:"rpcport"`   // The RPC service port
	Neighbors []*PeerInfo `json:"neighbors"` // The connected neighbor peers.
}

Jump to

Keyboard shortcuts

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