service

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2019 License: MIT Imports: 10 Imported by: 0

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

func GetTransactionInfoFromBytes

func GetTransactionInfoFromBytes(txInfoBytes []byte) (*service.TransactionInfo, error)

Types

type Config added in v0.1.0

type Config struct {
	service.Config
	Compile  string
	NodePort uint16
	RPCPort  uint16
	RestPort uint16
	WSPort   uint16
	Store    *blockchain.IDChainStore
}

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) GetIdentificationTxByIdAndPath added in v0.1.0

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

func (*HttpService) GetNodeState added in v0.1.0

func (s *HttpService) GetNodeState(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 RegisterIdentificationContentInfo

type RegisterIdentificationContentInfo struct {
	Path   string                            `json:"path"`
	Values []RegisterIdentificationValueInfo `json:"values"`
}

type RegisterIdentificationInfo

type RegisterIdentificationInfo struct {
	Id       string                              `json:"id"`
	Sign     string                              `json:"sign"`
	Contents []RegisterIdentificationContentInfo `json:"contents"`
}

type RegisterIdentificationValueInfo

type RegisterIdentificationValueInfo struct {
	DataHash string `json:"datahash"`
	Proof    string `json:"proof"`
	Info     string `json:"info"`
}

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
	RestPort  uint16      `json:"restport"`  // The RESTful service port
	WSPort    uint16      `json:"wsport"`    // The webservcie 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