Documentation ¶
Index ¶
- Constants
- Variables
- func MsgTypeURL(msg sdk.Msg) string
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type AllowedMsgAllowance
- func (a *AllowedMsgAllowance) Accept(ctx sdk.Context, fee sdk.Coins, msgs []sdk.Msg) (bool, error)
- func (*AllowedMsgAllowance) Descriptor() ([]byte, []int)
- func (a *AllowedMsgAllowance) GetAllowance() (FeeAllowanceI, error)
- func (m *AllowedMsgAllowance) Marshal() (dAtA []byte, err error)
- func (m *AllowedMsgAllowance) MarshalTo(dAtA []byte) (int, error)
- func (m *AllowedMsgAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*AllowedMsgAllowance) ProtoMessage()
- func (m *AllowedMsgAllowance) Reset()
- func (a *AllowedMsgAllowance) SetAllowance(allowance FeeAllowanceI) error
- func (m *AllowedMsgAllowance) Size() (n int)
- func (m *AllowedMsgAllowance) String() string
- func (m *AllowedMsgAllowance) Unmarshal(dAtA []byte) error
- func (a *AllowedMsgAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (a *AllowedMsgAllowance) ValidateBasic() error
- func (m *AllowedMsgAllowance) XXX_DiscardUnknown()
- func (m *AllowedMsgAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *AllowedMsgAllowance) XXX_Merge(src proto.Message)
- func (m *AllowedMsgAllowance) XXX_Size() int
- func (m *AllowedMsgAllowance) XXX_Unmarshal(b []byte) error
- type BasicAllowance
- func (a *BasicAllowance) Accept(ctx sdk.Context, fee sdk.Coins, _ []sdk.Msg) (bool, error)
- func (*BasicAllowance) Descriptor() ([]byte, []int)
- func (m *BasicAllowance) GetExpiration() *time.Time
- func (m *BasicAllowance) GetSpendLimit() github_com_irisnet_core_sdk_go_types.Coins
- func (m *BasicAllowance) Marshal() (dAtA []byte, err error)
- func (m *BasicAllowance) MarshalTo(dAtA []byte) (int, error)
- func (m *BasicAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BasicAllowance) ProtoMessage()
- func (m *BasicAllowance) Reset()
- func (m *BasicAllowance) Size() (n int)
- func (m *BasicAllowance) String() string
- func (m *BasicAllowance) Unmarshal(dAtA []byte) error
- func (a BasicAllowance) ValidateBasic() error
- func (m *BasicAllowance) XXX_DiscardUnknown()
- func (m *BasicAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BasicAllowance) XXX_Merge(src proto.Message)
- func (m *BasicAllowance) XXX_Size() int
- func (m *BasicAllowance) XXX_Unmarshal(b []byte) error
- type Client
- type FeeAllowanceI
- type Grant
- func (*Grant) Descriptor() ([]byte, []int)
- func (m *Grant) GetAllowance() *types1.Any
- func (a Grant) GetGrant() (FeeAllowanceI, error)
- func (m *Grant) GetGrantee() string
- func (m *Grant) GetGranter() string
- func (m *Grant) Marshal() (dAtA []byte, err error)
- func (m *Grant) MarshalTo(dAtA []byte) (int, error)
- func (m *Grant) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Grant) ProtoMessage()
- func (m *Grant) Reset()
- func (m *Grant) Size() (n int)
- func (m *Grant) String() string
- func (m *Grant) Unmarshal(dAtA []byte) error
- func (a Grant) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (a Grant) ValidateBasic() error
- func (m *Grant) XXX_DiscardUnknown()
- func (m *Grant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Grant) XXX_Merge(src proto.Message)
- func (m *Grant) XXX_Size() int
- func (m *Grant) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgGrantAllowance
- func (*MsgGrantAllowance) Descriptor() ([]byte, []int)
- func (m *MsgGrantAllowance) GetAllowance() *types.Any
- func (msg MsgGrantAllowance) GetFeeAllowanceI() (FeeAllowanceI, error)
- func (m *MsgGrantAllowance) GetGrantee() string
- func (m *MsgGrantAllowance) GetGranter() string
- func (msg MsgGrantAllowance) GetSignBytes() []byte
- func (msg MsgGrantAllowance) GetSigners() []sdk.AccAddress
- func (m *MsgGrantAllowance) Marshal() (dAtA []byte, err error)
- func (m *MsgGrantAllowance) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgGrantAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgGrantAllowance) ProtoMessage()
- func (m *MsgGrantAllowance) Reset()
- func (msg MsgGrantAllowance) Route() string
- func (m *MsgGrantAllowance) Size() (n int)
- func (m *MsgGrantAllowance) String() string
- func (msg MsgGrantAllowance) Type() string
- func (m *MsgGrantAllowance) Unmarshal(dAtA []byte) error
- func (msg MsgGrantAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (msg MsgGrantAllowance) ValidateBasic() error
- func (m *MsgGrantAllowance) XXX_DiscardUnknown()
- func (m *MsgGrantAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgGrantAllowance) XXX_Merge(src proto.Message)
- func (m *MsgGrantAllowance) XXX_Size() int
- func (m *MsgGrantAllowance) XXX_Unmarshal(b []byte) error
- type MsgGrantAllowanceResponse
- func (*MsgGrantAllowanceResponse) Descriptor() ([]byte, []int)
- func (m *MsgGrantAllowanceResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgGrantAllowanceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgGrantAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgGrantAllowanceResponse) ProtoMessage()
- func (m *MsgGrantAllowanceResponse) Reset()
- func (m *MsgGrantAllowanceResponse) Size() (n int)
- func (m *MsgGrantAllowanceResponse) String() string
- func (m *MsgGrantAllowanceResponse) Unmarshal(dAtA []byte) error
- func (m *MsgGrantAllowanceResponse) XXX_DiscardUnknown()
- func (m *MsgGrantAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgGrantAllowanceResponse) XXX_Merge(src proto.Message)
- func (m *MsgGrantAllowanceResponse) XXX_Size() int
- func (m *MsgGrantAllowanceResponse) XXX_Unmarshal(b []byte) error
- type MsgRevokeAllowance
- func (*MsgRevokeAllowance) Descriptor() ([]byte, []int)
- func (m *MsgRevokeAllowance) GetGrantee() string
- func (m *MsgRevokeAllowance) GetGranter() string
- func (msg MsgRevokeAllowance) GetSignBytes() []byte
- func (msg MsgRevokeAllowance) GetSigners() []sdk.AccAddress
- func (m *MsgRevokeAllowance) Marshal() (dAtA []byte, err error)
- func (m *MsgRevokeAllowance) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRevokeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRevokeAllowance) ProtoMessage()
- func (m *MsgRevokeAllowance) Reset()
- func (msg MsgRevokeAllowance) Route() string
- func (m *MsgRevokeAllowance) Size() (n int)
- func (m *MsgRevokeAllowance) String() string
- func (msg MsgRevokeAllowance) Type() string
- func (m *MsgRevokeAllowance) Unmarshal(dAtA []byte) error
- func (msg MsgRevokeAllowance) ValidateBasic() error
- func (m *MsgRevokeAllowance) XXX_DiscardUnknown()
- func (m *MsgRevokeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRevokeAllowance) XXX_Merge(src proto.Message)
- func (m *MsgRevokeAllowance) XXX_Size() int
- func (m *MsgRevokeAllowance) XXX_Unmarshal(b []byte) error
- type MsgRevokeAllowanceResponse
- func (*MsgRevokeAllowanceResponse) Descriptor() ([]byte, []int)
- func (m *MsgRevokeAllowanceResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRevokeAllowanceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRevokeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRevokeAllowanceResponse) ProtoMessage()
- func (m *MsgRevokeAllowanceResponse) Reset()
- func (m *MsgRevokeAllowanceResponse) Size() (n int)
- func (m *MsgRevokeAllowanceResponse) String() string
- func (m *MsgRevokeAllowanceResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRevokeAllowanceResponse) XXX_DiscardUnknown()
- func (m *MsgRevokeAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRevokeAllowanceResponse) XXX_Merge(src proto.Message)
- func (m *MsgRevokeAllowanceResponse) XXX_Size() int
- func (m *MsgRevokeAllowanceResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type PeriodicAllowance
- func (m *PeriodicAllowance) Accept(ctx sdk.Context, fee sdk.Coins, _ []sdk.Msg) (remove bool, err error)
- func (*PeriodicAllowance) Descriptor() ([]byte, []int)
- func (m *PeriodicAllowance) GetBasic() BasicAllowance
- func (m *PeriodicAllowance) GetPeriod() time.Duration
- func (m *PeriodicAllowance) GetPeriodCanSpend() github_com_irisnet_core_sdk_go_types.Coins
- func (m *PeriodicAllowance) GetPeriodReset() time.Time
- func (m *PeriodicAllowance) GetPeriodSpendLimit() github_com_irisnet_core_sdk_go_types.Coins
- func (m *PeriodicAllowance) Marshal() (dAtA []byte, err error)
- func (m *PeriodicAllowance) MarshalTo(dAtA []byte) (int, error)
- func (m *PeriodicAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*PeriodicAllowance) ProtoMessage()
- func (m *PeriodicAllowance) Reset()
- func (m *PeriodicAllowance) Size() (n int)
- func (m *PeriodicAllowance) String() string
- func (m *PeriodicAllowance) Unmarshal(dAtA []byte) error
- func (m *PeriodicAllowance) ValidateBasic() error
- func (m *PeriodicAllowance) XXX_DiscardUnknown()
- func (m *PeriodicAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PeriodicAllowance) XXX_Merge(src proto.Message)
- func (m *PeriodicAllowance) XXX_Size() int
- func (m *PeriodicAllowance) XXX_Unmarshal(b []byte) error
- type QueryAllowanceRequest
- func (*QueryAllowanceRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllowanceRequest) GetGrantee() string
- func (m *QueryAllowanceRequest) GetGranter() string
- func (m *QueryAllowanceRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllowanceRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllowanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllowanceRequest) ProtoMessage()
- func (m *QueryAllowanceRequest) Reset()
- func (m *QueryAllowanceRequest) Size() (n int)
- func (m *QueryAllowanceRequest) String() string
- func (m *QueryAllowanceRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllowanceRequest) XXX_DiscardUnknown()
- func (m *QueryAllowanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllowanceRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllowanceRequest) XXX_Size() int
- func (m *QueryAllowanceRequest) XXX_Unmarshal(b []byte) error
- type QueryAllowanceResponse
- func (*QueryAllowanceResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllowanceResponse) GetAllowance() *Grant
- func (m *QueryAllowanceResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllowanceResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllowanceResponse) ProtoMessage()
- func (m *QueryAllowanceResponse) Reset()
- func (m *QueryAllowanceResponse) Size() (n int)
- func (m *QueryAllowanceResponse) String() string
- func (m *QueryAllowanceResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllowanceResponse) XXX_DiscardUnknown()
- func (m *QueryAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllowanceResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllowanceResponse) XXX_Size() int
- func (m *QueryAllowanceResponse) XXX_Unmarshal(b []byte) error
- type QueryAllowancesRequest
- func (*QueryAllowancesRequest) Descriptor() ([]byte, []int)
- func (m *QueryAllowancesRequest) GetGrantee() string
- func (m *QueryAllowancesRequest) GetPagination() *query.PageRequest
- func (m *QueryAllowancesRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAllowancesRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllowancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllowancesRequest) ProtoMessage()
- func (m *QueryAllowancesRequest) Reset()
- func (m *QueryAllowancesRequest) Size() (n int)
- func (m *QueryAllowancesRequest) String() string
- func (m *QueryAllowancesRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAllowancesRequest) XXX_DiscardUnknown()
- func (m *QueryAllowancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllowancesRequest) XXX_Merge(src proto.Message)
- func (m *QueryAllowancesRequest) XXX_Size() int
- func (m *QueryAllowancesRequest) XXX_Unmarshal(b []byte) error
- type QueryAllowancesResponse
- func (*QueryAllowancesResponse) Descriptor() ([]byte, []int)
- func (m *QueryAllowancesResponse) GetAllowances() []*Grant
- func (m *QueryAllowancesResponse) GetPagination() *query.PageResponse
- func (m *QueryAllowancesResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAllowancesResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAllowancesResponse) ProtoMessage()
- func (m *QueryAllowancesResponse) Reset()
- func (m *QueryAllowancesResponse) Size() (n int)
- func (m *QueryAllowancesResponse) String() string
- func (m *QueryAllowancesResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAllowancesResponse) XXX_DiscardUnknown()
- func (m *QueryAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAllowancesResponse) XXX_Merge(src proto.Message)
- func (m *QueryAllowancesResponse) XXX_Size() int
- func (m *QueryAllowancesResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( ModuleName = "fee grant" TypeMsgGrantAllowance = "grant allowance" TypeMsgRevokeAllowance = "revoke allowance" )
Variables ¶
var ( ErrInvalidLengthFeegrant = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowFeegrant = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupFeegrant = fmt.Errorf("proto: unexpected end of group") )
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 (
ModuleCdc = commoncodec.NewAminoCodec(amino)
)
Functions ¶
func MsgTypeURL ¶
MsgTypeURL returns the TypeURL of a `sdk.Msg`.
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers the interfaces types with the interface registry
func RegisterMsgServer ¶
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type AllowedMsgAllowance ¶
type AllowedMsgAllowance struct { // allowance can be any of basic and filtered fee allowance. Allowance *types1.Any `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` // allowed_messages are the messages for which the grantee has the access. AllowedMessages []string `protobuf:"bytes,2,rep,name=allowed_messages,json=allowedMessages,proto3" json:"allowed_messages,omitempty"` }
AllowedMsgAllowance creates allowance only for specified message types.
func NewAllowedMsgAllowance ¶
func NewAllowedMsgAllowance(allowance FeeAllowanceI, allowedMsgs []string) (*AllowedMsgAllowance, error)
NewAllowedMsgAllowance creates new filtered fee allowance.
func (*AllowedMsgAllowance) Accept ¶
Accept method checks for the filtered messages has valid expiry
func (*AllowedMsgAllowance) Descriptor ¶
func (*AllowedMsgAllowance) Descriptor() ([]byte, []int)
func (*AllowedMsgAllowance) GetAllowance ¶
func (a *AllowedMsgAllowance) GetAllowance() (FeeAllowanceI, error)
GetAllowance returns allowed fee allowance.
func (*AllowedMsgAllowance) Marshal ¶
func (m *AllowedMsgAllowance) Marshal() (dAtA []byte, err error)
func (*AllowedMsgAllowance) MarshalTo ¶
func (m *AllowedMsgAllowance) MarshalTo(dAtA []byte) (int, error)
func (*AllowedMsgAllowance) MarshalToSizedBuffer ¶
func (m *AllowedMsgAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*AllowedMsgAllowance) ProtoMessage ¶
func (*AllowedMsgAllowance) ProtoMessage()
func (*AllowedMsgAllowance) Reset ¶
func (m *AllowedMsgAllowance) Reset()
func (*AllowedMsgAllowance) SetAllowance ¶
func (a *AllowedMsgAllowance) SetAllowance(allowance FeeAllowanceI) error
SetAllowance sets allowed fee allowance.
func (*AllowedMsgAllowance) Size ¶
func (m *AllowedMsgAllowance) Size() (n int)
func (*AllowedMsgAllowance) String ¶
func (m *AllowedMsgAllowance) String() string
func (*AllowedMsgAllowance) Unmarshal ¶
func (m *AllowedMsgAllowance) Unmarshal(dAtA []byte) error
func (*AllowedMsgAllowance) UnpackInterfaces ¶
func (a *AllowedMsgAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (*AllowedMsgAllowance) ValidateBasic ¶
func (a *AllowedMsgAllowance) ValidateBasic() error
ValidateBasic implements FeeAllowance and enforces basic sanity checks
func (*AllowedMsgAllowance) XXX_DiscardUnknown ¶
func (m *AllowedMsgAllowance) XXX_DiscardUnknown()
func (*AllowedMsgAllowance) XXX_Marshal ¶
func (m *AllowedMsgAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AllowedMsgAllowance) XXX_Merge ¶
func (m *AllowedMsgAllowance) XXX_Merge(src proto.Message)
func (*AllowedMsgAllowance) XXX_Size ¶
func (m *AllowedMsgAllowance) XXX_Size() int
func (*AllowedMsgAllowance) XXX_Unmarshal ¶
func (m *AllowedMsgAllowance) XXX_Unmarshal(b []byte) error
type BasicAllowance ¶
type BasicAllowance struct { // spend_limit specifies the maximum amount of tokens that can be spent // by this allowance and will be updated as tokens are spent. If it is // empty, there is no spend limit and any amount of coins can be spent. SpendLimit github_com_irisnet_core_sdk_go_types.Coins `` /* 137-byte string literal not displayed */ // expiration specifies an optional time when this allowance expires Expiration *time.Time `protobuf:"bytes,2,opt,name=expiration,proto3,stdtime" json:"expiration,omitempty"` }
BasicAllowance implements Allowance with a one-time grant of tokens that optionally expires. The grantee can use up to SpendLimit to cover fees.
func (*BasicAllowance) Accept ¶
Accept can use fee payment requested as well as timestamp of the current block to determine whether or not to process this. This is checked in Keeper.UseGrantedFees and the return values should match how it is handled there.
If it returns an error, the fee payment is rejected, otherwise it is accepted. The FeeAllowance implementation is expected to update it's internal state and will be saved again after an acceptance.
If remove is true (regardless of the error), the FeeAllowance will be deleted from storage (eg. when it is used up). (See call to RevokeAllowance in Keeper.UseGrantedFees)
func (*BasicAllowance) Descriptor ¶
func (*BasicAllowance) Descriptor() ([]byte, []int)
func (*BasicAllowance) GetExpiration ¶
func (m *BasicAllowance) GetExpiration() *time.Time
func (*BasicAllowance) GetSpendLimit ¶
func (m *BasicAllowance) GetSpendLimit() github_com_irisnet_core_sdk_go_types.Coins
func (*BasicAllowance) Marshal ¶
func (m *BasicAllowance) Marshal() (dAtA []byte, err error)
func (*BasicAllowance) MarshalToSizedBuffer ¶
func (m *BasicAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BasicAllowance) ProtoMessage ¶
func (*BasicAllowance) ProtoMessage()
func (*BasicAllowance) Reset ¶
func (m *BasicAllowance) Reset()
func (*BasicAllowance) Size ¶
func (m *BasicAllowance) Size() (n int)
func (*BasicAllowance) String ¶
func (m *BasicAllowance) String() string
func (*BasicAllowance) Unmarshal ¶
func (m *BasicAllowance) Unmarshal(dAtA []byte) error
func (BasicAllowance) ValidateBasic ¶
func (a BasicAllowance) ValidateBasic() error
ValidateBasic implements FeeAllowance and enforces basic sanity checks
func (*BasicAllowance) XXX_DiscardUnknown ¶
func (m *BasicAllowance) XXX_DiscardUnknown()
func (*BasicAllowance) XXX_Marshal ¶
func (m *BasicAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BasicAllowance) XXX_Merge ¶
func (m *BasicAllowance) XXX_Merge(src proto.Message)
func (*BasicAllowance) XXX_Size ¶
func (m *BasicAllowance) XXX_Size() int
func (*BasicAllowance) XXX_Unmarshal ¶
func (m *BasicAllowance) XXX_Unmarshal(b []byte) error
type Client ¶
type Client interface { sdk.Module GrantAllowance(granter, grantee sdk.AccAddress, feeAllowance FeeAllowanceI, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error) RevokeAllowance(granter, grantee sdk.AccAddress, baseTx sdk.BaseTx) (sdk.ResultTx, sdk.Error) }
Client expose fee grant module api for user
func NewClient ¶
func NewClient(bc sdk.BaseClient, cdc commoncodec.Marshaler) Client
NewClient grant NewClient
type FeeAllowanceI ¶
type FeeAllowanceI interface { // Accept can use fee payment requested as well as timestamp of the current block // to determine whether or not to process this. This is checked in // Keeper.UseGrantedFees and the return values should match how it is handled there. // // If it returns an error, the fee payment is rejected, otherwise it is accepted. // The FeeAllowance implementation is expected to update it's internal state // and will be saved again after an acceptance. // // If remove is true (regardless of the error), the FeeAllowance will be deleted from storage // (eg. when it is used up). (See call to RevokeAllowance in Keeper.UseGrantedFees) Accept(ctx sdk.Context, fee sdk.Coins, msgs []sdk.Msg) (remove bool, err error) // ValidateBasic should evaluate this FeeAllowance for internal consistency. // Don't allow negative amounts, or negative periods for example. ValidateBasic() error }
FeeAllowance implementations are tied to a given fee delegator and delegatee, and are used to enforce fee grant limits.
type Grant ¶
type Grant struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` // allowance can be any of basic and filtered fee allowance. Allowance *types1.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` }
Grant is stored in the KVStore to record a grant with full context
func NewGrant ¶
func NewGrant(granter, grantee sdk.AccAddress, feeAllowance FeeAllowanceI) (Grant, error)
NewGrant creates a new FeeAllowanceGrant.
func (*Grant) Descriptor ¶
func (*Grant) GetAllowance ¶
func (*Grant) GetGrantee ¶
func (*Grant) GetGranter ¶
func (*Grant) ProtoMessage ¶
func (*Grant) ProtoMessage()
func (Grant) UnpackInterfaces ¶
func (a Grant) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (Grant) ValidateBasic ¶
ValidateBasic performs basic validation on FeeAllowanceGrant
func (*Grant) XXX_DiscardUnknown ¶
func (m *Grant) XXX_DiscardUnknown()
func (*Grant) XXX_Marshal ¶
func (*Grant) XXX_Unmarshal ¶
type MsgClient ¶
type MsgClient interface { // GrantAllowance grants fee allowance to the grantee on the granter's // account with the provided expiration time. GrantAllowance(ctx context.Context, in *MsgGrantAllowance, opts ...grpc.CallOption) (*MsgGrantAllowanceResponse, error) // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(ctx context.Context, in *MsgRevokeAllowance, opts ...grpc.CallOption) (*MsgRevokeAllowanceResponse, 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 MsgGrantAllowance ¶
type MsgGrantAllowance struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` // allowance can be any of basic and filtered fee allowance. Allowance *types.Any `protobuf:"bytes,3,opt,name=allowance,proto3" json:"allowance,omitempty"` }
MsgGrantAllowance adds permission for Grantee to spend up to Allowance of fees from the account of Granter.
func NewMsgGrantAllowance ¶
func NewMsgGrantAllowance(feeAllowance FeeAllowanceI, granter, grantee sdk.AccAddress) (*MsgGrantAllowance, error)
NewMsgGrantAllowance creates a new MsgGrantAllowance.
func (*MsgGrantAllowance) Descriptor ¶
func (*MsgGrantAllowance) Descriptor() ([]byte, []int)
func (*MsgGrantAllowance) GetAllowance ¶
func (m *MsgGrantAllowance) GetAllowance() *types.Any
func (MsgGrantAllowance) GetFeeAllowanceI ¶
func (msg MsgGrantAllowance) GetFeeAllowanceI() (FeeAllowanceI, error)
GetFeeAllowanceI returns unpacked FeeAllowance
func (*MsgGrantAllowance) GetGrantee ¶
func (m *MsgGrantAllowance) GetGrantee() string
func (*MsgGrantAllowance) GetGranter ¶
func (m *MsgGrantAllowance) GetGranter() string
func (MsgGrantAllowance) GetSignBytes ¶
func (msg MsgGrantAllowance) GetSignBytes() []byte
GetSignBytes implements the LegacyMsg.GetSignBytes method.
func (MsgGrantAllowance) GetSigners ¶
func (msg MsgGrantAllowance) GetSigners() []sdk.AccAddress
GetSigners gets the granter account associated with an allowance
func (*MsgGrantAllowance) Marshal ¶
func (m *MsgGrantAllowance) Marshal() (dAtA []byte, err error)
func (*MsgGrantAllowance) MarshalTo ¶
func (m *MsgGrantAllowance) MarshalTo(dAtA []byte) (int, error)
func (*MsgGrantAllowance) MarshalToSizedBuffer ¶
func (m *MsgGrantAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgGrantAllowance) ProtoMessage ¶
func (*MsgGrantAllowance) ProtoMessage()
func (*MsgGrantAllowance) Reset ¶
func (m *MsgGrantAllowance) Reset()
func (MsgGrantAllowance) Route ¶
func (msg MsgGrantAllowance) Route() string
Route implements the LegacyMsg.Route method.
func (*MsgGrantAllowance) Size ¶
func (m *MsgGrantAllowance) Size() (n int)
func (*MsgGrantAllowance) String ¶
func (m *MsgGrantAllowance) String() string
func (MsgGrantAllowance) Type ¶
func (msg MsgGrantAllowance) Type() string
Type implements the LegacyMsg.Type method.
func (*MsgGrantAllowance) Unmarshal ¶
func (m *MsgGrantAllowance) Unmarshal(dAtA []byte) error
func (MsgGrantAllowance) UnpackInterfaces ¶
func (msg MsgGrantAllowance) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (MsgGrantAllowance) ValidateBasic ¶
func (msg MsgGrantAllowance) ValidateBasic() error
ValidateBasic implements the sdk.Msg interface.
func (*MsgGrantAllowance) XXX_DiscardUnknown ¶
func (m *MsgGrantAllowance) XXX_DiscardUnknown()
func (*MsgGrantAllowance) XXX_Marshal ¶
func (m *MsgGrantAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgGrantAllowance) XXX_Merge ¶
func (m *MsgGrantAllowance) XXX_Merge(src proto.Message)
func (*MsgGrantAllowance) XXX_Size ¶
func (m *MsgGrantAllowance) XXX_Size() int
func (*MsgGrantAllowance) XXX_Unmarshal ¶
func (m *MsgGrantAllowance) XXX_Unmarshal(b []byte) error
type MsgGrantAllowanceResponse ¶
type MsgGrantAllowanceResponse struct { }
MsgGrantAllowanceResponse defines the Msg/GrantAllowanceResponse response type.
func (*MsgGrantAllowanceResponse) Descriptor ¶
func (*MsgGrantAllowanceResponse) Descriptor() ([]byte, []int)
func (*MsgGrantAllowanceResponse) Marshal ¶
func (m *MsgGrantAllowanceResponse) Marshal() (dAtA []byte, err error)
func (*MsgGrantAllowanceResponse) MarshalTo ¶
func (m *MsgGrantAllowanceResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgGrantAllowanceResponse) MarshalToSizedBuffer ¶
func (m *MsgGrantAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgGrantAllowanceResponse) ProtoMessage ¶
func (*MsgGrantAllowanceResponse) ProtoMessage()
func (*MsgGrantAllowanceResponse) Reset ¶
func (m *MsgGrantAllowanceResponse) Reset()
func (*MsgGrantAllowanceResponse) Size ¶
func (m *MsgGrantAllowanceResponse) Size() (n int)
func (*MsgGrantAllowanceResponse) String ¶
func (m *MsgGrantAllowanceResponse) String() string
func (*MsgGrantAllowanceResponse) Unmarshal ¶
func (m *MsgGrantAllowanceResponse) Unmarshal(dAtA []byte) error
func (*MsgGrantAllowanceResponse) XXX_DiscardUnknown ¶
func (m *MsgGrantAllowanceResponse) XXX_DiscardUnknown()
func (*MsgGrantAllowanceResponse) XXX_Marshal ¶
func (m *MsgGrantAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgGrantAllowanceResponse) XXX_Merge ¶
func (m *MsgGrantAllowanceResponse) XXX_Merge(src proto.Message)
func (*MsgGrantAllowanceResponse) XXX_Size ¶
func (m *MsgGrantAllowanceResponse) XXX_Size() int
func (*MsgGrantAllowanceResponse) XXX_Unmarshal ¶
func (m *MsgGrantAllowanceResponse) XXX_Unmarshal(b []byte) error
type MsgRevokeAllowance ¶
type MsgRevokeAllowance struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` }
MsgRevokeAllowance removes any existing Allowance from Granter to Grantee.
func NewMsgRevokeAllowance ¶
func NewMsgRevokeAllowance(granter sdk.AccAddress, grantee sdk.AccAddress) MsgRevokeAllowance
NewMsgRevokeAllowance returns a message to revoke a fee allowance for a given granter and grantee
func (*MsgRevokeAllowance) Descriptor ¶
func (*MsgRevokeAllowance) Descriptor() ([]byte, []int)
func (*MsgRevokeAllowance) GetGrantee ¶
func (m *MsgRevokeAllowance) GetGrantee() string
func (*MsgRevokeAllowance) GetGranter ¶
func (m *MsgRevokeAllowance) GetGranter() string
func (MsgRevokeAllowance) GetSignBytes ¶
func (msg MsgRevokeAllowance) GetSignBytes() []byte
GetSignBytes implements the LegacyMsg.GetSignBytes method.
func (MsgRevokeAllowance) GetSigners ¶
func (msg MsgRevokeAllowance) GetSigners() []sdk.AccAddress
GetSigners gets the granter address associated with an Allowance to revoke.
func (*MsgRevokeAllowance) Marshal ¶
func (m *MsgRevokeAllowance) Marshal() (dAtA []byte, err error)
func (*MsgRevokeAllowance) MarshalTo ¶
func (m *MsgRevokeAllowance) MarshalTo(dAtA []byte) (int, error)
func (*MsgRevokeAllowance) MarshalToSizedBuffer ¶
func (m *MsgRevokeAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRevokeAllowance) ProtoMessage ¶
func (*MsgRevokeAllowance) ProtoMessage()
func (*MsgRevokeAllowance) Reset ¶
func (m *MsgRevokeAllowance) Reset()
func (MsgRevokeAllowance) Route ¶
func (msg MsgRevokeAllowance) Route() string
Route implements the LegacyMsg.Route method.
func (*MsgRevokeAllowance) Size ¶
func (m *MsgRevokeAllowance) Size() (n int)
func (*MsgRevokeAllowance) String ¶
func (m *MsgRevokeAllowance) String() string
func (MsgRevokeAllowance) Type ¶
func (msg MsgRevokeAllowance) Type() string
Type implements the LegacyMsg.Type method.
func (*MsgRevokeAllowance) Unmarshal ¶
func (m *MsgRevokeAllowance) Unmarshal(dAtA []byte) error
func (MsgRevokeAllowance) ValidateBasic ¶
func (msg MsgRevokeAllowance) ValidateBasic() error
ValidateBasic implements the sdk.Msg interface.
func (*MsgRevokeAllowance) XXX_DiscardUnknown ¶
func (m *MsgRevokeAllowance) XXX_DiscardUnknown()
func (*MsgRevokeAllowance) XXX_Marshal ¶
func (m *MsgRevokeAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRevokeAllowance) XXX_Merge ¶
func (m *MsgRevokeAllowance) XXX_Merge(src proto.Message)
func (*MsgRevokeAllowance) XXX_Size ¶
func (m *MsgRevokeAllowance) XXX_Size() int
func (*MsgRevokeAllowance) XXX_Unmarshal ¶
func (m *MsgRevokeAllowance) XXX_Unmarshal(b []byte) error
type MsgRevokeAllowanceResponse ¶
type MsgRevokeAllowanceResponse struct { }
MsgRevokeAllowanceResponse defines the Msg/RevokeAllowanceResponse response type.
func (*MsgRevokeAllowanceResponse) Descriptor ¶
func (*MsgRevokeAllowanceResponse) Descriptor() ([]byte, []int)
func (*MsgRevokeAllowanceResponse) Marshal ¶
func (m *MsgRevokeAllowanceResponse) Marshal() (dAtA []byte, err error)
func (*MsgRevokeAllowanceResponse) MarshalTo ¶
func (m *MsgRevokeAllowanceResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgRevokeAllowanceResponse) MarshalToSizedBuffer ¶
func (m *MsgRevokeAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgRevokeAllowanceResponse) ProtoMessage ¶
func (*MsgRevokeAllowanceResponse) ProtoMessage()
func (*MsgRevokeAllowanceResponse) Reset ¶
func (m *MsgRevokeAllowanceResponse) Reset()
func (*MsgRevokeAllowanceResponse) Size ¶
func (m *MsgRevokeAllowanceResponse) Size() (n int)
func (*MsgRevokeAllowanceResponse) String ¶
func (m *MsgRevokeAllowanceResponse) String() string
func (*MsgRevokeAllowanceResponse) Unmarshal ¶
func (m *MsgRevokeAllowanceResponse) Unmarshal(dAtA []byte) error
func (*MsgRevokeAllowanceResponse) XXX_DiscardUnknown ¶
func (m *MsgRevokeAllowanceResponse) XXX_DiscardUnknown()
func (*MsgRevokeAllowanceResponse) XXX_Marshal ¶
func (m *MsgRevokeAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgRevokeAllowanceResponse) XXX_Merge ¶
func (m *MsgRevokeAllowanceResponse) XXX_Merge(src proto.Message)
func (*MsgRevokeAllowanceResponse) XXX_Size ¶
func (m *MsgRevokeAllowanceResponse) XXX_Size() int
func (*MsgRevokeAllowanceResponse) XXX_Unmarshal ¶
func (m *MsgRevokeAllowanceResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // GrantAllowance grants fee allowance to the grantee on the granter's // account with the provided expiration time. GrantAllowance(context.Context, *MsgGrantAllowance) (*MsgGrantAllowanceResponse, error) // RevokeAllowance revokes any fee allowance of granter's account that // has been granted to the grantee. RevokeAllowance(context.Context, *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error) }
MsgServer is the server API for Msg service.
type PeriodicAllowance ¶
type PeriodicAllowance struct { // basic specifies a struct of `BasicAllowance` Basic BasicAllowance `protobuf:"bytes,1,opt,name=basic,proto3" json:"basic"` // period specifies the time duration in which period_spend_limit coins can // be spent before that allowance is reset Period time.Duration `protobuf:"bytes,2,opt,name=period,proto3,stdduration" json:"period"` // period_spend_limit specifies the maximum number of coins that can be spent // in the period PeriodSpendLimit github_com_irisnet_core_sdk_go_types.Coins `` /* 157-byte string literal not displayed */ // period_can_spend is the number of coins left to be spent before the period_reset time PeriodCanSpend github_com_irisnet_core_sdk_go_types.Coins `` /* 151-byte string literal not displayed */ // period_reset is the time at which this period resets and a new one begins, // it is calculated from the start time of the first transaction after the // last period ended PeriodReset time.Time `protobuf:"bytes,5,opt,name=period_reset,json=periodReset,proto3,stdtime" json:"period_reset"` }
PeriodicAllowance extends Allowance to allow for both a maximum cap, as well as a limit per time period.
func (*PeriodicAllowance) Descriptor ¶
func (*PeriodicAllowance) Descriptor() ([]byte, []int)
func (*PeriodicAllowance) GetBasic ¶
func (m *PeriodicAllowance) GetBasic() BasicAllowance
func (*PeriodicAllowance) GetPeriod ¶
func (m *PeriodicAllowance) GetPeriod() time.Duration
func (*PeriodicAllowance) GetPeriodCanSpend ¶
func (m *PeriodicAllowance) GetPeriodCanSpend() github_com_irisnet_core_sdk_go_types.Coins
func (*PeriodicAllowance) GetPeriodReset ¶
func (m *PeriodicAllowance) GetPeriodReset() time.Time
func (*PeriodicAllowance) GetPeriodSpendLimit ¶
func (m *PeriodicAllowance) GetPeriodSpendLimit() github_com_irisnet_core_sdk_go_types.Coins
func (*PeriodicAllowance) Marshal ¶
func (m *PeriodicAllowance) Marshal() (dAtA []byte, err error)
func (*PeriodicAllowance) MarshalTo ¶
func (m *PeriodicAllowance) MarshalTo(dAtA []byte) (int, error)
func (*PeriodicAllowance) MarshalToSizedBuffer ¶
func (m *PeriodicAllowance) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*PeriodicAllowance) ProtoMessage ¶
func (*PeriodicAllowance) ProtoMessage()
func (*PeriodicAllowance) Reset ¶
func (m *PeriodicAllowance) Reset()
func (*PeriodicAllowance) Size ¶
func (m *PeriodicAllowance) Size() (n int)
func (*PeriodicAllowance) String ¶
func (m *PeriodicAllowance) String() string
func (*PeriodicAllowance) Unmarshal ¶
func (m *PeriodicAllowance) Unmarshal(dAtA []byte) error
func (*PeriodicAllowance) ValidateBasic ¶
func (m *PeriodicAllowance) ValidateBasic() error
func (*PeriodicAllowance) XXX_DiscardUnknown ¶
func (m *PeriodicAllowance) XXX_DiscardUnknown()
func (*PeriodicAllowance) XXX_Marshal ¶
func (m *PeriodicAllowance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*PeriodicAllowance) XXX_Merge ¶
func (m *PeriodicAllowance) XXX_Merge(src proto.Message)
func (*PeriodicAllowance) XXX_Size ¶
func (m *PeriodicAllowance) XXX_Size() int
func (*PeriodicAllowance) XXX_Unmarshal ¶
func (m *PeriodicAllowance) XXX_Unmarshal(b []byte) error
type QueryAllowanceRequest ¶
type QueryAllowanceRequest struct { // granter is the address of the user granting an allowance of their funds. Granter string `protobuf:"bytes,1,opt,name=granter,proto3" json:"granter,omitempty"` // grantee is the address of the user being granted an allowance of another user's funds. Grantee string `protobuf:"bytes,2,opt,name=grantee,proto3" json:"grantee,omitempty"` }
QueryAllowanceRequest is the request type for the Query/Allowance RPC method.
func (*QueryAllowanceRequest) Descriptor ¶
func (*QueryAllowanceRequest) Descriptor() ([]byte, []int)
func (*QueryAllowanceRequest) GetGrantee ¶
func (m *QueryAllowanceRequest) GetGrantee() string
func (*QueryAllowanceRequest) GetGranter ¶
func (m *QueryAllowanceRequest) GetGranter() string
func (*QueryAllowanceRequest) Marshal ¶
func (m *QueryAllowanceRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllowanceRequest) MarshalTo ¶
func (m *QueryAllowanceRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllowanceRequest) MarshalToSizedBuffer ¶
func (m *QueryAllowanceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllowanceRequest) ProtoMessage ¶
func (*QueryAllowanceRequest) ProtoMessage()
func (*QueryAllowanceRequest) Reset ¶
func (m *QueryAllowanceRequest) Reset()
func (*QueryAllowanceRequest) Size ¶
func (m *QueryAllowanceRequest) Size() (n int)
func (*QueryAllowanceRequest) String ¶
func (m *QueryAllowanceRequest) String() string
func (*QueryAllowanceRequest) Unmarshal ¶
func (m *QueryAllowanceRequest) Unmarshal(dAtA []byte) error
func (*QueryAllowanceRequest) XXX_DiscardUnknown ¶
func (m *QueryAllowanceRequest) XXX_DiscardUnknown()
func (*QueryAllowanceRequest) XXX_Marshal ¶
func (m *QueryAllowanceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllowanceRequest) XXX_Merge ¶
func (m *QueryAllowanceRequest) XXX_Merge(src proto.Message)
func (*QueryAllowanceRequest) XXX_Size ¶
func (m *QueryAllowanceRequest) XXX_Size() int
func (*QueryAllowanceRequest) XXX_Unmarshal ¶
func (m *QueryAllowanceRequest) XXX_Unmarshal(b []byte) error
type QueryAllowanceResponse ¶
type QueryAllowanceResponse struct { // allowance is a allowance granted for grantee by granter. Allowance *Grant `protobuf:"bytes,1,opt,name=allowance,proto3" json:"allowance,omitempty"` }
QueryAllowanceResponse is the response type for the Query/Allowance RPC method.
func (*QueryAllowanceResponse) Descriptor ¶
func (*QueryAllowanceResponse) Descriptor() ([]byte, []int)
func (*QueryAllowanceResponse) GetAllowance ¶
func (m *QueryAllowanceResponse) GetAllowance() *Grant
func (*QueryAllowanceResponse) Marshal ¶
func (m *QueryAllowanceResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllowanceResponse) MarshalTo ¶
func (m *QueryAllowanceResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllowanceResponse) MarshalToSizedBuffer ¶
func (m *QueryAllowanceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllowanceResponse) ProtoMessage ¶
func (*QueryAllowanceResponse) ProtoMessage()
func (*QueryAllowanceResponse) Reset ¶
func (m *QueryAllowanceResponse) Reset()
func (*QueryAllowanceResponse) Size ¶
func (m *QueryAllowanceResponse) Size() (n int)
func (*QueryAllowanceResponse) String ¶
func (m *QueryAllowanceResponse) String() string
func (*QueryAllowanceResponse) Unmarshal ¶
func (m *QueryAllowanceResponse) Unmarshal(dAtA []byte) error
func (*QueryAllowanceResponse) XXX_DiscardUnknown ¶
func (m *QueryAllowanceResponse) XXX_DiscardUnknown()
func (*QueryAllowanceResponse) XXX_Marshal ¶
func (m *QueryAllowanceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllowanceResponse) XXX_Merge ¶
func (m *QueryAllowanceResponse) XXX_Merge(src proto.Message)
func (*QueryAllowanceResponse) XXX_Size ¶
func (m *QueryAllowanceResponse) XXX_Size() int
func (*QueryAllowanceResponse) XXX_Unmarshal ¶
func (m *QueryAllowanceResponse) XXX_Unmarshal(b []byte) error
type QueryAllowancesRequest ¶
type QueryAllowancesRequest struct { Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` // pagination defines an pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryAllowancesRequest is the request type for the Query/Allowances RPC method.
func (*QueryAllowancesRequest) Descriptor ¶
func (*QueryAllowancesRequest) Descriptor() ([]byte, []int)
func (*QueryAllowancesRequest) GetGrantee ¶
func (m *QueryAllowancesRequest) GetGrantee() string
func (*QueryAllowancesRequest) GetPagination ¶
func (m *QueryAllowancesRequest) GetPagination() *query.PageRequest
func (*QueryAllowancesRequest) Marshal ¶
func (m *QueryAllowancesRequest) Marshal() (dAtA []byte, err error)
func (*QueryAllowancesRequest) MarshalTo ¶
func (m *QueryAllowancesRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllowancesRequest) MarshalToSizedBuffer ¶
func (m *QueryAllowancesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllowancesRequest) ProtoMessage ¶
func (*QueryAllowancesRequest) ProtoMessage()
func (*QueryAllowancesRequest) Reset ¶
func (m *QueryAllowancesRequest) Reset()
func (*QueryAllowancesRequest) Size ¶
func (m *QueryAllowancesRequest) Size() (n int)
func (*QueryAllowancesRequest) String ¶
func (m *QueryAllowancesRequest) String() string
func (*QueryAllowancesRequest) Unmarshal ¶
func (m *QueryAllowancesRequest) Unmarshal(dAtA []byte) error
func (*QueryAllowancesRequest) XXX_DiscardUnknown ¶
func (m *QueryAllowancesRequest) XXX_DiscardUnknown()
func (*QueryAllowancesRequest) XXX_Marshal ¶
func (m *QueryAllowancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllowancesRequest) XXX_Merge ¶
func (m *QueryAllowancesRequest) XXX_Merge(src proto.Message)
func (*QueryAllowancesRequest) XXX_Size ¶
func (m *QueryAllowancesRequest) XXX_Size() int
func (*QueryAllowancesRequest) XXX_Unmarshal ¶
func (m *QueryAllowancesRequest) XXX_Unmarshal(b []byte) error
type QueryAllowancesResponse ¶
type QueryAllowancesResponse struct { // allowances are allowance's granted for grantee by granter. Allowances []*Grant `protobuf:"bytes,1,rep,name=allowances,proto3" json:"allowances,omitempty"` // pagination defines an pagination for the response. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryAllowancesResponse is the response type for the Query/Allowances RPC method.
func (*QueryAllowancesResponse) Descriptor ¶
func (*QueryAllowancesResponse) Descriptor() ([]byte, []int)
func (*QueryAllowancesResponse) GetAllowances ¶
func (m *QueryAllowancesResponse) GetAllowances() []*Grant
func (*QueryAllowancesResponse) GetPagination ¶
func (m *QueryAllowancesResponse) GetPagination() *query.PageResponse
func (*QueryAllowancesResponse) Marshal ¶
func (m *QueryAllowancesResponse) Marshal() (dAtA []byte, err error)
func (*QueryAllowancesResponse) MarshalTo ¶
func (m *QueryAllowancesResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAllowancesResponse) MarshalToSizedBuffer ¶
func (m *QueryAllowancesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAllowancesResponse) ProtoMessage ¶
func (*QueryAllowancesResponse) ProtoMessage()
func (*QueryAllowancesResponse) Reset ¶
func (m *QueryAllowancesResponse) Reset()
func (*QueryAllowancesResponse) Size ¶
func (m *QueryAllowancesResponse) Size() (n int)
func (*QueryAllowancesResponse) String ¶
func (m *QueryAllowancesResponse) String() string
func (*QueryAllowancesResponse) Unmarshal ¶
func (m *QueryAllowancesResponse) Unmarshal(dAtA []byte) error
func (*QueryAllowancesResponse) XXX_DiscardUnknown ¶
func (m *QueryAllowancesResponse) XXX_DiscardUnknown()
func (*QueryAllowancesResponse) XXX_Marshal ¶
func (m *QueryAllowancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAllowancesResponse) XXX_Merge ¶
func (m *QueryAllowancesResponse) XXX_Merge(src proto.Message)
func (*QueryAllowancesResponse) XXX_Size ¶
func (m *QueryAllowancesResponse) XXX_Size() int
func (*QueryAllowancesResponse) XXX_Unmarshal ¶
func (m *QueryAllowancesResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // Allowance returns fee granted to the grantee by the granter. Allowance(ctx context.Context, in *QueryAllowanceRequest, opts ...grpc.CallOption) (*QueryAllowanceResponse, error) // Allowances returns all the grants for address. Allowances(ctx context.Context, in *QueryAllowancesRequest, opts ...grpc.CallOption) (*QueryAllowancesResponse, 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 { // Allowance returns fee granted to the grantee by the granter. Allowance(context.Context, *QueryAllowanceRequest) (*QueryAllowanceResponse, error) // Allowances returns all the grants for address. Allowances(context.Context, *QueryAllowancesRequest) (*QueryAllowancesResponse, error) }
QueryServer is the server API for Query service.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) GrantAllowance ¶
func (*UnimplementedMsgServer) GrantAllowance(ctx context.Context, req *MsgGrantAllowance) (*MsgGrantAllowanceResponse, error)
func (*UnimplementedMsgServer) RevokeAllowance ¶
func (*UnimplementedMsgServer) RevokeAllowance(ctx context.Context, req *MsgRevokeAllowance) (*MsgRevokeAllowanceResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Allowance ¶
func (*UnimplementedQueryServer) Allowance(ctx context.Context, req *QueryAllowanceRequest) (*QueryAllowanceResponse, error)
func (*UnimplementedQueryServer) Allowances ¶
func (*UnimplementedQueryServer) Allowances(ctx context.Context, req *QueryAllowancesRequest) (*QueryAllowancesResponse, error)