servers

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const TlsPort = 443

Variables

View Source
var (
	Compile     string
	Config      *config.Configuration
	ChainParams *config.Params
	Chain       *blockchain.BlockChain
	Store       blockchain.IChainStore
	TxMemPool   *mempool.TxPool
	Pow         *pow.Service
	Server      elanet.Server
	Arbiter     *dpos.Arbitrator
	Arbiters    state.Arbitrators
	Wallet      *wallet.Wallet
)

Functions

func AuxHelp

func AuxHelp(param Params) map[string]interface{}

func CreateAuxBlock

func CreateAuxBlock(param Params) map[string]interface{}

func CreateRawTransaction added in v0.5.0

func CreateRawTransaction(param Params) map[string]interface{}

func DecodeRawTransaction added in v0.5.0

func DecodeRawTransaction(param Params) map[string]interface{}

func DiscreteMining

func DiscreteMining(param Params) map[string]interface{}

func EstimateSmartFee added in v0.2.2

func EstimateSmartFee(param Params) map[string]interface{}

func GetAmountByInputs added in v0.3.2

func GetAmountByInputs(param Params) map[string]interface{}

func GetArbiterPeersInfo added in v0.3.0

func GetArbiterPeersInfo(params Params) map[string]interface{}

func GetArbitersInfo added in v0.3.0

func GetArbitersInfo(params Params) map[string]interface{}

func GetArbitratorGroupByHeight

func GetArbitratorGroupByHeight(param Params) map[string]interface{}

func GetAssetByHash

func GetAssetByHash(param Params) map[string]interface{}

GetAssetByHash always return ELA asset Deprecated: It may be removed in the next version

func GetBalanceByAddr

func GetBalanceByAddr(param Params) map[string]interface{}

func GetBalanceByAsset deprecated

func GetBalanceByAsset(param Params) map[string]interface{}

Deprecated: May be removed in the next version

func GetBestBlockHash

func GetBestBlockHash(param Params) map[string]interface{}

func GetBlockByHash

func GetBlockByHash(param Params) map[string]interface{}

func GetBlockByHeight

func GetBlockByHeight(param Params) map[string]interface{}

func GetBlockCount

func GetBlockCount(param Params) map[string]interface{}

func GetBlockHash

func GetBlockHash(param Params) map[string]interface{}

func GetBlockHeight

func GetBlockHeight(param Params) map[string]interface{}

func GetBlockTransactions

func GetBlockTransactions(block *Block) interface{}

func GetCRCPeersInfo added in v0.7.0

func GetCRCPeersInfo(params Params) map[string]interface{}

func GetCRDepositCoin added in v0.5.0

func GetCRDepositCoin(param Params) map[string]interface{}

func GetCRProposalState added in v0.5.0

func GetCRProposalState(param Params) map[string]interface{}

func GetCRRelatedStage added in v0.7.0

func GetCRRelatedStage(param Params) map[string]interface{}

func GetCommitteeCanUseAmount added in v0.7.0

func GetCommitteeCanUseAmount(param Params) map[string]interface{}

func GetConfirmByHash added in v0.3.0

func GetConfirmByHash(param Params) map[string]interface{}

func GetConfirmByHeight added in v0.3.0

func GetConfirmByHeight(param Params) map[string]interface{}

func GetConnectionCount

func GetConnectionCount(param Params) map[string]interface{}

func GetCrossChainPeersInfo added in v0.7.0

func GetCrossChainPeersInfo(params Params) map[string]interface{}

func GetDepositCoin added in v0.2.2

func GetDepositCoin(param Params) map[string]interface{}

func GetExistSideChainReturnDepositTransactions added in v0.8.0

func GetExistSideChainReturnDepositTransactions(param Params) map[string]interface{}

func GetExistWithdrawTransactions added in v0.1.1

func GetExistWithdrawTransactions(param Params) map[string]interface{}

func GetFeeRate added in v0.2.2

func GetFeeRate(count int, confirm int) int

func GetInfo

func GetInfo(param Params) map[string]interface{}

func GetMiningInfo added in v0.3.4

func GetMiningInfo(param Params) map[string]interface{}

func GetNeighbors

func GetNeighbors(param Params) map[string]interface{}

func GetNodeState

func GetNodeState(param Params) map[string]interface{}

func GetProposalDraftData added in v0.7.0

func GetProposalDraftData(param Params) map[string]interface{}

func GetRawTransaction

func GetRawTransaction(param Params) map[string]interface{}

Input JSON string examples for getblock method as following:

func GetReceivedByAddress added in v0.2.0

func GetReceivedByAddress(param Params) map[string]interface{}

func GetSecretaryGeneral added in v0.5.0

func GetSecretaryGeneral(param Params) map[string]interface{}

func GetSmallCrossTransferTxs added in v0.8.0

func GetSmallCrossTransferTxs(params Params) map[string]interface{}

func GetTransactionByHash

func GetTransactionByHash(param Params) map[string]interface{}

Transaction

func GetTransactionPool

func GetTransactionPool(param Params) map[string]interface{}

func GetTransactionsByHeight

func GetTransactionsByHeight(param Params) map[string]interface{}

func GetUTXOsByAmount added in v0.3.2

func GetUTXOsByAmount(param Params) map[string]interface{}

func GetUnspendOutput deprecated

func GetUnspendOutput(param Params) map[string]interface{}

Deprecated: May be removed in the next version

func GetUnspends

func GetUnspends(param Params) map[string]interface{}

func Getallregistertransactions added in v0.8.0

func Getallregistertransactions(param Params) map[string]interface{}

func Getregistertransactionsbyheight added in v0.8.0

func Getregistertransactionsbyheight(param Params) map[string]interface{}

func ListCRCandidates added in v0.5.0

func ListCRCandidates(param Params) map[string]interface{}

list cr candidates according to ( state , start and limit)

func ListCRProposalBaseState added in v0.5.0

func ListCRProposalBaseState(param Params) map[string]interface{}

func ListCurrentCRs added in v0.5.0

func ListCurrentCRs(param Params) map[string]interface{}

list current crs according to (state)

func ListProducers added in v0.2.2

func ListProducers(param Params) map[string]interface{}

func ListUnspent added in v0.1.1

func ListUnspent(param Params) map[string]interface{}

func ProducerStatus added in v0.2.2

func ProducerStatus(param Params) map[string]interface{}

func ResponsePack

func ResponsePack(errCode ServerErrCode, result interface{}) map[string]interface{}

func SendRawTransaction

func SendRawTransaction(param Params) map[string]interface{}

func SetLogLevel

func SetLogLevel(param Params) map[string]interface{}

func SignRawTransactionWithKey added in v0.5.0

func SignRawTransactionWithKey(param Params) map[string]interface{}

func SubmitAuxBlock

func SubmitAuxBlock(param Params) map[string]interface{}

func SubmitSidechainIllegalData added in v0.3.0

func SubmitSidechainIllegalData(param Params) map[string]interface{}

func ToggleMining

func ToggleMining(param Params) map[string]interface{}

func VerifyAndSendTx

func VerifyAndSendTx(tx *Transaction) error

func VoteStatus added in v0.2.2

func VoteStatus(param Params) map[string]interface{}

Types

type ActivateProducerInfo added in v0.3.2

type ActivateProducerInfo struct {
	NodePublicKey string `json:"nodepublickey"`
	Signature     string `json:"signature"`
}

type ArbitratorGroupInfo

type ArbitratorGroupInfo struct {
	OnDutyArbitratorIndex int      `json:"ondutyarbitratorindex"`
	Arbitrators           []string `json:"arbitrators"`
}

type AttributeInfo

type AttributeInfo struct {
	Usage AttributeUsage `json:"usage"`
	Data  string         `json:"data"`
}

type BlockEvidenceInfo added in v0.7.0

type BlockEvidenceInfo struct {
	Header       string   `json:"header"`
	BlockConfirm string   `json:"blockconfirm"`
	Signers      []string `json:"signers"`

	Hash string `json:"hash"`
}

type BlockInfo

type BlockInfo struct {
	Hash              string        `json:"hash"`
	Confirmations     uint32        `json:"confirmations"`
	StrippedSize      uint32        `json:"strippedsize"`
	Size              uint32        `json:"size"`
	Weight            uint32        `json:"weight"`
	Height            uint32        `json:"height"`
	Version           uint32        `json:"version"`
	VersionHex        string        `json:"versionhex"`
	MerkleRoot        string        `json:"merkleroot"`
	Tx                []interface{} `json:"tx"`
	Time              uint32        `json:"time"`
	MedianTime        uint32        `json:"mediantime"`
	Nonce             uint32        `json:"nonce"`
	Bits              uint32        `json:"bits"`
	Difficulty        string        `json:"difficulty"`
	ChainWork         string        `json:"chainwork"`
	PreviousBlockHash string        `json:"previousblockhash"`
	NextBlockHash     string        `json:"nextblockhash"`
	AuxPow            string        `json:"auxpow"`
	MinerInfo         string        `json:"minerinfo"`
}

func GetBlockInfo

func GetBlockInfo(block *Block, verbose bool) BlockInfo

type BudgetBaseInfo added in v0.5.0

type BudgetBaseInfo struct {
	Type   string `json:"type"`
	Stage  uint8  `json:"stage"`
	Amount string `json:"amount"`
}

type BudgetInfo added in v0.5.0

type BudgetInfo struct {
	Type   string `json:"type"`
	Stage  uint8  `json:"stage"`
	Amount string `json:"amount"`
	Status string `json:"status"`
}

type CRCChangeCustomIDFeeInfo added in v0.7.0

type CRCChangeCustomIDFeeInfo struct {
	ProposalType             string `json:"proposaltype"`
	CategoryData             string `json:"categorydata"`
	OwnerPublicKey           string `json:"ownerpublickey"`
	DraftHash                string `json:"drafthash"`
	FeeRate                  int64  `json:"feerate"`
	EIDEffectiveHeight       uint32 `json:"eideffectiveheight"`
	Signature                string `json:"signature"`
	CRCouncilMemberDID       string `json:"crcouncilmemberdid"`
	CRCouncilMemberSignature string `json:"crcouncilmembersignature"`
	Hash                     string `json:"hash"`
}

type CRCChangeProposalOwnerInfo added in v0.7.0

type CRCChangeProposalOwnerInfo struct {
	ProposalType             string `json:"proposaltype"`
	CategoryData             string `json:"categorydata"`
	OwnerPublicKey           string `json:"ownerpublickey"`
	DraftHash                string `json:"drafthash"`
	TargetProposalHash       string `json:"targetproposalhash"`
	NewRecipient             string `json:"newrecipient"`
	NewOwnerPublicKey        string `json:"newownerpublickey"`
	Signature                string `json:"signature"`
	NewOwnerSignature        string `json:"newownersignature"`
	CRCouncilMemberDID       string `json:"crcouncilmemberdid"`
	CRCouncilMemberSignature string `json:"crcouncilmembersignature"`
	Hash                     string `json:"hash"`
}

type CRCCloseProposalInfo added in v0.7.0

type CRCCloseProposalInfo struct {
	ProposalType             string `json:"proposaltype"`
	CategoryData             string `json:"categorydata"`
	OwnerPublicKey           string `json:"ownerpublickey"`
	DraftHash                string `json:"drafthash"`
	TargetProposalHash       string `json:"targetproposalhash"`
	Signature                string `json:"signature"`
	CRCouncilMemberDID       string `json:"crcouncilmemberdid"`
	CRCouncilMemberSignature string `json:"crcouncilmembersignature"`
	Hash                     string `json:"hash"`
}

type CRCCustomIDProposalResultInfo added in v0.7.0

type CRCCustomIDProposalResultInfo struct {
	ProposalResults []ProposalResultInfo `json:"proposalresults"`
}

type CRCProposalInfo added in v0.5.0

type CRCProposalInfo struct {
	ProposalType             string           `json:"proposaltype"`
	CategoryData             string           `json:"categorydata"`
	OwnerPublicKey           string           `json:"ownerpublickey"`
	DraftHash                string           `json:"drafthash"`
	Budgets                  []BudgetBaseInfo `json:"budgets"`
	Recipient                string           `json:"recipient"`
	Signature                string           `json:"signature"`
	CRCouncilMemberDID       string           `json:"crcouncilmemberdid"`
	CRCouncilMemberSignature string           `json:"crcouncilmembersignature"`
	Hash                     string           `json:"hash"`
}

type CRCProposalRealWithdrawInfo added in v0.7.0

type CRCProposalRealWithdrawInfo struct {
	WithdrawTransactionHashes []string `json:"withdrawtransactionhashes"`
}

type CRCProposalReviewInfo added in v0.5.0

type CRCProposalReviewInfo struct {
	ProposalHash string `json:"proposalhash"`
	VoteResult   string `json:"voteresult"`
	OpinionHash  string `json:"opinionhash"`
	DID          string `json:"did"`
	Sign         string `json:"sign"`
}

type CRCProposalTrackingInfo added in v0.5.0

type CRCProposalTrackingInfo struct {
	ProposalTrackingType        string `json:"proposaltrackingtype"`
	ProposalHash                string `json:"proposalhash"`
	MessageHash                 string `json:"messagehash"`
	Stage                       uint8  `json:"stage"`
	OwnerPublicKey              string `json:"ownerpublickey"`
	NewOwnerPublicKey           string `json:"newownerpublickey"`
	OwnerSignature              string `json:"ownersignature"`
	NewOwnerSignature           string `json:"newownersignature"`
	SecretaryGeneralOpinionHash string `json:"secretarygeneralopinionhash"`
	SecretaryGeneralSignature   string `json:"secretarygeneralsignature"`
}

type CRCProposalWithdrawInfo added in v0.5.0

type CRCProposalWithdrawInfo struct {
	ProposalHash   string `json:"proposalhash"`
	OwnerPublicKey string `json:"ownerpublickey"`
	Recipient      string `json:"recipient,omitempty"`
	Amount         string `json:"amount,omitempty"`
	Signature      string `json:"signature"`
}

type CRCReceivedCustomIDProposalInfo added in v0.7.0

type CRCReceivedCustomIDProposalInfo struct {
	ProposalType             string   `json:"proposaltype"`
	CategoryData             string   `json:"categorydata"`
	OwnerPublicKey           string   `json:"ownerpublickey"`
	DraftHash                string   `json:"drafthash"`
	ReceiveCustomIDList      []string `json:"receivecustomidlist"`
	ReceiverDID              string   `json:"receiverdid"`
	Signature                string   `json:"signature"`
	CRCouncilMemberDID       string   `json:"crcouncilmemberdid"`
	CRCouncilMemberSignature string   `json:"crcouncilmembersignature"`
	Hash                     string   `json:"hash"`
}

type CRCRegisterSideChainProposalInfo added in v0.8.0

type CRCRegisterSideChainProposalInfo struct {
	ProposalType             string         `json:"proposaltype"`
	CategoryData             string         `json:"categorydata"`
	OwnerPublicKey           string         `json:"ownerpublickey"`
	DraftHash                string         `json:"drafthash"`
	SideChainName            string         `json:"sidechainname"`
	MagicNumber              uint32         `json:"magicnumber"`
	GenesisHash              string         `json:"genesishash"`
	ExchangeRate             common.Fixed64 `json:"exchangerate"`
	EffectiveHeight          uint32         `json:"effectiveheight"`
	ResourcePath             string         `json:"resourcepath"`
	Signature                string         `json:"signature"`
	CRCouncilMemberDID       string         `json:"crcouncilmemberdid"`
	CRCouncilMemberSignature string         `json:"crcouncilmembersignature"`
	Hash                     string         `json:"hash"`
}

type CRCReservedCustomIDProposalInfo added in v0.7.0

type CRCReservedCustomIDProposalInfo struct {
	ProposalType             string   `json:"proposaltype"`
	CategoryData             string   `json:"categorydata"`
	OwnerPublicKey           string   `json:"ownerpublickey"`
	DraftHash                string   `json:"drafthash"`
	ReservedCustomIDList     []string `json:"reservedcustomidlist"`
	Signature                string   `json:"signature"`
	CRCouncilMemberDID       string   `json:"crcouncilmemberdid"`
	CRCouncilMemberSignature string   `json:"crcouncilmembersignature"`
	Hash                     string   `json:"hash"`
}

type CRCSecretaryGeneralProposalInfo added in v0.7.0

type CRCSecretaryGeneralProposalInfo struct {
	ProposalType              string `json:"proposaltype"`
	CategoryData              string `json:"categorydata"`
	OwnerPublicKey            string `json:"ownerpublickey"`
	DraftHash                 string `json:"drafthash"`
	SecretaryGeneralPublicKey string `json:"secretarygeneralpublickey"`
	SecretaryGeneralDID       string `json:"secretarygeneraldid"`
	Signature                 string `json:"signature"`
	SecretaryGeneraSignature  string `json:"secretarygenerasignature"`
	CRCouncilMemberDID        string `json:"crcouncilmemberdid"`
	CRCouncilMemberSignature  string `json:"crcouncilmembersignature"`
	Hash                      string `json:"hash"`
}

type CRCouncilMemberClaimNodeInfo added in v0.7.0

type CRCouncilMemberClaimNodeInfo struct {
	NodePublicKey            string `json:"nodepublickey"`
	CRCouncilMemberDID       string `json:"crcouncilmemberdid"`
	CRCouncilMemberSignature string `json:"crcouncilmembersignature"`
}

type CRInfo added in v0.5.0

type CRInfo struct {
	Code      string `json:"code"`
	CID       string `json:"cid"`
	DID       string `json:"did"`
	NickName  string `json:"nickname"`
	Url       string `json:"url"`
	Location  uint64 `json:"location"`
	Signature string `json:"signature"`
}

type CancelProducerInfo added in v0.2.2

type CancelProducerInfo struct {
	OwnerPublicKey string `json:"ownerpublickey"`
	Signature      string `json:"signature"`
}

type CandidateVotes added in v0.5.0

type CandidateVotes struct {
	Candidate string `json:"candidate"`
	Votes     string `json:"votes"`
}

type CoinbaseInfo

type CoinbaseInfo struct {
	CoinbaseData string `json:"coinbasedata"`
}

type ConfirmInfo added in v0.3.0

type ConfirmInfo struct {
	BlockHash  string     `json:"blockhash"`
	Sponsor    string     `json:"sponsor"`
	ViewOffset uint32     `json:"viewoffset"`
	Votes      []VoteInfo `json:"votes"`
}

func GetConfirmInfo added in v0.3.0

func GetConfirmInfo(confirm *payload.Confirm) ConfirmInfo

type CrossChainOutputInfo added in v0.8.0

type CrossChainOutputInfo struct {
	Version       byte   `json:"Version"`
	TargetAddress string `json:"TargetAddress"`
	TargetAmount  string `json:"TargetAmount"`
	TargetData    string `json:"TargetData"`
}

type DPOSIllegalBlocksInfo added in v0.7.0

type DPOSIllegalBlocksInfo struct {
	CoinType        uint32            `json:"cointype"`
	BlockHeight     uint32            `json:"blockheight"`
	Evidence        BlockEvidenceInfo `json:"evidence"`
	CompareEvidence BlockEvidenceInfo `json:"compareevidence"`

	Hash string `json:"hash"`
}

type DPOSIllegalProposalsInfo added in v0.7.0

type DPOSIllegalProposalsInfo struct {
	Evidence        ProposalEvidenceInfo `json:"evidence"`
	CompareEvidence ProposalEvidenceInfo `json:"compareevidence"`
	Hash            string               `json:"hash"`
}

type DPOSIllegalVotesInfo added in v0.7.0

type DPOSIllegalVotesInfo struct {
	Evidence        VoteEvidenceInfo `json:"evidence"`
	CompareEvidence VoteEvidenceInfo `json:"compareevidence"`
	Hash            string           `json:"hash"`
}

type DPOSProposalInfo added in v0.7.0

type DPOSProposalInfo struct {
	Sponsor    string `json:"sponsor"`
	BlockHash  string `json:"blockhash"`
	ViewOffset uint32 `json:"viewoffset"`
	Sign       string `json:"sign"`
	Hash       string `json:"hash"`
}

type DPOSProposalVoteInfo added in v0.7.0

type DPOSProposalVoteInfo struct {
	ProposalHash string `json:"proposalhash"`
	Signer       string `json:"signer"`
	Accept       bool   `json:"accept"`
	Sign         string `json:"sign"`
	Hash         string `json:"hash"`
}

type DefaultOutputInfo added in v0.2.2

type DefaultOutputInfo struct{}

type InactiveArbitratorsInfo added in v0.5.0

type InactiveArbitratorsInfo struct {
	Sponsor     string   `json:"sponsor"`
	Arbitrators []string `json:"arbitrators"`
	BlockHeight uint32   `json:"blockheight"`
}

type InputInfo

type InputInfo struct {
	TxID     string `json:"txid"`
	VOut     uint16 `json:"vout"`
	Sequence uint32 `json:"sequence"`
}

type NextTurnDPOSPayloadInfo added in v0.7.0

type NextTurnDPOSPayloadInfo struct {
	WorkingHeight  uint32   `json:"workingheight"`
	CRPublickeys   []string `json:"crpublickeys"`
	DPOSPublicKeys []string `json:"dpospublickeys"`
}

type OutputPayloadInfo added in v0.2.2

type OutputPayloadInfo interface{}

type Params

type Params map[string]interface{}

func FromArray

func FromArray(array []interface{}, fields ...string) Params

func (Params) ArrayString added in v0.1.1

func (p Params) ArrayString(key string) ([]string, bool)

func (Params) Bool

func (p Params) Bool(key string) (bool, bool)

func (Params) Float

func (p Params) Float(field string) (float64, bool)

func (Params) Int

func (p Params) Int(field string) (int64, bool)

func (Params) String

func (p Params) String(key string) (string, bool)

func (Params) Uint

func (p Params) Uint(field string) (uint32, bool)

type PayloadInfo

type PayloadInfo interface{}

type PeerInfo added in v0.3.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"`
	NodeVersion    string `json:"nodeversion"`
}

type ProducerInfo added in v0.3.0

type ProducerInfo struct {
	OwnerPublicKey string `json:"ownerpublickey"`
	NodePublicKey  string `json:"nodepublickey"`
	NickName       string `json:"nickname"`
	Url            string `json:"url"`
	Location       uint64 `json:"location"`
	NetAddress     string `json:"netaddress"`
	Signature      string `json:"signature"`
}

type ProgramInfo

type ProgramInfo struct {
	Code      string `json:"code"`
	Parameter string `json:"parameter"`
}

type ProposalEvidenceInfo added in v0.7.0

type ProposalEvidenceInfo struct {
	Proposal    DPOSProposalInfo `json:"proposal"`
	BlockHeight uint32           `json:"blockheight"`
}

type ProposalResultInfo added in v0.7.0

type ProposalResultInfo struct {
	ProposalHash string `json:"proposalhash"`
	ProposalType string `json:"proposaltype"`
	Result       bool   `json:"result"`
}

type RPCCRCProposal added in v0.7.0

type RPCCRCProposal struct {
	ProposalType       string       `json:"proposaltype"`
	CategoryData       string       `json:"categorydata"`
	OwnerPublicKey     string       `json:"ownerpublickey"`
	CRCouncilMemberDID string       `json:"crcouncilmemberdid"`
	DraftHash          string       `json:"drafthash"`
	Recipient          string       `json:"recipient"`
	Budgets            []BudgetInfo `json:"budgets"`
}

type RPCCRCandidateInfo added in v0.7.0

type RPCCRCandidateInfo struct {
	Code           string `json:"code"`
	CID            string `json:"cid"`
	DID            string `json:"did"`
	NickName       string `json:"nickname"`
	Url            string `json:"url"`
	Location       uint64 `json:"location"`
	State          string `json:"state"`
	Votes          string `json:"votes"`
	RegisterHeight uint32 `json:"registerheight"`
	CancelHeight   uint32 `json:"cancelheight"`

	Index uint64 `json:"index"`
}

single cr candidate info

type RPCCRCandidatesInfo added in v0.7.0

type RPCCRCandidatesInfo struct {
	CRCandidateInfoSlice []RPCCRCandidateInfo `json:"crcandidatesinfo"`
	TotalVotes           string               `json:"totalvotes"`
	TotalCounts          uint64               `json:"totalcounts"`
}

a group cr candidate info include TotalVotes and candidate count

type RPCCRMemberInfo added in v0.7.0

type RPCCRMemberInfo struct {
	Code             string `json:"code"`
	CID              string `json:"cid"`
	DID              string `json:"did"`
	DPOSPublicKey    string `json:"dpospublickey"`
	NickName         string `json:"nickname"`
	Url              string `json:"url"`
	Location         uint64 `json:"location"`
	ImpeachmentVotes string `json:"impeachmentvotes"`
	DepositAmount    string `json:"depositamout"`
	DepositAddress   string `json:"depositaddress"`
	Penalty          string `json:"penalty"`
	State            string `json:"state"`
	Index            uint64 `json:"index"`
}

single cr member info

type RPCCRMembersInfo added in v0.7.0

type RPCCRMembersInfo struct {
	CRMemberInfoSlice []RPCCRMemberInfo `json:"crmembersinfo"`
	TotalCounts       uint64            `json:"totalcounts"`
}

a group cr member info include cr member count

type RPCCRProposalBaseStateInfo added in v0.7.0

type RPCCRProposalBaseStateInfo struct {
	ProposalBaseStates []RPCProposalBaseState `json:"proposalbasestates"`
	TotalCounts        uint64                 `json:"totalcounts"`
}

type RPCCRProposalStateInfo added in v0.7.0

type RPCCRProposalStateInfo struct {
	ProposalState RPCProposalState `json:"proposalstate"`
}

type RPCCRRelatedStage added in v0.7.0

type RPCCRRelatedStage struct {
	OnDuty            bool   `json:"onduty"`
	OnDutyStartHeight uint32 `json:"ondutystartheight"`
	OnDutyEndHeight   uint32 `json:"ondutyendheight"`
	InVoting          bool   `json:"invoting"`
	VotingStartHeight uint32 `json:"votingstartheight"`
	VotingEndHeight   uint32 `json:"votingendheight"`
}

type RPCChangeCustomIDFeeProposal added in v0.7.0

type RPCChangeCustomIDFeeProposal struct {
	ProposalType       string `json:"proposaltype"`
	CategoryData       string `json:"categorydata"`
	OwnerPublicKey     string `json:"ownerpublickey"`
	DraftHash          string `json:"drafthash"`
	Fee                int64  `json:"fee"`
	EIDEffectiveHeight uint32 `json:"eideffectiveheight"`
	CRCouncilMemberDID string `json:"crcouncilmemberdid"`
}

type RPCChangeProposalOwnerProposal added in v0.7.0

type RPCChangeProposalOwnerProposal struct {
	ProposalType       string `json:"proposaltype"`
	CategoryData       string `json:"categorydata"`
	OwnerPublicKey     string `json:"ownerpublickey"`
	DraftHash          string `json:"drafthash"`
	TargetProposalHash string `json:"targetproposalhash"`
	NewRecipient       string `json:"newrecipient"`
	NewOwnerPublicKey  string `json:"newownerpublickey"`
	CRCouncilMemberDID string `json:"crcouncilmemberdid"`
}

type RPCCloseProposal added in v0.7.0

type RPCCloseProposal struct {
	ProposalType       string `json:"proposaltype"`
	CategoryData       string `json:"categorydata"`
	OwnerPublicKey     string `json:"ownerpublickey"`
	DraftHash          string `json:"drafthash"`
	TargetProposalHash string `json:"targetproposalhash"`
	CRCouncilMemberDID string `json:"crcouncilmemberdid"`
}

type RPCCommitteeCanUseAmount added in v0.7.0

type RPCCommitteeCanUseAmount struct {
	CommitteeCanUseAmount string `json:"committeecanuseamount"`
}

type RPCProducerInfo added in v0.7.0

type RPCProducerInfo struct {
	OwnerPublicKey string `json:"ownerpublickey"`
	NodePublicKey  string `json:"nodepublickey"`
	Nickname       string `json:"nickname"`
	Url            string `json:"url"`
	Location       uint64 `json:"location"`
	Active         bool   `json:"active"`
	Votes          string `json:"votes"`
	State          string `json:"state"`
	RegisterHeight uint32 `json:"registerheight"`
	CancelHeight   uint32 `json:"cancelheight"`
	InactiveHeight uint32 `json:"inactiveheight"`
	IllegalHeight  uint32 `json:"illegalheight"`
	Index          uint64 `json:"index"`
}

single producer info

type RPCProducersInfo added in v0.7.0

type RPCProducersInfo struct {
	ProducerInfoSlice []RPCProducerInfo `json:"producers"`
	TotalVotes        string            `json:"totalvotes"`
	TotalCounts       uint64            `json:"totalcounts"`
}

a group producer info include TotalVotes and producer count

type RPCProposalBaseState added in v0.7.0

type RPCProposalBaseState struct {
	Status             string            `json:"status"`
	ProposalHash       string            `json:"proposalhash"`
	TxHash             string            `json:"txhash"`
	CRVotes            map[string]string `json:"crvotes"`
	VotersRejectAmount string            `json:"votersrejectamount"`
	RegisterHeight     uint32            `json:"registerHeight"`
	TerminatedHeight   uint32            `json:"terminatedheight"`
	TrackingCount      uint8             `json:"trackingcount"`
	ProposalOwner      string            `json:"proposalowner"`
	Index              uint64            `json:"index"`
}

type RPCProposalState added in v0.7.0

type RPCProposalState struct {
	Status             string            `json:"status"`
	Proposal           interface{}       `json:"proposal"`
	ProposalHash       string            `json:"proposalhash"`
	TxHash             string            `json:"txhash"`
	CRVotes            map[string]string `json:"crvotes"`
	VotersRejectAmount string            `json:"votersrejectamount"`
	RegisterHeight     uint32            `json:"registerheight"`
	TerminatedHeight   uint32            `json:"terminatedheight"`
	TrackingCount      uint8             `json:"trackingcount"`
	ProposalOwner      string            `json:"proposalowner"`
	AvailableAmount    string            `json:"availableamount"`
}

type RPCReceiveCustomIDProposal added in v0.7.0

type RPCReceiveCustomIDProposal struct {
	ProposalType        string   `json:"proposaltype"`
	CategoryData        string   `json:"categorydata"`
	OwnerPublicKey      string   `json:"ownerpublickey"`
	DraftHash           string   `json:"drafthash"`
	ReceiveCustomIDList []string `json:"receivecustomidlist"`
	ReceiverDID         string   `json:"receiverdid"`
	CRCouncilMemberDID  string   `json:"crcouncilmemberdid"`
}

type RPCRegisterSideChainProposal added in v0.8.0

type RPCRegisterSideChainProposal struct {
	ProposalType   string                `json:"proposaltype"`
	CategoryData   string                `json:"categorydata"`
	OwnerPublicKey string                `json:"ownerpublickey"`
	DraftHash      string                `json:"drafthash"`
	SideChainInfo  RegisterSideChainInfo `json:"sidechaininfo"`
}

type RPCReservedCustomIDProposal added in v0.7.0

type RPCReservedCustomIDProposal struct {
	ProposalType         string   `json:"proposaltype"`
	CategoryData         string   `json:"categorydata"`
	OwnerPublicKey       string   `json:"ownerpublickey"`
	DraftHash            string   `json:"drafthash"`
	ReservedCustomIDList []string `json:"reservedcustomidlist"`
	CRCouncilMemberDID   string   `json:"crcouncilmemberdid"`
}

type RPCSecretaryGeneralInfo added in v0.7.0

type RPCSecretaryGeneralInfo struct {
	SecretaryGeneral string `json:"secretarygeneral"`
}

type RPCSecretaryGeneralProposal added in v0.7.0

type RPCSecretaryGeneralProposal struct {
	ProposalType              string `json:"proposaltype"`
	CategoryData              string `json:"categorydata"`
	OwnerPublicKey            string `json:"ownerpublickey"`
	DraftHash                 string `json:"drafthash"`
	SecretaryGeneralPublicKey string `json:"secretarygeneralpublickey"`
	SecretaryGeneralDID       string `json:"secretarygeneraldid"`
	CRCouncilMemberDID        string `json:"crcouncilmemberdid"`
}

type RegisterAssetInfo

type RegisterAssetInfo struct {
	Asset      payload.Asset `json:"asset"`
	Amount     string        `json:"amount"`
	Controller string        `json:"controller"`
}

type RegisterSideChainInfo added in v0.8.0

type RegisterSideChainInfo struct {
	SideChainName   string `json:"sidechainname"`
	MagicNumber     uint32 `json:"magic"`
	GenesisHash     string `json:"genesishash"`
	ExchangeRate    string `json:"exchangerate"`
	EffectiveHeight uint32 `json:"effectiveheight"`
	ResourcePath    string `json:"resourcepath"`
}

type Request added in v0.7.0

type Request struct {
	Method string      `json:"method"`
	ID     interface{} `json:"id"`
	Params interface{} `json:"params"`
}

type Response added in v0.7.0

type Response struct {
	JSONRPC string      `json:"jsonrpc"`
	Result  interface{} `json:"result"`
	ID      interface{} `json:"id"`
	Error   interface{} `json:"error"`
}

type ReturnSideChainDepositInfo added in v0.8.0

type ReturnSideChainDepositInfo struct {
	Version                byte   `json:"Version"`
	GenesisBlockAddress    string `json:"GenesisBlockAddress"`
	DepositTransactionHash string `json:"DepositTransactionHash"`
}

type RevertToDPOSInfo added in v0.7.0

type RevertToDPOSInfo struct {
	WorkHeightInterval     uint32
	RevertToPOWBlockHeight uint32
}

type RevertToPOWInfo added in v0.7.0

type RevertToPOWInfo struct {
	Type          string
	WorkingHeight uint32
}

type RpcOutputInfo added in v0.7.0

type RpcOutputInfo struct {
	Value         string            `json:"value"`
	Index         uint32            `json:"n"`
	Address       string            `json:"address"`
	AssetID       string            `json:"assetid"`
	OutputLock    uint32            `json:"outputlock"`
	OutputType    uint32            `json:"type"`
	OutputPayload OutputPayloadInfo `json:"payload"`
}

type RsInfo added in v0.8.0

type RsInfo struct {
	SideChainName   string         `json:"sidechainname"`
	MagicNumber     uint32         `json:"magicnumber"`
	GenesisHash     string         `json:"genesishash"`
	ExchangeRate    common.Fixed64 `json:"exchangerate"`
	ResourcePath    string         `json:"resourcepath"`
	TxHash          string         `json:"txhash"`
	Height          uint32         `json:"height"`
	EffectiveHeight uint32         `json:"effectiveheight"`
}

type ServerInfo added in v0.3.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.
}

type SideChainPowInfo added in v0.1.1

type SideChainPowInfo struct {
	BlockHeight     uint32 `json:"blockheight"`
	SideBlockHash   string `json:"sideblockhash"`
	SideGenesisHash string `json:"sidegenesishash"`
	Signature       string `json:"signature"`
}

type SidechainIllegalDataInfo added in v0.3.0

type SidechainIllegalDataInfo struct {
	IllegalType         uint8    `json:"illegaltype"`
	Height              uint32   `json:"height"`
	IllegalSigner       string   `json:"illegalsigner"`
	Evidence            string   `json:"evidence"`
	CompareEvidence     string   `json:"compareevidence"`
	GenesisBlockAddress string   `json:"genesisblockaddress"`
	Signs               []string `json:"signs"`
}

type TransactionContextInfo added in v0.5.0

type TransactionContextInfo struct {
	*TransactionInfo
	BlockHash     string `json:"blockhash"`
	Confirmations uint32 `json:"confirmations"`
	Time          uint32 `json:"time"`
	BlockTime     uint32 `json:"blocktime"`
}

func GetTransactionContextInfo added in v0.5.0

func GetTransactionContextInfo(header *Header, tx *Transaction) *TransactionContextInfo

type TransactionInfo

type TransactionInfo struct {
	TxID           string             `json:"txid"`
	Hash           string             `json:"hash"`
	Size           uint32             `json:"size"`
	VSize          uint32             `json:"vsize"`
	Version        TransactionVersion `json:"version"`
	TxType         TxType             `json:"type"`
	PayloadVersion byte               `json:"payloadversion"`
	Payload        PayloadInfo        `json:"payload"`
	Attributes     []AttributeInfo    `json:"attributes"`
	Inputs         []InputInfo        `json:"vin"`
	Outputs        []RpcOutputInfo    `json:"vout"`
	LockTime       uint32             `json:"locktime"`
	Programs       []ProgramInfo      `json:"programs"`
}

func GetTransactionInfo

func GetTransactionInfo(tx *Transaction) *TransactionInfo

type TransferCrossChainAssetInfo

type TransferCrossChainAssetInfo struct {
	CrossChainAddresses []string         `json:"crosschainaddresses"`
	OutputIndexes       []uint64         `json:"outputindexes"`
	CrossChainAmounts   []common.Fixed64 `json:"crosschainamounts"`
}

type UTXOInfo added in v0.1.1

type UTXOInfo struct {
	TxType        byte   `json:"txtype"`
	TxID          string `json:"txid"`
	AssetID       string `json:"assetid"`
	VOut          uint16 `json:"vout"`
	Address       string `json:"address"`
	Amount        string `json:"amount"`
	OutputLock    uint32 `json:"outputlock"`
	Confirmations uint32 `json:"confirmations"`
}

type UnregisterCRInfo added in v0.5.0

type UnregisterCRInfo struct {
	CID       string `json:"cid"`
	Signature string `json:"signature"`
}

type UpdateVersionInfo added in v0.5.0

type UpdateVersionInfo struct {
	StartHeight uint32 `json:"startheight"`
	EndHeight   uint32 `json:"endheight"`
}

type VoteContentInfo added in v0.2.2

type VoteContentInfo struct {
	VoteType       outputpayload.VoteType `json:"votetype"`
	CandidatesInfo []CandidateVotes       `json:"candidates"`
}

type VoteEvidenceInfo added in v0.7.0

type VoteEvidenceInfo struct {
	ProposalEvidenceInfo
	Vote DPOSProposalVoteInfo `json:"vote"`
}

type VoteInfo added in v0.3.0

type VoteInfo struct {
	Signer string `json:"signer"`
	Accept bool   `json:"accept"`
}

type VoteOutputInfo added in v0.2.2

type VoteOutputInfo struct {
	Version  byte              `json:"version"`
	Contents []VoteContentInfo `json:"contents"`
}

type WithdrawFromSideChainInfo added in v0.1.1

type WithdrawFromSideChainInfo struct {
	BlockHeight                uint32   `json:"blockheight"`
	GenesisBlockAddress        string   `json:"genesisblockaddress"`
	SideChainTransactionHashes []string `json:"sidechaintransactionhashes"`
}

type WithdrawInfo added in v0.8.0

type WithdrawInfo struct {
	Version                  byte   `json:"Version"`
	GenesisBlockAddress      string `json:"GenesisBlockAddress"`
	SideChainTransactionHash string `json:"SideChainTransactionHash"`
	TargetData               string `json:"TargetData"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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