types

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	NanosecondsPerSecond = 1_000_000_000
	SecondsPerMinute     = 60
	MinutesPerHour       = 60
	HoursPerDay          = 24
	// DaysPerYear is the mean length of the Gregorian calendar year. Note this
	// value isn't 365 because 97 out of 400 years are leap years. See
	// https://en.wikipedia.org/wiki/Year
	DaysPerYear        = 365.2425
	SecondsPerYear     = int64(SecondsPerMinute * MinutesPerHour * HoursPerDay * DaysPerYear) // 31,556,952
	NanosecondsPerYear = NanosecondsPerSecond * SecondsPerYear                                // 31,556,952,000,000,000

	// InitialInflationRate is the inflation rate that the network starts at.
	InitialInflationRate = 0.08
	// DisinflationRate is the rate at which the inflation rate decreases each year.
	DisinflationRate = 0.1
	// TargetInflationRate is the inflation rate that the network aims to
	// stabilize at. In practice, TargetInflationRate acts as a minimum so that
	// the inflation rate doesn't decrease after reaching it.
	TargetInflationRate = 0.015
)
View Source
const (
	EventTypeMint = ModuleName

	AttributeKeyInflationRate    = "inflation_rate"
	AttributeKeyAnnualProvisions = "annual_provisions"
)
View Source
const (
	// ModuleName is the name of the mint module.
	ModuleName = "mint"

	// StoreKey is the default store key for mint
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the mint store.
	QuerierRoute = StoreKey

	// Query endpoints supported by the mint querier
	QueryInflationRate    = "inflation_rate"
	QueryAnnualProvisions = "annual_provisions"
	QueryGenesisTime      = "genesis_time"
)
View Source
const DefaultBondDenom = "utia"

Variables

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthMint        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMint          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMint = 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 KeyGenesisTime = []byte("GenesisTime")

KeyGenesisTime is the key to use for GenesisTime in the mint store.

View Source
var KeyMinter = []byte("Minter")

KeyMinter is the key to use for the Minter in the mint store.

Functions

func DisinflationRateAsDec

func DisinflationRateAsDec() sdk.Dec

func InitialInflationRateAsDec

func InitialInflationRateAsDec() sdk.Dec

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)

func TargetInflationRateAsDec

func TargetInflationRateAsDec() sdk.Dec

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis validates the provided genesis state to ensure the expected invariants holds.

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(name string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, moduleName string) types.ModuleAccountI
}

AccountKeeper defines the contract required for account APIs.

type BankKeeper

type BankKeeper interface {
	SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error
}

BankKeeper defines the contract needed to be fulfilled for banking and supply dependencies.

type GenesisState

type GenesisState struct {
	// BondDenom is the denomination of the token that should be minted.
	BondDenom string `protobuf:"bytes,2,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty"`
}

GenesisState defines the mint module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState creates a default GenesisState object

func NewGenesisState

func NewGenesisState(bondDenom string) *GenesisState

NewGenesisState creates a new GenesisState object

func (*GenesisState) Descriptor

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

func (*GenesisState) GetBondDenom

func (m *GenesisState) GetBondDenom() string

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) 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 GenesisTime

type GenesisTime struct {
	// GenesisTime is the timestamp of the genesis block.
	GenesisTime *time.Time `protobuf:"bytes,1,opt,name=genesis_time,json=genesisTime,proto3,stdtime" json:"genesis_time,omitempty"`
}

GenesisTime contains the timestamp of the genesis block.

func (*GenesisTime) Descriptor

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

func (*GenesisTime) GetGenesisTime

func (m *GenesisTime) GetGenesisTime() *time.Time

func (*GenesisTime) Marshal

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

func (*GenesisTime) MarshalTo

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

func (*GenesisTime) MarshalToSizedBuffer

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

func (*GenesisTime) ProtoMessage

func (*GenesisTime) ProtoMessage()

func (*GenesisTime) Reset

func (m *GenesisTime) Reset()

func (*GenesisTime) Size

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

func (*GenesisTime) String

func (m *GenesisTime) String() string

func (*GenesisTime) Unmarshal

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

func (*GenesisTime) XXX_DiscardUnknown

func (m *GenesisTime) XXX_DiscardUnknown()

func (*GenesisTime) XXX_Marshal

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

func (*GenesisTime) XXX_Merge

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

func (*GenesisTime) XXX_Size

func (m *GenesisTime) XXX_Size() int

func (*GenesisTime) XXX_Unmarshal

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

type Minter

type Minter struct {
	// InflationRate is the rate at which new tokens should be minted for the
	// current year. For example if InflationRate=0.1, then 10% of the total
	// supply will be minted over the course of the year.
	InflationRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */
	// AnnualProvisions is the total number of tokens to be minted in the current
	// year due to inflation.
	AnnualProvisions github_com_cosmos_cosmos_sdk_types.Dec `` /* 149-byte string literal not displayed */
	// PreviousBlockTime is the timestamp of the previous block.
	PreviousBlockTime *time.Time `protobuf:"bytes,4,opt,name=previous_block_time,json=previousBlockTime,proto3,stdtime" json:"previous_block_time,omitempty"`
	// BondDenom is the denomination of the token that should be minted.
	BondDenom string `protobuf:"bytes,5,opt,name=bond_denom,json=bondDenom,proto3" json:"bond_denom,omitempty"`
}

Minter represents the mint state.

func DefaultMinter

func DefaultMinter() Minter

DefaultMinter returns a Minter object with default values.

func NewMinter

func NewMinter(inflationRate sdk.Dec, annualProvisions sdk.Dec, bondDenom string) Minter

NewMinter returns a new Minter object.

func (Minter) CalculateBlockProvision

func (m Minter) CalculateBlockProvision(current time.Time, previous time.Time) (sdk.Coin, error)

CalculateBlockProvision returns the total number of coins that should be minted due to inflation for the current block.

func (Minter) CalculateInflationRate

func (m Minter) CalculateInflationRate(ctx sdk.Context, genesis time.Time) sdk.Dec

CalculateInflationRate returns the inflation rate for the current year depending on the current block height in context. The inflation rate is expected to decrease every year according to the schedule specified in the README.

func (*Minter) Descriptor

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

func (*Minter) GetBondDenom

func (m *Minter) GetBondDenom() string

func (*Minter) GetPreviousBlockTime

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

func (*Minter) Marshal

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

func (*Minter) MarshalTo

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

func (*Minter) MarshalToSizedBuffer

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

func (*Minter) ProtoMessage

func (*Minter) ProtoMessage()

func (*Minter) Reset

func (m *Minter) Reset()

func (*Minter) Size

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

func (*Minter) String

func (m *Minter) String() string

func (*Minter) Unmarshal

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

func (Minter) Validate

func (m Minter) Validate() error

Validate returns an error if the minter is invalid.

func (*Minter) XXX_DiscardUnknown

func (m *Minter) XXX_DiscardUnknown()

func (*Minter) XXX_Marshal

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

func (*Minter) XXX_Merge

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

func (*Minter) XXX_Size

func (m *Minter) XXX_Size() int

func (*Minter) XXX_Unmarshal

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

type QueryAnnualProvisionsRequest

type QueryAnnualProvisionsRequest struct {
}

QueryAnnualProvisionsRequest is the request type for the Query/AnnualProvisions RPC method.

func (*QueryAnnualProvisionsRequest) Descriptor

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

func (*QueryAnnualProvisionsRequest) Marshal

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

func (*QueryAnnualProvisionsRequest) MarshalTo

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

func (*QueryAnnualProvisionsRequest) MarshalToSizedBuffer

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

func (*QueryAnnualProvisionsRequest) ProtoMessage

func (*QueryAnnualProvisionsRequest) ProtoMessage()

func (*QueryAnnualProvisionsRequest) Reset

func (m *QueryAnnualProvisionsRequest) Reset()

func (*QueryAnnualProvisionsRequest) Size

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

func (*QueryAnnualProvisionsRequest) String

func (*QueryAnnualProvisionsRequest) Unmarshal

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

func (*QueryAnnualProvisionsRequest) XXX_DiscardUnknown

func (m *QueryAnnualProvisionsRequest) XXX_DiscardUnknown()

func (*QueryAnnualProvisionsRequest) XXX_Marshal

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

func (*QueryAnnualProvisionsRequest) XXX_Merge

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

func (*QueryAnnualProvisionsRequest) XXX_Size

func (m *QueryAnnualProvisionsRequest) XXX_Size() int

func (*QueryAnnualProvisionsRequest) XXX_Unmarshal

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

type QueryAnnualProvisionsResponse

type QueryAnnualProvisionsResponse struct {
	// AnnualProvisions is the current annual provisions.
	AnnualProvisions github_com_cosmos_cosmos_sdk_types.Dec `` /* 149-byte string literal not displayed */
}

QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method.

func (*QueryAnnualProvisionsResponse) Descriptor

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

func (*QueryAnnualProvisionsResponse) Marshal

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

func (*QueryAnnualProvisionsResponse) MarshalTo

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

func (*QueryAnnualProvisionsResponse) MarshalToSizedBuffer

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

func (*QueryAnnualProvisionsResponse) ProtoMessage

func (*QueryAnnualProvisionsResponse) ProtoMessage()

func (*QueryAnnualProvisionsResponse) Reset

func (m *QueryAnnualProvisionsResponse) Reset()

func (*QueryAnnualProvisionsResponse) Size

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

func (*QueryAnnualProvisionsResponse) String

func (*QueryAnnualProvisionsResponse) Unmarshal

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

func (*QueryAnnualProvisionsResponse) XXX_DiscardUnknown

func (m *QueryAnnualProvisionsResponse) XXX_DiscardUnknown()

func (*QueryAnnualProvisionsResponse) XXX_Marshal

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

func (*QueryAnnualProvisionsResponse) XXX_Merge

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

func (*QueryAnnualProvisionsResponse) XXX_Size

func (m *QueryAnnualProvisionsResponse) XXX_Size() int

func (*QueryAnnualProvisionsResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// InflationRate returns the current inflation rate.
	InflationRate(ctx context.Context, in *QueryInflationRateRequest, opts ...grpc.CallOption) (*QueryInflationRateResponse, error)
	// AnnualProvisions returns the current annual provisions.
	AnnualProvisions(ctx context.Context, in *QueryAnnualProvisionsRequest, opts ...grpc.CallOption) (*QueryAnnualProvisionsResponse, error)
	// GenesisTime returns the genesis time.
	GenesisTime(ctx context.Context, in *QueryGenesisTimeRequest, opts ...grpc.CallOption) (*QueryGenesisTimeResponse, 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 QueryGenesisTimeRequest

type QueryGenesisTimeRequest struct {
}

QueryGenesisTimeRequest is the request type for the Query/GenesisTime RPC method.

func (*QueryGenesisTimeRequest) Descriptor

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

func (*QueryGenesisTimeRequest) Marshal

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

func (*QueryGenesisTimeRequest) MarshalTo

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

func (*QueryGenesisTimeRequest) MarshalToSizedBuffer

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

func (*QueryGenesisTimeRequest) ProtoMessage

func (*QueryGenesisTimeRequest) ProtoMessage()

func (*QueryGenesisTimeRequest) Reset

func (m *QueryGenesisTimeRequest) Reset()

func (*QueryGenesisTimeRequest) Size

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

func (*QueryGenesisTimeRequest) String

func (m *QueryGenesisTimeRequest) String() string

func (*QueryGenesisTimeRequest) Unmarshal

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

func (*QueryGenesisTimeRequest) XXX_DiscardUnknown

func (m *QueryGenesisTimeRequest) XXX_DiscardUnknown()

func (*QueryGenesisTimeRequest) XXX_Marshal

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

func (*QueryGenesisTimeRequest) XXX_Merge

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

func (*QueryGenesisTimeRequest) XXX_Size

func (m *QueryGenesisTimeRequest) XXX_Size() int

func (*QueryGenesisTimeRequest) XXX_Unmarshal

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

type QueryGenesisTimeResponse

type QueryGenesisTimeResponse struct {
	// GenesisTime is the timestamp associated with the first block.
	GenesisTime *time.Time `protobuf:"bytes,1,opt,name=genesis_time,json=genesisTime,proto3,stdtime" json:"genesis_time,omitempty"`
}

QueryGenesisTimeResponse is the response type for the Query/GenesisTime RPC method.

func (*QueryGenesisTimeResponse) Descriptor

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

func (*QueryGenesisTimeResponse) GetGenesisTime

func (m *QueryGenesisTimeResponse) GetGenesisTime() *time.Time

func (*QueryGenesisTimeResponse) Marshal

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

func (*QueryGenesisTimeResponse) MarshalTo

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

func (*QueryGenesisTimeResponse) MarshalToSizedBuffer

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

func (*QueryGenesisTimeResponse) ProtoMessage

func (*QueryGenesisTimeResponse) ProtoMessage()

func (*QueryGenesisTimeResponse) Reset

func (m *QueryGenesisTimeResponse) Reset()

func (*QueryGenesisTimeResponse) Size

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

func (*QueryGenesisTimeResponse) String

func (m *QueryGenesisTimeResponse) String() string

func (*QueryGenesisTimeResponse) Unmarshal

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

func (*QueryGenesisTimeResponse) XXX_DiscardUnknown

func (m *QueryGenesisTimeResponse) XXX_DiscardUnknown()

func (*QueryGenesisTimeResponse) XXX_Marshal

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

func (*QueryGenesisTimeResponse) XXX_Merge

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

func (*QueryGenesisTimeResponse) XXX_Size

func (m *QueryGenesisTimeResponse) XXX_Size() int

func (*QueryGenesisTimeResponse) XXX_Unmarshal

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

type QueryInflationRateRequest

type QueryInflationRateRequest struct {
}

QueryInflationRateRequest is the request type for the Query/InflationRate RPC method.

func (*QueryInflationRateRequest) Descriptor

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

func (*QueryInflationRateRequest) Marshal

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

func (*QueryInflationRateRequest) MarshalTo

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

func (*QueryInflationRateRequest) MarshalToSizedBuffer

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

func (*QueryInflationRateRequest) ProtoMessage

func (*QueryInflationRateRequest) ProtoMessage()

func (*QueryInflationRateRequest) Reset

func (m *QueryInflationRateRequest) Reset()

func (*QueryInflationRateRequest) Size

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

func (*QueryInflationRateRequest) String

func (m *QueryInflationRateRequest) String() string

func (*QueryInflationRateRequest) Unmarshal

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

func (*QueryInflationRateRequest) XXX_DiscardUnknown

func (m *QueryInflationRateRequest) XXX_DiscardUnknown()

func (*QueryInflationRateRequest) XXX_Marshal

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

func (*QueryInflationRateRequest) XXX_Merge

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

func (*QueryInflationRateRequest) XXX_Size

func (m *QueryInflationRateRequest) XXX_Size() int

func (*QueryInflationRateRequest) XXX_Unmarshal

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

type QueryInflationRateResponse

type QueryInflationRateResponse struct {
	// InflationRate is the current inflation rate.
	InflationRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */
}

QueryInflationRateResponse is the response type for the Query/InflationRate RPC method.

func (*QueryInflationRateResponse) Descriptor

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

func (*QueryInflationRateResponse) Marshal

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

func (*QueryInflationRateResponse) MarshalTo

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

func (*QueryInflationRateResponse) MarshalToSizedBuffer

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

func (*QueryInflationRateResponse) ProtoMessage

func (*QueryInflationRateResponse) ProtoMessage()

func (*QueryInflationRateResponse) Reset

func (m *QueryInflationRateResponse) Reset()

func (*QueryInflationRateResponse) Size

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

func (*QueryInflationRateResponse) String

func (m *QueryInflationRateResponse) String() string

func (*QueryInflationRateResponse) Unmarshal

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

func (*QueryInflationRateResponse) XXX_DiscardUnknown

func (m *QueryInflationRateResponse) XXX_DiscardUnknown()

func (*QueryInflationRateResponse) XXX_Marshal

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

func (*QueryInflationRateResponse) XXX_Merge

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

func (*QueryInflationRateResponse) XXX_Size

func (m *QueryInflationRateResponse) XXX_Size() int

func (*QueryInflationRateResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// InflationRate returns the current inflation rate.
	InflationRate(context.Context, *QueryInflationRateRequest) (*QueryInflationRateResponse, error)
	// AnnualProvisions returns the current annual provisions.
	AnnualProvisions(context.Context, *QueryAnnualProvisionsRequest) (*QueryAnnualProvisionsResponse, error)
	// GenesisTime returns the genesis time.
	GenesisTime(context.Context, *QueryGenesisTimeRequest) (*QueryGenesisTimeResponse, error)
}

QueryServer is the server API for Query service.

type StakingKeeper

type StakingKeeper interface {
	StakingTokenSupply(ctx sdk.Context) math.Int
}

StakingKeeper defines the expected staking keeper.

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AnnualProvisions

func (*UnimplementedQueryServer) GenesisTime

func (*UnimplementedQueryServer) InflationRate

Jump to

Keyboard shortcuts

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