Documentation
¶
Index ¶
- type Account
- type Address
- type Block
- type BlockNumber
- type CommitteeState
- type ConflictSignature
- type Decision
- type DisputePayload
- type ElectionPayload
- type EpochReward
- type NodeLockStatus
- type NodeVotingPower
- type PivotBlockDecision
- type RegisterPayload
- type RetirePayload
- type Reward
- type RpcCommittee
- type RpcTermData
- type Signature
- type Status
- type Transaction
- type TransactionPayload
- type UpdateVotingPowerPayload
- type VotePowerState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Address Address `json:"address"` BlockNumber hexutil.Uint64 `json:"blockNumber"` Status NodeLockStatus `json:"status"` }
type Block ¶
type Block struct { Hash common.Hash `json:"hash"` Height hexutil.Uint64 `json:"height"` Epoch hexutil.Uint64 `json:"epoch"` Round hexutil.Uint64 `json:"round"` NextTxNumber hexutil.Uint64 `json:"nextTxNumber"` Miner *Address `json:"miner"` ParentHash common.Hash `json:"parentHash"` Timestamp hexutil.Uint64 `json:"timestamp"` PivotDecision *hexutil.Uint64 `json:"pivotDecision"` // Transactions BlockTransactions `json:"transactions"` Signatures []Signature `json:"signatures"` }
type BlockNumber ¶
type BlockNumber struct {
// contains filtered or unexported fields
}
var ( BlockEarliest *BlockNumber = &BlockNumber{"earliest", 0} BlockLatestCommitted *BlockNumber = &BlockNumber{"latest_committed", 0} BlockLatestVoted *BlockNumber = &BlockNumber{"latest_voted", 0} )
func NewBlockNumber ¶
func NewBlockNumber(number uint64) BlockNumber
func (BlockNumber) MarshalText ¶
func (e BlockNumber) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface.
func (*BlockNumber) String ¶
func (e *BlockNumber) String() string
String implements the fmt.Stringer interface
func (*BlockNumber) UnmarshalJSON ¶
func (e *BlockNumber) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
type CommitteeState ¶
type CommitteeState struct { CurrentCommittee RpcCommittee `json:"currentCommittee"` Elections []RpcTermData `json:"elections"` }
type ConflictSignature ¶
type DisputePayload ¶
type DisputePayload struct { Address Address `json:"address"` BlsPubKey string `json:"blsPubKey"` VrfPubKey string `json:"vrfPubKey"` ConflictingVotes ConflictSignature `json:"conflictingVotes"` }
type ElectionPayload ¶
type EpochReward ¶
type NodeLockStatus ¶
type NodeLockStatus struct { InQueue []VotePowerState `json:"inQueue"` Locked hexutil.Uint64 `json:"locked"` OutQueue []VotePowerState `json:"outQueue"` Unlocked hexutil.Uint64 `json:"unlocked"` // Equals to the summation of in_queue + locked AvailableVotes hexutil.Uint64 `json:"availableVotes"` ForceRetired *hexutil.Uint64 `json:"forceRetired"` // If the staking is forfeited, the unlocked votes before forfeiting is // exempted. Forfeited hexutil.Uint64 `json:"forfeited"` }
type NodeVotingPower ¶
type PivotBlockDecision ¶
type RegisterPayload ¶
type RetirePayload ¶
type Reward ¶
type Reward struct { PosAddress Address `json:"posAddress"` PowAddress cfxaddress.Address `json:"powAddress"` Reward hexutil.Big `json:"reward"` }
type RpcCommittee ¶
type RpcTermData ¶
type RpcTermData struct { StartBlockNumber hexutil.Uint64 `json:"startBlockNumber"` IsFinalized bool `json:"isFinalized"` TopElectingNodes []NodeVotingPower `json:"topElectingNodes"` }
type Transaction ¶
type Transaction struct { Hash common.Hash `json:"hash"` From Address `json:"from"` BlockHash *common.Hash `json:"blockHash"` BlockNumber *hexutil.Uint64 `json:"blockNumber"` Timestamp *hexutil.Uint64 `json:"timestamp"` Number hexutil.Uint64 `json:"number"` Payload *TransactionPayload `json:"payload"` Status *string `json:"status"` Type string `json:"type"` }
func (*Transaction) UnmarshalJSON ¶
func (b *Transaction) UnmarshalJSON(data []byte) error
type TransactionPayload ¶
type TransactionPayload struct { ElectionPayload RetirePayload RegisterPayload UpdateVotingPowerPayload PivotBlockDecision DisputePayload // contains filtered or unexported fields }
func (TransactionPayload) MarshalJSON ¶
func (b TransactionPayload) MarshalJSON() ([]byte, error)
func (*TransactionPayload) SetTransactionType ¶
func (t *TransactionPayload) SetTransactionType(txType string)
func (*TransactionPayload) UnmarshalJSON ¶
func (b *TransactionPayload) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.