types

package
v0.0.0-...-6577280 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeMintDerivative = "mint_derivative"
	EventTypeBurnDerivative = "burn_derivative"

	AttributeValueCategory        = ModuleName
	AttributeKeyDelegator         = "delegator"
	AttributeKeyValidator         = "validator"
	AttributeKeySharesTransferred = "shares_transferred"
)
View Source
const (
	// ModuleName The name that will be used throughout the module
	ModuleName = "liquid"

	// RouterKey Top level router key
	RouterKey = ModuleName

	// ModuleAccountName is the module account's name
	ModuleAccountName = ModuleName

	DefaultDerivativeDenom = "bfury"

	DenomSeparator = "-"
)
View Source
const (
	// TypeMsgMintDerivative represents the type string for MsgMintDerivative
	TypeMsgMintDerivative = "mint_derivative"
	// TypeMsgBurnDerivative represents the type string for MsgBurnDerivative
	TypeMsgBurnDerivative = "burn_derivative"
)

Variables

View Source
var (
	ErrNoValidatorFound           = errorsmod.Register(ModuleName, 2, "validator does not exist")
	ErrNoDelegatorForAddress      = errorsmod.Register(ModuleName, 3, "delegator does not contain delegation")
	ErrInvalidDenom               = errorsmod.Register(ModuleName, 4, "invalid denom")
	ErrNotEnoughDelegationShares  = errorsmod.Register(ModuleName, 5, "not enough delegation shares")
	ErrRedelegationsNotCompleted  = errorsmod.Register(ModuleName, 6, "active redelegations cannot be transferred")
	ErrUntransferableShares       = errorsmod.Register(ModuleName, 7, "shares cannot be transferred")
	ErrSelfDelegationBelowMinimum = errorsmod.Register(ModuleName, 8, "validator's self delegation must be greater than their minimum self delegation")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func GetLiquidStakingTokenDenom

func GetLiquidStakingTokenDenom(bondDenom string, valAddr sdk.ValAddress) string

func ParseLiquidStakingTokenDenom

func ParseLiquidStakingTokenDenom(denom string) (sdk.ValAddress, error)

ParseLiquidStakingTokenDenom extracts a validator address from a derivative denom.

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers proto messages under their interfaces for unmarshalling, in addition to registering the msg service for handling tx msgs.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers all the necessary types and interfaces for the module.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

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)

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(moduleName string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
}

AccountKeeper defines the expected keeper interface for interacting with account

type BankKeeper

type BankKeeper interface {
	SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error

	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error

	IterateTotalSupply(ctx sdk.Context, cb func(sdk.Coin) bool)
	GetSupply(ctx sdk.Context, denom string) sdk.Coin
}

BankKeeper defines the expected bank keeper

type DistributionKeeper

type DistributionKeeper interface {
	GetDelegatorWithdrawAddr(ctx sdk.Context, delAddr sdk.AccAddress) sdk.AccAddress
	WithdrawDelegationRewards(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (sdk.Coins, error)
}

type MsgBurnDerivative

type MsgBurnDerivative struct {
	// sender is the owner of the derivatives to be converted
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// validator is the validator of the derivatives to be converted
	Validator string `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator,omitempty"`
	// amount is the quantity of derivatives to be converted
	Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"`
}

MsgBurnDerivative defines the Msg/BurnDerivative request type.

func NewMsgBurnDerivative

func NewMsgBurnDerivative(sender sdk.AccAddress, validator sdk.ValAddress, amount sdk.Coin) MsgBurnDerivative

NewMsgBurnDerivative returns a new MsgBurnDerivative

func (*MsgBurnDerivative) Descriptor

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

func (*MsgBurnDerivative) GetAmount

func (m *MsgBurnDerivative) GetAmount() types.Coin

func (*MsgBurnDerivative) GetSender

func (m *MsgBurnDerivative) GetSender() string

func (MsgBurnDerivative) GetSignBytes

func (msg MsgBurnDerivative) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgBurnDerivative) GetSigners

func (msg MsgBurnDerivative) GetSigners() []sdk.AccAddress

GetSigners returns the addresses of signers that must sign.

func (*MsgBurnDerivative) GetValidator

func (m *MsgBurnDerivative) GetValidator() string

func (*MsgBurnDerivative) Marshal

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

func (*MsgBurnDerivative) MarshalTo

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

func (*MsgBurnDerivative) MarshalToSizedBuffer

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

func (*MsgBurnDerivative) ProtoMessage

func (*MsgBurnDerivative) ProtoMessage()

func (*MsgBurnDerivative) Reset

func (m *MsgBurnDerivative) Reset()

func (MsgBurnDerivative) Route

func (msg MsgBurnDerivative) Route() string

Route return the message type used for routing the message.

func (*MsgBurnDerivative) Size

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

func (*MsgBurnDerivative) String

func (m *MsgBurnDerivative) String() string

func (MsgBurnDerivative) Type

func (msg MsgBurnDerivative) Type() string

Type returns a human-readable string for the message, intended for utilization within tags.

func (*MsgBurnDerivative) Unmarshal

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

func (MsgBurnDerivative) ValidateBasic

func (msg MsgBurnDerivative) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

func (*MsgBurnDerivative) XXX_DiscardUnknown

func (m *MsgBurnDerivative) XXX_DiscardUnknown()

func (*MsgBurnDerivative) XXX_Marshal

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

func (*MsgBurnDerivative) XXX_Merge

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

func (*MsgBurnDerivative) XXX_Size

func (m *MsgBurnDerivative) XXX_Size() int

func (*MsgBurnDerivative) XXX_Unmarshal

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

type MsgBurnDerivativeResponse

type MsgBurnDerivativeResponse struct {
	// received is the number of delegation shares sent to the sender
	Received github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=received,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"received"`
}

MsgBurnDerivativeResponse defines the Msg/BurnDerivative response type.

func (*MsgBurnDerivativeResponse) Descriptor

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

func (*MsgBurnDerivativeResponse) Marshal

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

func (*MsgBurnDerivativeResponse) MarshalTo

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

func (*MsgBurnDerivativeResponse) MarshalToSizedBuffer

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

func (*MsgBurnDerivativeResponse) ProtoMessage

func (*MsgBurnDerivativeResponse) ProtoMessage()

func (*MsgBurnDerivativeResponse) Reset

func (m *MsgBurnDerivativeResponse) Reset()

func (*MsgBurnDerivativeResponse) Size

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

func (*MsgBurnDerivativeResponse) String

func (m *MsgBurnDerivativeResponse) String() string

func (*MsgBurnDerivativeResponse) Unmarshal

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

func (*MsgBurnDerivativeResponse) XXX_DiscardUnknown

func (m *MsgBurnDerivativeResponse) XXX_DiscardUnknown()

func (*MsgBurnDerivativeResponse) XXX_Marshal

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

func (*MsgBurnDerivativeResponse) XXX_Merge

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

func (*MsgBurnDerivativeResponse) XXX_Size

func (m *MsgBurnDerivativeResponse) XXX_Size() int

func (*MsgBurnDerivativeResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// MintDerivative defines a method for converting a delegation into staking deriviatives.
	MintDerivative(ctx context.Context, in *MsgMintDerivative, opts ...grpc.CallOption) (*MsgMintDerivativeResponse, error)
	// BurnDerivative defines a method for converting staking deriviatives into a delegation.
	BurnDerivative(ctx context.Context, in *MsgBurnDerivative, opts ...grpc.CallOption) (*MsgBurnDerivativeResponse, 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 MsgMintDerivative

type MsgMintDerivative struct {
	// sender is the owner of the delegation to be converted
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// validator is the validator of the delegation to be converted
	Validator string `protobuf:"bytes,2,opt,name=validator,proto3" json:"validator,omitempty"`
	// amount is the quantity of staked assets to be converted
	Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"`
}

MsgMintDerivative defines the Msg/MintDerivative request type.

func NewMsgMintDerivative

func NewMsgMintDerivative(sender sdk.AccAddress, validator sdk.ValAddress, amount sdk.Coin) MsgMintDerivative

NewMsgMintDerivative returns a new MsgMintDerivative

func (*MsgMintDerivative) Descriptor

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

func (*MsgMintDerivative) GetAmount

func (m *MsgMintDerivative) GetAmount() types.Coin

func (*MsgMintDerivative) GetSender

func (m *MsgMintDerivative) GetSender() string

func (MsgMintDerivative) GetSignBytes

func (msg MsgMintDerivative) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgMintDerivative) GetSigners

func (msg MsgMintDerivative) GetSigners() []sdk.AccAddress

GetSigners returns the addresses of signers that must sign.

func (*MsgMintDerivative) GetValidator

func (m *MsgMintDerivative) GetValidator() string

func (*MsgMintDerivative) Marshal

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

func (*MsgMintDerivative) MarshalTo

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

func (*MsgMintDerivative) MarshalToSizedBuffer

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

func (*MsgMintDerivative) ProtoMessage

func (*MsgMintDerivative) ProtoMessage()

func (*MsgMintDerivative) Reset

func (m *MsgMintDerivative) Reset()

func (MsgMintDerivative) Route

func (msg MsgMintDerivative) Route() string

Route return the message type used for routing the message.

func (*MsgMintDerivative) Size

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

func (*MsgMintDerivative) String

func (m *MsgMintDerivative) String() string

func (MsgMintDerivative) Type

func (msg MsgMintDerivative) Type() string

Type returns a human-readable string for the message, intended for utilization within tags.

func (*MsgMintDerivative) Unmarshal

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

func (MsgMintDerivative) ValidateBasic

func (msg MsgMintDerivative) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to any other information.

func (*MsgMintDerivative) XXX_DiscardUnknown

func (m *MsgMintDerivative) XXX_DiscardUnknown()

func (*MsgMintDerivative) XXX_Marshal

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

func (*MsgMintDerivative) XXX_Merge

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

func (*MsgMintDerivative) XXX_Size

func (m *MsgMintDerivative) XXX_Size() int

func (*MsgMintDerivative) XXX_Unmarshal

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

type MsgMintDerivativeResponse

type MsgMintDerivativeResponse struct {
	// received is the amount of staking derivative minted and sent to the sender
	Received types.Coin `protobuf:"bytes,1,opt,name=received,proto3" json:"received"`
}

MsgMintDerivativeResponse defines the Msg/MintDerivative response type.

func (*MsgMintDerivativeResponse) Descriptor

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

func (*MsgMintDerivativeResponse) GetReceived

func (m *MsgMintDerivativeResponse) GetReceived() types.Coin

func (*MsgMintDerivativeResponse) Marshal

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

func (*MsgMintDerivativeResponse) MarshalTo

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

func (*MsgMintDerivativeResponse) MarshalToSizedBuffer

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

func (*MsgMintDerivativeResponse) ProtoMessage

func (*MsgMintDerivativeResponse) ProtoMessage()

func (*MsgMintDerivativeResponse) Reset

func (m *MsgMintDerivativeResponse) Reset()

func (*MsgMintDerivativeResponse) Size

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

func (*MsgMintDerivativeResponse) String

func (m *MsgMintDerivativeResponse) String() string

func (*MsgMintDerivativeResponse) Unmarshal

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

func (*MsgMintDerivativeResponse) XXX_DiscardUnknown

func (m *MsgMintDerivativeResponse) XXX_DiscardUnknown()

func (*MsgMintDerivativeResponse) XXX_Marshal

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

func (*MsgMintDerivativeResponse) XXX_Merge

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

func (*MsgMintDerivativeResponse) XXX_Size

func (m *MsgMintDerivativeResponse) XXX_Size() int

func (*MsgMintDerivativeResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// MintDerivative defines a method for converting a delegation into staking deriviatives.
	MintDerivative(context.Context, *MsgMintDerivative) (*MsgMintDerivativeResponse, error)
	// BurnDerivative defines a method for converting staking deriviatives into a delegation.
	BurnDerivative(context.Context, *MsgBurnDerivative) (*MsgBurnDerivativeResponse, error)
}

MsgServer is the server API for Msg service.

type QueryClient

type QueryClient interface {
	// DelegatedBalance returns an account's vesting and vested coins currently delegated to validators.
	// It ignores coins in unbonding delegations.
	DelegatedBalance(ctx context.Context, in *QueryDelegatedBalanceRequest, opts ...grpc.CallOption) (*QueryDelegatedBalanceResponse, error)
	// TotalSupply returns the total sum of all coins currently locked into the liquid module.
	TotalSupply(ctx context.Context, in *QueryTotalSupplyRequest, opts ...grpc.CallOption) (*QueryTotalSupplyResponse, 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 QueryDelegatedBalanceRequest

type QueryDelegatedBalanceRequest struct {
	// delegator is the address of the account to query
	Delegator string `protobuf:"bytes,1,opt,name=delegator,proto3" json:"delegator,omitempty"`
}

QueryDelegatedBalanceRequest defines the request type for Query/DelegatedBalance method.

func (*QueryDelegatedBalanceRequest) Descriptor

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

func (*QueryDelegatedBalanceRequest) Marshal

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

func (*QueryDelegatedBalanceRequest) MarshalTo

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

func (*QueryDelegatedBalanceRequest) MarshalToSizedBuffer

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

func (*QueryDelegatedBalanceRequest) ProtoMessage

func (*QueryDelegatedBalanceRequest) ProtoMessage()

func (*QueryDelegatedBalanceRequest) Reset

func (m *QueryDelegatedBalanceRequest) Reset()

func (*QueryDelegatedBalanceRequest) Size

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

func (*QueryDelegatedBalanceRequest) String

func (*QueryDelegatedBalanceRequest) Unmarshal

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

func (*QueryDelegatedBalanceRequest) XXX_DiscardUnknown

func (m *QueryDelegatedBalanceRequest) XXX_DiscardUnknown()

func (*QueryDelegatedBalanceRequest) XXX_Marshal

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

func (*QueryDelegatedBalanceRequest) XXX_Merge

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

func (*QueryDelegatedBalanceRequest) XXX_Size

func (m *QueryDelegatedBalanceRequest) XXX_Size() int

func (*QueryDelegatedBalanceRequest) XXX_Unmarshal

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

type QueryDelegatedBalanceResponse

type QueryDelegatedBalanceResponse struct {
	// vested is the amount of all delegated coins that have vested (ie not locked)
	Vested types.Coin `protobuf:"bytes,1,opt,name=vested,proto3" json:"vested"`
	// vesting is the amount of all delegated coins that are still vesting (ie locked)
	Vesting types.Coin `protobuf:"bytes,2,opt,name=vesting,proto3" json:"vesting"`
}

DelegatedBalanceResponse defines the response type for the Query/DelegatedBalance method.

func (*QueryDelegatedBalanceResponse) Descriptor

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

func (*QueryDelegatedBalanceResponse) Marshal

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

func (*QueryDelegatedBalanceResponse) MarshalTo

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

func (*QueryDelegatedBalanceResponse) MarshalToSizedBuffer

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

func (*QueryDelegatedBalanceResponse) ProtoMessage

func (*QueryDelegatedBalanceResponse) ProtoMessage()

func (*QueryDelegatedBalanceResponse) Reset

func (m *QueryDelegatedBalanceResponse) Reset()

func (*QueryDelegatedBalanceResponse) Size

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

func (*QueryDelegatedBalanceResponse) String

func (*QueryDelegatedBalanceResponse) Unmarshal

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

func (*QueryDelegatedBalanceResponse) XXX_DiscardUnknown

func (m *QueryDelegatedBalanceResponse) XXX_DiscardUnknown()

func (*QueryDelegatedBalanceResponse) XXX_Marshal

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

func (*QueryDelegatedBalanceResponse) XXX_Merge

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

func (*QueryDelegatedBalanceResponse) XXX_Size

func (m *QueryDelegatedBalanceResponse) XXX_Size() int

func (*QueryDelegatedBalanceResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// DelegatedBalance returns an account's vesting and vested coins currently delegated to validators.
	// It ignores coins in unbonding delegations.
	DelegatedBalance(context.Context, *QueryDelegatedBalanceRequest) (*QueryDelegatedBalanceResponse, error)
	// TotalSupply returns the total sum of all coins currently locked into the liquid module.
	TotalSupply(context.Context, *QueryTotalSupplyRequest) (*QueryTotalSupplyResponse, error)
}

QueryServer is the server API for Query service.

type QueryTotalSupplyRequest

type QueryTotalSupplyRequest struct {
}

QueryTotalSupplyRequest defines the request type for Query/TotalSupply method.

func (*QueryTotalSupplyRequest) Descriptor

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

func (*QueryTotalSupplyRequest) Marshal

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

func (*QueryTotalSupplyRequest) MarshalTo

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

func (*QueryTotalSupplyRequest) MarshalToSizedBuffer

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

func (*QueryTotalSupplyRequest) ProtoMessage

func (*QueryTotalSupplyRequest) ProtoMessage()

func (*QueryTotalSupplyRequest) Reset

func (m *QueryTotalSupplyRequest) Reset()

func (*QueryTotalSupplyRequest) Size

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

func (*QueryTotalSupplyRequest) String

func (m *QueryTotalSupplyRequest) String() string

func (*QueryTotalSupplyRequest) Unmarshal

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

func (*QueryTotalSupplyRequest) XXX_DiscardUnknown

func (m *QueryTotalSupplyRequest) XXX_DiscardUnknown()

func (*QueryTotalSupplyRequest) XXX_Marshal

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

func (*QueryTotalSupplyRequest) XXX_Merge

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

func (*QueryTotalSupplyRequest) XXX_Size

func (m *QueryTotalSupplyRequest) XXX_Size() int

func (*QueryTotalSupplyRequest) XXX_Unmarshal

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

type QueryTotalSupplyResponse

type QueryTotalSupplyResponse struct {
	// Height is the block height at which these totals apply
	Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	// Result is a list of coins supplied to liquid
	Result github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=result,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"result"`
}

TotalSupplyResponse defines the response type for the Query/TotalSupply method.

func (*QueryTotalSupplyResponse) Descriptor

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

func (*QueryTotalSupplyResponse) Marshal

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

func (*QueryTotalSupplyResponse) MarshalTo

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

func (*QueryTotalSupplyResponse) MarshalToSizedBuffer

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

func (*QueryTotalSupplyResponse) ProtoMessage

func (*QueryTotalSupplyResponse) ProtoMessage()

func (*QueryTotalSupplyResponse) Reset

func (m *QueryTotalSupplyResponse) Reset()

func (*QueryTotalSupplyResponse) Size

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

func (*QueryTotalSupplyResponse) String

func (m *QueryTotalSupplyResponse) String() string

func (*QueryTotalSupplyResponse) Unmarshal

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

func (*QueryTotalSupplyResponse) XXX_DiscardUnknown

func (m *QueryTotalSupplyResponse) XXX_DiscardUnknown()

func (*QueryTotalSupplyResponse) XXX_Marshal

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

func (*QueryTotalSupplyResponse) XXX_Merge

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

func (*QueryTotalSupplyResponse) XXX_Size

func (m *QueryTotalSupplyResponse) XXX_Size() int

func (*QueryTotalSupplyResponse) XXX_Unmarshal

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

type StakingKeeper

type StakingKeeper interface {
	BondDenom(ctx sdk.Context) (res string)

	GetValidator(ctx sdk.Context, addr sdk.ValAddress) (validator stakingtypes.Validator, found bool)
	GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (delegation stakingtypes.Delegation, found bool)
	IterateDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, cb func(delegation stakingtypes.Delegation) (stop bool))
	HasReceivingRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valDstAddr sdk.ValAddress) bool

	ValidateUnbondAmount(
		ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, amt sdkmath.Int,
	) (shares sdk.Dec, err error)

	Delegate(
		ctx sdk.Context, delAddr sdk.AccAddress, bondAmt sdkmath.Int, tokenSrc stakingtypes.BondStatus,
		validator stakingtypes.Validator, subtractAccount bool,
	) (newShares sdk.Dec, err error)
	Unbond(
		ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress, shares sdk.Dec,
	) (amount sdkmath.Int, err error)
}

StakingKeeper defines the expected keeper interface for interacting with staking

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) BurnDerivative

func (*UnimplementedMsgServer) MintDerivative

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) DelegatedBalance

func (*UnimplementedQueryServer) TotalSupply

Jump to

Keyboard shortcuts

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