types

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ErrTextInvalidParamType                                  = "invalid parameter type"
	ErrTextBatchSettlementCountMustBePositive                = "batch settlement count should be a positive number"
	ErrTextMaxBetUIDQueryCountMustBePositive                 = "max bet by uid query count should be a positive number"
	ErrTextInitGenesisFailedBecauseOfMissingBetID            = "no bet id found for the bet with uuid"
	ErrTextInitGenesisFailedBecauseOfNotEqualStats           = "bet list items count is not equal to stats count"
	ErrTextInitGenesisFailedBetCountNotEqualActiveAndSettled = "sum of active and settled list items count is not equal to bet list items count"
	ErrTextInitGenesisFailedNotActiveOrSettled               = "bet is not active nor settled with uuid"
	ErrTextInitGenesisFailedSettlementHeightIsZero           = "settlement height can not be zero for the settled bet with uuid"
	ErrTextInitGenesisFailedSettlementHeightIsZeroForList    = "settlement height can not be zero for a bet in the settled bet list with uuid"
	ErrTextInitGenesisFailedSettlementHeightIsNotZero        = "settlement height should be zero for the active bet with uuid"
)

x/bet module sentinel error text

View Source
const (
	// ModuleName defines the module name
	ModuleName = "bet"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_bet"
)
View Source
const DefaultUID uint64 = 1

DefaultUID is the default global uid

Variables

View Source
var (
	ErrInvalidLengthBet        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBet          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBet = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthBetOdds        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBetOdds          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBetOdds = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthConstraints        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConstraints          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupConstraints = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInTicketVerification                 = sdkerrors.Register(ModuleName, 2001, "ticket verification failed")
	ErrInTicketValidation                   = sdkerrors.Register(ModuleName, 2002, "ticket validation failed")
	ErrInWager                              = sdkerrors.Register(ModuleName, 2003, "bet placement failed")
	ErrInvalidBetUID                        = sdkerrors.Register(ModuleName, 2004, "invalid Bet Uid")
	ErrBetIsCanceled                        = sdkerrors.Register(ModuleName, 2005, "bet is already canceled")
	ErrBetIsSettled                         = sdkerrors.Register(ModuleName, 2006, "bet is already settled")
	ErrInOBBettorLoses                      = sdkerrors.Register(ModuleName, 2007, "internal error in processing better loss in orderbook")
	ErrInOBBettorWins                       = sdkerrors.Register(ModuleName, 2008, "internal error in processing better win in orderbook")
	ErrNoMatchingMarket                     = sdkerrors.Register(ModuleName, 2009, "market not found")
	ErrInvalidOddsUID                       = sdkerrors.Register(ModuleName, 2010, "invalid odds UID")
	ErrEmptyOddsValue                       = sdkerrors.Register(ModuleName, 2011, "odds value should not be empty")
	ErrInvalidMarketUID                     = sdkerrors.Register(ModuleName, 2012, "invalid market UID")
	ErrInvalidTicket                        = sdkerrors.Register(ModuleName, 2013, "invalid ticket")
	ErrInvalidAmount                        = sdkerrors.Register(ModuleName, 2014, "invalid amount")
	ErrNoMatchingBet                        = sdkerrors.Register(ModuleName, 2015, "bet not found")
	ErrResultNotDeclared                    = sdkerrors.Register(ModuleName, 2016, "market result is not declared")
	ErrDuplicateUID                         = sdkerrors.Register(ModuleName, 2017, "UID is already set")
	ErrInOBWagerProcessing                  = sdkerrors.Register(ModuleName, 2018, "internal error in processing bet placement in orderbook")
	ErrEndTSIsPassed                        = sdkerrors.Register(ModuleName, 2019, "market is expired")
	ErrOddsUIDNotExist                      = sdkerrors.Register(ModuleName, 2020, "market does not have this odds UID")
	ErrInOBRefund                           = sdkerrors.Register(ModuleName, 2021, "internal error in refunding user in Orderbook")
	ErrInactiveMarket                       = sdkerrors.Register(ModuleName, 2022, "market is not active")
	ErrBetAmountIsLow                       = sdkerrors.Register(ModuleName, 2023, "bet amount is lower than the minimum allowed")
	ErrDecimalOddsIncorrectFormat           = sdkerrors.Register(ModuleName, 2024, "incorrect format of decimal odds value")
	ErrFractionalOddsIncorrectFormat        = sdkerrors.Register(ModuleName, 2025, "incorrect format of fractional odds value")
	ErrMoneylineOddsIncorrectFormat         = sdkerrors.Register(ModuleName, 2026, "incorrect format of moneyline odds value")
	ErrOddsDataNotFound                     = sdkerrors.Register(ModuleName, 2027, "odds does not exist in ticket payload")
	ErrUserKycFailed                        = sdkerrors.Register(ModuleName, 2028, "the bettor failed the KYC Validation")
	ErrCanNotQueryLargeNumberOfBets         = sdkerrors.Register(ModuleName, 2029, "large amount of bets requested")
	ErrDecimalOddsShouldBePositive          = sdkerrors.Register(ModuleName, 2030, "decimal odds value should be positive")
	ErrDecimalOddsCanNotBeLessThanOne       = sdkerrors.Register(ModuleName, 2032, "decimal odds value can not less than or equal to 1")
	ErrBettorAddressNotEqualToCreator       = sdkerrors.Register(ModuleName, 2033, "provided bettor address is not equal to bet owner")
	ErrMaxLossMultiplierCanNotBeZero        = sdkerrors.Register(ModuleName, 2034, "max loss multiplier cannot be nil or zero")
	ErrMaxLossMultiplierCanNotBeMoreThanOne = sdkerrors.Register(ModuleName, 2035, "max loss multiplier cannot be more than one")
	ErrInsufficientOdds                     = sdkerrors.Register(ModuleName, 2036, "market odds length not same as odds sent in wager")
	ErrMetaOddsType                         = sdkerrors.Register(ModuleName, 2037, "invalid odds type in meta")
)

x/bet module sentinel errors

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 (
	// BetListPrefix is the prefix to retrieve all Bet
	BetListPrefix = []byte{0x00}
	// BetIDListPrefix is the prefix to retrieve all Bet IDs
	BetIDListPrefix = []byte{0x01}
	// BetStatsKey is the key for the bet statistics
	BetStatsKey = []byte{0x02}
	// PendingBetListPrefix is the prefix to retrieve all pending bets
	PendingBetListPrefix = []byte{0x03}
	// SettledBetListPrefix is the prefix to retrieve all settled bets
	SettledBetListPrefix = []byte{0x04}
)
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 (
	ErrInvalidLengthStats        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowStats          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupStats = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTicket        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTicket          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTicket = 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 (
	ErrInvalidLengthWager        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowWager          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupWager = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Bet_Result_name = map[int32]string{
	0: "RESULT_UNSPECIFIED",
	1: "RESULT_PENDING",
	2: "RESULT_WON",
	3: "RESULT_LOST",
	4: "RESULT_REFUNDED",
}
View Source
var Bet_Result_value = map[string]int32{
	"RESULT_UNSPECIFIED": 0,
	"RESULT_PENDING":     1,
	"RESULT_WON":         2,
	"RESULT_LOST":        3,
	"RESULT_REFUNDED":    4,
}
View Source
var Bet_Status_name = map[int32]string{
	0: "STATUS_UNSPECIFIED",
	1: "STATUS_PLACED",
	2: "STATUS_CANCELED",
	3: "STATUS_ABORTED",
	4: "STATUS_PENDING",
	5: "STATUS_RESULT_DECLARED",
	6: "STATUS_SETTLED",
}
View Source
var Bet_Status_value = map[string]int32{
	"STATUS_UNSPECIFIED":     0,
	"STATUS_PLACED":          1,
	"STATUS_CANCELED":        2,
	"STATUS_ABORTED":         3,
	"STATUS_PENDING":         4,
	"STATUS_RESULT_DECLARED": 5,
	"STATUS_SETTLED":         6,
}
View Source
var (

	// ModuleCdc is the codec of the module
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var OddsType_name = map[int32]string{
	0: "ODDS_TYPE_UNSPECIFIED",
	1: "ODDS_TYPE_DECIMAL",
	2: "ODDS_TYPE_FRACTIONAL",
	3: "ODDS_TYPE_MONEYLINE",
}
View Source
var OddsType_value = map[string]int32{
	"ODDS_TYPE_UNSPECIFIED": 0,
	"ODDS_TYPE_DECIMAL":     1,
	"ODDS_TYPE_FRACTIONAL":  2,
	"ODDS_TYPE_MONEYLINE":   3,
}

Functions

func BetIDKey added in v0.0.5

func BetIDKey(creator string, id uint64) []byte

BetIDKey returns key of a certain bet of a creator.

func BetListByCreatorPrefix added in v0.0.5

func BetListByCreatorPrefix(creator string) []byte

BetListByCreatorPrefix returns prefix of the certain creator bet list.

func CalculateBetAmount added in v0.0.5

func CalculateBetAmount(oddsVal string, payoutProfit sdk.Dec) (sdk.Dec, error)

CalculateBetAmount calculates the amount of bet according to bet odds value and payout profit

func CalculateBetAmountInt added in v0.0.8

func CalculateBetAmountInt(
	oddsVal string,
	payoutProfit sdk.Dec,
	truncatedBetAmount sdk.Dec,
) (sdkmath.Int, sdk.Dec, error)

CalculateBetAmountInt calculates the amount of bet according to bet odds value and payout profit and returns the int and the truncated decimal part.

func CalculateDecimalBetAmount added in v1.1.1

func CalculateDecimalBetAmount(oddsVal string, payoutProfit sdk.Dec) (sdk.Dec, error)

CalculateBetAmount calculates bet amount

func CalculateDecimalPayout added in v1.1.1

func CalculateDecimalPayout(oddsVal string, amount sdkmath.Int) (sdk.Dec, error)

CalculateDecimalPayout calculates total payout of a certain bet amount by decimal odds calculations

func CalculatePayoutProfit added in v0.0.4

func CalculatePayoutProfit(oddsVal string, amount sdkmath.Int) (sdk.Dec, error)

CalculatePayoutProfit calculates the amount of payout profit portion according to bet odds value and amount

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable the param key table for launch module

func PendingBetListOfMarketPrefix added in v0.0.6

func PendingBetListOfMarketPrefix(marketID string) []byte

PendingBetListOfMarketPrefix returns prefix of pending bet list of a certain market .

func PendingBetOfMarketKey added in v0.0.6

func PendingBetOfMarketKey(marketID string, id uint64) []byte

PendingBetOfMarketKey return the key of a certain pending bets of a market.

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the module interface types

func RegisterLegacyAminoCodec added in v1.1.1

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/bet interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

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 SettledBetListOfBlockHeightPrefix added in v0.0.5

func SettledBetListOfBlockHeightPrefix(blockHeight int64) []byte

SettledBetListOfBlockHeightPrefix returns prefix of settled bet list on a certain block height.

func SettledBetOfMarketKey added in v0.0.6

func SettledBetOfMarketKey(blockHeight int64, id uint64) []byte

SettledBetOfMarketKey return the key of settled bet list on a certain block height.

func WagerValidation added in v1.0.1

func WagerValidation(props *WagerProps) error

WagerValidation validates fields of the given bet

Types

type AccountKeeper

type AccountKeeper interface {
	GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type BankKeeper

type BankKeeper interface {
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected interface needed to retrieve account balances.

type Bet

type Bet struct {
	// uid is the universal unique identifier assigned to a bet.
	UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	// market_uid is the universal unique identifier of
	// the market on which the bet is placed.
	MarketUID string `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	// odds_uid is the universal unique identifier,
	// of the odds on which the bet is placed.
	OddsUID string `protobuf:"bytes,3,opt,name=odds_uid,proto3" json:"odds_uid"`
	// odds_value is the odds on which the bet is placed.
	OddsValue string `protobuf:"bytes,5,opt,name=odds_value,json=oddsValue,proto3" json:"odds_value,omitempty"`
	// amount is the wager amount.
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
	// fee is the betting fee user needs to pay for placing a bet
	Fee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,7,opt,name=fee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"fee"`
	// status is the status of the bet, such as `unspecified` or `settled`.
	Status Bet_Status `protobuf:"varint,8,opt,name=status,proto3,enum=sgenetwork.sge.bet.Bet_Status" json:"status,omitempty"`
	// result is the result of the bet, such as `won` or `lost`.
	Result Bet_Result `protobuf:"varint,9,opt,name=result,proto3,enum=sgenetwork.sge.bet.Bet_Result" json:"result,omitempty"`
	// creator is the bettor address.
	Creator string `protobuf:"bytes,10,opt,name=creator,proto3" json:"creator,omitempty"`
	// created_at is the bet placement timestamp.
	CreatedAt int64 `protobuf:"varint,11,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// settlement_height is the block height at which the bet is settled.
	SettlementHeight int64 `protobuf:"varint,12,opt,name=settlement_height,json=settlementHeight,proto3" json:"settlement_height,omitempty"`
	// max_loss_multiplier is the multiplier coefficient of max loss.
	MaxLossMultiplier github_com_cosmos_cosmos_sdk_types.Dec `` /* 155-byte string literal not displayed */
	// bet_fulfillment is the fulfillment data.
	BetFulfillment []*BetFulfillment `protobuf:"bytes,14,rep,name=bet_fulfillment,json=betFulfillment,proto3" json:"bet_fulfillment,omitempty"`
	// meta is metadata for bet
	Meta MetaData `protobuf:"bytes,15,opt,name=meta,proto3" json:"meta"`
}

Bet is the transaction order placed by a bettor on a specific event and odd

func NewBet

func NewBet(creator string, props *WagerProps, odds *BetOdds, meta MetaData) *Bet

NewBet creates and returns a new bet from given message

func (*Bet) CheckSettlementEligiblity added in v1.0.0

func (bet *Bet) CheckSettlementEligiblity() error

CheckSettlementEligiblity checks status of bet. It returns an error if bet is canceled or settled already.

func (*Bet) Descriptor

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

func (*Bet) GetBetFulfillment added in v0.0.5

func (m *Bet) GetBetFulfillment() []*BetFulfillment

func (*Bet) GetCreatedAt

func (m *Bet) GetCreatedAt() int64

func (*Bet) GetCreator

func (m *Bet) GetCreator() string

func (*Bet) GetMarketUID added in v0.0.6

func (m *Bet) GetMarketUID() string

func (*Bet) GetMeta added in v1.1.1

func (m *Bet) GetMeta() MetaData

func (*Bet) GetOddsUID

func (m *Bet) GetOddsUID() string

func (*Bet) GetOddsValue added in v0.0.4

func (m *Bet) GetOddsValue() string

func (*Bet) GetResult

func (m *Bet) GetResult() Bet_Result

func (*Bet) GetSettlementHeight added in v0.0.5

func (m *Bet) GetSettlementHeight() int64

func (*Bet) GetStatus

func (m *Bet) GetStatus() Bet_Status

func (*Bet) GetUID

func (m *Bet) GetUID() string

func (*Bet) Marshal

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

func (*Bet) MarshalTo

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

func (*Bet) MarshalToSizedBuffer

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

func (*Bet) ProtoMessage

func (*Bet) ProtoMessage()

func (*Bet) Reset

func (m *Bet) Reset()

func (*Bet) SetFee added in v1.0.0

func (bet *Bet) SetFee(fee sdkmath.Int)

SetFee calculates and sets the betting fee.

func (*Bet) SetResult added in v1.0.0

func (bet *Bet) SetResult(market *markettypes.Market) error

SetResult sets the bet object results according to the market resolusion.

func (*Bet) Size

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

func (*Bet) String

func (m *Bet) String() string

func (*Bet) Unmarshal

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

func (*Bet) XXX_DiscardUnknown

func (m *Bet) XXX_DiscardUnknown()

func (*Bet) XXX_Marshal

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

func (*Bet) XXX_Merge

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

func (*Bet) XXX_Size

func (m *Bet) XXX_Size() int

func (*Bet) XXX_Unmarshal

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

type BetFeeCollectorFunder added in v0.0.8

type BetFeeCollectorFunder struct{}

func (BetFeeCollectorFunder) GetModuleAcc added in v0.0.8

func (BetFeeCollectorFunder) GetModuleAcc() string

type BetFulfillment added in v0.0.5

type BetFulfillment struct {
	// participant_address is the bech32-encoded address of the participant
	// fulfilling bet.
	ParticipantAddress string `` /* 142-byte string literal not displayed */
	// participation_index is the index in initial participation queue index
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
	// bet amount fulfilled by the participation
	BetAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 146-byte string literal not displayed */
	// payout_profit is the fulfilled profit by the participation.
	PayoutProfit github_com_cosmos_cosmos_sdk_types.Int `` /* 158-byte string literal not displayed */
}

BetFulfillment: A bet can be fulfilled by multiple users participating as a house Every participant is exposed to a share of risk or payout associated with the bet For the risk exposure on a bet, an estimated bet amount is also allocated to the participant This bet amount is the amount participant receive if the bettor loose the bet

func NewBetFulfillment added in v0.0.8

func NewBetFulfillment(
	participantAddress string,
	participationIndex uint64,
	betAmount, payoutProfit sdkmath.Int,
) *BetFulfillment

func (*BetFulfillment) Descriptor added in v0.0.5

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

func (*BetFulfillment) GetParticipantAddress added in v0.0.5

func (m *BetFulfillment) GetParticipantAddress() string

func (*BetFulfillment) GetParticipationIndex added in v0.0.5

func (m *BetFulfillment) GetParticipationIndex() uint64

func (*BetFulfillment) Marshal added in v0.0.5

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

func (*BetFulfillment) MarshalTo added in v0.0.5

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

func (*BetFulfillment) MarshalToSizedBuffer added in v0.0.5

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

func (*BetFulfillment) ProtoMessage added in v0.0.5

func (*BetFulfillment) ProtoMessage()

func (*BetFulfillment) Reset added in v0.0.5

func (m *BetFulfillment) Reset()

func (*BetFulfillment) Size added in v0.0.5

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

func (*BetFulfillment) String added in v0.0.5

func (m *BetFulfillment) String() string

func (*BetFulfillment) Unmarshal added in v0.0.5

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

func (*BetFulfillment) XXX_DiscardUnknown added in v0.0.5

func (m *BetFulfillment) XXX_DiscardUnknown()

func (*BetFulfillment) XXX_Marshal added in v0.0.5

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

func (*BetFulfillment) XXX_Merge added in v0.0.5

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

func (*BetFulfillment) XXX_Size added in v0.0.5

func (m *BetFulfillment) XXX_Size() int

func (*BetFulfillment) XXX_Unmarshal added in v0.0.5

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

type BetOdds

type BetOdds struct {
	// uid is universal unique identifier of odds.
	// Required | Unique | uuid-v4 or code
	UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	// market_uid is the parent, used for fast retrieving.
	// Required | NonUnique | -
	MarketUID string `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	// value of the odds in corresponding odds type proposed in bet placement
	// message. Required | NonUnique | "1.286" or "2/7" or "+500"
	Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	// max_loss_multiplier is the factor for calculating max loss for given odds
	MaxLossMultiplier github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */
}

BetOdds is the type to store odds of a market.

func (*BetOdds) Descriptor

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

func (*BetOdds) GetMarketUID added in v0.0.6

func (m *BetOdds) GetMarketUID() string

func (*BetOdds) GetUID

func (m *BetOdds) GetUID() string

func (*BetOdds) GetValue

func (m *BetOdds) GetValue() string

func (*BetOdds) Marshal

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

func (*BetOdds) MarshalTo

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

func (*BetOdds) MarshalToSizedBuffer

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

func (*BetOdds) ProtoMessage

func (*BetOdds) ProtoMessage()

func (*BetOdds) Reset

func (m *BetOdds) Reset()

func (*BetOdds) Size

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

func (*BetOdds) String

func (m *BetOdds) String() string

func (*BetOdds) Unmarshal

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

func (*BetOdds) XXX_DiscardUnknown

func (m *BetOdds) XXX_DiscardUnknown()

func (*BetOdds) XXX_Marshal

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

func (*BetOdds) XXX_Merge

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

func (*BetOdds) XXX_Size

func (m *BetOdds) XXX_Size() int

func (*BetOdds) XXX_Unmarshal

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

type BetOddsCompact added in v1.1.1

type BetOddsCompact struct {
	// uid is universal unique identifier of odds.
	// Required | Unique | uuid-v4 or code
	UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	// max_loss_multiplier is the factor for calculating max loss for given odds
	MaxLossMultiplier github_com_cosmos_cosmos_sdk_types.Dec `` /* 131-byte string literal not displayed */
}

BetOddsCompact is the compact bet odd type for all odds.

func (*BetOddsCompact) Descriptor added in v1.1.1

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

func (*BetOddsCompact) GetUID added in v1.1.1

func (m *BetOddsCompact) GetUID() string

func (*BetOddsCompact) Marshal added in v1.1.1

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

func (*BetOddsCompact) MarshalTo added in v1.1.1

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

func (*BetOddsCompact) MarshalToSizedBuffer added in v1.1.1

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

func (*BetOddsCompact) ProtoMessage added in v1.1.1

func (*BetOddsCompact) ProtoMessage()

func (*BetOddsCompact) Reset added in v1.1.1

func (m *BetOddsCompact) Reset()

func (*BetOddsCompact) Size added in v1.1.1

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

func (*BetOddsCompact) String added in v1.1.1

func (m *BetOddsCompact) String() string

func (*BetOddsCompact) Unmarshal added in v1.1.1

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

func (*BetOddsCompact) XXX_DiscardUnknown added in v1.1.1

func (m *BetOddsCompact) XXX_DiscardUnknown()

func (*BetOddsCompact) XXX_Marshal added in v1.1.1

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

func (*BetOddsCompact) XXX_Merge added in v1.1.1

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

func (*BetOddsCompact) XXX_Size added in v1.1.1

func (m *BetOddsCompact) XXX_Size() int

func (*BetOddsCompact) XXX_Unmarshal added in v1.1.1

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

type BetStats added in v0.0.4

type BetStats struct {
	// count is the total count of bets.
	Count uint64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
}

BetStats is the type of statistics of the betting in the blockchain state.

func (*BetStats) Descriptor added in v0.0.4

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

func (*BetStats) GetCount added in v0.0.4

func (m *BetStats) GetCount() uint64

func (*BetStats) Marshal added in v0.0.4

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

func (*BetStats) MarshalTo added in v0.0.4

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

func (*BetStats) MarshalToSizedBuffer added in v0.0.4

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

func (*BetStats) ProtoMessage added in v0.0.4

func (*BetStats) ProtoMessage()

func (*BetStats) Reset added in v0.0.4

func (m *BetStats) Reset()

func (*BetStats) Size added in v0.0.4

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

func (*BetStats) String added in v0.0.4

func (m *BetStats) String() string

func (*BetStats) Unmarshal added in v0.0.4

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

func (*BetStats) XXX_DiscardUnknown added in v0.0.4

func (m *BetStats) XXX_DiscardUnknown()

func (*BetStats) XXX_Marshal added in v0.0.4

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

func (*BetStats) XXX_Merge added in v0.0.4

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

func (*BetStats) XXX_Size added in v0.0.4

func (m *BetStats) XXX_Size() int

func (*BetStats) XXX_Unmarshal added in v0.0.4

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

type Bet_Result

type Bet_Result int32

Result of the bet.

const (
	// the invalid or unknown
	Bet_RESULT_UNSPECIFIED Bet_Result = 0
	// bet result is pending
	Bet_RESULT_PENDING Bet_Result = 1
	// bet won by the bettor
	Bet_RESULT_WON Bet_Result = 2
	// bet lost by the bettor
	Bet_RESULT_LOST Bet_Result = 3
	// bet is refunded
	Bet_RESULT_REFUNDED Bet_Result = 4
)

func (Bet_Result) EnumDescriptor

func (Bet_Result) EnumDescriptor() ([]byte, []int)

func (Bet_Result) String

func (x Bet_Result) String() string

type Bet_Status

type Bet_Status int32

Status of the Bet.

const (
	// the invalid or unknown
	Bet_STATUS_UNSPECIFIED Bet_Status = 0
	// bet is placed
	Bet_STATUS_PLACED Bet_Status = 1
	// bet is canceled by Bettor
	Bet_STATUS_CANCELED Bet_Status = 2
	// bet is aborted
	Bet_STATUS_ABORTED Bet_Status = 3
	// bet is pending for getting placed
	Bet_STATUS_PENDING Bet_Status = 4
	// bet result is declared
	Bet_STATUS_RESULT_DECLARED Bet_Status = 5
	// the bet is settled
	Bet_STATUS_SETTLED Bet_Status = 6
)

func (Bet_Status) EnumDescriptor

func (Bet_Status) EnumDescriptor() ([]byte, []int)

func (Bet_Status) String

func (x Bet_Status) String() string

type Constraints added in v0.0.9

type Constraints struct {
	// min_amount is the minimum allowed bet amount.
	MinAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 128-byte string literal not displayed */
	// fee is the fee that the bettor needs to pay to bet.
	Fee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=fee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"fee"`
}

Constraints is the bet constrains type for the bets

func (*Constraints) Descriptor added in v0.0.9

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

func (*Constraints) Marshal added in v0.0.9

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

func (*Constraints) MarshalTo added in v0.0.9

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

func (*Constraints) MarshalToSizedBuffer added in v0.0.9

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

func (*Constraints) ProtoMessage added in v0.0.9

func (*Constraints) ProtoMessage()

func (*Constraints) Reset added in v0.0.9

func (m *Constraints) Reset()

func (*Constraints) Size added in v0.0.9

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

func (*Constraints) String added in v0.0.9

func (m *Constraints) String() string

func (*Constraints) Unmarshal added in v0.0.9

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

func (*Constraints) XXX_DiscardUnknown added in v0.0.9

func (m *Constraints) XXX_DiscardUnknown()

func (*Constraints) XXX_Marshal added in v0.0.9

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

func (*Constraints) XXX_Merge added in v0.0.9

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

func (*Constraints) XXX_Size added in v0.0.9

func (m *Constraints) XXX_Size() int

func (*Constraints) XXX_Unmarshal added in v0.0.9

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

type GenesisState

type GenesisState struct {
	// params contains parameters of bet module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// bet_list contains the bet list in the genesis init.
	BetList []Bet `protobuf:"bytes,2,rep,name=bet_list,json=betList,proto3" json:"bet_list"`
	// pending_bet_list contains the pending bet list in the genesis init.
	PendingBetList []PendingBet `protobuf:"bytes,3,rep,name=pending_bet_list,json=pendingBetList,proto3" json:"pending_bet_list"`
	// settled_bet_list contains the settled bet list in the genesis init.
	SettledBetList []SettledBet `protobuf:"bytes,4,rep,name=settled_bet_list,json=settledBetList,proto3" json:"settled_bet_list"`
	// uid2id_list contains bet to id list in the genesis init.
	Uid2IdList []UID2ID `protobuf:"bytes,5,rep,name=uid2id_list,json=uid2idList,proto3" json:"uid2id_list"`
	// stats contains statistics in the genesis init.
	Stats BetStats `protobuf:"bytes,6,opt,name=stats,proto3" json:"stats"`
}

GenesisState defines the bet module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetBetList

func (m *GenesisState) GetBetList() []Bet

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPendingBetList added in v0.0.6

func (m *GenesisState) GetPendingBetList() []PendingBet

func (*GenesisState) GetSettledBetList added in v0.0.5

func (m *GenesisState) GetSettledBetList() []SettledBet

func (*GenesisState) GetStats added in v0.0.4

func (m *GenesisState) GetStats() BetStats

func (*GenesisState) GetUid2IdList added in v0.0.4

func (m *GenesisState) GetUid2IdList() []UID2ID

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 MarketKeeper added in v0.0.6

type MarketKeeper interface {
	GetMarket(ctx sdk.Context, marketUID string) (markettypes.Market, bool)
	GetFirstUnsettledResolvedMarket(ctx sdk.Context) (string, bool)
	RemoveUnsettledResolvedMarket(ctx sdk.Context, marketUID string)
}

MarketKeeper defines the expected interface needed to get markets from KVStore

type MetaData added in v1.1.1

type MetaData struct {
	// selected_odds_type is metadata for bet
	SelectedOddsType OddsType `` /* 145-byte string literal not displayed */
	// selected_odds_value is metadata for bet
	SelectedOddsValue string `protobuf:"bytes,2,opt,name=selected_odds_value,json=selectedOddsValue,proto3" json:"selected_odds_value,omitempty"`
}

metadata for bet

func (*MetaData) Descriptor added in v1.1.1

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

func (*MetaData) GetSelectedOddsType added in v1.1.1

func (m *MetaData) GetSelectedOddsType() OddsType

func (*MetaData) GetSelectedOddsValue added in v1.1.1

func (m *MetaData) GetSelectedOddsValue() string

func (*MetaData) Marshal added in v1.1.1

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

func (*MetaData) MarshalTo added in v1.1.1

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

func (*MetaData) MarshalToSizedBuffer added in v1.1.1

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

func (*MetaData) ProtoMessage added in v1.1.1

func (*MetaData) ProtoMessage()

func (*MetaData) Reset added in v1.1.1

func (m *MetaData) Reset()

func (*MetaData) Size added in v1.1.1

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

func (*MetaData) String added in v1.1.1

func (m *MetaData) String() string

func (*MetaData) Unmarshal added in v1.1.1

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

func (*MetaData) XXX_DiscardUnknown added in v1.1.1

func (m *MetaData) XXX_DiscardUnknown()

func (*MetaData) XXX_Marshal added in v1.1.1

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

func (*MetaData) XXX_Merge added in v1.1.1

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

func (*MetaData) XXX_Size added in v1.1.1

func (m *MetaData) XXX_Size() int

func (*MetaData) XXX_Unmarshal added in v1.1.1

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

type MsgClient

type MsgClient interface {
	// Wager defines a method to place a bet with the given data.
	Wager(ctx context.Context, in *MsgWager, opts ...grpc.CallOption) (*MsgWagerResponse, 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 MsgServer

type MsgServer interface {
	// Wager defines a method to place a bet with the given data.
	Wager(context.Context, *MsgWager) (*MsgWagerResponse, error)
}

MsgServer is the server API for Msg service.

type MsgWager added in v1.0.1

type MsgWager struct {
	// creator is the bettor address.
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// props contains bet properties.
	Props *WagerProps `protobuf:"bytes,2,opt,name=props,proto3" json:"props,omitempty"`
}

MsgWager defines a message to place a bet with the given data.

func NewMsgWager added in v1.0.1

func NewMsgWager(
	creator string,
	props WagerProps,
) *MsgWager

NewMsgWager returns a MsgWager using given data

func (*MsgWager) Descriptor added in v1.0.1

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

func (*MsgWager) EmitEvent added in v1.0.1

func (msg *MsgWager) EmitEvent(ctx *sdk.Context)

EmitEvent emits the event for the message success.

func (*MsgWager) GetCreator added in v1.0.1

func (m *MsgWager) GetCreator() string

func (*MsgWager) GetProps added in v1.0.1

func (m *MsgWager) GetProps() *WagerProps

func (*MsgWager) GetSignBytes added in v1.0.1

func (msg *MsgWager) GetSignBytes() []byte

GetSignBytes returns sortJson form of its message

func (*MsgWager) GetSigners added in v1.0.1

func (msg *MsgWager) GetSigners() []sdk.AccAddress

GetSigners returns the signers of its message

func (*MsgWager) Marshal added in v1.0.1

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

func (*MsgWager) MarshalTo added in v1.0.1

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

func (*MsgWager) MarshalToSizedBuffer added in v1.0.1

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

func (*MsgWager) ProtoMessage added in v1.0.1

func (*MsgWager) ProtoMessage()

func (*MsgWager) Reset added in v1.0.1

func (m *MsgWager) Reset()

func (*MsgWager) Route added in v1.0.1

func (*MsgWager) Route() string

Route returns the module's message router key.

func (*MsgWager) Size added in v1.0.1

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

func (*MsgWager) String added in v1.0.1

func (m *MsgWager) String() string

func (*MsgWager) Type added in v1.0.1

func (*MsgWager) Type() string

Type returns type of its message

func (*MsgWager) Unmarshal added in v1.0.1

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

func (*MsgWager) ValidateBasic added in v1.0.1

func (msg *MsgWager) ValidateBasic() error

ValidateBasic does some validate checks on its message

func (*MsgWager) XXX_DiscardUnknown added in v1.0.1

func (m *MsgWager) XXX_DiscardUnknown()

func (*MsgWager) XXX_Marshal added in v1.0.1

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

func (*MsgWager) XXX_Merge added in v1.0.1

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

func (*MsgWager) XXX_Size added in v1.0.1

func (m *MsgWager) XXX_Size() int

func (*MsgWager) XXX_Unmarshal added in v1.0.1

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

type MsgWagerResponse added in v1.0.1

type MsgWagerResponse struct {
	Props *WagerProps `protobuf:"bytes,1,opt,name=props,proto3" json:"props,omitempty"`
}

MsgWagerResponse is the returning value in the response of MsgWagerResponse request.

func (*MsgWagerResponse) Descriptor added in v1.0.1

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

func (*MsgWagerResponse) GetProps added in v1.0.1

func (m *MsgWagerResponse) GetProps() *WagerProps

func (*MsgWagerResponse) Marshal added in v1.0.1

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

func (*MsgWagerResponse) MarshalTo added in v1.0.1

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

func (*MsgWagerResponse) MarshalToSizedBuffer added in v1.0.1

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

func (*MsgWagerResponse) ProtoMessage added in v1.0.1

func (*MsgWagerResponse) ProtoMessage()

func (*MsgWagerResponse) Reset added in v1.0.1

func (m *MsgWagerResponse) Reset()

func (*MsgWagerResponse) Size added in v1.0.1

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

func (*MsgWagerResponse) String added in v1.0.1

func (m *MsgWagerResponse) String() string

func (*MsgWagerResponse) Unmarshal added in v1.0.1

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

func (*MsgWagerResponse) XXX_DiscardUnknown added in v1.0.1

func (m *MsgWagerResponse) XXX_DiscardUnknown()

func (*MsgWagerResponse) XXX_Marshal added in v1.0.1

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

func (*MsgWagerResponse) XXX_Merge added in v1.0.1

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

func (*MsgWagerResponse) XXX_Size added in v1.0.1

func (m *MsgWagerResponse) XXX_Size() int

func (*MsgWagerResponse) XXX_Unmarshal added in v1.0.1

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

type OVMKeeper added in v0.0.6

type OVMKeeper interface {
	VerifyTicketUnmarshal(goCtx context.Context, ticket string, clm interface{}) error
}

OVMKeeper defines the expected interface needed to verify ticket and unmarshal it

type OddsType added in v0.0.3

type OddsType int32

OddsType is the representation of the type of the odds.

const (
	// invalid odds type
	OddsType_ODDS_TYPE_UNSPECIFIED OddsType = 0
	// decimal odds type (european)
	OddsType_ODDS_TYPE_DECIMAL OddsType = 1
	// fractional odds type (british)
	OddsType_ODDS_TYPE_FRACTIONAL OddsType = 2
	// moneyline odds type (american)
	OddsType_ODDS_TYPE_MONEYLINE OddsType = 3
)

func (OddsType) EnumDescriptor added in v0.0.3

func (OddsType) EnumDescriptor() ([]byte, []int)

func (OddsType) String added in v0.0.3

func (x OddsType) String() string

type OrderbookKeeper added in v0.0.8

type OrderbookKeeper interface {
	ProcessWager(
		ctx sdk.Context,
		betUID, bookUID, oddsUID string,
		maxLossMultiplier sdk.Dec,
		betAmount sdkmath.Int,
		payoutProfit sdk.Dec,
		bettorAddress sdk.AccAddress,
		betFee sdkmath.Int,
		oddsVal string,
		betID uint64,
		odds map[string]*BetOddsCompact,
		oddUIDS []string,
	) ([]*BetFulfillment, error)
	RefundBettor(
		ctx sdk.Context,
		bettorAddress sdk.AccAddress,
		betAmount, betFee, payout sdkmath.Int,
		uniqueLock string,
	) error
	BettorWins(
		ctx sdk.Context,
		bettorAddress sdk.AccAddress,
		betAmount, payout sdkmath.Int,
		uniqueLock string,
		fulfillment []*BetFulfillment,
		bookUID string,
	) error
	BettorLoses(
		ctx sdk.Context,
		bettorAddress sdk.AccAddress,
		betAmount, payout sdkmath.Int,
		uniqueLock string,
		fulfillment []*BetFulfillment,
		bookUID string,
	) error
	SetOrderBookAsUnsettledResolved(ctx sdk.Context, orderBookUID string) error
	WithdrawBetFee(ctx sdk.Context, marketCreator sdk.AccAddress, betFee sdkmath.Int) error
}

OrderbookKeeper defines the expected interface needed to process bet placement

type Params

type Params struct {
	// batch_settlement_count is the batch settlement bet count.
	BatchSettlementCount uint32 `protobuf:"varint,1,opt,name=batch_settlement_count,json=batchSettlementCount,proto3" json:"batch_settlement_count,omitempty"`
	// max_bet_by_uid_query_count is the maximum bet by uid query items count.
	MaxBetByUidQueryCount uint32 `` /* 133-byte string literal not displayed */
	// constraints is the bet constraints.
	Constraints Constraints `protobuf:"bytes,3,opt,name=constraints,proto3" json:"constraints" yaml:"constraints"`
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) GetBatchSettlementCount added in v0.0.5

func (m *Params) GetBatchSettlementCount() uint32

func (*Params) GetConstraints added in v0.0.9

func (m *Params) GetConstraints() Constraints

func (*Params) GetMaxBetByUidQueryCount added in v0.0.7

func (m *Params) GetMaxBetByUidQueryCount() uint32

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs get the params.ParamSet

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

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate validates the set of params

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 PendingBet added in v0.0.6

type PendingBet struct {
	// uid is the universal unique identifier for the bet.
	UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	// creator is the bettor address.
	Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"`
}

PendingBet is the type for an unsettled bet

func NewPendingBet added in v0.0.6

func NewPendingBet(uid, creator string) *PendingBet

func (*PendingBet) Descriptor added in v0.0.6

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

func (*PendingBet) GetCreator added in v0.0.6

func (m *PendingBet) GetCreator() string

func (*PendingBet) GetUID added in v0.0.6

func (m *PendingBet) GetUID() string

func (*PendingBet) Marshal added in v0.0.6

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

func (*PendingBet) MarshalTo added in v0.0.6

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

func (*PendingBet) MarshalToSizedBuffer added in v0.0.6

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

func (*PendingBet) ProtoMessage added in v0.0.6

func (*PendingBet) ProtoMessage()

func (*PendingBet) Reset added in v0.0.6

func (m *PendingBet) Reset()

func (*PendingBet) Size added in v0.0.6

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

func (*PendingBet) String added in v0.0.6

func (m *PendingBet) String() string

func (*PendingBet) Unmarshal added in v0.0.6

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

func (*PendingBet) XXX_DiscardUnknown added in v0.0.6

func (m *PendingBet) XXX_DiscardUnknown()

func (*PendingBet) XXX_Marshal added in v0.0.6

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

func (*PendingBet) XXX_Merge added in v0.0.6

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

func (*PendingBet) XXX_Size added in v0.0.6

func (m *PendingBet) XXX_Size() int

func (*PendingBet) XXX_Unmarshal added in v0.0.6

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

type QueryBetRequest

type QueryBetRequest struct {
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	Uid     string `protobuf:"bytes,2,opt,name=uid,proto3" json:"uid"`
}

QueryBetRequest is the request type for a single bet query Query/Bet RPC method.

func (*QueryBetRequest) Descriptor

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

func (*QueryBetRequest) GetCreator added in v0.0.4

func (m *QueryBetRequest) GetCreator() string

func (*QueryBetRequest) GetUid

func (m *QueryBetRequest) GetUid() string

func (*QueryBetRequest) Marshal

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

func (*QueryBetRequest) MarshalTo

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

func (*QueryBetRequest) MarshalToSizedBuffer

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

func (*QueryBetRequest) ProtoMessage

func (*QueryBetRequest) ProtoMessage()

func (*QueryBetRequest) Reset

func (m *QueryBetRequest) Reset()

func (*QueryBetRequest) Size

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

func (*QueryBetRequest) String

func (m *QueryBetRequest) String() string

func (*QueryBetRequest) Unmarshal

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

func (*QueryBetRequest) XXX_DiscardUnknown

func (m *QueryBetRequest) XXX_DiscardUnknown()

func (*QueryBetRequest) XXX_Marshal

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

func (*QueryBetRequest) XXX_Merge

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

func (*QueryBetRequest) XXX_Size

func (m *QueryBetRequest) XXX_Size() int

func (*QueryBetRequest) XXX_Unmarshal

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

type QueryBetResponse

type QueryBetResponse struct {
	Bet    Bet          `protobuf:"bytes,1,opt,name=bet,proto3" json:"bet"`
	Market types.Market `protobuf:"bytes,2,opt,name=market,proto3" json:"market"`
}

QueryBetResponse is the response type for single bet query Query/Bet RPC method.

func (*QueryBetResponse) Descriptor

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

func (*QueryBetResponse) GetBet

func (m *QueryBetResponse) GetBet() Bet

func (*QueryBetResponse) GetMarket added in v0.0.6

func (m *QueryBetResponse) GetMarket() types.Market

func (*QueryBetResponse) Marshal

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

func (*QueryBetResponse) MarshalTo

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

func (*QueryBetResponse) MarshalToSizedBuffer

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

func (*QueryBetResponse) ProtoMessage

func (*QueryBetResponse) ProtoMessage()

func (*QueryBetResponse) Reset

func (m *QueryBetResponse) Reset()

func (*QueryBetResponse) Size

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

func (*QueryBetResponse) String

func (m *QueryBetResponse) String() string

func (*QueryBetResponse) Unmarshal

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

func (*QueryBetResponse) XXX_DiscardUnknown

func (m *QueryBetResponse) XXX_DiscardUnknown()

func (*QueryBetResponse) XXX_Marshal

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

func (*QueryBetResponse) XXX_Merge

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

func (*QueryBetResponse) XXX_Size

func (m *QueryBetResponse) XXX_Size() int

func (*QueryBetResponse) XXX_Unmarshal

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

type QueryBetsByCreatorRequest added in v0.0.4

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

QueryBetsByUIDsResponse is the request type for bets list of all bets of a bettor Query/BetsByCreator RPC method.

func (*QueryBetsByCreatorRequest) Descriptor added in v0.0.4

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

func (*QueryBetsByCreatorRequest) GetCreator added in v0.0.4

func (m *QueryBetsByCreatorRequest) GetCreator() string

func (*QueryBetsByCreatorRequest) GetPagination added in v0.0.4

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

func (*QueryBetsByCreatorRequest) Marshal added in v0.0.4

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

func (*QueryBetsByCreatorRequest) MarshalTo added in v0.0.4

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

func (*QueryBetsByCreatorRequest) MarshalToSizedBuffer added in v0.0.4

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

func (*QueryBetsByCreatorRequest) ProtoMessage added in v0.0.4

func (*QueryBetsByCreatorRequest) ProtoMessage()

func (*QueryBetsByCreatorRequest) Reset added in v0.0.4

func (m *QueryBetsByCreatorRequest) Reset()

func (*QueryBetsByCreatorRequest) Size added in v0.0.4

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

func (*QueryBetsByCreatorRequest) String added in v0.0.4

func (m *QueryBetsByCreatorRequest) String() string

func (*QueryBetsByCreatorRequest) Unmarshal added in v0.0.4

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

func (*QueryBetsByCreatorRequest) XXX_DiscardUnknown added in v0.0.4

func (m *QueryBetsByCreatorRequest) XXX_DiscardUnknown()

func (*QueryBetsByCreatorRequest) XXX_Marshal added in v0.0.4

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

func (*QueryBetsByCreatorRequest) XXX_Merge added in v0.0.4

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

func (*QueryBetsByCreatorRequest) XXX_Size added in v0.0.4

func (m *QueryBetsByCreatorRequest) XXX_Size() int

func (*QueryBetsByCreatorRequest) XXX_Unmarshal added in v0.0.4

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

type QueryBetsByCreatorResponse added in v0.0.5

type QueryBetsByCreatorResponse struct {
	Bet        []Bet               `protobuf:"bytes,1,rep,name=bet,proto3" json:"bet"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryBetsByCreatorResponse is the response type for the bets list of all bets of a bettor Query/BetsByCreator RPC method.

func (*QueryBetsByCreatorResponse) Descriptor added in v0.0.5

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

func (*QueryBetsByCreatorResponse) GetBet added in v0.0.5

func (m *QueryBetsByCreatorResponse) GetBet() []Bet

func (*QueryBetsByCreatorResponse) GetPagination added in v0.0.5

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

func (*QueryBetsByCreatorResponse) Marshal added in v0.0.5

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

func (*QueryBetsByCreatorResponse) MarshalTo added in v0.0.5

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

func (*QueryBetsByCreatorResponse) MarshalToSizedBuffer added in v0.0.5

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

func (*QueryBetsByCreatorResponse) ProtoMessage added in v0.0.5

func (*QueryBetsByCreatorResponse) ProtoMessage()

func (*QueryBetsByCreatorResponse) Reset added in v0.0.5

func (m *QueryBetsByCreatorResponse) Reset()

func (*QueryBetsByCreatorResponse) Size added in v0.0.5

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

func (*QueryBetsByCreatorResponse) String added in v0.0.5

func (m *QueryBetsByCreatorResponse) String() string

func (*QueryBetsByCreatorResponse) Unmarshal added in v0.0.5

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

func (*QueryBetsByCreatorResponse) XXX_DiscardUnknown added in v0.0.5

func (m *QueryBetsByCreatorResponse) XXX_DiscardUnknown()

func (*QueryBetsByCreatorResponse) XXX_Marshal added in v0.0.5

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

func (*QueryBetsByCreatorResponse) XXX_Merge added in v0.0.5

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

func (*QueryBetsByCreatorResponse) XXX_Size added in v0.0.5

func (m *QueryBetsByCreatorResponse) XXX_Size() int

func (*QueryBetsByCreatorResponse) XXX_Unmarshal added in v0.0.5

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

type QueryBetsByUIDsRequest added in v0.0.4

type QueryBetsByUIDsRequest struct {
	Items []string `protobuf:"bytes,1,rep,name=items,proto3" json:"items"`
}

QueryBetsByUIDsRequest is the request type for a bets list of a certain UID list input Query/BetsByUIDs RPC method.

func (*QueryBetsByUIDsRequest) Descriptor added in v0.0.4

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

func (*QueryBetsByUIDsRequest) GetItems added in v0.0.4

func (m *QueryBetsByUIDsRequest) GetItems() []string

func (*QueryBetsByUIDsRequest) Marshal added in v0.0.4

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

func (*QueryBetsByUIDsRequest) MarshalTo added in v0.0.4

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

func (*QueryBetsByUIDsRequest) MarshalToSizedBuffer added in v0.0.4

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

func (*QueryBetsByUIDsRequest) ProtoMessage added in v0.0.4

func (*QueryBetsByUIDsRequest) ProtoMessage()

func (*QueryBetsByUIDsRequest) Reset added in v0.0.4

func (m *QueryBetsByUIDsRequest) Reset()

func (*QueryBetsByUIDsRequest) Size added in v0.0.4

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

func (*QueryBetsByUIDsRequest) String added in v0.0.4

func (m *QueryBetsByUIDsRequest) String() string

func (*QueryBetsByUIDsRequest) Unmarshal added in v0.0.4

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

func (*QueryBetsByUIDsRequest) XXX_DiscardUnknown added in v0.0.4

func (m *QueryBetsByUIDsRequest) XXX_DiscardUnknown()

func (*QueryBetsByUIDsRequest) XXX_Marshal added in v0.0.4

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

func (*QueryBetsByUIDsRequest) XXX_Merge added in v0.0.4

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

func (*QueryBetsByUIDsRequest) XXX_Size added in v0.0.4

func (m *QueryBetsByUIDsRequest) XXX_Size() int

func (*QueryBetsByUIDsRequest) XXX_Unmarshal added in v0.0.4

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

type QueryBetsByUIDsResponse added in v0.0.4

type QueryBetsByUIDsResponse struct {
	Bets            []Bet    `protobuf:"bytes,1,rep,name=bets,proto3" json:"bets"`
	NotFoundBetUids []string `protobuf:"bytes,2,rep,name=not_found_bet_uids,json=notFoundBetUids,proto3" json:"not_found_bet_uids,omitempty"`
}

QueryBetsByUIDsResponse is the response type for the bets list of a certain UID list input Query/BetsByUIDs RPC method.

func (*QueryBetsByUIDsResponse) Descriptor added in v0.0.4

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

func (*QueryBetsByUIDsResponse) GetBets added in v0.0.4

func (m *QueryBetsByUIDsResponse) GetBets() []Bet

func (*QueryBetsByUIDsResponse) GetNotFoundBetUids added in v0.0.6

func (m *QueryBetsByUIDsResponse) GetNotFoundBetUids() []string

func (*QueryBetsByUIDsResponse) Marshal added in v0.0.4

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

func (*QueryBetsByUIDsResponse) MarshalTo added in v0.0.4

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

func (*QueryBetsByUIDsResponse) MarshalToSizedBuffer added in v0.0.4

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

func (*QueryBetsByUIDsResponse) ProtoMessage added in v0.0.4

func (*QueryBetsByUIDsResponse) ProtoMessage()

func (*QueryBetsByUIDsResponse) Reset added in v0.0.4

func (m *QueryBetsByUIDsResponse) Reset()

func (*QueryBetsByUIDsResponse) Size added in v0.0.4

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

func (*QueryBetsByUIDsResponse) String added in v0.0.4

func (m *QueryBetsByUIDsResponse) String() string

func (*QueryBetsByUIDsResponse) Unmarshal added in v0.0.4

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

func (*QueryBetsByUIDsResponse) XXX_DiscardUnknown added in v0.0.4

func (m *QueryBetsByUIDsResponse) XXX_DiscardUnknown()

func (*QueryBetsByUIDsResponse) XXX_Marshal added in v0.0.4

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

func (*QueryBetsByUIDsResponse) XXX_Merge added in v0.0.4

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

func (*QueryBetsByUIDsResponse) XXX_Size added in v0.0.4

func (m *QueryBetsByUIDsResponse) XXX_Size() int

func (*QueryBetsByUIDsResponse) XXX_Unmarshal added in v0.0.4

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

type QueryBetsRequest added in v0.0.3

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

QueryBetsRequest is the request type for the bets list query Query/Bets RPC method.

func (*QueryBetsRequest) Descriptor added in v0.0.3

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

func (*QueryBetsRequest) GetPagination added in v0.0.3

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

func (*QueryBetsRequest) Marshal added in v0.0.3

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

func (*QueryBetsRequest) MarshalTo added in v0.0.3

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

func (*QueryBetsRequest) MarshalToSizedBuffer added in v0.0.3

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

func (*QueryBetsRequest) ProtoMessage added in v0.0.3

func (*QueryBetsRequest) ProtoMessage()

func (*QueryBetsRequest) Reset added in v0.0.3

func (m *QueryBetsRequest) Reset()

func (*QueryBetsRequest) Size added in v0.0.3

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

func (*QueryBetsRequest) String added in v0.0.3

func (m *QueryBetsRequest) String() string

func (*QueryBetsRequest) Unmarshal added in v0.0.3

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

func (*QueryBetsRequest) XXX_DiscardUnknown added in v0.0.3

func (m *QueryBetsRequest) XXX_DiscardUnknown()

func (*QueryBetsRequest) XXX_Marshal added in v0.0.3

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

func (*QueryBetsRequest) XXX_Merge added in v0.0.3

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

func (*QueryBetsRequest) XXX_Size added in v0.0.3

func (m *QueryBetsRequest) XXX_Size() int

func (*QueryBetsRequest) XXX_Unmarshal added in v0.0.3

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

type QueryBetsResponse added in v0.0.3

type QueryBetsResponse struct {
	Bet        []Bet               `protobuf:"bytes,1,rep,name=bet,proto3" json:"bet"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryBetsResponse is the response type for the bets list query Query/Bets RPC method.

func (*QueryBetsResponse) Descriptor added in v0.0.3

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

func (*QueryBetsResponse) GetBet added in v0.0.3

func (m *QueryBetsResponse) GetBet() []Bet

func (*QueryBetsResponse) GetPagination added in v0.0.3

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

func (*QueryBetsResponse) Marshal added in v0.0.3

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

func (*QueryBetsResponse) MarshalTo added in v0.0.3

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

func (*QueryBetsResponse) MarshalToSizedBuffer added in v0.0.3

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

func (*QueryBetsResponse) ProtoMessage added in v0.0.3

func (*QueryBetsResponse) ProtoMessage()

func (*QueryBetsResponse) Reset added in v0.0.3

func (m *QueryBetsResponse) Reset()

func (*QueryBetsResponse) Size added in v0.0.3

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

func (*QueryBetsResponse) String added in v0.0.3

func (m *QueryBetsResponse) String() string

func (*QueryBetsResponse) Unmarshal added in v0.0.3

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

func (*QueryBetsResponse) XXX_DiscardUnknown added in v0.0.3

func (m *QueryBetsResponse) XXX_DiscardUnknown()

func (*QueryBetsResponse) XXX_Marshal added in v0.0.3

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

func (*QueryBetsResponse) XXX_Merge added in v0.0.3

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

func (*QueryBetsResponse) XXX_Size added in v0.0.3

func (m *QueryBetsResponse) XXX_Size() int

func (*QueryBetsResponse) XXX_Unmarshal added in v0.0.3

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

type QueryClient

type QueryClient interface {
	// Params queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Queries a Bet by uid.
	Bet(ctx context.Context, in *QueryBetRequest, opts ...grpc.CallOption) (*QueryBetResponse, error)
	// Queries list of Bet items of a certain creator sorted by timestamp.
	BetsByCreator(ctx context.Context, in *QueryBetsByCreatorRequest, opts ...grpc.CallOption) (*QueryBetsByCreatorResponse, error)
	// Queries list of Bet items.
	Bets(ctx context.Context, in *QueryBetsRequest, opts ...grpc.CallOption) (*QueryBetsResponse, error)
	// Queries list of pending Bet items.
	PendingBets(ctx context.Context, in *QueryPendingBetsRequest, opts ...grpc.CallOption) (*QueryPendingBetsResponse, error)
	// Queries list of settled Bet items of a certain height.
	SettledBetsOfHeight(ctx context.Context, in *QuerySettledBetsOfHeightRequest, opts ...grpc.CallOption) (*QuerySettledBetsOfHeightResponse, error)
	// Queries a list of Bet items filtered by uid list.
	BetsByUIDs(ctx context.Context, in *QueryBetsByUIDsRequest, opts ...grpc.CallOption) (*QueryBetsByUIDsResponse, 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 QueryParamsRequest added in v0.0.5

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method. Query/Params RPC method.

func (*QueryParamsRequest) Descriptor added in v0.0.5

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

func (*QueryParamsRequest) Marshal added in v0.0.5

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

func (*QueryParamsRequest) MarshalTo added in v0.0.5

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

func (*QueryParamsRequest) MarshalToSizedBuffer added in v0.0.5

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

func (*QueryParamsRequest) ProtoMessage added in v0.0.5

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset added in v0.0.5

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size added in v0.0.5

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

func (*QueryParamsRequest) String added in v0.0.5

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal added in v0.0.5

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

func (*QueryParamsRequest) XXX_DiscardUnknown added in v0.0.5

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal added in v0.0.5

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

func (*QueryParamsRequest) XXX_Merge added in v0.0.5

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

func (*QueryParamsRequest) XXX_Size added in v0.0.5

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal added in v0.0.5

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

type QueryParamsResponse added in v0.0.5

type QueryParamsResponse struct {
	// params holds all the parameters of this module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method. Query/Params RPC method.

func (*QueryParamsResponse) Descriptor added in v0.0.5

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

func (*QueryParamsResponse) GetParams added in v0.0.5

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal added in v0.0.5

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

func (*QueryParamsResponse) MarshalTo added in v0.0.5

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

func (*QueryParamsResponse) MarshalToSizedBuffer added in v0.0.5

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

func (*QueryParamsResponse) ProtoMessage added in v0.0.5

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset added in v0.0.5

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size added in v0.0.5

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

func (*QueryParamsResponse) String added in v0.0.5

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal added in v0.0.5

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

func (*QueryParamsResponse) XXX_DiscardUnknown added in v0.0.5

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal added in v0.0.5

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

func (*QueryParamsResponse) XXX_Merge added in v0.0.5

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

func (*QueryParamsResponse) XXX_Size added in v0.0.5

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal added in v0.0.5

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

type QueryPendingBetsRequest added in v0.0.6

type QueryPendingBetsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	MarketUid  string             `protobuf:"bytes,2,opt,name=market_uid,json=marketUid,proto3" json:"market_uid,omitempty"`
}

QueryPendingBetsRequest is the request type for the active bets list query for a market Query/ActiveBets RPC method.

func (*QueryPendingBetsRequest) Descriptor added in v0.0.6

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

func (*QueryPendingBetsRequest) GetMarketUid added in v0.0.6

func (m *QueryPendingBetsRequest) GetMarketUid() string

func (*QueryPendingBetsRequest) GetPagination added in v0.0.6

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

func (*QueryPendingBetsRequest) Marshal added in v0.0.6

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

func (*QueryPendingBetsRequest) MarshalTo added in v0.0.6

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

func (*QueryPendingBetsRequest) MarshalToSizedBuffer added in v0.0.6

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

func (*QueryPendingBetsRequest) ProtoMessage added in v0.0.6

func (*QueryPendingBetsRequest) ProtoMessage()

func (*QueryPendingBetsRequest) Reset added in v0.0.6

func (m *QueryPendingBetsRequest) Reset()

func (*QueryPendingBetsRequest) Size added in v0.0.6

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

func (*QueryPendingBetsRequest) String added in v0.0.6

func (m *QueryPendingBetsRequest) String() string

func (*QueryPendingBetsRequest) Unmarshal added in v0.0.6

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

func (*QueryPendingBetsRequest) XXX_DiscardUnknown added in v0.0.6

func (m *QueryPendingBetsRequest) XXX_DiscardUnknown()

func (*QueryPendingBetsRequest) XXX_Marshal added in v0.0.6

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

func (*QueryPendingBetsRequest) XXX_Merge added in v0.0.6

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

func (*QueryPendingBetsRequest) XXX_Size added in v0.0.6

func (m *QueryPendingBetsRequest) XXX_Size() int

func (*QueryPendingBetsRequest) XXX_Unmarshal added in v0.0.6

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

type QueryPendingBetsResponse added in v0.0.6

type QueryPendingBetsResponse struct {
	Bet        []Bet               `protobuf:"bytes,1,rep,name=bet,proto3" json:"bet"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryPendingBetsResponse is the response type for the active bets list query Query/PendingBets RPC method.

func (*QueryPendingBetsResponse) Descriptor added in v0.0.6

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

func (*QueryPendingBetsResponse) GetBet added in v0.0.6

func (m *QueryPendingBetsResponse) GetBet() []Bet

func (*QueryPendingBetsResponse) GetPagination added in v0.0.6

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

func (*QueryPendingBetsResponse) Marshal added in v0.0.6

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

func (*QueryPendingBetsResponse) MarshalTo added in v0.0.6

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

func (*QueryPendingBetsResponse) MarshalToSizedBuffer added in v0.0.6

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

func (*QueryPendingBetsResponse) ProtoMessage added in v0.0.6

func (*QueryPendingBetsResponse) ProtoMessage()

func (*QueryPendingBetsResponse) Reset added in v0.0.6

func (m *QueryPendingBetsResponse) Reset()

func (*QueryPendingBetsResponse) Size added in v0.0.6

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

func (*QueryPendingBetsResponse) String added in v0.0.6

func (m *QueryPendingBetsResponse) String() string

func (*QueryPendingBetsResponse) Unmarshal added in v0.0.6

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

func (*QueryPendingBetsResponse) XXX_DiscardUnknown added in v0.0.6

func (m *QueryPendingBetsResponse) XXX_DiscardUnknown()

func (*QueryPendingBetsResponse) XXX_Marshal added in v0.0.6

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

func (*QueryPendingBetsResponse) XXX_Merge added in v0.0.6

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

func (*QueryPendingBetsResponse) XXX_Size added in v0.0.6

func (m *QueryPendingBetsResponse) XXX_Size() int

func (*QueryPendingBetsResponse) XXX_Unmarshal added in v0.0.6

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

type QueryServer

type QueryServer interface {
	// Params queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Queries a Bet by uid.
	Bet(context.Context, *QueryBetRequest) (*QueryBetResponse, error)
	// Queries list of Bet items of a certain creator sorted by timestamp.
	BetsByCreator(context.Context, *QueryBetsByCreatorRequest) (*QueryBetsByCreatorResponse, error)
	// Queries list of Bet items.
	Bets(context.Context, *QueryBetsRequest) (*QueryBetsResponse, error)
	// Queries list of pending Bet items.
	PendingBets(context.Context, *QueryPendingBetsRequest) (*QueryPendingBetsResponse, error)
	// Queries list of settled Bet items of a certain height.
	SettledBetsOfHeight(context.Context, *QuerySettledBetsOfHeightRequest) (*QuerySettledBetsOfHeightResponse, error)
	// Queries a list of Bet items filtered by uid list.
	BetsByUIDs(context.Context, *QueryBetsByUIDsRequest) (*QueryBetsByUIDsResponse, error)
}

QueryServer is the server API for Query service.

type QuerySettledBetsOfHeightRequest added in v0.0.5

type QuerySettledBetsOfHeightRequest struct {
	Pagination  *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	BlockHeight int64              `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}

QuerySettledBetsOfHeightRequest is the request type for the settled bets of a certain height list query. Query/ActiveBets RPC method.

func (*QuerySettledBetsOfHeightRequest) Descriptor added in v0.0.5

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

func (*QuerySettledBetsOfHeightRequest) GetBlockHeight added in v0.0.5

func (m *QuerySettledBetsOfHeightRequest) GetBlockHeight() int64

func (*QuerySettledBetsOfHeightRequest) GetPagination added in v0.0.5

func (*QuerySettledBetsOfHeightRequest) Marshal added in v0.0.5

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

func (*QuerySettledBetsOfHeightRequest) MarshalTo added in v0.0.5

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

func (*QuerySettledBetsOfHeightRequest) MarshalToSizedBuffer added in v0.0.5

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

func (*QuerySettledBetsOfHeightRequest) ProtoMessage added in v0.0.5

func (*QuerySettledBetsOfHeightRequest) ProtoMessage()

func (*QuerySettledBetsOfHeightRequest) Reset added in v0.0.5

func (*QuerySettledBetsOfHeightRequest) Size added in v0.0.5

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

func (*QuerySettledBetsOfHeightRequest) String added in v0.0.5

func (*QuerySettledBetsOfHeightRequest) Unmarshal added in v0.0.5

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

func (*QuerySettledBetsOfHeightRequest) XXX_DiscardUnknown added in v0.0.5

func (m *QuerySettledBetsOfHeightRequest) XXX_DiscardUnknown()

func (*QuerySettledBetsOfHeightRequest) XXX_Marshal added in v0.0.5

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

func (*QuerySettledBetsOfHeightRequest) XXX_Merge added in v0.0.5

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

func (*QuerySettledBetsOfHeightRequest) XXX_Size added in v0.0.5

func (m *QuerySettledBetsOfHeightRequest) XXX_Size() int

func (*QuerySettledBetsOfHeightRequest) XXX_Unmarshal added in v0.0.5

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

type QuerySettledBetsOfHeightResponse added in v0.0.5

type QuerySettledBetsOfHeightResponse struct {
	Bet        []Bet               `protobuf:"bytes,1,rep,name=bet,proto3" json:"bet"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QuerySettledBetsOfHeightResponse is the response type for the settled bets of a certain height list query Query/ActiveBets RPC method.

func (*QuerySettledBetsOfHeightResponse) Descriptor added in v0.0.5

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

func (*QuerySettledBetsOfHeightResponse) GetBet added in v0.0.5

func (m *QuerySettledBetsOfHeightResponse) GetBet() []Bet

func (*QuerySettledBetsOfHeightResponse) GetPagination added in v0.0.5

func (*QuerySettledBetsOfHeightResponse) Marshal added in v0.0.5

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

func (*QuerySettledBetsOfHeightResponse) MarshalTo added in v0.0.5

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

func (*QuerySettledBetsOfHeightResponse) MarshalToSizedBuffer added in v0.0.5

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

func (*QuerySettledBetsOfHeightResponse) ProtoMessage added in v0.0.5

func (*QuerySettledBetsOfHeightResponse) ProtoMessage()

func (*QuerySettledBetsOfHeightResponse) Reset added in v0.0.5

func (*QuerySettledBetsOfHeightResponse) Size added in v0.0.5

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

func (*QuerySettledBetsOfHeightResponse) String added in v0.0.5

func (*QuerySettledBetsOfHeightResponse) Unmarshal added in v0.0.5

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

func (*QuerySettledBetsOfHeightResponse) XXX_DiscardUnknown added in v0.0.5

func (m *QuerySettledBetsOfHeightResponse) XXX_DiscardUnknown()

func (*QuerySettledBetsOfHeightResponse) XXX_Marshal added in v0.0.5

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

func (*QuerySettledBetsOfHeightResponse) XXX_Merge added in v0.0.5

func (*QuerySettledBetsOfHeightResponse) XXX_Size added in v0.0.5

func (m *QuerySettledBetsOfHeightResponse) XXX_Size() int

func (*QuerySettledBetsOfHeightResponse) XXX_Unmarshal added in v0.0.5

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

type SettledBet added in v0.0.5

type SettledBet struct {
	// uid is the universal unique identifier for the bet.
	UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	// bettor_address is the bech32 address of the bettor account.
	BettorAddress string `protobuf:"bytes,2,opt,name=bettor_address,json=bettorAddress,proto3" json:"bettor_address,omitempty"`
}

SettledBet is the type for a settled bet.

func NewSettledBet added in v0.0.5

func NewSettledBet(uid, bettorAddress string) *SettledBet

func (*SettledBet) Descriptor added in v0.0.5

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

func (*SettledBet) GetBettorAddress added in v0.0.5

func (m *SettledBet) GetBettorAddress() string

func (*SettledBet) GetUID added in v0.0.5

func (m *SettledBet) GetUID() string

func (*SettledBet) Marshal added in v0.0.5

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

func (*SettledBet) MarshalTo added in v0.0.5

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

func (*SettledBet) MarshalToSizedBuffer added in v0.0.5

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

func (*SettledBet) ProtoMessage added in v0.0.5

func (*SettledBet) ProtoMessage()

func (*SettledBet) Reset added in v0.0.5

func (m *SettledBet) Reset()

func (*SettledBet) Size added in v0.0.5

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

func (*SettledBet) String added in v0.0.5

func (m *SettledBet) String() string

func (*SettledBet) Unmarshal added in v0.0.5

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

func (*SettledBet) XXX_DiscardUnknown added in v0.0.5

func (m *SettledBet) XXX_DiscardUnknown()

func (*SettledBet) XXX_Marshal added in v0.0.5

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

func (*SettledBet) XXX_Merge added in v0.0.5

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

func (*SettledBet) XXX_Size added in v0.0.5

func (m *SettledBet) XXX_Size() int

func (*SettledBet) XXX_Unmarshal added in v0.0.5

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

type UID2ID added in v0.0.4

type UID2ID struct {
	// uid is the universal unique identifier assigned to the bet.
	UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	// id is an autogenerated sequential id for a bet.
	ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id"`
}

UID2ID is the type for mapping UIDs and Sequential IDs of bets.

func (*UID2ID) Descriptor added in v0.0.4

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

func (*UID2ID) GetID added in v0.0.4

func (m *UID2ID) GetID() uint64

func (*UID2ID) GetUID added in v0.0.4

func (m *UID2ID) GetUID() string

func (*UID2ID) Marshal added in v0.0.4

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

func (*UID2ID) MarshalTo added in v0.0.4

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

func (*UID2ID) MarshalToSizedBuffer added in v0.0.4

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

func (*UID2ID) ProtoMessage added in v0.0.4

func (*UID2ID) ProtoMessage()

func (*UID2ID) Reset added in v0.0.4

func (m *UID2ID) Reset()

func (*UID2ID) Size added in v0.0.4

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

func (*UID2ID) String added in v0.0.4

func (m *UID2ID) String() string

func (*UID2ID) Unmarshal added in v0.0.4

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

func (*UID2ID) XXX_DiscardUnknown added in v0.0.4

func (m *UID2ID) XXX_DiscardUnknown()

func (*UID2ID) XXX_Marshal added in v0.0.4

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

func (*UID2ID) XXX_Merge added in v0.0.4

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

func (*UID2ID) XXX_Size added in v0.0.4

func (m *UID2ID) XXX_Size() int

func (*UID2ID) XXX_Unmarshal added in v0.0.4

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Wager added in v1.0.1

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Bet

func (*UnimplementedQueryServer) Bets added in v0.0.3

func (*UnimplementedQueryServer) BetsByCreator added in v0.0.4

func (*UnimplementedQueryServer) BetsByUIDs added in v0.0.4

func (*UnimplementedQueryServer) Params added in v0.0.5

func (*UnimplementedQueryServer) PendingBets added in v0.0.6

func (*UnimplementedQueryServer) SettledBetsOfHeight added in v0.0.5

type WagerProps added in v1.0.1

type WagerProps struct {
	// uid is the universal unique identifier assigned to bet.
	UID string `protobuf:"bytes,1,opt,name=uid,proto3" json:"uid"`
	// amount is the wager amount.
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
	// ticket is a signed string containing important info such as `oddsValue`.
	Ticket string `protobuf:"bytes,3,opt,name=ticket,proto3" json:"ticket,omitempty"`
}

WagerProps contains attributes which come in wager tx request.

func (*WagerProps) Descriptor added in v1.0.1

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

func (*WagerProps) GetTicket added in v1.0.1

func (m *WagerProps) GetTicket() string

func (*WagerProps) GetUID added in v1.0.1

func (m *WagerProps) GetUID() string

func (*WagerProps) Marshal added in v1.0.1

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

func (*WagerProps) MarshalTo added in v1.0.1

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

func (*WagerProps) MarshalToSizedBuffer added in v1.0.1

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

func (*WagerProps) ProtoMessage added in v1.0.1

func (*WagerProps) ProtoMessage()

func (*WagerProps) Reset added in v1.0.1

func (m *WagerProps) Reset()

func (*WagerProps) Size added in v1.0.1

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

func (*WagerProps) String added in v1.0.1

func (m *WagerProps) String() string

func (*WagerProps) Unmarshal added in v1.0.1

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

func (*WagerProps) XXX_DiscardUnknown added in v1.0.1

func (m *WagerProps) XXX_DiscardUnknown()

func (*WagerProps) XXX_Marshal added in v1.0.1

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

func (*WagerProps) XXX_Merge added in v1.0.1

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

func (*WagerProps) XXX_Size added in v1.0.1

func (m *WagerProps) XXX_Size() int

func (*WagerProps) XXX_Unmarshal added in v1.0.1

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

type WagerTicketPayload added in v1.0.1

type WagerTicketPayload struct {
	// selected_odds is the user-selected odds to place bet.
	SelectedOdds *BetOdds `protobuf:"bytes,1,opt,name=selected_odds,json=selectedOdds,proto3" json:"selected_odds,omitempty"`
	// kyc_data contains the details of user kyc.
	KycData types.KycDataPayload `protobuf:"bytes,2,opt,name=kyc_data,json=kycData,proto3" json:"kyc_data"`
	// all odds for the selected market.
	AllOdds []*BetOddsCompact `protobuf:"bytes,4,rep,name=all_odds,json=allOdds,proto3" json:"all_odds,omitempty"`
	// meta is metadata for bet placement
	Meta MetaData `protobuf:"bytes,5,opt,name=meta,proto3" json:"meta"`
	// context contains the data from services and just for processing purpose.
	Context string `protobuf:"bytes,6,opt,name=context,proto3" json:"context,omitempty"`
}

WagerTicketPayload indicates data of bet placement ticket.

func (*WagerTicketPayload) Descriptor added in v1.0.1

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

func (*WagerTicketPayload) GetAllOdds added in v1.1.1

func (m *WagerTicketPayload) GetAllOdds() []*BetOddsCompact

func (*WagerTicketPayload) GetContext added in v1.1.1

func (m *WagerTicketPayload) GetContext() string

func (*WagerTicketPayload) GetKycData added in v1.0.1

func (m *WagerTicketPayload) GetKycData() types.KycDataPayload

func (*WagerTicketPayload) GetMeta added in v1.1.1

func (m *WagerTicketPayload) GetMeta() MetaData

func (*WagerTicketPayload) GetSelectedOdds added in v1.0.1

func (m *WagerTicketPayload) GetSelectedOdds() *BetOdds

func (*WagerTicketPayload) Marshal added in v1.0.1

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

func (*WagerTicketPayload) MarshalTo added in v1.0.1

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

func (*WagerTicketPayload) MarshalToSizedBuffer added in v1.0.1

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

func (*WagerTicketPayload) OddsMap added in v1.1.1

func (payload *WagerTicketPayload) OddsMap() map[string]*BetOddsCompact

func (*WagerTicketPayload) ProtoMessage added in v1.0.1

func (*WagerTicketPayload) ProtoMessage()

func (*WagerTicketPayload) Reset added in v1.0.1

func (m *WagerTicketPayload) Reset()

func (*WagerTicketPayload) Size added in v1.0.1

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

func (*WagerTicketPayload) String added in v1.0.1

func (m *WagerTicketPayload) String() string

func (*WagerTicketPayload) Unmarshal added in v1.0.1

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

func (*WagerTicketPayload) Validate added in v1.0.1

func (payload *WagerTicketPayload) Validate(creator string) error

Validate validates fields of the given ticketData

func (*WagerTicketPayload) ValidateCompactOdds added in v1.1.1

func (payload *WagerTicketPayload) ValidateCompactOdds(odds BetOddsCompact) error

func (*WagerTicketPayload) ValidateOdds added in v1.1.1

func (payload *WagerTicketPayload) ValidateOdds() error

func (*WagerTicketPayload) XXX_DiscardUnknown added in v1.0.1

func (m *WagerTicketPayload) XXX_DiscardUnknown()

func (*WagerTicketPayload) XXX_Marshal added in v1.0.1

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

func (*WagerTicketPayload) XXX_Merge added in v1.0.1

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

func (*WagerTicketPayload) XXX_Size added in v1.0.1

func (m *WagerTicketPayload) XXX_Size() int

func (*WagerTicketPayload) XXX_Unmarshal added in v1.0.1

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

Jump to

Keyboard shortcuts

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