types

package
v12.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthEvent        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvent          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvent = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthState        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowState          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupState = 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")
)

Functions

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type EventCreateSale

type EventCreateSale struct {
	Id       uint64     `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Creator  string     `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`
	TokenIn  string     `protobuf:"bytes,3,opt,name=token_in,json=tokenIn,proto3" json:"token_in,omitempty"`
	TokenOut types.Coin `protobuf:"bytes,4,opt,name=token_out,json=tokenOut,proto3" json:"token_out"`
}

func (*EventCreateSale) Descriptor

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

func (*EventCreateSale) Marshal

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

func (*EventCreateSale) MarshalTo

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

func (*EventCreateSale) MarshalToSizedBuffer

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

func (*EventCreateSale) ProtoMessage

func (*EventCreateSale) ProtoMessage()

func (*EventCreateSale) Reset

func (m *EventCreateSale) Reset()

func (*EventCreateSale) Size

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

func (*EventCreateSale) String

func (m *EventCreateSale) String() string

func (*EventCreateSale) Unmarshal

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

func (*EventCreateSale) XXX_DiscardUnknown

func (m *EventCreateSale) XXX_DiscardUnknown()

func (*EventCreateSale) XXX_Marshal

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

func (*EventCreateSale) XXX_Merge

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

func (*EventCreateSale) XXX_Size

func (m *EventCreateSale) XXX_Size() int

func (*EventCreateSale) XXX_Unmarshal

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

type EventExit

type EventExit struct {
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	SaleId uint64 `protobuf:"varint,2,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty"`
	// amount of purchased token_out sent to the user
	Purchased string `protobuf:"bytes,3,opt,name=purchased,proto3" json:"purchased,omitempty"`
}

func (*EventExit) Descriptor

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

func (*EventExit) Marshal

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

func (*EventExit) MarshalTo

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

func (*EventExit) MarshalToSizedBuffer

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

func (*EventExit) ProtoMessage

func (*EventExit) ProtoMessage()

func (*EventExit) Reset

func (m *EventExit) Reset()

func (*EventExit) Size

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

func (*EventExit) String

func (m *EventExit) String() string

func (*EventExit) Unmarshal

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

func (*EventExit) XXX_DiscardUnknown

func (m *EventExit) XXX_DiscardUnknown()

func (*EventExit) XXX_Marshal

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

func (*EventExit) XXX_Merge

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

func (*EventExit) XXX_Size

func (m *EventExit) XXX_Size() int

func (*EventExit) XXX_Unmarshal

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

type EventFinalizeSale

type EventFinalizeSale struct {
	SaleId uint64 `protobuf:"varint,1,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty"`
	// amount of earned tokens_in
	Income string `protobuf:"bytes,3,opt,name=income,proto3" json:"income,omitempty"`
}

func (*EventFinalizeSale) Descriptor

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

func (*EventFinalizeSale) Marshal

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

func (*EventFinalizeSale) MarshalTo

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

func (*EventFinalizeSale) MarshalToSizedBuffer

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

func (*EventFinalizeSale) ProtoMessage

func (*EventFinalizeSale) ProtoMessage()

func (*EventFinalizeSale) Reset

func (m *EventFinalizeSale) Reset()

func (*EventFinalizeSale) Size

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

func (*EventFinalizeSale) String

func (m *EventFinalizeSale) String() string

func (*EventFinalizeSale) Unmarshal

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

func (*EventFinalizeSale) XXX_DiscardUnknown

func (m *EventFinalizeSale) XXX_DiscardUnknown()

func (*EventFinalizeSale) XXX_Marshal

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

func (*EventFinalizeSale) XXX_Merge

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

func (*EventFinalizeSale) XXX_Size

func (m *EventFinalizeSale) XXX_Size() int

func (*EventFinalizeSale) XXX_Unmarshal

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

type EventSubscribe

type EventSubscribe struct {
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	SaleId uint64 `protobuf:"varint,2,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty"`
	Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
}

func (*EventSubscribe) Descriptor

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

func (*EventSubscribe) Marshal

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

func (*EventSubscribe) MarshalTo

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

func (*EventSubscribe) MarshalToSizedBuffer

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

func (*EventSubscribe) ProtoMessage

func (*EventSubscribe) ProtoMessage()

func (*EventSubscribe) Reset

func (m *EventSubscribe) Reset()

func (*EventSubscribe) Size

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

func (*EventSubscribe) String

func (m *EventSubscribe) String() string

func (*EventSubscribe) Unmarshal

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

func (*EventSubscribe) XXX_DiscardUnknown

func (m *EventSubscribe) XXX_DiscardUnknown()

func (*EventSubscribe) XXX_Marshal

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

func (*EventSubscribe) XXX_Merge

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

func (*EventSubscribe) XXX_Size

func (m *EventSubscribe) XXX_Size() int

func (*EventSubscribe) XXX_Unmarshal

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

type EventWithdraw

type EventWithdraw struct {
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	SaleId uint64 `protobuf:"varint,2,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty"`
	// amount of staked token_in withdrawn by user.
	Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
}

func (*EventWithdraw) Descriptor

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

func (*EventWithdraw) Marshal

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

func (*EventWithdraw) MarshalTo

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

func (*EventWithdraw) MarshalToSizedBuffer

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

func (*EventWithdraw) ProtoMessage

func (*EventWithdraw) ProtoMessage()

func (*EventWithdraw) Reset

func (m *EventWithdraw) Reset()

func (*EventWithdraw) Size

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

func (*EventWithdraw) String

func (m *EventWithdraw) String() string

func (*EventWithdraw) Unmarshal

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

func (*EventWithdraw) XXX_DiscardUnknown

func (m *EventWithdraw) XXX_DiscardUnknown()

func (*EventWithdraw) XXX_Marshal

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

func (*EventWithdraw) XXX_Merge

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

func (*EventWithdraw) XXX_Size

func (m *EventWithdraw) XXX_Size() int

func (*EventWithdraw) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Sales         []Sale           `protobuf:"bytes,1,rep,name=sales,proto3" json:"sales"`
	UserPositions []UserPositionKV `protobuf:"bytes,2,rep,name=user_positions,json=userPositions,proto3" json:"user_positions"`
	NextSaleId    uint64           `protobuf:"varint,3,opt,name=next_sale_id,json=nextSaleId,proto3" json:"next_sale_id,omitempty"`
	Params        Params           `protobuf:"bytes,4,opt,name=params,proto3" json:"params"`
}

GenesisState defines the streamswap module's genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetNextSaleId

func (m *GenesisState) GetNextSaleId() uint64

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetSales

func (m *GenesisState) GetSales() []Sale

func (*GenesisState) GetUserPositions

func (m *GenesisState) GetUserPositions() []UserPositionKV

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 MsgClient

type MsgClient interface {
	// CreateSale creates new token sale. Anyone can create a new sale.
	// params.SaleBond OSMO will be charged as a bond (returned in FinalizeSale)
	// to avoid spams.
	// The sale follows the streamswap functionality explained in the
	// x/launchapd/spec
	CreateSale(ctx context.Context, in *MsgCreateSale, opts ...grpc.CallOption) (*MsgCreateSaleResponse, error)
	// Subscribe to a token sale. Any use at any time before the sale end can join
	// the sale by sending `token_in` to the Sale through the Subscribe msg.
	// During the sale, user `token_in` will be automatically charged every
	// epoch to purchase `token_out`.
	Subscribe(ctx context.Context, in *MsgSubscribe, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// Withdraw sends back `amount` of unspent tokens_in to the user.
	// If `amount` is empty, it will default to all unspent tokens.
	// User can do it any time unless his deposit is empty.
	Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// ExitSale withdraws (by a user who subscribed to the sale) purchased
	// tokens_out from the pool and remained tokens_in. Must be called before
	// the sale end.
	ExitSale(ctx context.Context, in *MsgExitSale, opts ...grpc.CallOption) (*MsgExitSaleResponse, error)
	// FinalizeSale clean ups the sale and sends income (earned tokens_in) to the
	// Sale recipient. Returns error if called before the Sale end. Anyone can
	// call this method.
	FinalizeSale(ctx context.Context, in *MsgFinalizeSale, opts ...grpc.CallOption) (*MsgFinalizeSaleResponse, 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 MsgCreateSale

type MsgCreateSale struct {
	// Sale creator and the account which provides token (token_out) to the sale.
	// When processing this message, token_out
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// token_in is a denom used to buy `token_out`. May be referred as a
	// "quote currency".
	TokenIn string `protobuf:"bytes,2,opt,name=token_in,json=tokenIn,proto3" json:"token_in,omitempty"`
	// token_out is a coin supply (denom + amount) to sell. May be referred as
	// "base currency". The whole supply will be transferred from the creator
	// to the module and will be sold during the sale.
	TokenOut types.Coin `protobuf:"bytes,3,opt,name=token_out,json=tokenOut,proto3" json:"token_out"`
	// Maximum fee the creator is going to pay for creating a sale. The creator
	// will be charged params.SaleCreationFee. Transaction will fail if
	// max_fee is smaller than params.SaleCreationFee. If empty, the creator
	// doesn't accept any fee.
	MaxFee []types.Coin `protobuf:"bytes,4,rep,name=max_fee,json=maxFee,proto3" json:"max_fee"`
	// start time when the token sale starts.
	StartTime time.Time `protobuf:"bytes,5,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"`
	// duration time that the sale takes place over
	Duration time.Duration `protobuf:"bytes,6,opt,name=duration,proto3,stdduration" json:"duration"`
	// Recipient is the account which receives earned `token_in` from when the
	// sale is finalized. If not defined (empty) the creator
	// account will be used.
	Recipient string `protobuf:"bytes,7,opt,name=recipient,proto3" json:"recipient,omitempty"`
	// Name for the sale, max 40 characters, min 4. Required.
	Name string `protobuf:"bytes,8,opt,name=name,proto3" json:"name,omitempty"`
	// URL with sale and project details. Can be a link a link to IPFS,
	// hackmd, project page, blog post... Max 120 characters. Must be
	// valid agains Go url.ParseRequestURI. Required.
	Url string `protobuf:"bytes,9,opt,name=url,proto3" json:"url,omitempty"`
}

func (*MsgCreateSale) Descriptor

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

func (*MsgCreateSale) Marshal

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

func (*MsgCreateSale) MarshalTo

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

func (*MsgCreateSale) MarshalToSizedBuffer

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

func (*MsgCreateSale) ProtoMessage

func (*MsgCreateSale) ProtoMessage()

func (*MsgCreateSale) Reset

func (m *MsgCreateSale) Reset()

func (*MsgCreateSale) Size

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

func (*MsgCreateSale) String

func (m *MsgCreateSale) String() string

func (*MsgCreateSale) Unmarshal

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

func (*MsgCreateSale) XXX_DiscardUnknown

func (m *MsgCreateSale) XXX_DiscardUnknown()

func (*MsgCreateSale) XXX_Marshal

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

func (*MsgCreateSale) XXX_Merge

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

func (*MsgCreateSale) XXX_Size

func (m *MsgCreateSale) XXX_Size() int

func (*MsgCreateSale) XXX_Unmarshal

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

type MsgCreateSaleResponse

type MsgCreateSaleResponse struct {
	SaleId uint64 `protobuf:"varint,1,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty" yaml:"sale_id"`
}

func (*MsgCreateSaleResponse) Descriptor

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

func (*MsgCreateSaleResponse) Marshal

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

func (*MsgCreateSaleResponse) MarshalTo

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

func (*MsgCreateSaleResponse) MarshalToSizedBuffer

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

func (*MsgCreateSaleResponse) ProtoMessage

func (*MsgCreateSaleResponse) ProtoMessage()

func (*MsgCreateSaleResponse) Reset

func (m *MsgCreateSaleResponse) Reset()

func (*MsgCreateSaleResponse) Size

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

func (*MsgCreateSaleResponse) String

func (m *MsgCreateSaleResponse) String() string

func (*MsgCreateSaleResponse) Unmarshal

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

func (*MsgCreateSaleResponse) XXX_DiscardUnknown

func (m *MsgCreateSaleResponse) XXX_DiscardUnknown()

func (*MsgCreateSaleResponse) XXX_Marshal

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

func (*MsgCreateSaleResponse) XXX_Merge

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

func (*MsgCreateSaleResponse) XXX_Size

func (m *MsgCreateSaleResponse) XXX_Size() int

func (*MsgCreateSaleResponse) XXX_Unmarshal

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

type MsgExitSale

type MsgExitSale struct {
	// sender is an account address exiting a sale
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// ID of an existing sale.
	SaleId uint64 `protobuf:"varint,2,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty" yaml:"sale_id"`
}

func (*MsgExitSale) Descriptor

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

func (*MsgExitSale) Marshal

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

func (*MsgExitSale) MarshalTo

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

func (*MsgExitSale) MarshalToSizedBuffer

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

func (*MsgExitSale) ProtoMessage

func (*MsgExitSale) ProtoMessage()

func (*MsgExitSale) Reset

func (m *MsgExitSale) Reset()

func (*MsgExitSale) Size

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

func (*MsgExitSale) String

func (m *MsgExitSale) String() string

func (*MsgExitSale) Unmarshal

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

func (*MsgExitSale) XXX_DiscardUnknown

func (m *MsgExitSale) XXX_DiscardUnknown()

func (*MsgExitSale) XXX_Marshal

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

func (*MsgExitSale) XXX_Merge

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

func (*MsgExitSale) XXX_Size

func (m *MsgExitSale) XXX_Size() int

func (*MsgExitSale) XXX_Unmarshal

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

type MsgExitSaleResponse

type MsgExitSaleResponse struct {
	// Purchased amount of "out" tokens withdrawn to the user.
	Purchased github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=purchased,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"purchased"`
}

func (*MsgExitSaleResponse) Descriptor

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

func (*MsgExitSaleResponse) Marshal

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

func (*MsgExitSaleResponse) MarshalTo

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

func (*MsgExitSaleResponse) MarshalToSizedBuffer

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

func (*MsgExitSaleResponse) ProtoMessage

func (*MsgExitSaleResponse) ProtoMessage()

func (*MsgExitSaleResponse) Reset

func (m *MsgExitSaleResponse) Reset()

func (*MsgExitSaleResponse) Size

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

func (*MsgExitSaleResponse) String

func (m *MsgExitSaleResponse) String() string

func (*MsgExitSaleResponse) Unmarshal

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

func (*MsgExitSaleResponse) XXX_DiscardUnknown

func (m *MsgExitSaleResponse) XXX_DiscardUnknown()

func (*MsgExitSaleResponse) XXX_Marshal

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

func (*MsgExitSaleResponse) XXX_Merge

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

func (*MsgExitSaleResponse) XXX_Size

func (m *MsgExitSaleResponse) XXX_Size() int

func (*MsgExitSaleResponse) XXX_Unmarshal

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

type MsgFinalizeSale

type MsgFinalizeSale struct {
	// sender is an account signing the message and triggering the finalization.
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// ID of an existing sale.
	SaleId uint64 `protobuf:"varint,2,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty" yaml:"sale_id"`
}

func (*MsgFinalizeSale) Descriptor

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

func (*MsgFinalizeSale) Marshal

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

func (*MsgFinalizeSale) MarshalTo

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

func (*MsgFinalizeSale) MarshalToSizedBuffer

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

func (*MsgFinalizeSale) ProtoMessage

func (*MsgFinalizeSale) ProtoMessage()

func (*MsgFinalizeSale) Reset

func (m *MsgFinalizeSale) Reset()

func (*MsgFinalizeSale) Size

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

func (*MsgFinalizeSale) String

func (m *MsgFinalizeSale) String() string

func (*MsgFinalizeSale) Unmarshal

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

func (*MsgFinalizeSale) XXX_DiscardUnknown

func (m *MsgFinalizeSale) XXX_DiscardUnknown()

func (*MsgFinalizeSale) XXX_Marshal

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

func (*MsgFinalizeSale) XXX_Merge

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

func (*MsgFinalizeSale) XXX_Size

func (m *MsgFinalizeSale) XXX_Size() int

func (*MsgFinalizeSale) XXX_Unmarshal

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

type MsgFinalizeSaleResponse

type MsgFinalizeSaleResponse struct {
	// Income amount of token_in sent to the sale recipient.
	Income github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=income,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"income"`
}

func (*MsgFinalizeSaleResponse) Descriptor

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

func (*MsgFinalizeSaleResponse) Marshal

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

func (*MsgFinalizeSaleResponse) MarshalTo

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

func (*MsgFinalizeSaleResponse) MarshalToSizedBuffer

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

func (*MsgFinalizeSaleResponse) ProtoMessage

func (*MsgFinalizeSaleResponse) ProtoMessage()

func (*MsgFinalizeSaleResponse) Reset

func (m *MsgFinalizeSaleResponse) Reset()

func (*MsgFinalizeSaleResponse) Size

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

func (*MsgFinalizeSaleResponse) String

func (m *MsgFinalizeSaleResponse) String() string

func (*MsgFinalizeSaleResponse) Unmarshal

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

func (*MsgFinalizeSaleResponse) XXX_DiscardUnknown

func (m *MsgFinalizeSaleResponse) XXX_DiscardUnknown()

func (*MsgFinalizeSaleResponse) XXX_Marshal

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

func (*MsgFinalizeSaleResponse) XXX_Merge

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

func (*MsgFinalizeSaleResponse) XXX_Size

func (m *MsgFinalizeSaleResponse) XXX_Size() int

func (*MsgFinalizeSaleResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// CreateSale creates new token sale. Anyone can create a new sale.
	// params.SaleBond OSMO will be charged as a bond (returned in FinalizeSale)
	// to avoid spams.
	// The sale follows the streamswap functionality explained in the
	// x/launchapd/spec
	CreateSale(context.Context, *MsgCreateSale) (*MsgCreateSaleResponse, error)
	// Subscribe to a token sale. Any use at any time before the sale end can join
	// the sale by sending `token_in` to the Sale through the Subscribe msg.
	// During the sale, user `token_in` will be automatically charged every
	// epoch to purchase `token_out`.
	Subscribe(context.Context, *MsgSubscribe) (*emptypb.Empty, error)
	// Withdraw sends back `amount` of unspent tokens_in to the user.
	// If `amount` is empty, it will default to all unspent tokens.
	// User can do it any time unless his deposit is empty.
	Withdraw(context.Context, *MsgWithdraw) (*emptypb.Empty, error)
	// ExitSale withdraws (by a user who subscribed to the sale) purchased
	// tokens_out from the pool and remained tokens_in. Must be called before
	// the sale end.
	ExitSale(context.Context, *MsgExitSale) (*MsgExitSaleResponse, error)
	// FinalizeSale clean ups the sale and sends income (earned tokens_in) to the
	// Sale recipient. Returns error if called before the Sale end. Anyone can
	// call this method.
	FinalizeSale(context.Context, *MsgFinalizeSale) (*MsgFinalizeSaleResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubscribe

type MsgSubscribe struct {
	// sender is an account address adding a deposit
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// ID of an existing sale.
	SaleId uint64 `protobuf:"varint,2,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty" yaml:"sale_id"`
	// number of sale.token_in staked by a user.
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}

func (*MsgSubscribe) Descriptor

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

func (*MsgSubscribe) Marshal

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

func (*MsgSubscribe) MarshalTo

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

func (*MsgSubscribe) MarshalToSizedBuffer

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

func (*MsgSubscribe) ProtoMessage

func (*MsgSubscribe) ProtoMessage()

func (*MsgSubscribe) Reset

func (m *MsgSubscribe) Reset()

func (*MsgSubscribe) Size

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

func (*MsgSubscribe) String

func (m *MsgSubscribe) String() string

func (*MsgSubscribe) Unmarshal

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

func (*MsgSubscribe) XXX_DiscardUnknown

func (m *MsgSubscribe) XXX_DiscardUnknown()

func (*MsgSubscribe) XXX_Marshal

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

func (*MsgSubscribe) XXX_Merge

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

func (*MsgSubscribe) XXX_Size

func (m *MsgSubscribe) XXX_Size() int

func (*MsgSubscribe) XXX_Unmarshal

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

type MsgWithdraw

type MsgWithdraw struct {
	// sender is an account address subscribed to the sale_id
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// ID of a sale.
	SaleId uint64 `protobuf:"varint,2,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty" yaml:"sale_id"`
	// amount of tokens_in to withdraw. Must be at most the amount of not spent
	// tokens, unless set to null - then all remaining balance will be withdrawn.
	Amount *github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount,omitempty"`
}

func (*MsgWithdraw) Descriptor

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

func (*MsgWithdraw) Marshal

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

func (*MsgWithdraw) MarshalTo

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

func (*MsgWithdraw) MarshalToSizedBuffer

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

func (*MsgWithdraw) ProtoMessage

func (*MsgWithdraw) ProtoMessage()

func (*MsgWithdraw) Reset

func (m *MsgWithdraw) Reset()

func (*MsgWithdraw) Size

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

func (*MsgWithdraw) String

func (m *MsgWithdraw) String() string

func (*MsgWithdraw) Unmarshal

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

func (*MsgWithdraw) XXX_DiscardUnknown

func (m *MsgWithdraw) XXX_DiscardUnknown()

func (*MsgWithdraw) XXX_Marshal

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

func (*MsgWithdraw) XXX_Merge

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

func (*MsgWithdraw) XXX_Size

func (m *MsgWithdraw) XXX_Size() int

func (*MsgWithdraw) XXX_Unmarshal

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

type Params

type Params struct {
	// fee charged when creating a new sale. The fee will go to the
	// sale_fee_recipient unless it is not defined (empty).
	SaleCreationFee github_com_cosmos_cosmos_sdk_types.Coins `` /* 177-byte string literal not displayed */
	// bech32 address of the fee recipient
	SaleCreationFeeRecipient string `` /* 137-byte string literal not displayed */
	// minimum amount duration of time between the sale creation and the sale
	// start time.
	MinDurationUntilStartTime time.Duration `` /* 144-byte string literal not displayed */
	// minimum duration for every new sale.
	MinSaleDuration time.Duration `protobuf:"bytes,4,opt,name=min_sale_duration,json=minSaleDuration,proto3,stdduration" json:"min_sale_duration"`
}

Params holds parameters for the streamswap module

func (*Params) Descriptor

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

func (*Params) GetMinDurationUntilStartTime

func (m *Params) GetMinDurationUntilStartTime() time.Duration

func (*Params) GetMinSaleDuration

func (m *Params) GetMinSaleDuration() time.Duration

func (*Params) GetSaleCreationFee

func (m *Params) GetSaleCreationFee() github_com_cosmos_cosmos_sdk_types.Coins

func (*Params) GetSaleCreationFeeRecipient

func (m *Params) GetSaleCreationFeeRecipient() string

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Returns list of Sales ordered by the creation time
	Sales(ctx context.Context, in *QuerySales, opts ...grpc.CallOption) (*QuerySalesResponse, error)
	// Returns the specific Sale object
	Sale(ctx context.Context, in *QuerySale, opts ...grpc.CallOption) (*QuerySaleResponse, error)
	UserPosition(ctx context.Context, in *QueryUserPosition, opts ...grpc.CallOption) (*QueryUserPositionResponse, 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 QuerySale

type QuerySale struct {
	// Sale ID
	SaleId uint64 `protobuf:"varint,1,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty"`
}

Request type for Query/Sale

func (*QuerySale) Descriptor

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

func (*QuerySale) Marshal

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

func (*QuerySale) MarshalTo

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

func (*QuerySale) MarshalToSizedBuffer

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

func (*QuerySale) ProtoMessage

func (*QuerySale) ProtoMessage()

func (*QuerySale) Reset

func (m *QuerySale) Reset()

func (*QuerySale) Size

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

func (*QuerySale) String

func (m *QuerySale) String() string

func (*QuerySale) Unmarshal

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

func (*QuerySale) XXX_DiscardUnknown

func (m *QuerySale) XXX_DiscardUnknown()

func (*QuerySale) XXX_Marshal

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

func (*QuerySale) XXX_Merge

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

func (*QuerySale) XXX_Size

func (m *QuerySale) XXX_Size() int

func (*QuerySale) XXX_Unmarshal

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

type QuerySaleResponse

type QuerySaleResponse struct {
	Sale Sale `protobuf:"bytes,1,opt,name=sale,proto3" json:"sale"`
}

func (*QuerySaleResponse) Descriptor

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

func (*QuerySaleResponse) Marshal

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

func (*QuerySaleResponse) MarshalTo

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

func (*QuerySaleResponse) MarshalToSizedBuffer

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

func (*QuerySaleResponse) ProtoMessage

func (*QuerySaleResponse) ProtoMessage()

func (*QuerySaleResponse) Reset

func (m *QuerySaleResponse) Reset()

func (*QuerySaleResponse) Size

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

func (*QuerySaleResponse) String

func (m *QuerySaleResponse) String() string

func (*QuerySaleResponse) Unmarshal

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

func (*QuerySaleResponse) XXX_DiscardUnknown

func (m *QuerySaleResponse) XXX_DiscardUnknown()

func (*QuerySaleResponse) XXX_Marshal

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

func (*QuerySaleResponse) XXX_Merge

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

func (*QuerySaleResponse) XXX_Size

func (m *QuerySaleResponse) XXX_Size() int

func (*QuerySaleResponse) XXX_Unmarshal

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

type QuerySales

type QuerySales struct {
	// pagination defines an pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QuerySales) Descriptor

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

func (*QuerySales) Marshal

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

func (*QuerySales) MarshalTo

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

func (*QuerySales) MarshalToSizedBuffer

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

func (*QuerySales) ProtoMessage

func (*QuerySales) ProtoMessage()

func (*QuerySales) Reset

func (m *QuerySales) Reset()

func (*QuerySales) Size

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

func (*QuerySales) String

func (m *QuerySales) String() string

func (*QuerySales) Unmarshal

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

func (*QuerySales) XXX_DiscardUnknown

func (m *QuerySales) XXX_DiscardUnknown()

func (*QuerySales) XXX_Marshal

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

func (*QuerySales) XXX_Merge

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

func (*QuerySales) XXX_Size

func (m *QuerySales) XXX_Size() int

func (*QuerySales) XXX_Unmarshal

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

type QuerySalesResponse

type QuerySalesResponse struct {
	Sales      []Sale              `protobuf:"bytes,1,rep,name=sales,proto3" json:"sales"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QuerySalesResponse) Descriptor

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

func (*QuerySalesResponse) Marshal

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

func (*QuerySalesResponse) MarshalTo

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

func (*QuerySalesResponse) MarshalToSizedBuffer

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

func (*QuerySalesResponse) ProtoMessage

func (*QuerySalesResponse) ProtoMessage()

func (*QuerySalesResponse) Reset

func (m *QuerySalesResponse) Reset()

func (*QuerySalesResponse) Size

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

func (*QuerySalesResponse) String

func (m *QuerySalesResponse) String() string

func (*QuerySalesResponse) Unmarshal

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

func (*QuerySalesResponse) XXX_DiscardUnknown

func (m *QuerySalesResponse) XXX_DiscardUnknown()

func (*QuerySalesResponse) XXX_Marshal

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

func (*QuerySalesResponse) XXX_Merge

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

func (*QuerySalesResponse) XXX_Size

func (m *QuerySalesResponse) XXX_Size() int

func (*QuerySalesResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Returns list of Sales ordered by the creation time
	Sales(context.Context, *QuerySales) (*QuerySalesResponse, error)
	// Returns the specific Sale object
	Sale(context.Context, *QuerySale) (*QuerySaleResponse, error)
	UserPosition(context.Context, *QueryUserPosition) (*QueryUserPositionResponse, error)
}

QueryServer is the server API for Query service.

type QueryUserPosition

type QueryUserPosition struct {
	// ID of the Sale
	SaleId uint64 `protobuf:"varint,1,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty"`
	// user account address
	User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
}

Request type for Query/Sale

func (*QueryUserPosition) Descriptor

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

func (*QueryUserPosition) Marshal

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

func (*QueryUserPosition) MarshalTo

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

func (*QueryUserPosition) MarshalToSizedBuffer

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

func (*QueryUserPosition) ProtoMessage

func (*QueryUserPosition) ProtoMessage()

func (*QueryUserPosition) Reset

func (m *QueryUserPosition) Reset()

func (*QueryUserPosition) Size

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

func (*QueryUserPosition) String

func (m *QueryUserPosition) String() string

func (*QueryUserPosition) Unmarshal

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

func (*QueryUserPosition) XXX_DiscardUnknown

func (m *QueryUserPosition) XXX_DiscardUnknown()

func (*QueryUserPosition) XXX_Marshal

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

func (*QueryUserPosition) XXX_Merge

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

func (*QueryUserPosition) XXX_Size

func (m *QueryUserPosition) XXX_Size() int

func (*QueryUserPosition) XXX_Unmarshal

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

type QueryUserPositionResponse

type QueryUserPositionResponse struct {
	UserPosition UserPosition `protobuf:"bytes,1,opt,name=user_position,json=userPosition,proto3" json:"user_position"`
}

func (*QueryUserPositionResponse) Descriptor

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

func (*QueryUserPositionResponse) Marshal

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

func (*QueryUserPositionResponse) MarshalTo

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

func (*QueryUserPositionResponse) MarshalToSizedBuffer

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

func (*QueryUserPositionResponse) ProtoMessage

func (*QueryUserPositionResponse) ProtoMessage()

func (*QueryUserPositionResponse) Reset

func (m *QueryUserPositionResponse) Reset()

func (*QueryUserPositionResponse) Size

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

func (*QueryUserPositionResponse) String

func (m *QueryUserPositionResponse) String() string

func (*QueryUserPositionResponse) Unmarshal

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

func (*QueryUserPositionResponse) XXX_DiscardUnknown

func (m *QueryUserPositionResponse) XXX_DiscardUnknown()

func (*QueryUserPositionResponse) XXX_Marshal

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

func (*QueryUserPositionResponse) XXX_Merge

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

func (*QueryUserPositionResponse) XXX_Size

func (m *QueryUserPositionResponse) XXX_Size() int

func (*QueryUserPositionResponse) XXX_Unmarshal

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

type Sale

type Sale struct {
	// Destination for the earned token_in
	Treasury string `protobuf:"bytes,1,opt,name=treasury,proto3" json:"treasury,omitempty"`
	Id       uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"`
	// token_out is a token denom to be bootstraped. May be referred as base
	// currency, or a sale token.
	TokenOut string `protobuf:"bytes,3,opt,name=token_out,json=tokenOut,proto3" json:"token_out,omitempty"`
	// token_in is a token denom used to buy sale tokens (`token_out`). May be
	// referred as quote_currency or payment token.
	TokenIn string `protobuf:"bytes,4,opt,name=token_in,json=tokenIn,proto3" json:"token_in,omitempty"`
	// total number of `tokens_out` to be sold during the continuous sale.
	TokenOutSupply github_com_cosmos_cosmos_sdk_types.Int `` /* 145-byte string literal not displayed */
	// start time when the token emission starts.
	StartTime time.Time `protobuf:"bytes,6,opt,name=start_time,json=startTime,proto3,stdtime" json:"start_time"`
	// end time when the token emission ends. Can't be bigger than start +
	// 139years (to avoid round overflow)
	EndTime time.Time `protobuf:"bytes,7,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"`
	// Round number when the sale was last time updated.
	Round int64 `protobuf:"varint,8,opt,name=round,proto3" json:"round,omitempty"`
	// Last round of the Sale;
	EndRound int64 `protobuf:"varint,9,opt,name=end_round,json=endRound,proto3" json:"end_round,omitempty"`
	// amout of remaining token_out to sell
	OutRemaining github_com_cosmos_cosmos_sdk_types.Int `` /* 138-byte string literal not displayed */
	// amount of token_out sold
	OutSold github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,11,opt,name=out_sold,json=outSold,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"out_sold"`
	// out token per share
	OutPerShare github_com_cosmos_cosmos_sdk_types.Int `` /* 137-byte string literal not displayed */
	// total amount of currently staked coins (token_in) but not spent coins.
	Staked github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,13,opt,name=staked,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"staked"`
	// total amount of earned coins (token_in)
	Income github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,14,opt,name=income,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"income"`
	// total amount of shares
	Shares github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,15,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shares"`
	// Name for the sale.
	Name string `protobuf:"bytes,20,opt,name=name,proto3" json:"name,omitempty"`
	// URL with sale and project details.
	Url string `protobuf:"bytes,21,opt,name=url,proto3" json:"url,omitempty"`
}

func (*Sale) Descriptor

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

func (*Sale) Marshal

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

func (*Sale) MarshalTo

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

func (*Sale) MarshalToSizedBuffer

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

func (*Sale) ProtoMessage

func (*Sale) ProtoMessage()

func (*Sale) Reset

func (m *Sale) Reset()

func (*Sale) Size

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

func (*Sale) String

func (m *Sale) String() string

func (*Sale) Unmarshal

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

func (*Sale) XXX_DiscardUnknown

func (m *Sale) XXX_DiscardUnknown()

func (*Sale) XXX_Marshal

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

func (*Sale) XXX_Merge

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

func (*Sale) XXX_Size

func (m *Sale) XXX_Size() int

func (*Sale) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateSale

func (*UnimplementedMsgServer) ExitSale

func (*UnimplementedMsgServer) FinalizeSale

func (*UnimplementedMsgServer) Subscribe

func (*UnimplementedMsgServer) Withdraw

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Sale

func (*UnimplementedQueryServer) Sales

func (*UnimplementedQueryServer) UserPosition

type UserPosition

type UserPosition struct {
	Shares github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,1,opt,name=shares,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"shares"`
	// total number of currently staked tokens
	Staked github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=staked,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"staked"`
	// last token/share ratio
	OutPerShare github_com_cosmos_cosmos_sdk_types.Int `` /* 136-byte string literal not displayed */
	// amount of token_in spent
	Spent github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=spent,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"spent"`
	// Amount of accumulated, not withdrawn, purchased tokens (token_out)
	Purchased github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=purchased,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"purchased"`
}

UserPosition represents user account in a sale

func (*UserPosition) Descriptor

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

func (*UserPosition) Marshal

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

func (*UserPosition) MarshalTo

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

func (*UserPosition) MarshalToSizedBuffer

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

func (*UserPosition) ProtoMessage

func (*UserPosition) ProtoMessage()

func (*UserPosition) Reset

func (m *UserPosition) Reset()

func (*UserPosition) Size

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

func (*UserPosition) String

func (m *UserPosition) String() string

func (*UserPosition) Unmarshal

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

func (*UserPosition) XXX_DiscardUnknown

func (m *UserPosition) XXX_DiscardUnknown()

func (*UserPosition) XXX_Marshal

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

func (*UserPosition) XXX_Merge

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

func (*UserPosition) XXX_Size

func (m *UserPosition) XXX_Size() int

func (*UserPosition) XXX_Unmarshal

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

type UserPositionKV

type UserPositionKV struct {
	// user account address
	AccAddress   string       `protobuf:"bytes,1,opt,name=acc_address,json=accAddress,proto3" json:"acc_address,omitempty"`
	SaleId       uint64       `protobuf:"varint,2,opt,name=sale_id,json=saleId,proto3" json:"sale_id,omitempty"`
	UserPosition UserPosition `protobuf:"bytes,3,opt,name=user_position,json=userPosition,proto3" json:"user_position"`
}

UserPositionKV is a record in genesis representing acc_address user position of a sale_id sale.

func (*UserPositionKV) Descriptor

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

func (*UserPositionKV) GetAccAddress

func (m *UserPositionKV) GetAccAddress() string

func (*UserPositionKV) GetSaleId

func (m *UserPositionKV) GetSaleId() uint64

func (*UserPositionKV) GetUserPosition

func (m *UserPositionKV) GetUserPosition() UserPosition

func (*UserPositionKV) Marshal

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

func (*UserPositionKV) MarshalTo

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

func (*UserPositionKV) MarshalToSizedBuffer

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

func (*UserPositionKV) ProtoMessage

func (*UserPositionKV) ProtoMessage()

func (*UserPositionKV) Reset

func (m *UserPositionKV) Reset()

func (*UserPositionKV) Size

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

func (*UserPositionKV) String

func (m *UserPositionKV) String() string

func (*UserPositionKV) Unmarshal

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

func (*UserPositionKV) XXX_DiscardUnknown

func (m *UserPositionKV) XXX_DiscardUnknown()

func (*UserPositionKV) XXX_Marshal

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

func (*UserPositionKV) XXX_Merge

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

func (*UserPositionKV) XXX_Size

func (m *UserPositionKV) XXX_Size() int

func (*UserPositionKV) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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