PoS

Classes

PoS

Class contains pos RPC methods For the detail meaning of fields, please refer to the PoS RPC document:

Typedefs

PivotDecision : ObjectPoSStatus : Object

PoS status

VotePowerState : ObjectPoSAccountStatus : ObjectPoSAccount : ObjectPoSTransaction : ObjectSignature : ObjectPoSBlock : ObjectCommitteeNode : ObjectElection : ObjectCurrentCommittee : ObjectPoSCommittee : ObjectPoSReward : ObjectPoSEpochRewards : Object

PoS

Class contains pos RPC methods For the detail meaning of fields, please refer to the PoS RPC document:

Kind: global class

new PoS(conflux)

Create PoS instance

Returns: PoS - The PoS instance

Param
Type
Description

conflux

Conflux

The Conflux object

PivotDecision : Object

Kind: global typedef Properties

Name
Type

height

number

blockHash

string

PoSStatus : Object

PoS status

Kind: global typedef Properties

Name
Type

latestCommitted

number

epoch

number

latestVoted

number

latestTxNumber

number

pivotDecision

VotePowerState : Object

Kind: global typedef Properties

Name
Type

endBlockNumber

number

power

number

PoSAccountStatus : Object

Kind: global typedef Properties

Name
Type

availableVotes

number

forfeited

number

locked

number

unlocked

number

forceRetired

number | null

PoSAccount : Object

Kind: global typedef Properties

Name
Type

blockNumber

number

PoSTransaction : Object

Kind: global typedef Properties

Name
Type

hash

string

blockHash

string

from

string

status

string

type

string

number

number

timestamp

number | null

blockNumber

number | null

payload

*

Signature : Object

Kind: global typedef Properties

Name
Type

votes

number

account

string

PoSBlock : Object

Kind: global typedef Properties

Name
Type

epoch

number

height

number

pivotDecision

round

number

timestamp

number

lastTxNumber

number

signatures

CommitteeNode : Object

Kind: global typedef Properties

Name
Type

votingPower

number

address

string

Election : Object

Kind: global typedef Properties

Name
Type

isFinalized

boolean

startBlockNumber

number

topElectingNodes

CurrentCommittee : Object

Kind: global typedef Properties

Name
Type

epochNumber

number

quorumVotingPower

number

totalVotingPower

number

PoSCommittee : Object

Kind: global typedef Properties

Name
Type

currentCommittee

PoSReward : Object

Kind: global typedef Properties

Name
Type

reward

number

posAddress

string

powAddress

string

PoSEpochRewards : Object

Kind: global typedef Properties

Name
Type

powEpochHash

string

accountRewards

.getStatus ⇒ Promise.<PoSStatus>

Kind: instance member Returns: Promise.<PoSStatus> - PoS status object Example

.getAccount ⇒ Promise.<PoSAccount>

Kind: instance member

Param
Type
Description

account

Hash

Account address

[blockNumber]

number | hex

Optional block number

Example

.getBlockByHash ⇒ Promise.<PoSBlock>

Kind: instance member

Param
Type
Description

hash

string

The hash of PoS block

Example

.getBlockByNumber ⇒ Promise.<PoSBlock>

Kind: instance member

Param
Type
Description

blockNumber

number | hex

The number of PoS block

Example

.getCommittee ⇒ Promise.<PoSCommittee>

Kind: instance member

Param
Type
Description

[blockNumber]

number | hex

Optional block number

Example

.getTransactionByNumber ⇒ Promise.<PoSTransaction>

Kind: instance member

Param
Type
Description

txNumber

number | string

The number of transaction

Example

.getRewardsByEpoch(epoch) ⇒ Promise.<PoSEpochRewards>

Kind: instance function

Param
Type
Description

epoch

number | string

A PoS epoch number

Example

Last updated

Was this helpful?