types

package
v0.1.4-202309124022-mf... Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeSavingsDeposit    = "deposit_savings"
	EventTypeSavingsWithdrawal = "withdraw_savings"

	AttributeValueCategory = ModuleName
	AttributeKeyAmount     = "amount"
	AttributeKeyDepositor  = "depositor"
)
View Source
const (
	// ModuleName The name that will be used throughout the module
	ModuleName = "savings"

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

	// RouterKey Top level router key
	RouterKey = ModuleName

	// QuerierRoute is the querier route for gov
	QuerierRoute = ModuleName

	// DefaultParamspace default namestore
	DefaultParamspace = ModuleName

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

Variables

View Source
var (
	// ErrEmptyInput error for empty input
	ErrEmptyInput = errorsmod.Register(ModuleName, 2, "input must not be empty")
	// ErrNoDepositFound error when no deposit is found for an address
	ErrNoDepositFound = errorsmod.Register(ModuleName, 3, "no deposit found")
	// ErrInvalidDepositDenom error for invalid deposit denom
	ErrInvalidDepositDenom = errorsmod.Register(ModuleName, 4, "invalid deposit denom")
	// ErrInvalidWithdrawDenom error for invalid withdraw denoms
	ErrInvalidWithdrawDenom = errorsmod.Register(ModuleName, 5, "invalid withdraw denom")
)
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 (
	KeySupportedDenoms     = []byte("SupportedDenoms")
	DefaultSupportedDenoms = []string{}
)

Parameter keys

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 (
	ErrInvalidLengthStore        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStore          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStore = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var DepositsKeyPrefix = []byte{0x01}
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable Key declaration for parameters

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

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

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	SetAccount(ctx sdk.Context, acc authtypes.AccountI)

	GetModuleAddress(name string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI
}

AccountKeeper defines the expected keeper interface for interacting with account

type BankKeeper

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

	GetSupply(ctx sdk.Context, denom string) sdk.Coin
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected bank keeper

type Deposit

type Deposit struct {
	Depositor github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 126-byte string literal not displayed */
	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"`
}

Deposit defines an amount of coins deposited into a savings module account.

func NewDeposit

func NewDeposit(depositor sdk.AccAddress, amount sdk.Coins) Deposit

NewDeposit returns a new deposit

func (*Deposit) Descriptor

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

func (*Deposit) Marshal

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

func (*Deposit) MarshalTo

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

func (*Deposit) MarshalToSizedBuffer

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

func (*Deposit) ProtoMessage

func (*Deposit) ProtoMessage()

func (*Deposit) Reset

func (m *Deposit) Reset()

func (*Deposit) Size

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

func (*Deposit) String

func (m *Deposit) String() string

func (*Deposit) Unmarshal

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

func (Deposit) Validate

func (d Deposit) Validate() error

Validate deposit validation

func (*Deposit) XXX_DiscardUnknown

func (m *Deposit) XXX_DiscardUnknown()

func (*Deposit) XXX_Marshal

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

func (*Deposit) XXX_Merge

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

func (*Deposit) XXX_Size

func (m *Deposit) XXX_Size() int

func (*Deposit) XXX_Unmarshal

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

type Deposits

type Deposits []Deposit

Deposits is a slice of Deposit

func (Deposits) Validate

func (ds Deposits) Validate() error

Validate validates Deposits

type GenesisState

type GenesisState struct {
	// params defines all the parameters of the module.
	Params   Params   `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	Deposits Deposits `protobuf:"bytes,2,rep,name=deposits,proto3,castrepeated=Deposits" json:"deposits"`
}

GenesisState defines the savings module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState defines default GenesisState for savings

func NewGenesisState

func NewGenesisState(p Params, deposits Deposits) GenesisState

NewGenesisState creates a new genesis state for the savings module

func (*GenesisState) Descriptor

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

func (*GenesisState) GetDeposits

func (m *GenesisState) GetDeposits() Deposits

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

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 LiquidKeeper

type LiquidKeeper interface {
	GetStakedTokensForDerivatives(ctx sdk.Context, derivatives sdk.Coins) (sdk.Coin, error)
	IsDerivativeDenom(ctx sdk.Context, denom string) bool
}

type MsgClient

type MsgClient interface {
	// Deposit defines a method for depositing funds to the savings module account
	Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error)
	// Withdraw defines a method for withdrawing funds to the savings module account
	Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgDeposit

type MsgDeposit struct {
	Depositor string                                   `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor,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"`
}

MsgDeposit defines the Msg/Deposit request type.

func NewMsgDeposit

func NewMsgDeposit(depositor sdk.AccAddress, amount sdk.Coins) MsgDeposit

NewMsgDeposit returns a new MsgDeposit

func (*MsgDeposit) Descriptor

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

func (*MsgDeposit) GetAmount

func (*MsgDeposit) GetDepositor

func (m *MsgDeposit) GetDepositor() string

func (MsgDeposit) GetSignBytes

func (msg MsgDeposit) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgDeposit) GetSigners

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

GetSigners returns the addresses of signers that must sign.

func (*MsgDeposit) Marshal

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

func (*MsgDeposit) MarshalTo

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

func (*MsgDeposit) MarshalToSizedBuffer

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

func (*MsgDeposit) ProtoMessage

func (*MsgDeposit) ProtoMessage()

func (*MsgDeposit) Reset

func (m *MsgDeposit) Reset()

func (MsgDeposit) Route

func (msg MsgDeposit) Route() string

Route return the message type used for routing the message.

func (*MsgDeposit) Size

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

func (*MsgDeposit) String

func (m *MsgDeposit) String() string

func (MsgDeposit) Type

func (msg MsgDeposit) Type() string

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

func (*MsgDeposit) Unmarshal

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

func (MsgDeposit) ValidateBasic

func (msg MsgDeposit) ValidateBasic() error

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

func (*MsgDeposit) XXX_DiscardUnknown

func (m *MsgDeposit) XXX_DiscardUnknown()

func (*MsgDeposit) XXX_Marshal

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

func (*MsgDeposit) XXX_Merge

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

func (*MsgDeposit) XXX_Size

func (m *MsgDeposit) XXX_Size() int

func (*MsgDeposit) XXX_Unmarshal

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

type MsgDepositResponse

type MsgDepositResponse struct {
}

MsgDepositResponse defines the Msg/Deposit response type.

func (*MsgDepositResponse) Descriptor

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

func (*MsgDepositResponse) Marshal

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

func (*MsgDepositResponse) MarshalTo

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

func (*MsgDepositResponse) MarshalToSizedBuffer

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

func (*MsgDepositResponse) ProtoMessage

func (*MsgDepositResponse) ProtoMessage()

func (*MsgDepositResponse) Reset

func (m *MsgDepositResponse) Reset()

func (*MsgDepositResponse) Size

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

func (*MsgDepositResponse) String

func (m *MsgDepositResponse) String() string

func (*MsgDepositResponse) Unmarshal

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

func (*MsgDepositResponse) XXX_DiscardUnknown

func (m *MsgDepositResponse) XXX_DiscardUnknown()

func (*MsgDepositResponse) XXX_Marshal

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

func (*MsgDepositResponse) XXX_Merge

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

func (*MsgDepositResponse) XXX_Size

func (m *MsgDepositResponse) XXX_Size() int

func (*MsgDepositResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// Deposit defines a method for depositing funds to the savings module account
	Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error)
	// Withdraw defines a method for withdrawing funds to the savings module account
	Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error)
}

MsgServer is the server API for Msg service.

type MsgWithdraw

type MsgWithdraw struct {
	Depositor string                                   `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor,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"`
}

MsgWithdraw defines the Msg/Withdraw request type.

func NewMsgWithdraw

func NewMsgWithdraw(depositor sdk.AccAddress, amount sdk.Coins) MsgWithdraw

NewMsgWithdraw returns a new MsgWithdraw

func (*MsgWithdraw) Descriptor

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

func (*MsgWithdraw) GetAmount

func (*MsgWithdraw) GetDepositor

func (m *MsgWithdraw) GetDepositor() string

func (MsgWithdraw) GetSignBytes

func (msg MsgWithdraw) GetSignBytes() []byte

GetSignBytes gets the canonical byte representation of the Msg.

func (MsgWithdraw) GetSigners

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

GetSigners returns the addresses of signers that must sign.

func (*MsgWithdraw) Marshal

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

func (*MsgWithdraw) MarshalTo

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

func (*MsgWithdraw) MarshalToSizedBuffer

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

func (*MsgWithdraw) ProtoMessage

func (*MsgWithdraw) ProtoMessage()

func (*MsgWithdraw) Reset

func (m *MsgWithdraw) Reset()

func (MsgWithdraw) Route

func (msg MsgWithdraw) Route() string

Route return the message type used for routing the message.

func (*MsgWithdraw) Size

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

func (*MsgWithdraw) String

func (m *MsgWithdraw) String() string

func (MsgWithdraw) Type

func (msg MsgWithdraw) Type() string

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

func (*MsgWithdraw) Unmarshal

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

func (MsgWithdraw) ValidateBasic

func (msg MsgWithdraw) ValidateBasic() error

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

func (*MsgWithdraw) XXX_DiscardUnknown

func (m *MsgWithdraw) XXX_DiscardUnknown()

func (*MsgWithdraw) XXX_Marshal

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

func (*MsgWithdraw) XXX_Merge

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

func (*MsgWithdraw) XXX_Size

func (m *MsgWithdraw) XXX_Size() int

func (*MsgWithdraw) XXX_Unmarshal

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

type MsgWithdrawResponse

type MsgWithdrawResponse struct {
}

MsgWithdrawResponse defines the Msg/Withdraw response type.

func (*MsgWithdrawResponse) Descriptor

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

func (*MsgWithdrawResponse) Marshal

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

func (*MsgWithdrawResponse) MarshalTo

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

func (*MsgWithdrawResponse) MarshalToSizedBuffer

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

func (*MsgWithdrawResponse) ProtoMessage

func (*MsgWithdrawResponse) ProtoMessage()

func (*MsgWithdrawResponse) Reset

func (m *MsgWithdrawResponse) Reset()

func (*MsgWithdrawResponse) Size

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

func (*MsgWithdrawResponse) String

func (m *MsgWithdrawResponse) String() string

func (*MsgWithdrawResponse) Unmarshal

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

func (*MsgWithdrawResponse) XXX_DiscardUnknown

func (m *MsgWithdrawResponse) XXX_DiscardUnknown()

func (*MsgWithdrawResponse) XXX_Marshal

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

func (*MsgWithdrawResponse) XXX_Merge

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

func (*MsgWithdrawResponse) XXX_Size

func (m *MsgWithdrawResponse) XXX_Size() int

func (*MsgWithdrawResponse) XXX_Unmarshal

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

type MultiSavingsHooks

type MultiSavingsHooks []SavingsHooks

MultiSavingsHooks combine multiple Savings hooks, all hook functions are run in array sequence

func NewMultiSavingsHooks

func NewMultiSavingsHooks(hooks ...SavingsHooks) MultiSavingsHooks

NewMultiSavingsHooks returns a new MultiSavingsHooks

func (MultiSavingsHooks) AfterSavingsDepositCreated

func (s MultiSavingsHooks) AfterSavingsDepositCreated(ctx sdk.Context, deposit Deposit)

AfterSavingsDepositCreated runs after a deposit is created

func (MultiSavingsHooks) BeforeSavingsDepositModified

func (s MultiSavingsHooks) BeforeSavingsDepositModified(ctx sdk.Context, deposit Deposit, incomingDenoms []string)

BeforeSavingsDepositModified runs before a deposit is modified

type Params

type Params struct {
	SupportedDenoms []string `protobuf:"bytes,1,rep,name=supported_denoms,json=supportedDenoms,proto3" json:"supported_denoms,omitempty"`
}

Params defines the parameters for the savings module.

func DefaultParams

func DefaultParams() Params

DefaultParams default params for savings

func NewParams

func NewParams(supportedDenoms []string) Params

NewParams creates a new Params object

func (*Params) Descriptor

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

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 pairs of savings module's parameters.

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 (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate ensure that params 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 QueryClient

type QueryClient interface {
	// Params queries all parameters of the savings module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Deposits queries savings deposits.
	Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error)
	// TotalSupply returns the total sum of all coins currently locked into the savings module.
	TotalSupply(ctx context.Context, in *QueryTotalSupplyRequest, opts ...grpc.CallOption) (*QueryTotalSupplyResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryDepositsRequest

type QueryDepositsRequest struct {
	Denom      string             `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	Owner      string             `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositsRequest defines the request type for querying x/savings deposits.

func (*QueryDepositsRequest) Descriptor

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

func (*QueryDepositsRequest) GetDenom

func (m *QueryDepositsRequest) GetDenom() string

func (*QueryDepositsRequest) GetOwner

func (m *QueryDepositsRequest) GetOwner() string

func (*QueryDepositsRequest) GetPagination

func (m *QueryDepositsRequest) GetPagination() *query.PageRequest

func (*QueryDepositsRequest) Marshal

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

func (*QueryDepositsRequest) MarshalTo

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

func (*QueryDepositsRequest) MarshalToSizedBuffer

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

func (*QueryDepositsRequest) ProtoMessage

func (*QueryDepositsRequest) ProtoMessage()

func (*QueryDepositsRequest) Reset

func (m *QueryDepositsRequest) Reset()

func (*QueryDepositsRequest) Size

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

func (*QueryDepositsRequest) String

func (m *QueryDepositsRequest) String() string

func (*QueryDepositsRequest) Unmarshal

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

func (*QueryDepositsRequest) XXX_DiscardUnknown

func (m *QueryDepositsRequest) XXX_DiscardUnknown()

func (*QueryDepositsRequest) XXX_Marshal

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

func (*QueryDepositsRequest) XXX_Merge

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

func (*QueryDepositsRequest) XXX_Size

func (m *QueryDepositsRequest) XXX_Size() int

func (*QueryDepositsRequest) XXX_Unmarshal

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

type QueryDepositsResponse

type QueryDepositsResponse struct {
	Deposits   Deposits            `protobuf:"bytes,1,rep,name=deposits,proto3,castrepeated=Deposits" json:"deposits"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositsResponse defines the response type for querying x/savings deposits.

func (*QueryDepositsResponse) Descriptor

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

func (*QueryDepositsResponse) GetDeposits

func (m *QueryDepositsResponse) GetDeposits() Deposits

func (*QueryDepositsResponse) GetPagination

func (m *QueryDepositsResponse) GetPagination() *query.PageResponse

func (*QueryDepositsResponse) Marshal

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

func (*QueryDepositsResponse) MarshalTo

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

func (*QueryDepositsResponse) MarshalToSizedBuffer

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

func (*QueryDepositsResponse) ProtoMessage

func (*QueryDepositsResponse) ProtoMessage()

func (*QueryDepositsResponse) Reset

func (m *QueryDepositsResponse) Reset()

func (*QueryDepositsResponse) Size

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

func (*QueryDepositsResponse) String

func (m *QueryDepositsResponse) String() string

func (*QueryDepositsResponse) Unmarshal

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

func (*QueryDepositsResponse) XXX_DiscardUnknown

func (m *QueryDepositsResponse) XXX_DiscardUnknown()

func (*QueryDepositsResponse) XXX_Marshal

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

func (*QueryDepositsResponse) XXX_Merge

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

func (*QueryDepositsResponse) XXX_Size

func (m *QueryDepositsResponse) XXX_Size() int

func (*QueryDepositsResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest defines the request type for querying x/savings 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/savings parameters.

func (*QueryParamsResponse) Descriptor

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

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 all parameters of the savings module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Deposits queries savings deposits.
	Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error)
	// TotalSupply returns the total sum of all coins currently locked into the savings module.
	TotalSupply(context.Context, *QueryTotalSupplyRequest) (*QueryTotalSupplyResponse, error)
}

QueryServer is the server API for Query service.

type QueryTotalSupplyRequest

type QueryTotalSupplyRequest struct {
}

QueryTotalSupplyRequest defines the request type for Query/TotalSupply method.

func (*QueryTotalSupplyRequest) Descriptor

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

func (*QueryTotalSupplyRequest) Marshal

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

func (*QueryTotalSupplyRequest) MarshalTo

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

func (*QueryTotalSupplyRequest) MarshalToSizedBuffer

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

func (*QueryTotalSupplyRequest) ProtoMessage

func (*QueryTotalSupplyRequest) ProtoMessage()

func (*QueryTotalSupplyRequest) Reset

func (m *QueryTotalSupplyRequest) Reset()

func (*QueryTotalSupplyRequest) Size

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

func (*QueryTotalSupplyRequest) String

func (m *QueryTotalSupplyRequest) String() string

func (*QueryTotalSupplyRequest) Unmarshal

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

func (*QueryTotalSupplyRequest) XXX_DiscardUnknown

func (m *QueryTotalSupplyRequest) XXX_DiscardUnknown()

func (*QueryTotalSupplyRequest) XXX_Marshal

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

func (*QueryTotalSupplyRequest) XXX_Merge

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

func (*QueryTotalSupplyRequest) XXX_Size

func (m *QueryTotalSupplyRequest) XXX_Size() int

func (*QueryTotalSupplyRequest) XXX_Unmarshal

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

type QueryTotalSupplyResponse

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

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

func (*QueryTotalSupplyResponse) Descriptor

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

func (*QueryTotalSupplyResponse) GetHeight

func (m *QueryTotalSupplyResponse) GetHeight() int64

func (*QueryTotalSupplyResponse) GetResult

func (*QueryTotalSupplyResponse) Marshal

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

func (*QueryTotalSupplyResponse) MarshalTo

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

func (*QueryTotalSupplyResponse) MarshalToSizedBuffer

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

func (*QueryTotalSupplyResponse) ProtoMessage

func (*QueryTotalSupplyResponse) ProtoMessage()

func (*QueryTotalSupplyResponse) Reset

func (m *QueryTotalSupplyResponse) Reset()

func (*QueryTotalSupplyResponse) Size

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

func (*QueryTotalSupplyResponse) String

func (m *QueryTotalSupplyResponse) String() string

func (*QueryTotalSupplyResponse) Unmarshal

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

func (*QueryTotalSupplyResponse) XXX_DiscardUnknown

func (m *QueryTotalSupplyResponse) XXX_DiscardUnknown()

func (*QueryTotalSupplyResponse) XXX_Marshal

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

func (*QueryTotalSupplyResponse) XXX_Merge

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

func (*QueryTotalSupplyResponse) XXX_Size

func (m *QueryTotalSupplyResponse) XXX_Size() int

func (*QueryTotalSupplyResponse) XXX_Unmarshal

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

type SavingsHooks

type SavingsHooks interface {
	AfterSavingsDepositCreated(ctx sdk.Context, deposit Deposit)
	BeforeSavingsDepositModified(ctx sdk.Context, deposit Deposit, incomingDenoms []string)
}

SavingsHooks event hooks for other keepers to run code in response to Savings modifications

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Deposit

func (*UnimplementedMsgServer) Withdraw

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Deposits

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) TotalSupply

Jump to

Keyboard shortcuts

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