types

package
v1.1.0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: LGPL-3.0 Imports: 30 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeConvertTabi   = "convert_tabi"
	EventTypeConvertVetabi = "convert_vetabi"
	EventTypeWithdrawTabi  = "withdraw_tabi"
	EventTypeCancelConvert = "cancel_convert"

	AttributeValueCategory = ModuleName

	AttributeKeySender     = "sender"
	AttributeKeyAmount     = "amount"
	AttributeKeyVoucherID  = "voucher_id"
	AttributeKeyExpiryTime = "expiry_time"
)
View Source
const (
	StrategyInstant = "instant"
	Strategy90Days  = "90days"
	Strategy180Days = "180days"
)
View Source
const (
	// ModuleName is the name of the module
	ModuleName = "tokenconvert"

	// StoreKey is the store key for token-convert
	StoreKey = ModuleName
)
View Source
const (
	TypeMsgConvertTabi   = "convert_tabi"
	TypeMsgConvertVetabi = "convert_vetabi"
	TypeMsgWithdrawTabi  = "withdraw_tabi"
	TypeMsgCancelConvert = "cancel_convert"
)

token-convert module message types

Variables

View Source
var (
	ErrInvalidStrategy     = sdkerrors.Register(ModuleName, 1, "invalid strategy")
	ErrInvalidVoucher      = sdkerrors.Register(ModuleName, 2, "invalid voucher")
	ErrInvalidVoucherOwner = sdkerrors.Register(ModuleName, 3, "invalid voucher owner")
	ErrInsufficientFunds   = sdkerrors.Register(ModuleName, 4, "insufficient funds")
	ErrInvalidCoin         = sdkerrors.Register(ModuleName, 5, "invalid coin")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	StrategyKey       = []byte{0x01}
	VoucherKey        = []byte{0x02}
	VoucherByOwnerKey = []byte{0x03}
	VoucherSeqKey     = []byte{0x04}

	Delimiter   = []byte{0x00}
	PlaceHolder = []byte{0x01}
)

KVStore keys

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTokenConvert        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTokenConvert          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTokenConvert = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func StrategyStoreKey

func StrategyStoreKey(strategy []byte) []byte

StrategyStoreKey returns the byte representation of the strategy key Items are stored with key as follows: 0x01<strategy>

func ValidateGenesis

func ValidateGenesis(data GenesisState) error

ValidateGenesis performs basic validation of genesis data returning an

func VoucherByOwnerStoreKey

func VoucherByOwnerStoreKey(owner sdktypes.AccAddress, voucherID string) []byte

VoucherByOwnerStoreKey returns the byte representation of the voucher by owner key Items are stored with key as follows: 0x03<owner><Delimiter(1 Byte)><voucherID>

func VoucherByOwnerStorePrefixKey

func VoucherByOwnerStorePrefixKey(owner sdktypes.AccAddress) []byte

VoucherByOwnerStorePrefixKey returns the byte representation of the voucher by owner prefix key Items are stored with key as follows: 0x03<owner><Delimiter(1 Byte)>

func VoucherStoreKey

func VoucherStoreKey(voucherID string) []byte

VoucherStoreKey returns the byte representation of the voucher key Items are stored with key as follows: 0x02<voucherID>

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	GetModuleAddress(moduleName string) sdk.AccAddress
}

type BankKeeper

type BankKeeper interface {
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin

	MintCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amounts sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

type GenesisState

type GenesisState struct {
	// voucher_sequence defines the current maximum voucher sequence.
	VoucherSequence uint64 `protobuf:"varint,1,opt,name=voucher_sequence,json=voucherSequence,proto3" json:"voucher_sequence,omitempty"`
	// strategies defines the list of strategies.
	Strategies []Strategy `protobuf:"bytes,2,rep,name=strategies,proto3" json:"strategies"`
	// vouchers defines the list of vouchers.
	Vouchers []Voucher `protobuf:"bytes,3,rep,name=vouchers,proto3" json:"vouchers"`
}

GenesisState defines the token-convert module's genesis state.

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns a default genesis state

func NewGenesisState

func NewGenesisState(nextSeq uint64, strategies []Strategy, vouchers []Voucher) *GenesisState

NewGenesisState create a module's genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetStrategies

func (m *GenesisState) GetStrategies() []Strategy

func (*GenesisState) GetVoucherSequence

func (m *GenesisState) GetVoucherSequence() uint64

func (*GenesisState) GetVouchers

func (m *GenesisState) GetVouchers() []Voucher

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type MsgCancelConvert

type MsgCancelConvert struct {
	VoucherId string `protobuf:"bytes,1,opt,name=voucher_id,json=voucherId,proto3" json:"voucher_id,omitempty"`
	Sender    string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
}

MsgCancelConvert represents a message to cancel the conversion of Vetabi to Tabi.

func NewMsgCancelConvert

func NewMsgCancelConvert(voucherId string, sender sdk.AccAddress) *MsgCancelConvert

NewMsgCancelConvert is a constructor function for MsgCancelConvert

func (*MsgCancelConvert) Descriptor

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

func (*MsgCancelConvert) GetSender

func (m *MsgCancelConvert) GetSender() string

func (*MsgCancelConvert) GetSigners

func (m *MsgCancelConvert) GetSigners() []sdk.AccAddress

func (*MsgCancelConvert) GetVoucherId

func (m *MsgCancelConvert) GetVoucherId() string

func (*MsgCancelConvert) Marshal

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

func (*MsgCancelConvert) MarshalTo

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

func (*MsgCancelConvert) MarshalToSizedBuffer

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

func (*MsgCancelConvert) ProtoMessage

func (*MsgCancelConvert) ProtoMessage()

func (*MsgCancelConvert) Reset

func (m *MsgCancelConvert) Reset()

func (*MsgCancelConvert) Size

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

func (*MsgCancelConvert) String

func (m *MsgCancelConvert) String() string

func (*MsgCancelConvert) Unmarshal

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

func (*MsgCancelConvert) ValidateBasic

func (m *MsgCancelConvert) ValidateBasic() error

func (*MsgCancelConvert) XXX_DiscardUnknown

func (m *MsgCancelConvert) XXX_DiscardUnknown()

func (*MsgCancelConvert) XXX_Marshal

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

func (*MsgCancelConvert) XXX_Merge

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

func (*MsgCancelConvert) XXX_Size

func (m *MsgCancelConvert) XXX_Size() int

func (*MsgCancelConvert) XXX_Unmarshal

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

type MsgCancelConvertResponse

type MsgCancelConvertResponse struct {
	VetabiUnlocked types.Coin `protobuf:"bytes,1,opt,name=vetabi_unlocked,json=vetabiUnlocked,proto3" json:"vetabi_unlocked"`
}

MsgCancelConvertResponse defines the Msg/CancelConvert response type.

func (*MsgCancelConvertResponse) Descriptor

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

func (*MsgCancelConvertResponse) GetVetabiUnlocked

func (m *MsgCancelConvertResponse) GetVetabiUnlocked() types.Coin

func (*MsgCancelConvertResponse) Marshal

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

func (*MsgCancelConvertResponse) MarshalTo

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

func (*MsgCancelConvertResponse) MarshalToSizedBuffer

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

func (*MsgCancelConvertResponse) ProtoMessage

func (*MsgCancelConvertResponse) ProtoMessage()

func (*MsgCancelConvertResponse) Reset

func (m *MsgCancelConvertResponse) Reset()

func (*MsgCancelConvertResponse) Size

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

func (*MsgCancelConvertResponse) String

func (m *MsgCancelConvertResponse) String() string

func (*MsgCancelConvertResponse) Unmarshal

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

func (*MsgCancelConvertResponse) XXX_DiscardUnknown

func (m *MsgCancelConvertResponse) XXX_DiscardUnknown()

func (*MsgCancelConvertResponse) XXX_Marshal

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

func (*MsgCancelConvertResponse) XXX_Merge

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

func (*MsgCancelConvertResponse) XXX_Size

func (m *MsgCancelConvertResponse) XXX_Size() int

func (*MsgCancelConvertResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// ConvertTabi converts Tabi to Vetabi at a 1:1 ratio.
	ConvertTabi(ctx context.Context, in *MsgConvertTabi, opts ...grpc.CallOption) (*MsgConvertTabiResponse, error)
	// ConvertVetabi converts Vetabi to Tabi with the given unlock strategy
	// and return a voucher for redeeming Tabi.
	ConvertVetabi(ctx context.Context, in *MsgConvertVetabi, opts ...grpc.CallOption) (*MsgConvertVetabiResponse, error)
	// WithdrawTabi sends the unlocked Tabi to owner of the voucher and
	// burns Vetabi as well as Tabi according to the unlock strategy.
	WithdrawTabi(ctx context.Context, in *MsgWithdrawTabi, opts ...grpc.CallOption) (*MsgWithdrawTabiResponse, error)
	// CancelConvert cancels the conversion of Vetabi to Tabi.
	CancelConvert(ctx context.Context, in *MsgCancelConvert, opts ...grpc.CallOption) (*MsgCancelConvertResponse, 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 MsgConvertTabi

type MsgConvertTabi struct {
	Coin   types.Coin `protobuf:"bytes,1,opt,name=coin,proto3" json:"coin"`
	Sender string     `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
}

MsgConvertTabi represents a message to convert Tabi to Vetabi.

func NewMsgConvertTabi

func NewMsgConvertTabi(coin sdk.Coin, sender sdk.AccAddress) *MsgConvertTabi

NewMsgConvertTabi is a constructor function for MsgConvertTabi

func (*MsgConvertTabi) Descriptor

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

func (*MsgConvertTabi) GetCoin

func (m *MsgConvertTabi) GetCoin() types.Coin

func (*MsgConvertTabi) GetSender

func (m *MsgConvertTabi) GetSender() string

func (*MsgConvertTabi) GetSigners

func (m *MsgConvertTabi) GetSigners() []sdk.AccAddress

func (*MsgConvertTabi) Marshal

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

func (*MsgConvertTabi) MarshalTo

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

func (*MsgConvertTabi) MarshalToSizedBuffer

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

func (*MsgConvertTabi) ProtoMessage

func (*MsgConvertTabi) ProtoMessage()

func (*MsgConvertTabi) Reset

func (m *MsgConvertTabi) Reset()

func (*MsgConvertTabi) Size

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

func (*MsgConvertTabi) String

func (m *MsgConvertTabi) String() string

func (*MsgConvertTabi) Unmarshal

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

func (*MsgConvertTabi) ValidateBasic

func (m *MsgConvertTabi) ValidateBasic() error

func (*MsgConvertTabi) XXX_DiscardUnknown

func (m *MsgConvertTabi) XXX_DiscardUnknown()

func (*MsgConvertTabi) XXX_Marshal

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

func (*MsgConvertTabi) XXX_Merge

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

func (*MsgConvertTabi) XXX_Size

func (m *MsgConvertTabi) XXX_Size() int

func (*MsgConvertTabi) XXX_Unmarshal

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

type MsgConvertTabiResponse

type MsgConvertTabiResponse struct {
}

MsgConvertTabiResponse defines the Msg/ConvertTabi response type.

func (*MsgConvertTabiResponse) Descriptor

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

func (*MsgConvertTabiResponse) Marshal

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

func (*MsgConvertTabiResponse) MarshalTo

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

func (*MsgConvertTabiResponse) MarshalToSizedBuffer

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

func (*MsgConvertTabiResponse) ProtoMessage

func (*MsgConvertTabiResponse) ProtoMessage()

func (*MsgConvertTabiResponse) Reset

func (m *MsgConvertTabiResponse) Reset()

func (*MsgConvertTabiResponse) Size

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

func (*MsgConvertTabiResponse) String

func (m *MsgConvertTabiResponse) String() string

func (*MsgConvertTabiResponse) Unmarshal

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

func (*MsgConvertTabiResponse) XXX_DiscardUnknown

func (m *MsgConvertTabiResponse) XXX_DiscardUnknown()

func (*MsgConvertTabiResponse) XXX_Marshal

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

func (*MsgConvertTabiResponse) XXX_Merge

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

func (*MsgConvertTabiResponse) XXX_Size

func (m *MsgConvertTabiResponse) XXX_Size() int

func (*MsgConvertTabiResponse) XXX_Unmarshal

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

type MsgConvertVetabi

type MsgConvertVetabi struct {
	Coin     types.Coin `protobuf:"bytes,1,opt,name=coin,proto3" json:"coin"`
	Strategy string     `protobuf:"bytes,2,opt,name=strategy,proto3" json:"strategy,omitempty"`
	Sender   string     `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
}

MsgConvertVetabi represents a message to convert Vetabi to Tabi.

func NewMsgConvertVetabi

func NewMsgConvertVetabi(coin sdk.Coin, sender sdk.AccAddress, strategy string) *MsgConvertVetabi

NewMsgConvertVetabi is a constructor function for MsgConvertVetabi

func (*MsgConvertVetabi) Descriptor

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

func (*MsgConvertVetabi) GetCoin

func (m *MsgConvertVetabi) GetCoin() types.Coin

func (*MsgConvertVetabi) GetSender

func (m *MsgConvertVetabi) GetSender() string

func (*MsgConvertVetabi) GetSigners

func (m *MsgConvertVetabi) GetSigners() []sdk.AccAddress

func (*MsgConvertVetabi) GetStrategy

func (m *MsgConvertVetabi) GetStrategy() string

func (*MsgConvertVetabi) Marshal

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

func (*MsgConvertVetabi) MarshalTo

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

func (*MsgConvertVetabi) MarshalToSizedBuffer

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

func (*MsgConvertVetabi) ProtoMessage

func (*MsgConvertVetabi) ProtoMessage()

func (*MsgConvertVetabi) Reset

func (m *MsgConvertVetabi) Reset()

func (*MsgConvertVetabi) Size

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

func (*MsgConvertVetabi) String

func (m *MsgConvertVetabi) String() string

func (*MsgConvertVetabi) Unmarshal

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

func (*MsgConvertVetabi) ValidateBasic

func (m *MsgConvertVetabi) ValidateBasic() error

func (*MsgConvertVetabi) XXX_DiscardUnknown

func (m *MsgConvertVetabi) XXX_DiscardUnknown()

func (*MsgConvertVetabi) XXX_Marshal

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

func (*MsgConvertVetabi) XXX_Merge

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

func (*MsgConvertVetabi) XXX_Size

func (m *MsgConvertVetabi) XXX_Size() int

func (*MsgConvertVetabi) XXX_Unmarshal

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

type MsgConvertVetabiResponse

type MsgConvertVetabiResponse struct {
	VoucherId  string `protobuf:"bytes,1,opt,name=voucher_id,json=voucherId,proto3" json:"voucher_id,omitempty"`
	ExpiryTime string `protobuf:"bytes,2,opt,name=expiry_time,json=expiryTime,proto3" json:"expiry_time,omitempty"`
}

MsgConvertVetabiResponse defines the Msg/ConvertVetabi response type.

func (*MsgConvertVetabiResponse) Descriptor

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

func (*MsgConvertVetabiResponse) GetExpiryTime

func (m *MsgConvertVetabiResponse) GetExpiryTime() string

func (*MsgConvertVetabiResponse) GetVoucherId

func (m *MsgConvertVetabiResponse) GetVoucherId() string

func (*MsgConvertVetabiResponse) Marshal

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

func (*MsgConvertVetabiResponse) MarshalTo

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

func (*MsgConvertVetabiResponse) MarshalToSizedBuffer

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

func (*MsgConvertVetabiResponse) ProtoMessage

func (*MsgConvertVetabiResponse) ProtoMessage()

func (*MsgConvertVetabiResponse) Reset

func (m *MsgConvertVetabiResponse) Reset()

func (*MsgConvertVetabiResponse) Size

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

func (*MsgConvertVetabiResponse) String

func (m *MsgConvertVetabiResponse) String() string

func (*MsgConvertVetabiResponse) Unmarshal

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

func (*MsgConvertVetabiResponse) XXX_DiscardUnknown

func (m *MsgConvertVetabiResponse) XXX_DiscardUnknown()

func (*MsgConvertVetabiResponse) XXX_Marshal

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

func (*MsgConvertVetabiResponse) XXX_Merge

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

func (*MsgConvertVetabiResponse) XXX_Size

func (m *MsgConvertVetabiResponse) XXX_Size() int

func (*MsgConvertVetabiResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// ConvertTabi converts Tabi to Vetabi at a 1:1 ratio.
	ConvertTabi(context.Context, *MsgConvertTabi) (*MsgConvertTabiResponse, error)
	// ConvertVetabi converts Vetabi to Tabi with the given unlock strategy
	// and return a voucher for redeeming Tabi.
	ConvertVetabi(context.Context, *MsgConvertVetabi) (*MsgConvertVetabiResponse, error)
	// WithdrawTabi sends the unlocked Tabi to owner of the voucher and
	// burns Vetabi as well as Tabi according to the unlock strategy.
	WithdrawTabi(context.Context, *MsgWithdrawTabi) (*MsgWithdrawTabiResponse, error)
	// CancelConvert cancels the conversion of Vetabi to Tabi.
	CancelConvert(context.Context, *MsgCancelConvert) (*MsgCancelConvertResponse, error)
}

MsgServer is the server API for Msg service.

type MsgWithdrawTabi

type MsgWithdrawTabi struct {
	VoucherId string `protobuf:"bytes,1,opt,name=voucher_id,json=voucherId,proto3" json:"voucher_id,omitempty"`
	Sender    string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
}

MsgWithdrawTabi represents a message to withdraw Tabi as per voucher.

func NewMsgWithdrawTabi

func NewMsgWithdrawTabi(voucherId string, sender sdk.AccAddress) *MsgWithdrawTabi

NewMsgWithdrawTabi is a constructor function for MsgWithdrawTabi

func (*MsgWithdrawTabi) Descriptor

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

func (*MsgWithdrawTabi) GetSender

func (m *MsgWithdrawTabi) GetSender() string

func (*MsgWithdrawTabi) GetSigners

func (m *MsgWithdrawTabi) GetSigners() []sdk.AccAddress

func (*MsgWithdrawTabi) GetVoucherId

func (m *MsgWithdrawTabi) GetVoucherId() string

func (*MsgWithdrawTabi) Marshal

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

func (*MsgWithdrawTabi) MarshalTo

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

func (*MsgWithdrawTabi) MarshalToSizedBuffer

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

func (*MsgWithdrawTabi) ProtoMessage

func (*MsgWithdrawTabi) ProtoMessage()

func (*MsgWithdrawTabi) Reset

func (m *MsgWithdrawTabi) Reset()

func (*MsgWithdrawTabi) Size

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

func (*MsgWithdrawTabi) String

func (m *MsgWithdrawTabi) String() string

func (*MsgWithdrawTabi) Unmarshal

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

func (*MsgWithdrawTabi) ValidateBasic

func (m *MsgWithdrawTabi) ValidateBasic() error

func (*MsgWithdrawTabi) XXX_DiscardUnknown

func (m *MsgWithdrawTabi) XXX_DiscardUnknown()

func (*MsgWithdrawTabi) XXX_Marshal

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

func (*MsgWithdrawTabi) XXX_Merge

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

func (*MsgWithdrawTabi) XXX_Size

func (m *MsgWithdrawTabi) XXX_Size() int

func (*MsgWithdrawTabi) XXX_Unmarshal

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

type MsgWithdrawTabiResponse

type MsgWithdrawTabiResponse struct {
	TabiWithdrawn  types.Coin `protobuf:"bytes,1,opt,name=tabi_withdrawn,json=tabiWithdrawn,proto3" json:"tabi_withdrawn"`
	VetabiReturned types.Coin `protobuf:"bytes,2,opt,name=vetabi_returned,json=vetabiReturned,proto3" json:"vetabi_returned"`
}

MsgWithdrawTabiResponse defines the Msg/WithdrawTabi response type.

func (*MsgWithdrawTabiResponse) Descriptor

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

func (*MsgWithdrawTabiResponse) GetTabiWithdrawn

func (m *MsgWithdrawTabiResponse) GetTabiWithdrawn() types.Coin

func (*MsgWithdrawTabiResponse) GetVetabiReturned

func (m *MsgWithdrawTabiResponse) GetVetabiReturned() types.Coin

func (*MsgWithdrawTabiResponse) Marshal

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

func (*MsgWithdrawTabiResponse) MarshalTo

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

func (*MsgWithdrawTabiResponse) MarshalToSizedBuffer

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

func (*MsgWithdrawTabiResponse) ProtoMessage

func (*MsgWithdrawTabiResponse) ProtoMessage()

func (*MsgWithdrawTabiResponse) Reset

func (m *MsgWithdrawTabiResponse) Reset()

func (*MsgWithdrawTabiResponse) Size

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

func (*MsgWithdrawTabiResponse) String

func (m *MsgWithdrawTabiResponse) String() string

func (*MsgWithdrawTabiResponse) Unmarshal

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

func (*MsgWithdrawTabiResponse) XXX_DiscardUnknown

func (m *MsgWithdrawTabiResponse) XXX_DiscardUnknown()

func (*MsgWithdrawTabiResponse) XXX_Marshal

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

func (*MsgWithdrawTabiResponse) XXX_Merge

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

func (*MsgWithdrawTabiResponse) XXX_Size

func (m *MsgWithdrawTabiResponse) XXX_Size() int

func (*MsgWithdrawTabiResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	Strategy(ctx context.Context, in *QueryStrategyRequest, opts ...grpc.CallOption) (*QueryStrategyResponse, error)
	Strategies(ctx context.Context, in *QueryStrategiesRequest, opts ...grpc.CallOption) (*QueryStrategiesResponse, error)
	// Voucher returns the info about the voucher with the given id
	Voucher(ctx context.Context, in *QueryVoucherRequest, opts ...grpc.CallOption) (*QueryVoucherResponse, error)
	// Vouchers returns the list of vouchers owned by the given address
	Vouchers(ctx context.Context, in *QueryVouchersRequest, opts ...grpc.CallOption) (*QueryVouchersResponse, error)
	// Voucher returns the info about the amount of tabi withdrawable and vetabi returnable
	VoucherStatus(ctx context.Context, in *QueryVoucherStatusRequest, opts ...grpc.CallOption) (*QueryVoucherStatusResponse, 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 {
	Strategy(context.Context, *QueryStrategyRequest) (*QueryStrategyResponse, error)
	Strategies(context.Context, *QueryStrategiesRequest) (*QueryStrategiesResponse, error)
	// Voucher returns the info about the voucher with the given id
	Voucher(context.Context, *QueryVoucherRequest) (*QueryVoucherResponse, error)
	// Vouchers returns the list of vouchers owned by the given address
	Vouchers(context.Context, *QueryVouchersRequest) (*QueryVouchersResponse, error)
	// Voucher returns the info about the amount of tabi withdrawable and vetabi returnable
	VoucherStatus(context.Context, *QueryVoucherStatusRequest) (*QueryVoucherStatusResponse, error)
}

QueryServer is the server API for Query service.

type QueryStrategiesRequest

type QueryStrategiesRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryVoucherRequest is the request type for the Query/Voucher RPC

func (*QueryStrategiesRequest) Descriptor

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

func (*QueryStrategiesRequest) GetPagination

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

func (*QueryStrategiesRequest) Marshal

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

func (*QueryStrategiesRequest) MarshalTo

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

func (*QueryStrategiesRequest) MarshalToSizedBuffer

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

func (*QueryStrategiesRequest) ProtoMessage

func (*QueryStrategiesRequest) ProtoMessage()

func (*QueryStrategiesRequest) Reset

func (m *QueryStrategiesRequest) Reset()

func (*QueryStrategiesRequest) Size

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

func (*QueryStrategiesRequest) String

func (m *QueryStrategiesRequest) String() string

func (*QueryStrategiesRequest) Unmarshal

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

func (*QueryStrategiesRequest) XXX_DiscardUnknown

func (m *QueryStrategiesRequest) XXX_DiscardUnknown()

func (*QueryStrategiesRequest) XXX_Marshal

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

func (*QueryStrategiesRequest) XXX_Merge

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

func (*QueryStrategiesRequest) XXX_Size

func (m *QueryStrategiesRequest) XXX_Size() int

func (*QueryStrategiesRequest) XXX_Unmarshal

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

type QueryStrategiesResponse

type QueryStrategiesResponse struct {
	Strategies []Strategy          `protobuf:"bytes,1,rep,name=strategies,proto3" json:"strategies"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryVoucherResponse is the response type for the Query/Voucher RPC

func (*QueryStrategiesResponse) Descriptor

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

func (*QueryStrategiesResponse) GetPagination

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

func (*QueryStrategiesResponse) GetStrategies

func (m *QueryStrategiesResponse) GetStrategies() []Strategy

func (*QueryStrategiesResponse) Marshal

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

func (*QueryStrategiesResponse) MarshalTo

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

func (*QueryStrategiesResponse) MarshalToSizedBuffer

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

func (*QueryStrategiesResponse) ProtoMessage

func (*QueryStrategiesResponse) ProtoMessage()

func (*QueryStrategiesResponse) Reset

func (m *QueryStrategiesResponse) Reset()

func (*QueryStrategiesResponse) Size

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

func (*QueryStrategiesResponse) String

func (m *QueryStrategiesResponse) String() string

func (*QueryStrategiesResponse) Unmarshal

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

func (*QueryStrategiesResponse) XXX_DiscardUnknown

func (m *QueryStrategiesResponse) XXX_DiscardUnknown()

func (*QueryStrategiesResponse) XXX_Marshal

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

func (*QueryStrategiesResponse) XXX_Merge

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

func (*QueryStrategiesResponse) XXX_Size

func (m *QueryStrategiesResponse) XXX_Size() int

func (*QueryStrategiesResponse) XXX_Unmarshal

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

type QueryStrategyRequest

type QueryStrategyRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}

QueryStrategyRequest is the request type for the Query/Voucher RPC

func (*QueryStrategyRequest) Descriptor

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

func (*QueryStrategyRequest) GetName

func (m *QueryStrategyRequest) GetName() string

func (*QueryStrategyRequest) Marshal

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

func (*QueryStrategyRequest) MarshalTo

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

func (*QueryStrategyRequest) MarshalToSizedBuffer

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

func (*QueryStrategyRequest) ProtoMessage

func (*QueryStrategyRequest) ProtoMessage()

func (*QueryStrategyRequest) Reset

func (m *QueryStrategyRequest) Reset()

func (*QueryStrategyRequest) Size

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

func (*QueryStrategyRequest) String

func (m *QueryStrategyRequest) String() string

func (*QueryStrategyRequest) Unmarshal

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

func (*QueryStrategyRequest) XXX_DiscardUnknown

func (m *QueryStrategyRequest) XXX_DiscardUnknown()

func (*QueryStrategyRequest) XXX_Marshal

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

func (*QueryStrategyRequest) XXX_Merge

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

func (*QueryStrategyRequest) XXX_Size

func (m *QueryStrategyRequest) XXX_Size() int

func (*QueryStrategyRequest) XXX_Unmarshal

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

type QueryStrategyResponse

type QueryStrategyResponse struct {
	Name           string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Period         int64  `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"`
	ConversionRate string `protobuf:"bytes,3,opt,name=conversion_rate,json=conversionRate,proto3" json:"conversion_rate,omitempty"`
}

QueryVoucherResponse is the response type for the Query/Voucher RPC

func (*QueryStrategyResponse) Descriptor

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

func (*QueryStrategyResponse) GetConversionRate

func (m *QueryStrategyResponse) GetConversionRate() string

func (*QueryStrategyResponse) GetName

func (m *QueryStrategyResponse) GetName() string

func (*QueryStrategyResponse) GetPeriod

func (m *QueryStrategyResponse) GetPeriod() int64

func (*QueryStrategyResponse) Marshal

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

func (*QueryStrategyResponse) MarshalTo

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

func (*QueryStrategyResponse) MarshalToSizedBuffer

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

func (*QueryStrategyResponse) ProtoMessage

func (*QueryStrategyResponse) ProtoMessage()

func (*QueryStrategyResponse) Reset

func (m *QueryStrategyResponse) Reset()

func (*QueryStrategyResponse) Size

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

func (*QueryStrategyResponse) String

func (m *QueryStrategyResponse) String() string

func (*QueryStrategyResponse) Unmarshal

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

func (*QueryStrategyResponse) XXX_DiscardUnknown

func (m *QueryStrategyResponse) XXX_DiscardUnknown()

func (*QueryStrategyResponse) XXX_Marshal

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

func (*QueryStrategyResponse) XXX_Merge

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

func (*QueryStrategyResponse) XXX_Size

func (m *QueryStrategyResponse) XXX_Size() int

func (*QueryStrategyResponse) XXX_Unmarshal

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

type QueryVoucherRequest

type QueryVoucherRequest struct {
	VoucherId string `protobuf:"bytes,1,opt,name=voucher_id,json=voucherId,proto3" json:"voucher_id,omitempty"`
}

QueryVoucherRequest is the request type for the Query/Voucher RPC

func (*QueryVoucherRequest) Descriptor

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

func (*QueryVoucherRequest) GetVoucherId

func (m *QueryVoucherRequest) GetVoucherId() string

func (*QueryVoucherRequest) Marshal

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

func (*QueryVoucherRequest) MarshalTo

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

func (*QueryVoucherRequest) MarshalToSizedBuffer

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

func (*QueryVoucherRequest) ProtoMessage

func (*QueryVoucherRequest) ProtoMessage()

func (*QueryVoucherRequest) Reset

func (m *QueryVoucherRequest) Reset()

func (*QueryVoucherRequest) Size

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

func (*QueryVoucherRequest) String

func (m *QueryVoucherRequest) String() string

func (*QueryVoucherRequest) Unmarshal

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

func (*QueryVoucherRequest) XXX_DiscardUnknown

func (m *QueryVoucherRequest) XXX_DiscardUnknown()

func (*QueryVoucherRequest) XXX_Marshal

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

func (*QueryVoucherRequest) XXX_Merge

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

func (*QueryVoucherRequest) XXX_Size

func (m *QueryVoucherRequest) XXX_Size() int

func (*QueryVoucherRequest) XXX_Unmarshal

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

type QueryVoucherResponse

type QueryVoucherResponse struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Owner       string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	CreatedTime int64  `protobuf:"varint,3,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"`
	Strategy    string `protobuf:"bytes,4,opt,name=strategy,proto3" json:"strategy,omitempty"`
}

QueryVoucherResponse is the response type for the Query/Voucher RPC

func (*QueryVoucherResponse) Descriptor

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

func (*QueryVoucherResponse) GetCreatedTime

func (m *QueryVoucherResponse) GetCreatedTime() int64

func (*QueryVoucherResponse) GetId

func (m *QueryVoucherResponse) GetId() string

func (*QueryVoucherResponse) GetOwner

func (m *QueryVoucherResponse) GetOwner() string

func (*QueryVoucherResponse) GetStrategy

func (m *QueryVoucherResponse) GetStrategy() string

func (*QueryVoucherResponse) Marshal

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

func (*QueryVoucherResponse) MarshalTo

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

func (*QueryVoucherResponse) MarshalToSizedBuffer

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

func (*QueryVoucherResponse) ProtoMessage

func (*QueryVoucherResponse) ProtoMessage()

func (*QueryVoucherResponse) Reset

func (m *QueryVoucherResponse) Reset()

func (*QueryVoucherResponse) Size

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

func (*QueryVoucherResponse) String

func (m *QueryVoucherResponse) String() string

func (*QueryVoucherResponse) Unmarshal

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

func (*QueryVoucherResponse) XXX_DiscardUnknown

func (m *QueryVoucherResponse) XXX_DiscardUnknown()

func (*QueryVoucherResponse) XXX_Marshal

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

func (*QueryVoucherResponse) XXX_Merge

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

func (*QueryVoucherResponse) XXX_Size

func (m *QueryVoucherResponse) XXX_Size() int

func (*QueryVoucherResponse) XXX_Unmarshal

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

type QueryVoucherStatusRequest

type QueryVoucherStatusRequest struct {
	VoucherId string `protobuf:"bytes,1,opt,name=voucher_id,json=voucherId,proto3" json:"voucher_id,omitempty"`
}

QueryVoucherStatusRequest is the request type for the Query/VoucherStatus RPC

func (*QueryVoucherStatusRequest) Descriptor

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

func (*QueryVoucherStatusRequest) GetVoucherId

func (m *QueryVoucherStatusRequest) GetVoucherId() string

func (*QueryVoucherStatusRequest) Marshal

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

func (*QueryVoucherStatusRequest) MarshalTo

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

func (*QueryVoucherStatusRequest) MarshalToSizedBuffer

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

func (*QueryVoucherStatusRequest) ProtoMessage

func (*QueryVoucherStatusRequest) ProtoMessage()

func (*QueryVoucherStatusRequest) Reset

func (m *QueryVoucherStatusRequest) Reset()

func (*QueryVoucherStatusRequest) Size

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

func (*QueryVoucherStatusRequest) String

func (m *QueryVoucherStatusRequest) String() string

func (*QueryVoucherStatusRequest) Unmarshal

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

func (*QueryVoucherStatusRequest) XXX_DiscardUnknown

func (m *QueryVoucherStatusRequest) XXX_DiscardUnknown()

func (*QueryVoucherStatusRequest) XXX_Marshal

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

func (*QueryVoucherStatusRequest) XXX_Merge

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

func (*QueryVoucherStatusRequest) XXX_Size

func (m *QueryVoucherStatusRequest) XXX_Size() int

func (*QueryVoucherStatusRequest) XXX_Unmarshal

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

type QueryVoucherStatusResponse

type QueryVoucherStatusResponse struct {
	CurrentTime      string     `protobuf:"bytes,1,opt,name=current_time,json=currentTime,proto3" json:"current_time,omitempty"`
	TabiWithdrawable types.Coin `protobuf:"bytes,2,opt,name=tabi_withdrawable,json=tabiWithdrawable,proto3" json:"tabi_withdrawable"`
	VetabiReturnable types.Coin `protobuf:"bytes,3,opt,name=vetabi_returnable,json=vetabiReturnable,proto3" json:"vetabi_returnable"`
}

QueryVoucherStatusResponse is the response type for the Query/VoucherStatus RPC

func (*QueryVoucherStatusResponse) Descriptor

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

func (*QueryVoucherStatusResponse) GetCurrentTime

func (m *QueryVoucherStatusResponse) GetCurrentTime() string

func (*QueryVoucherStatusResponse) GetTabiWithdrawable

func (m *QueryVoucherStatusResponse) GetTabiWithdrawable() types.Coin

func (*QueryVoucherStatusResponse) GetVetabiReturnable

func (m *QueryVoucherStatusResponse) GetVetabiReturnable() types.Coin

func (*QueryVoucherStatusResponse) Marshal

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

func (*QueryVoucherStatusResponse) MarshalTo

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

func (*QueryVoucherStatusResponse) MarshalToSizedBuffer

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

func (*QueryVoucherStatusResponse) ProtoMessage

func (*QueryVoucherStatusResponse) ProtoMessage()

func (*QueryVoucherStatusResponse) Reset

func (m *QueryVoucherStatusResponse) Reset()

func (*QueryVoucherStatusResponse) Size

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

func (*QueryVoucherStatusResponse) String

func (m *QueryVoucherStatusResponse) String() string

func (*QueryVoucherStatusResponse) Unmarshal

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

func (*QueryVoucherStatusResponse) XXX_DiscardUnknown

func (m *QueryVoucherStatusResponse) XXX_DiscardUnknown()

func (*QueryVoucherStatusResponse) XXX_Marshal

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

func (*QueryVoucherStatusResponse) XXX_Merge

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

func (*QueryVoucherStatusResponse) XXX_Size

func (m *QueryVoucherStatusResponse) XXX_Size() int

func (*QueryVoucherStatusResponse) XXX_Unmarshal

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

type QueryVouchersRequest

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

QueryVouchersRequest is the request type for the Query/Vouchers RPC

func (*QueryVouchersRequest) Descriptor

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

func (*QueryVouchersRequest) GetOwner

func (m *QueryVouchersRequest) GetOwner() string

func (*QueryVouchersRequest) GetPagination

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

func (*QueryVouchersRequest) Marshal

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

func (*QueryVouchersRequest) MarshalTo

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

func (*QueryVouchersRequest) MarshalToSizedBuffer

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

func (*QueryVouchersRequest) ProtoMessage

func (*QueryVouchersRequest) ProtoMessage()

func (*QueryVouchersRequest) Reset

func (m *QueryVouchersRequest) Reset()

func (*QueryVouchersRequest) Size

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

func (*QueryVouchersRequest) String

func (m *QueryVouchersRequest) String() string

func (*QueryVouchersRequest) Unmarshal

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

func (*QueryVouchersRequest) XXX_DiscardUnknown

func (m *QueryVouchersRequest) XXX_DiscardUnknown()

func (*QueryVouchersRequest) XXX_Marshal

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

func (*QueryVouchersRequest) XXX_Merge

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

func (*QueryVouchersRequest) XXX_Size

func (m *QueryVouchersRequest) XXX_Size() int

func (*QueryVouchersRequest) XXX_Unmarshal

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

type QueryVouchersResponse

type QueryVouchersResponse struct {
	Vouchers   []Voucher           `protobuf:"bytes,1,rep,name=vouchers,proto3" json:"vouchers"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryVouchersResponse is the response type for the Query/Vouchers RPC

func (*QueryVouchersResponse) Descriptor

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

func (*QueryVouchersResponse) GetPagination

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

func (*QueryVouchersResponse) GetVouchers

func (m *QueryVouchersResponse) GetVouchers() []Voucher

func (*QueryVouchersResponse) Marshal

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

func (*QueryVouchersResponse) MarshalTo

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

func (*QueryVouchersResponse) MarshalToSizedBuffer

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

func (*QueryVouchersResponse) ProtoMessage

func (*QueryVouchersResponse) ProtoMessage()

func (*QueryVouchersResponse) Reset

func (m *QueryVouchersResponse) Reset()

func (*QueryVouchersResponse) Size

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

func (*QueryVouchersResponse) String

func (m *QueryVouchersResponse) String() string

func (*QueryVouchersResponse) Unmarshal

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

func (*QueryVouchersResponse) XXX_DiscardUnknown

func (m *QueryVouchersResponse) XXX_DiscardUnknown()

func (*QueryVouchersResponse) XXX_Marshal

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

func (*QueryVouchersResponse) XXX_Merge

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

func (*QueryVouchersResponse) XXX_Size

func (m *QueryVouchersResponse) XXX_Size() int

func (*QueryVouchersResponse) XXX_Unmarshal

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

type Strategy

type Strategy struct {
	// name is the unique name of the strategy.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// period represents the lock time in seconds.
	Period int64 `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"`
	// conversion_rate is the conversion rate from Vetabi to Tabi.
	ConversionRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */
}

Strategy defines the unlock strategy for conversion from Vetabi to Tabi.

func (*Strategy) Descriptor

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

func (*Strategy) GetName

func (m *Strategy) GetName() string

func (*Strategy) GetPeriod

func (m *Strategy) GetPeriod() int64

func (*Strategy) Marshal

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

func (*Strategy) MarshalTo

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

func (*Strategy) MarshalToSizedBuffer

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

func (*Strategy) ProtoMessage

func (*Strategy) ProtoMessage()

func (*Strategy) Reset

func (m *Strategy) Reset()

func (*Strategy) Size

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

func (*Strategy) String

func (m *Strategy) String() string

func (*Strategy) Unmarshal

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

func (*Strategy) XXX_DiscardUnknown

func (m *Strategy) XXX_DiscardUnknown()

func (*Strategy) XXX_Marshal

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

func (*Strategy) XXX_Merge

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

func (*Strategy) XXX_Size

func (m *Strategy) XXX_Size() int

func (*Strategy) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CancelConvert

func (*UnimplementedMsgServer) ConvertTabi

func (*UnimplementedMsgServer) ConvertVetabi

func (*UnimplementedMsgServer) WithdrawTabi

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Strategies

func (*UnimplementedQueryServer) Strategy

func (*UnimplementedQueryServer) Voucher

func (*UnimplementedQueryServer) VoucherStatus

func (*UnimplementedQueryServer) Vouchers

type Voucher

type Voucher struct {
	// id is the unique identifier of the voucher.
	Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// owner is the address of the owner of the voucher.
	Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	// amount represents token the voucher locked.
	Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"`
	// created_time is the time when the voucher was created.
	CreatedTime int64 `protobuf:"varint,4,opt,name=created_time,json=createdTime,proto3" json:"created_time,omitempty"`
	// strategy is the unique name of the strategy.
	Strategy string `protobuf:"bytes,5,opt,name=strategy,proto3" json:"strategy,omitempty"`
}

Voucher defines the voucher for redeeming locked token.

func (*Voucher) Descriptor

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

func (*Voucher) GetAmount

func (m *Voucher) GetAmount() types.Coin

func (*Voucher) GetCreatedTime

func (m *Voucher) GetCreatedTime() int64

func (*Voucher) GetId

func (m *Voucher) GetId() string

func (*Voucher) GetOwner

func (m *Voucher) GetOwner() string

func (*Voucher) GetStrategy

func (m *Voucher) GetStrategy() string

func (*Voucher) Marshal

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

func (*Voucher) MarshalTo

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

func (*Voucher) MarshalToSizedBuffer

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

func (*Voucher) ProtoMessage

func (*Voucher) ProtoMessage()

func (*Voucher) Reset

func (m *Voucher) Reset()

func (*Voucher) Size

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

func (*Voucher) String

func (m *Voucher) String() string

func (*Voucher) Unmarshal

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

func (*Voucher) XXX_DiscardUnknown

func (m *Voucher) XXX_DiscardUnknown()

func (*Voucher) XXX_Marshal

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

func (*Voucher) XXX_Merge

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

func (*Voucher) XXX_Size

func (m *Voucher) XXX_Size() int

func (*Voucher) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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