Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ActiveCondition(validator stakingtypes.Validator, whitelisted bool, tombstoned bool) bool
- func DeductFeeRate(input sdk.Dec, feeRate sdk.Dec) (feeDeductedOutput sdk.Dec)
- func DivideByCurrentWeight(lvs LiquidValidators, input sdk.Dec, totalLiquidTokens math.Int, ...) (outputs []sdk.Dec, crumb sdk.Dec)
- func DivideByWeight(avs ActiveLiquidValidators, input math.Int, ...) (outputs []math.Int, crumb math.Int)
- func GetLiquidValidatorKey(operatorAddr sdk.ValAddress) []byte
- func MustMarshalLiquidValidator(cdc codec.BinaryCodec, val *LiquidValidator) []byte
- func NativeTokenToStkXPRT(nativeTokenAmount, StkxprtTotalSupplyAmount math.Int, netAmount sdk.Dec) (stkXPRTAmount math.Int)
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func StkXPRTToNativeToken(stkXPRTAmount, StkxprtTotalSupplyAmount math.Int, netAmount sdk.Dec) (nativeTokenAmount sdk.Dec)
- func ValidateGenesis(data GenesisState) error
- type AccountKeeper
- type ActiveLiquidValidators
- type BankKeeper
- type DistrKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type LiquidValidator
- func (*LiquidValidator) Descriptor() ([]byte, []int)
- func (v LiquidValidator) GetDelShares(ctx sdk.Context, sk StakingKeeper) sdk.Dec
- func (v LiquidValidator) GetLiquidTokens(ctx sdk.Context, sk StakingKeeper, onlyBonded bool) math.Int
- func (v LiquidValidator) GetOperator() sdk.ValAddress
- func (v LiquidValidator) GetStatus(activeCondition bool) ValidatorStatus
- func (v LiquidValidator) GetWeight(whitelistedValsMap WhitelistedValsMap, active bool) math.Int
- func (m *LiquidValidator) Marshal() (dAtA []byte, err error)
- func (m *LiquidValidator) MarshalTo(dAtA []byte) (int, error)
- func (m *LiquidValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LiquidValidator) ProtoMessage()
- func (m *LiquidValidator) Reset()
- func (m *LiquidValidator) Size() (n int)
- func (m *LiquidValidator) String() string
- func (m *LiquidValidator) Unmarshal(dAtA []byte) error
- func (v LiquidValidator) Validate() error
- func (m *LiquidValidator) XXX_DiscardUnknown()
- func (m *LiquidValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LiquidValidator) XXX_Merge(src proto.Message)
- func (m *LiquidValidator) XXX_Size() int
- func (m *LiquidValidator) XXX_Unmarshal(b []byte) error
- type LiquidValidatorState
- func (*LiquidValidatorState) Descriptor() ([]byte, []int)
- func (m *LiquidValidatorState) Marshal() (dAtA []byte, err error)
- func (m *LiquidValidatorState) MarshalTo(dAtA []byte) (int, error)
- func (m *LiquidValidatorState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*LiquidValidatorState) ProtoMessage()
- func (m *LiquidValidatorState) Reset()
- func (m *LiquidValidatorState) Size() (n int)
- func (m *LiquidValidatorState) String() string
- func (m *LiquidValidatorState) Unmarshal(dAtA []byte) error
- func (m *LiquidValidatorState) XXX_DiscardUnknown()
- func (m *LiquidValidatorState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *LiquidValidatorState) XXX_Merge(src proto.Message)
- func (m *LiquidValidatorState) XXX_Size() int
- func (m *LiquidValidatorState) XXX_Unmarshal(b []byte) error
- type LiquidValidatorStates
- type LiquidValidators
- func (vs LiquidValidators) Len() int
- func (vs LiquidValidators) Map() map[string]struct{}
- func (vs LiquidValidators) MinMaxGap(targetMap, liquidTokenMap map[string]math.Int) (minGapVal LiquidValidator, maxGapVal LiquidValidator, amountNeeded math.Int, ...)
- func (vs LiquidValidators) TotalLiquidTokens(ctx sdk.Context, sk StakingKeeper, onlyBonded bool) (math.Int, map[string]math.Int)
- type MsgClient
- type MsgLiquidStake
- func (*MsgLiquidStake) Descriptor() ([]byte, []int)
- func (m *MsgLiquidStake) GetDelegator() sdk.AccAddress
- func (m *MsgLiquidStake) GetSignBytes() []byte
- func (m *MsgLiquidStake) GetSigners() []sdk.AccAddress
- func (m *MsgLiquidStake) Marshal() (dAtA []byte, err error)
- func (m *MsgLiquidStake) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgLiquidStake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgLiquidStake) ProtoMessage()
- func (m *MsgLiquidStake) Reset()
- func (m *MsgLiquidStake) Route() string
- func (m *MsgLiquidStake) Size() (n int)
- func (m *MsgLiquidStake) String() string
- func (m *MsgLiquidStake) Type() string
- func (m *MsgLiquidStake) Unmarshal(dAtA []byte) error
- func (m *MsgLiquidStake) ValidateBasic() error
- func (m *MsgLiquidStake) XXX_DiscardUnknown()
- func (m *MsgLiquidStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgLiquidStake) XXX_Merge(src proto.Message)
- func (m *MsgLiquidStake) XXX_Size() int
- func (m *MsgLiquidStake) XXX_Unmarshal(b []byte) error
- type MsgLiquidStakeResponse
- func (*MsgLiquidStakeResponse) Descriptor() ([]byte, []int)
- func (m *MsgLiquidStakeResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgLiquidStakeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgLiquidStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgLiquidStakeResponse) ProtoMessage()
- func (m *MsgLiquidStakeResponse) Reset()
- func (m *MsgLiquidStakeResponse) Size() (n int)
- func (m *MsgLiquidStakeResponse) String() string
- func (m *MsgLiquidStakeResponse) Unmarshal(dAtA []byte) error
- func (m *MsgLiquidStakeResponse) XXX_DiscardUnknown()
- func (m *MsgLiquidStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgLiquidStakeResponse) XXX_Merge(src proto.Message)
- func (m *MsgLiquidStakeResponse) XXX_Size() int
- func (m *MsgLiquidStakeResponse) XXX_Unmarshal(b []byte) error
- type MsgLiquidUnstake
- func (*MsgLiquidUnstake) Descriptor() ([]byte, []int)
- func (m *MsgLiquidUnstake) GetDelegator() sdk.AccAddress
- func (m *MsgLiquidUnstake) GetSignBytes() []byte
- func (m *MsgLiquidUnstake) GetSigners() []sdk.AccAddress
- func (m *MsgLiquidUnstake) Marshal() (dAtA []byte, err error)
- func (m *MsgLiquidUnstake) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgLiquidUnstake) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgLiquidUnstake) ProtoMessage()
- func (m *MsgLiquidUnstake) Reset()
- func (m *MsgLiquidUnstake) Route() string
- func (m *MsgLiquidUnstake) Size() (n int)
- func (m *MsgLiquidUnstake) String() string
- func (m *MsgLiquidUnstake) Type() string
- func (m *MsgLiquidUnstake) Unmarshal(dAtA []byte) error
- func (m *MsgLiquidUnstake) ValidateBasic() error
- func (m *MsgLiquidUnstake) XXX_DiscardUnknown()
- func (m *MsgLiquidUnstake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgLiquidUnstake) XXX_Merge(src proto.Message)
- func (m *MsgLiquidUnstake) XXX_Size() int
- func (m *MsgLiquidUnstake) XXX_Unmarshal(b []byte) error
- type MsgLiquidUnstakeResponse
- func (*MsgLiquidUnstakeResponse) Descriptor() ([]byte, []int)
- func (m *MsgLiquidUnstakeResponse) GetCompletionTime() time.Time
- func (m *MsgLiquidUnstakeResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgLiquidUnstakeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgLiquidUnstakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgLiquidUnstakeResponse) ProtoMessage()
- func (m *MsgLiquidUnstakeResponse) Reset()
- func (m *MsgLiquidUnstakeResponse) Size() (n int)
- func (m *MsgLiquidUnstakeResponse) String() string
- func (m *MsgLiquidUnstakeResponse) Unmarshal(dAtA []byte) error
- func (m *MsgLiquidUnstakeResponse) XXX_DiscardUnknown()
- func (m *MsgLiquidUnstakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgLiquidUnstakeResponse) XXX_Merge(src proto.Message)
- func (m *MsgLiquidUnstakeResponse) XXX_Size() int
- func (m *MsgLiquidUnstakeResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type MsgStakeToLP
- func (*MsgStakeToLP) Descriptor() ([]byte, []int)
- func (m *MsgStakeToLP) GetDelegator() sdk.AccAddress
- func (m *MsgStakeToLP) GetSignBytes() []byte
- func (m *MsgStakeToLP) GetSigners() []sdk.AccAddress
- func (m *MsgStakeToLP) GetValidator() sdk.ValAddress
- func (m *MsgStakeToLP) Marshal() (dAtA []byte, err error)
- func (m *MsgStakeToLP) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgStakeToLP) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgStakeToLP) ProtoMessage()
- func (m *MsgStakeToLP) Reset()
- func (m *MsgStakeToLP) Route() string
- func (m *MsgStakeToLP) Size() (n int)
- func (m *MsgStakeToLP) String() string
- func (m *MsgStakeToLP) Type() string
- func (m *MsgStakeToLP) Unmarshal(dAtA []byte) error
- func (m *MsgStakeToLP) ValidateBasic() error
- func (m *MsgStakeToLP) XXX_DiscardUnknown()
- func (m *MsgStakeToLP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgStakeToLP) XXX_Merge(src proto.Message)
- func (m *MsgStakeToLP) XXX_Size() int
- func (m *MsgStakeToLP) XXX_Unmarshal(b []byte) error
- type MsgStakeToLPResponse
- func (*MsgStakeToLPResponse) Descriptor() ([]byte, []int)
- func (m *MsgStakeToLPResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgStakeToLPResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgStakeToLPResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgStakeToLPResponse) ProtoMessage()
- func (m *MsgStakeToLPResponse) Reset()
- func (m *MsgStakeToLPResponse) Size() (n int)
- func (m *MsgStakeToLPResponse) String() string
- func (m *MsgStakeToLPResponse) Unmarshal(dAtA []byte) error
- func (m *MsgStakeToLPResponse) XXX_DiscardUnknown()
- func (m *MsgStakeToLPResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgStakeToLPResponse) XXX_Merge(src proto.Message)
- func (m *MsgStakeToLPResponse) XXX_Size() int
- func (m *MsgStakeToLPResponse) XXX_Unmarshal(b []byte) error
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetSignBytes() []byte
- func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Route() string
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Type() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParams) ValidateBasic() error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
- type NetAmountState
- func (nas NetAmountState) CalcMintRate() sdk.Dec
- func (nas NetAmountState) CalcNetAmount() sdk.Dec
- func (*NetAmountState) Descriptor() ([]byte, []int)
- func (m *NetAmountState) Marshal() (dAtA []byte, err error)
- func (m *NetAmountState) MarshalTo(dAtA []byte) (int, error)
- func (m *NetAmountState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*NetAmountState) ProtoMessage()
- func (m *NetAmountState) Reset()
- func (m *NetAmountState) Size() (n int)
- func (m *NetAmountState) String() string
- func (m *NetAmountState) Unmarshal(dAtA []byte) error
- func (m *NetAmountState) XXX_DiscardUnknown()
- func (m *NetAmountState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NetAmountState) XXX_Merge(src proto.Message)
- func (m *NetAmountState) XXX_Size() int
- func (m *NetAmountState) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (p Params) WhitelistedValsMap() WhitelistedValsMap
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryLiquidValidatorsRequest
- func (*QueryLiquidValidatorsRequest) Descriptor() ([]byte, []int)
- func (m *QueryLiquidValidatorsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryLiquidValidatorsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryLiquidValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryLiquidValidatorsRequest) ProtoMessage()
- func (m *QueryLiquidValidatorsRequest) Reset()
- func (m *QueryLiquidValidatorsRequest) Size() (n int)
- func (m *QueryLiquidValidatorsRequest) String() string
- func (m *QueryLiquidValidatorsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryLiquidValidatorsRequest) XXX_DiscardUnknown()
- func (m *QueryLiquidValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryLiquidValidatorsRequest) XXX_Merge(src proto.Message)
- func (m *QueryLiquidValidatorsRequest) XXX_Size() int
- func (m *QueryLiquidValidatorsRequest) XXX_Unmarshal(b []byte) error
- type QueryLiquidValidatorsResponse
- func (*QueryLiquidValidatorsResponse) Descriptor() ([]byte, []int)
- func (m *QueryLiquidValidatorsResponse) GetLiquidValidators() []LiquidValidatorState
- func (m *QueryLiquidValidatorsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryLiquidValidatorsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryLiquidValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryLiquidValidatorsResponse) ProtoMessage()
- func (m *QueryLiquidValidatorsResponse) Reset()
- func (m *QueryLiquidValidatorsResponse) Size() (n int)
- func (m *QueryLiquidValidatorsResponse) String() string
- func (m *QueryLiquidValidatorsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryLiquidValidatorsResponse) XXX_DiscardUnknown()
- func (m *QueryLiquidValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryLiquidValidatorsResponse) XXX_Merge(src proto.Message)
- func (m *QueryLiquidValidatorsResponse) XXX_Size() int
- func (m *QueryLiquidValidatorsResponse) XXX_Unmarshal(b []byte) error
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryStatesRequest
- func (*QueryStatesRequest) Descriptor() ([]byte, []int)
- func (m *QueryStatesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryStatesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryStatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryStatesRequest) ProtoMessage()
- func (m *QueryStatesRequest) Reset()
- func (m *QueryStatesRequest) Size() (n int)
- func (m *QueryStatesRequest) String() string
- func (m *QueryStatesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryStatesRequest) XXX_DiscardUnknown()
- func (m *QueryStatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryStatesRequest) XXX_Merge(src proto.Message)
- func (m *QueryStatesRequest) XXX_Size() int
- func (m *QueryStatesRequest) XXX_Unmarshal(b []byte) error
- type QueryStatesResponse
- func (*QueryStatesResponse) Descriptor() ([]byte, []int)
- func (m *QueryStatesResponse) GetNetAmountState() NetAmountState
- func (m *QueryStatesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryStatesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryStatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryStatesResponse) ProtoMessage()
- func (m *QueryStatesResponse) Reset()
- func (m *QueryStatesResponse) Size() (n int)
- func (m *QueryStatesResponse) String() string
- func (m *QueryStatesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryStatesResponse) XXX_DiscardUnknown()
- func (m *QueryStatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryStatesResponse) XXX_Merge(src proto.Message)
- func (m *QueryStatesResponse) XXX_Size() int
- func (m *QueryStatesResponse) XXX_Unmarshal(b []byte) error
- type Redelegation
- type SlashingKeeper
- type StakingHooks
- type StakingKeeper
- type UnimplementedMsgServer
- func (*UnimplementedMsgServer) LiquidStake(ctx context.Context, req *MsgLiquidStake) (*MsgLiquidStakeResponse, error)
- func (*UnimplementedMsgServer) LiquidUnstake(ctx context.Context, req *MsgLiquidUnstake) (*MsgLiquidUnstakeResponse, error)
- func (*UnimplementedMsgServer) StakeToLP(ctx context.Context, req *MsgStakeToLP) (*MsgStakeToLPResponse, error)
- func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) LiquidValidators(ctx context.Context, req *QueryLiquidValidatorsRequest) (*QueryLiquidValidatorsResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- func (*UnimplementedQueryServer) States(ctx context.Context, req *QueryStatesRequest) (*QueryStatesResponse, error)
- type ValidatorStatus
- type WhitelistedValidator
- func (*WhitelistedValidator) Descriptor() ([]byte, []int)
- func (m *WhitelistedValidator) Marshal() (dAtA []byte, err error)
- func (m *WhitelistedValidator) MarshalTo(dAtA []byte) (int, error)
- func (m *WhitelistedValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WhitelistedValidator) ProtoMessage()
- func (m *WhitelistedValidator) Reset()
- func (m *WhitelistedValidator) Size() (n int)
- func (m *WhitelistedValidator) String() string
- func (m *WhitelistedValidator) Unmarshal(dAtA []byte) error
- func (m *WhitelistedValidator) XXX_DiscardUnknown()
- func (m *WhitelistedValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WhitelistedValidator) XXX_Merge(src proto.Message)
- func (m *WhitelistedValidator) XXX_Size() int
- func (m *WhitelistedValidator) XXX_Unmarshal(b []byte) error
- type WhitelistedValsMap
Constants ¶
const ( EventTypeMsgLiquidStake = MsgTypeLiquidStake EventTypeMsgLiquidUnstake = MsgTypeLiquidUnstake EventTypeMsgStakeToLP = MsgTypeStakeToLP EventTypeMsgUpdateParams = MsgTypeUpdateParams EventTypeAddLiquidValidator = "add_liquid_validator" EventTypeRemoveLiquidValidator = "remove_liquid_validator" EventTypeBeginRebalancing = "begin_rebalancing" EventTypeAutocompound = "autocompound" EventTypeUnbondInactiveLiquidTokens = "unbond_inactive_liquid_tokens" AttributeKeyDelegator = "delegator" AttributeKeyStkXPRTMintedAmount = "stkxprt_minted_amount" AttributeKeyCompletionTime = "completion_time" AttributeKeyUnbondingAmount = "unbonding_amount" AttributeKeyUnbondedAmount = "unbonded_amount" AttributeKeyLiquidValidator = "liquid_validator" AttributeKeyRedelegationCount = "redelegation_count" AttributeKeyRedelegationFailCount = "redelegation_fail_count" AttributeKeyLiquidAmount = "liquid_amount" AttributeKeyStakedAmount = "staked_amount" AttributeKeyAuthority = "authority" AttributeKeyUpdatedParams = "updated_params" AttributeValueCategory = ModuleName )
Event types for the liquidstake module.
const ( // ModuleName is the name of the liquidstake module ModuleName = "liquidstake" // RouterKey is the message router key for the liquidstake module RouterKey = ModuleName // StoreKey is the default store key for the liquidstake module // To avoid collision with liquidstakeibc we make it xprtliquidstake StoreKey = "xprt" + ModuleName // QuerierRoute is the querier route for the liquidstake module QuerierRoute = ModuleName )
const ( MsgTypeLiquidStake = "liquid_stake" MsgTypeLiquidUnstake = "liquid_unstake" MsgTypeStakeToLP = "stake_to_lp" MsgTypeUpdateParams = "update_params" )
Message types for the liquidstake module
Variables ¶
var ( ErrActiveLiquidValidatorsNotExists = sdkerrors.Register(ModuleName, 2, "active liquid validators not exists") ErrInvalidDenom = sdkerrors.Register(ModuleName, 3, "invalid denom") ErrInvalidBondDenom = sdkerrors.Register(ModuleName, 4, "invalid bond denom") ErrInvalidLiquidBondDenom = sdkerrors.Register(ModuleName, 5, "invalid liquid bond denom") ErrNotImplementedYet = sdkerrors.Register(ModuleName, 6, "not implemented yet") ErrLessThanMinLiquidStakeAmount = sdkerrors.Register(ModuleName, 7, "staking amount should be over params.min_liquid_stake_amount") ErrInvalidStkXPRTSupply = sdkerrors.Register(ModuleName, 8, "invalid liquid bond denom supply") ErrInvalidActiveLiquidValidators = sdkerrors.Register(ModuleName, 9, "invalid active liquid validators") ErrLiquidValidatorsNotExists = sdkerrors.Register(ModuleName, 10, "liquid validators not exists") ErrInsufficientProxyAccBalance = sdkerrors.Register(ModuleName, 11, "insufficient liquid tokens or balance of proxy account, need to wait for new liquid validator to be added or unbonding of proxy account to be completed") ErrTooSmallLiquidStakeAmount = sdkerrors.Register(ModuleName, 12, "liquid staking amount is too small, the result becomes zero") ErrTooSmallLiquidUnstakingAmount = sdkerrors.Register(ModuleName, 13, "liquid unstaking amount is too small, the result becomes zero") ErrNoLPContractAddress = sdkerrors.Register(ModuleName, 14, "CW address of an LP contract is not set") ErrDisabledLSM = sdkerrors.Register(ModuleName, 15, "LSM delegation is disabled") ErrLSMTokenizeFailed = sdkerrors.Register(ModuleName, 16, "LSM tokenization failed") ErrLSMRedeemFailed = sdkerrors.Register(ModuleName, 17, "LSM redemption failed") ErrLPContract = sdkerrors.Register(ModuleName, 18, "CW contract execution failed") )
Sentinel errors for the liquidstake module.
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ParamsKey = []byte{0x01} // LiquidValidatorsKey defines prefix for each key to a liquid validator LiquidValidatorsKey = []byte{0x02} )
var ( ErrInvalidLengthLiquidstake = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLiquidstake = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLiquidstake = fmt.Errorf("proto: unexpected end of group") )
var ( DefaultLiquidBondDenom = "stk/uxprt" // DefaultUnstakeFeeRate is the default Unstake Fee Rate. DefaultUnstakeFeeRate = sdk.ZeroDec() // DefaultMinLiquidStakeAmount is the default minimum liquid staking amount. DefaultMinLiquidStakeAmount = sdk.NewInt(1000) // RebalancingTrigger if the maximum difference and needed each redelegation amount exceeds it, asset rebalacing will be executed. RebalancingTrigger = sdk.NewDecWithPrec(1, 3) // "0.001000000000000000" // AutocompoundTrigger If the sum of balance and the upcoming rewards of LiquidStakeProxyAcc exceeds it, // the reward is automatically autocompounded, according to the weights. AutocompoundTrigger = sdk.NewDecWithPrec(1, 3) // "0.001000000000000000" // LiquidStakeProxyAcc is a proxy reserve account for delegation and undelegation. LiquidStakeProxyAcc = authtypes.NewModuleAddress(ModuleName + "-LiquidStakingProxyAcc") )
Parameter store keys
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( // ModuleCdc references the global x/liquidstake module codec. Note, the codec // should ONLY be used in certain instances of tests and for JSON encoding as Amino // is still used for that purpose. // // The actual codec used for serialization should be provided to x/liquidstake and // defined at the application level. ModuleCdc = codec.NewAminoCodec(amino) )
var ValidatorStatus_name = map[int32]string{
0: "VALIDATOR_STATUS_UNSPECIFIED",
1: "VALIDATOR_STATUS_ACTIVE",
2: "VALIDATOR_STATUS_INACTIVE",
}
var ValidatorStatus_value = map[string]int32{
"VALIDATOR_STATUS_UNSPECIFIED": 0,
"VALIDATOR_STATUS_ACTIVE": 1,
"VALIDATOR_STATUS_INACTIVE": 2,
}
Functions ¶
func ActiveCondition ¶
func ActiveCondition(validator stakingtypes.Validator, whitelisted bool, tombstoned bool) bool
ActiveCondition checks the liquid validator could be active by below cases - included on whitelist - existed valid validator on staking module ( existed, not nil del shares and tokens, valid exchange rate) - not tombstoned
func DeductFeeRate ¶
DeductFeeRate returns Input * (1-FeeRate) with truncations
func DivideByCurrentWeight ¶
func DivideByCurrentWeight(lvs LiquidValidators, input sdk.Dec, totalLiquidTokens math.Int, liquidTokenMap map[string]math.Int) (outputs []sdk.Dec, crumb sdk.Dec)
DivideByCurrentWeight divide the input value by the ratio of the weight of the liquid validator's liquid token and return it with crumb which is may occur while dividing according to the weight of liquid validators by decimal error, outputs is truncated decimal.
func DivideByWeight ¶
func DivideByWeight(avs ActiveLiquidValidators, input math.Int, whitelistedValsMap WhitelistedValsMap) (outputs []math.Int, crumb math.Int)
DivideByWeight divide the input value by the ratio of the param weight of the liquid validator and return it with crumb which is may occur while dividing according to the weight of active liquid validators by decimal error.
func GetLiquidValidatorKey ¶
func GetLiquidValidatorKey(operatorAddr sdk.ValAddress) []byte
GetLiquidValidatorKey creates the key for the liquid validator with address VALUE: liquidstake/LiquidValidator
func MustMarshalLiquidValidator ¶
func MustMarshalLiquidValidator(cdc codec.BinaryCodec, val *LiquidValidator) []byte
func NativeTokenToStkXPRT ¶
func NativeTokenToStkXPRT(nativeTokenAmount, StkxprtTotalSupplyAmount math.Int, netAmount sdk.Dec) (stkXPRTAmount math.Int)
NativeTokenToStkXPRT returns StkxprtTotalSupply * nativeTokenAmount / netAmount
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers the x/liquidstake interfaces types with the interface registry.
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the necessary x/liquidstake interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶
func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.
func RegisterQueryHandlerFromEndpoint ¶
func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterQueryHandlerServer ¶
func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func StkXPRTToNativeToken ¶
func StkXPRTToNativeToken(stkXPRTAmount, StkxprtTotalSupplyAmount math.Int, netAmount sdk.Dec) (nativeTokenAmount sdk.Dec)
StkXPRTToNativeToken returns stkXPRTAmount * netAmount / StkxprtTotalSupply with truncations
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates GenesisState.
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI }
AccountKeeper defines the expected account keeper
type ActiveLiquidValidators ¶
type ActiveLiquidValidators LiquidValidators
func (ActiveLiquidValidators) Len ¶
func (avs ActiveLiquidValidators) Len() int
func (ActiveLiquidValidators) TotalActiveLiquidTokens ¶
func (avs ActiveLiquidValidators) TotalActiveLiquidTokens(ctx sdk.Context, sk StakingKeeper, onlyBonded bool) (math.Int, map[string]math.Int)
func (ActiveLiquidValidators) TotalWeight ¶
func (avs ActiveLiquidValidators) TotalWeight(whitelistedValsMap WhitelistedValsMap) math.Int
TotalWeight for active liquid validator
type BankKeeper ¶
type BankKeeper interface { SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error GetSupply(ctx sdk.Context, denom string) sdk.Coin SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins }
BankKeeper defines the expected bank send keeper
type DistrKeeper ¶
type DistrKeeper interface { IncrementValidatorPeriod(ctx sdk.Context, val stakingtypes.ValidatorI) uint64 CalculateDelegationRewards(ctx sdk.Context, val stakingtypes.ValidatorI, del stakingtypes.DelegationI, endingPeriod uint64) (rewards sdk.DecCoins) WithdrawDelegationRewards(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error) }
DistrKeeper expected distribution keeper (noalias)
type GenesisState ¶
type GenesisState struct { // params defines all the parameters for the liquidstake module Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` LiquidValidators []LiquidValidator `protobuf:"bytes,2,rep,name=liquid_validators,json=liquidValidators,proto3" json:"liquid_validators"` }
GenesisState defines the liquidstake module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState returns the default genesis state.
func NewGenesisState ¶
func NewGenesisState(params Params, liquidValidators []LiquidValidator) *GenesisState
NewGenesisState returns new GenesisState instance.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err 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) 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 LiquidValidator ¶
type LiquidValidator struct { // operator_address defines the address of the validator's operator; bech // encoded in JSON. OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` }
LiquidValidator defines a Validator that can be the target of LiquidStaking and LiquidUnstaking, Active, Weight, etc. fields are derived as functions to deal with by maintaining consistency with the state of the staking module.
func MustUnmarshalLiquidValidator ¶
func MustUnmarshalLiquidValidator(cdc codec.BinaryCodec, value []byte) LiquidValidator
must unmarshal a liquid validator from a store value
func UnmarshalLiquidValidator ¶
func UnmarshalLiquidValidator(cdc codec.BinaryCodec, value []byte) (val LiquidValidator, err error)
unmarshal a liquid validator from a store value
func (*LiquidValidator) Descriptor ¶
func (*LiquidValidator) Descriptor() ([]byte, []int)
func (LiquidValidator) GetDelShares ¶
func (v LiquidValidator) GetDelShares(ctx sdk.Context, sk StakingKeeper) sdk.Dec
func (LiquidValidator) GetLiquidTokens ¶
func (v LiquidValidator) GetLiquidTokens(ctx sdk.Context, sk StakingKeeper, onlyBonded bool) math.Int
func (LiquidValidator) GetOperator ¶
func (v LiquidValidator) GetOperator() sdk.ValAddress
func (LiquidValidator) GetStatus ¶
func (v LiquidValidator) GetStatus(activeCondition bool) ValidatorStatus
func (LiquidValidator) GetWeight ¶
func (v LiquidValidator) GetWeight(whitelistedValsMap WhitelistedValsMap, active bool) math.Int
func (*LiquidValidator) Marshal ¶
func (m *LiquidValidator) Marshal() (dAtA []byte, err error)
func (*LiquidValidator) MarshalToSizedBuffer ¶
func (m *LiquidValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LiquidValidator) ProtoMessage ¶
func (*LiquidValidator) ProtoMessage()
func (*LiquidValidator) Reset ¶
func (m *LiquidValidator) Reset()
func (*LiquidValidator) Size ¶
func (m *LiquidValidator) Size() (n int)
func (*LiquidValidator) String ¶
func (m *LiquidValidator) String() string
func (*LiquidValidator) Unmarshal ¶
func (m *LiquidValidator) Unmarshal(dAtA []byte) error
func (LiquidValidator) Validate ¶
func (v LiquidValidator) Validate() error
Validate validates LiquidValidator.
func (*LiquidValidator) XXX_DiscardUnknown ¶
func (m *LiquidValidator) XXX_DiscardUnknown()
func (*LiquidValidator) XXX_Marshal ¶
func (m *LiquidValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LiquidValidator) XXX_Merge ¶
func (m *LiquidValidator) XXX_Merge(src proto.Message)
func (*LiquidValidator) XXX_Size ¶
func (m *LiquidValidator) XXX_Size() int
func (*LiquidValidator) XXX_Unmarshal ¶
func (m *LiquidValidator) XXX_Unmarshal(b []byte) error
type LiquidValidatorState ¶
type LiquidValidatorState struct { // operator_address defines the address of the validator's operator; bech // encoded in JSON. OperatorAddress string `protobuf:"bytes,1,opt,name=operator_address,json=operatorAddress,proto3" json:"operator_address,omitempty"` // weight specifies the weight for liquid staking, unstaking amount Weight github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"weight"` // status is the liquid validator status Status ValidatorStatus `protobuf:"varint,3,opt,name=status,proto3,enum=pstake.liquidstake.v1beta1.ValidatorStatus" json:"status,omitempty"` DelShares github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */ // liquid_tokens define the token amount worth of delegation shares of the // validator (slashing applied amount) LiquidTokens github_com_cosmos_cosmos_sdk_types.Int `` /* 137-byte string literal not displayed */ }
LiquidValidatorState is type LiquidValidator with state added to return to query results.
func (*LiquidValidatorState) Descriptor ¶
func (*LiquidValidatorState) Descriptor() ([]byte, []int)
func (*LiquidValidatorState) Marshal ¶
func (m *LiquidValidatorState) Marshal() (dAtA []byte, err error)
func (*LiquidValidatorState) MarshalTo ¶
func (m *LiquidValidatorState) MarshalTo(dAtA []byte) (int, error)
func (*LiquidValidatorState) MarshalToSizedBuffer ¶
func (m *LiquidValidatorState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*LiquidValidatorState) ProtoMessage ¶
func (*LiquidValidatorState) ProtoMessage()
func (*LiquidValidatorState) Reset ¶
func (m *LiquidValidatorState) Reset()
func (*LiquidValidatorState) Size ¶
func (m *LiquidValidatorState) Size() (n int)
func (*LiquidValidatorState) String ¶
func (m *LiquidValidatorState) String() string
func (*LiquidValidatorState) Unmarshal ¶
func (m *LiquidValidatorState) Unmarshal(dAtA []byte) error
func (*LiquidValidatorState) XXX_DiscardUnknown ¶
func (m *LiquidValidatorState) XXX_DiscardUnknown()
func (*LiquidValidatorState) XXX_Marshal ¶
func (m *LiquidValidatorState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*LiquidValidatorState) XXX_Merge ¶
func (m *LiquidValidatorState) XXX_Merge(src proto.Message)
func (*LiquidValidatorState) XXX_Size ¶
func (m *LiquidValidatorState) XXX_Size() int
func (*LiquidValidatorState) XXX_Unmarshal ¶
func (m *LiquidValidatorState) XXX_Unmarshal(b []byte) error
type LiquidValidatorStates ¶
type LiquidValidatorStates []LiquidValidatorState
type LiquidValidators ¶
type LiquidValidators []LiquidValidator
LiquidValidators is a collection of LiquidValidator
func (LiquidValidators) Len ¶
func (vs LiquidValidators) Len() int
func (LiquidValidators) Map ¶
func (vs LiquidValidators) Map() map[string]struct{}
func (LiquidValidators) MinMaxGap ¶
func (vs LiquidValidators) MinMaxGap(targetMap, liquidTokenMap map[string]math.Int) (minGapVal LiquidValidator, maxGapVal LiquidValidator, amountNeeded math.Int, lastRedelegation bool)
MinMaxGap Return the list of LiquidValidator with the maximum gap and minimum gap from the target weight of LiquidValidators, respectively.
func (LiquidValidators) TotalLiquidTokens ¶
func (vs LiquidValidators) TotalLiquidTokens(ctx sdk.Context, sk StakingKeeper, onlyBonded bool) (math.Int, map[string]math.Int)
type MsgClient ¶
type MsgClient interface { // LiquidStake defines a method for performing a delegation of coins // from a delegator to whitelisted validators. LiquidStake(ctx context.Context, in *MsgLiquidStake, opts ...grpc.CallOption) (*MsgLiquidStakeResponse, error) // LiquidUnstake defines a method for performing an undelegation of liquid // staking from a delegate. LiquidUnstake(ctx context.Context, in *MsgLiquidUnstake, opts ...grpc.CallOption) (*MsgLiquidUnstakeResponse, error) // StakeToLP defines a method for LSM-transfer of staked XPRT // into stkXPRT with locking into an LP. StakeToLP(ctx context.Context, in *MsgStakeToLP, opts ...grpc.CallOption) (*MsgStakeToLPResponse, error) // UpdateParams defines a method to update the module params. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 MsgLiquidStake ¶
type MsgLiquidStake struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` }
MsgLiquidStake defines a SDK message for performing a liquid stake of coins from a delegator to whitelisted validators.
func NewMsgLiquidStake ¶
func NewMsgLiquidStake( liquidStaker sdk.AccAddress, amount sdk.Coin, ) *MsgLiquidStake
NewMsgLiquidStake creates a new MsgLiquidStake.
func (*MsgLiquidStake) Descriptor ¶
func (*MsgLiquidStake) Descriptor() ([]byte, []int)
func (*MsgLiquidStake) GetDelegator ¶
func (m *MsgLiquidStake) GetDelegator() sdk.AccAddress
func (*MsgLiquidStake) GetSignBytes ¶
func (m *MsgLiquidStake) GetSignBytes() []byte
func (*MsgLiquidStake) GetSigners ¶
func (m *MsgLiquidStake) GetSigners() []sdk.AccAddress
func (*MsgLiquidStake) Marshal ¶
func (m *MsgLiquidStake) Marshal() (dAtA []byte, err error)
func (*MsgLiquidStake) MarshalToSizedBuffer ¶
func (m *MsgLiquidStake) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgLiquidStake) ProtoMessage ¶
func (*MsgLiquidStake) ProtoMessage()
func (*MsgLiquidStake) Reset ¶
func (m *MsgLiquidStake) Reset()
func (*MsgLiquidStake) Route ¶
func (m *MsgLiquidStake) Route() string
func (*MsgLiquidStake) Size ¶
func (m *MsgLiquidStake) Size() (n int)
func (*MsgLiquidStake) String ¶
func (m *MsgLiquidStake) String() string
func (*MsgLiquidStake) Type ¶
func (m *MsgLiquidStake) Type() string
func (*MsgLiquidStake) Unmarshal ¶
func (m *MsgLiquidStake) Unmarshal(dAtA []byte) error
func (*MsgLiquidStake) ValidateBasic ¶
func (m *MsgLiquidStake) ValidateBasic() error
func (*MsgLiquidStake) XXX_DiscardUnknown ¶
func (m *MsgLiquidStake) XXX_DiscardUnknown()
func (*MsgLiquidStake) XXX_Marshal ¶
func (m *MsgLiquidStake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgLiquidStake) XXX_Merge ¶
func (m *MsgLiquidStake) XXX_Merge(src proto.Message)
func (*MsgLiquidStake) XXX_Size ¶
func (m *MsgLiquidStake) XXX_Size() int
func (*MsgLiquidStake) XXX_Unmarshal ¶
func (m *MsgLiquidStake) XXX_Unmarshal(b []byte) error
type MsgLiquidStakeResponse ¶
type MsgLiquidStakeResponse struct { }
MsgLiquidStakeResponse defines the MsgLiquidStake response type.
func (*MsgLiquidStakeResponse) Descriptor ¶
func (*MsgLiquidStakeResponse) Descriptor() ([]byte, []int)
func (*MsgLiquidStakeResponse) Marshal ¶
func (m *MsgLiquidStakeResponse) Marshal() (dAtA []byte, err error)
func (*MsgLiquidStakeResponse) MarshalTo ¶
func (m *MsgLiquidStakeResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgLiquidStakeResponse) MarshalToSizedBuffer ¶
func (m *MsgLiquidStakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgLiquidStakeResponse) ProtoMessage ¶
func (*MsgLiquidStakeResponse) ProtoMessage()
func (*MsgLiquidStakeResponse) Reset ¶
func (m *MsgLiquidStakeResponse) Reset()
func (*MsgLiquidStakeResponse) Size ¶
func (m *MsgLiquidStakeResponse) Size() (n int)
func (*MsgLiquidStakeResponse) String ¶
func (m *MsgLiquidStakeResponse) String() string
func (*MsgLiquidStakeResponse) Unmarshal ¶
func (m *MsgLiquidStakeResponse) Unmarshal(dAtA []byte) error
func (*MsgLiquidStakeResponse) XXX_DiscardUnknown ¶
func (m *MsgLiquidStakeResponse) XXX_DiscardUnknown()
func (*MsgLiquidStakeResponse) XXX_Marshal ¶
func (m *MsgLiquidStakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgLiquidStakeResponse) XXX_Merge ¶
func (m *MsgLiquidStakeResponse) XXX_Merge(src proto.Message)
func (*MsgLiquidStakeResponse) XXX_Size ¶
func (m *MsgLiquidStakeResponse) XXX_Size() int
func (*MsgLiquidStakeResponse) XXX_Unmarshal ¶
func (m *MsgLiquidStakeResponse) XXX_Unmarshal(b []byte) error
type MsgLiquidUnstake ¶
type MsgLiquidUnstake struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` Amount types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount"` }
MsgLiquidUnstake defines a SDK message for performing an undelegation of liquid staking from a delegate.
func NewMsgLiquidUnstake ¶
func NewMsgLiquidUnstake( liquidStaker sdk.AccAddress, amount sdk.Coin, ) *MsgLiquidUnstake
NewMsgLiquidUnstake creates a new MsgLiquidUnstake.
func (*MsgLiquidUnstake) Descriptor ¶
func (*MsgLiquidUnstake) Descriptor() ([]byte, []int)
func (*MsgLiquidUnstake) GetDelegator ¶
func (m *MsgLiquidUnstake) GetDelegator() sdk.AccAddress
func (*MsgLiquidUnstake) GetSignBytes ¶
func (m *MsgLiquidUnstake) GetSignBytes() []byte
func (*MsgLiquidUnstake) GetSigners ¶
func (m *MsgLiquidUnstake) GetSigners() []sdk.AccAddress
func (*MsgLiquidUnstake) Marshal ¶
func (m *MsgLiquidUnstake) Marshal() (dAtA []byte, err error)
func (*MsgLiquidUnstake) MarshalToSizedBuffer ¶
func (m *MsgLiquidUnstake) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgLiquidUnstake) ProtoMessage ¶
func (*MsgLiquidUnstake) ProtoMessage()
func (*MsgLiquidUnstake) Reset ¶
func (m *MsgLiquidUnstake) Reset()
func (*MsgLiquidUnstake) Route ¶
func (m *MsgLiquidUnstake) Route() string
func (*MsgLiquidUnstake) Size ¶
func (m *MsgLiquidUnstake) Size() (n int)
func (*MsgLiquidUnstake) String ¶
func (m *MsgLiquidUnstake) String() string
func (*MsgLiquidUnstake) Type ¶
func (m *MsgLiquidUnstake) Type() string
func (*MsgLiquidUnstake) Unmarshal ¶
func (m *MsgLiquidUnstake) Unmarshal(dAtA []byte) error
func (*MsgLiquidUnstake) ValidateBasic ¶
func (m *MsgLiquidUnstake) ValidateBasic() error
func (*MsgLiquidUnstake) XXX_DiscardUnknown ¶
func (m *MsgLiquidUnstake) XXX_DiscardUnknown()
func (*MsgLiquidUnstake) XXX_Marshal ¶
func (m *MsgLiquidUnstake) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgLiquidUnstake) XXX_Merge ¶
func (m *MsgLiquidUnstake) XXX_Merge(src proto.Message)
func (*MsgLiquidUnstake) XXX_Size ¶
func (m *MsgLiquidUnstake) XXX_Size() int
func (*MsgLiquidUnstake) XXX_Unmarshal ¶
func (m *MsgLiquidUnstake) XXX_Unmarshal(b []byte) error
type MsgLiquidUnstakeResponse ¶
type MsgLiquidUnstakeResponse struct {
CompletionTime time.Time `protobuf:"bytes,1,opt,name=completion_time,json=completionTime,proto3,stdtime" json:"completion_time"`
}
MsgLiquidUnstakeResponse defines the MsgLiquidUnstake response type.
func (*MsgLiquidUnstakeResponse) Descriptor ¶
func (*MsgLiquidUnstakeResponse) Descriptor() ([]byte, []int)
func (*MsgLiquidUnstakeResponse) GetCompletionTime ¶
func (m *MsgLiquidUnstakeResponse) GetCompletionTime() time.Time
func (*MsgLiquidUnstakeResponse) Marshal ¶
func (m *MsgLiquidUnstakeResponse) Marshal() (dAtA []byte, err error)
func (*MsgLiquidUnstakeResponse) MarshalTo ¶
func (m *MsgLiquidUnstakeResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgLiquidUnstakeResponse) MarshalToSizedBuffer ¶
func (m *MsgLiquidUnstakeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgLiquidUnstakeResponse) ProtoMessage ¶
func (*MsgLiquidUnstakeResponse) ProtoMessage()
func (*MsgLiquidUnstakeResponse) Reset ¶
func (m *MsgLiquidUnstakeResponse) Reset()
func (*MsgLiquidUnstakeResponse) Size ¶
func (m *MsgLiquidUnstakeResponse) Size() (n int)
func (*MsgLiquidUnstakeResponse) String ¶
func (m *MsgLiquidUnstakeResponse) String() string
func (*MsgLiquidUnstakeResponse) Unmarshal ¶
func (m *MsgLiquidUnstakeResponse) Unmarshal(dAtA []byte) error
func (*MsgLiquidUnstakeResponse) XXX_DiscardUnknown ¶
func (m *MsgLiquidUnstakeResponse) XXX_DiscardUnknown()
func (*MsgLiquidUnstakeResponse) XXX_Marshal ¶
func (m *MsgLiquidUnstakeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgLiquidUnstakeResponse) XXX_Merge ¶
func (m *MsgLiquidUnstakeResponse) XXX_Merge(src proto.Message)
func (*MsgLiquidUnstakeResponse) XXX_Size ¶
func (m *MsgLiquidUnstakeResponse) XXX_Size() int
func (*MsgLiquidUnstakeResponse) XXX_Unmarshal ¶
func (m *MsgLiquidUnstakeResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // LiquidStake defines a method for performing a delegation of coins // from a delegator to whitelisted validators. LiquidStake(context.Context, *MsgLiquidStake) (*MsgLiquidStakeResponse, error) // LiquidUnstake defines a method for performing an undelegation of liquid // staking from a delegate. LiquidUnstake(context.Context, *MsgLiquidUnstake) (*MsgLiquidUnstakeResponse, error) // StakeToLP defines a method for LSM-transfer of staked XPRT // into stkXPRT with locking into an LP. StakeToLP(context.Context, *MsgStakeToLP) (*MsgStakeToLPResponse, error) // UpdateParams defines a method to update the module params. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) }
MsgServer is the server API for Msg service.
type MsgStakeToLP ¶
type MsgStakeToLP struct { DelegatorAddress string `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address,omitempty"` ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` StakedAmount types.Coin `protobuf:"bytes,3,opt,name=staked_amount,json=stakedAmount,proto3" json:"staked_amount"` LiquidAmount types.Coin `protobuf:"bytes,4,opt,name=liquid_amount,json=liquidAmount,proto3" json:"liquid_amount"` }
MsgStakeToLP defines a SDK message for performing an LSM-transfer of staked XPRT into stkXPRT with locking into an LP.
func NewMsgStakeToLP ¶
func NewMsgStakeToLP( liquidStaker sdk.AccAddress, validator sdk.ValAddress, stakedAmount, liquidAmount sdk.Coin, ) *MsgStakeToLP
NewMsgStakeToLP creates a new MsgStakeToLP.
func (*MsgStakeToLP) Descriptor ¶
func (*MsgStakeToLP) Descriptor() ([]byte, []int)
func (*MsgStakeToLP) GetDelegator ¶
func (m *MsgStakeToLP) GetDelegator() sdk.AccAddress
func (*MsgStakeToLP) GetSignBytes ¶
func (m *MsgStakeToLP) GetSignBytes() []byte
func (*MsgStakeToLP) GetSigners ¶
func (m *MsgStakeToLP) GetSigners() []sdk.AccAddress
func (*MsgStakeToLP) GetValidator ¶
func (m *MsgStakeToLP) GetValidator() sdk.ValAddress
func (*MsgStakeToLP) Marshal ¶
func (m *MsgStakeToLP) Marshal() (dAtA []byte, err error)
func (*MsgStakeToLP) MarshalToSizedBuffer ¶
func (m *MsgStakeToLP) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgStakeToLP) ProtoMessage ¶
func (*MsgStakeToLP) ProtoMessage()
func (*MsgStakeToLP) Reset ¶
func (m *MsgStakeToLP) Reset()
func (*MsgStakeToLP) Route ¶
func (m *MsgStakeToLP) Route() string
func (*MsgStakeToLP) Size ¶
func (m *MsgStakeToLP) Size() (n int)
func (*MsgStakeToLP) String ¶
func (m *MsgStakeToLP) String() string
func (*MsgStakeToLP) Type ¶
func (m *MsgStakeToLP) Type() string
func (*MsgStakeToLP) Unmarshal ¶
func (m *MsgStakeToLP) Unmarshal(dAtA []byte) error
func (*MsgStakeToLP) ValidateBasic ¶
func (m *MsgStakeToLP) ValidateBasic() error
func (*MsgStakeToLP) XXX_DiscardUnknown ¶
func (m *MsgStakeToLP) XXX_DiscardUnknown()
func (*MsgStakeToLP) XXX_Marshal ¶
func (m *MsgStakeToLP) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgStakeToLP) XXX_Merge ¶
func (m *MsgStakeToLP) XXX_Merge(src proto.Message)
func (*MsgStakeToLP) XXX_Size ¶
func (m *MsgStakeToLP) XXX_Size() int
func (*MsgStakeToLP) XXX_Unmarshal ¶
func (m *MsgStakeToLP) XXX_Unmarshal(b []byte) error
type MsgStakeToLPResponse ¶
type MsgStakeToLPResponse struct { }
MsgStakeToLPResponse defines the MsgStakeToLP response type.
func (*MsgStakeToLPResponse) Descriptor ¶
func (*MsgStakeToLPResponse) Descriptor() ([]byte, []int)
func (*MsgStakeToLPResponse) Marshal ¶
func (m *MsgStakeToLPResponse) Marshal() (dAtA []byte, err error)
func (*MsgStakeToLPResponse) MarshalTo ¶
func (m *MsgStakeToLPResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgStakeToLPResponse) MarshalToSizedBuffer ¶
func (m *MsgStakeToLPResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgStakeToLPResponse) ProtoMessage ¶
func (*MsgStakeToLPResponse) ProtoMessage()
func (*MsgStakeToLPResponse) Reset ¶
func (m *MsgStakeToLPResponse) Reset()
func (*MsgStakeToLPResponse) Size ¶
func (m *MsgStakeToLPResponse) Size() (n int)
func (*MsgStakeToLPResponse) String ¶
func (m *MsgStakeToLPResponse) String() string
func (*MsgStakeToLPResponse) Unmarshal ¶
func (m *MsgStakeToLPResponse) Unmarshal(dAtA []byte) error
func (*MsgStakeToLPResponse) XXX_DiscardUnknown ¶
func (m *MsgStakeToLPResponse) XXX_DiscardUnknown()
func (*MsgStakeToLPResponse) XXX_Marshal ¶
func (m *MsgStakeToLPResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgStakeToLPResponse) XXX_Merge ¶
func (m *MsgStakeToLPResponse) XXX_Merge(src proto.Message)
func (*MsgStakeToLPResponse) XXX_Size ¶
func (m *MsgStakeToLPResponse) XXX_Size() int
func (*MsgStakeToLPResponse) XXX_Unmarshal ¶
func (m *MsgStakeToLPResponse) XXX_Unmarshal(b []byte) error
type MsgUpdateParams ¶
type MsgUpdateParams struct { // authority is the address that controls the module (defaults to x/gov unless // overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // params defines the parameters to update. // // NOTE: All parameters must be supplied. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
func NewMsgUpdateParams ¶
func NewMsgUpdateParams(authority sdk.AccAddress, amount Params) *MsgUpdateParams
NewMsgUpdateParams creates a new MsgUpdateParams.
func (*MsgUpdateParams) Descriptor ¶
func (*MsgUpdateParams) Descriptor() ([]byte, []int)
func (*MsgUpdateParams) GetSignBytes ¶
func (m *MsgUpdateParams) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (*MsgUpdateParams) GetSigners ¶
func (m *MsgUpdateParams) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (*MsgUpdateParams) Marshal ¶
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParams) MarshalToSizedBuffer ¶
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Route ¶
func (m *MsgUpdateParams) Route() string
func (*MsgUpdateParams) Size ¶
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Type ¶
func (m *MsgUpdateParams) Type() string
Type should return the action
func (*MsgUpdateParams) Unmarshal ¶
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (*MsgUpdateParams) ValidateBasic ¶
func (m *MsgUpdateParams) ValidateBasic() error
func (*MsgUpdateParams) XXX_DiscardUnknown ¶
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶
type MsgUpdateParamsResponse struct { }
MsgUpdateParamsResponse defines the response structure for executing a
func (*MsgUpdateParamsResponse) Descriptor ¶
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
type NetAmountState ¶
type NetAmountState struct { // mint_rate is stkXPRTTotalSupply / NetAmount MintRate github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=mint_rate,json=mintRate,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"mint_rate"` // btoken_total_supply returns the total supply of stk/uxprt (stkXPRT denom) StkxprtTotalSupply github_com_cosmos_cosmos_sdk_types.Int `` /* 157-byte string literal not displayed */ // net_amount is proxy account's native token balance + total liquid tokens + // total remaining rewards + total unbonding balance NetAmount github_com_cosmos_cosmos_sdk_types.Dec `` /* 128-byte string literal not displayed */ TotalDelShares github_com_cosmos_cosmos_sdk_types.Dec `` /* 145-byte string literal not displayed */ // total_liquid_tokens define the token amount worth of delegation shares of // all liquid validator (slashing applied amount) TotalLiquidTokens github_com_cosmos_cosmos_sdk_types.Int `` /* 154-byte string literal not displayed */ // total_remaining_rewards define the sum of remaining rewards of proxy // account by all liquid validators TotalRemainingRewards github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */ // total_unbonding_balance define the unbonding balance of proxy account by // all liquid validator (slashing applied amount) TotalUnbondingBalance github_com_cosmos_cosmos_sdk_types.Int `` /* 166-byte string literal not displayed */ // proxy_acc_balance define the balance of proxy account for the native token ProxyAccBalance github_com_cosmos_cosmos_sdk_types.Int `` /* 148-byte string literal not displayed */ }
NetAmountState is type for net amount raw data and mint rate, This is a value that depends on the several module state every time, so it is used only for calculation and query and is not stored in kv.
func (NetAmountState) CalcMintRate ¶
func (nas NetAmountState) CalcMintRate() sdk.Dec
func (NetAmountState) CalcNetAmount ¶
func (nas NetAmountState) CalcNetAmount() sdk.Dec
func (*NetAmountState) Descriptor ¶
func (*NetAmountState) Descriptor() ([]byte, []int)
func (*NetAmountState) Marshal ¶
func (m *NetAmountState) Marshal() (dAtA []byte, err error)
func (*NetAmountState) MarshalToSizedBuffer ¶
func (m *NetAmountState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*NetAmountState) ProtoMessage ¶
func (*NetAmountState) ProtoMessage()
func (*NetAmountState) Reset ¶
func (m *NetAmountState) Reset()
func (*NetAmountState) Size ¶
func (m *NetAmountState) Size() (n int)
func (*NetAmountState) String ¶
func (m *NetAmountState) String() string
func (*NetAmountState) Unmarshal ¶
func (m *NetAmountState) Unmarshal(dAtA []byte) error
func (*NetAmountState) XXX_DiscardUnknown ¶
func (m *NetAmountState) XXX_DiscardUnknown()
func (*NetAmountState) XXX_Marshal ¶
func (m *NetAmountState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*NetAmountState) XXX_Merge ¶
func (m *NetAmountState) XXX_Merge(src proto.Message)
func (*NetAmountState) XXX_Size ¶
func (m *NetAmountState) XXX_Size() int
func (*NetAmountState) XXX_Unmarshal ¶
func (m *NetAmountState) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { // LiquidBondDenom specifies the denomination of the token receiving after // liquid stake, The value is calculated through NetAmount. LiquidBondDenom string `protobuf:"bytes,1,opt,name=liquid_bond_denom,json=liquidBondDenom,proto3" json:"liquid_bond_denom,omitempty"` // WhitelistedValidators specifies the validators elected to become Active // Liquid Validators. WhitelistedValidators []WhitelistedValidator `protobuf:"bytes,2,rep,name=whitelisted_validators,json=whitelistedValidators,proto3" json:"whitelisted_validators"` // UnstakeFeeRate specifies the fee rate when liquid unstake is requested, // unbonded by subtracting it from unbondingAmount UnstakeFeeRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 145-byte string literal not displayed */ // LsmDisabled allows to block any msgs that convert staked tokens into stkXPRT through LSM. LsmDisabled bool `protobuf:"varint,4,opt,name=lsm_disabled,json=lsmDisabled,proto3" json:"lsm_disabled,omitempty"` // MinLiquidStakingAmount specifies the minimum number of coins to be staked // to the active liquid validators on liquid staking to minimize decimal loss // and consider gas efficiency. MinLiquidStakeAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 165-byte string literal not displayed */ // cw_locked_pool_address defines the bech32-encoded address of // a CW smart-contract representing a time locked LP (e.g. Superfluid LP). CwLockedPoolAddress string `protobuf:"bytes,6,opt,name=cw_locked_pool_address,json=cwLockedPoolAddress,proto3" json:"cw_locked_pool_address,omitempty"` }
Params defines the set of params for the liquidstake module.
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns the default liquidstake module parameters.
func (*Params) Descriptor ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (Params) WhitelistedValsMap ¶
func (p Params) WhitelistedValsMap() WhitelistedValsMap
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { // Params returns parameters of the liquidstake module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // LiquidValidators returns liquid validators with states of the liquidstake // module. LiquidValidators(ctx context.Context, in *QueryLiquidValidatorsRequest, opts ...grpc.CallOption) (*QueryLiquidValidatorsResponse, error) // States returns states of the liquidstake module. States(ctx context.Context, in *QueryStatesRequest, opts ...grpc.CallOption) (*QueryStatesResponse, error) }
QueryClient is the client API for Query service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewQueryClient ¶
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryLiquidValidatorsRequest ¶
type QueryLiquidValidatorsRequest struct { }
QueryLiquidValidatorsRequest is the request type for the Query/LiquidValidators RPC method.
func (*QueryLiquidValidatorsRequest) Descriptor ¶
func (*QueryLiquidValidatorsRequest) Descriptor() ([]byte, []int)
func (*QueryLiquidValidatorsRequest) Marshal ¶
func (m *QueryLiquidValidatorsRequest) Marshal() (dAtA []byte, err error)
func (*QueryLiquidValidatorsRequest) MarshalTo ¶
func (m *QueryLiquidValidatorsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryLiquidValidatorsRequest) MarshalToSizedBuffer ¶
func (m *QueryLiquidValidatorsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryLiquidValidatorsRequest) ProtoMessage ¶
func (*QueryLiquidValidatorsRequest) ProtoMessage()
func (*QueryLiquidValidatorsRequest) Reset ¶
func (m *QueryLiquidValidatorsRequest) Reset()
func (*QueryLiquidValidatorsRequest) Size ¶
func (m *QueryLiquidValidatorsRequest) Size() (n int)
func (*QueryLiquidValidatorsRequest) String ¶
func (m *QueryLiquidValidatorsRequest) String() string
func (*QueryLiquidValidatorsRequest) Unmarshal ¶
func (m *QueryLiquidValidatorsRequest) Unmarshal(dAtA []byte) error
func (*QueryLiquidValidatorsRequest) XXX_DiscardUnknown ¶
func (m *QueryLiquidValidatorsRequest) XXX_DiscardUnknown()
func (*QueryLiquidValidatorsRequest) XXX_Marshal ¶
func (m *QueryLiquidValidatorsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryLiquidValidatorsRequest) XXX_Merge ¶
func (m *QueryLiquidValidatorsRequest) XXX_Merge(src proto.Message)
func (*QueryLiquidValidatorsRequest) XXX_Size ¶
func (m *QueryLiquidValidatorsRequest) XXX_Size() int
func (*QueryLiquidValidatorsRequest) XXX_Unmarshal ¶
func (m *QueryLiquidValidatorsRequest) XXX_Unmarshal(b []byte) error
type QueryLiquidValidatorsResponse ¶
type QueryLiquidValidatorsResponse struct {
LiquidValidators []LiquidValidatorState `protobuf:"bytes,1,rep,name=liquid_validators,json=liquidValidators,proto3" json:"liquid_validators"`
}
QueryLiquidValidatorsResponse is the response type for the Query/LiquidValidators RPC method.
func (*QueryLiquidValidatorsResponse) Descriptor ¶
func (*QueryLiquidValidatorsResponse) Descriptor() ([]byte, []int)
func (*QueryLiquidValidatorsResponse) GetLiquidValidators ¶
func (m *QueryLiquidValidatorsResponse) GetLiquidValidators() []LiquidValidatorState
func (*QueryLiquidValidatorsResponse) Marshal ¶
func (m *QueryLiquidValidatorsResponse) Marshal() (dAtA []byte, err error)
func (*QueryLiquidValidatorsResponse) MarshalTo ¶
func (m *QueryLiquidValidatorsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryLiquidValidatorsResponse) MarshalToSizedBuffer ¶
func (m *QueryLiquidValidatorsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryLiquidValidatorsResponse) ProtoMessage ¶
func (*QueryLiquidValidatorsResponse) ProtoMessage()
func (*QueryLiquidValidatorsResponse) Reset ¶
func (m *QueryLiquidValidatorsResponse) Reset()
func (*QueryLiquidValidatorsResponse) Size ¶
func (m *QueryLiquidValidatorsResponse) Size() (n int)
func (*QueryLiquidValidatorsResponse) String ¶
func (m *QueryLiquidValidatorsResponse) String() string
func (*QueryLiquidValidatorsResponse) Unmarshal ¶
func (m *QueryLiquidValidatorsResponse) Unmarshal(dAtA []byte) error
func (*QueryLiquidValidatorsResponse) XXX_DiscardUnknown ¶
func (m *QueryLiquidValidatorsResponse) XXX_DiscardUnknown()
func (*QueryLiquidValidatorsResponse) XXX_Marshal ¶
func (m *QueryLiquidValidatorsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryLiquidValidatorsResponse) XXX_Merge ¶
func (m *QueryLiquidValidatorsResponse) XXX_Merge(src proto.Message)
func (*QueryLiquidValidatorsResponse) XXX_Size ¶
func (m *QueryLiquidValidatorsResponse) XXX_Size() int
func (*QueryLiquidValidatorsResponse) XXX_Unmarshal ¶
func (m *QueryLiquidValidatorsResponse) XXX_Unmarshal(b []byte) error
type QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is the request type for the Query/Params RPC method.
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
QueryParamsResponse is the response type for the Query/Params RPC method.
func (*QueryParamsResponse) Descriptor ¶
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // Params returns parameters of the liquidstake module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // LiquidValidators returns liquid validators with states of the liquidstake // module. LiquidValidators(context.Context, *QueryLiquidValidatorsRequest) (*QueryLiquidValidatorsResponse, error) // States returns states of the liquidstake module. States(context.Context, *QueryStatesRequest) (*QueryStatesResponse, error) }
QueryServer is the server API for Query service.
type QueryStatesRequest ¶
type QueryStatesRequest struct { }
QueryStatesRequest is the request type for the Query/States RPC method.
func (*QueryStatesRequest) Descriptor ¶
func (*QueryStatesRequest) Descriptor() ([]byte, []int)
func (*QueryStatesRequest) Marshal ¶
func (m *QueryStatesRequest) Marshal() (dAtA []byte, err error)
func (*QueryStatesRequest) MarshalTo ¶
func (m *QueryStatesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryStatesRequest) MarshalToSizedBuffer ¶
func (m *QueryStatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryStatesRequest) ProtoMessage ¶
func (*QueryStatesRequest) ProtoMessage()
func (*QueryStatesRequest) Reset ¶
func (m *QueryStatesRequest) Reset()
func (*QueryStatesRequest) Size ¶
func (m *QueryStatesRequest) Size() (n int)
func (*QueryStatesRequest) String ¶
func (m *QueryStatesRequest) String() string
func (*QueryStatesRequest) Unmarshal ¶
func (m *QueryStatesRequest) Unmarshal(dAtA []byte) error
func (*QueryStatesRequest) XXX_DiscardUnknown ¶
func (m *QueryStatesRequest) XXX_DiscardUnknown()
func (*QueryStatesRequest) XXX_Marshal ¶
func (m *QueryStatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryStatesRequest) XXX_Merge ¶
func (m *QueryStatesRequest) XXX_Merge(src proto.Message)
func (*QueryStatesRequest) XXX_Size ¶
func (m *QueryStatesRequest) XXX_Size() int
func (*QueryStatesRequest) XXX_Unmarshal ¶
func (m *QueryStatesRequest) XXX_Unmarshal(b []byte) error
type QueryStatesResponse ¶
type QueryStatesResponse struct {
NetAmountState NetAmountState `protobuf:"bytes,1,opt,name=net_amount_state,json=netAmountState,proto3" json:"net_amount_state"`
}
QueryStatesResponse is the response type for the Query/States RPC method.
func (*QueryStatesResponse) Descriptor ¶
func (*QueryStatesResponse) Descriptor() ([]byte, []int)
func (*QueryStatesResponse) GetNetAmountState ¶
func (m *QueryStatesResponse) GetNetAmountState() NetAmountState
func (*QueryStatesResponse) Marshal ¶
func (m *QueryStatesResponse) Marshal() (dAtA []byte, err error)
func (*QueryStatesResponse) MarshalTo ¶
func (m *QueryStatesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryStatesResponse) MarshalToSizedBuffer ¶
func (m *QueryStatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryStatesResponse) ProtoMessage ¶
func (*QueryStatesResponse) ProtoMessage()
func (*QueryStatesResponse) Reset ¶
func (m *QueryStatesResponse) Reset()
func (*QueryStatesResponse) Size ¶
func (m *QueryStatesResponse) Size() (n int)
func (*QueryStatesResponse) String ¶
func (m *QueryStatesResponse) String() string
func (*QueryStatesResponse) Unmarshal ¶
func (m *QueryStatesResponse) Unmarshal(dAtA []byte) error
func (*QueryStatesResponse) XXX_DiscardUnknown ¶
func (m *QueryStatesResponse) XXX_DiscardUnknown()
func (*QueryStatesResponse) XXX_Marshal ¶
func (m *QueryStatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryStatesResponse) XXX_Merge ¶
func (m *QueryStatesResponse) XXX_Merge(src proto.Message)
func (*QueryStatesResponse) XXX_Size ¶
func (m *QueryStatesResponse) XXX_Size() int
func (*QueryStatesResponse) XXX_Unmarshal ¶
func (m *QueryStatesResponse) XXX_Unmarshal(b []byte) error
type Redelegation ¶
type Redelegation struct { Delegator sdk.AccAddress SrcValidator LiquidValidator DstValidator LiquidValidator Amount math.Int Last bool Error error }
type SlashingKeeper ¶
type SlashingKeeper interface {
IsTombstoned(ctx sdk.Context, consAddr sdk.ConsAddress) bool
}
SlashingKeeper expected slashing keeper (noalias)
type StakingHooks ¶
type StakingHooks interface { AfterValidatorCreated(ctx sdk.Context, valAddr sdk.ValAddress) // Must be called when a validator is created AfterValidatorRemoved(ctx sdk.Context, consAddr sdk.ConsAddress, valAddr sdk.ValAddress) // Must be called when a validator is deleted BeforeDelegationCreated(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) // Must be called when a delegation is created AfterDelegationModified(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) BeforeValidatorSlashed(ctx sdk.Context, valAddr sdk.ValAddress, fraction sdk.Dec) }
StakingHooks event hooks for staking validator object (noalias)
type StakingKeeper ¶
type StakingKeeper interface { Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool) GetAllValidators(ctx sdk.Context) (validators []stakingtypes.Validator) GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator GetLastTotalPower(ctx sdk.Context) math.Int GetLastValidatorPower(ctx sdk.Context, valAddr sdk.ValAddress) int64 Delegation(sdk.Context, sdk.AccAddress, sdk.ValAddress) stakingtypes.DelegationI GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation stakingtypes.Delegation, found bool) IterateDelegations(ctx sdk.Context, delegator sdk.AccAddress, fn func(index int64, delegation stakingtypes.DelegationI) (stop bool)) Delegate( ctx sdk.Context, delAddr sdk.AccAddress, bondAmt math.Int, tokenSrc stakingtypes.BondStatus, validator stakingtypes.Validator, subtractAccount bool, ) (newShares sdk.Dec, err error) BondDenom(ctx sdk.Context) (res string) Unbond(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, shares sdk.Dec) (amount math.Int, err error) UnbondingTime(ctx sdk.Context) (res time.Duration) SetUnbondingDelegationEntry( ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance math.Int, ) stakingtypes.UnbondingDelegation InsertUBDQueue(ctx sdk.Context, ubd stakingtypes.UnbondingDelegation, completionTime time.Time) ValidateUnbondAmount( ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt math.Int, ) (shares sdk.Dec, err error) GetAllUnbondingDelegations(ctx sdk.Context, delegator sdk.AccAddress) []stakingtypes.UnbondingDelegation BeginRedelegation( ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress, sharesAmount sdk.Dec, ) (completionTime time.Time, err error) GetAllRedelegations( ctx sdk.Context, delegator sdk.AccAddress, srcValAddress, dstValAddress sdk.ValAddress, ) []stakingtypes.Redelegation HasReceivingRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) bool BlockValidatorUpdates(ctx sdk.Context) []abci.ValidatorUpdate HasMaxUnbondingDelegationEntries(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress) bool }
StakingKeeper expected staking keeper (noalias)
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) LiquidStake ¶
func (*UnimplementedMsgServer) LiquidStake(ctx context.Context, req *MsgLiquidStake) (*MsgLiquidStakeResponse, error)
func (*UnimplementedMsgServer) LiquidUnstake ¶
func (*UnimplementedMsgServer) LiquidUnstake(ctx context.Context, req *MsgLiquidUnstake) (*MsgLiquidUnstakeResponse, error)
func (*UnimplementedMsgServer) StakeToLP ¶
func (*UnimplementedMsgServer) StakeToLP(ctx context.Context, req *MsgStakeToLP) (*MsgStakeToLPResponse, error)
func (*UnimplementedMsgServer) UpdateParams ¶
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) LiquidValidators ¶
func (*UnimplementedQueryServer) LiquidValidators(ctx context.Context, req *QueryLiquidValidatorsRequest) (*QueryLiquidValidatorsResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) States ¶
func (*UnimplementedQueryServer) States(ctx context.Context, req *QueryStatesRequest) (*QueryStatesResponse, error)
type ValidatorStatus ¶
type ValidatorStatus int32
ValidatorStatus enumerates the status of a liquid validator.
const ( // VALIDATOR_STATUS_UNSPECIFIED defines the unspecified invalid status. ValidatorStatusUnspecified ValidatorStatus = 0 // VALIDATOR_STATUS_ACTIVE defines the active, valid status ValidatorStatusActive ValidatorStatus = 1 // VALIDATOR_STATUS_INACTIVE defines the inactive, invalid status ValidatorStatusInactive ValidatorStatus = 2 )
func (ValidatorStatus) EnumDescriptor ¶
func (ValidatorStatus) EnumDescriptor() ([]byte, []int)
func (ValidatorStatus) String ¶
func (x ValidatorStatus) String() string
type WhitelistedValidator ¶
type WhitelistedValidator struct { // validator_address defines the bech32-encoded address that whitelisted // validator ValidatorAddress string `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` // target_weight specifies the target weight for liquid staking, unstaking // amount, which is a value for calculating the real weight to be derived // according to the active status TargetWeight github_com_cosmos_cosmos_sdk_types.Int `` /* 137-byte string literal not displayed */ }
WhitelistedValidator consists of the validator operator address and the target weight, which is a value for calculating the real weight to be derived according to the active status. In the case of inactive, it is calculated as zero.
func (*WhitelistedValidator) Descriptor ¶
func (*WhitelistedValidator) Descriptor() ([]byte, []int)
func (*WhitelistedValidator) Marshal ¶
func (m *WhitelistedValidator) Marshal() (dAtA []byte, err error)
func (*WhitelistedValidator) MarshalTo ¶
func (m *WhitelistedValidator) MarshalTo(dAtA []byte) (int, error)
func (*WhitelistedValidator) MarshalToSizedBuffer ¶
func (m *WhitelistedValidator) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WhitelistedValidator) ProtoMessage ¶
func (*WhitelistedValidator) ProtoMessage()
func (*WhitelistedValidator) Reset ¶
func (m *WhitelistedValidator) Reset()
func (*WhitelistedValidator) Size ¶
func (m *WhitelistedValidator) Size() (n int)
func (*WhitelistedValidator) String ¶
func (m *WhitelistedValidator) String() string
func (*WhitelistedValidator) Unmarshal ¶
func (m *WhitelistedValidator) Unmarshal(dAtA []byte) error
func (*WhitelistedValidator) XXX_DiscardUnknown ¶
func (m *WhitelistedValidator) XXX_DiscardUnknown()
func (*WhitelistedValidator) XXX_Marshal ¶
func (m *WhitelistedValidator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WhitelistedValidator) XXX_Merge ¶
func (m *WhitelistedValidator) XXX_Merge(src proto.Message)
func (*WhitelistedValidator) XXX_Size ¶
func (m *WhitelistedValidator) XXX_Size() int
func (*WhitelistedValidator) XXX_Unmarshal ¶
func (m *WhitelistedValidator) XXX_Unmarshal(b []byte) error
type WhitelistedValsMap ¶
type WhitelistedValsMap map[string]WhitelistedValidator
func GetWhitelistedValsMap ¶
func GetWhitelistedValsMap(whitelistedValidators []WhitelistedValidator) WhitelistedValsMap
func (WhitelistedValsMap) IsListed ¶
func (whitelistedValsMap WhitelistedValsMap) IsListed(operatorAddr string) bool