types

package
v1.1.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeRegisterAsset   = "register_asset"
	EventTypeDeregisterAsset = "deregister_asset"

	AttributeKeyDenom    = "denom"
	AttributeKeyTicker   = "ticker"
	AttributeKeyExponent = "exponent"
)
View Source
const (
	ModuleName = "assets"
	StoreKey   = ModuleName
)
View Source
const (
	// MaxTickerLength is the maximum length of an asset ticker
	MaxTickerLength = 10
)

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 (
	ParamsKey = collections.NewPrefix(0x01)

	AssetKeyPrefix       = collections.NewPrefix(0x11)
	TickerIndexKeyPrefix = collections.NewPrefix(0x12)
)
View Source
var (
	ErrInvalidLengthMessages        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMessages          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMessages = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthModels        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowModels          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupModels = fmt.Errorf("proto: unexpected end of group")
)
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")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

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 ValidateTicker

func ValidateTicker(ticker string) error

ValidateTicker validates the ticker

Types

type Asset

type Asset struct {
	// Denom is the denomination of the asset.
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	// Ticker is the ticker of the asset.
	Ticker string `protobuf:"bytes,2,opt,name=ticker,proto3" json:"ticker,omitempty"`
	// Exponent represents power of 10 exponent that one must
	// raise the denom to in order to equal the given ticker.
	// 1 ticker = 10^exponent denom
	Exponent uint32 `protobuf:"varint,3,opt,name=exponent,proto3" json:"exponent,omitempty"`
}

Asset represents an asset that can be registered on the chain.

func NewAsset

func NewAsset(denom, ticker string, exponent uint32) Asset

NewAsset returns a new Asset instance

func (*Asset) Descriptor

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

func (*Asset) Marshal

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

func (*Asset) MarshalTo

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

func (*Asset) MarshalToSizedBuffer

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

func (*Asset) ProtoMessage

func (*Asset) ProtoMessage()

func (*Asset) Reset

func (m *Asset) Reset()

func (*Asset) Size

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

func (*Asset) String

func (m *Asset) String() string

func (*Asset) Unmarshal

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

func (*Asset) Validate

func (asset *Asset) Validate() error

Validate validates the Asset instance

func (*Asset) XXX_DiscardUnknown

func (m *Asset) XXX_DiscardUnknown()

func (*Asset) XXX_Marshal

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

func (*Asset) XXX_Merge

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

func (*Asset) XXX_Size

func (m *Asset) XXX_Size() int

func (*Asset) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// Params defines the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// Assets defines the registered assets.
	Assets []Asset `protobuf:"bytes,2,rep,name=assets,proto3" json:"assets"`
}

GenesisState defines the module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns a default GenesisState

func NewGenesisState

func NewGenesisState(params Params, assets []Asset) *GenesisState

NewGenesisState returns a new GenesisState instance

func (*GenesisState) Descriptor

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

func (*GenesisState) GetAssets

func (m *GenesisState) GetAssets() []Asset

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

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 (data *GenesisState) Validate() error

Validate validates the GenesisState and returns an error if it is invalid.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	// RegisterAsset defines the operation for registering an asset.
	RegisterAsset(ctx context.Context, in *MsgRegisterAsset, opts ...grpc.CallOption) (*MsgRegisterAssetResponse, error)
	// DeregisterAsset defines the operation for de-registering an asset with
	// its denomination.
	DeregisterAsset(ctx context.Context, in *MsgDeregisterAsset, opts ...grpc.CallOption) (*MsgDeregisterAssetResponse, error)
	// UpdateParams defines a (governance) operation for updating the module
	// parameters.
	// The authority defaults to the x/gov module account.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 MsgDeregisterAsset

type MsgDeregisterAsset struct {
	// Authority is the address that controls the module (defaults to x/gov unless
	// overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Denom represents the denomination of the token associated with the asset.
	Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
}

MsgDeregisterAsset defines the message structure for the DeregisterAsset gRPC service method. It allows the authority to de-register an asset with the token denomination.

func NewMsgDeregisterAsset

func NewMsgDeregisterAsset(authority, denom string) *MsgDeregisterAsset

NewMsgDeregisterAsset creates a new MsgDeregisterAsset instance

func (*MsgDeregisterAsset) Descriptor

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

func (*MsgDeregisterAsset) GetAuthority

func (m *MsgDeregisterAsset) GetAuthority() string

func (*MsgDeregisterAsset) GetDenom

func (m *MsgDeregisterAsset) GetDenom() string

func (*MsgDeregisterAsset) Marshal

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

func (*MsgDeregisterAsset) MarshalTo

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

func (*MsgDeregisterAsset) MarshalToSizedBuffer

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

func (*MsgDeregisterAsset) ProtoMessage

func (*MsgDeregisterAsset) ProtoMessage()

func (*MsgDeregisterAsset) Reset

func (m *MsgDeregisterAsset) Reset()

func (*MsgDeregisterAsset) Size

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

func (*MsgDeregisterAsset) String

func (m *MsgDeregisterAsset) String() string

func (*MsgDeregisterAsset) Unmarshal

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

func (*MsgDeregisterAsset) Validate

func (msg *MsgDeregisterAsset) Validate() error

Validate validates the MsgDeregisterAsset instance

func (*MsgDeregisterAsset) XXX_DiscardUnknown

func (m *MsgDeregisterAsset) XXX_DiscardUnknown()

func (*MsgDeregisterAsset) XXX_Marshal

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

func (*MsgDeregisterAsset) XXX_Merge

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

func (*MsgDeregisterAsset) XXX_Size

func (m *MsgDeregisterAsset) XXX_Size() int

func (*MsgDeregisterAsset) XXX_Unmarshal

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

type MsgDeregisterAssetResponse

type MsgDeregisterAssetResponse struct {
}

MsgRegisterAssetResponse is the return value of MsgDeregisterAsset.

func (*MsgDeregisterAssetResponse) Descriptor

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

func (*MsgDeregisterAssetResponse) Marshal

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

func (*MsgDeregisterAssetResponse) MarshalTo

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

func (*MsgDeregisterAssetResponse) MarshalToSizedBuffer

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

func (*MsgDeregisterAssetResponse) ProtoMessage

func (*MsgDeregisterAssetResponse) ProtoMessage()

func (*MsgDeregisterAssetResponse) Reset

func (m *MsgDeregisterAssetResponse) Reset()

func (*MsgDeregisterAssetResponse) Size

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

func (*MsgDeregisterAssetResponse) String

func (m *MsgDeregisterAssetResponse) String() string

func (*MsgDeregisterAssetResponse) Unmarshal

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

func (*MsgDeregisterAssetResponse) XXX_DiscardUnknown

func (m *MsgDeregisterAssetResponse) XXX_DiscardUnknown()

func (*MsgDeregisterAssetResponse) XXX_Marshal

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

func (*MsgDeregisterAssetResponse) XXX_Merge

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

func (*MsgDeregisterAssetResponse) XXX_Size

func (m *MsgDeregisterAssetResponse) XXX_Size() int

func (*MsgDeregisterAssetResponse) XXX_Unmarshal

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

type MsgRegisterAsset

type MsgRegisterAsset struct {
	// Authority is the address that controls the module (defaults to x/gov unless
	// overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Asset represents the asset to be registered.
	Asset Asset `protobuf:"bytes,2,opt,name=asset,proto3" json:"asset"`
}

MsgRegisterAsset defines the message structure for the RegisterAsset gRPC service method. It allows the authority to register an asset.

func NewMsgRegisterAsset

func NewMsgRegisterAsset(authority string, asset Asset) *MsgRegisterAsset

NewMsgRegisterAsset creates a new MsgRegisterAsset instance

func (*MsgRegisterAsset) Descriptor

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

func (*MsgRegisterAsset) GetAsset

func (m *MsgRegisterAsset) GetAsset() Asset

func (*MsgRegisterAsset) GetAuthority

func (m *MsgRegisterAsset) GetAuthority() string

func (*MsgRegisterAsset) Marshal

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

func (*MsgRegisterAsset) MarshalTo

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

func (*MsgRegisterAsset) MarshalToSizedBuffer

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

func (*MsgRegisterAsset) ProtoMessage

func (*MsgRegisterAsset) ProtoMessage()

func (*MsgRegisterAsset) Reset

func (m *MsgRegisterAsset) Reset()

func (*MsgRegisterAsset) Size

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

func (*MsgRegisterAsset) String

func (m *MsgRegisterAsset) String() string

func (*MsgRegisterAsset) Unmarshal

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

func (*MsgRegisterAsset) Validate

func (msg *MsgRegisterAsset) Validate() error

Validate validates the MsgRegisterAsset instance

func (*MsgRegisterAsset) XXX_DiscardUnknown

func (m *MsgRegisterAsset) XXX_DiscardUnknown()

func (*MsgRegisterAsset) XXX_Marshal

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

func (*MsgRegisterAsset) XXX_Merge

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

func (*MsgRegisterAsset) XXX_Size

func (m *MsgRegisterAsset) XXX_Size() int

func (*MsgRegisterAsset) XXX_Unmarshal

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

type MsgRegisterAssetResponse

type MsgRegisterAssetResponse struct {
}

MsgRegisterAssetResponse is the return value of MsgRegisterAsset.

func (*MsgRegisterAssetResponse) Descriptor

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

func (*MsgRegisterAssetResponse) Marshal

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

func (*MsgRegisterAssetResponse) MarshalTo

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

func (*MsgRegisterAssetResponse) MarshalToSizedBuffer

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

func (*MsgRegisterAssetResponse) ProtoMessage

func (*MsgRegisterAssetResponse) ProtoMessage()

func (*MsgRegisterAssetResponse) Reset

func (m *MsgRegisterAssetResponse) Reset()

func (*MsgRegisterAssetResponse) Size

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

func (*MsgRegisterAssetResponse) String

func (m *MsgRegisterAssetResponse) String() string

func (*MsgRegisterAssetResponse) Unmarshal

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

func (*MsgRegisterAssetResponse) XXX_DiscardUnknown

func (m *MsgRegisterAssetResponse) XXX_DiscardUnknown()

func (*MsgRegisterAssetResponse) XXX_Marshal

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

func (*MsgRegisterAssetResponse) XXX_Merge

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

func (*MsgRegisterAssetResponse) XXX_Size

func (m *MsgRegisterAssetResponse) XXX_Size() int

func (*MsgRegisterAssetResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// RegisterAsset defines the operation for registering an asset.
	RegisterAsset(context.Context, *MsgRegisterAsset) (*MsgRegisterAssetResponse, error)
	// DeregisterAsset defines the operation for de-registering an asset with
	// its denomination.
	DeregisterAsset(context.Context, *MsgDeregisterAsset) (*MsgDeregisterAssetResponse, error)
	// UpdateParams defines a (governance) operation for updating the module
	// parameters.
	// The authority defaults to the x/gov module account.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateParams

type MsgUpdateParams struct {
	// Authority is the address that controls the module (defaults to x/gov unless
	// overwritten).
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty" yaml:"authority"`
	// Params define the parameters to update.
	//
	// NOTE: All parameters must be supplied.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

MsgUpdateParams defines the message structure for the UpdateParams gRPC service method. It allows the authority to update the module parameters.

func NewMsgUpdateParams

func NewMsgUpdateParams(authority string, params Params) *MsgUpdateParams

NewMsgUpdateParams creates a new MsgUpdateParams instance

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

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

func (*MsgUpdateParams) Validate

func (msg *MsgUpdateParams) Validate() error

Validate validates the MsgUpdateParams instance

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

MsgUpdateParamsResponse is the return value of MsgUpdateParams.

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type Params

type Params struct {
}

Params defines the parameters for the module.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams() Params

NewParams creates a new Params object

func (*Params) Descriptor

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

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) 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

Validate checks that the parameters have valid values.

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 QueryAssetRequest

type QueryAssetRequest struct {
	// Denom is the token denomination for which the ticker is to be queried.
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
}

QueryAssetRequest is the request type for the Query/Asset RPC method.

func NewQueryAssetRequest

func NewQueryAssetRequest(denom string) *QueryAssetRequest

NewQueryAssetRequest creates a new instance of QueryAssetRequest

func (*QueryAssetRequest) Descriptor

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

func (*QueryAssetRequest) GetDenom

func (m *QueryAssetRequest) GetDenom() string

func (*QueryAssetRequest) Marshal

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

func (*QueryAssetRequest) MarshalTo

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

func (*QueryAssetRequest) MarshalToSizedBuffer

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

func (*QueryAssetRequest) ProtoMessage

func (*QueryAssetRequest) ProtoMessage()

func (*QueryAssetRequest) Reset

func (m *QueryAssetRequest) Reset()

func (*QueryAssetRequest) Size

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

func (*QueryAssetRequest) String

func (m *QueryAssetRequest) String() string

func (*QueryAssetRequest) Unmarshal

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

func (*QueryAssetRequest) XXX_DiscardUnknown

func (m *QueryAssetRequest) XXX_DiscardUnknown()

func (*QueryAssetRequest) XXX_Marshal

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

func (*QueryAssetRequest) XXX_Merge

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

func (*QueryAssetRequest) XXX_Size

func (m *QueryAssetRequest) XXX_Size() int

func (*QueryAssetRequest) XXX_Unmarshal

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

type QueryAssetResponse

type QueryAssetResponse struct {
	// Asset is the asset associated with the token denomination.
	Asset Asset `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset"`
}

QueryAssetResponse is the response type for the Query/Asset RPC method.

func (*QueryAssetResponse) Descriptor

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

func (*QueryAssetResponse) GetAsset

func (m *QueryAssetResponse) GetAsset() Asset

func (*QueryAssetResponse) Marshal

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

func (*QueryAssetResponse) MarshalTo

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

func (*QueryAssetResponse) MarshalToSizedBuffer

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

func (*QueryAssetResponse) ProtoMessage

func (*QueryAssetResponse) ProtoMessage()

func (*QueryAssetResponse) Reset

func (m *QueryAssetResponse) Reset()

func (*QueryAssetResponse) Size

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

func (*QueryAssetResponse) String

func (m *QueryAssetResponse) String() string

func (*QueryAssetResponse) Unmarshal

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

func (*QueryAssetResponse) XXX_DiscardUnknown

func (m *QueryAssetResponse) XXX_DiscardUnknown()

func (*QueryAssetResponse) XXX_Marshal

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

func (*QueryAssetResponse) XXX_Merge

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

func (*QueryAssetResponse) XXX_Size

func (m *QueryAssetResponse) XXX_Size() int

func (*QueryAssetResponse) XXX_Unmarshal

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

type QueryAssetsRequest

type QueryAssetsRequest struct {
	// Ticker defines an optional filter parameter to query assets with the given
	// ticker.
	Ticker string `protobuf:"bytes,1,opt,name=ticker,proto3" json:"ticker,omitempty"`
	// Pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAssetsRequest is the request type for the Query/Assets RPC method.

func NewQueryAssetsRequest

func NewQueryAssetsRequest(ticker string, pagination *query.PageRequest) *QueryAssetsRequest

NewQueryAssetsRequest creates a new instance of QueryAssetsRequest

func (*QueryAssetsRequest) Descriptor

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

func (*QueryAssetsRequest) GetPagination

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

func (*QueryAssetsRequest) GetTicker

func (m *QueryAssetsRequest) GetTicker() string

func (*QueryAssetsRequest) Marshal

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

func (*QueryAssetsRequest) MarshalTo

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

func (*QueryAssetsRequest) MarshalToSizedBuffer

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

func (*QueryAssetsRequest) ProtoMessage

func (*QueryAssetsRequest) ProtoMessage()

func (*QueryAssetsRequest) Reset

func (m *QueryAssetsRequest) Reset()

func (*QueryAssetsRequest) Size

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

func (*QueryAssetsRequest) String

func (m *QueryAssetsRequest) String() string

func (*QueryAssetsRequest) Unmarshal

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

func (*QueryAssetsRequest) XXX_DiscardUnknown

func (m *QueryAssetsRequest) XXX_DiscardUnknown()

func (*QueryAssetsRequest) XXX_Marshal

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

func (*QueryAssetsRequest) XXX_Merge

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

func (*QueryAssetsRequest) XXX_Size

func (m *QueryAssetsRequest) XXX_Size() int

func (*QueryAssetsRequest) XXX_Unmarshal

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

type QueryAssetsResponse

type QueryAssetsResponse struct {
	// Assets represents all the assets registered.
	Assets []Asset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets"`
	// Pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAssetsResponse is the response type for the Query/Assets RPC method.

func (*QueryAssetsResponse) Descriptor

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

func (*QueryAssetsResponse) GetAssets

func (m *QueryAssetsResponse) GetAssets() []Asset

func (*QueryAssetsResponse) GetPagination

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

func (*QueryAssetsResponse) Marshal

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

func (*QueryAssetsResponse) MarshalTo

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

func (*QueryAssetsResponse) MarshalToSizedBuffer

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

func (*QueryAssetsResponse) ProtoMessage

func (*QueryAssetsResponse) ProtoMessage()

func (*QueryAssetsResponse) Reset

func (m *QueryAssetsResponse) Reset()

func (*QueryAssetsResponse) Size

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

func (*QueryAssetsResponse) String

func (m *QueryAssetsResponse) String() string

func (*QueryAssetsResponse) Unmarshal

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

func (*QueryAssetsResponse) XXX_DiscardUnknown

func (m *QueryAssetsResponse) XXX_DiscardUnknown()

func (*QueryAssetsResponse) XXX_Marshal

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

func (*QueryAssetsResponse) XXX_Merge

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

func (*QueryAssetsResponse) XXX_Size

func (m *QueryAssetsResponse) XXX_Size() int

func (*QueryAssetsResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Params defines a gRPC query method that returns the parameters of the
	// module.
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// Assets defined a gRPC query method that returns all assets registered.
	Assets(ctx context.Context, in *QueryAssetsRequest, opts ...grpc.CallOption) (*QueryAssetsResponse, error)
	// Asset defines a gRPC query method that returns the asset associated with
	// the given token denomination.
	Asset(ctx context.Context, in *QueryAssetRequest, opts ...grpc.CallOption) (*QueryAssetResponse, error)
}

QueryClient is the client API for Query service.

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

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
}

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

func NewQueryParamsRequest

func NewQueryParamsRequest() *QueryParamsRequest

NewQueryParamsRequest creates a new instance of QueryParamsRequest

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

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

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

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Params defines a gRPC query method that returns the parameters of the
	// module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// Assets defined a gRPC query method that returns all assets registered.
	Assets(context.Context, *QueryAssetsRequest) (*QueryAssetsResponse, error)
	// Asset defines a gRPC query method that returns the asset associated with
	// the given token denomination.
	Asset(context.Context, *QueryAssetRequest) (*QueryAssetResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) DeregisterAsset

func (*UnimplementedMsgServer) RegisterAsset

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Asset

func (*UnimplementedQueryServer) Assets

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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