Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func ValidateTicker(ticker string) error
- type Asset
- func (*Asset) Descriptor() ([]byte, []int)
- func (m *Asset) Marshal() (dAtA []byte, err error)
- func (m *Asset) MarshalTo(dAtA []byte) (int, error)
- func (m *Asset) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Asset) ProtoMessage()
- func (m *Asset) Reset()
- func (m *Asset) Size() (n int)
- func (m *Asset) String() string
- func (m *Asset) Unmarshal(dAtA []byte) error
- func (asset *Asset) Validate() error
- func (m *Asset) XXX_DiscardUnknown()
- func (m *Asset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Asset) XXX_Merge(src proto.Message)
- func (m *Asset) XXX_Size() int
- func (m *Asset) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetAssets() []Asset
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (data *GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgDeregisterAsset
- func (*MsgDeregisterAsset) Descriptor() ([]byte, []int)
- func (m *MsgDeregisterAsset) GetAuthority() string
- func (m *MsgDeregisterAsset) GetDenom() string
- func (m *MsgDeregisterAsset) Marshal() (dAtA []byte, err error)
- func (m *MsgDeregisterAsset) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDeregisterAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDeregisterAsset) ProtoMessage()
- func (m *MsgDeregisterAsset) Reset()
- func (m *MsgDeregisterAsset) Size() (n int)
- func (m *MsgDeregisterAsset) String() string
- func (m *MsgDeregisterAsset) Unmarshal(dAtA []byte) error
- func (msg *MsgDeregisterAsset) Validate() error
- func (m *MsgDeregisterAsset) XXX_DiscardUnknown()
- func (m *MsgDeregisterAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDeregisterAsset) XXX_Merge(src proto.Message)
- func (m *MsgDeregisterAsset) XXX_Size() int
- func (m *MsgDeregisterAsset) XXX_Unmarshal(b []byte) error
- type MsgDeregisterAssetResponse
- func (*MsgDeregisterAssetResponse) Descriptor() ([]byte, []int)
- func (m *MsgDeregisterAssetResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgDeregisterAssetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgDeregisterAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgDeregisterAssetResponse) ProtoMessage()
- func (m *MsgDeregisterAssetResponse) Reset()
- func (m *MsgDeregisterAssetResponse) Size() (n int)
- func (m *MsgDeregisterAssetResponse) String() string
- func (m *MsgDeregisterAssetResponse) Unmarshal(dAtA []byte) error
- func (m *MsgDeregisterAssetResponse) XXX_DiscardUnknown()
- func (m *MsgDeregisterAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgDeregisterAssetResponse) XXX_Merge(src proto.Message)
- func (m *MsgDeregisterAssetResponse) XXX_Size() int
- func (m *MsgDeregisterAssetResponse) XXX_Unmarshal(b []byte) error
- type MsgRegisterAsset
- func (*MsgRegisterAsset) Descriptor() ([]byte, []int)
- func (m *MsgRegisterAsset) GetAsset() Asset
- func (m *MsgRegisterAsset) GetAuthority() string
- func (m *MsgRegisterAsset) Marshal() (dAtA []byte, err error)
- func (m *MsgRegisterAsset) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRegisterAsset) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRegisterAsset) ProtoMessage()
- func (m *MsgRegisterAsset) Reset()
- func (m *MsgRegisterAsset) Size() (n int)
- func (m *MsgRegisterAsset) String() string
- func (m *MsgRegisterAsset) Unmarshal(dAtA []byte) error
- func (msg *MsgRegisterAsset) Validate() error
- func (m *MsgRegisterAsset) XXX_DiscardUnknown()
- func (m *MsgRegisterAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRegisterAsset) XXX_Merge(src proto.Message)
- func (m *MsgRegisterAsset) XXX_Size() int
- func (m *MsgRegisterAsset) XXX_Unmarshal(b []byte) error
- type MsgRegisterAssetResponse
- func (*MsgRegisterAssetResponse) Descriptor() ([]byte, []int)
- func (m *MsgRegisterAssetResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgRegisterAssetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgRegisterAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgRegisterAssetResponse) ProtoMessage()
- func (m *MsgRegisterAssetResponse) Reset()
- func (m *MsgRegisterAssetResponse) Size() (n int)
- func (m *MsgRegisterAssetResponse) String() string
- func (m *MsgRegisterAssetResponse) Unmarshal(dAtA []byte) error
- func (m *MsgRegisterAssetResponse) XXX_DiscardUnknown()
- func (m *MsgRegisterAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgRegisterAssetResponse) XXX_Merge(src proto.Message)
- func (m *MsgRegisterAssetResponse) XXX_Size() int
- func (m *MsgRegisterAssetResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type QueryAssetRequest
- func (*QueryAssetRequest) Descriptor() ([]byte, []int)
- func (m *QueryAssetRequest) GetDenom() string
- func (m *QueryAssetRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAssetRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAssetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAssetRequest) ProtoMessage()
- func (m *QueryAssetRequest) Reset()
- func (m *QueryAssetRequest) Size() (n int)
- func (m *QueryAssetRequest) String() string
- func (m *QueryAssetRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAssetRequest) XXX_DiscardUnknown()
- func (m *QueryAssetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAssetRequest) XXX_Merge(src proto.Message)
- func (m *QueryAssetRequest) XXX_Size() int
- func (m *QueryAssetRequest) XXX_Unmarshal(b []byte) error
- type QueryAssetResponse
- func (*QueryAssetResponse) Descriptor() ([]byte, []int)
- func (m *QueryAssetResponse) GetAsset() Asset
- func (m *QueryAssetResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAssetResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAssetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAssetResponse) ProtoMessage()
- func (m *QueryAssetResponse) Reset()
- func (m *QueryAssetResponse) Size() (n int)
- func (m *QueryAssetResponse) String() string
- func (m *QueryAssetResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAssetResponse) XXX_DiscardUnknown()
- func (m *QueryAssetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAssetResponse) XXX_Merge(src proto.Message)
- func (m *QueryAssetResponse) XXX_Size() int
- func (m *QueryAssetResponse) XXX_Unmarshal(b []byte) error
- type QueryAssetsRequest
- func (*QueryAssetsRequest) Descriptor() ([]byte, []int)
- func (m *QueryAssetsRequest) GetPagination() *query.PageRequest
- func (m *QueryAssetsRequest) GetTicker() string
- func (m *QueryAssetsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAssetsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAssetsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAssetsRequest) ProtoMessage()
- func (m *QueryAssetsRequest) Reset()
- func (m *QueryAssetsRequest) Size() (n int)
- func (m *QueryAssetsRequest) String() string
- func (m *QueryAssetsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAssetsRequest) XXX_DiscardUnknown()
- func (m *QueryAssetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAssetsRequest) XXX_Merge(src proto.Message)
- func (m *QueryAssetsRequest) XXX_Size() int
- func (m *QueryAssetsRequest) XXX_Unmarshal(b []byte) error
- type QueryAssetsResponse
- func (*QueryAssetsResponse) Descriptor() ([]byte, []int)
- func (m *QueryAssetsResponse) GetAssets() []Asset
- func (m *QueryAssetsResponse) GetPagination() *query.PageResponse
- func (m *QueryAssetsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAssetsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAssetsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAssetsResponse) ProtoMessage()
- func (m *QueryAssetsResponse) Reset()
- func (m *QueryAssetsResponse) Size() (n int)
- func (m *QueryAssetsResponse) String() string
- func (m *QueryAssetsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAssetsResponse) XXX_DiscardUnknown()
- func (m *QueryAssetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAssetsResponse) XXX_Merge(src proto.Message)
- func (m *QueryAssetsResponse) XXX_Size() int
- func (m *QueryAssetsResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( EventTypeRegisterAsset = "register_asset" EventTypeDeregisterAsset = "deregister_asset" AttributeKeyDenom = "denom" AttributeKeyTicker = "ticker" AttributeKeyExponent = "exponent" )
const ( ModuleName = "assets" StoreKey = ModuleName )
const (
// MaxTickerLength is the maximum length of an asset ticker
MaxTickerLength = 10
)
Variables ¶
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ParamsKey = collections.NewPrefix(0x01) AssetKeyPrefix = collections.NewPrefix(0x11) TickerIndexKeyPrefix = collections.NewPrefix(0x12) )
var ( ErrInvalidLengthMessages = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowMessages = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupMessages = 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 RegisterQueryHandler ¶
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 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 (*Asset) Descriptor ¶
func (*Asset) ProtoMessage ¶
func (*Asset) ProtoMessage()
func (*Asset) XXX_DiscardUnknown ¶
func (m *Asset) XXX_DiscardUnknown()
func (*Asset) XXX_Marshal ¶
func (*Asset) XXX_Unmarshal ¶
type GenesisState ¶
type GenesisState struct { // Assets defines the registered assets. Assets []Asset `protobuf:"bytes,1,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(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) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err 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) }
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) 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) }
MsgServer is the server API for Msg service.
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 { // 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 QueryServer ¶
type QueryServer interface { // 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) DeregisterAsset(ctx context.Context, req *MsgDeregisterAsset) (*MsgDeregisterAssetResponse, error)
func (*UnimplementedMsgServer) RegisterAsset ¶
func (*UnimplementedMsgServer) RegisterAsset(ctx context.Context, req *MsgRegisterAsset) (*MsgRegisterAssetResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Asset ¶
func (*UnimplementedQueryServer) Asset(ctx context.Context, req *QueryAssetRequest) (*QueryAssetResponse, error)
func (*UnimplementedQueryServer) Assets ¶
func (*UnimplementedQueryServer) Assets(ctx context.Context, req *QueryAssetsRequest) (*QueryAssetsResponse, error)