Versions in this module Expand all Collapse all v1 v1.10.3 Dec 16, 2024 v1.10.2 Dec 15, 2024 Changes in this version + const APRHistoryLength + const BLSVerificationStr + const LockPeriodInEpoch + const LockPeriodInEpochV2 + const MaxBLSPerValidator + const MaxDetailsLength + const MaxIdentityLength + const MaxNameLength + const MaxSecurityContactLength + const MaxWebsiteLength + const SigningHistoryLength + const TenThousand + var ErrExcessiveBLSKeys = errors.New("more slot keys provided than allowed") + var ErrInvalidSelfDelegation = errors.New("self delegation can not be less than min_self_delegation") + var ErrInvalidSig = errors.New("invalid transaction v, r, s values") + var ErrInvalidStakingKind = errors.New("bad staking kind") + func MarshalValidator(validator Validator) ([]byte, error) + func RLPDecodeStakeMsg(payload []byte, d Directive) (interface{}, error) + func Sender(signer Signer, tx *StakingTransaction) (common.Address, error) + func UpdateValidatorFromEditMsg(validator *Validator, edit *EditValidator, epoch *big.Int) error + func VerifyBLSKey(pubKey *bls.SerializedPublicKey, pubKeySig *bls.SerializedSignature) error + func VerifyBLSKeys(pubKeys []bls.SerializedPublicKey, pubKeySigs []bls.SerializedSignature) error + type APREntry struct + Epoch *big.Int + Value numeric.Dec + type AccumulatedOverLifetime struct + APR numeric.Dec + BlockReward *big.Int + EpochAPRs []APREntry + EpochBlocks []EpochSigningEntry + Signing counters + type CollectRewards struct + DelegatorAddress common.Address + func (v CollectRewards) Copy() StakeMsg + func (v CollectRewards) Equals(s CollectRewards) bool + func (v CollectRewards) Type() Directive + type Commission struct + UpdateHeight *big.Int + type CommissionRates struct + MaxChangeRate numeric.Dec + MaxRate numeric.Dec + Rate numeric.Dec + func (cr CommissionRates) Copy() CommissionRates + type Computed struct + BlocksLeftInEpoch uint64 + IsBelowThreshold bool + Percentage numeric.Dec + Signed *big.Int + ToSign *big.Int + func NewComputed(signed, toSign *big.Int, blocksLeft uint64, percent numeric.Dec, ...) *Computed + func (c Computed) String() string + type CreateValidator struct + Amount *big.Int + MaxTotalDelegation *big.Int + MinSelfDelegation *big.Int + SlotKeySigs []bls.SerializedSignature + SlotPubKeys []bls.SerializedPublicKey + ValidatorAddress common.Address + func (v CreateValidator) Copy() StakeMsg + func (v CreateValidator) Type() Directive + type CurrentEpochPerformance struct + Block uint64 + CurrentSigningPercentage Computed + Epoch uint64 + type Delegate struct + Amount *big.Int + DelegatorAddress common.Address + ValidatorAddress common.Address + func (v Delegate) Copy() StakeMsg + func (v Delegate) Equals(s Delegate) bool + func (v Delegate) Type() Directive + type Delegation struct + Amount *big.Int + DelegatorAddress common.Address + Reward *big.Int + Undelegations Undelegations + func NewDelegation(delegatorAddr common.Address, amount *big.Int) Delegation + func SetDifference(xs, ys []Delegation) []Delegation + func (d *Delegation) DeleteEntry(epoch *big.Int) + func (d *Delegation) RemoveUnlockedUndelegations(curEpoch, lastEpochInCommittee *big.Int, lockPeriod int, noEarlyUnlock bool, ...) *big.Int + func (d *Delegation) TotalInUndelegation() *big.Int + func (d *Delegation) Undelegate(epoch *big.Int, amt *big.Int) error + func (d Delegation) Hash() common.Hash + func (d Delegation) MarshalJSON() ([]byte, error) + func (d Delegation) String() string + type DelegationIndex struct + BlockNum *big.Int + Index uint64 + ValidatorAddress common.Address + type DelegationIndexes []DelegationIndex + type Delegations []Delegation + func (d Delegations) String() string + type Description struct + Details string + Identity string + Name string + SecurityContact string + Website string + func UpdateDescription(d1, d2 Description) (Description, error) + func (d Description) EnsureLength() (Description, error) + type Directive byte + const DirectiveCollectRewards + const DirectiveCreateValidator + const DirectiveDelegate + const DirectiveEditValidator + const DirectiveUndelegate + func (d Directive) String() string + type EIP155Signer struct + func NewEIP155Signer(chainID *big.Int) EIP155Signer + func (s EIP155Signer) Equal(s2 Signer) bool + func (s EIP155Signer) Hash(tx *StakingTransaction) common.Hash + func (s EIP155Signer) Sender(tx *StakingTransaction) (common.Address, error) + func (s EIP155Signer) SignatureValues(tx *StakingTransaction, sig []byte) (R, S, V *big.Int, err error) + type EditValidator struct + CommissionRate *numeric.Dec + EPOSStatus effective.Eligibility + MaxTotalDelegation *big.Int + MinSelfDelegation *big.Int + SlotKeyToAdd *bls.SerializedPublicKey + SlotKeyToAddSig *bls.SerializedSignature + SlotKeyToRemove *bls.SerializedPublicKey + ValidatorAddress common.Address + func (v EditValidator) Copy() StakeMsg + func (v EditValidator) Type() Directive + type EpochSigningEntry struct + Blocks counters + Epoch *big.Int + type MigrationMsg struct + From common.Address + To common.Address + func (v MigrationMsg) Copy() MigrationMsg + func (v MigrationMsg) Equals(s MigrationMsg) bool + type Signer interface + Equal func(s Signer) bool + Hash func(tx *StakingTransaction) common.Hash + Sender func(tx *StakingTransaction) (common.Address, error) + SignatureValues func(tx *StakingTransaction, sig []byte) (r, s, v *big.Int, err error) + type StakeMsg interface + Copy func() StakeMsg + Type func() Directive + type StakeMsgFulfiller func() (Directive, interface{}) + type StakingTransaction struct + func NewStakingTransaction(nonce, gasLimit uint64, gasPrice *big.Int, f StakeMsgFulfiller) (*StakingTransaction, error) + func Sign(tx *StakingTransaction, s Signer, prv *ecdsa.PrivateKey) (*StakingTransaction, error) + func (tx *StakingTransaction) ChainID() *big.Int + func (tx *StakingTransaction) Copy() *StakingTransaction + func (tx *StakingTransaction) Cost() (*big.Int, error) + func (tx *StakingTransaction) Data() []byte + func (tx *StakingTransaction) DecodeRLP(s *rlp.Stream) error + func (tx *StakingTransaction) EncodeRLP(w io.Writer) error + func (tx *StakingTransaction) From() *atomic.Value + func (tx *StakingTransaction) GasLimit() uint64 + func (tx *StakingTransaction) GasPrice() *big.Int + func (tx *StakingTransaction) Hash() common.Hash + func (tx *StakingTransaction) IsEthCompatible() bool + func (tx *StakingTransaction) Nonce() uint64 + func (tx *StakingTransaction) Protected() bool + func (tx *StakingTransaction) RLPEncodeStakeMsg() (by []byte, err error) + func (tx *StakingTransaction) RawSignatureValues() (*big.Int, *big.Int, *big.Int) + func (tx *StakingTransaction) SenderAddress() (common.Address, error) + func (tx *StakingTransaction) SetRawSignature(v, r, s *big.Int) + func (tx *StakingTransaction) ShardID() uint32 + func (tx *StakingTransaction) Size() common.StorageSize + func (tx *StakingTransaction) StakingMessage() interface{} + func (tx *StakingTransaction) StakingType() Directive + func (tx *StakingTransaction) To() *common.Address + func (tx *StakingTransaction) ToShardID() uint32 + func (tx *StakingTransaction) Value() *big.Int + func (tx *StakingTransaction) WithSignature(signer Signer, sig []byte) (*StakingTransaction, error) + type StakingTransactions []*StakingTransaction + func (s StakingTransactions) GetRlp(i int) []byte + func (s StakingTransactions) Len() int + type Undelegate struct + Amount *big.Int + DelegatorAddress common.Address + ValidatorAddress common.Address + func (v Undelegate) Copy() StakeMsg + func (v Undelegate) Equals(s Undelegate) bool + func (v Undelegate) Type() Directive + type Undelegation struct + Amount *big.Int + Epoch *big.Int + type Undelegations []Undelegation + func (u Undelegations) String() string + type Validator struct + Address common.Address + CreationHeight *big.Int + LastEpochInCommittee *big.Int + MaxTotalDelegation *big.Int + MinSelfDelegation *big.Int + SlotPubKeys []bls.SerializedPublicKey + Status effective.Eligibility + func CreateValidatorFromNewMsg(val *CreateValidator, blockNum, epoch *big.Int) (*Validator, error) + func UnmarshalValidator(by []byte) (Validator, error) + func (v *Validator) SanityCheck() error + func (v Validator) String() string + type ValidatorRPCEnhanced struct + ActiveStatus string + BootedStatus *string + ComputedMetrics *ValidatorStats + CurrentlyInCommittee bool + EPoSStatus string + EPoSWinningStake *numeric.Dec + Lifetime *AccumulatedOverLifetime + Performance *CurrentEpochPerformance + TotalDelegated *big.Int + Wrapper ValidatorWrapper + type ValidatorSnapshot struct + Epoch *big.Int + Validator *ValidatorWrapper + func (snapshot ValidatorSnapshot) RawStakePerSlot() numeric.Dec + type ValidatorSnapshotReader interface + ReadValidatorSnapshotAtEpoch func(epoch *big.Int, addr common.Address) (*ValidatorSnapshot, error) + type ValidatorStats struct + APRs []APREntry + BootedStatus effective.BootedStatus + MetricsPerShard []VoteWithCurrentEpochEarning + TotalEffectiveStake numeric.Dec + func NewEmptyStats() *ValidatorStats + func (s ValidatorStats) String() string + type ValidatorWrapper struct + BlockReward *big.Int + Counters counters + Delegations Delegations + func (w *ValidatorWrapper) SanityCheck() error + func (w *ValidatorWrapper) TotalDelegation() *big.Int + func (w ValidatorWrapper) MarshalJSON() ([]byte, error) + func (w ValidatorWrapper) String() string + type VoteWithCurrentEpochEarning struct + Earned *big.Int + Vote votepower.VoteOnSubcomittee