Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func AlignSchedules(startP, startQ int64, p, q []sdkvesting.Period) (startTime, endTime int64)
- func CoinsMin(a, b sdk.Coins) sdk.Coins
- func ConjunctPeriods(startP, startQ int64, periodsP, periodsQ []sdkvesting.Period) (startTime int64, endTime int64, merged []sdkvesting.Period)
- func DisjunctPeriods(startP, startQ int64, periodsP, periodsQ []sdkvesting.Period) (int64, int64, []sdkvesting.Period)
- func Max64(i, j int64) int64
- func Min64(i, j int64) int64
- func ReadPastPeriodCount(startTime, endTime int64, periods []sdkvesting.Period, readTime int64) int
- func ReadSchedule(startTime, endTime int64, periods []sdkvesting.Period, totalCoins sdk.Coins, ...) sdk.Coins
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error
- func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ScaleCoins(coins sdk.Coins, scale sdk.Dec) sdk.Coins
- type AccountKeeper
- type BankKeeper
- type ClawbackVestingAccount
- func (va ClawbackVestingAccount) ComputeClawback(clawbackTime int64) (ClawbackVestingAccount, sdk.Coins)
- func (*ClawbackVestingAccount) Descriptor() ([]byte, []int)
- func (va ClawbackVestingAccount) GetLockedOnly(blockTime time.Time) sdk.Coins
- func (va ClawbackVestingAccount) GetPassedPeriodCount(blockTime time.Time) int
- func (va ClawbackVestingAccount) GetStartTime() int64
- func (va ClawbackVestingAccount) GetUnlockedOnly(blockTime time.Time) sdk.Coins
- func (va ClawbackVestingAccount) GetUnvestedOnly(blockTime time.Time) sdk.Coins
- func (va ClawbackVestingAccount) GetVestedCoins(blockTime time.Time) sdk.Coins
- func (va ClawbackVestingAccount) GetVestedOnly(blockTime time.Time) sdk.Coins
- func (va ClawbackVestingAccount) GetVestingCoins(blockTime time.Time) sdk.Coins
- func (va ClawbackVestingAccount) GetVestingPeriods() sdkvesting.Periods
- func (va ClawbackVestingAccount) HasLockedCoins(blockTime time.Time) bool
- func (va ClawbackVestingAccount) LockedCoins(blockTime time.Time) sdk.Coins
- func (m *ClawbackVestingAccount) Marshal() (dAtA []byte, err error)
- func (m *ClawbackVestingAccount) MarshalTo(dAtA []byte) (int, error)
- func (m *ClawbackVestingAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClawbackVestingAccount) ProtoMessage()
- func (m *ClawbackVestingAccount) Reset()
- func (m *ClawbackVestingAccount) Size() (n int)
- func (va *ClawbackVestingAccount) TrackDelegation(blockTime time.Time, balance, amount sdk.Coins)
- func (m *ClawbackVestingAccount) Unmarshal(dAtA []byte) error
- func (va ClawbackVestingAccount) Validate() error
- func (m *ClawbackVestingAccount) XXX_DiscardUnknown()
- func (m *ClawbackVestingAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClawbackVestingAccount) XXX_Merge(src proto.Message)
- func (m *ClawbackVestingAccount) XXX_Size() int
- func (m *ClawbackVestingAccount) XXX_Unmarshal(b []byte) error
- type MsgClawback
- func (*MsgClawback) Descriptor() ([]byte, []int)
- func (m *MsgClawback) GetAccountAddress() string
- func (m *MsgClawback) GetDestAddress() string
- func (m *MsgClawback) GetFunderAddress() string
- func (msg *MsgClawback) GetSignBytes() []byte
- func (msg MsgClawback) GetSigners() []sdk.AccAddress
- func (m *MsgClawback) Marshal() (dAtA []byte, err error)
- func (m *MsgClawback) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgClawback) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgClawback) ProtoMessage()
- func (m *MsgClawback) Reset()
- func (msg MsgClawback) Route() string
- func (m *MsgClawback) Size() (n int)
- func (m *MsgClawback) String() string
- func (msg MsgClawback) Type() string
- func (m *MsgClawback) Unmarshal(dAtA []byte) error
- func (msg MsgClawback) ValidateBasic() error
- func (m *MsgClawback) XXX_DiscardUnknown()
- func (m *MsgClawback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgClawback) XXX_Merge(src proto.Message)
- func (m *MsgClawback) XXX_Size() int
- func (m *MsgClawback) XXX_Unmarshal(b []byte) error
- type MsgClawbackResponse
- func (*MsgClawbackResponse) Descriptor() ([]byte, []int)
- func (m *MsgClawbackResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgClawbackResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgClawbackResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgClawbackResponse) ProtoMessage()
- func (m *MsgClawbackResponse) Reset()
- func (m *MsgClawbackResponse) Size() (n int)
- func (m *MsgClawbackResponse) String() string
- func (m *MsgClawbackResponse) Unmarshal(dAtA []byte) error
- func (m *MsgClawbackResponse) XXX_DiscardUnknown()
- func (m *MsgClawbackResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgClawbackResponse) XXX_Merge(src proto.Message)
- func (m *MsgClawbackResponse) XXX_Size() int
- func (m *MsgClawbackResponse) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgCreateClawbackVestingAccount
- func (*MsgCreateClawbackVestingAccount) Descriptor() ([]byte, []int)
- func (m *MsgCreateClawbackVestingAccount) GetFromAddress() string
- func (m *MsgCreateClawbackVestingAccount) GetLockupPeriods() []types.Period
- func (m *MsgCreateClawbackVestingAccount) GetMerge() bool
- func (msg *MsgCreateClawbackVestingAccount) GetSignBytes() []byte
- func (msg MsgCreateClawbackVestingAccount) GetSigners() []sdk.AccAddress
- func (m *MsgCreateClawbackVestingAccount) GetStartTime() time.Time
- func (m *MsgCreateClawbackVestingAccount) GetToAddress() string
- func (m *MsgCreateClawbackVestingAccount) GetVestingPeriods() []types.Period
- func (m *MsgCreateClawbackVestingAccount) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateClawbackVestingAccount) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateClawbackVestingAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateClawbackVestingAccount) ProtoMessage()
- func (m *MsgCreateClawbackVestingAccount) Reset()
- func (msg MsgCreateClawbackVestingAccount) Route() string
- func (m *MsgCreateClawbackVestingAccount) Size() (n int)
- func (m *MsgCreateClawbackVestingAccount) String() string
- func (msg MsgCreateClawbackVestingAccount) Type() string
- func (m *MsgCreateClawbackVestingAccount) Unmarshal(dAtA []byte) error
- func (msg MsgCreateClawbackVestingAccount) ValidateBasic() error
- func (m *MsgCreateClawbackVestingAccount) XXX_DiscardUnknown()
- func (m *MsgCreateClawbackVestingAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateClawbackVestingAccount) XXX_Merge(src proto.Message)
- func (m *MsgCreateClawbackVestingAccount) XXX_Size() int
- func (m *MsgCreateClawbackVestingAccount) XXX_Unmarshal(b []byte) error
- type MsgCreateClawbackVestingAccountResponse
- func (*MsgCreateClawbackVestingAccountResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreateClawbackVestingAccountResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateClawbackVestingAccountResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateClawbackVestingAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateClawbackVestingAccountResponse) ProtoMessage()
- func (m *MsgCreateClawbackVestingAccountResponse) Reset()
- func (m *MsgCreateClawbackVestingAccountResponse) Size() (n int)
- func (m *MsgCreateClawbackVestingAccountResponse) String() string
- func (m *MsgCreateClawbackVestingAccountResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreateClawbackVestingAccountResponse) XXX_DiscardUnknown()
- func (m *MsgCreateClawbackVestingAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateClawbackVestingAccountResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreateClawbackVestingAccountResponse) XXX_Size() int
- func (m *MsgCreateClawbackVestingAccountResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type QueryBalancesRequest
- func (*QueryBalancesRequest) Descriptor() ([]byte, []int)
- func (m *QueryBalancesRequest) GetAddress() string
- func (m *QueryBalancesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryBalancesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBalancesRequest) ProtoMessage()
- func (m *QueryBalancesRequest) Reset()
- func (m *QueryBalancesRequest) Size() (n int)
- func (m *QueryBalancesRequest) String() string
- func (m *QueryBalancesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryBalancesRequest) XXX_DiscardUnknown()
- func (m *QueryBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBalancesRequest) XXX_Merge(src proto.Message)
- func (m *QueryBalancesRequest) XXX_Size() int
- func (m *QueryBalancesRequest) XXX_Unmarshal(b []byte) error
- type QueryBalancesResponse
- func (*QueryBalancesResponse) Descriptor() ([]byte, []int)
- func (m *QueryBalancesResponse) GetLocked() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *QueryBalancesResponse) GetUnvested() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *QueryBalancesResponse) GetVested() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *QueryBalancesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryBalancesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryBalancesResponse) ProtoMessage()
- func (m *QueryBalancesResponse) Reset()
- func (m *QueryBalancesResponse) Size() (n int)
- func (m *QueryBalancesResponse) String() string
- func (m *QueryBalancesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryBalancesResponse) XXX_DiscardUnknown()
- func (m *QueryBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBalancesResponse) XXX_Merge(src proto.Message)
- func (m *QueryBalancesResponse) XXX_Size() int
- func (m *QueryBalancesResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type StakingKeeper
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( // ModuleName defines the module's name. ModuleName = "vesting" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey defines the module's message routing key RouterKey = ModuleName )
const ( TypeMsgCreateClawbackVestingAccount = "create_clawback_vesting_account" TypeMsgClawback = "clawback" )
Variables ¶
var ( ErrInsufficientVestedCoins = sdkerrors.Register(ModuleName, 2, "insufficient vested coins error") ErrVestingLockup = sdkerrors.Register(ModuleName, 3, "vesting lockup error") )
errors
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthVesting = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowVesting = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupVesting = fmt.Errorf("proto: unexpected end of group") )
var ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
ModuleCdc references the global erc20 module codec. Note, the codec should ONLY be used in certain instances of tests and for JSON encoding.
The actual codec used for serialization should be provided to modules/erc20 and defined at the application level.
Functions ¶
func AlignSchedules ¶
func AlignSchedules( startP, startQ int64, p, q []sdkvesting.Period, ) (startTime, endTime int64)
AlignSchedules rewrites the first period length to align the two arguments to the same start time.
func ConjunctPeriods ¶
func ConjunctPeriods( startP, startQ int64, periodsP, periodsQ []sdkvesting.Period, ) (startTime int64, endTime int64, merged []sdkvesting.Period)
ConjunctPeriods returns the combination of two period schedules where the result is the minimum of the two schedules.
func DisjunctPeriods ¶
func DisjunctPeriods( startP, startQ int64, periodsP, periodsQ []sdkvesting.Period, ) (int64, int64, []sdkvesting.Period)
DisjunctPeriods returns the union of two vesting period schedules. The returned schedule is the union of the vesting events, with simultaneous events combined into a single event. Input schedules P and Q are defined by their start times and periods. Returns new start time, new end time, and merged vesting events, relative to the new start time.
func ReadPastPeriodCount ¶ added in v1.1.0
func ReadPastPeriodCount( startTime, endTime int64, periods []sdkvesting.Period, readTime int64, ) int
ReadPastPeriodCount returns the amount of passed periods before read time
func ReadSchedule ¶
func ReadSchedule( startTime, endTime int64, periods []sdkvesting.Period, totalCoins sdk.Coins, readTime int64, ) sdk.Coins
A "schedule" is an increasing step function of Coins over time. It's specified as an absolute start time and a sequence of relative periods, with each step at the end of a period. A schedule may also give the time and total value at the last step, which can speed evaluation of the step function after the last step.
ReadSchedule returns the value of a schedule at readTime.
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterface associates protoName with AccountI and VestingAccount Interfaces and creates a registry of it's concrete implementations
func RegisterMsgHandler ¶
RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterMsgHandlerClient ¶
RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.
func RegisterMsgHandlerFromEndpoint ¶
func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterMsgHandlerServer ¶
RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer 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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.
func RegisterMsgServer ¶
func RegisterQueryHandler ¶
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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AccountKeeper ¶
type AccountKeeper interface { GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI SetAccount(sdk.Context, authtypes.AccountI) NewAccount(ctx sdk.Context, acc authtypes.AccountI) authtypes.AccountI NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI }
AccountKeeper defines the expected interface contract the vesting module requires for storing accounts.
type BankKeeper ¶
type BankKeeper interface { GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins BlockedAddr(addr sdk.AccAddress) bool }
BankKeeper defines the expected interface contract the vesting module requires for creating vesting accounts with funds.
type ClawbackVestingAccount ¶
type ClawbackVestingAccount struct { // base_vesting_account implements the VestingAccount interface. It contains // all the necessary fields needed for any vesting account implementation *types.BaseVestingAccount `` /* 147-byte string literal not displayed */ // funder_address specifies the account which can perform clawback FunderAddress string `protobuf:"bytes,2,opt,name=funder_address,json=funderAddress,proto3" json:"funder_address,omitempty"` // start_time defines the time at which the vesting period begins StartTime time.Time `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` // lockup_periods defines the unlocking schedule relative to the start_time LockupPeriods []types.Period `protobuf:"bytes,4,rep,name=lockup_periods,json=lockupPeriods,proto3" json:"lockup_periods"` // vesting_periods defines the vesting schedule relative to the start_time VestingPeriods []types.Period `protobuf:"bytes,5,rep,name=vesting_periods,json=vestingPeriods,proto3" json:"vesting_periods"` }
ClawbackVestingAccount implements the VestingAccount interface. It provides an account that can hold contributions subject to "lockup" (like a PeriodicVestingAccount), or vesting which is subject to clawback of unvested tokens, or a combination (tokens vest, but are still locked).
func NewClawbackVestingAccount ¶
func NewClawbackVestingAccount( baseAcc *authtypes.BaseAccount, funder sdk.AccAddress, originalVesting sdk.Coins, startTime time.Time, lockupPeriods, vestingPeriods sdkvesting.Periods, ) *ClawbackVestingAccount
NewClawbackVestingAccount returns a new ClawbackVestingAccount
func (ClawbackVestingAccount) ComputeClawback ¶
func (va ClawbackVestingAccount) ComputeClawback( clawbackTime int64, ) (ClawbackVestingAccount, sdk.Coins)
ComputeClawback returns an account with all future vesting events removed and the clawback amount (total sum of these events). Future unlocking events are preserved and update in case unlocked vested coins remain after clawback.
func (*ClawbackVestingAccount) Descriptor ¶
func (*ClawbackVestingAccount) Descriptor() ([]byte, []int)
func (ClawbackVestingAccount) GetLockedOnly ¶
func (va ClawbackVestingAccount) GetLockedOnly(blockTime time.Time) sdk.Coins
GetLockedOnly returns the locking schedule at blockTIme.
func (ClawbackVestingAccount) GetPassedPeriodCount ¶ added in v1.1.0
func (va ClawbackVestingAccount) GetPassedPeriodCount(blockTime time.Time) int
GetPassedPeriodCount returns the amount of passed periods at blockTime.
func (ClawbackVestingAccount) GetStartTime ¶
func (va ClawbackVestingAccount) GetStartTime() int64
GetStartTime returns the time when vesting starts for a periodic vesting account.
func (ClawbackVestingAccount) GetUnlockedOnly ¶
func (va ClawbackVestingAccount) GetUnlockedOnly(blockTime time.Time) sdk.Coins
GetUnlockedOnly returns the unlocking schedule at blockTIme.
func (ClawbackVestingAccount) GetUnvestedOnly ¶
func (va ClawbackVestingAccount) GetUnvestedOnly(blockTime time.Time) sdk.Coins
GetUnvestedOnly returns the unvesting schedule at blockTime.
func (ClawbackVestingAccount) GetVestedCoins ¶
func (va ClawbackVestingAccount) GetVestedCoins(blockTime time.Time) sdk.Coins
GetVestedCoins returns the total number of vested coins that are still in lockup. If no coins are vested, nil is returned.
func (ClawbackVestingAccount) GetVestedOnly ¶
func (va ClawbackVestingAccount) GetVestedOnly(blockTime time.Time) sdk.Coins
GetVestedOnly returns the vesting schedule at blockTime.
func (ClawbackVestingAccount) GetVestingCoins ¶
func (va ClawbackVestingAccount) GetVestingCoins(blockTime time.Time) sdk.Coins
GetVestingCoins returns the total number of vesting coins. If no coins are vesting, nil is returned.
func (ClawbackVestingAccount) GetVestingPeriods ¶
func (va ClawbackVestingAccount) GetVestingPeriods() sdkvesting.Periods
GetVestingPeriods returns vesting periods associated with periodic vesting account.
func (ClawbackVestingAccount) HasLockedCoins ¶
func (va ClawbackVestingAccount) HasLockedCoins(blockTime time.Time) bool
HasLockedCoins returns true if the blocktime has not passed all clawback account's lockup periods
func (ClawbackVestingAccount) LockedCoins ¶
func (va ClawbackVestingAccount) LockedCoins(blockTime time.Time) sdk.Coins
LockedCoins returns the set of coins that are not spendable (i.e. locked), defined as the vesting coins that are not delegated.
func (*ClawbackVestingAccount) Marshal ¶
func (m *ClawbackVestingAccount) Marshal() (dAtA []byte, err error)
func (*ClawbackVestingAccount) MarshalTo ¶
func (m *ClawbackVestingAccount) MarshalTo(dAtA []byte) (int, error)
func (*ClawbackVestingAccount) MarshalToSizedBuffer ¶
func (m *ClawbackVestingAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClawbackVestingAccount) ProtoMessage ¶
func (*ClawbackVestingAccount) ProtoMessage()
func (*ClawbackVestingAccount) Reset ¶
func (m *ClawbackVestingAccount) Reset()
func (*ClawbackVestingAccount) Size ¶
func (m *ClawbackVestingAccount) Size() (n int)
func (*ClawbackVestingAccount) TrackDelegation ¶
func (va *ClawbackVestingAccount) TrackDelegation(blockTime time.Time, balance, amount sdk.Coins)
TrackDelegation tracks a desired delegation amount by setting the appropriate values for the amount of delegated vesting, delegated free, and reducing the overall amount of base coins.
func (*ClawbackVestingAccount) Unmarshal ¶
func (m *ClawbackVestingAccount) Unmarshal(dAtA []byte) error
func (ClawbackVestingAccount) Validate ¶
func (va ClawbackVestingAccount) Validate() error
Validate checks for errors on the account fields
func (*ClawbackVestingAccount) XXX_DiscardUnknown ¶
func (m *ClawbackVestingAccount) XXX_DiscardUnknown()
func (*ClawbackVestingAccount) XXX_Marshal ¶
func (m *ClawbackVestingAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClawbackVestingAccount) XXX_Merge ¶
func (m *ClawbackVestingAccount) XXX_Merge(src proto.Message)
func (*ClawbackVestingAccount) XXX_Size ¶
func (m *ClawbackVestingAccount) XXX_Size() int
func (*ClawbackVestingAccount) XXX_Unmarshal ¶
func (m *ClawbackVestingAccount) XXX_Unmarshal(b []byte) error
type MsgClawback ¶
type MsgClawback struct { // funder_address is the address which funded the account FunderAddress string `protobuf:"bytes,1,opt,name=funder_address,json=funderAddress,proto3" json:"funder_address,omitempty"` // account_address is the address of the ClawbackVestingAccount to claw back from. AccountAddress string `protobuf:"bytes,2,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` // dest_address specifies where the clawed-back tokens should be transferred // to. If empty, the tokens will be transferred back to the original funder of // the account. DestAddress string `protobuf:"bytes,3,opt,name=dest_address,json=destAddress,proto3" json:"dest_address,omitempty"` }
MsgClawback defines a message that removes unvested tokens from a ClawbackVestingAccount.
func NewMsgClawback ¶
func NewMsgClawback(funder, addr, dest sdk.AccAddress) *MsgClawback
NewMsgClawbackcreates new instance of MsgClawback. The dest_address may be nil - defaulting to the funder.
func (*MsgClawback) Descriptor ¶
func (*MsgClawback) Descriptor() ([]byte, []int)
func (*MsgClawback) GetAccountAddress ¶
func (m *MsgClawback) GetAccountAddress() string
func (*MsgClawback) GetDestAddress ¶
func (m *MsgClawback) GetDestAddress() string
func (*MsgClawback) GetFunderAddress ¶
func (m *MsgClawback) GetFunderAddress() string
func (*MsgClawback) GetSignBytes ¶
func (msg *MsgClawback) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgClawback) GetSigners ¶
func (msg MsgClawback) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (*MsgClawback) Marshal ¶
func (m *MsgClawback) Marshal() (dAtA []byte, err error)
func (*MsgClawback) MarshalToSizedBuffer ¶
func (m *MsgClawback) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgClawback) ProtoMessage ¶
func (*MsgClawback) ProtoMessage()
func (*MsgClawback) Reset ¶
func (m *MsgClawback) Reset()
func (MsgClawback) Route ¶
func (msg MsgClawback) Route() string
Route returns the message route for a MsgClawback.
func (*MsgClawback) Size ¶
func (m *MsgClawback) Size() (n int)
func (*MsgClawback) String ¶
func (m *MsgClawback) String() string
func (MsgClawback) Type ¶
func (msg MsgClawback) Type() string
Type returns the message type for a MsgClawback.
func (*MsgClawback) Unmarshal ¶
func (m *MsgClawback) Unmarshal(dAtA []byte) error
func (MsgClawback) ValidateBasic ¶
func (msg MsgClawback) ValidateBasic() error
ValidateBasic runs stateless checks on the message
func (*MsgClawback) XXX_DiscardUnknown ¶
func (m *MsgClawback) XXX_DiscardUnknown()
func (*MsgClawback) XXX_Marshal ¶
func (m *MsgClawback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgClawback) XXX_Merge ¶
func (m *MsgClawback) XXX_Merge(src proto.Message)
func (*MsgClawback) XXX_Size ¶
func (m *MsgClawback) XXX_Size() int
func (*MsgClawback) XXX_Unmarshal ¶
func (m *MsgClawback) XXX_Unmarshal(b []byte) error
type MsgClawbackResponse ¶
type MsgClawbackResponse struct { }
MsgClawbackResponse defines the MsgClawback response type.
func (*MsgClawbackResponse) Descriptor ¶
func (*MsgClawbackResponse) Descriptor() ([]byte, []int)
func (*MsgClawbackResponse) Marshal ¶
func (m *MsgClawbackResponse) Marshal() (dAtA []byte, err error)
func (*MsgClawbackResponse) MarshalTo ¶
func (m *MsgClawbackResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgClawbackResponse) MarshalToSizedBuffer ¶
func (m *MsgClawbackResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgClawbackResponse) ProtoMessage ¶
func (*MsgClawbackResponse) ProtoMessage()
func (*MsgClawbackResponse) Reset ¶
func (m *MsgClawbackResponse) Reset()
func (*MsgClawbackResponse) Size ¶
func (m *MsgClawbackResponse) Size() (n int)
func (*MsgClawbackResponse) String ¶
func (m *MsgClawbackResponse) String() string
func (*MsgClawbackResponse) Unmarshal ¶
func (m *MsgClawbackResponse) Unmarshal(dAtA []byte) error
func (*MsgClawbackResponse) XXX_DiscardUnknown ¶
func (m *MsgClawbackResponse) XXX_DiscardUnknown()
func (*MsgClawbackResponse) XXX_Marshal ¶
func (m *MsgClawbackResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgClawbackResponse) XXX_Merge ¶
func (m *MsgClawbackResponse) XXX_Merge(src proto.Message)
func (*MsgClawbackResponse) XXX_Size ¶
func (m *MsgClawbackResponse) XXX_Size() int
func (*MsgClawbackResponse) XXX_Unmarshal ¶
func (m *MsgClawbackResponse) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // CreateClawbackVestingAccount creats a vesting account that is subject to // clawback and the configuration of vesting and lockup schedules. CreateClawbackVestingAccount(ctx context.Context, in *MsgCreateClawbackVestingAccount, opts ...grpc.CallOption) (*MsgCreateClawbackVestingAccountResponse, error) // Clawback removes the unvested tokens from a ClawbackVestingAccount. Clawback(ctx context.Context, in *MsgClawback, opts ...grpc.CallOption) (*MsgClawbackResponse, 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 MsgCreateClawbackVestingAccount ¶
type MsgCreateClawbackVestingAccount struct { // from_address specifies the account to provide the funds and sign the // clawback request FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // to_address specifies the account to receive the funds ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` // start_time defines the time at which the vesting period begins StartTime time.Time `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"` // lockup_periods defines the unlocking schedule relative to the start_time LockupPeriods []types.Period `protobuf:"bytes,4,rep,name=lockup_periods,json=lockupPeriods,proto3" json:"lockup_periods"` // vesting_periods defines thevesting schedule relative to the start_time VestingPeriods []types.Period `protobuf:"bytes,5,rep,name=vesting_periods,json=vestingPeriods,proto3" json:"vesting_periods"` // merge specifies a the creation mechanism for existing // ClawbackVestingAccounts. If true, merge this new grant into an existing // ClawbackVestingAccount, or create it if it does not exist. If false, // creates a new account. New grants to an existing account must be from the // same from_address. Merge bool `protobuf:"varint,6,opt,name=merge,proto3" json:"merge,omitempty"` }
MsgCreateClawbackVestingAccount defines a message that enables creating a ClawbackVestingAccount.
func NewMsgCreateClawbackVestingAccount ¶
func NewMsgCreateClawbackVestingAccount( fromAddr, toAddr sdk.AccAddress, startTime time.Time, lockupPeriods, vestingPeriods []sdkvesting.Period, merge bool, ) *MsgCreateClawbackVestingAccount
NewMsgCreateClawbackVestingAccount creates new instance of MsgCreateClawbackVestingAccount
func (*MsgCreateClawbackVestingAccount) Descriptor ¶
func (*MsgCreateClawbackVestingAccount) Descriptor() ([]byte, []int)
func (*MsgCreateClawbackVestingAccount) GetFromAddress ¶
func (m *MsgCreateClawbackVestingAccount) GetFromAddress() string
func (*MsgCreateClawbackVestingAccount) GetLockupPeriods ¶
func (m *MsgCreateClawbackVestingAccount) GetLockupPeriods() []types.Period
func (*MsgCreateClawbackVestingAccount) GetMerge ¶
func (m *MsgCreateClawbackVestingAccount) GetMerge() bool
func (*MsgCreateClawbackVestingAccount) GetSignBytes ¶
func (msg *MsgCreateClawbackVestingAccount) GetSignBytes() []byte
GetSignBytes encodes the message for signing
func (MsgCreateClawbackVestingAccount) GetSigners ¶
func (msg MsgCreateClawbackVestingAccount) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required
func (*MsgCreateClawbackVestingAccount) GetStartTime ¶
func (m *MsgCreateClawbackVestingAccount) GetStartTime() time.Time
func (*MsgCreateClawbackVestingAccount) GetToAddress ¶
func (m *MsgCreateClawbackVestingAccount) GetToAddress() string
func (*MsgCreateClawbackVestingAccount) GetVestingPeriods ¶
func (m *MsgCreateClawbackVestingAccount) GetVestingPeriods() []types.Period
func (*MsgCreateClawbackVestingAccount) Marshal ¶
func (m *MsgCreateClawbackVestingAccount) Marshal() (dAtA []byte, err error)
func (*MsgCreateClawbackVestingAccount) MarshalTo ¶
func (m *MsgCreateClawbackVestingAccount) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateClawbackVestingAccount) MarshalToSizedBuffer ¶
func (m *MsgCreateClawbackVestingAccount) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateClawbackVestingAccount) ProtoMessage ¶
func (*MsgCreateClawbackVestingAccount) ProtoMessage()
func (*MsgCreateClawbackVestingAccount) Reset ¶
func (m *MsgCreateClawbackVestingAccount) Reset()
func (MsgCreateClawbackVestingAccount) Route ¶
func (msg MsgCreateClawbackVestingAccount) Route() string
Route returns the name of the module
func (*MsgCreateClawbackVestingAccount) Size ¶
func (m *MsgCreateClawbackVestingAccount) Size() (n int)
func (*MsgCreateClawbackVestingAccount) String ¶
func (m *MsgCreateClawbackVestingAccount) String() string
func (MsgCreateClawbackVestingAccount) Type ¶
func (msg MsgCreateClawbackVestingAccount) Type() string
Type returns the the action
func (*MsgCreateClawbackVestingAccount) Unmarshal ¶
func (m *MsgCreateClawbackVestingAccount) Unmarshal(dAtA []byte) error
func (MsgCreateClawbackVestingAccount) ValidateBasic ¶
func (msg MsgCreateClawbackVestingAccount) ValidateBasic() error
ValidateBasic runs stateless checks on the message
func (*MsgCreateClawbackVestingAccount) XXX_DiscardUnknown ¶
func (m *MsgCreateClawbackVestingAccount) XXX_DiscardUnknown()
func (*MsgCreateClawbackVestingAccount) XXX_Marshal ¶
func (m *MsgCreateClawbackVestingAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateClawbackVestingAccount) XXX_Merge ¶
func (m *MsgCreateClawbackVestingAccount) XXX_Merge(src proto.Message)
func (*MsgCreateClawbackVestingAccount) XXX_Size ¶
func (m *MsgCreateClawbackVestingAccount) XXX_Size() int
func (*MsgCreateClawbackVestingAccount) XXX_Unmarshal ¶
func (m *MsgCreateClawbackVestingAccount) XXX_Unmarshal(b []byte) error
type MsgCreateClawbackVestingAccountResponse ¶
type MsgCreateClawbackVestingAccountResponse struct { }
MsgCreateClawbackVestingAccountResponse defines the MsgCreateClawbackVestingAccount response type.
func (*MsgCreateClawbackVestingAccountResponse) Descriptor ¶
func (*MsgCreateClawbackVestingAccountResponse) Descriptor() ([]byte, []int)
func (*MsgCreateClawbackVestingAccountResponse) Marshal ¶
func (m *MsgCreateClawbackVestingAccountResponse) Marshal() (dAtA []byte, err error)
func (*MsgCreateClawbackVestingAccountResponse) MarshalTo ¶
func (m *MsgCreateClawbackVestingAccountResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateClawbackVestingAccountResponse) MarshalToSizedBuffer ¶
func (m *MsgCreateClawbackVestingAccountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateClawbackVestingAccountResponse) ProtoMessage ¶
func (*MsgCreateClawbackVestingAccountResponse) ProtoMessage()
func (*MsgCreateClawbackVestingAccountResponse) Reset ¶
func (m *MsgCreateClawbackVestingAccountResponse) Reset()
func (*MsgCreateClawbackVestingAccountResponse) Size ¶
func (m *MsgCreateClawbackVestingAccountResponse) Size() (n int)
func (*MsgCreateClawbackVestingAccountResponse) String ¶
func (m *MsgCreateClawbackVestingAccountResponse) String() string
func (*MsgCreateClawbackVestingAccountResponse) Unmarshal ¶
func (m *MsgCreateClawbackVestingAccountResponse) Unmarshal(dAtA []byte) error
func (*MsgCreateClawbackVestingAccountResponse) XXX_DiscardUnknown ¶
func (m *MsgCreateClawbackVestingAccountResponse) XXX_DiscardUnknown()
func (*MsgCreateClawbackVestingAccountResponse) XXX_Marshal ¶
func (m *MsgCreateClawbackVestingAccountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateClawbackVestingAccountResponse) XXX_Merge ¶
func (m *MsgCreateClawbackVestingAccountResponse) XXX_Merge(src proto.Message)
func (*MsgCreateClawbackVestingAccountResponse) XXX_Size ¶
func (m *MsgCreateClawbackVestingAccountResponse) XXX_Size() int
func (*MsgCreateClawbackVestingAccountResponse) XXX_Unmarshal ¶
func (m *MsgCreateClawbackVestingAccountResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // CreateClawbackVestingAccount creats a vesting account that is subject to // clawback and the configuration of vesting and lockup schedules. CreateClawbackVestingAccount(context.Context, *MsgCreateClawbackVestingAccount) (*MsgCreateClawbackVestingAccountResponse, error) // Clawback removes the unvested tokens from a ClawbackVestingAccount. Clawback(context.Context, *MsgClawback) (*MsgClawbackResponse, error) }
MsgServer is the server API for Msg service.
type QueryBalancesRequest ¶
type QueryBalancesRequest struct { // address of the clawback vesting account Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` }
QueryBalancesRequest is the request type for the Query/Balances RPC method.
func (*QueryBalancesRequest) Descriptor ¶
func (*QueryBalancesRequest) Descriptor() ([]byte, []int)
func (*QueryBalancesRequest) GetAddress ¶
func (m *QueryBalancesRequest) GetAddress() string
func (*QueryBalancesRequest) Marshal ¶
func (m *QueryBalancesRequest) Marshal() (dAtA []byte, err error)
func (*QueryBalancesRequest) MarshalTo ¶
func (m *QueryBalancesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryBalancesRequest) MarshalToSizedBuffer ¶
func (m *QueryBalancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBalancesRequest) ProtoMessage ¶
func (*QueryBalancesRequest) ProtoMessage()
func (*QueryBalancesRequest) Reset ¶
func (m *QueryBalancesRequest) Reset()
func (*QueryBalancesRequest) Size ¶
func (m *QueryBalancesRequest) Size() (n int)
func (*QueryBalancesRequest) String ¶
func (m *QueryBalancesRequest) String() string
func (*QueryBalancesRequest) Unmarshal ¶
func (m *QueryBalancesRequest) Unmarshal(dAtA []byte) error
func (*QueryBalancesRequest) XXX_DiscardUnknown ¶
func (m *QueryBalancesRequest) XXX_DiscardUnknown()
func (*QueryBalancesRequest) XXX_Marshal ¶
func (m *QueryBalancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBalancesRequest) XXX_Merge ¶
func (m *QueryBalancesRequest) XXX_Merge(src proto.Message)
func (*QueryBalancesRequest) XXX_Size ¶
func (m *QueryBalancesRequest) XXX_Size() int
func (*QueryBalancesRequest) XXX_Unmarshal ¶
func (m *QueryBalancesRequest) XXX_Unmarshal(b []byte) error
type QueryBalancesResponse ¶
type QueryBalancesResponse struct { // current amount of locked tokens Locked github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=locked,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"locked"` // current amount of unvested tokens Unvested github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=unvested,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"unvested"` // current amount of vested tokens Vested github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=vested,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"vested"` }
QueryBalancesResponse is the response type for the Query/Balances RPC method.
func (*QueryBalancesResponse) Descriptor ¶
func (*QueryBalancesResponse) Descriptor() ([]byte, []int)
func (*QueryBalancesResponse) GetLocked ¶
func (m *QueryBalancesResponse) GetLocked() github_com_cosmos_cosmos_sdk_types.Coins
func (*QueryBalancesResponse) GetUnvested ¶
func (m *QueryBalancesResponse) GetUnvested() github_com_cosmos_cosmos_sdk_types.Coins
func (*QueryBalancesResponse) GetVested ¶
func (m *QueryBalancesResponse) GetVested() github_com_cosmos_cosmos_sdk_types.Coins
func (*QueryBalancesResponse) Marshal ¶
func (m *QueryBalancesResponse) Marshal() (dAtA []byte, err error)
func (*QueryBalancesResponse) MarshalTo ¶
func (m *QueryBalancesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryBalancesResponse) MarshalToSizedBuffer ¶
func (m *QueryBalancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryBalancesResponse) ProtoMessage ¶
func (*QueryBalancesResponse) ProtoMessage()
func (*QueryBalancesResponse) Reset ¶
func (m *QueryBalancesResponse) Reset()
func (*QueryBalancesResponse) Size ¶
func (m *QueryBalancesResponse) Size() (n int)
func (*QueryBalancesResponse) String ¶
func (m *QueryBalancesResponse) String() string
func (*QueryBalancesResponse) Unmarshal ¶
func (m *QueryBalancesResponse) Unmarshal(dAtA []byte) error
func (*QueryBalancesResponse) XXX_DiscardUnknown ¶
func (m *QueryBalancesResponse) XXX_DiscardUnknown()
func (*QueryBalancesResponse) XXX_Marshal ¶
func (m *QueryBalancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBalancesResponse) XXX_Merge ¶
func (m *QueryBalancesResponse) XXX_Merge(src proto.Message)
func (*QueryBalancesResponse) XXX_Size ¶
func (m *QueryBalancesResponse) XXX_Size() int
func (*QueryBalancesResponse) XXX_Unmarshal ¶
func (m *QueryBalancesResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Retrieves the unvested, vested and locked tokens for a vesting account Balances(ctx context.Context, in *QueryBalancesRequest, opts ...grpc.CallOption) (*QueryBalancesResponse, 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 QueryServer ¶
type QueryServer interface { // Retrieves the unvested, vested and locked tokens for a vesting account Balances(context.Context, *QueryBalancesRequest) (*QueryBalancesResponse, error) }
QueryServer is the server API for Query service.
type StakingKeeper ¶
type StakingKeeper interface { GetParams(ctx sdk.Context) stakingtypes.Params BondDenom(ctx sdk.Context) string GetDelegatorDelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) []stakingtypes.Delegation GetUnbondingDelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) []stakingtypes.UnbondingDelegation GetValidator(ctx sdk.Context, valAddr sdk.ValAddress) (stakingtypes.Validator, bool) // Support functions for Agoric's custom stakingkeeper logic on vestingkeeper GetUnbondingDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (stakingtypes.UnbondingDelegation, bool) HasMaxUnbondingDelegationEntries(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress) bool SetUnbondingDelegationEntry(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance sdk.Int) stakingtypes.UnbondingDelegation InsertUBDQueue(ctx sdk.Context, ubd stakingtypes.UnbondingDelegation, completionTime time.Time) RemoveUnbondingDelegation(ctx sdk.Context, ubd stakingtypes.UnbondingDelegation) SetUnbondingDelegation(ctx sdk.Context, ubd stakingtypes.UnbondingDelegation) GetDelegation(ctx sdk.Context, delAddr sdk.AccAddress, valAddr sdk.ValAddress) (stakingtypes.Delegation, bool) GetRedelegation(ctx sdk.Context, delAddr sdk.AccAddress, valSrcAddr, valDstAddr sdk.ValAddress) (stakingtypes.Redelegation, bool) MaxEntries(ctx sdk.Context) uint32 SetDelegation(ctx sdk.Context, delegation stakingtypes.Delegation) RemoveDelegation(ctx sdk.Context, delegation stakingtypes.Delegation) GetRedelegations(ctx sdk.Context, delegator sdk.AccAddress, maxRetrieve uint16) []stakingtypes.Redelegation SetRedelegationEntry(ctx sdk.Context, delegatorAddr sdk.AccAddress, validatorSrcAddr, validatorDstAddr sdk.ValAddress, creationHeight int64, minTime time.Time, balance sdk.Int, sharesSrc, sharesDst sdk.Dec) stakingtypes.Redelegation InsertRedelegationQueue(ctx sdk.Context, red stakingtypes.Redelegation, completionTime time.Time) SetRedelegation(ctx sdk.Context, red stakingtypes.Redelegation) RemoveRedelegation(ctx sdk.Context, red stakingtypes.Redelegation) // Hooks stakingtypes.StakingHooks }
StakingKeeper defines the expected interface contract the vesting module requires for finding and changing the delegated tokens, used in clawback.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) Clawback ¶
func (*UnimplementedMsgServer) Clawback(ctx context.Context, req *MsgClawback) (*MsgClawbackResponse, error)
func (*UnimplementedMsgServer) CreateClawbackVestingAccount ¶
func (*UnimplementedMsgServer) CreateClawbackVestingAccount(ctx context.Context, req *MsgCreateClawbackVestingAccount) (*MsgCreateClawbackVestingAccountResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Balances ¶
func (*UnimplementedQueryServer) Balances(ctx context.Context, req *QueryBalancesRequest) (*QueryBalancesResponse, error)