types

package
v1.5.1-0...-cf97193 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: MIT Imports: 32 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ModuleName   = "commerciomint"
	StoreKey     = ModuleName
	RouterKey    = ModuleName
	QuerierRoute = ModuleName
	MemStoreKey  = "mem_" + ModuleName

	EtpStorePrefix = StoreKey + ":etp:"
	CreditsDenom   = "uccc"
	BondDenom      = "ucommercio"

	QueryGetEtpRest         = "etp"
	QueryGetallEtpsRest     = "etps"
	QueryGetEtpsByOwnerRest = "etpsOwner"
	QueryConversionRateRest = "conversion_rate"
	QueryFreezePeriodRest   = "freeze_period"
	QueryGetParamsRest      = "params"

	MsgTypeMintCCC   = "mintCCC"
	MsgTypeBurnCCC   = "burnCCC"
	MsgTypeSetParams = "setParams"
)

Variables

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 (
	DefaultConversionRate               = sdk.NewDec(1)
	DefaultFreezePeriod   time.Duration = time.Hour * 24 * 7 * 3
	KeyConversionRate                   = []byte("ConversionRate")
	KeyFreezePeriod                     = []byte("FreezePeriod")
)
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 (
	ErrInvalidLengthPosition        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPosition          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPosition = 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")
)

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable for commerciomint module.

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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

func RegisterQueryHandlerClient

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

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

func RegisterQueryHandlerFromEndpoint

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

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

func RegisterQueryHandlerServer

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

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

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateConversionRate

func ValidateConversionRate(conversionRate sdk.Dec) error

func ValidateCredits

func ValidateCredits(credits sdk.Coin) bool

func ValidateDeposit

func ValidateDeposit(deposit sdk.Coins) bool

func ValidateFreezePeriod

func ValidateFreezePeriod(freezePeriod time.Duration) error

Types

type GenesisState

type GenesisState struct {
	Positions  []*Position                              `protobuf:"bytes,1,rep,name=Positions,proto3" json:"Positions,omitempty"`
	PoolAmount github_com_cosmos_cosmos_sdk_types.Coins `` /* 135-byte string literal not displayed */
	Params     Params                                   `protobuf:"bytes,4,opt,name=params,proto3" json:"params"`
}

GenesisState defines the id module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPoolAmount

func (*GenesisState) GetPositions

func (m *GenesisState) GetPositions() []*Position

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 MsgBurnCCC

type MsgBurnCCC struct {
	Signer string      `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	Amount *types.Coin `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	ID     string      `protobuf:"bytes,3,opt,name=ID,proto3" json:"ID,omitempty"`
}

func NewMsgBurnCCC

func NewMsgBurnCCC(signer sdk.AccAddress, id string, amount sdk.Coin) *MsgBurnCCC

TODO REVIEW MESSAGES CREATOR

func (*MsgBurnCCC) Descriptor

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

func (*MsgBurnCCC) GetAmount

func (m *MsgBurnCCC) GetAmount() *types.Coin

func (*MsgBurnCCC) GetID

func (m *MsgBurnCCC) GetID() string

func (*MsgBurnCCC) GetSignBytes

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

func (*MsgBurnCCC) GetSigner

func (m *MsgBurnCCC) GetSigner() string

func (*MsgBurnCCC) GetSigners

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

func (*MsgBurnCCC) Marshal

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

func (*MsgBurnCCC) MarshalTo

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

func (*MsgBurnCCC) MarshalToSizedBuffer

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

func (*MsgBurnCCC) ProtoMessage

func (*MsgBurnCCC) ProtoMessage()

func (*MsgBurnCCC) Reset

func (m *MsgBurnCCC) Reset()

func (*MsgBurnCCC) Route

func (msg *MsgBurnCCC) Route() string

func (*MsgBurnCCC) Size

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

func (*MsgBurnCCC) String

func (m *MsgBurnCCC) String() string

func (*MsgBurnCCC) Type

func (msg *MsgBurnCCC) Type() string

func (*MsgBurnCCC) Unmarshal

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

func (*MsgBurnCCC) ValidateBasic

func (msg *MsgBurnCCC) ValidateBasic() error

func (*MsgBurnCCC) XXX_DiscardUnknown

func (m *MsgBurnCCC) XXX_DiscardUnknown()

func (*MsgBurnCCC) XXX_Marshal

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

func (*MsgBurnCCC) XXX_Merge

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

func (*MsgBurnCCC) XXX_Size

func (m *MsgBurnCCC) XXX_Size() int

func (*MsgBurnCCC) XXX_Unmarshal

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

type MsgBurnCCCResponse

type MsgBurnCCCResponse struct {
	ID       string      `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Residual *types.Coin `protobuf:"bytes,2,opt,name=residual,proto3" json:"residual,omitempty"`
}

func (*MsgBurnCCCResponse) Descriptor

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

func (*MsgBurnCCCResponse) GetID

func (m *MsgBurnCCCResponse) GetID() string

func (*MsgBurnCCCResponse) GetResidual

func (m *MsgBurnCCCResponse) GetResidual() *types.Coin

func (*MsgBurnCCCResponse) Marshal

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

func (*MsgBurnCCCResponse) MarshalTo

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

func (*MsgBurnCCCResponse) MarshalToSizedBuffer

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

func (*MsgBurnCCCResponse) ProtoMessage

func (*MsgBurnCCCResponse) ProtoMessage()

func (*MsgBurnCCCResponse) Reset

func (m *MsgBurnCCCResponse) Reset()

func (*MsgBurnCCCResponse) Size

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

func (*MsgBurnCCCResponse) String

func (m *MsgBurnCCCResponse) String() string

func (*MsgBurnCCCResponse) Unmarshal

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

func (*MsgBurnCCCResponse) XXX_DiscardUnknown

func (m *MsgBurnCCCResponse) XXX_DiscardUnknown()

func (*MsgBurnCCCResponse) XXX_Marshal

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

func (*MsgBurnCCCResponse) XXX_Merge

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

func (*MsgBurnCCCResponse) XXX_Size

func (m *MsgBurnCCCResponse) XXX_Size() int

func (*MsgBurnCCCResponse) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	MintCCC(ctx context.Context, in *MsgMintCCC, opts ...grpc.CallOption) (*MsgMintCCCResponse, error)
	BurnCCC(ctx context.Context, in *MsgBurnCCC, opts ...grpc.CallOption) (*MsgBurnCCCResponse, error)
	SetParams(ctx context.Context, in *MsgSetParams, opts ...grpc.CallOption) (*MsgSetParamsResponse, 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 MsgMintCCC

type MsgMintCCC struct {
	Depositor     string        `protobuf:"bytes,1,opt,name=depositor,proto3" json:"depositor,omitempty"`
	DepositAmount []*types.Coin `protobuf:"bytes,2,rep,name=deposit_amount,json=depositAmount,proto3" json:"deposit_amount,omitempty"`
	ID            string        `protobuf:"bytes,3,opt,name=ID,proto3" json:"ID,omitempty"`
}

func NewMsgMintCCC

func NewMsgMintCCC(position Position) *MsgMintCCC

func (*MsgMintCCC) Descriptor

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

func (*MsgMintCCC) GetDepositAmount

func (m *MsgMintCCC) GetDepositAmount() []*types.Coin

func (*MsgMintCCC) GetDepositor

func (m *MsgMintCCC) GetDepositor() string

func (*MsgMintCCC) GetID

func (m *MsgMintCCC) GetID() string

func (*MsgMintCCC) GetSignBytes

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

func (*MsgMintCCC) GetSigners

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

func (*MsgMintCCC) Marshal

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

func (*MsgMintCCC) MarshalTo

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

func (*MsgMintCCC) MarshalToSizedBuffer

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

func (*MsgMintCCC) ProtoMessage

func (*MsgMintCCC) ProtoMessage()

func (*MsgMintCCC) Reset

func (m *MsgMintCCC) Reset()

func (*MsgMintCCC) Route

func (msg *MsgMintCCC) Route() string

func (*MsgMintCCC) Size

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

func (*MsgMintCCC) String

func (m *MsgMintCCC) String() string

func (*MsgMintCCC) Type

func (msg *MsgMintCCC) Type() string

func (*MsgMintCCC) Unmarshal

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

func (*MsgMintCCC) ValidateBasic

func (msg *MsgMintCCC) ValidateBasic() error

func (*MsgMintCCC) XXX_DiscardUnknown

func (m *MsgMintCCC) XXX_DiscardUnknown()

func (*MsgMintCCC) XXX_Marshal

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

func (*MsgMintCCC) XXX_Merge

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

func (*MsgMintCCC) XXX_Size

func (m *MsgMintCCC) XXX_Size() int

func (*MsgMintCCC) XXX_Unmarshal

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

type MsgMintCCCResponse

type MsgMintCCCResponse struct {
	ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
}

func (*MsgMintCCCResponse) Descriptor

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

func (*MsgMintCCCResponse) GetID

func (m *MsgMintCCCResponse) GetID() string

func (*MsgMintCCCResponse) Marshal

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

func (*MsgMintCCCResponse) MarshalTo

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

func (*MsgMintCCCResponse) MarshalToSizedBuffer

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

func (*MsgMintCCCResponse) ProtoMessage

func (*MsgMintCCCResponse) ProtoMessage()

func (*MsgMintCCCResponse) Reset

func (m *MsgMintCCCResponse) Reset()

func (*MsgMintCCCResponse) Size

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

func (*MsgMintCCCResponse) String

func (m *MsgMintCCCResponse) String() string

func (*MsgMintCCCResponse) Unmarshal

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

func (*MsgMintCCCResponse) XXX_DiscardUnknown

func (m *MsgMintCCCResponse) XXX_DiscardUnknown()

func (*MsgMintCCCResponse) XXX_Marshal

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

func (*MsgMintCCCResponse) XXX_Merge

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

func (*MsgMintCCCResponse) XXX_Size

func (m *MsgMintCCCResponse) XXX_Size() int

func (*MsgMintCCCResponse) XXX_Unmarshal

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

type MsgServer

MsgServer is the server API for Msg service.

type MsgSetParams

type MsgSetParams struct {
	Signer string  `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
	Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
}

func NewMsgSetParams

func NewMsgSetParams(government string, conversionRate sdk.Dec, freezePeriod time.Duration) *MsgSetParams

func (*MsgSetParams) Descriptor

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

func (*MsgSetParams) GetParams

func (m *MsgSetParams) GetParams() *Params

func (*MsgSetParams) GetSignBytes

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

func (*MsgSetParams) GetSigner

func (m *MsgSetParams) GetSigner() string

func (*MsgSetParams) GetSigners

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

func (*MsgSetParams) Marshal

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

func (*MsgSetParams) MarshalTo

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

func (*MsgSetParams) MarshalToSizedBuffer

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

func (*MsgSetParams) ProtoMessage

func (*MsgSetParams) ProtoMessage()

func (*MsgSetParams) Reset

func (m *MsgSetParams) Reset()

func (*MsgSetParams) Route

func (msg *MsgSetParams) Route() string

func (*MsgSetParams) Size

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

func (*MsgSetParams) String

func (m *MsgSetParams) String() string

func (*MsgSetParams) Type

func (msg *MsgSetParams) Type() string

func (*MsgSetParams) Unmarshal

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

func (*MsgSetParams) ValidateBasic

func (msg *MsgSetParams) ValidateBasic() error

func (*MsgSetParams) XXX_DiscardUnknown

func (m *MsgSetParams) XXX_DiscardUnknown()

func (*MsgSetParams) XXX_Marshal

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

func (*MsgSetParams) XXX_Merge

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

func (*MsgSetParams) XXX_Size

func (m *MsgSetParams) XXX_Size() int

func (*MsgSetParams) XXX_Unmarshal

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

type MsgSetParamsResponse

type MsgSetParamsResponse struct {
}

func (*MsgSetParamsResponse) Descriptor

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

func (*MsgSetParamsResponse) Marshal

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

func (*MsgSetParamsResponse) MarshalTo

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

func (*MsgSetParamsResponse) MarshalToSizedBuffer

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

func (*MsgSetParamsResponse) ProtoMessage

func (*MsgSetParamsResponse) ProtoMessage()

func (*MsgSetParamsResponse) Reset

func (m *MsgSetParamsResponse) Reset()

func (*MsgSetParamsResponse) Size

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

func (*MsgSetParamsResponse) String

func (m *MsgSetParamsResponse) String() string

func (*MsgSetParamsResponse) Unmarshal

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

func (*MsgSetParamsResponse) XXX_DiscardUnknown

func (m *MsgSetParamsResponse) XXX_DiscardUnknown()

func (*MsgSetParamsResponse) XXX_Marshal

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

func (*MsgSetParamsResponse) XXX_Merge

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

func (*MsgSetParamsResponse) XXX_Size

func (m *MsgSetParamsResponse) XXX_Size() int

func (*MsgSetParamsResponse) XXX_Unmarshal

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

type Params

type Params struct {
	ConversionRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 143-byte string literal not displayed */
	FreezePeriod   time.Duration                          `protobuf:"bytes,2,opt,name=freeze_period,json=freezePeriod,proto3,stdduration" json:"freeze_period"`
}

func NewParams

func NewParams(conversionRate sdk.Dec, freezePeriod time.Duration) Params

func (*Params) Descriptor

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

func (*Params) Equal

func (this *Params) Equal(that interface{}) bool

func (*Params) GetFreezePeriod

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

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

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (*Params) Validate

func (p *Params) Validate() error

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type Position

type Position struct {
	Owner        string                                 `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	Collateral   int64                                  `protobuf:"varint,2,opt,name=collateral,proto3" json:"collateral,omitempty"`
	Credits      *types.Coin                            `protobuf:"bytes,3,opt,name=credits,proto3" json:"credits,omitempty"`
	CreatedAt    *time.Time                             `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3,stdtime" json:"created_at,omitempty"`
	ID           string                                 `protobuf:"bytes,5,opt,name=ID,proto3" json:"ID,omitempty"`
	ExchangeRate github_com_cosmos_cosmos_sdk_types.Dec `` /* 137-byte string literal not displayed */
}

func NewPosition

func NewPosition(owner sdk.AccAddress, deposit sdk.Int, liquidity sdk.Coin, id string, createdAt time.Time, exchangeRate sdk.Dec) Position

func (*Position) Descriptor

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

func (Position) Equals

func (pos Position) Equals(etp Position) bool

Equals returns true if and only if the two Position instances are equal.

func (*Position) GetCollateral

func (m *Position) GetCollateral() int64

func (*Position) GetCreatedAt

func (m *Position) GetCreatedAt() *time.Time

func (*Position) GetCredits

func (m *Position) GetCredits() *types.Coin

func (*Position) GetID

func (m *Position) GetID() string

func (*Position) GetOwner

func (m *Position) GetOwner() string

func (*Position) Marshal

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

func (*Position) MarshalTo

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

func (*Position) MarshalToSizedBuffer

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

func (*Position) ProtoMessage

func (*Position) ProtoMessage()

func (*Position) Reset

func (m *Position) Reset()

func (*Position) Size

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

func (*Position) String

func (m *Position) String() string

func (*Position) Unmarshal

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

func (Position) Validate

func (pos Position) Validate() error

Validate verifies that the data contained inside this position are all valid, returning an error is something isn't valid

func (*Position) XXX_DiscardUnknown

func (m *Position) XXX_DiscardUnknown()

func (*Position) XXX_Marshal

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

func (*Position) XXX_Merge

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

func (*Position) XXX_Size

func (m *Position) XXX_Size() int

func (*Position) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Queries a Etp by id.
	Etp(ctx context.Context, in *QueryEtpRequest, opts ...grpc.CallOption) (*QueryEtpResponse, error)
	EtpsByOwner(ctx context.Context, in *QueryEtpsByOwnerRequest, opts ...grpc.CallOption) (*QueryEtpsResponse, error)
	Etps(ctx context.Context, in *QueryEtpsRequest, opts ...grpc.CallOption) (*QueryEtpsResponse, error)
	Params(ctx context.Context, in *QueryParams, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryEtpRequest

type QueryEtpRequest struct {
	ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
}

func (*QueryEtpRequest) Descriptor

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

func (*QueryEtpRequest) GetID

func (m *QueryEtpRequest) GetID() string

func (*QueryEtpRequest) Marshal

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

func (*QueryEtpRequest) MarshalTo

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

func (*QueryEtpRequest) MarshalToSizedBuffer

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

func (*QueryEtpRequest) ProtoMessage

func (*QueryEtpRequest) ProtoMessage()

func (*QueryEtpRequest) Reset

func (m *QueryEtpRequest) Reset()

func (*QueryEtpRequest) Size

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

func (*QueryEtpRequest) String

func (m *QueryEtpRequest) String() string

func (*QueryEtpRequest) Unmarshal

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

func (*QueryEtpRequest) XXX_DiscardUnknown

func (m *QueryEtpRequest) XXX_DiscardUnknown()

func (*QueryEtpRequest) XXX_Marshal

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

func (*QueryEtpRequest) XXX_Merge

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

func (*QueryEtpRequest) XXX_Size

func (m *QueryEtpRequest) XXX_Size() int

func (*QueryEtpRequest) XXX_Unmarshal

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

type QueryEtpResponse

type QueryEtpResponse struct {
	Position *Position `protobuf:"bytes,1,opt,name=Position,proto3" json:"Position,omitempty"`
}

func (*QueryEtpResponse) Descriptor

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

func (*QueryEtpResponse) GetPosition

func (m *QueryEtpResponse) GetPosition() *Position

func (*QueryEtpResponse) Marshal

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

func (*QueryEtpResponse) MarshalTo

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

func (*QueryEtpResponse) MarshalToSizedBuffer

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

func (*QueryEtpResponse) ProtoMessage

func (*QueryEtpResponse) ProtoMessage()

func (*QueryEtpResponse) Reset

func (m *QueryEtpResponse) Reset()

func (*QueryEtpResponse) Size

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

func (*QueryEtpResponse) String

func (m *QueryEtpResponse) String() string

func (*QueryEtpResponse) Unmarshal

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

func (*QueryEtpResponse) XXX_DiscardUnknown

func (m *QueryEtpResponse) XXX_DiscardUnknown()

func (*QueryEtpResponse) XXX_Marshal

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

func (*QueryEtpResponse) XXX_Merge

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

func (*QueryEtpResponse) XXX_Size

func (m *QueryEtpResponse) XXX_Size() int

func (*QueryEtpResponse) XXX_Unmarshal

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

type QueryEtpsByOwnerRequest

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

func (*QueryEtpsByOwnerRequest) Descriptor

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

func (*QueryEtpsByOwnerRequest) GetOwner

func (m *QueryEtpsByOwnerRequest) GetOwner() string

func (*QueryEtpsByOwnerRequest) GetPagination

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

func (*QueryEtpsByOwnerRequest) Marshal

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

func (*QueryEtpsByOwnerRequest) MarshalTo

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

func (*QueryEtpsByOwnerRequest) MarshalToSizedBuffer

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

func (*QueryEtpsByOwnerRequest) ProtoMessage

func (*QueryEtpsByOwnerRequest) ProtoMessage()

func (*QueryEtpsByOwnerRequest) Reset

func (m *QueryEtpsByOwnerRequest) Reset()

func (*QueryEtpsByOwnerRequest) Size

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

func (*QueryEtpsByOwnerRequest) String

func (m *QueryEtpsByOwnerRequest) String() string

func (*QueryEtpsByOwnerRequest) Unmarshal

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

func (*QueryEtpsByOwnerRequest) XXX_DiscardUnknown

func (m *QueryEtpsByOwnerRequest) XXX_DiscardUnknown()

func (*QueryEtpsByOwnerRequest) XXX_Marshal

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

func (*QueryEtpsByOwnerRequest) XXX_Merge

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

func (*QueryEtpsByOwnerRequest) XXX_Size

func (m *QueryEtpsByOwnerRequest) XXX_Size() int

func (*QueryEtpsByOwnerRequest) XXX_Unmarshal

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

type QueryEtpsRequest

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

func (*QueryEtpsRequest) Descriptor

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

func (*QueryEtpsRequest) GetPagination

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

func (*QueryEtpsRequest) Marshal

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

func (*QueryEtpsRequest) MarshalTo

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

func (*QueryEtpsRequest) MarshalToSizedBuffer

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

func (*QueryEtpsRequest) ProtoMessage

func (*QueryEtpsRequest) ProtoMessage()

func (*QueryEtpsRequest) Reset

func (m *QueryEtpsRequest) Reset()

func (*QueryEtpsRequest) Size

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

func (*QueryEtpsRequest) String

func (m *QueryEtpsRequest) String() string

func (*QueryEtpsRequest) Unmarshal

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

func (*QueryEtpsRequest) XXX_DiscardUnknown

func (m *QueryEtpsRequest) XXX_DiscardUnknown()

func (*QueryEtpsRequest) XXX_Marshal

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

func (*QueryEtpsRequest) XXX_Merge

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

func (*QueryEtpsRequest) XXX_Size

func (m *QueryEtpsRequest) XXX_Size() int

func (*QueryEtpsRequest) XXX_Unmarshal

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

type QueryEtpsResponse

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

func (*QueryEtpsResponse) Descriptor

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

func (*QueryEtpsResponse) GetPagination

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

func (*QueryEtpsResponse) GetPositions

func (m *QueryEtpsResponse) GetPositions() []*Position

func (*QueryEtpsResponse) Marshal

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

func (*QueryEtpsResponse) MarshalTo

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

func (*QueryEtpsResponse) MarshalToSizedBuffer

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

func (*QueryEtpsResponse) ProtoMessage

func (*QueryEtpsResponse) ProtoMessage()

func (*QueryEtpsResponse) Reset

func (m *QueryEtpsResponse) Reset()

func (*QueryEtpsResponse) Size

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

func (*QueryEtpsResponse) String

func (m *QueryEtpsResponse) String() string

func (*QueryEtpsResponse) Unmarshal

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

func (*QueryEtpsResponse) XXX_DiscardUnknown

func (m *QueryEtpsResponse) XXX_DiscardUnknown()

func (*QueryEtpsResponse) XXX_Marshal

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

func (*QueryEtpsResponse) XXX_Merge

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

func (*QueryEtpsResponse) XXX_Size

func (m *QueryEtpsResponse) XXX_Size() int

func (*QueryEtpsResponse) XXX_Unmarshal

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

type QueryParams

type QueryParams struct {
}

func (*QueryParams) Descriptor

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

func (*QueryParams) Marshal

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

func (*QueryParams) MarshalTo

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

func (*QueryParams) MarshalToSizedBuffer

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

func (*QueryParams) ProtoMessage

func (*QueryParams) ProtoMessage()

func (*QueryParams) Reset

func (m *QueryParams) Reset()

func (*QueryParams) Size

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

func (*QueryParams) String

func (m *QueryParams) String() string

func (*QueryParams) Unmarshal

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

func (*QueryParams) XXX_DiscardUnknown

func (m *QueryParams) XXX_DiscardUnknown()

func (*QueryParams) XXX_Marshal

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

func (*QueryParams) XXX_Merge

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

func (*QueryParams) XXX_Size

func (m *QueryParams) XXX_Size() int

func (*QueryParams) XXX_Unmarshal

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

type QueryParamsResponse

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

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

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) BurnCCC

func (*UnimplementedMsgServer) MintCCC

func (*UnimplementedMsgServer) SetParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Etp

func (*UnimplementedQueryServer) Etps

func (*UnimplementedQueryServer) EtpsByOwner

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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