slashing

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 12 Imported by: 0

README

Slashing module

Usage

(Tx) Unjail validator
txbytes, err := xplac.Unjail().CreateAndSignTx()
res, err := xplac.Broadcast(txbytes)
(Query) slashing params
res, err := xplac.SlashingParams().Query()
(Query) slashing signing infos
// Query a validator's signing information by using public key
signingInfoMsg := types.SigningInfoMsg{
    ConsPubKey: `{"@type": "/cosmos.crypto.ed25519.PubKey","key": "6RBPm24ckoWhRt8mArcSCnEKvt0FMGvcaMwchfZ3ue8="}`,
}

// Query a validator's signing information by using bech32 address
signingInfoMsg := types.SigningInfoMsg{
    ConsAddr: "xplavalcons1v9jz99h7dsf50fgwr3wr2v8d73dfc3m8qvuaah",
}

res, err := xplac.SigningInfos(signingInfoMsg).Query()

// Query signing information of all validators
res, err := xplac.SigningInfos().Query()

Documentation

Index

Constants

View Source
const (
	SlashingModule                     = "slashing"
	SlahsingUnjailMsgType              = "unjail"
	SlashingQuerySlashingParamsMsgType = "query-slashing-params"
	SlashingQuerySigningInfosMsgType   = "query-sining-infos"
	SlashingQuerySigningInfoMsgType    = "query-sining-info"
)

Variables

This section is empty.

Functions

func MakeQuerySigningInfoMsg

func MakeQuerySigningInfoMsg(signingInfoMsg types.SigningInfoMsg, xplacEncodingConfig params.EncodingConfig) (slashingtypes.QuerySigningInfoRequest, error)

(Query) make msg - signing info

func MakeQuerySigningInfosMsg

func MakeQuerySigningInfosMsg() (slashingtypes.QuerySigningInfosRequest, error)

(Query) make msg - signing infos

func MakeQuerySlashingParamsMsg

func MakeQuerySlashingParamsMsg() (slashingtypes.QueryParamsRequest, error)

(Query) make msg - slahsing params

func MakeUnjailMsg

func MakeUnjailMsg(addr sdk.AccAddress) (slashingtypes.MsgUnjail, error)

(Tx) make msg - unjail

func NewCoreModule added in v0.1.2

func NewCoreModule() core.CoreModule

func QuerySlashing

func QuerySlashing(i core.QueryClient) (string, error)

Query client for slashing module.

Types

type SlashingExternal added in v0.1.2

type SlashingExternal struct {
	Xplac provider.XplaClient
}

func NewSlashingExternal added in v0.1.2

func NewSlashingExternal(xplac provider.XplaClient) (e SlashingExternal)

func (SlashingExternal) SigningInfos added in v0.1.2

func (e SlashingExternal) SigningInfos(signingInfoMsg ...types.SigningInfoMsg) provider.XplaClient

Query a validator's signing information or signing information of all validators.

func (SlashingExternal) SlashingParams added in v0.1.2

func (e SlashingExternal) SlashingParams() provider.XplaClient

Query the current slashing parameters.

func (SlashingExternal) Unjail added in v0.1.2

Unjail validator previously jailed for downtime.

Jump to

Keyboard shortcuts

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