service

package
v0.0.0-...-e920dd0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func ArrayString

func ArrayString(value interface{}) ([]string, bool)

func GetAssetInfo

func GetAssetInfo(asset *types.Asset) *service.AssetInfo

func GetDescByVMState

func GetDescByVMState(state avm.VMState) string

func GetPayloadInfo

func GetPayloadInfo(p side.Payload, pVersion byte) sideser.PayloadInfo

func GetTXInfo

func GetTXInfo(tx *types.Transaction) *service.TransactionInfo

func GetTransactionInfo

func GetTransactionInfo(cfg *sideser.Config, header interfaces.Header, tx *side.Transaction) *sideser.TransactionInfo

func GetTransactionInfoFromBytes

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

func NewEngine

func NewEngine() *avm.ExecutionEngine

func RunGetPriceScript

func RunGetPriceScript(script []byte) (*avm.ExecutionEngine, error)

func RunScript

func RunScript(script []byte) (*avm.ExecutionEngine, error)

Types

type BlockInfo

type BlockInfo struct {
	Version       uint32
	PrevBlockHash string
	MerkleRoot    string
	ReceiptHash   string
	Timestamp     uint32
	Height        uint32
	Nonce         uint32
	Hash          string
	// contains filtered or unexported fields
}

func GetBlockInfo

func GetBlockInfo(block *types.Block) *BlockInfo

type Config

type Config struct {
	*sideser.Config

	Compile  string
	NodePort uint16
	RPCPort  uint16
	RestPort uint16
	WSPort   uint16
}

type DeployInfo

type DeployInfo struct {
	Code        nt.FunctionCode
	Name        string
	CodeVersion string
	Author      string
	Email       string
	Description string
	ProgramHash string
	Gas         string
}

type HeadInfo

type HeadInfo struct {
	Version          uint32
	PrevBlockHash    string
	TransactionsRoot string
	ReceiptHash      string
	Timestamp        uint32
	Height           uint32
	Nonce            uint32
	Hash             string
}

func GetHeaderInfo

func GetHeaderInfo(header *nt.Header) *HeadInfo

type HttpServiceExtend

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

func NewHttpService

func NewHttpService(cfg *Config, assetid Uint256) *HttpServiceExtend

func (*HttpServiceExtend) GetBlockByHash

func (s *HttpServiceExtend) GetBlockByHash(param http.Params) (interface{}, error)

func (*HttpServiceExtend) GetBlockByHeight

func (s *HttpServiceExtend) GetBlockByHeight(param http.Params) (interface{}, error)

func (*HttpServiceExtend) GetIllegalEvidenceByHeight

func (s *HttpServiceExtend) GetIllegalEvidenceByHeight(param http.Params) (interface{}, error)

func (*HttpServiceExtend) GetNodeState

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

func (*HttpServiceExtend) GetOpPrice

func (s *HttpServiceExtend) GetOpPrice(param http.Params) (interface{}, error)

func (*HttpServiceExtend) GetReceivedByAddress

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

func (*HttpServiceExtend) GetTransactionReceipt

func (s *HttpServiceExtend) GetTransactionReceipt(param http.Params) (interface{}, error)

func (*HttpServiceExtend) GetWithdrawTransactionsByHeight

func (s *HttpServiceExtend) GetWithdrawTransactionsByHeight(param http.Params) (interface{}, error)

func (*HttpServiceExtend) InvokeFunction

func (s *HttpServiceExtend) InvokeFunction(param http.Params) (interface{}, error)

func (*HttpServiceExtend) InvokeScript

func (s *HttpServiceExtend) InvokeScript(param http.Params) (interface{}, error)

func (*HttpServiceExtend) ListUnspent

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

type InvokeInfo

type InvokeInfo struct {
	CodeHash    string
	Code        string
	ProgramHash string
	Gas         string
}

type PeerInfo

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

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.
}

type UTXOInfo

type UTXOInfo struct {
	AssetId       string `json:"assetid"`
	Txid          string `json:"txid"`
	VOut          uint32 `json:"vout"`
	Address       string `json:"address"`
	Amount        string `json:"amount"`
	Confirmations uint32 `json:"confirmations"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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