types

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 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 (
	// ModuleName defines the module name
	ModuleName = "subaccount"

	// 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
)

module constants

Variables

View Source
var (
	ErrInvalidLengthBalance        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBalance          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBalance = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInTicketVerification      = sdkerrors.Register(ModuleName, 8001, "error in ticket verification process")
	ErrInTicketPayloadValidation = sdkerrors.Register(ModuleName, 8002, "error in ticket payload validation")
	ErrUnlockTokenTimeExpired    = sdkerrors.Register(ModuleName, 8003, "unlock time is expired")
	ErrSubaccountAlreadyExist    = sdkerrors.Register(ModuleName, 8004, "account has already sub account")
	ErrSubaccountDoesNotExist    = sdkerrors.Register(ModuleName, 8005, "sub account does not exist")
	ErrNothingToWithdraw         = sdkerrors.Register(ModuleName, 8006, "nothing to withdraw")
	ErrInvalidLockedBalance      = sdkerrors.Register(ModuleName, 8007, "invalid locked balance")
	ErrSendCoinError             = sdkerrors.Register(ModuleName, 8008, "send coin error")
	ErrWithdrawLocked            = sdkerrors.Register(ModuleName, 8009, "withdrawal of locked coins failed")
	ErrLockedBalanceExists       = sdkerrors.Register(ModuleName, 8010, "locked balance for the expire time exists")
)
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 (
	// SubaccountIDPrefix is the key used to store the subaccount ID in the keeper KVStore
	SubaccountIDPrefix = []byte{0x00}

	// SubaccountOwnerPrefix is the key used to store the subaccount owner in the keeper KVStore
	SubaccountOwnerPrefix = []byte{0x01}

	// SubaccountOwnerReversePrefix is the key used to store the subaccount owner by ID in the keeper KVStore
	SubaccountOwnerReversePrefix = []byte{0x02}

	// LockedBalancePrefix is the key used to store the locked balance in the keeper KVStore
	LockedBalancePrefix = []byte{0x03}

	// AccountSummaryPrefix saves the balance of an account.
	AccountSummaryPrefix = []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 (
	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 LockedBalanceStatus_name = map[int32]string{
	0: "LOCKED_BALANCE_STATUS_UNSPECIFIED",
	1: "LOCKED_BALANCE_STATUS_LOCKED",
	2: "LOCKED_BALANCE_STATUS_UNLOCKED",
}
View Source
var LockedBalanceStatus_value = map[string]int32{
	"LOCKED_BALANCE_STATUS_UNSPECIFIED": 0,
	"LOCKED_BALANCE_STATUS_LOCKED":      1,
	"LOCKED_BALANCE_STATUS_UNLOCKED":    2,
}
View Source
var (

	// ModuleCdc is the codec of the module
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func AccountSummaryKey

func AccountSummaryKey(address sdk.AccAddress) []byte

func LockedBalanceKey

func LockedBalanceKey(subAccountAddress sdk.AccAddress, unlockTime uint64) []byte

func LockedBalancePrefixKey

func LockedBalancePrefixKey(subAccountAddress sdk.AccAddress) []byte

func NewAddressFromSubaccount

func NewAddressFromSubaccount(subaccountID uint64) sdk.AccAddress

NewAddressFromSubaccount returns an account address for a subaccount

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable for house module

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the module interface types

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers module codec to the app codec

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 SubaccountKey added in v1.5.3

func SubaccountKey(subAccountAddress sdk.AccAddress) []byte

func SubaccountOwnerKey added in v1.5.3

func SubaccountOwnerKey(address sdk.AccAddress) []byte

Types

type AccountKeeper

type AccountKeeper interface {
	NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI
	SetAccount(ctx sdk.Context, acc authtypes.AccountI)
}

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

type AccountSummary

type AccountSummary struct {
	// deposited_amount keeps track of how much was deposited so far in the
	// subaccount.
	DepositedAmount cosmossdk_io_math.Int `` /* 129-byte string literal not displayed */
	// spent_amount keeps track of how much was spent in the account in betting,
	// house, staking, etc.
	SpentAmount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=spent_amount,json=spentAmount,proto3,customtype=cosmossdk.io/math.Int" json:"spent_amount"`
	// withdrawn_amount keeps track of how much was withdrawn in the account after
	// locked coins become unlocked.
	WithdrawnAmount cosmossdk_io_math.Int `` /* 129-byte string literal not displayed */
	// lost_amount keeps track of the amounts that were lost due to betting
	// losses, slashing etc.
	LostAmount cosmossdk_io_math.Int `protobuf:"bytes,4,opt,name=lost_amount,json=lostAmount,proto3,customtype=cosmossdk.io/math.Int" json:"lost_amount"`
}

AccountSummary defines the balance of a subaccount.

func (*AccountSummary) AddLoss

func (as *AccountSummary) AddLoss(amt sdkmath.Int) error

AddLoss adds to the lost amout of subaccount balance after losing the bet.

func (*AccountSummary) Available

func (as *AccountSummary) Available() sdkmath.Int

Available reports the coins that are available in the subaccount.

func (*AccountSummary) Descriptor

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

func (*AccountSummary) Marshal

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

func (*AccountSummary) MarshalTo

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

func (*AccountSummary) MarshalToSizedBuffer

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

func (*AccountSummary) ProtoMessage

func (*AccountSummary) ProtoMessage()

func (*AccountSummary) Reset

func (m *AccountSummary) Reset()

func (*AccountSummary) Size

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

func (*AccountSummary) Spend

func (as *AccountSummary) Spend(amt sdkmath.Int) error

Spend modifies the spent amount of subaccount balance according to the spent value.

func (*AccountSummary) String

func (m *AccountSummary) String() string

func (*AccountSummary) Unmarshal

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

func (*AccountSummary) Unspend

func (as *AccountSummary) Unspend(amt sdkmath.Int) error

Unspend modifies the spent amount of subaccount balance according to the undpent value.

func (*AccountSummary) Withdraw

func (as *AccountSummary) Withdraw(amt sdkmath.Int) error

Withdraw sends deposited amount to withdrawn

func (*AccountSummary) WithdrawableBalance

func (as *AccountSummary) WithdrawableBalance(bankBalance sdkmath.Int) sdkmath.Int

WithdrawableBalance returns total (unlocked and locked) withdrawable balance of a subaccount

func (*AccountSummary) WithdrawableUnlockedBalance added in v1.5.3

func (as *AccountSummary) WithdrawableUnlockedBalance(unlockedBalance, bankBalance sdkmath.Int) sdkmath.Int

WithdrawableUnlockedBalance returns withdrawable unlocked balance of a subaccount

func (*AccountSummary) XXX_DiscardUnknown

func (m *AccountSummary) XXX_DiscardUnknown()

func (*AccountSummary) XXX_Marshal

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

func (*AccountSummary) XXX_Merge

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

func (*AccountSummary) XXX_Size

func (m *AccountSummary) XXX_Size() int

func (*AccountSummary) XXX_Unmarshal

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

type BankKeeper

type BankKeeper interface {
	SendCoins(ctx sdk.Context, fromAddr, toAddr sdk.AccAddress, amt sdk.Coins) error
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
}

BankKeeper defines the expected interface needed to retrieve account balances.

type BetKeeper

type BetKeeper interface {
	PrepareBetObject(ctx sdk.Context, creator string, props *bettypes.WagerProps) (*bettypes.Bet, map[string]*bettypes.BetOddsCompact, error)
	Wager(ctx sdk.Context, bet *bettypes.Bet, betOdds map[string]*bettypes.BetOddsCompact) error
}

BetKeeper defines the expected interface needed to retrieve or set bets.

type GenesisState

type GenesisState struct {
	// params contains the subaccount parameters.
	Params       Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	SubaccountId uint64 `protobuf:"varint,2,opt,name=subaccount_id,json=subaccountId,proto3" json:"subaccount_id,omitempty"`
	// subaccounts contains all the subaccounts.
	Subaccounts []GenesisSubaccount `protobuf:"bytes,3,rep,name=subaccounts,proto3" json:"subaccounts"`
}

GenesisState defines the subaccount 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) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetSubaccountId

func (m *GenesisState) GetSubaccountId() uint64

func (*GenesisState) GetSubaccounts

func (m *GenesisState) GetSubaccounts() []GenesisSubaccount

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 (*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 GenesisSubaccount

type GenesisSubaccount struct {
	// address is the address of the subaccount.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// owner is the owner of the subaccount.
	Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	// balance defines the balance status of a subaccount
	Balance AccountSummary `protobuf:"bytes,3,opt,name=balance,proto3" json:"balance"`
	// locked_balances defines the lockup of balances history of a subaccount
	LockedBalances []LockedBalance `protobuf:"bytes,4,rep,name=locked_balances,json=lockedBalances,proto3" json:"locked_balances"`
}

GenesisSubaccount defines the genesis subaccount containing owner, address and balance information.

func (*GenesisSubaccount) Descriptor

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

func (*GenesisSubaccount) GetAddress

func (m *GenesisSubaccount) GetAddress() string

func (*GenesisSubaccount) GetBalance

func (m *GenesisSubaccount) GetBalance() AccountSummary

func (*GenesisSubaccount) GetLockedBalances

func (m *GenesisSubaccount) GetLockedBalances() []LockedBalance

func (*GenesisSubaccount) GetOwner

func (m *GenesisSubaccount) GetOwner() string

func (*GenesisSubaccount) Marshal

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

func (*GenesisSubaccount) MarshalTo

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

func (*GenesisSubaccount) MarshalToSizedBuffer

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

func (*GenesisSubaccount) ProtoMessage

func (*GenesisSubaccount) ProtoMessage()

func (*GenesisSubaccount) Reset

func (m *GenesisSubaccount) Reset()

func (*GenesisSubaccount) Size

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

func (*GenesisSubaccount) String

func (m *GenesisSubaccount) String() string

func (*GenesisSubaccount) Unmarshal

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

func (*GenesisSubaccount) XXX_DiscardUnknown

func (m *GenesisSubaccount) XXX_DiscardUnknown()

func (*GenesisSubaccount) XXX_Marshal

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

func (*GenesisSubaccount) XXX_Merge

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

func (*GenesisSubaccount) XXX_Size

func (m *GenesisSubaccount) XXX_Size() int

func (*GenesisSubaccount) XXX_Unmarshal

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

type HouseKeeper

type HouseKeeper interface {
	GetParams(ctx sdk.Context) housetypes.Params
	ParseDepositTicketAndValidate(goCtx context.Context, ctx sdk.Context, msg *housetypes.MsgDeposit, authzAllowed bool) (string, error)
	Deposit(ctx sdk.Context, creator, depositor string, marketUID string, amount sdkmath.Int) (participationIndex uint64, feeAmount sdkmath.Int, err error)
	ParseWithdrawTicketAndValidate(goCtx context.Context, msg *housetypes.MsgWithdraw, authzAllowed bool) (string, bool, error)
	CalcAndWithdraw(ctx sdk.Context, msg *housetypes.MsgWithdraw, depositorAddr string, isOnBehalf bool) (uint64, error)
}

HouseKeeper defines the expected interface needed to deposit or withdraw.

type LockedBalance

type LockedBalance struct {
	UnlockTS uint64                `protobuf:"varint,1,opt,name=unlock_ts,proto3" json:"unlock_ts"`
	Amount   cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
}

LockedBalance defines a balance which is locked.

func (*LockedBalance) Descriptor

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

func (*LockedBalance) GetUnlockTS

func (m *LockedBalance) GetUnlockTS() uint64

func (*LockedBalance) Marshal

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

func (*LockedBalance) MarshalTo

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

func (*LockedBalance) MarshalToSizedBuffer

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

func (*LockedBalance) ProtoMessage

func (*LockedBalance) ProtoMessage()

func (*LockedBalance) Reset

func (m *LockedBalance) Reset()

func (*LockedBalance) Size

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

func (*LockedBalance) String

func (m *LockedBalance) String() string

func (*LockedBalance) Unmarshal

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

func (*LockedBalance) Validate

func (lb *LockedBalance) Validate() error

Validate performs a basic validation of the LockedBalance fields.

func (*LockedBalance) XXX_DiscardUnknown

func (m *LockedBalance) XXX_DiscardUnknown()

func (*LockedBalance) XXX_Marshal

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

func (*LockedBalance) XXX_Merge

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

func (*LockedBalance) XXX_Size

func (m *LockedBalance) XXX_Size() int

func (*LockedBalance) XXX_Unmarshal

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

type LockedBalanceStatus added in v1.5.3

type LockedBalanceStatus int32

LockedBalanceStatus type.

const (
	// the invalid or unknown
	LockedBalanceStatus_LOCKED_BALANCE_STATUS_UNSPECIFIED LockedBalanceStatus = 0
	// locked
	LockedBalanceStatus_LOCKED_BALANCE_STATUS_LOCKED LockedBalanceStatus = 1
	// unlocked
	LockedBalanceStatus_LOCKED_BALANCE_STATUS_UNLOCKED LockedBalanceStatus = 2
)

func (LockedBalanceStatus) EnumDescriptor added in v1.5.3

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

func (LockedBalanceStatus) String added in v1.5.3

func (x LockedBalanceStatus) String() string

type MsgClient

type MsgClient interface {
	// Create defines a method for creating a subaccount.
	Create(ctx context.Context, in *MsgCreate, opts ...grpc.CallOption) (*MsgCreateResponse, error)
	// TopUp defines a method for topping up a subaccount.
	TopUp(ctx context.Context, in *MsgTopUp, opts ...grpc.CallOption) (*MsgTopUpResponse, error)
	// WithdrawUnlockedBalances defines a method for withdrawing unlocked
	// balances.
	WithdrawUnlockedBalances(ctx context.Context, in *MsgWithdrawUnlockedBalances, opts ...grpc.CallOption) (*MsgWithdrawUnlockedBalancesResponse, error)
	// PlaceBet defines a method for placing a bet using a subaccount.
	Wager(ctx context.Context, in *MsgWager, opts ...grpc.CallOption) (*MsgWagerResponse, error)
	// HouseDeposit defines a method for depositing funds to provide liquidity to
	// a market.
	HouseDeposit(ctx context.Context, in *MsgHouseDeposit, opts ...grpc.CallOption) (*MsgHouseDepositResponse, error)
	// HouseWithdraw defines a method for withdrawing funds from a market.
	HouseWithdraw(ctx context.Context, in *MsgHouseWithdraw, opts ...grpc.CallOption) (*MsgHouseWithdrawResponse, 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 MsgCreate

type MsgCreate struct {
	// creator is the msg signer.
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// owner is the owner of the subaccount.
	Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
	// locked_balances is the list of balance locks.
	// Fixme: why this attribute needs to be repeated?
	LockedBalances []LockedBalance `protobuf:"bytes,3,rep,name=locked_balances,json=lockedBalances,proto3" json:"locked_balances"`
}

MsgCreate defines the Msg/Create request type.

func (*MsgCreate) Descriptor

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

func (*MsgCreate) EmitEvent

func (msg *MsgCreate) EmitEvent(ctx *sdk.Context, subAccAddr string)

EmitEvent emits the event for the message success.

func (*MsgCreate) GetCreator

func (m *MsgCreate) GetCreator() string

func (*MsgCreate) GetLockedBalances

func (m *MsgCreate) GetLockedBalances() []LockedBalance

func (*MsgCreate) GetOwner

func (m *MsgCreate) GetOwner() string

func (*MsgCreate) GetSignBytes

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

GetSignBytes returns sortJson form of its message

func (*MsgCreate) GetSigners

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

func (*MsgCreate) Marshal

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

func (*MsgCreate) MarshalTo

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

func (*MsgCreate) MarshalToSizedBuffer

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

func (*MsgCreate) ProtoMessage

func (*MsgCreate) ProtoMessage()

func (*MsgCreate) Reset

func (m *MsgCreate) Reset()

func (*MsgCreate) Route

func (*MsgCreate) Route() string

Route returns the module's message router key.

func (*MsgCreate) Size

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

func (*MsgCreate) String

func (m *MsgCreate) String() string

func (*MsgCreate) Type

func (*MsgCreate) Type() string

Type returns type of its message

func (*MsgCreate) Unmarshal

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

func (*MsgCreate) ValidateBasic

func (msg *MsgCreate) ValidateBasic() error

ValidateBasic performs a basic validation of the MsgCreate fields.

func (*MsgCreate) XXX_DiscardUnknown

func (m *MsgCreate) XXX_DiscardUnknown()

func (*MsgCreate) XXX_Marshal

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

func (*MsgCreate) XXX_Merge

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

func (*MsgCreate) XXX_Size

func (m *MsgCreate) XXX_Size() int

func (*MsgCreate) XXX_Unmarshal

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

type MsgCreateResponse

type MsgCreateResponse struct {
}

MsgCreateAccountResponse defines the Msg/CreateAccount response type.

func (*MsgCreateResponse) Descriptor

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

func (*MsgCreateResponse) Marshal

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

func (*MsgCreateResponse) MarshalTo

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

func (*MsgCreateResponse) MarshalToSizedBuffer

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

func (*MsgCreateResponse) ProtoMessage

func (*MsgCreateResponse) ProtoMessage()

func (*MsgCreateResponse) Reset

func (m *MsgCreateResponse) Reset()

func (*MsgCreateResponse) Size

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

func (*MsgCreateResponse) String

func (m *MsgCreateResponse) String() string

func (*MsgCreateResponse) Unmarshal

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

func (*MsgCreateResponse) XXX_DiscardUnknown

func (m *MsgCreateResponse) XXX_DiscardUnknown()

func (*MsgCreateResponse) XXX_Marshal

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

func (*MsgCreateResponse) XXX_Merge

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

func (*MsgCreateResponse) XXX_Size

func (m *MsgCreateResponse) XXX_Size() int

func (*MsgCreateResponse) XXX_Unmarshal

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

type MsgHouseDeposit

type MsgHouseDeposit struct {
	Msg *types1.MsgDeposit `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
}

MsgHouseDeposit wraps the MsgHouseDeposit message. We need it in order not to have double interface registration conflicts.

func (*MsgHouseDeposit) Descriptor

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

func (*MsgHouseDeposit) EmitEvent

func (msg *MsgHouseDeposit) EmitEvent(ctx *sdk.Context, subAccAddr string, participationIndex uint64, feeAmount sdkmath.Int)

EmitEvent emits the event for the message success.

func (*MsgHouseDeposit) GetMsg

func (m *MsgHouseDeposit) GetMsg() *types1.MsgDeposit

func (*MsgHouseDeposit) GetSignBytes

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

GetSignBytes returns sortJson form of its message

func (*MsgHouseDeposit) GetSigners

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

func (*MsgHouseDeposit) Marshal

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

func (*MsgHouseDeposit) MarshalTo

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

func (*MsgHouseDeposit) MarshalToSizedBuffer

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

func (*MsgHouseDeposit) ProtoMessage

func (*MsgHouseDeposit) ProtoMessage()

func (*MsgHouseDeposit) Reset

func (m *MsgHouseDeposit) Reset()

func (*MsgHouseDeposit) Route

func (*MsgHouseDeposit) Route() string

Route returns the module's message router key.

func (*MsgHouseDeposit) Size

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

func (*MsgHouseDeposit) String

func (m *MsgHouseDeposit) String() string

func (*MsgHouseDeposit) Type

func (*MsgHouseDeposit) Type() string

Type returns type of its message

func (*MsgHouseDeposit) Unmarshal

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

func (*MsgHouseDeposit) ValidateBasic

func (msg *MsgHouseDeposit) ValidateBasic() error

func (*MsgHouseDeposit) XXX_DiscardUnknown

func (m *MsgHouseDeposit) XXX_DiscardUnknown()

func (*MsgHouseDeposit) XXX_Marshal

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

func (*MsgHouseDeposit) XXX_Merge

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

func (*MsgHouseDeposit) XXX_Size

func (m *MsgHouseDeposit) XXX_Size() int

func (*MsgHouseDeposit) XXX_Unmarshal

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

type MsgHouseDepositResponse

type MsgHouseDepositResponse struct {
	Response *types1.MsgDepositResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
}

MsgHouseDepositResponse wraps the MsgHouseDepositResponse message. We need it in order not to have double interface registration conflicts.

func (*MsgHouseDepositResponse) Descriptor

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

func (*MsgHouseDepositResponse) GetResponse

func (*MsgHouseDepositResponse) Marshal

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

func (*MsgHouseDepositResponse) MarshalTo

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

func (*MsgHouseDepositResponse) MarshalToSizedBuffer

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

func (*MsgHouseDepositResponse) ProtoMessage

func (*MsgHouseDepositResponse) ProtoMessage()

func (*MsgHouseDepositResponse) Reset

func (m *MsgHouseDepositResponse) Reset()

func (*MsgHouseDepositResponse) Size

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

func (*MsgHouseDepositResponse) String

func (m *MsgHouseDepositResponse) String() string

func (*MsgHouseDepositResponse) Unmarshal

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

func (*MsgHouseDepositResponse) XXX_DiscardUnknown

func (m *MsgHouseDepositResponse) XXX_DiscardUnknown()

func (*MsgHouseDepositResponse) XXX_Marshal

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

func (*MsgHouseDepositResponse) XXX_Merge

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

func (*MsgHouseDepositResponse) XXX_Size

func (m *MsgHouseDepositResponse) XXX_Size() int

func (*MsgHouseDepositResponse) XXX_Unmarshal

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

type MsgHouseWithdraw

type MsgHouseWithdraw struct {
	Msg *types1.MsgWithdraw `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
}

MsgHouseWithdraw wraps the MsgHouseWithdraw message. We need it in order not to have double interface registration conflicts.

func (*MsgHouseWithdraw) Descriptor

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

func (*MsgHouseWithdraw) EmitEvent

func (msg *MsgHouseWithdraw) EmitEvent(ctx *sdk.Context, subAccAddr string, withdrawalID uint64)

EmitEvent emits the event for the message success.

func (*MsgHouseWithdraw) GetMsg

func (m *MsgHouseWithdraw) GetMsg() *types1.MsgWithdraw

func (*MsgHouseWithdraw) GetSignBytes

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

GetSignBytes returns sortJson form of its message

func (*MsgHouseWithdraw) GetSigners

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

func (*MsgHouseWithdraw) Marshal

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

func (*MsgHouseWithdraw) MarshalTo

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

func (*MsgHouseWithdraw) MarshalToSizedBuffer

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

func (*MsgHouseWithdraw) ProtoMessage

func (*MsgHouseWithdraw) ProtoMessage()

func (*MsgHouseWithdraw) Reset

func (m *MsgHouseWithdraw) Reset()

func (*MsgHouseWithdraw) Route

func (*MsgHouseWithdraw) Route() string

Route returns the module's message router key.

func (*MsgHouseWithdraw) Size

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

func (*MsgHouseWithdraw) String

func (m *MsgHouseWithdraw) String() string

func (*MsgHouseWithdraw) Type

func (*MsgHouseWithdraw) Type() string

Type returns type of its message

func (*MsgHouseWithdraw) Unmarshal

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

func (*MsgHouseWithdraw) ValidateBasic

func (msg *MsgHouseWithdraw) ValidateBasic() error

func (*MsgHouseWithdraw) XXX_DiscardUnknown

func (m *MsgHouseWithdraw) XXX_DiscardUnknown()

func (*MsgHouseWithdraw) XXX_Marshal

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

func (*MsgHouseWithdraw) XXX_Merge

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

func (*MsgHouseWithdraw) XXX_Size

func (m *MsgHouseWithdraw) XXX_Size() int

func (*MsgHouseWithdraw) XXX_Unmarshal

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

type MsgHouseWithdrawResponse

type MsgHouseWithdrawResponse struct {
	Response *types1.MsgWithdrawResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
}

MsgHouseWithdrawResponse wraps the MsgHouseWithdrawResponse message. We need it in order not to have double interface registration conflicts.

func (*MsgHouseWithdrawResponse) Descriptor

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

func (*MsgHouseWithdrawResponse) GetResponse

func (*MsgHouseWithdrawResponse) Marshal

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

func (*MsgHouseWithdrawResponse) MarshalTo

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

func (*MsgHouseWithdrawResponse) MarshalToSizedBuffer

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

func (*MsgHouseWithdrawResponse) ProtoMessage

func (*MsgHouseWithdrawResponse) ProtoMessage()

func (*MsgHouseWithdrawResponse) Reset

func (m *MsgHouseWithdrawResponse) Reset()

func (*MsgHouseWithdrawResponse) Size

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

func (*MsgHouseWithdrawResponse) String

func (m *MsgHouseWithdrawResponse) String() string

func (*MsgHouseWithdrawResponse) Unmarshal

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

func (*MsgHouseWithdrawResponse) XXX_DiscardUnknown

func (m *MsgHouseWithdrawResponse) XXX_DiscardUnknown()

func (*MsgHouseWithdrawResponse) XXX_Marshal

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

func (*MsgHouseWithdrawResponse) XXX_Merge

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

func (*MsgHouseWithdrawResponse) XXX_Size

func (m *MsgHouseWithdrawResponse) XXX_Size() int

func (*MsgHouseWithdrawResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// Create defines a method for creating a subaccount.
	Create(context.Context, *MsgCreate) (*MsgCreateResponse, error)
	// TopUp defines a method for topping up a subaccount.
	TopUp(context.Context, *MsgTopUp) (*MsgTopUpResponse, error)
	// WithdrawUnlockedBalances defines a method for withdrawing unlocked
	// balances.
	WithdrawUnlockedBalances(context.Context, *MsgWithdrawUnlockedBalances) (*MsgWithdrawUnlockedBalancesResponse, error)
	// PlaceBet defines a method for placing a bet using a subaccount.
	Wager(context.Context, *MsgWager) (*MsgWagerResponse, error)
	// HouseDeposit defines a method for depositing funds to provide liquidity to
	// a market.
	HouseDeposit(context.Context, *MsgHouseDeposit) (*MsgHouseDepositResponse, error)
	// HouseWithdraw defines a method for withdrawing funds from a market.
	HouseWithdraw(context.Context, *MsgHouseWithdraw) (*MsgHouseWithdrawResponse, error)
}

MsgServer is the server API for Msg service.

type MsgTopUp

type MsgTopUp struct {
	// creator is the msg signer.
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// address is the subaccount address.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// locked_balances is the list of balance locks.
	// Fixme: Are we sending multiple balance update together? If not, then only
	// locked balance should be enough
	LockedBalances []LockedBalance `protobuf:"bytes,3,rep,name=locked_balances,json=lockedBalances,proto3" json:"locked_balances"`
}

MsgTopUp defines the Msg/TopUp request type.

func (*MsgTopUp) Descriptor

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

func (*MsgTopUp) EmitEvent

func (msg *MsgTopUp) EmitEvent(ctx *sdk.Context, subAccAddr string)

EmitEvent emits the event for the message success.

func (*MsgTopUp) GetAddress

func (m *MsgTopUp) GetAddress() string

func (*MsgTopUp) GetCreator

func (m *MsgTopUp) GetCreator() string

func (*MsgTopUp) GetLockedBalances

func (m *MsgTopUp) GetLockedBalances() []LockedBalance

func (*MsgTopUp) GetSigners

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

func (*MsgTopUp) Marshal

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

func (*MsgTopUp) MarshalTo

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

func (*MsgTopUp) MarshalToSizedBuffer

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

func (*MsgTopUp) ProtoMessage

func (*MsgTopUp) ProtoMessage()

func (*MsgTopUp) Reset

func (m *MsgTopUp) Reset()

func (*MsgTopUp) Route

func (*MsgTopUp) Route() string

Route returns the module's message router key.

func (*MsgTopUp) Size

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

func (*MsgTopUp) String

func (m *MsgTopUp) String() string

func (*MsgTopUp) Type

func (*MsgTopUp) Type() string

Type returns type of its message

func (*MsgTopUp) Unmarshal

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

func (*MsgTopUp) ValidateBasic

func (msg *MsgTopUp) ValidateBasic() error

func (*MsgTopUp) XXX_DiscardUnknown

func (m *MsgTopUp) XXX_DiscardUnknown()

func (*MsgTopUp) XXX_Marshal

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

func (*MsgTopUp) XXX_Merge

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

func (*MsgTopUp) XXX_Size

func (m *MsgTopUp) XXX_Size() int

func (*MsgTopUp) XXX_Unmarshal

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

type MsgTopUpResponse

type MsgTopUpResponse struct {
}

MsgTopUpResponse defines the Msg/TopUp response type.

func (*MsgTopUpResponse) Descriptor

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

func (*MsgTopUpResponse) Marshal

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

func (*MsgTopUpResponse) MarshalTo

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

func (*MsgTopUpResponse) MarshalToSizedBuffer

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

func (*MsgTopUpResponse) ProtoMessage

func (*MsgTopUpResponse) ProtoMessage()

func (*MsgTopUpResponse) Reset

func (m *MsgTopUpResponse) Reset()

func (*MsgTopUpResponse) Size

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

func (*MsgTopUpResponse) String

func (m *MsgTopUpResponse) String() string

func (*MsgTopUpResponse) Unmarshal

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

func (*MsgTopUpResponse) XXX_DiscardUnknown

func (m *MsgTopUpResponse) XXX_DiscardUnknown()

func (*MsgTopUpResponse) XXX_Marshal

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

func (*MsgTopUpResponse) XXX_Merge

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

func (*MsgTopUpResponse) XXX_Size

func (m *MsgTopUpResponse) XXX_Size() int

func (*MsgTopUpResponse) XXX_Unmarshal

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

type MsgWager

type MsgWager struct {
	// creator is the subaccount owner.
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// ticket is the jwt ticket data.
	Ticket string `protobuf:"bytes,2,opt,name=ticket,proto3" json:"ticket,omitempty"`
}

MsgWager wraps the MsgWager message. We need it in order not to have double interface registration conflicts.

func NewMsgWager

func NewMsgWager(creator, ticket string) *MsgWager

NewMsgWager returns a MsgWager using given data

func (*MsgWager) Descriptor

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

func (*MsgWager) EmitEvent

func (msg *MsgWager) EmitEvent(ctx *sdk.Context, wagerMsg *bettypes.MsgWager, accOwnerAddr string)

EmitEvent emits the event for the message success.

func (*MsgWager) GetCreator

func (m *MsgWager) GetCreator() string

func (*MsgWager) GetSignBytes

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

GetSignBytes returns sortJson form of its message

func (*MsgWager) GetSigners

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

func (*MsgWager) GetTicket

func (m *MsgWager) GetTicket() string

func (*MsgWager) Marshal

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

func (*MsgWager) MarshalTo

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

func (*MsgWager) MarshalToSizedBuffer

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

func (*MsgWager) ProtoMessage

func (*MsgWager) ProtoMessage()

func (*MsgWager) Reset

func (m *MsgWager) Reset()

func (*MsgWager) Route

func (*MsgWager) Route() string

Route returns the module's message router key.

func (*MsgWager) Size

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

func (*MsgWager) String

func (m *MsgWager) String() string

func (*MsgWager) Type

func (*MsgWager) Type() string

Type returns type of its message

func (*MsgWager) Unmarshal

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

func (*MsgWager) ValidateBasic

func (msg *MsgWager) ValidateBasic() error

ValidateBasic validates basic constraints of original msgWager of bet module.

func (*MsgWager) XXX_DiscardUnknown

func (m *MsgWager) XXX_DiscardUnknown()

func (*MsgWager) XXX_Marshal

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

func (*MsgWager) XXX_Merge

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

func (*MsgWager) XXX_Size

func (m *MsgWager) XXX_Size() int

func (*MsgWager) XXX_Unmarshal

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

type MsgWagerResponse

type MsgWagerResponse struct {
	Response *types.MsgWagerResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
}

MsgWagerResponse wraps the MsgWagerResponse message. We need it in order not to have double interface registration conflicts.

func (*MsgWagerResponse) Descriptor

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

func (*MsgWagerResponse) GetResponse

func (m *MsgWagerResponse) GetResponse() *types.MsgWagerResponse

func (*MsgWagerResponse) Marshal

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

func (*MsgWagerResponse) MarshalTo

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

func (*MsgWagerResponse) MarshalToSizedBuffer

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

func (*MsgWagerResponse) ProtoMessage

func (*MsgWagerResponse) ProtoMessage()

func (*MsgWagerResponse) Reset

func (m *MsgWagerResponse) Reset()

func (*MsgWagerResponse) Size

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

func (*MsgWagerResponse) String

func (m *MsgWagerResponse) String() string

func (*MsgWagerResponse) Unmarshal

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

func (*MsgWagerResponse) XXX_DiscardUnknown

func (m *MsgWagerResponse) XXX_DiscardUnknown()

func (*MsgWagerResponse) XXX_Marshal

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

func (*MsgWagerResponse) XXX_Merge

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

func (*MsgWagerResponse) XXX_Size

func (m *MsgWagerResponse) XXX_Size() int

func (*MsgWagerResponse) XXX_Unmarshal

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

type MsgWithdrawUnlockedBalances

type MsgWithdrawUnlockedBalances struct {
	// creator is the subaccount owner.
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
}

MsgWithdrawUnlockedBalances defines the Msg/WithdrawUnlockedBalances request type.

func (*MsgWithdrawUnlockedBalances) Descriptor

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

func (*MsgWithdrawUnlockedBalances) EmitEvent

func (msg *MsgWithdrawUnlockedBalances) EmitEvent(ctx *sdk.Context, subAccAddr string)

EmitEvent emits the event for the message success.

func (*MsgWithdrawUnlockedBalances) GetCreator

func (m *MsgWithdrawUnlockedBalances) GetCreator() string

func (*MsgWithdrawUnlockedBalances) GetSigners

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

func (*MsgWithdrawUnlockedBalances) Marshal

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

func (*MsgWithdrawUnlockedBalances) MarshalTo

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

func (*MsgWithdrawUnlockedBalances) MarshalToSizedBuffer

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

func (*MsgWithdrawUnlockedBalances) ProtoMessage

func (*MsgWithdrawUnlockedBalances) ProtoMessage()

func (*MsgWithdrawUnlockedBalances) Reset

func (m *MsgWithdrawUnlockedBalances) Reset()

func (*MsgWithdrawUnlockedBalances) Route

Route returns the module's message router key.

func (*MsgWithdrawUnlockedBalances) Size

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

func (*MsgWithdrawUnlockedBalances) String

func (m *MsgWithdrawUnlockedBalances) String() string

func (*MsgWithdrawUnlockedBalances) Type

Type returns type of its message

func (*MsgWithdrawUnlockedBalances) Unmarshal

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

func (*MsgWithdrawUnlockedBalances) ValidateBasic

func (msg *MsgWithdrawUnlockedBalances) ValidateBasic() error

func (*MsgWithdrawUnlockedBalances) XXX_DiscardUnknown

func (m *MsgWithdrawUnlockedBalances) XXX_DiscardUnknown()

func (*MsgWithdrawUnlockedBalances) XXX_Marshal

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

func (*MsgWithdrawUnlockedBalances) XXX_Merge

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

func (*MsgWithdrawUnlockedBalances) XXX_Size

func (m *MsgWithdrawUnlockedBalances) XXX_Size() int

func (*MsgWithdrawUnlockedBalances) XXX_Unmarshal

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

type MsgWithdrawUnlockedBalancesResponse

type MsgWithdrawUnlockedBalancesResponse struct {
}

MsgWithdrawUnlockedBalancesResponse defines the Msg/WithdrawUnlockedBalances response type.

func (*MsgWithdrawUnlockedBalancesResponse) Descriptor

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

func (*MsgWithdrawUnlockedBalancesResponse) Marshal

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

func (*MsgWithdrawUnlockedBalancesResponse) MarshalTo

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

func (*MsgWithdrawUnlockedBalancesResponse) MarshalToSizedBuffer

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

func (*MsgWithdrawUnlockedBalancesResponse) ProtoMessage

func (*MsgWithdrawUnlockedBalancesResponse) ProtoMessage()

func (*MsgWithdrawUnlockedBalancesResponse) Reset

func (*MsgWithdrawUnlockedBalancesResponse) Size

func (*MsgWithdrawUnlockedBalancesResponse) String

func (*MsgWithdrawUnlockedBalancesResponse) Unmarshal

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

func (*MsgWithdrawUnlockedBalancesResponse) XXX_DiscardUnknown

func (m *MsgWithdrawUnlockedBalancesResponse) XXX_DiscardUnknown()

func (*MsgWithdrawUnlockedBalancesResponse) XXX_Marshal

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

func (*MsgWithdrawUnlockedBalancesResponse) XXX_Merge

func (*MsgWithdrawUnlockedBalancesResponse) XXX_Size

func (*MsgWithdrawUnlockedBalancesResponse) XXX_Unmarshal

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

type OrderBookKeeper

type OrderBookKeeper interface {
	CalcWithdrawalAmount(
		ctx sdk.Context,
		depositorAddress string,
		marketUID string,
		participationIndex uint64,
		mode housetypes.WithdrawalMode,
		totalWithdrawnAmount sdkmath.Int,
		amount sdkmath.Int,
	) (sdkmath.Int, error)
}

OrderbookKeeper defines the expected interface needed to initiate an order book for a market

type Params

type Params struct {
	// wager_enabled is enable/disable status of wager feature.
	WagerEnabled bool `protobuf:"varint,1,opt,name=wager_enabled,json=wagerEnabled,proto3" json:"wager_enabled,omitempty"`
	// deposit_enabled is enable/disable status of deposit feature.
	DepositEnabled bool `protobuf:"varint,2,opt,name=deposit_enabled,json=depositEnabled,proto3" json:"deposit_enabled,omitempty"`
}

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) GetDepositEnabled

func (m *Params) GetDepositEnabled() bool

func (*Params) GetWagerEnabled

func (m *Params) GetWagerEnabled() bool

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

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 returns a human-readable string representation of the parameters.

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 QueryClient

type QueryClient interface {
	// Subaccount fetches a subaccount given the owner.
	Subaccount(ctx context.Context, in *QuerySubaccountRequest, opts ...grpc.CallOption) (*QuerySubaccountResponse, error)
	// Params returns the subaccount module parameters.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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

type QueryParamsRequest struct {
}

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

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

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

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Subaccount fetches a subaccount given the owner.
	Subaccount(context.Context, *QuerySubaccountRequest) (*QuerySubaccountResponse, error)
	// Params returns the subaccount module parameters.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type QuerySubaccountRequest

type QuerySubaccountRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QuerySubaccountRequest is the request type for the Query/Subaccount RPC

func (*QuerySubaccountRequest) Descriptor

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

func (*QuerySubaccountRequest) GetAddress

func (m *QuerySubaccountRequest) GetAddress() string

func (*QuerySubaccountRequest) Marshal

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

func (*QuerySubaccountRequest) MarshalTo

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

func (*QuerySubaccountRequest) MarshalToSizedBuffer

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

func (*QuerySubaccountRequest) ProtoMessage

func (*QuerySubaccountRequest) ProtoMessage()

func (*QuerySubaccountRequest) Reset

func (m *QuerySubaccountRequest) Reset()

func (*QuerySubaccountRequest) Size

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

func (*QuerySubaccountRequest) String

func (m *QuerySubaccountRequest) String() string

func (*QuerySubaccountRequest) Unmarshal

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

func (*QuerySubaccountRequest) XXX_DiscardUnknown

func (m *QuerySubaccountRequest) XXX_DiscardUnknown()

func (*QuerySubaccountRequest) XXX_Marshal

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

func (*QuerySubaccountRequest) XXX_Merge

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

func (*QuerySubaccountRequest) XXX_Size

func (m *QuerySubaccountRequest) XXX_Size() int

func (*QuerySubaccountRequest) XXX_Unmarshal

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

type QuerySubaccountResponse

type QuerySubaccountResponse struct {
	Address                     string                `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Balance                     AccountSummary        `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance"`
	LockedBalance               []LockedBalance       `protobuf:"bytes,3,rep,name=locked_balance,json=lockedBalance,proto3" json:"locked_balance"`
	UnlockedBalance             []LockedBalance       `protobuf:"bytes,4,rep,name=unlocked_balance,json=unlockedBalance,proto3" json:"unlocked_balance"`
	WithdrawableUnlockedBalance cosmossdk_io_math.Int `` /* 167-byte string literal not displayed */
}

QuerySubaccountResponse is the response type for the Query/Subaccount RPC

func (*QuerySubaccountResponse) Descriptor

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

func (*QuerySubaccountResponse) GetAddress

func (m *QuerySubaccountResponse) GetAddress() string

func (*QuerySubaccountResponse) GetBalance

func (m *QuerySubaccountResponse) GetBalance() AccountSummary

func (*QuerySubaccountResponse) GetLockedBalance

func (m *QuerySubaccountResponse) GetLockedBalance() []LockedBalance

func (*QuerySubaccountResponse) GetUnlockedBalance added in v1.5.3

func (m *QuerySubaccountResponse) GetUnlockedBalance() []LockedBalance

func (*QuerySubaccountResponse) Marshal

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

func (*QuerySubaccountResponse) MarshalTo

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

func (*QuerySubaccountResponse) MarshalToSizedBuffer

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

func (*QuerySubaccountResponse) ProtoMessage

func (*QuerySubaccountResponse) ProtoMessage()

func (*QuerySubaccountResponse) Reset

func (m *QuerySubaccountResponse) Reset()

func (*QuerySubaccountResponse) Size

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

func (*QuerySubaccountResponse) String

func (m *QuerySubaccountResponse) String() string

func (*QuerySubaccountResponse) Unmarshal

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

func (*QuerySubaccountResponse) XXX_DiscardUnknown

func (m *QuerySubaccountResponse) XXX_DiscardUnknown()

func (*QuerySubaccountResponse) XXX_Marshal

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

func (*QuerySubaccountResponse) XXX_Merge

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

func (*QuerySubaccountResponse) XXX_Size

func (m *QuerySubaccountResponse) XXX_Size() int

func (*QuerySubaccountResponse) XXX_Unmarshal

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

type SubAccWagerTicketPayload

type SubAccWagerTicketPayload struct {
	// msg holds normal wager message
	Msg *types.MsgWager `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
	// mainacc_deduct_amount is amount to be deducted from main account
	MainaccDeductAmount cosmossdk_io_math.Int `` /* 143-byte string literal not displayed */
	// subacc_deduct_amount is amount to be deducted from sub account
	SubaccDeductAmount cosmossdk_io_math.Int `` /* 140-byte string literal not displayed */
}

SubAccWagerTicketPayload indicates data of subaccount wager ticket.

func (*SubAccWagerTicketPayload) Descriptor

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

func (*SubAccWagerTicketPayload) GetMsg

func (*SubAccWagerTicketPayload) Marshal

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

func (*SubAccWagerTicketPayload) MarshalTo

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

func (*SubAccWagerTicketPayload) MarshalToSizedBuffer

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

func (*SubAccWagerTicketPayload) ProtoMessage

func (*SubAccWagerTicketPayload) ProtoMessage()

func (*SubAccWagerTicketPayload) Reset

func (m *SubAccWagerTicketPayload) Reset()

func (*SubAccWagerTicketPayload) Size

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

func (*SubAccWagerTicketPayload) String

func (m *SubAccWagerTicketPayload) String() string

func (*SubAccWagerTicketPayload) Unmarshal

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

func (*SubAccWagerTicketPayload) Validate

func (payload *SubAccWagerTicketPayload) Validate(betAmount sdkmath.Int) error

Validate validates fields of the given ticketData

func (*SubAccWagerTicketPayload) XXX_DiscardUnknown

func (m *SubAccWagerTicketPayload) XXX_DiscardUnknown()

func (*SubAccWagerTicketPayload) XXX_Marshal

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

func (*SubAccWagerTicketPayload) XXX_Merge

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

func (*SubAccWagerTicketPayload) XXX_Size

func (m *SubAccWagerTicketPayload) XXX_Size() int

func (*SubAccWagerTicketPayload) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Create

func (*UnimplementedMsgServer) HouseDeposit

func (*UnimplementedMsgServer) HouseWithdraw

func (*UnimplementedMsgServer) TopUp

func (*UnimplementedMsgServer) Wager

func (*UnimplementedMsgServer) WithdrawUnlockedBalances

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Subaccount

Jump to

Keyboard shortcuts

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