types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeNemoDist      = ModuleName
	AttributeKeyInflation  = "nemo_dist_inflation"
	AttributeKeyStatus     = "nemo_dist_status"
	AttributeValueInactive = "inactive"
)
View Source
const (
	// ModuleName name that will be used throughout the module
	ModuleName = "nemodist"

	// 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

	// NemoDistMacc module account for nemodist
	NemoDistMacc = ModuleName

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

Querier routes for the nemodist module

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

Variables

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

x/nemodist 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                 = "ufury" // 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

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

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

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 {
	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

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

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

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

NewCommunityPoolMultiSpendProposal creates a new community pool multi-spend proposal.

func (*CommunityPoolMultiSpendProposal) Descriptor

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

func (CommunityPoolMultiSpendProposal) GetDescription

func (csp CommunityPoolMultiSpendProposal) GetDescription() string

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

func (CommunityPoolMultiSpendProposal) GetTitle

func (csp CommunityPoolMultiSpendProposal) GetTitle() string

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

func (*CommunityPoolMultiSpendProposal) Marshal

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

func (*CommunityPoolMultiSpendProposal) MarshalTo

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

func (*CommunityPoolMultiSpendProposal) MarshalToSizedBuffer

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

func (CommunityPoolMultiSpendProposal) ProposalRoute

func (csp CommunityPoolMultiSpendProposal) ProposalRoute() string

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

func (CommunityPoolMultiSpendProposal) ProposalType

func (csp CommunityPoolMultiSpendProposal) ProposalType() string

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

func (*CommunityPoolMultiSpendProposal) ProtoMessage

func (*CommunityPoolMultiSpendProposal) ProtoMessage()

func (*CommunityPoolMultiSpendProposal) Reset

func (*CommunityPoolMultiSpendProposal) Size

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

func (CommunityPoolMultiSpendProposal) String

String implements fmt.Stringer

func (*CommunityPoolMultiSpendProposal) Unmarshal

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

func (CommunityPoolMultiSpendProposal) ValidateBasic

func (csp CommunityPoolMultiSpendProposal) ValidateBasic() error

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

func (*CommunityPoolMultiSpendProposal) XXX_DiscardUnknown

func (m *CommunityPoolMultiSpendProposal) XXX_DiscardUnknown()

func (*CommunityPoolMultiSpendProposal) XXX_Marshal

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

func (*CommunityPoolMultiSpendProposal) XXX_Merge

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

func (*CommunityPoolMultiSpendProposal) XXX_Size

func (m *CommunityPoolMultiSpendProposal) XXX_Size() int

func (*CommunityPoolMultiSpendProposal) XXX_Unmarshal

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

type CommunityPoolMultiSpendProposalJSON

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

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

func (*CommunityPoolMultiSpendProposalJSON) Marshal

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

func (*CommunityPoolMultiSpendProposalJSON) MarshalTo

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

func (*CommunityPoolMultiSpendProposalJSON) MarshalToSizedBuffer

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

func (*CommunityPoolMultiSpendProposalJSON) ProtoMessage

func (*CommunityPoolMultiSpendProposalJSON) ProtoMessage()

func (*CommunityPoolMultiSpendProposalJSON) Reset

func (*CommunityPoolMultiSpendProposalJSON) Size

func (*CommunityPoolMultiSpendProposalJSON) String

func (*CommunityPoolMultiSpendProposalJSON) Unmarshal

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

func (*CommunityPoolMultiSpendProposalJSON) XXX_DiscardUnknown

func (m *CommunityPoolMultiSpendProposalJSON) XXX_DiscardUnknown()

func (*CommunityPoolMultiSpendProposalJSON) XXX_Marshal

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

func (*CommunityPoolMultiSpendProposalJSON) XXX_Merge

func (*CommunityPoolMultiSpendProposalJSON) XXX_Size

func (*CommunityPoolMultiSpendProposalJSON) XXX_Unmarshal

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

type CoreReward

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

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

func (*CoreReward) Descriptor

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

func (*CoreReward) Marshal

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

func (*CoreReward) MarshalTo

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

func (*CoreReward) MarshalToSizedBuffer

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

func (*CoreReward) ProtoMessage

func (*CoreReward) ProtoMessage()

func (*CoreReward) Reset

func (m *CoreReward) Reset()

func (*CoreReward) Size

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

func (*CoreReward) String

func (m *CoreReward) String() string

func (*CoreReward) Unmarshal

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

func (*CoreReward) XXX_DiscardUnknown

func (m *CoreReward) XXX_DiscardUnknown()

func (*CoreReward) XXX_Marshal

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

func (*CoreReward) XXX_Merge

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

func (*CoreReward) XXX_Size

func (m *CoreReward) XXX_Size() int

func (*CoreReward) XXX_Unmarshal

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

type CoreRewards

type CoreRewards []CoreReward

type DistKeeper

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 nemodist 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

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPreviousBlockTime

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

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) 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

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 InfrastructureParams

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 (*InfrastructureParams) Descriptor

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

func (*InfrastructureParams) Marshal

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

func (*InfrastructureParams) MarshalTo

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

func (*InfrastructureParams) MarshalToSizedBuffer

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

func (*InfrastructureParams) ProtoMessage

func (*InfrastructureParams) ProtoMessage()

func (*InfrastructureParams) Reset

func (m *InfrastructureParams) Reset()

func (*InfrastructureParams) Size

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

func (*InfrastructureParams) String

func (m *InfrastructureParams) String() string

func (*InfrastructureParams) Unmarshal

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

func (*InfrastructureParams) XXX_DiscardUnknown

func (m *InfrastructureParams) XXX_DiscardUnknown()

func (*InfrastructureParams) XXX_Marshal

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

func (*InfrastructureParams) XXX_Merge

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

func (*InfrastructureParams) XXX_Size

func (m *InfrastructureParams) XXX_Size() int

func (*InfrastructureParams) XXX_Unmarshal

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

type MultiSpendRecipient

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

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

func (MultiSpendRecipient) GetAddress

func (msr MultiSpendRecipient) GetAddress() sdk.AccAddress

Gets recipient address in sdk.AccAddress

func (*MultiSpendRecipient) Marshal

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

func (*MultiSpendRecipient) MarshalTo

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

func (*MultiSpendRecipient) MarshalToSizedBuffer

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

func (*MultiSpendRecipient) ProtoMessage

func (*MultiSpendRecipient) ProtoMessage()

func (*MultiSpendRecipient) Reset

func (m *MultiSpendRecipient) Reset()

func (*MultiSpendRecipient) Size

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

func (MultiSpendRecipient) String

func (msr MultiSpendRecipient) String() string

String implements fmt.Stringer

func (*MultiSpendRecipient) Unmarshal

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

func (MultiSpendRecipient) Validate

func (msr MultiSpendRecipient) Validate() error

Validate stateless validation of MultiSpendRecipient

func (*MultiSpendRecipient) XXX_DiscardUnknown

func (m *MultiSpendRecipient) XXX_DiscardUnknown()

func (*MultiSpendRecipient) XXX_Marshal

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

func (*MultiSpendRecipient) XXX_Merge

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

func (*MultiSpendRecipient) XXX_Size

func (m *MultiSpendRecipient) XXX_Size() int

func (*MultiSpendRecipient) XXX_Unmarshal

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 nemodist module

func DefaultParams

func DefaultParams() Params

func NewParams

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

func (*Params) Descriptor

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

func (Params) Equal

func (p Params) Equal(other Params) bool

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (Params) String

func (p Params) String() string

func (*Params) Unmarshal

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

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type PartnerReward

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

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

func (*PartnerReward) Descriptor

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

func (*PartnerReward) Marshal

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

func (*PartnerReward) MarshalTo

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

func (*PartnerReward) MarshalToSizedBuffer

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

func (*PartnerReward) ProtoMessage

func (*PartnerReward) ProtoMessage()

func (*PartnerReward) Reset

func (m *PartnerReward) Reset()

func (*PartnerReward) Size

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

func (*PartnerReward) String

func (m *PartnerReward) String() string

func (*PartnerReward) Unmarshal

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

func (*PartnerReward) XXX_DiscardUnknown

func (m *PartnerReward) XXX_DiscardUnknown()

func (*PartnerReward) XXX_Marshal

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

func (*PartnerReward) XXX_Merge

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

func (*PartnerReward) XXX_Size

func (m *PartnerReward) XXX_Size() int

func (*PartnerReward) XXX_Unmarshal

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

type PartnerRewards

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 NEMO tokens that will be minted during that period

func NewPeriod

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

NewPeriod returns a new instance of Period

func (*Period) Descriptor

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

func (*Period) Equal

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

func (*Period) Marshal

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

func (*Period) MarshalTo

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

func (*Period) MarshalToSizedBuffer

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

func (*Period) ProtoMessage

func (*Period) ProtoMessage()

func (*Period) Reset

func (m *Period) Reset()

func (*Period) Size

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

func (Period) String

func (pr Period) String() string

String implements fmt.Stringer

func (*Period) Unmarshal

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

func (*Period) XXX_DiscardUnknown

func (m *Period) XXX_DiscardUnknown()

func (*Period) XXX_Marshal

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

func (*Period) XXX_Merge

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

func (*Period) XXX_Size

func (m *Period) XXX_Size() int

func (*Period) XXX_Unmarshal

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

type Periods

type Periods []Period

type QueryBalanceRequest

type QueryBalanceRequest struct {
}

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

func (*QueryBalanceRequest) Descriptor

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

func (*QueryBalanceRequest) Marshal

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

func (*QueryBalanceRequest) MarshalTo

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

func (*QueryBalanceRequest) MarshalToSizedBuffer

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

func (*QueryBalanceRequest) ProtoMessage

func (*QueryBalanceRequest) ProtoMessage()

func (*QueryBalanceRequest) Reset

func (m *QueryBalanceRequest) Reset()

func (*QueryBalanceRequest) Size

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

func (*QueryBalanceRequest) String

func (m *QueryBalanceRequest) String() string

func (*QueryBalanceRequest) Unmarshal

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

func (*QueryBalanceRequest) XXX_DiscardUnknown

func (m *QueryBalanceRequest) XXX_DiscardUnknown()

func (*QueryBalanceRequest) XXX_Marshal

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

func (*QueryBalanceRequest) XXX_Merge

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

func (*QueryBalanceRequest) XXX_Size

func (m *QueryBalanceRequest) XXX_Size() int

func (*QueryBalanceRequest) XXX_Unmarshal

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

type QueryBalanceResponse

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/nemodist balance.

func (*QueryBalanceResponse) Descriptor

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

func (*QueryBalanceResponse) GetCoins

func (*QueryBalanceResponse) Marshal

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

func (*QueryBalanceResponse) MarshalTo

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

func (*QueryBalanceResponse) MarshalToSizedBuffer

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

func (*QueryBalanceResponse) ProtoMessage

func (*QueryBalanceResponse) ProtoMessage()

func (*QueryBalanceResponse) Reset

func (m *QueryBalanceResponse) Reset()

func (*QueryBalanceResponse) Size

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

func (*QueryBalanceResponse) String

func (m *QueryBalanceResponse) String() string

func (*QueryBalanceResponse) Unmarshal

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

func (*QueryBalanceResponse) XXX_DiscardUnknown

func (m *QueryBalanceResponse) XXX_DiscardUnknown()

func (*QueryBalanceResponse) XXX_Marshal

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

func (*QueryBalanceResponse) XXX_Merge

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

func (*QueryBalanceResponse) XXX_Size

func (m *QueryBalanceResponse) XXX_Size() int

func (*QueryBalanceResponse) XXX_Unmarshal

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

type QueryClient

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

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
}

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

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 defines the response type for querying x/nemodist parameters.

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 queries the parameters of x/nemodist module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Balance queries the balance of all coins of x/nemodist module.
	Balance(context.Context, *QueryBalanceRequest) (*QueryBalanceResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Balance

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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