types

package
v0.0.0-...-4661390 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	AttributeKeyParticipationIndex = "deposit_participation_index"

	// AttributeValueCategory is the event attribute for category as module name
	AttributeValueCategory = ModuleName
)
View Source
const (
	// ModuleName is the name of the house module
	ModuleName = "house"

	// StoreKey is the string store representation
	StoreKey = ModuleName

	// QuerierRoute is the querier route for the house module
	QuerierRoute = ModuleName

	// RouterKey is the msg router key for the house module
	RouterKey = ModuleName
)
View Source
const (
	// Default minimum deposit acceptable.
	DefaultMinDeposit int64 = 100

	// Default house participation fee.
	DefaultHouseParticipationFee string = "0.1"
)

House params default values

View Source
const (
	ErrTextInvalidDepositor = "invalid depositor address (%s)"
)
View Source
const (
	// HouseParticipationFeeName defines the account name for house participation fee
	HouseParticipationFeeName = "house_participation_fee_pool"
)

module accounts constants

View Source
const (
	TypeMsgDeposit = "create_deposit"
)

Variables

View Source
var (
	// Amino is the legacy aminto codec
	Amino = codec.NewLegacyAmino()
	// ModuleCdc is the codec of the module
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)
View Source
var (
	ErrInvalidLengthDeposit        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowDeposit          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupDeposit = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrEmptyDepositorAddr        = sdkerrors.Register(ModuleName, 5001, "empty depositor address")
	ErrInvalidMarketUID          = sdkerrors.Register(ModuleName, 5002, "invalid market uid")
	ErrInvalidWithdrawMode       = sdkerrors.Register(ModuleName, 5003, "invalid withdrawal mode")
	ErrInvalidIndex              = sdkerrors.Register(ModuleName, 5004, "invalid participant index")
	ErrInvalidAmount             = sdkerrors.Register(ModuleName, 5005, "valid amount should be provided")
	ErrDepositTooSmall           = sdkerrors.Register(ModuleName, 5006, "deposit is not greater than minimum deposit amount")
	ErrSRDepositProcessing       = sdkerrors.Register(ModuleName, 5007, "internal error in processing deposit in SR")
	ErrDepositSetting            = sdkerrors.Register(ModuleName, 5008, "internal error in setting deposit")
	ErrInvalidparticipationIndex = sdkerrors.Register(ModuleName, 5009, "invalid participant index")
	ErrInvalidMode               = sdkerrors.Register(ModuleName, 5010, "invalid withdrawal mode")
	ErrDepositNotFound           = sdkerrors.Register(ModuleName, 5011, "deposit not found")
	ErrWithdrawalTooLarge        = sdkerrors.Register(ModuleName, 5012, "withdrawal is more than unused amount")
	ErrSRLiquidateProcessing     = sdkerrors.Register(ModuleName, 5013, "internal error in processing liquidation in SR")
	ErrWrongWithdrawCreator      = sdkerrors.Register(ModuleName, 5014, "withdrawal is only allowed from the depositor account")
)

x/house 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 (
	DepositKeyPrefix    = []byte{0x00} // prefix for keys that store deposits
	WithdrawalKeyPrefix = []byte{0x01} // prefix for keys that store withdrawals
)
View Source
var (
	KeyMinDeposit            = []byte("MinDeposit")
	KeyHouseParticipationFee = []byte("HouseParticipationFee")
)
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 (
	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 (
	ErrInvalidLengthWithdraw        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowWithdraw          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupWithdraw = fmt.Errorf("proto: unexpected end of group")
)
View Source
var WithdrawalMode_name = map[int32]string{
	0: "WITHDRAWAL_MODE_UNSPECIFIED",
	1: "WITHDRAWAL_MODE_FULL",
	2: "WITHDRAWAL_MODE_PARTIAL",
}
View Source
var WithdrawalMode_value = map[string]int32{
	"WITHDRAWAL_MODE_UNSPECIFIED": 0,
	"WITHDRAWAL_MODE_FULL":        1,
	"WITHDRAWAL_MODE_PARTIAL":     2,
}

Functions

func GetDepositKey

func GetDepositKey(depositorAddr string, marketUID string, participationIndex uint64) []byte

GetDepositKey creates the key for deposit bond with market and participation

func GetDepositListPrefix

func GetDepositListPrefix(depositorAddr string) []byte

GetDepositListPrefix creates the key for deposit bond with market

func GetWithdrawalKey

func GetWithdrawalKey(depositorAddr string, marketUID string, participationIndex uint64, id uint64) []byte

GetWithdrawalKey creates the key for withdrawal bond with market and deposit

func GetWithdrawalListPrefix

func GetWithdrawalListPrefix(depositorAddr string) []byte

GetWithdrawalListPrefix creates the key for withdrawals bond with market

func MustMarshalWithdrawal

func MustMarshalWithdrawal(cdc codec.BinaryCodec, withdrawal Withdrawal) []byte

MustMarshalWithdrawal returns the withdrawal bytes. Panics if fails

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamTable for house module

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the x/house interfaces types with the interface registry

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/house 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)

Types

type Deposit

type Deposit struct {
	// creator is the bech32-encoded address of the depositor.
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	// market_uid is the uid of market against which deposit is being
	// made.
	MarketUID string `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	// participation_index index corresponding to the book participation
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
	// amount is the amount being deposited.
	Amount github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount" yaml:"amount"`
	// fee is deducted from the amount on deposition.
	Fee github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=fee,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"fee" yaml:"fee"`
	// liquidity is the liquidity being provided to the house after fee deduction.
	Liquidity github_com_cosmos_cosmos_sdk_types.Int `` /* 128-byte string literal not displayed */
	// withdrawal_count is the total count of the withdrawal attempts
	WithdrawalCount uint64 `` /* 126-byte string literal not displayed */
	// total_withdrawal_amount is the total amount of withdrawal attempts
	TotalWithdrawalAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 197-byte string literal not displayed */
}

Deposit represents the deposit against a market held by an account.

func NewDeposit

func NewDeposit(creator, marketUID string, amount, totalAmount sdk.Int, withdrawalCount uint64) Deposit

NewDeposit creates a new deposit object

func (*Deposit) Descriptor

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

func (*Deposit) Marshal

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

func (*Deposit) MarshalTo

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

func (*Deposit) MarshalToSizedBuffer

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

func (*Deposit) ProtoMessage

func (*Deposit) ProtoMessage()

func (*Deposit) Reset

func (m *Deposit) Reset()

func (*Deposit) SetHouseParticipationFee

func (d *Deposit) SetHouseParticipationFee(feePercentage sdk.Dec)

func (*Deposit) Size

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

func (Deposit) String

func (d Deposit) String() string

String returns a human readable string representation of a Deposit.

func (*Deposit) Unmarshal

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

func (*Deposit) XXX_DiscardUnknown

func (m *Deposit) XXX_DiscardUnknown()

func (*Deposit) XXX_Marshal

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

func (*Deposit) XXX_Merge

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

func (*Deposit) XXX_Size

func (m *Deposit) XXX_Size() int

func (*Deposit) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// params defines all the parameters related to deposit.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// deposit_list defines the deposits active at genesis.
	DepositList []Deposit `protobuf:"bytes,2,rep,name=deposit_list,json=depositList,proto3" json:"deposit_list"`
	// withdrawal_list defines the withdrawals active at genesis.
	WithdrawalList []Withdrawal `protobuf:"bytes,3,rep,name=withdrawal_list,json=withdrawalList,proto3" json:"withdrawal_list"`
}

GenesisState defines the house 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) GetDepositList

func (m *GenesisState) GetDepositList() []Deposit

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetWithdrawalList

func (m *GenesisState) GetWithdrawalList() []Withdrawal

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 MsgClient

type MsgClient interface {
	// Deposit defines a method for performing a deposit of coins to become part
	// of the house corresponding to a market.
	Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error)
	// Withdraw defines a method for performing a withdrawal of coins of unused
	// amount corresponding to a deposit.
	Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, 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 MsgDeposit

type MsgDeposit struct {
	Creator   string                                 `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	MarketUID string                                 `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	Amount    github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}

MsgDeposit defines a SDK message for performing a deposit of coins to become part of the house corresponding to a market.

func NewMsgDeposit

func NewMsgDeposit(creator, marketUID string, amount sdk.Int) *MsgDeposit

NewMsgDeposit creates the new input for adding deposit to blockchain

func (*MsgDeposit) Descriptor

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

func (*MsgDeposit) GetSignBytes

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

GetSignBytes return the marshalled bytes of the msg

func (*MsgDeposit) GetSigners

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

GetSigners return the creators address

func (*MsgDeposit) Marshal

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

func (*MsgDeposit) MarshalTo

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

func (*MsgDeposit) MarshalToSizedBuffer

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

func (*MsgDeposit) ProtoMessage

func (*MsgDeposit) ProtoMessage()

func (*MsgDeposit) Reset

func (m *MsgDeposit) Reset()

func (*MsgDeposit) Route

func (msg *MsgDeposit) Route() string

Route return the message route for slashing

func (*MsgDeposit) Size

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

func (*MsgDeposit) String

func (m *MsgDeposit) String() string

func (*MsgDeposit) Type

func (msg *MsgDeposit) Type() string

Type returns the msg add market type

func (*MsgDeposit) Unmarshal

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

func (*MsgDeposit) ValidateBasic

func (msg *MsgDeposit) ValidateBasic() error

ValidateBasic validates the input creation market

func (*MsgDeposit) XXX_DiscardUnknown

func (m *MsgDeposit) XXX_DiscardUnknown()

func (*MsgDeposit) XXX_Marshal

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

func (*MsgDeposit) XXX_Merge

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

func (*MsgDeposit) XXX_Size

func (m *MsgDeposit) XXX_Size() int

func (*MsgDeposit) XXX_Unmarshal

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

type MsgDepositResponse

type MsgDepositResponse struct {
	MarketUID          string `protobuf:"bytes,1,opt,name=market_uid,proto3" json:"market_uid"`
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
}

MsgDepositResponse defines the Msg/Deposit response type.

func (*MsgDepositResponse) Descriptor

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

func (*MsgDepositResponse) GetMarketUID

func (m *MsgDepositResponse) GetMarketUID() string

func (*MsgDepositResponse) GetParticipationIndex

func (m *MsgDepositResponse) GetParticipationIndex() uint64

func (*MsgDepositResponse) Marshal

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

func (*MsgDepositResponse) MarshalTo

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

func (*MsgDepositResponse) MarshalToSizedBuffer

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

func (*MsgDepositResponse) ProtoMessage

func (*MsgDepositResponse) ProtoMessage()

func (*MsgDepositResponse) Reset

func (m *MsgDepositResponse) Reset()

func (*MsgDepositResponse) Size

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

func (*MsgDepositResponse) String

func (m *MsgDepositResponse) String() string

func (*MsgDepositResponse) Unmarshal

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

func (*MsgDepositResponse) XXX_DiscardUnknown

func (m *MsgDepositResponse) XXX_DiscardUnknown()

func (*MsgDepositResponse) XXX_Marshal

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

func (*MsgDepositResponse) XXX_Merge

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

func (*MsgDepositResponse) XXX_Size

func (m *MsgDepositResponse) XXX_Size() int

func (*MsgDepositResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// Deposit defines a method for performing a deposit of coins to become part
	// of the house corresponding to a market.
	Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error)
	// Withdraw defines a method for performing a withdrawal of coins of unused
	// amount corresponding to a deposit.
	Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error)
}

MsgServer is the server API for Msg service.

type MsgWithdraw

type MsgWithdraw struct {
	Creator            string                                 `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	MarketUID          string                                 `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	ParticipationIndex uint64                                 `` /* 143-byte string literal not displayed */
	Mode               WithdrawalMode                         `protobuf:"varint,4,opt,name=mode,proto3,enum=furyanetwork.furya.house.WithdrawalMode" json:"mode,omitempty" yaml:"mode"`
	Amount             github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}

MsgWithdraw defines a SDK message for performing a withdrawal of coins of unused amount corresponding to a deposit.

func NewMsgWithdraw

func NewMsgWithdraw(creator string, marketUID string, amount sdk.Int, participationIndex uint64, mode WithdrawalMode) *MsgWithdraw

NewMsgWithdraw creates the new input for withdrawal of a deposit

func (*MsgWithdraw) Descriptor

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

func (*MsgWithdraw) GetSignBytes

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

GetSignBytes return the marshalled bytes of the msg

func (*MsgWithdraw) GetSigners

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

GetSigners return the creators address

func (*MsgWithdraw) Marshal

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

func (*MsgWithdraw) MarshalTo

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

func (*MsgWithdraw) MarshalToSizedBuffer

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

func (*MsgWithdraw) ProtoMessage

func (*MsgWithdraw) ProtoMessage()

func (*MsgWithdraw) Reset

func (m *MsgWithdraw) Reset()

func (*MsgWithdraw) Route

func (msg *MsgWithdraw) Route() string

Route return the message route for slashing

func (*MsgWithdraw) Size

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

func (*MsgWithdraw) String

func (m *MsgWithdraw) String() string

func (*MsgWithdraw) Type

func (msg *MsgWithdraw) Type() string

Type returns the msg add market type

func (*MsgWithdraw) Unmarshal

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

func (*MsgWithdraw) ValidateBasic

func (msg *MsgWithdraw) ValidateBasic() error

ValidateBasic validates the input creation market

func (*MsgWithdraw) XXX_DiscardUnknown

func (m *MsgWithdraw) XXX_DiscardUnknown()

func (*MsgWithdraw) XXX_Marshal

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

func (*MsgWithdraw) XXX_Merge

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

func (*MsgWithdraw) XXX_Size

func (m *MsgWithdraw) XXX_Size() int

func (*MsgWithdraw) XXX_Unmarshal

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

type MsgWithdrawResponse

type MsgWithdrawResponse struct {
	ID                 uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id" yaml:"id"`
	MarketUID          string `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
}

MsgWithdrawResponse defines the Msg/Withdraw response type.

func (*MsgWithdrawResponse) Descriptor

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

func (*MsgWithdrawResponse) GetID

func (m *MsgWithdrawResponse) GetID() uint64

func (*MsgWithdrawResponse) GetMarketUID

func (m *MsgWithdrawResponse) GetMarketUID() string

func (*MsgWithdrawResponse) GetParticipationIndex

func (m *MsgWithdrawResponse) GetParticipationIndex() uint64

func (*MsgWithdrawResponse) Marshal

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

func (*MsgWithdrawResponse) MarshalTo

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

func (*MsgWithdrawResponse) MarshalToSizedBuffer

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

func (*MsgWithdrawResponse) ProtoMessage

func (*MsgWithdrawResponse) ProtoMessage()

func (*MsgWithdrawResponse) Reset

func (m *MsgWithdrawResponse) Reset()

func (*MsgWithdrawResponse) Size

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

func (*MsgWithdrawResponse) String

func (m *MsgWithdrawResponse) String() string

func (*MsgWithdrawResponse) Unmarshal

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

func (*MsgWithdrawResponse) XXX_DiscardUnknown

func (m *MsgWithdrawResponse) XXX_DiscardUnknown()

func (*MsgWithdrawResponse) XXX_Marshal

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

func (*MsgWithdrawResponse) XXX_Merge

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

func (*MsgWithdrawResponse) XXX_Size

func (m *MsgWithdrawResponse) XXX_Size() int

func (*MsgWithdrawResponse) XXX_Unmarshal

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

type Params

type Params struct {
	// min_deposit is the minimum amount of acceptable deposit.
	MinDeposit github_com_cosmos_cosmos_sdk_types.Int `` /* 150-byte string literal not displayed */
	// house_participation_fee is the % of the deposit to be paid for a house
	// participation by the user
	HouseParticipationFee github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */
}

Params define the parameters for the house module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams(minDeposit sdk.Int, houseParticipationFee sdk.Dec) Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

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

Implements 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 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 a 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 {
	// Params queries the parameters of the module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Deposits queries all deposits.
	Deposits(ctx context.Context, in *QueryDepositsRequest, opts ...grpc.CallOption) (*QueryDepositsResponse, error)
	// DepositorDeposits queries deposits info for given depositor.
	DepositorDeposits(ctx context.Context, in *QueryDepositorDepositsRequest, opts ...grpc.CallOption) (*QueryDepositorDepositsResponse, error)
	// DepositorWithdrawals queries withdrawals info for given depositor.
	DepositorWithdrawals(ctx context.Context, in *QueryDepositorWithdrawalsRequest, opts ...grpc.CallOption) (*QueryDepositorWithdrawalsResponse, 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 QueryDepositorDepositsRequest

type QueryDepositorDepositsRequest struct {
	// depositor_addr defines the depositor address to query for.
	DepositorAddress string `protobuf:"bytes,1,opt,name=depositor_address,json=depositorAddress,proto3" json:"depositor_address,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositorDepositsRequest is request type for Query/DepositorDeposits RPC method.

func (*QueryDepositorDepositsRequest) Descriptor

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

func (*QueryDepositorDepositsRequest) GetDepositorAddress

func (m *QueryDepositorDepositsRequest) GetDepositorAddress() string

func (*QueryDepositorDepositsRequest) GetPagination

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

func (*QueryDepositorDepositsRequest) Marshal

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

func (*QueryDepositorDepositsRequest) MarshalTo

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

func (*QueryDepositorDepositsRequest) MarshalToSizedBuffer

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

func (*QueryDepositorDepositsRequest) ProtoMessage

func (*QueryDepositorDepositsRequest) ProtoMessage()

func (*QueryDepositorDepositsRequest) Reset

func (m *QueryDepositorDepositsRequest) Reset()

func (*QueryDepositorDepositsRequest) Size

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

func (*QueryDepositorDepositsRequest) String

func (*QueryDepositorDepositsRequest) Unmarshal

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

func (*QueryDepositorDepositsRequest) XXX_DiscardUnknown

func (m *QueryDepositorDepositsRequest) XXX_DiscardUnknown()

func (*QueryDepositorDepositsRequest) XXX_Marshal

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

func (*QueryDepositorDepositsRequest) XXX_Merge

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

func (*QueryDepositorDepositsRequest) XXX_Size

func (m *QueryDepositorDepositsRequest) XXX_Size() int

func (*QueryDepositorDepositsRequest) XXX_Unmarshal

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

type QueryDepositorDepositsResponse

type QueryDepositorDepositsResponse struct {
	// deposits contains all the queried deposits.
	Deposits []Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositorDepositsResponse is response type for the Query/DepositorDeposits RPC method

func (*QueryDepositorDepositsResponse) Descriptor

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

func (*QueryDepositorDepositsResponse) GetDeposits

func (m *QueryDepositorDepositsResponse) GetDeposits() []Deposit

func (*QueryDepositorDepositsResponse) GetPagination

func (*QueryDepositorDepositsResponse) Marshal

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

func (*QueryDepositorDepositsResponse) MarshalTo

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

func (*QueryDepositorDepositsResponse) MarshalToSizedBuffer

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

func (*QueryDepositorDepositsResponse) ProtoMessage

func (*QueryDepositorDepositsResponse) ProtoMessage()

func (*QueryDepositorDepositsResponse) Reset

func (m *QueryDepositorDepositsResponse) Reset()

func (*QueryDepositorDepositsResponse) Size

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

func (*QueryDepositorDepositsResponse) String

func (*QueryDepositorDepositsResponse) Unmarshal

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

func (*QueryDepositorDepositsResponse) XXX_DiscardUnknown

func (m *QueryDepositorDepositsResponse) XXX_DiscardUnknown()

func (*QueryDepositorDepositsResponse) XXX_Marshal

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

func (*QueryDepositorDepositsResponse) XXX_Merge

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

func (*QueryDepositorDepositsResponse) XXX_Size

func (m *QueryDepositorDepositsResponse) XXX_Size() int

func (*QueryDepositorDepositsResponse) XXX_Unmarshal

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

type QueryDepositorWithdrawalsRequest

type QueryDepositorWithdrawalsRequest struct {
	// depositor_addr defines the depositor address to query for.
	DepositorAddress string `protobuf:"bytes,1,opt,name=depositor_address,json=depositorAddress,proto3" json:"depositor_address,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositorWithdrawalsRequest is request type for Query/DepositorWithdrawals RPC method.

func (*QueryDepositorWithdrawalsRequest) Descriptor

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

func (*QueryDepositorWithdrawalsRequest) GetDepositorAddress

func (m *QueryDepositorWithdrawalsRequest) GetDepositorAddress() string

func (*QueryDepositorWithdrawalsRequest) GetPagination

func (*QueryDepositorWithdrawalsRequest) Marshal

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

func (*QueryDepositorWithdrawalsRequest) MarshalTo

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

func (*QueryDepositorWithdrawalsRequest) MarshalToSizedBuffer

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

func (*QueryDepositorWithdrawalsRequest) ProtoMessage

func (*QueryDepositorWithdrawalsRequest) ProtoMessage()

func (*QueryDepositorWithdrawalsRequest) Reset

func (*QueryDepositorWithdrawalsRequest) Size

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

func (*QueryDepositorWithdrawalsRequest) String

func (*QueryDepositorWithdrawalsRequest) Unmarshal

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

func (*QueryDepositorWithdrawalsRequest) XXX_DiscardUnknown

func (m *QueryDepositorWithdrawalsRequest) XXX_DiscardUnknown()

func (*QueryDepositorWithdrawalsRequest) XXX_Marshal

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

func (*QueryDepositorWithdrawalsRequest) XXX_Merge

func (*QueryDepositorWithdrawalsRequest) XXX_Size

func (m *QueryDepositorWithdrawalsRequest) XXX_Size() int

func (*QueryDepositorWithdrawalsRequest) XXX_Unmarshal

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

type QueryDepositorWithdrawalsResponse

type QueryDepositorWithdrawalsResponse struct {
	// withdrawals contains all the queried withdrawals.
	Withdrawals []Withdrawal `protobuf:"bytes,1,rep,name=withdrawals,proto3" json:"withdrawals"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositorWithdrawalsResponse is response type for the Query/DepositorWithdrawals RPC method

func (*QueryDepositorWithdrawalsResponse) Descriptor

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

func (*QueryDepositorWithdrawalsResponse) GetPagination

func (*QueryDepositorWithdrawalsResponse) GetWithdrawals

func (m *QueryDepositorWithdrawalsResponse) GetWithdrawals() []Withdrawal

func (*QueryDepositorWithdrawalsResponse) Marshal

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

func (*QueryDepositorWithdrawalsResponse) MarshalTo

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

func (*QueryDepositorWithdrawalsResponse) MarshalToSizedBuffer

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

func (*QueryDepositorWithdrawalsResponse) ProtoMessage

func (*QueryDepositorWithdrawalsResponse) ProtoMessage()

func (*QueryDepositorWithdrawalsResponse) Reset

func (*QueryDepositorWithdrawalsResponse) Size

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

func (*QueryDepositorWithdrawalsResponse) String

func (*QueryDepositorWithdrawalsResponse) Unmarshal

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

func (*QueryDepositorWithdrawalsResponse) XXX_DiscardUnknown

func (m *QueryDepositorWithdrawalsResponse) XXX_DiscardUnknown()

func (*QueryDepositorWithdrawalsResponse) XXX_Marshal

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

func (*QueryDepositorWithdrawalsResponse) XXX_Merge

func (*QueryDepositorWithdrawalsResponse) XXX_Size

func (m *QueryDepositorWithdrawalsResponse) XXX_Size() int

func (*QueryDepositorWithdrawalsResponse) XXX_Unmarshal

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

type QueryDepositsRequest

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

QueryDepositsRequest is request type for Query/Deposits RPC method.

func (*QueryDepositsRequest) Descriptor

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

func (*QueryDepositsRequest) GetPagination

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

func (*QueryDepositsRequest) Marshal

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

func (*QueryDepositsRequest) MarshalTo

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

func (*QueryDepositsRequest) MarshalToSizedBuffer

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

func (*QueryDepositsRequest) ProtoMessage

func (*QueryDepositsRequest) ProtoMessage()

func (*QueryDepositsRequest) Reset

func (m *QueryDepositsRequest) Reset()

func (*QueryDepositsRequest) Size

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

func (*QueryDepositsRequest) String

func (m *QueryDepositsRequest) String() string

func (*QueryDepositsRequest) Unmarshal

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

func (*QueryDepositsRequest) XXX_DiscardUnknown

func (m *QueryDepositsRequest) XXX_DiscardUnknown()

func (*QueryDepositsRequest) XXX_Marshal

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

func (*QueryDepositsRequest) XXX_Merge

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

func (*QueryDepositsRequest) XXX_Size

func (m *QueryDepositsRequest) XXX_Size() int

func (*QueryDepositsRequest) XXX_Unmarshal

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

type QueryDepositsResponse

type QueryDepositsResponse struct {
	// deposits contains all the queried deposits.
	Deposits []Deposit `protobuf:"bytes,1,rep,name=deposits,proto3" json:"deposits"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositsResponse is response type for the Query/Deposits RPC method

func (*QueryDepositsResponse) Descriptor

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

func (*QueryDepositsResponse) GetDeposits

func (m *QueryDepositsResponse) GetDeposits() []Deposit

func (*QueryDepositsResponse) GetPagination

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

func (*QueryDepositsResponse) Marshal

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

func (*QueryDepositsResponse) MarshalTo

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

func (*QueryDepositsResponse) MarshalToSizedBuffer

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

func (*QueryDepositsResponse) ProtoMessage

func (*QueryDepositsResponse) ProtoMessage()

func (*QueryDepositsResponse) Reset

func (m *QueryDepositsResponse) Reset()

func (*QueryDepositsResponse) Size

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

func (*QueryDepositsResponse) String

func (m *QueryDepositsResponse) String() string

func (*QueryDepositsResponse) Unmarshal

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

func (*QueryDepositsResponse) XXX_DiscardUnknown

func (m *QueryDepositsResponse) XXX_DiscardUnknown()

func (*QueryDepositsResponse) XXX_Marshal

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

func (*QueryDepositsResponse) XXX_Merge

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

func (*QueryDepositsResponse) XXX_Size

func (m *QueryDepositsResponse) XXX_Size() int

func (*QueryDepositsResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method. 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 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

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 {
	// Params queries the parameters of the module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Deposits queries all deposits.
	Deposits(context.Context, *QueryDepositsRequest) (*QueryDepositsResponse, error)
	// DepositorDeposits queries deposits info for given depositor.
	DepositorDeposits(context.Context, *QueryDepositorDepositsRequest) (*QueryDepositorDepositsResponse, error)
	// DepositorWithdrawals queries withdrawals info for given depositor.
	DepositorWithdrawals(context.Context, *QueryDepositorWithdrawalsRequest) (*QueryDepositorWithdrawalsResponse, error)
}

QueryServer is the server API for Query service.

type SRKeeper

type SRKeeper interface {
	InitiateBookParticipation(ctx sdk.Context, addr sdk.AccAddress, bookUID string, liquidity, fee sdk.Int) (uint64, error)
	WithdrawBookParticipation(ctx sdk.Context, depAddr, bookUID string, bpNumber uint64, mode WithdrawalMode, amount sdk.Int) (sdk.Int, error)
}

SRKeeper defines the expected strategicreserve keeper.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) Deposit

func (*UnimplementedMsgServer) Withdraw

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) DepositorDeposits

func (*UnimplementedQueryServer) Deposits

func (*UnimplementedQueryServer) Params

type Withdrawal

type Withdrawal struct {
	// withdrawal is the withdrawal attempt id.
	ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// depositorAddress is the bech32-encoded address of the depositor.
	DepositorAddress string `` /* 134-byte string literal not displayed */
	// market_uid is the uid of market against which the deposit is
	// being made.
	MarketUID string `protobuf:"bytes,3,opt,name=market_uid,proto3" json:"market_uid"`
	// participation_index is the id corresponding to the book participation
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
	// mode is the withdrawal mode enum value
	Mode WithdrawalMode `protobuf:"varint,5,opt,name=mode,proto3,enum=furyanetwork.furya.house.WithdrawalMode" json:"mode,omitempty" yaml:"mode"`
	// amount is the amount being withdrawn.
	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" yaml:"amount"`
}

Withdrawal represents the withdrawal against a deposit.

func NewWithdrawal

func NewWithdrawal(id uint64, depositorAddr, marketUID string, participationIndex uint64, amount sdk.Int, mode WithdrawalMode) Withdrawal

NewWithdrawal creates a new withdrawal object

func UnmarshalWithdrawal

func UnmarshalWithdrawal(cdc codec.BinaryCodec, value []byte) (withdrawal Withdrawal, err error)

return the withdrawal

func (*Withdrawal) Descriptor

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

func (*Withdrawal) Marshal

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

func (*Withdrawal) MarshalTo

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

func (*Withdrawal) MarshalToSizedBuffer

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

func (*Withdrawal) ProtoMessage

func (*Withdrawal) ProtoMessage()

func (*Withdrawal) Reset

func (m *Withdrawal) Reset()

func (*Withdrawal) Size

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

func (Withdrawal) String

func (w Withdrawal) String() string

String returns a human readable string representation of a Withdrawal.

func (*Withdrawal) Unmarshal

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

func (*Withdrawal) XXX_DiscardUnknown

func (m *Withdrawal) XXX_DiscardUnknown()

func (*Withdrawal) XXX_Marshal

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

func (*Withdrawal) XXX_Merge

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

func (*Withdrawal) XXX_Size

func (m *Withdrawal) XXX_Size() int

func (*Withdrawal) XXX_Unmarshal

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

type WithdrawalMode

type WithdrawalMode int32

WithdrawalMode is the enum type for the withdrawal mode.

const (
	// invalid
	WithdrawalMode_WITHDRAWAL_MODE_UNSPECIFIED WithdrawalMode = 0
	// full
	WithdrawalMode_WITHDRAWAL_MODE_FULL WithdrawalMode = 1
	// partial
	WithdrawalMode_WITHDRAWAL_MODE_PARTIAL WithdrawalMode = 2
)

func (WithdrawalMode) EnumDescriptor

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

func (WithdrawalMode) String

func (x WithdrawalMode) String() string

Jump to

Keyboard shortcuts

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