cmd

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: GPL-3.0, GPL-3.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccountSet   []cli.Command
	ValidatorSet []cli.Command
	VoterSet     []cli.Command
	ToolSet      []cli.Command
)

Functions

func ConvertToFraction

func ConvertToFraction(num interface{}) string

func MigrateFlags

func MigrateFlags(hdl func(ctx *cli.Context, cfg *define.Config) error) func(*cli.Context) error

func ToMapF

func ToMapF(val *big.Float) *big.Float

func ToMapI

func ToMapI(val *big.Int) *big.Float

Types

type Account

type Account struct {
	// contains filtered or unexported fields
}

func NewAccount

func NewAccount() *Account

func (*Account) CreateAccount

func (a *Account) CreateAccount(_ *cli.Context, cfg *define.Config) error

func (*Account) GetAccountMetadataURL

func (a *Account) GetAccountMetadataURL(_ *cli.Context, cfg *define.Config) error

func (*Account) GetAccountName

func (a *Account) GetAccountName(_ *cli.Context, cfg *define.Config) error

func (*Account) GetAccountNonvotingLockedGold

func (a *Account) GetAccountNonvotingLockedGold(_ *cli.Context, cfg *define.Config) error

func (*Account) GetAccountTotalLockedGold

func (a *Account) GetAccountTotalLockedGold(_ *cli.Context, cfg *define.Config) error

func (*Account) GetActiveVotesForValidatorByAccount

func (a *Account) GetActiveVotesForValidatorByAccount(_ *cli.Context, cfg *define.Config) error

func (*Account) GetPendingVotesForValidatorByAccount

func (a *Account) GetPendingVotesForValidatorByAccount(_ *cli.Context, cfg *define.Config) error

func (*Account) GetValidatorsVotedForByAccount

func (a *Account) GetValidatorsVotedForByAccount(_ *cli.Context, cfg *define.Config) error

func (*Account) SetAccountMetadataURL

func (a *Account) SetAccountMetadataURL(_ *cli.Context, cfg *define.Config) error

func (*Account) SetAccountName

func (a *Account) SetAccountName(_ *cli.Context, cfg *define.Config) error

func (*Account) SignerToAccount

func (a *Account) SignerToAccount(_ *cli.Context, cfg *define.Config) error

SignerToAccount : Query the account of a target signer

type Proof

type Proof struct {
	PublicKey      []byte
	BLSPublicKey   [128]byte
	BLSG1PublicKey [64]byte
	BLSProof       []byte
}

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

func NewTool

func NewTool() *Tool

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator() *Validator

func (*Validator) AuthorizeValidatorSigner

func (v *Validator) AuthorizeValidatorSigner(_ *cli.Context, cfg *define.Config) error

AuthorizeValidatorSigner note:account function before become to be a validator signer sign account need signer private

func (*Validator) AuthorizeValidatorSignerBySignature

func (v *Validator) AuthorizeValidatorSignerBySignature(_ *cli.Context, cfg *define.Config) error

func (*Validator) DeregisterValidator

func (v *Validator) DeregisterValidator(_ *cli.Context, cfg *define.Config) error

func (*Validator) GenerateSignerProof

func (v *Validator) GenerateSignerProof(_ *cli.Context, cfg *define.Config) error

func (*Validator) LockedMAP

func (v *Validator) LockedMAP(_ *cli.Context, cfg *define.Config) error

func (*Validator) MakeBLSProofOfPossessionFromsigner

func (v *Validator) MakeBLSProofOfPossessionFromsigner(_ *cli.Context, cfg *define.Config) error

func (*Validator) MakeECDSASignatureFromSigner

func (v *Validator) MakeECDSASignatureFromSigner(_ *cli.Context, cfg *define.Config) error

func (*Validator) QuicklyRegisterValidator

func (v *Validator) QuicklyRegisterValidator(ctx *cli.Context, cfg *define.Config) error

func (*Validator) RegisterValidator

func (v *Validator) RegisterValidator(ctx *cli.Context, cfg *define.Config) error

func (*Validator) RegisterValidatorByProof

func (v *Validator) RegisterValidatorByProof(_ *cli.Context, cfg *define.Config) error

func (*Validator) RevertRegisterValidator

func (v *Validator) RevertRegisterValidator(_ *cli.Context, cfg *define.Config) error

type Voter

type Voter struct {
	// contains filtered or unexported fields
}

func NewVoter

func NewVoter() *Voter

func (*Voter) Activate

func (v *Voter) Activate(_ *cli.Context, cfg *define.Config) error

func (*Voter) GetActiveVotesForValidator

func (v *Voter) GetActiveVotesForValidator(_ *cli.Context, cfg *define.Config) error

func (*Voter) GetIndex

func (v *Voter) GetIndex(target common.Address, list []common.Address) (*big.Int, error)

func (*Voter) GetPendingInfoForValidator

func (v *Voter) GetPendingInfoForValidator(_ *cli.Context, cfg *define.Config) error

func (*Voter) GetPendingVotersForValidator

func (v *Voter) GetPendingVotersForValidator(_ *cli.Context, cfg *define.Config) error

func (*Voter) GetRegisteredValidatorSigners

func (v *Voter) GetRegisteredValidatorSigners(_ *cli.Context, cfg *define.Config) error

func (*Voter) GetRewardInfo

func (v *Voter) GetRewardInfo(_ *cli.Context, cfg *define.Config) error

func (*Voter) GetTotalVotesForEligibleValidators

func (v *Voter) GetTotalVotesForEligibleValidators(_ *cli.Context, cfg *define.Config) error

func (*Voter) GetValidator

func (v *Voter) GetValidator(_ *cli.Context, cfg *define.Config) error

func (*Voter) LockedMAP

func (v *Voter) LockedMAP(_ *cli.Context, cfg *define.Config) error

func (*Voter) QuicklyVote

func (v *Voter) QuicklyVote(ctx *cli.Context, cfg *define.Config) error

func (*Voter) RelockMAP

func (v *Voter) RelockMAP(_ *cli.Context, cfg *define.Config) error

func (*Voter) RevokeActive

func (v *Voter) RevokeActive(_ *cli.Context, cfg *define.Config) error

func (*Voter) RevokePending

func (v *Voter) RevokePending(_ *cli.Context, cfg *define.Config) error

func (*Voter) UnlockedMAP

func (v *Voter) UnlockedMAP(_ *cli.Context, cfg *define.Config) error

func (*Voter) Vote

func (v *Voter) Vote(_ *cli.Context, cfg *define.Config) error

func (*Voter) Withdraw

func (v *Voter) Withdraw(_ *cli.Context, cfg *define.Config) error

Jump to

Keyboard shortcuts

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