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 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 (
	// DefaultMinDeposit is default minimum deposit acceptable.
	DefaultMinDeposit int64 = 100

	// DefaultHouseParticipationFee is default house participation fee.
	DefaultHouseParticipationFee string = "0.1"

	// DefaultMaxWithdrawalCount is default maximum withdrawals allowed per participation.
	DefaultMaxWithdrawalCount uint64 = 1
)

House params default values

Variables

View Source
var (
	ErrInvalidLengthAuthz        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAuthz          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAuthz = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ErrInTicketVerification      = sdkerrors.Register(ModuleName, 5001, "error in ticket verification process")
	ErrInTicketPayloadValidation = sdkerrors.Register(ModuleName, 5002, "error in ticket payload validation")
	ErrInvalidMarketUID          = sdkerrors.Register(ModuleName, 5003, "invalid market uid")
	ErrInvalidWithdrawMode       = sdkerrors.Register(ModuleName, 5004, "invalid withdrawal mode")
	ErrInvalidIndex              = sdkerrors.Register(ModuleName, 5005, "invalid participant index")
	ErrInvalidAmount             = sdkerrors.Register(ModuleName, 5006, "invalid amount")
	ErrDepositTooSmall           = sdkerrors.Register(ModuleName, 5007, "deposit amount is less than minimum acceptable deposit")
	ErrOBDepositProcessing       = sdkerrors.Register(ModuleName, 5008, "internal error in processing deposit in orderbook")
	ErrInvalidMode               = sdkerrors.Register(ModuleName, 5009, "invalid withdrawal mode")
	ErrDepositNotFound           = sdkerrors.Register(ModuleName, 5010, "deposit not found")
	ErrOBLiquidateProcessing     = sdkerrors.Register(ModuleName, 5011, "internal error in processing liquidation in orderbook")
	ErrUserKycFailed             = sdkerrors.Register(ModuleName, 5012, "the account failed the KYC Validation")
	ErrAuthorizationNotFound     = sdkerrors.Register(ModuleName, 5013, "no authorization found")
	ErrAuthorizationNotAccepted  = sdkerrors.Register(ModuleName, 5014, "authorization not accepted")
	ErrAuthorizationNotAllowed   = sdkerrors.Register(ModuleName, 5015, "authorization not allowed")
	ErrMaxWithdrawalCountReached = sdkerrors.Register(ModuleName, 5016, "maximum withdrawals per deposit reached")
)

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

	// ModuleCdc is the codec of the module
	ModuleCdc = codec.NewAminoCodec(amino)
)
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, 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

ParamKeyTable 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 AuthzKeeper added in v0.0.8

type AuthzKeeper interface {
	GetAuthorization(
		ctx sdk.Context,
		grantee sdk.AccAddress,
		granter sdk.AccAddress,
		msgType string,
	) (authz.Authorization, *time.Time)
	SaveGrant(
		ctx sdk.Context,
		grantee, granter sdk.AccAddress,
		authorization authz.Authorization,
		expiration *time.Time,
	) error
	DeleteGrant(
		ctx sdk.Context,
		grantee, granter sdk.AccAddress,
		msgType string,
	) error
}

AuthzKeeper defines the expected authz keeper.

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"`
	// creator is the bech32-encoded address of the depositor.
	DepositorAddress string `` /* 134-byte string literal not displayed */
	// market_uid is the uid of market/order book against which deposit is being
	// made.
	MarketUID string `protobuf:"bytes,3,opt,name=market_uid,proto3" json:"market_uid"`
	// participation_index is the index corresponding to the order book
	// participation
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
	// amount is the amount being deposited on an order book to be a house
	Amount cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount" yaml:"amount"`
	// withdrawal_count is the total count of the withdrawals from an order book
	WithdrawalCount uint64 `` /* 126-byte string literal not displayed */
	// total_withdrawal_amount is the total amount withdrawn from the liquidity
	// provided
	TotalWithdrawalAmount cosmossdk_io_math.Int `` /* 180-byte string literal not displayed */
}

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

func NewDeposit

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

NewDeposit creates a new deposit object

func (*Deposit) CalcHouseParticipationFeeAmount added in v0.0.8

func (d *Deposit) CalcHouseParticipationFeeAmount(feePercentage sdk.Dec) sdkmath.Int

CalcHouseParticipationFeeAmount sets participation fee amount for house

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) 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 DepositAuthorization added in v0.0.8

type DepositAuthorization struct {
	SpendLimit cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=spend_limit,json=spendLimit,proto3,customtype=cosmossdk.io/math.Int" json:"spend_limit"`
}

DepositAuthorization allows the grantee to spend up to spend_limit from the granter's account for deposit.

func NewDepositAuthorization added in v0.0.8

func NewDepositAuthorization(spendLimit sdkmath.Int) *DepositAuthorization

NewDepositAuthorization creates a new DepositAuthorization object.

func (DepositAuthorization) Accept added in v0.0.8

Accept implements Authorization.Accept.

func (*DepositAuthorization) Descriptor added in v0.0.8

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

func (*DepositAuthorization) Marshal added in v0.0.8

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

func (*DepositAuthorization) MarshalTo added in v0.0.8

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

func (*DepositAuthorization) MarshalToSizedBuffer added in v0.0.8

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

func (DepositAuthorization) MsgTypeURL added in v0.0.8

func (DepositAuthorization) MsgTypeURL() string

MsgTypeURL implements Authorization.MsgTypeURL.

func (*DepositAuthorization) ProtoMessage added in v0.0.8

func (*DepositAuthorization) ProtoMessage()

func (*DepositAuthorization) Reset added in v0.0.8

func (m *DepositAuthorization) Reset()

func (*DepositAuthorization) Size added in v0.0.8

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

func (*DepositAuthorization) String added in v0.0.8

func (m *DepositAuthorization) String() string

func (*DepositAuthorization) Unmarshal added in v0.0.8

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

func (DepositAuthorization) ValidateBasic added in v0.0.8

func (a DepositAuthorization) ValidateBasic() error

ValidateBasic implements Authorization.ValidateBasic.

func (*DepositAuthorization) XXX_DiscardUnknown added in v0.0.8

func (m *DepositAuthorization) XXX_DiscardUnknown()

func (*DepositAuthorization) XXX_Marshal added in v0.0.8

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

func (*DepositAuthorization) XXX_Merge added in v0.0.8

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

func (*DepositAuthorization) XXX_Size added in v0.0.8

func (m *DepositAuthorization) XXX_Size() int

func (*DepositAuthorization) XXX_Unmarshal added in v0.0.8

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

type DepositTicketPayload added in v0.0.7

type DepositTicketPayload struct {
	// kyc_data contains the details of user kyc.
	KycData types.KycDataPayload `protobuf:"bytes,1,opt,name=kyc_data,json=kycData,proto3" json:"kyc_data"`
	// depositor_address is the account who makes a deposit
	DepositorAddress string `` /* 134-byte string literal not displayed */
}

DepositTicketPayload indicates data of the deposit ticket.

func (*DepositTicketPayload) Descriptor added in v0.0.7

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

func (*DepositTicketPayload) GetDepositorAddress added in v0.0.8

func (m *DepositTicketPayload) GetDepositorAddress() string

func (*DepositTicketPayload) GetKycData added in v0.0.7

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

func (*DepositTicketPayload) Marshal added in v0.0.7

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

func (*DepositTicketPayload) MarshalTo added in v0.0.7

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

func (*DepositTicketPayload) MarshalToSizedBuffer added in v0.0.7

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

func (*DepositTicketPayload) ProtoMessage added in v0.0.7

func (*DepositTicketPayload) ProtoMessage()

func (*DepositTicketPayload) Reset added in v0.0.7

func (m *DepositTicketPayload) Reset()

func (*DepositTicketPayload) Size added in v0.0.7

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

func (*DepositTicketPayload) String added in v0.0.7

func (m *DepositTicketPayload) String() string

func (*DepositTicketPayload) Unmarshal added in v0.0.7

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

func (*DepositTicketPayload) Validate added in v0.0.7

func (payload *DepositTicketPayload) Validate(depositor string) error

Validate validates deposit ticket payload.

func (*DepositTicketPayload) XXX_DiscardUnknown added in v0.0.7

func (m *DepositTicketPayload) XXX_DiscardUnknown()

func (*DepositTicketPayload) XXX_Marshal added in v0.0.7

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

func (*DepositTicketPayload) XXX_Merge added in v0.0.7

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

func (*DepositTicketPayload) XXX_Size added in v0.0.7

func (m *DepositTicketPayload) XXX_Size() int

func (*DepositTicketPayload) XXX_Unmarshal added in v0.0.7

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

type GenesisState

type GenesisState struct {
	// params defines the parameters of the house module at genesis
	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 HouseFeeCollectorFunder added in v0.0.8

type HouseFeeCollectorFunder struct{}

func (HouseFeeCollectorFunder) GetModuleAcc added in v0.0.8

func (HouseFeeCollectorFunder) GetModuleAcc() string

type MsgClient

type MsgClient interface {
	// Deposit defines a method for performing a deposit of tokens to become part
	// of the order book or be the house for an order book corresponding to a
	// market.
	Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error)
	// Withdraw defines a method for performing a withdrawal of tokens 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 is the account who makes a deposit
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	// market_uid is the uid of market/order book against which deposit is being
	// made.
	MarketUID string `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	// amount is the amount being deposited on an order book to be a house
	Amount cosmossdk_io_math.Int `protobuf:"bytes,3,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
	// ticket is the jwt ticket data.
	Ticket string `protobuf:"bytes,4,opt,name=ticket,proto3" json:"ticket,omitempty"`
}

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 sdkmath.Int, ticket string) *MsgDeposit

NewMsgDeposit creates the new input for adding deposit to blockchain

func (*MsgDeposit) Descriptor

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

func (*MsgDeposit) EmitEvent added in v0.0.8

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

EmitEvent emits the event for the message success.

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 (*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 (*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) ValidateSanity added in v0.0.7

func (msg MsgDeposit) ValidateSanity(_ sdk.Context, p *Params) error

ValidateSanity validates deposit acceptability

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 {
	// market_uid is the uid of market/order book against which deposit is being
	// made.
	MarketUID string `protobuf:"bytes,1,opt,name=market_uid,proto3" json:"market_uid"`
	// participation_index is the index corresponding to the order book
	// participation
	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 added in v0.0.6

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 tokens to become part
	// of the order book or be the house for an order book corresponding to a
	// market.
	Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error)
	// Withdraw defines a method for performing a withdrawal of tokens 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"`
	// participation_index is the index corresponding to the order book
	// participation
	ParticipationIndex uint64 `` /* 143-byte string literal not displayed */
	// mode is the withdrawal mode. It can be full or partial withdraw
	Mode WithdrawalMode `protobuf:"varint,4,opt,name=mode,proto3,enum=sgenetwork.sge.house.WithdrawalMode" json:"mode,omitempty" yaml:"mode"`
	// amount is the requested withdrawal amount
	Amount cosmossdk_io_math.Int `protobuf:"bytes,5,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
	// ticket is the jwt ticket data.
	Ticket string `protobuf:"bytes,6,opt,name=ticket,proto3" json:"ticket,omitempty"`
}

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

func NewMsgWithdraw

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

NewMsgWithdraw creates the new input for withdrawal of a deposit

func (*MsgWithdraw) Descriptor

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

func (*MsgWithdraw) EmitEvent added in v0.0.8

func (msg *MsgWithdraw) EmitEvent(ctx *sdk.Context, depositor string, withdrawalID uint64)

EmitEvent emits the event for the message success.

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 (*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 (*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 is the unique identifier for the withdrawal
	ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id" yaml:"id"`
	// market_uid is the id of market/order book from which withdrawal is made
	MarketUID string `protobuf:"bytes,2,opt,name=market_uid,proto3" json:"market_uid"`
	// participation_index is the index in order book from which withdrawal is
	// made
	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 added in v0.0.6

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 OVMKeeper added in v0.0.7

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

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

type OrderbookKeeper added in v0.0.8

type OrderbookKeeper interface {
	InitiateOrderBookParticipation(ctx sdk.Context, addr sdk.AccAddress, bookUID string,
		liquidity, fee sdkmath.Int,
	) (uint64, error)
	CalcWithdrawalAmount(ctx sdk.Context, depositorAddress, marketUID string,
		participationIndex uint64, mode WithdrawalMode, totalWithdrawnAmount, amount sdkmath.Int,
	) (sdkmath.Int, error)
	WithdrawOrderBookParticipation(ctx sdk.Context, marketUID string,
		participationIndex uint64, amount sdkmath.Int,
	) error
}

OrderbookKeeper defines the expected orderbook keeper.

type Params

type Params struct {
	// min_deposit is the minimum acceptable deposit amount.
	MinDeposit cosmossdk_io_math.Int `` /* 133-byte string literal not displayed */
	// house_participation_fee is the % of the deposit to be paid for a house
	// participation by the depositor.
	HouseParticipationFee github_com_cosmos_cosmos_sdk_types.Dec `` /* 166-byte string literal not displayed */
	// max_withdrawal_count is the maximum number of withdrawals allowed
	// per participation index.
	MaxWithdrawalCount uint64 `` /* 146-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 sdkmath.Int, houseParticipationFee sdk.Dec, maxWithdrawalCount uint64) Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

func (*Params) GetMaxWithdrawalCount added in v1.1.1

func (m *Params) GetMaxWithdrawalCount() uint64

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

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

ParamSetPairs 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)
	// DepositsByAccount queries deposits info for given account.
	DepositsByAccount(ctx context.Context, in *QueryDepositsByAccountRequest, opts ...grpc.CallOption) (*QueryDepositsByAccountResponse, error)
	// WithdrawalsByAccount queries withdrawals info for given account.
	WithdrawalsByAccount(ctx context.Context, in *QueryWithdrawalsByAccountRequest, opts ...grpc.CallOption) (*QueryWithdrawalsByAccountResponse, error)
	// Queries a wthdrawal by depositor, market, participation index and id.
	Withdrawal(ctx context.Context, in *QueryWithdrawalRequest, opts ...grpc.CallOption) (*QueryWithdrawalResponse, 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 QueryDepositsByAccountRequest added in v0.0.6

type QueryDepositsByAccountRequest struct {
	// address defines the address of depositor/account for which deposits are
	// queried.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryDepositsByAccountRequest is request type for Query/DepositsByAccount RPC method.

func (*QueryDepositsByAccountRequest) Descriptor added in v0.0.6

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

func (*QueryDepositsByAccountRequest) GetAddress added in v0.0.6

func (m *QueryDepositsByAccountRequest) GetAddress() string

func (*QueryDepositsByAccountRequest) GetPagination added in v0.0.6

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

func (*QueryDepositsByAccountRequest) Marshal added in v0.0.6

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

func (*QueryDepositsByAccountRequest) MarshalTo added in v0.0.6

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

func (*QueryDepositsByAccountRequest) MarshalToSizedBuffer added in v0.0.6

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

func (*QueryDepositsByAccountRequest) ProtoMessage added in v0.0.6

func (*QueryDepositsByAccountRequest) ProtoMessage()

func (*QueryDepositsByAccountRequest) Reset added in v0.0.6

func (m *QueryDepositsByAccountRequest) Reset()

func (*QueryDepositsByAccountRequest) Size added in v0.0.6

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

func (*QueryDepositsByAccountRequest) String added in v0.0.6

func (*QueryDepositsByAccountRequest) Unmarshal added in v0.0.6

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

func (*QueryDepositsByAccountRequest) XXX_DiscardUnknown added in v0.0.6

func (m *QueryDepositsByAccountRequest) XXX_DiscardUnknown()

func (*QueryDepositsByAccountRequest) XXX_Marshal added in v0.0.6

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

func (*QueryDepositsByAccountRequest) XXX_Merge added in v0.0.6

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

func (*QueryDepositsByAccountRequest) XXX_Size added in v0.0.6

func (m *QueryDepositsByAccountRequest) XXX_Size() int

func (*QueryDepositsByAccountRequest) XXX_Unmarshal added in v0.0.6

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

type QueryDepositsByAccountResponse added in v0.0.6

type QueryDepositsByAccountResponse 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"`
}

QueryDepositsByAccountResponse is response type for the Query/DepositsByAccount RPC method

func (*QueryDepositsByAccountResponse) Descriptor added in v0.0.6

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

func (*QueryDepositsByAccountResponse) GetDeposits added in v0.0.6

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

func (*QueryDepositsByAccountResponse) GetPagination added in v0.0.6

func (*QueryDepositsByAccountResponse) Marshal added in v0.0.6

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

func (*QueryDepositsByAccountResponse) MarshalTo added in v0.0.6

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

func (*QueryDepositsByAccountResponse) MarshalToSizedBuffer added in v0.0.6

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

func (*QueryDepositsByAccountResponse) ProtoMessage added in v0.0.6

func (*QueryDepositsByAccountResponse) ProtoMessage()

func (*QueryDepositsByAccountResponse) Reset added in v0.0.6

func (m *QueryDepositsByAccountResponse) Reset()

func (*QueryDepositsByAccountResponse) Size added in v0.0.6

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

func (*QueryDepositsByAccountResponse) String added in v0.0.6

func (*QueryDepositsByAccountResponse) Unmarshal added in v0.0.6

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

func (*QueryDepositsByAccountResponse) XXX_DiscardUnknown added in v0.0.6

func (m *QueryDepositsByAccountResponse) XXX_DiscardUnknown()

func (*QueryDepositsByAccountResponse) XXX_Marshal added in v0.0.6

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

func (*QueryDepositsByAccountResponse) XXX_Merge added in v0.0.6

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

func (*QueryDepositsByAccountResponse) XXX_Size added in v0.0.6

func (m *QueryDepositsByAccountResponse) XXX_Size() int

func (*QueryDepositsByAccountResponse) XXX_Unmarshal added in v0.0.6

func (m *QueryDepositsByAccountResponse) 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 is the list of deposits returned for the request.
	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)
	// DepositsByAccount queries deposits info for given account.
	DepositsByAccount(context.Context, *QueryDepositsByAccountRequest) (*QueryDepositsByAccountResponse, error)
	// WithdrawalsByAccount queries withdrawals info for given account.
	WithdrawalsByAccount(context.Context, *QueryWithdrawalsByAccountRequest) (*QueryWithdrawalsByAccountResponse, error)
	// Queries a wthdrawal by depositor, market, participation index and id.
	Withdrawal(context.Context, *QueryWithdrawalRequest) (*QueryWithdrawalResponse, error)
}

QueryServer is the server API for Query service.

type QueryWithdrawalRequest added in v0.0.8

type QueryWithdrawalRequest struct {
	DepositorAddress string `protobuf:"bytes,1,opt,name=depositor_address,json=depositorAddress,proto3" json:"depositor_address,omitempty"`
	MarketUid        string `protobuf:"bytes,2,opt,name=market_uid,json=marketUid,proto3" json:"market_uid,omitempty"`
	// participation_index is the index corresponding to the order book
	// participation
	ParticipationIndex uint64 `protobuf:"varint,3,opt,name=participation_index,json=participationIndex,proto3" json:"participation_index,omitempty"`
	// id is the sequential id of the withdrawal
	Id uint64 `protobuf:"varint,4,opt,name=id,proto3" json:"id,omitempty"`
}

QueryWithdrawalRequest is the request type for the Query/Withdrawal RPC method. Query/Withdrawal RPC method.

func (*QueryWithdrawalRequest) Descriptor added in v0.0.8

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

func (*QueryWithdrawalRequest) GetDepositorAddress added in v0.0.8

func (m *QueryWithdrawalRequest) GetDepositorAddress() string

func (*QueryWithdrawalRequest) GetId added in v0.0.8

func (m *QueryWithdrawalRequest) GetId() uint64

func (*QueryWithdrawalRequest) GetMarketUid added in v0.0.8

func (m *QueryWithdrawalRequest) GetMarketUid() string

func (*QueryWithdrawalRequest) GetParticipationIndex added in v0.0.8

func (m *QueryWithdrawalRequest) GetParticipationIndex() uint64

func (*QueryWithdrawalRequest) Marshal added in v0.0.8

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

func (*QueryWithdrawalRequest) MarshalTo added in v0.0.8

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

func (*QueryWithdrawalRequest) MarshalToSizedBuffer added in v0.0.8

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

func (*QueryWithdrawalRequest) ProtoMessage added in v0.0.8

func (*QueryWithdrawalRequest) ProtoMessage()

func (*QueryWithdrawalRequest) Reset added in v0.0.8

func (m *QueryWithdrawalRequest) Reset()

func (*QueryWithdrawalRequest) Size added in v0.0.8

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

func (*QueryWithdrawalRequest) String added in v0.0.8

func (m *QueryWithdrawalRequest) String() string

func (*QueryWithdrawalRequest) Unmarshal added in v0.0.8

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

func (*QueryWithdrawalRequest) XXX_DiscardUnknown added in v0.0.8

func (m *QueryWithdrawalRequest) XXX_DiscardUnknown()

func (*QueryWithdrawalRequest) XXX_Marshal added in v0.0.8

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

func (*QueryWithdrawalRequest) XXX_Merge added in v0.0.8

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

func (*QueryWithdrawalRequest) XXX_Size added in v0.0.8

func (m *QueryWithdrawalRequest) XXX_Size() int

func (*QueryWithdrawalRequest) XXX_Unmarshal added in v0.0.8

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

type QueryWithdrawalResponse added in v0.0.8

type QueryWithdrawalResponse struct {
	// withdrawal holds all the withdrawal properties.
	Withdrawal Withdrawal `protobuf:"bytes,1,opt,name=withdrawal,proto3" json:"withdrawal"`
}

QueryWithdrawalResponse is the response type for the Query/Withdrawal RPC method. Query/Withdrawal RPC method.

func (*QueryWithdrawalResponse) Descriptor added in v0.0.8

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

func (*QueryWithdrawalResponse) GetWithdrawal added in v0.0.8

func (m *QueryWithdrawalResponse) GetWithdrawal() Withdrawal

func (*QueryWithdrawalResponse) Marshal added in v0.0.8

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

func (*QueryWithdrawalResponse) MarshalTo added in v0.0.8

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

func (*QueryWithdrawalResponse) MarshalToSizedBuffer added in v0.0.8

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

func (*QueryWithdrawalResponse) ProtoMessage added in v0.0.8

func (*QueryWithdrawalResponse) ProtoMessage()

func (*QueryWithdrawalResponse) Reset added in v0.0.8

func (m *QueryWithdrawalResponse) Reset()

func (*QueryWithdrawalResponse) Size added in v0.0.8

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

func (*QueryWithdrawalResponse) String added in v0.0.8

func (m *QueryWithdrawalResponse) String() string

func (*QueryWithdrawalResponse) Unmarshal added in v0.0.8

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

func (*QueryWithdrawalResponse) XXX_DiscardUnknown added in v0.0.8

func (m *QueryWithdrawalResponse) XXX_DiscardUnknown()

func (*QueryWithdrawalResponse) XXX_Marshal added in v0.0.8

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

func (*QueryWithdrawalResponse) XXX_Merge added in v0.0.8

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

func (*QueryWithdrawalResponse) XXX_Size added in v0.0.8

func (m *QueryWithdrawalResponse) XXX_Size() int

func (*QueryWithdrawalResponse) XXX_Unmarshal added in v0.0.8

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

type QueryWithdrawalsByAccountRequest added in v0.0.6

type QueryWithdrawalsByAccountRequest struct {
	// address defines the address of depositor/account for which withdrawals are
	// queried.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"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/WithdrawalsByAccount RPC method.

func (*QueryWithdrawalsByAccountRequest) Descriptor added in v0.0.6

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

func (*QueryWithdrawalsByAccountRequest) GetAddress added in v0.0.6

func (m *QueryWithdrawalsByAccountRequest) GetAddress() string

func (*QueryWithdrawalsByAccountRequest) GetPagination added in v0.0.6

func (*QueryWithdrawalsByAccountRequest) Marshal added in v0.0.6

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

func (*QueryWithdrawalsByAccountRequest) MarshalTo added in v0.0.6

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

func (*QueryWithdrawalsByAccountRequest) MarshalToSizedBuffer added in v0.0.6

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

func (*QueryWithdrawalsByAccountRequest) ProtoMessage added in v0.0.6

func (*QueryWithdrawalsByAccountRequest) ProtoMessage()

func (*QueryWithdrawalsByAccountRequest) Reset added in v0.0.6

func (*QueryWithdrawalsByAccountRequest) Size added in v0.0.6

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

func (*QueryWithdrawalsByAccountRequest) String added in v0.0.6

func (*QueryWithdrawalsByAccountRequest) Unmarshal added in v0.0.6

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

func (*QueryWithdrawalsByAccountRequest) XXX_DiscardUnknown added in v0.0.6

func (m *QueryWithdrawalsByAccountRequest) XXX_DiscardUnknown()

func (*QueryWithdrawalsByAccountRequest) XXX_Marshal added in v0.0.6

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

func (*QueryWithdrawalsByAccountRequest) XXX_Merge added in v0.0.6

func (*QueryWithdrawalsByAccountRequest) XXX_Size added in v0.0.6

func (m *QueryWithdrawalsByAccountRequest) XXX_Size() int

func (*QueryWithdrawalsByAccountRequest) XXX_Unmarshal added in v0.0.6

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

type QueryWithdrawalsByAccountResponse added in v0.0.6

type QueryWithdrawalsByAccountResponse 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"`
}

QueryWithdrawalsByAccountResponse is response type for the Query/WithdrawalsByAccount RPC method

func (*QueryWithdrawalsByAccountResponse) Descriptor added in v0.0.6

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

func (*QueryWithdrawalsByAccountResponse) GetPagination added in v0.0.6

func (*QueryWithdrawalsByAccountResponse) GetWithdrawals added in v0.0.6

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

func (*QueryWithdrawalsByAccountResponse) Marshal added in v0.0.6

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

func (*QueryWithdrawalsByAccountResponse) MarshalTo added in v0.0.6

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

func (*QueryWithdrawalsByAccountResponse) MarshalToSizedBuffer added in v0.0.6

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

func (*QueryWithdrawalsByAccountResponse) ProtoMessage added in v0.0.6

func (*QueryWithdrawalsByAccountResponse) ProtoMessage()

func (*QueryWithdrawalsByAccountResponse) Reset added in v0.0.6

func (*QueryWithdrawalsByAccountResponse) Size added in v0.0.6

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

func (*QueryWithdrawalsByAccountResponse) String added in v0.0.6

func (*QueryWithdrawalsByAccountResponse) Unmarshal added in v0.0.6

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

func (*QueryWithdrawalsByAccountResponse) XXX_DiscardUnknown added in v0.0.6

func (m *QueryWithdrawalsByAccountResponse) XXX_DiscardUnknown()

func (*QueryWithdrawalsByAccountResponse) XXX_Marshal added in v0.0.6

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

func (*QueryWithdrawalsByAccountResponse) XXX_Merge added in v0.0.6

func (*QueryWithdrawalsByAccountResponse) XXX_Size added in v0.0.6

func (m *QueryWithdrawalsByAccountResponse) XXX_Size() int

func (*QueryWithdrawalsByAccountResponse) XXX_Unmarshal added in v0.0.6

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

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

func (*UnimplementedQueryServer) DepositsByAccount added in v0.0.6

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) Withdrawal added in v0.0.8

func (*UnimplementedQueryServer) WithdrawalsByAccount added in v0.0.6

type WithdrawAuthorization added in v0.0.8

type WithdrawAuthorization struct {
	WithdrawLimit cosmossdk_io_math.Int `protobuf:"bytes,1,opt,name=withdraw_limit,json=withdrawLimit,proto3,customtype=cosmossdk.io/math.Int" json:"withdraw_limit"`
}

WithdrawAuthorization allows the grantee to withdraw up to withdraw_limit from the granter's account for deposit.

func NewWithdrawAuthorization added in v0.0.8

func NewWithdrawAuthorization(withdrawLimit sdkmath.Int) *WithdrawAuthorization

NewWithdrawAuthorization creates a new WithdrawAuthorization object.

func (WithdrawAuthorization) Accept added in v0.0.8

Accept implements Authorization.Accept.

func (*WithdrawAuthorization) Descriptor added in v0.0.8

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

func (*WithdrawAuthorization) Marshal added in v0.0.8

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

func (*WithdrawAuthorization) MarshalTo added in v0.0.8

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

func (*WithdrawAuthorization) MarshalToSizedBuffer added in v0.0.8

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

func (WithdrawAuthorization) MsgTypeURL added in v0.0.8

func (WithdrawAuthorization) MsgTypeURL() string

MsgTypeURL implements Authorization.MsgTypeURL.

func (*WithdrawAuthorization) ProtoMessage added in v0.0.8

func (*WithdrawAuthorization) ProtoMessage()

func (*WithdrawAuthorization) Reset added in v0.0.8

func (m *WithdrawAuthorization) Reset()

func (*WithdrawAuthorization) Size added in v0.0.8

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

func (*WithdrawAuthorization) String added in v0.0.8

func (m *WithdrawAuthorization) String() string

func (*WithdrawAuthorization) Unmarshal added in v0.0.8

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

func (WithdrawAuthorization) ValidateBasic added in v0.0.8

func (a WithdrawAuthorization) ValidateBasic() error

ValidateBasic implements Authorization.ValidateBasic.

func (*WithdrawAuthorization) XXX_DiscardUnknown added in v0.0.8

func (m *WithdrawAuthorization) XXX_DiscardUnknown()

func (*WithdrawAuthorization) XXX_Marshal added in v0.0.8

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

func (*WithdrawAuthorization) XXX_Merge added in v0.0.8

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

func (*WithdrawAuthorization) XXX_Size added in v0.0.8

func (m *WithdrawAuthorization) XXX_Size() int

func (*WithdrawAuthorization) XXX_Unmarshal added in v0.0.8

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

type WithdrawTicketPayload added in v0.0.7

type WithdrawTicketPayload struct {
	// kyc_data contains the details of user kyc.
	KycData types.KycDataPayload `protobuf:"bytes,1,opt,name=kyc_data,json=kycData,proto3" json:"kyc_data"`
	// depositor_address is the account who makes a deposit
	DepositorAddress string `` /* 134-byte string literal not displayed */
}

WithdrawTicketPayload indicates data of the withdrawal ticket.

func (*WithdrawTicketPayload) Descriptor added in v0.0.7

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

func (*WithdrawTicketPayload) GetDepositorAddress added in v0.0.8

func (m *WithdrawTicketPayload) GetDepositorAddress() string

func (*WithdrawTicketPayload) GetKycData added in v0.0.7

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

func (*WithdrawTicketPayload) Marshal added in v0.0.7

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

func (*WithdrawTicketPayload) MarshalTo added in v0.0.7

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

func (*WithdrawTicketPayload) MarshalToSizedBuffer added in v0.0.7

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

func (*WithdrawTicketPayload) ProtoMessage added in v0.0.7

func (*WithdrawTicketPayload) ProtoMessage()

func (*WithdrawTicketPayload) Reset added in v0.0.7

func (m *WithdrawTicketPayload) Reset()

func (*WithdrawTicketPayload) Size added in v0.0.7

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

func (*WithdrawTicketPayload) String added in v0.0.7

func (m *WithdrawTicketPayload) String() string

func (*WithdrawTicketPayload) Unmarshal added in v0.0.7

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

func (*WithdrawTicketPayload) Validate added in v0.0.7

func (payload *WithdrawTicketPayload) Validate(depositor string) error

Validate validates withdrawal payload.

func (*WithdrawTicketPayload) XXX_DiscardUnknown added in v0.0.7

func (m *WithdrawTicketPayload) XXX_DiscardUnknown()

func (*WithdrawTicketPayload) XXX_Marshal added in v0.0.7

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

func (*WithdrawTicketPayload) XXX_Merge added in v0.0.7

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

func (*WithdrawTicketPayload) XXX_Size added in v0.0.7

func (m *WithdrawTicketPayload) XXX_Size() int

func (*WithdrawTicketPayload) XXX_Unmarshal added in v0.0.7

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

type Withdrawal

type Withdrawal struct {
	// creator is the bech32-encoded address of the depositor.
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	// withdrawal is the withdrawal attempt id.
	ID uint64 `protobuf:"varint,2,opt,name=id,proto3" json:"id" yaml:"id"`
	// address is the bech32-encoded address of the depositor.
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	// market_uid is the uid of market against which the deposit is
	// being made.
	MarketUID string `protobuf:"bytes,4,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,6,opt,name=mode,proto3,enum=sgenetwork.sge.house.WithdrawalMode" json:"mode,omitempty" yaml:"mode"`
	// amount is the amount being withdrawn.
	Amount cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount" yaml:"amount"`
}

Withdrawal represents the withdrawal against a deposit.

func NewWithdrawal

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

NewWithdrawal creates a new withdrawal object

func UnmarshalWithdrawal

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

UnmarshalWithdrawal 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