types

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 33 Imported by: 3

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeKavaDist      = ModuleName
	AttributeKeyInflation  = "kava_dist_inflation"
	AttributeKeyStatus     = "kava_dist_status"
	AttributeValueInactive = "inactive"
)
View Source
const (
	// ModuleName name that will be used throughout the module
	ModuleName = "kavadist"

	// StoreKey Top level store key where all module items will be stored
	StoreKey = ModuleName

	// RouterKey Top level router key
	RouterKey = ModuleName

	// QuerierRoute Top level query string
	QuerierRoute = ModuleName

	// DefaultParamspace default name for parameter store
	DefaultParamspace = ModuleName

	// KavaDistMacc module account for kavadist
	KavaDistMacc = ModuleName

	// Treasury
	FundModuleAccount = "kava-fund"
)
View Source
const (
	QueryGetParams  = "params"
	QueryGetBalance = "balance"
)

Querier routes for the kavadist module

View Source
const (
	// ProposalTypeCommunityPoolMultiSpend defines the type for a CommunityPoolMultiSpendProposal
	ProposalTypeCommunityPoolMultiSpend = "CommunityPoolMultiSpend"
)

Variables

View Source
var (
	ErrInvalidProposalAmount  = sdkerrors.Register(ModuleName, 2, "invalid community pool multi-spend proposal amount")
	ErrEmptyProposalRecipient = sdkerrors.Register(ModuleName, 3, "invalid community pool multi-spend proposal recipient")
)

x/kavadist errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	CurrentDistPeriodKey = []byte{0x00}
	PreviousBlockTimeKey = []byte{0x01}
)
View Source
var (
	KeyActive                = []byte("Active")
	KeyPeriods               = []byte("Periods")
	KeyInfra                 = []byte("InfrastructureParams")
	DefaultActive            = false
	DefaultPeriods           = []Period{}
	DefaultInfraParams       = InfrastructureParams{}
	DefaultPreviousBlockTime = tmtime.Canonical(time.Unix(1, 0))
	GovDenom                 = "ukava" // TODO: replace with cdptypes.DefaultGovDenom
)

Parameter keys and default values

View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthProposal        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProposal          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable Key declaration for parameters

func RegisterInterfaces added in v0.16.0

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterLegacyAminoCodec added in v0.16.0

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary kavadist interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterQueryHandler added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

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 added in v0.16.0

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper added in v0.16.0

type AccountKeeper interface {
	GetModuleAccount(ctx sdk.Context, moduleName string) authTypes.ModuleAccountI
	SetModuleAccount(ctx sdk.Context, macc authTypes.ModuleAccountI)
	NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authTypes.AccountI
}

AccountKeeper defines the expected account keeper interface

type BankKeeper added in v0.16.0

type BankKeeper interface {
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	MintCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error
	GetSupply(ctx sdk.Context, denom string) sdk.Coin
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

BankKeeper defines the expected bank keeper interface

type CommunityPoolMultiSpendProposal added in v0.14.2

type CommunityPoolMultiSpendProposal struct {
	Title         string                `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description   string                `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	RecipientList []MultiSpendRecipient `protobuf:"bytes,3,rep,name=recipient_list,json=recipientList,proto3" json:"recipient_list"`
}

CommunityPoolMultiSpendProposal spends from the community pool by sending to one or more addresses

func NewCommunityPoolMultiSpendProposal added in v0.14.2

func NewCommunityPoolMultiSpendProposal(title, description string, recipientList []MultiSpendRecipient) *CommunityPoolMultiSpendProposal

NewCommunityPoolMultiSpendProposal creates a new community pool multi-spend proposal.

func (*CommunityPoolMultiSpendProposal) Descriptor added in v0.16.0

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

func (CommunityPoolMultiSpendProposal) GetDescription added in v0.14.2

func (csp CommunityPoolMultiSpendProposal) GetDescription() string

GetDescription returns the description of a community pool multi-spend proposal.

func (CommunityPoolMultiSpendProposal) GetTitle added in v0.14.2

func (csp CommunityPoolMultiSpendProposal) GetTitle() string

GetTitle returns the title of a community pool multi-spend proposal.

func (*CommunityPoolMultiSpendProposal) Marshal added in v0.16.0

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

func (*CommunityPoolMultiSpendProposal) MarshalTo added in v0.16.0

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

func (*CommunityPoolMultiSpendProposal) MarshalToSizedBuffer added in v0.16.0

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

func (CommunityPoolMultiSpendProposal) ProposalRoute added in v0.14.2

func (csp CommunityPoolMultiSpendProposal) ProposalRoute() string

GetDescription returns the routing key of a community pool multi-spend proposal.

func (CommunityPoolMultiSpendProposal) ProposalType added in v0.14.2

func (csp CommunityPoolMultiSpendProposal) ProposalType() string

ProposalType returns the type of a community pool multi-spend proposal.

func (*CommunityPoolMultiSpendProposal) ProtoMessage added in v0.16.0

func (*CommunityPoolMultiSpendProposal) ProtoMessage()

func (*CommunityPoolMultiSpendProposal) Reset added in v0.16.0

func (*CommunityPoolMultiSpendProposal) Size added in v0.16.0

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

func (CommunityPoolMultiSpendProposal) String added in v0.14.2

String implements fmt.Stringer

func (*CommunityPoolMultiSpendProposal) Unmarshal added in v0.16.0

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

func (CommunityPoolMultiSpendProposal) ValidateBasic added in v0.14.2

func (csp CommunityPoolMultiSpendProposal) ValidateBasic() error

ValidateBasic stateless validation of a community pool multi-spend proposal.

func (*CommunityPoolMultiSpendProposal) XXX_DiscardUnknown added in v0.16.0

func (m *CommunityPoolMultiSpendProposal) XXX_DiscardUnknown()

func (*CommunityPoolMultiSpendProposal) XXX_Marshal added in v0.16.0

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

func (*CommunityPoolMultiSpendProposal) XXX_Merge added in v0.16.0

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

func (*CommunityPoolMultiSpendProposal) XXX_Size added in v0.16.0

func (m *CommunityPoolMultiSpendProposal) XXX_Size() int

func (*CommunityPoolMultiSpendProposal) XXX_Unmarshal added in v0.16.0

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

type CommunityPoolMultiSpendProposalJSON added in v0.16.0

type CommunityPoolMultiSpendProposalJSON struct {
	Title         string                                   `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description   string                                   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	RecipientList []MultiSpendRecipient                    `protobuf:"bytes,3,rep,name=recipient_list,json=recipientList,proto3" json:"recipient_list"`
	Deposit       github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=deposit,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"deposit"`
}

CommunityPoolMultiSpendProposalJSON defines a CommunityPoolMultiSpendProposal with a deposit

func (*CommunityPoolMultiSpendProposalJSON) Descriptor added in v0.16.0

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

func (*CommunityPoolMultiSpendProposalJSON) Marshal added in v0.16.0

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

func (*CommunityPoolMultiSpendProposalJSON) MarshalTo added in v0.16.0

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

func (*CommunityPoolMultiSpendProposalJSON) MarshalToSizedBuffer added in v0.16.0

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

func (*CommunityPoolMultiSpendProposalJSON) ProtoMessage added in v0.16.0

func (*CommunityPoolMultiSpendProposalJSON) ProtoMessage()

func (*CommunityPoolMultiSpendProposalJSON) Reset added in v0.16.0

func (*CommunityPoolMultiSpendProposalJSON) Size added in v0.16.0

func (*CommunityPoolMultiSpendProposalJSON) String added in v0.16.0

func (*CommunityPoolMultiSpendProposalJSON) Unmarshal added in v0.16.0

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

func (*CommunityPoolMultiSpendProposalJSON) XXX_DiscardUnknown added in v0.16.0

func (m *CommunityPoolMultiSpendProposalJSON) XXX_DiscardUnknown()

func (*CommunityPoolMultiSpendProposalJSON) XXX_Marshal added in v0.16.0

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

func (*CommunityPoolMultiSpendProposalJSON) XXX_Merge added in v0.16.0

func (*CommunityPoolMultiSpendProposalJSON) XXX_Size added in v0.16.0

func (*CommunityPoolMultiSpendProposalJSON) XXX_Unmarshal added in v0.16.0

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

type CoreReward added in v0.19.0

type CoreReward struct {
	Address github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
	Weight  github_com_cosmos_cosmos_sdk_types.Dec        `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"weight"`
}

CoreReward defines the reward weights for core infrastructure providers.

func NewCoreReward added in v0.19.0

func NewCoreReward(addr sdk.AccAddress, w sdk.Dec) CoreReward

func (*CoreReward) Descriptor added in v0.19.0

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

func (*CoreReward) Marshal added in v0.19.0

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

func (*CoreReward) MarshalTo added in v0.19.0

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

func (*CoreReward) MarshalToSizedBuffer added in v0.19.0

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

func (*CoreReward) ProtoMessage added in v0.19.0

func (*CoreReward) ProtoMessage()

func (*CoreReward) Reset added in v0.19.0

func (m *CoreReward) Reset()

func (*CoreReward) Size added in v0.19.0

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

func (*CoreReward) String added in v0.19.0

func (m *CoreReward) String() string

func (*CoreReward) Unmarshal added in v0.19.0

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

func (*CoreReward) XXX_DiscardUnknown added in v0.19.0

func (m *CoreReward) XXX_DiscardUnknown()

func (*CoreReward) XXX_Marshal added in v0.19.0

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

func (*CoreReward) XXX_Merge added in v0.19.0

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

func (*CoreReward) XXX_Size added in v0.19.0

func (m *CoreReward) XXX_Size() int

func (*CoreReward) XXX_Unmarshal added in v0.19.0

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

type CoreRewards added in v0.19.0

type CoreRewards []CoreReward

type DistKeeper added in v0.14.2

type DistKeeper interface {
	DistributeFromFeePool(ctx sdk.Context, amount sdk.Coins, receiveAddr sdk.AccAddress) error
}

DistKeeper defines the expected distribution keeper interface

type GenesisState

type GenesisState struct {
	Params            Params    `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	PreviousBlockTime time.Time `protobuf:"bytes,2,opt,name=previous_block_time,json=previousBlockTime,proto3,stdtime" json:"previous_block_time"`
}

GenesisState defines the kavadist module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns a default genesis state

func NewGenesisState

func NewGenesisState(params Params, previousBlockTime time.Time) *GenesisState

NewGenesisState returns a new genesis state

func (*GenesisState) Descriptor added in v0.16.0

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

func (*GenesisState) GetParams added in v0.16.0

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPreviousBlockTime added in v0.16.0

func (m *GenesisState) GetPreviousBlockTime() time.Time

func (*GenesisState) Marshal added in v0.16.0

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

func (*GenesisState) MarshalTo added in v0.16.0

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

func (*GenesisState) MarshalToSizedBuffer added in v0.16.0

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

func (*GenesisState) ProtoMessage added in v0.16.0

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset added in v0.16.0

func (m *GenesisState) Reset()

func (*GenesisState) Size added in v0.16.0

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

func (*GenesisState) String added in v0.16.0

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal added in v0.16.0

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic validation of genesis data returning an error for any failed validation criteria.

func (*GenesisState) XXX_DiscardUnknown added in v0.16.0

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal added in v0.16.0

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

func (*GenesisState) XXX_Merge added in v0.16.0

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

func (*GenesisState) XXX_Size added in v0.16.0

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal added in v0.16.0

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

type InfrastructureParams added in v0.19.0

type InfrastructureParams struct {
	InfrastructurePeriods Periods        `` /* 135-byte string literal not displayed */
	CoreRewards           CoreRewards    `protobuf:"bytes,2,rep,name=core_rewards,json=coreRewards,proto3,castrepeated=CoreRewards" json:"core_rewards"`
	PartnerRewards        PartnerRewards `protobuf:"bytes,3,rep,name=partner_rewards,json=partnerRewards,proto3,castrepeated=PartnerRewards" json:"partner_rewards"`
}

InfrastructureParams define the parameters for infrastructure rewards.

func NewInfraParams added in v0.19.0

func NewInfraParams(p Periods, pr PartnerRewards, cr CoreRewards) InfrastructureParams

func (*InfrastructureParams) Descriptor added in v0.19.0

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

func (*InfrastructureParams) Marshal added in v0.19.0

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

func (*InfrastructureParams) MarshalTo added in v0.19.0

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

func (*InfrastructureParams) MarshalToSizedBuffer added in v0.19.0

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

func (*InfrastructureParams) ProtoMessage added in v0.19.0

func (*InfrastructureParams) ProtoMessage()

func (*InfrastructureParams) Reset added in v0.19.0

func (m *InfrastructureParams) Reset()

func (*InfrastructureParams) Size added in v0.19.0

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

func (*InfrastructureParams) String added in v0.19.0

func (m *InfrastructureParams) String() string

func (*InfrastructureParams) Unmarshal added in v0.19.0

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

func (*InfrastructureParams) XXX_DiscardUnknown added in v0.19.0

func (m *InfrastructureParams) XXX_DiscardUnknown()

func (*InfrastructureParams) XXX_Marshal added in v0.19.0

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

func (*InfrastructureParams) XXX_Merge added in v0.19.0

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

func (*InfrastructureParams) XXX_Size added in v0.19.0

func (m *InfrastructureParams) XXX_Size() int

func (*InfrastructureParams) XXX_Unmarshal added in v0.19.0

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

type MultiSpendRecipient added in v0.14.2

type MultiSpendRecipient struct {
	Address string                                   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Amount  github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}

MultiSpendRecipient defines a recipient and the amount of coins they are receiving

func (*MultiSpendRecipient) Descriptor added in v0.16.0

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

func (MultiSpendRecipient) GetAddress added in v0.16.0

func (msr MultiSpendRecipient) GetAddress() sdk.AccAddress

Gets recipient address in sdk.AccAddress

func (*MultiSpendRecipient) Marshal added in v0.16.0

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

func (*MultiSpendRecipient) MarshalTo added in v0.16.0

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

func (*MultiSpendRecipient) MarshalToSizedBuffer added in v0.16.0

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

func (*MultiSpendRecipient) ProtoMessage added in v0.16.0

func (*MultiSpendRecipient) ProtoMessage()

func (*MultiSpendRecipient) Reset added in v0.16.0

func (m *MultiSpendRecipient) Reset()

func (*MultiSpendRecipient) Size added in v0.16.0

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

func (MultiSpendRecipient) String added in v0.14.2

func (msr MultiSpendRecipient) String() string

String implements fmt.Stringer

func (*MultiSpendRecipient) Unmarshal added in v0.16.0

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

func (MultiSpendRecipient) Validate added in v0.14.2

func (msr MultiSpendRecipient) Validate() error

Validate stateless validation of MultiSpendRecipient

func (*MultiSpendRecipient) XXX_DiscardUnknown added in v0.16.0

func (m *MultiSpendRecipient) XXX_DiscardUnknown()

func (*MultiSpendRecipient) XXX_Marshal added in v0.16.0

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

func (*MultiSpendRecipient) XXX_Merge added in v0.16.0

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

func (*MultiSpendRecipient) XXX_Size added in v0.16.0

func (m *MultiSpendRecipient) XXX_Size() int

func (*MultiSpendRecipient) XXX_Unmarshal added in v0.16.0

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

type Params

type Params struct {
	Active               bool                 `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"`
	Periods              []Period             `protobuf:"bytes,3,rep,name=periods,proto3" json:"periods"`
	InfrastructureParams InfrastructureParams `protobuf:"bytes,4,opt,name=infrastructure_params,json=infrastructureParams,proto3" json:"infrastructure_params"`
}

Params governance parameters for kavadist module

func DefaultParams

func DefaultParams() Params

func NewParams

func NewParams(active bool, periods []Period, infraParams InfrastructureParams) Params

func (*Params) Descriptor added in v0.16.0

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

func (Params) Equal added in v0.16.0

func (p Params) Equal(other Params) bool

func (*Params) Marshal added in v0.16.0

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

func (*Params) MarshalTo added in v0.16.0

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

func (*Params) MarshalToSizedBuffer added in v0.16.0

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs

func (*Params) ProtoMessage added in v0.16.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v0.16.0

func (m *Params) Reset()

func (*Params) Size added in v0.16.0

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

func (Params) String

func (p Params) String() string

func (*Params) Unmarshal added in v0.16.0

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

func (Params) Validate

func (p Params) Validate() error

Validate checks that the parameters have valid values.

func (*Params) XXX_DiscardUnknown added in v0.16.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v0.16.0

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

func (*Params) XXX_Merge added in v0.16.0

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

func (*Params) XXX_Size added in v0.16.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v0.16.0

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

type PartnerReward added in v0.19.0

type PartnerReward struct {
	Address          github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=address,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"address,omitempty"`
	RewardsPerSecond types.Coin                                    `protobuf:"bytes,2,opt,name=rewards_per_second,json=rewardsPerSecond,proto3" json:"rewards_per_second"`
}

PartnerRewards defines the reward schedule for partner infrastructure providers.

func NewPartnerReward added in v0.19.0

func NewPartnerReward(addr sdk.AccAddress, rps sdk.Coin) PartnerReward

func (*PartnerReward) Descriptor added in v0.19.0

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

func (*PartnerReward) Marshal added in v0.19.0

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

func (*PartnerReward) MarshalTo added in v0.19.0

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

func (*PartnerReward) MarshalToSizedBuffer added in v0.19.0

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

func (*PartnerReward) ProtoMessage added in v0.19.0

func (*PartnerReward) ProtoMessage()

func (*PartnerReward) Reset added in v0.19.0

func (m *PartnerReward) Reset()

func (*PartnerReward) Size added in v0.19.0

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

func (*PartnerReward) String added in v0.19.0

func (m *PartnerReward) String() string

func (*PartnerReward) Unmarshal added in v0.19.0

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

func (*PartnerReward) XXX_DiscardUnknown added in v0.19.0

func (m *PartnerReward) XXX_DiscardUnknown()

func (*PartnerReward) XXX_Marshal added in v0.19.0

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

func (*PartnerReward) XXX_Merge added in v0.19.0

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

func (*PartnerReward) XXX_Size added in v0.19.0

func (m *PartnerReward) XXX_Size() int

func (*PartnerReward) XXX_Unmarshal added in v0.19.0

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

type PartnerRewards added in v0.19.0

type PartnerRewards []PartnerReward

type Period

type Period struct {
	// example "2020-03-01T15:20:00Z"
	Start time.Time `protobuf:"bytes,1,opt,name=start,proto3,stdtime" json:"start"`
	// example "2020-06-01T15:20:00Z"
	End time.Time `protobuf:"bytes,2,opt,name=end,proto3,stdtime" json:"end"`
	// example "1.000000003022265980"  - 10% inflation
	Inflation github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,3,opt,name=inflation,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"inflation"`
}

Period stores the specified start and end dates, and the inflation, expressed as a decimal representing the yearly APR of KAVA tokens that will be minted during that period

func NewPeriod added in v0.8.0

func NewPeriod(start time.Time, end time.Time, inflation sdk.Dec) Period

NewPeriod returns a new instance of Period

func (*Period) Descriptor added in v0.16.0

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

func (*Period) Equal added in v0.16.0

func (this *Period) Equal(that interface{}) bool

func (*Period) Marshal added in v0.16.0

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

func (*Period) MarshalTo added in v0.16.0

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

func (*Period) MarshalToSizedBuffer added in v0.16.0

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

func (*Period) ProtoMessage added in v0.16.0

func (*Period) ProtoMessage()

func (*Period) Reset added in v0.16.0

func (m *Period) Reset()

func (*Period) Size added in v0.16.0

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

func (Period) String

func (pr Period) String() string

String implements fmt.Stringer

func (*Period) Unmarshal added in v0.16.0

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

func (*Period) XXX_DiscardUnknown added in v0.16.0

func (m *Period) XXX_DiscardUnknown()

func (*Period) XXX_Marshal added in v0.16.0

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

func (*Period) XXX_Merge added in v0.16.0

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

func (*Period) XXX_Size added in v0.16.0

func (m *Period) XXX_Size() int

func (*Period) XXX_Unmarshal added in v0.16.0

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

type Periods

type Periods []Period

type QueryBalanceRequest added in v0.16.0

type QueryBalanceRequest struct {
}

QueryBalanceRequest defines the request type for querying x/kavadist balance.

func (*QueryBalanceRequest) Descriptor added in v0.16.0

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

func (*QueryBalanceRequest) Marshal added in v0.16.0

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

func (*QueryBalanceRequest) MarshalTo added in v0.16.0

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

func (*QueryBalanceRequest) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryBalanceRequest) ProtoMessage added in v0.16.0

func (*QueryBalanceRequest) ProtoMessage()

func (*QueryBalanceRequest) Reset added in v0.16.0

func (m *QueryBalanceRequest) Reset()

func (*QueryBalanceRequest) Size added in v0.16.0

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

func (*QueryBalanceRequest) String added in v0.16.0

func (m *QueryBalanceRequest) String() string

func (*QueryBalanceRequest) Unmarshal added in v0.16.0

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

func (*QueryBalanceRequest) XXX_DiscardUnknown added in v0.16.0

func (m *QueryBalanceRequest) XXX_DiscardUnknown()

func (*QueryBalanceRequest) XXX_Marshal added in v0.16.0

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

func (*QueryBalanceRequest) XXX_Merge added in v0.16.0

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

func (*QueryBalanceRequest) XXX_Size added in v0.16.0

func (m *QueryBalanceRequest) XXX_Size() int

func (*QueryBalanceRequest) XXX_Unmarshal added in v0.16.0

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

type QueryBalanceResponse added in v0.16.0

type QueryBalanceResponse struct {
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins"`
}

QueryBalanceResponse defines the response type for querying x/kavadist balance.

func (*QueryBalanceResponse) Descriptor added in v0.16.0

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

func (*QueryBalanceResponse) GetCoins added in v0.16.0

func (*QueryBalanceResponse) Marshal added in v0.16.0

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

func (*QueryBalanceResponse) MarshalTo added in v0.16.0

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

func (*QueryBalanceResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryBalanceResponse) ProtoMessage added in v0.16.0

func (*QueryBalanceResponse) ProtoMessage()

func (*QueryBalanceResponse) Reset added in v0.16.0

func (m *QueryBalanceResponse) Reset()

func (*QueryBalanceResponse) Size added in v0.16.0

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

func (*QueryBalanceResponse) String added in v0.16.0

func (m *QueryBalanceResponse) String() string

func (*QueryBalanceResponse) Unmarshal added in v0.16.0

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

func (*QueryBalanceResponse) XXX_DiscardUnknown added in v0.16.0

func (m *QueryBalanceResponse) XXX_DiscardUnknown()

func (*QueryBalanceResponse) XXX_Marshal added in v0.16.0

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

func (*QueryBalanceResponse) XXX_Merge added in v0.16.0

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

func (*QueryBalanceResponse) XXX_Size added in v0.16.0

func (m *QueryBalanceResponse) XXX_Size() int

func (*QueryBalanceResponse) XXX_Unmarshal added in v0.16.0

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

type QueryClient added in v0.16.0

type QueryClient interface {
	// Params queries the parameters of x/kavadist module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Balance queries the balance of all coins of x/kavadist module.
	Balance(ctx context.Context, in *QueryBalanceRequest, opts ...grpc.CallOption) (*QueryBalanceResponse, 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 added in v0.16.0

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest added in v0.16.0

type QueryParamsRequest struct {
}

QueryParamsRequest defines the request type for querying x/kavadist parameters.

func (*QueryParamsRequest) Descriptor added in v0.16.0

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

func (*QueryParamsRequest) Marshal added in v0.16.0

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

func (*QueryParamsRequest) MarshalTo added in v0.16.0

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

func (*QueryParamsRequest) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryParamsRequest) ProtoMessage added in v0.16.0

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset added in v0.16.0

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size added in v0.16.0

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

func (*QueryParamsRequest) String added in v0.16.0

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal added in v0.16.0

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

func (*QueryParamsRequest) XXX_DiscardUnknown added in v0.16.0

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal added in v0.16.0

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

func (*QueryParamsRequest) XXX_Merge added in v0.16.0

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

func (*QueryParamsRequest) XXX_Size added in v0.16.0

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal added in v0.16.0

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

type QueryParamsResponse added in v0.16.0

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse defines the response type for querying x/kavadist parameters.

func (*QueryParamsResponse) Descriptor added in v0.16.0

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

func (*QueryParamsResponse) GetParams added in v0.16.0

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal added in v0.16.0

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

func (*QueryParamsResponse) MarshalTo added in v0.16.0

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

func (*QueryParamsResponse) MarshalToSizedBuffer added in v0.16.0

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

func (*QueryParamsResponse) ProtoMessage added in v0.16.0

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset added in v0.16.0

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size added in v0.16.0

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

func (*QueryParamsResponse) String added in v0.16.0

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal added in v0.16.0

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

func (*QueryParamsResponse) XXX_DiscardUnknown added in v0.16.0

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal added in v0.16.0

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

func (*QueryParamsResponse) XXX_Merge added in v0.16.0

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

func (*QueryParamsResponse) XXX_Size added in v0.16.0

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal added in v0.16.0

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

type QueryServer added in v0.16.0

type QueryServer interface {
	// Params queries the parameters of x/kavadist module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Balance queries the balance of all coins of x/kavadist module.
	Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedQueryServer added in v0.16.0

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Balance added in v0.16.0

func (*UnimplementedQueryServer) Params added in v0.16.0

Jump to

Keyboard shortcuts

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