types

package
v6.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeApproveShares          = "approve_shares"
	EventTypeTransferShares         = "transfer_shares"
	EventTypeGrantPrivilege         = "grant_privilege"
	EventTypeEditConsensusPubKey    = "edit_consensus_pubkey"
	EventTypeEditingConsensusPubKey = "editing_consensus_pubkey" //nolint:gosec
	EventTypeEditedConsensusPubKey  = "edited_consensus_pubkey"

	AttributeKeyOwner     = "owner"
	AttributeKeySpender   = "spender"
	AttributeKeyShares    = "shares"
	AttributeKeyAmount    = "amount"
	AttributeKeyFrom      = "from"
	AttributeKeyRecipient = "recipient"
	AttributeKeyTo        = "to"
	AttributeKeyPubKey    = "pubkey"
	AttributeResult       = "result"
)
View Source
const (
	TypeMsgGrantPrivilege      = "grant_privilege"
	TypeMsgEditConsensusPubKey = "edit_consensus_pubkey"
)
View Source
const GrantPrivilegeSignaturePrefix = "GrantPrivilege:"

Variables

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	AllowanceKey         = []byte{0x90}
	ValidatorOperatorKey = []byte{0x91}
	ConsensusPubKey      = []byte{0x92}
	ConsensusProcessKey  = []byte{0x93}
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var DisablePKBytes = [33]byte{
	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
	0xff,
}
View Source
var GrantExpirationTime = time.Unix(253402300799, 0)

GrantExpirationTime period ends at Max Time supported by Amino (Dec 31, 9999 - 23:59:59 GMT).

ModuleCdc is the codec for the module

Functions

func AddressFromConsensusProcessKey

func AddressFromConsensusProcessKey(key []byte) []byte

func AddressFromConsensusPubKey

func AddressFromConsensusPubKey(key []byte) []byte

func GetAllowanceKey

func GetAllowanceKey(valAddr sdk.ValAddress, owner, spender sdk.AccAddress) []byte

func GetConsensusProcessKey

func GetConsensusProcessKey(process CProcess, addr sdk.ValAddress) []byte

func GetConsensusPubKey

func GetConsensusPubKey(addr sdk.ValAddress) []byte

func GetValidatorOperatorKey

func GetValidatorOperatorKey(addr sdk.ValAddress) []byte

func GrantPrivilegeSignatureData

func GrantPrivilegeSignatureData(val, from, to []byte) []byte

func ProtoAnyToAccountPubKey

func ProtoAnyToAccountPubKey(any *codectypes.Any) (cryptotypes.PubKey, error)

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the client interfaces to protobuf Any.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers concrete types on the Amino codec

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func ValidateGenesis

func ValidateGenesis(data *GenesisState) error

ValidateGenesis validates the provided staking genesis state to ensure the expected invariants holds. (i.e. params in correct bounds, no duplicate validators)

func ValidateGenesisStateAllowances

func ValidateGenesisStateAllowances(allowances []Allowance) error

func ValidateGenesisStateValidators

func ValidateGenesisStateValidators(validators []stakingtypes.Validator) error

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	SetAccount(ctx sdk.Context, acc authtypes.AccountI)
}

type Allowance

type Allowance struct {
	// validator_address defines the validator address.
	ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
	// owner_address defines the owner address.
	OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
	// spender_address defines the spender address.
	SpenderAddress string `protobuf:"bytes,3,opt,name=spender_address,json=spenderAddress,proto3" json:"spender_address,omitempty"`
	// allowance defines the amount of shares.
	Allowance github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=allowance,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"allowance"`
}

Allowance defines the allowance of shares for a delegator.

func (*Allowance) Descriptor

func (*Allowance) Descriptor() ([]byte, []int)

func (*Allowance) GetOwnerAddress

func (m *Allowance) GetOwnerAddress() string

func (*Allowance) GetSpenderAddress

func (m *Allowance) GetSpenderAddress() string

func (*Allowance) GetValidatorAddress

func (m *Allowance) GetValidatorAddress() string

func (*Allowance) Marshal

func (m *Allowance) Marshal() (dAtA []byte, err error)

func (*Allowance) MarshalTo

func (m *Allowance) MarshalTo(dAtA []byte) (int, error)

func (*Allowance) MarshalToSizedBuffer

func (m *Allowance) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Allowance) ProtoMessage

func (*Allowance) ProtoMessage()

func (*Allowance) Reset

func (m *Allowance) Reset()

func (*Allowance) Size

func (m *Allowance) Size() (n int)

func (*Allowance) String

func (m *Allowance) String() string

func (*Allowance) Unmarshal

func (m *Allowance) Unmarshal(dAtA []byte) error

func (Allowance) Validate

func (a Allowance) Validate() error

func (*Allowance) XXX_DiscardUnknown

func (m *Allowance) XXX_DiscardUnknown()

func (*Allowance) XXX_Marshal

func (m *Allowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Allowance) XXX_Merge

func (m *Allowance) XXX_Merge(src proto.Message)

func (*Allowance) XXX_Size

func (m *Allowance) XXX_Size() int

func (*Allowance) XXX_Unmarshal

func (m *Allowance) XXX_Unmarshal(b []byte) error

type Allowances

type Allowances []Allowance

func (Allowances) Len

func (a Allowances) Len() int

func (Allowances) Less

func (a Allowances) Less(i, j int) bool

func (Allowances) Swap

func (a Allowances) Swap(i, j int)

type AuthzKeeper

type AuthzKeeper interface {
	SaveGrant(ctx sdk.Context, grantee, granter sdk.AccAddress, authorization authz.Authorization, expiration *time.Time) error
	DeleteGrant(ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccAddress, msgType string) error
	GetAuthorizations(ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccAddress) ([]authz.Authorization, error)
	GetAuthorization(ctx sdk.Context, grantee sdk.AccAddress, granter sdk.AccAddress, msgType string) (authz.Authorization, *time.Time)
}

type CProcess

type CProcess []byte
var (
	ProcessStart CProcess = []byte{0x1}
	ProcessEnd   CProcess = []byte{0x2}
)

type GenesisState

type GenesisState struct {
	// params defines all the paramaters of related to deposit.
	Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// last_total_power tracks the total amounts of bonded tokens recorded during
	// the previous end block.
	LastTotalPower github_com_cosmos_cosmos_sdk_types.Int `` /* 145-byte string literal not displayed */
	// last_validator_powers is a special index that provides a historical list
	// of the last-block's bonded validators.
	LastValidatorPowers []types.LastValidatorPower `protobuf:"bytes,3,rep,name=last_validator_powers,json=lastValidatorPowers,proto3" json:"last_validator_powers"`
	// delegations defines the validator set at genesis.
	Validators []types.Validator `protobuf:"bytes,4,rep,name=validators,proto3" json:"validators"`
	// delegations defines the delegations active at genesis.
	Delegations []types.Delegation `protobuf:"bytes,5,rep,name=delegations,proto3" json:"delegations"`
	// unbonding_delegations defines the unbonding delegations active at genesis.
	UnbondingDelegations []types.UnbondingDelegation `protobuf:"bytes,6,rep,name=unbonding_delegations,json=unbondingDelegations,proto3" json:"unbonding_delegations"`
	// redelegations defines the redelegations active at genesis.
	Redelegations []types.Redelegation `protobuf:"bytes,7,rep,name=redelegations,proto3" json:"redelegations"`
	Exported      bool                 `protobuf:"varint,8,opt,name=exported,proto3" json:"exported,omitempty"`
	// allowances defines the shares allowances active at genesis.
	Allowances []Allowance `protobuf:"bytes,9,rep,name=allowances,proto3" json:"allowances"`
}

GenesisState defines the staking module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState gets the raw genesis raw message for testing

func NewGenesisState

func NewGenesisState(params stakingtypes.Params, validators []stakingtypes.Validator, delegations []stakingtypes.Delegation) *GenesisState

NewGenesisState creates a new GenesisState instanc e

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetAllowances

func (m *GenesisState) GetAllowances() []Allowance

func (*GenesisState) GetDelegations

func (m *GenesisState) GetDelegations() []types.Delegation

func (*GenesisState) GetExported

func (m *GenesisState) GetExported() bool

func (*GenesisState) GetLastValidatorPowers

func (m *GenesisState) GetLastValidatorPowers() []types.LastValidatorPower

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() types.Params

func (*GenesisState) GetRedelegations

func (m *GenesisState) GetRedelegations() []types.Redelegation

func (*GenesisState) GetUnbondingDelegations

func (m *GenesisState) GetUnbondingDelegations() []types.UnbondingDelegation

func (*GenesisState) GetValidators

func (m *GenesisState) GetValidators() []types.Validator

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) UnpackInterfaces

func (g GenesisState) UnpackInterfaces(c codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// GrantPrivilege defines a method for granting privilege to a validator.
	GrantPrivilege(ctx context.Context, in *MsgGrantPrivilege, opts ...grpc.CallOption) (*MsgGrantPrivilegeResponse, error)
	// EditConsensusKey defines a method for editing consensus pubkey of a validator.
	EditConsensusPubKey(ctx context.Context, in *MsgEditConsensusPubKey, opts ...grpc.CallOption) (*MsgEditConsensusPubKeyResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgEditConsensusPubKey

type MsgEditConsensusPubKey struct {
	ValidatorAddress string     `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
	From             string     `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
	Pubkey           *types.Any `protobuf:"bytes,3,opt,name=pubkey,proto3" json:"pubkey,omitempty"`
}

func NewMsgEditConsensusPubKey

func NewMsgEditConsensusPubKey(val sdk.ValAddress, from sdk.AccAddress, pubKey cryptotypes.PubKey) (*MsgEditConsensusPubKey, error)

func (*MsgEditConsensusPubKey) Descriptor

func (*MsgEditConsensusPubKey) Descriptor() ([]byte, []int)

func (*MsgEditConsensusPubKey) GetFrom

func (m *MsgEditConsensusPubKey) GetFrom() string

func (*MsgEditConsensusPubKey) GetPubkey

func (m *MsgEditConsensusPubKey) GetPubkey() *types.Any

func (*MsgEditConsensusPubKey) GetSignBytes

func (m *MsgEditConsensusPubKey) GetSignBytes() []byte

func (*MsgEditConsensusPubKey) GetSigners

func (m *MsgEditConsensusPubKey) GetSigners() []sdk.AccAddress

func (*MsgEditConsensusPubKey) GetValidatorAddress

func (m *MsgEditConsensusPubKey) GetValidatorAddress() string

func (*MsgEditConsensusPubKey) Marshal

func (m *MsgEditConsensusPubKey) Marshal() (dAtA []byte, err error)

func (*MsgEditConsensusPubKey) MarshalTo

func (m *MsgEditConsensusPubKey) MarshalTo(dAtA []byte) (int, error)

func (*MsgEditConsensusPubKey) MarshalToSizedBuffer

func (m *MsgEditConsensusPubKey) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgEditConsensusPubKey) ProtoMessage

func (*MsgEditConsensusPubKey) ProtoMessage()

func (*MsgEditConsensusPubKey) Reset

func (m *MsgEditConsensusPubKey) Reset()

func (*MsgEditConsensusPubKey) Route

func (m *MsgEditConsensusPubKey) Route() string

func (*MsgEditConsensusPubKey) Size

func (m *MsgEditConsensusPubKey) Size() (n int)

func (*MsgEditConsensusPubKey) String

func (m *MsgEditConsensusPubKey) String() string

func (*MsgEditConsensusPubKey) Type

func (m *MsgEditConsensusPubKey) Type() string

func (*MsgEditConsensusPubKey) Unmarshal

func (m *MsgEditConsensusPubKey) Unmarshal(dAtA []byte) error

func (*MsgEditConsensusPubKey) UnpackInterfaces

func (m *MsgEditConsensusPubKey) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*MsgEditConsensusPubKey) ValidateBasic

func (m *MsgEditConsensusPubKey) ValidateBasic() error

func (*MsgEditConsensusPubKey) XXX_DiscardUnknown

func (m *MsgEditConsensusPubKey) XXX_DiscardUnknown()

func (*MsgEditConsensusPubKey) XXX_Marshal

func (m *MsgEditConsensusPubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgEditConsensusPubKey) XXX_Merge

func (m *MsgEditConsensusPubKey) XXX_Merge(src proto.Message)

func (*MsgEditConsensusPubKey) XXX_Size

func (m *MsgEditConsensusPubKey) XXX_Size() int

func (*MsgEditConsensusPubKey) XXX_Unmarshal

func (m *MsgEditConsensusPubKey) XXX_Unmarshal(b []byte) error

type MsgEditConsensusPubKeyResponse

type MsgEditConsensusPubKeyResponse struct {
}

func (*MsgEditConsensusPubKeyResponse) Descriptor

func (*MsgEditConsensusPubKeyResponse) Descriptor() ([]byte, []int)

func (*MsgEditConsensusPubKeyResponse) Marshal

func (m *MsgEditConsensusPubKeyResponse) Marshal() (dAtA []byte, err error)

func (*MsgEditConsensusPubKeyResponse) MarshalTo

func (m *MsgEditConsensusPubKeyResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgEditConsensusPubKeyResponse) MarshalToSizedBuffer

func (m *MsgEditConsensusPubKeyResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgEditConsensusPubKeyResponse) ProtoMessage

func (*MsgEditConsensusPubKeyResponse) ProtoMessage()

func (*MsgEditConsensusPubKeyResponse) Reset

func (m *MsgEditConsensusPubKeyResponse) Reset()

func (*MsgEditConsensusPubKeyResponse) Size

func (m *MsgEditConsensusPubKeyResponse) Size() (n int)

func (*MsgEditConsensusPubKeyResponse) String

func (*MsgEditConsensusPubKeyResponse) Unmarshal

func (m *MsgEditConsensusPubKeyResponse) Unmarshal(dAtA []byte) error

func (*MsgEditConsensusPubKeyResponse) XXX_DiscardUnknown

func (m *MsgEditConsensusPubKeyResponse) XXX_DiscardUnknown()

func (*MsgEditConsensusPubKeyResponse) XXX_Marshal

func (m *MsgEditConsensusPubKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgEditConsensusPubKeyResponse) XXX_Merge

func (m *MsgEditConsensusPubKeyResponse) XXX_Merge(src proto.Message)

func (*MsgEditConsensusPubKeyResponse) XXX_Size

func (m *MsgEditConsensusPubKeyResponse) XXX_Size() int

func (*MsgEditConsensusPubKeyResponse) XXX_Unmarshal

func (m *MsgEditConsensusPubKeyResponse) XXX_Unmarshal(b []byte) error

type MsgGrantPrivilege

type MsgGrantPrivilege struct {
	ValidatorAddress string     `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"`
	FromAddress      string     `protobuf:"bytes,2,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"`
	ToPubkey         *types.Any `protobuf:"bytes,3,opt,name=to_pubkey,json=toPubkey,proto3" json:"to_pubkey,omitempty"`
	Signature        string     `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
}

MsgGrantPrivilege defines the GrantPrivilege message.

func NewMsgGrantPrivilege

func NewMsgGrantPrivilege(val sdk.ValAddress, from sdk.AccAddress, pubKey cryptotypes.PubKey, signature string) (*MsgGrantPrivilege, error)

func (*MsgGrantPrivilege) Descriptor

func (*MsgGrantPrivilege) Descriptor() ([]byte, []int)

func (*MsgGrantPrivilege) GetFromAddress

func (m *MsgGrantPrivilege) GetFromAddress() string

func (*MsgGrantPrivilege) GetSignBytes

func (m *MsgGrantPrivilege) GetSignBytes() []byte

func (*MsgGrantPrivilege) GetSignature

func (m *MsgGrantPrivilege) GetSignature() string

func (*MsgGrantPrivilege) GetSigners

func (m *MsgGrantPrivilege) GetSigners() []sdk.AccAddress

func (*MsgGrantPrivilege) GetToPubkey

func (m *MsgGrantPrivilege) GetToPubkey() *types.Any

func (*MsgGrantPrivilege) GetValidatorAddress

func (m *MsgGrantPrivilege) GetValidatorAddress() string

func (*MsgGrantPrivilege) Marshal

func (m *MsgGrantPrivilege) Marshal() (dAtA []byte, err error)

func (*MsgGrantPrivilege) MarshalTo

func (m *MsgGrantPrivilege) MarshalTo(dAtA []byte) (int, error)

func (*MsgGrantPrivilege) MarshalToSizedBuffer

func (m *MsgGrantPrivilege) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgGrantPrivilege) ProtoMessage

func (*MsgGrantPrivilege) ProtoMessage()

func (*MsgGrantPrivilege) Reset

func (m *MsgGrantPrivilege) Reset()

func (*MsgGrantPrivilege) Route

func (m *MsgGrantPrivilege) Route() string

func (*MsgGrantPrivilege) Size

func (m *MsgGrantPrivilege) Size() (n int)

func (*MsgGrantPrivilege) String

func (m *MsgGrantPrivilege) String() string

func (*MsgGrantPrivilege) Type

func (m *MsgGrantPrivilege) Type() string

func (*MsgGrantPrivilege) Unmarshal

func (m *MsgGrantPrivilege) Unmarshal(dAtA []byte) error

func (*MsgGrantPrivilege) UnpackInterfaces

func (m *MsgGrantPrivilege) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces

func (*MsgGrantPrivilege) ValidateBasic

func (m *MsgGrantPrivilege) ValidateBasic() error

func (*MsgGrantPrivilege) XXX_DiscardUnknown

func (m *MsgGrantPrivilege) XXX_DiscardUnknown()

func (*MsgGrantPrivilege) XXX_Marshal

func (m *MsgGrantPrivilege) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgGrantPrivilege) XXX_Merge

func (m *MsgGrantPrivilege) XXX_Merge(src proto.Message)

func (*MsgGrantPrivilege) XXX_Size

func (m *MsgGrantPrivilege) XXX_Size() int

func (*MsgGrantPrivilege) XXX_Unmarshal

func (m *MsgGrantPrivilege) XXX_Unmarshal(b []byte) error

type MsgGrantPrivilegeResponse

type MsgGrantPrivilegeResponse struct {
}

func (*MsgGrantPrivilegeResponse) Descriptor

func (*MsgGrantPrivilegeResponse) Descriptor() ([]byte, []int)

func (*MsgGrantPrivilegeResponse) Marshal

func (m *MsgGrantPrivilegeResponse) Marshal() (dAtA []byte, err error)

func (*MsgGrantPrivilegeResponse) MarshalTo

func (m *MsgGrantPrivilegeResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgGrantPrivilegeResponse) MarshalToSizedBuffer

func (m *MsgGrantPrivilegeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgGrantPrivilegeResponse) ProtoMessage

func (*MsgGrantPrivilegeResponse) ProtoMessage()

func (*MsgGrantPrivilegeResponse) Reset

func (m *MsgGrantPrivilegeResponse) Reset()

func (*MsgGrantPrivilegeResponse) Size

func (m *MsgGrantPrivilegeResponse) Size() (n int)

func (*MsgGrantPrivilegeResponse) String

func (m *MsgGrantPrivilegeResponse) String() string

func (*MsgGrantPrivilegeResponse) Unmarshal

func (m *MsgGrantPrivilegeResponse) Unmarshal(dAtA []byte) error

func (*MsgGrantPrivilegeResponse) XXX_DiscardUnknown

func (m *MsgGrantPrivilegeResponse) XXX_DiscardUnknown()

func (*MsgGrantPrivilegeResponse) XXX_Marshal

func (m *MsgGrantPrivilegeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgGrantPrivilegeResponse) XXX_Merge

func (m *MsgGrantPrivilegeResponse) XXX_Merge(src proto.Message)

func (*MsgGrantPrivilegeResponse) XXX_Size

func (m *MsgGrantPrivilegeResponse) XXX_Size() int

func (*MsgGrantPrivilegeResponse) XXX_Unmarshal

func (m *MsgGrantPrivilegeResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// GrantPrivilege defines a method for granting privilege to a validator.
	GrantPrivilege(context.Context, *MsgGrantPrivilege) (*MsgGrantPrivilegeResponse, error)
	// EditConsensusKey defines a method for editing consensus pubkey of a validator.
	EditConsensusPubKey(context.Context, *MsgEditConsensusPubKey) (*MsgEditConsensusPubKeyResponse, error)
}

MsgServer is the server API for Msg service.

type SlashingKeeper

type SlashingKeeper interface {
	AddPubkey(ctx sdk.Context, pubkey cryptotypes.PubKey) error
	DeleteConsensusPubKey(ctx sdk.Context, consAddr sdk.ConsAddress)
	GetValidatorSigningInfo(ctx sdk.Context, consAddr sdk.ConsAddress) (info slashingtypes.ValidatorSigningInfo, found bool)
	SetValidatorSigningInfo(ctx sdk.Context, consAddr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo)
	DeleteValidatorSigningInfo(ctx sdk.Context, consAddr sdk.ConsAddress)
}

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) EditConsensusPubKey

func (*UnimplementedMsgServer) GrantPrivilege

Jump to

Keyboard shortcuts

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