Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ParamsKeyTable() paramtypes.KeyTable
- 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 ValidTxHash(hash string) bool
- type BankKeeper
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- 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 (s *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 MsgCreateTokenswapRequest
- func (*MsgCreateTokenswapRequest) Descriptor() ([]byte, []int)
- func (m *MsgCreateTokenswapRequest) GetReceiver() string
- func (msg MsgCreateTokenswapRequest) GetSignBytes() []byte
- func (m *MsgCreateTokenswapRequest) GetSigner() string
- func (msg MsgCreateTokenswapRequest) GetSigners() []sdk.AccAddress
- func (m *MsgCreateTokenswapRequest) GetTxHash() string
- func (m *MsgCreateTokenswapRequest) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateTokenswapRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateTokenswapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateTokenswapRequest) ProtoMessage()
- func (m *MsgCreateTokenswapRequest) Reset()
- func (msg MsgCreateTokenswapRequest) Route() string
- func (m *MsgCreateTokenswapRequest) Size() (n int)
- func (m *MsgCreateTokenswapRequest) String() string
- func (msg MsgCreateTokenswapRequest) Type() string
- func (m *MsgCreateTokenswapRequest) Unmarshal(dAtA []byte) error
- func (msg MsgCreateTokenswapRequest) ValidateBasic() error
- func (m *MsgCreateTokenswapRequest) XXX_DiscardUnknown()
- func (m *MsgCreateTokenswapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateTokenswapRequest) XXX_Merge(src proto.Message)
- func (m *MsgCreateTokenswapRequest) XXX_Size() int
- func (m *MsgCreateTokenswapRequest) XXX_Unmarshal(b []byte) error
- type MsgCreateTokenswapResponse
- func (*MsgCreateTokenswapResponse) Descriptor() ([]byte, []int)
- func (m *MsgCreateTokenswapResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgCreateTokenswapResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgCreateTokenswapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgCreateTokenswapResponse) ProtoMessage()
- func (m *MsgCreateTokenswapResponse) Reset()
- func (m *MsgCreateTokenswapResponse) Size() (n int)
- func (m *MsgCreateTokenswapResponse) String() string
- func (m *MsgCreateTokenswapResponse) Unmarshal(dAtA []byte) error
- func (m *MsgCreateTokenswapResponse) XXX_DiscardUnknown()
- func (m *MsgCreateTokenswapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreateTokenswapResponse) XXX_Merge(src proto.Message)
- func (m *MsgCreateTokenswapResponse) XXX_Size() int
- func (m *MsgCreateTokenswapResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) GetSigner() string
- func (m *Params) GetSwappable() bool
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p *Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type QueryTokenswapParam
- type QueryTokenswapRequest
- func (*QueryTokenswapRequest) Descriptor() ([]byte, []int)
- func (m *QueryTokenswapRequest) GetTxHash() string
- func (m *QueryTokenswapRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryTokenswapRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryTokenswapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryTokenswapRequest) ProtoMessage()
- func (m *QueryTokenswapRequest) Reset()
- func (m *QueryTokenswapRequest) Size() (n int)
- func (m *QueryTokenswapRequest) String() string
- func (m *QueryTokenswapRequest) Unmarshal(dAtA []byte) error
- func (m *QueryTokenswapRequest) XXX_DiscardUnknown()
- func (m *QueryTokenswapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryTokenswapRequest) XXX_Merge(src proto.Message)
- func (m *QueryTokenswapRequest) XXX_Size() int
- func (m *QueryTokenswapRequest) XXX_Unmarshal(b []byte) error
- type QueryTokenswapResponse
- func (*QueryTokenswapResponse) Descriptor() ([]byte, []int)
- func (m *QueryTokenswapResponse) GetTokenswap() *Tokenswap
- func (m *QueryTokenswapResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryTokenswapResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryTokenswapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryTokenswapResponse) ProtoMessage()
- func (m *QueryTokenswapResponse) Reset()
- func (m *QueryTokenswapResponse) Size() (n int)
- func (m *QueryTokenswapResponse) String() string
- func (m *QueryTokenswapResponse) Unmarshal(dAtA []byte) error
- func (m *QueryTokenswapResponse) XXX_DiscardUnknown()
- func (m *QueryTokenswapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryTokenswapResponse) XXX_Merge(src proto.Message)
- func (m *QueryTokenswapResponse) XXX_Size() int
- func (m *QueryTokenswapResponse) XXX_Unmarshal(b []byte) error
- type Tokenswap
- func (*Tokenswap) Descriptor() ([]byte, []int)
- func (m *Tokenswap) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *Tokenswap) GetReceiver() string
- func (m *Tokenswap) GetSigner() string
- func (m *Tokenswap) GetTxHash() string
- func (m *Tokenswap) Marshal() (dAtA []byte, err error)
- func (m *Tokenswap) MarshalTo(dAtA []byte) (int, error)
- func (m *Tokenswap) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Tokenswap) ProtoMessage()
- func (m *Tokenswap) Reset()
- func (m *Tokenswap) Size() (n int)
- func (m *Tokenswap) String() string
- func (m *Tokenswap) Unmarshal(dAtA []byte) error
- func (m *Tokenswap) XXX_DiscardUnknown()
- func (m *Tokenswap) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Tokenswap) XXX_Merge(src proto.Message)
- func (m *Tokenswap) XXX_Size() int
- func (m *Tokenswap) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
Constants ¶
const ( EventTypeCreateTokenswap = "create_tokenswap" AttributeKeyTxHash = "tx_hash" AttributeKeyReceiver = "receiver" AttributeValueCategory = ModuleName )
tokenswap event types and attribute keys
const ( // ModuleName defines the module name ModuleName = "tokenswap" // StoreKey defines the primary module store key StoreKey = ModuleName // RouterKey defines message route key RouterKey = ModuleName // QuerierRoute defines the module's query routing key QuerierRoute = ModuleName )
const ( // tokenswap module is enabled or not DefaultSwappable = true // who can request tokenswap DefaultSigner = "rizon136fzkc73rm5def5fngs386qdlxcuvxvrte8lk7" )
const ( QueryTokenswap = "get" QueryParams = "parameters" )
query endpoints supported by the Querier
const ( // 32 byte tx hash's hexadecimal string length TxHashStringLength = 64 // lower case hexadecimal typed string format TxHashRegExp = "[a-f0-9]{64}$" )
Variables ¶
var ( ErrUnswappable = sdkerrors.Register(ModuleName, 2, "tokenswap is disabled") ErrInvalidTxHash = sdkerrors.Register(ModuleName, 4, "invalid tx hash") ErrAlreadySwapped = sdkerrors.Register(ModuleName, 5, "already swapped tx hash") )
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 ( KeySwappable = []byte("Swappable") KeySigner = []byte("Signer") )
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTokenswap = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTokenswap = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTokenswap = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var (
ModuleCdc = codec.NewAminoCodec(amino)
)
Functions ¶
func ParamsKeyTable ¶
func ParamsKeyTable() paramtypes.KeyTable
making keyTable for tokenswap module
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
RegisterInterfaces registers the module interfaces types with the interface registry
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the necessary module interfaces and concrete types on the provided LegacyAmino codec These types are used for Amino JSON serialization
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)
func ValidTxHash ¶
ValidTxHash returns whether tx hash is valid or not tx hash should be 64-length, lower case, hexadecimal type string
Types ¶
type BankKeeper ¶
type BankKeeper interface { // MintCoins is used for minting new coins to swap MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error // SendCoinsFromModuleToAccount is used for sending minted coins to proper receiver SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error }
BankKeeper defines the expected bank keeper
type GenesisState ¶
type GenesisState struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState returns default genesis state of tokenswap module
func NewGenesisState ¶
func NewGenesisState(params Params) *GenesisState
NewGenesisState creates a new GenesisState instance
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
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 (s *GenesisState) Validate() error
Validate checks all genesis states are valid
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 { // CreateTokenswap defines a method for creating a new tokenswap CreateTokenswap(ctx context.Context, in *MsgCreateTokenswapRequest, opts ...grpc.CallOption) (*MsgCreateTokenswapResponse, 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 MsgCreateTokenswapRequest ¶
type MsgCreateTokenswapRequest struct { // tx_hash is the tx hash of burn tx from legacy chain // tx_hash is used for store key TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty" yaml:"tx_hash"` // receiver is the target of tokenswap Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty" yaml:"receiver"` // signer is who confirms the swap process Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty" yaml:"signer"` // amount is the amount of swap process Amount *github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"amount,omitempty"` }
MsgCreateTokenswapRequest defines a SDK message for creating a new tokenswap
func NewMsgCreateTokenswapRequest ¶
func NewMsgCreateTokenswapRequest(tx_hash string, receiver string, signer string, amount sdk.Dec) *MsgCreateTokenswapRequest
NewMsgCreateTokenswapRequest creates a new MsgCreateTokenswapRequest object
func (*MsgCreateTokenswapRequest) Descriptor ¶
func (*MsgCreateTokenswapRequest) Descriptor() ([]byte, []int)
func (*MsgCreateTokenswapRequest) GetReceiver ¶
func (m *MsgCreateTokenswapRequest) GetReceiver() string
func (MsgCreateTokenswapRequest) GetSignBytes ¶
func (msg MsgCreateTokenswapRequest) GetSignBytes() []byte
GetSignBytes returns the message bytes to sign over
func (*MsgCreateTokenswapRequest) GetSigner ¶
func (m *MsgCreateTokenswapRequest) GetSigner() string
func (MsgCreateTokenswapRequest) GetSigners ¶
func (msg MsgCreateTokenswapRequest) GetSigners() []sdk.AccAddress
GetSigners returns the AccAddress of signer
func (*MsgCreateTokenswapRequest) GetTxHash ¶
func (m *MsgCreateTokenswapRequest) GetTxHash() string
func (*MsgCreateTokenswapRequest) Marshal ¶
func (m *MsgCreateTokenswapRequest) Marshal() (dAtA []byte, err error)
func (*MsgCreateTokenswapRequest) MarshalTo ¶
func (m *MsgCreateTokenswapRequest) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateTokenswapRequest) MarshalToSizedBuffer ¶
func (m *MsgCreateTokenswapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateTokenswapRequest) ProtoMessage ¶
func (*MsgCreateTokenswapRequest) ProtoMessage()
func (*MsgCreateTokenswapRequest) Reset ¶
func (m *MsgCreateTokenswapRequest) Reset()
func (MsgCreateTokenswapRequest) Route ¶
func (msg MsgCreateTokenswapRequest) Route() string
implements of the sdk.Msg interface // Route returns the RouterKey
func (*MsgCreateTokenswapRequest) Size ¶
func (m *MsgCreateTokenswapRequest) Size() (n int)
func (*MsgCreateTokenswapRequest) String ¶
func (m *MsgCreateTokenswapRequest) String() string
func (MsgCreateTokenswapRequest) Type ¶
func (msg MsgCreateTokenswapRequest) Type() string
Type returns the name of message type
func (*MsgCreateTokenswapRequest) Unmarshal ¶
func (m *MsgCreateTokenswapRequest) Unmarshal(dAtA []byte) error
func (MsgCreateTokenswapRequest) ValidateBasic ¶
func (msg MsgCreateTokenswapRequest) ValidateBasic() error
ValidateBasic validates the MsgCreateTokenswapRequest
func (*MsgCreateTokenswapRequest) XXX_DiscardUnknown ¶
func (m *MsgCreateTokenswapRequest) XXX_DiscardUnknown()
func (*MsgCreateTokenswapRequest) XXX_Marshal ¶
func (m *MsgCreateTokenswapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateTokenswapRequest) XXX_Merge ¶
func (m *MsgCreateTokenswapRequest) XXX_Merge(src proto.Message)
func (*MsgCreateTokenswapRequest) XXX_Size ¶
func (m *MsgCreateTokenswapRequest) XXX_Size() int
func (*MsgCreateTokenswapRequest) XXX_Unmarshal ¶
func (m *MsgCreateTokenswapRequest) XXX_Unmarshal(b []byte) error
type MsgCreateTokenswapResponse ¶
type MsgCreateTokenswapResponse struct { }
MsgCreatetokenswapResponse defines the Msg/CreateTokenswap response type
func (*MsgCreateTokenswapResponse) Descriptor ¶
func (*MsgCreateTokenswapResponse) Descriptor() ([]byte, []int)
func (*MsgCreateTokenswapResponse) Marshal ¶
func (m *MsgCreateTokenswapResponse) Marshal() (dAtA []byte, err error)
func (*MsgCreateTokenswapResponse) MarshalTo ¶
func (m *MsgCreateTokenswapResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgCreateTokenswapResponse) MarshalToSizedBuffer ¶
func (m *MsgCreateTokenswapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgCreateTokenswapResponse) ProtoMessage ¶
func (*MsgCreateTokenswapResponse) ProtoMessage()
func (*MsgCreateTokenswapResponse) Reset ¶
func (m *MsgCreateTokenswapResponse) Reset()
func (*MsgCreateTokenswapResponse) Size ¶
func (m *MsgCreateTokenswapResponse) Size() (n int)
func (*MsgCreateTokenswapResponse) String ¶
func (m *MsgCreateTokenswapResponse) String() string
func (*MsgCreateTokenswapResponse) Unmarshal ¶
func (m *MsgCreateTokenswapResponse) Unmarshal(dAtA []byte) error
func (*MsgCreateTokenswapResponse) XXX_DiscardUnknown ¶
func (m *MsgCreateTokenswapResponse) XXX_DiscardUnknown()
func (*MsgCreateTokenswapResponse) XXX_Marshal ¶
func (m *MsgCreateTokenswapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgCreateTokenswapResponse) XXX_Merge ¶
func (m *MsgCreateTokenswapResponse) XXX_Merge(src proto.Message)
func (*MsgCreateTokenswapResponse) XXX_Size ¶
func (m *MsgCreateTokenswapResponse) XXX_Size() int
func (*MsgCreateTokenswapResponse) XXX_Unmarshal ¶
func (m *MsgCreateTokenswapResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶
type MsgServer interface { // CreateTokenswap defines a method for creating a new tokenswap CreateTokenswap(context.Context, *MsgCreateTokenswapRequest) (*MsgCreateTokenswapResponse, error) }
MsgServer is the server API for Msg service.
type Params ¶
type Params struct { // swappable indicates whether tokenswap module is enabled or not Swappable bool `protobuf:"varint,1,opt,name=swappable,proto3" json:"swappable,omitempty" yaml:"swappable"` // signer is someone who can request tokenswap Signer string `protobuf:"bytes,2,opt,name=signer,proto3" json:"signer,omitempty" yaml:"signer"` }
Params defines the parameters for the tokenswap module
func (*Params) Descriptor ¶
func (*Params) GetSwappable ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
implements params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type QueryClient ¶
type QueryClient interface { // Tokenswap queries tokenswap item for given tx hash Tokenswap(ctx context.Context, in *QueryTokenswapRequest, opts ...grpc.CallOption) (*QueryTokenswapResponse, error) // Params queries parameters of tokenswap Params(ctx context.Context, in *QueryParamsRequest, 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 QueryParamsRequest ¶
type QueryParamsRequest struct { }
QueryParamsRequest is request type for the Query/Params RPC method
func (*QueryParamsRequest) Descriptor ¶
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶
type QueryParamsResponse struct { // params defines the parameters of tokenswap Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` }
QueryParamsResponse is 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 { // Tokenswap queries tokenswap item for given tx hash Tokenswap(context.Context, *QueryTokenswapRequest) (*QueryTokenswapResponse, error) // Params queries parameters of tokenswap Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) }
QueryServer is the server API for Query service.
type QueryTokenswapParam ¶
type QueryTokenswapParam struct {
TxHash string
}
QueryTokenswapParam defines the param for the following query: - 'custom/tokenswap/get/'
func NewQueryTokenswapParam ¶
func NewQueryTokenswapParam(txHash string) QueryTokenswapParam
NewQueryTokenswapParam creates a new QueryTokenswapParam
type QueryTokenswapRequest ¶
type QueryTokenswapRequest struct { // tx_hash defines the tx hash to query for TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` }
QueryTokenswapRequest is request type for the Query/Tokenswap RPC method
func (*QueryTokenswapRequest) Descriptor ¶
func (*QueryTokenswapRequest) Descriptor() ([]byte, []int)
func (*QueryTokenswapRequest) GetTxHash ¶
func (m *QueryTokenswapRequest) GetTxHash() string
func (*QueryTokenswapRequest) Marshal ¶
func (m *QueryTokenswapRequest) Marshal() (dAtA []byte, err error)
func (*QueryTokenswapRequest) MarshalTo ¶
func (m *QueryTokenswapRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryTokenswapRequest) MarshalToSizedBuffer ¶
func (m *QueryTokenswapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryTokenswapRequest) ProtoMessage ¶
func (*QueryTokenswapRequest) ProtoMessage()
func (*QueryTokenswapRequest) Reset ¶
func (m *QueryTokenswapRequest) Reset()
func (*QueryTokenswapRequest) Size ¶
func (m *QueryTokenswapRequest) Size() (n int)
func (*QueryTokenswapRequest) String ¶
func (m *QueryTokenswapRequest) String() string
func (*QueryTokenswapRequest) Unmarshal ¶
func (m *QueryTokenswapRequest) Unmarshal(dAtA []byte) error
func (*QueryTokenswapRequest) XXX_DiscardUnknown ¶
func (m *QueryTokenswapRequest) XXX_DiscardUnknown()
func (*QueryTokenswapRequest) XXX_Marshal ¶
func (m *QueryTokenswapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryTokenswapRequest) XXX_Merge ¶
func (m *QueryTokenswapRequest) XXX_Merge(src proto.Message)
func (*QueryTokenswapRequest) XXX_Size ¶
func (m *QueryTokenswapRequest) XXX_Size() int
func (*QueryTokenswapRequest) XXX_Unmarshal ¶
func (m *QueryTokenswapRequest) XXX_Unmarshal(b []byte) error
type QueryTokenswapResponse ¶
type QueryTokenswapResponse struct { // tokenswap defines the tokenswap info Tokenswap *Tokenswap `protobuf:"bytes,1,opt,name=tokenswap,proto3" json:"tokenswap,omitempty"` }
QueryTokenswapResponse is response type for the Query/Tokenswap RPC method
func (*QueryTokenswapResponse) Descriptor ¶
func (*QueryTokenswapResponse) Descriptor() ([]byte, []int)
func (*QueryTokenswapResponse) GetTokenswap ¶
func (m *QueryTokenswapResponse) GetTokenswap() *Tokenswap
func (*QueryTokenswapResponse) Marshal ¶
func (m *QueryTokenswapResponse) Marshal() (dAtA []byte, err error)
func (*QueryTokenswapResponse) MarshalTo ¶
func (m *QueryTokenswapResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryTokenswapResponse) MarshalToSizedBuffer ¶
func (m *QueryTokenswapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryTokenswapResponse) ProtoMessage ¶
func (*QueryTokenswapResponse) ProtoMessage()
func (*QueryTokenswapResponse) Reset ¶
func (m *QueryTokenswapResponse) Reset()
func (*QueryTokenswapResponse) Size ¶
func (m *QueryTokenswapResponse) Size() (n int)
func (*QueryTokenswapResponse) String ¶
func (m *QueryTokenswapResponse) String() string
func (*QueryTokenswapResponse) Unmarshal ¶
func (m *QueryTokenswapResponse) Unmarshal(dAtA []byte) error
func (*QueryTokenswapResponse) XXX_DiscardUnknown ¶
func (m *QueryTokenswapResponse) XXX_DiscardUnknown()
func (*QueryTokenswapResponse) XXX_Marshal ¶
func (m *QueryTokenswapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryTokenswapResponse) XXX_Merge ¶
func (m *QueryTokenswapResponse) XXX_Merge(src proto.Message)
func (*QueryTokenswapResponse) XXX_Size ¶
func (m *QueryTokenswapResponse) XXX_Size() int
func (*QueryTokenswapResponse) XXX_Unmarshal ¶
func (m *QueryTokenswapResponse) XXX_Unmarshal(b []byte) error
type Tokenswap ¶
type Tokenswap struct { // tx_hash is the tx hash of burn tx from legacy chain // tx_hash is used for store key TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // receiver is the target of tokenswap Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` // signer is who confirms the swap process Signer string `protobuf:"bytes,3,opt,name=signer,proto3" json:"signer,omitempty"` // amount is the amount of swap process Amount github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"` }
Tokenswap defines the tokenswap state
func NewTokenswap ¶
Newtokenswap creates a new swap state object
func (*Tokenswap) Descriptor ¶
func (*Tokenswap) GetAmount ¶
func (m *Tokenswap) GetAmount() github_com_cosmos_cosmos_sdk_types.Coins
func (*Tokenswap) GetReceiver ¶
func (*Tokenswap) MarshalToSizedBuffer ¶
func (*Tokenswap) ProtoMessage ¶
func (*Tokenswap) ProtoMessage()
func (*Tokenswap) XXX_DiscardUnknown ¶
func (m *Tokenswap) XXX_DiscardUnknown()
func (*Tokenswap) XXX_Marshal ¶
func (*Tokenswap) XXX_Unmarshal ¶
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) CreateTokenswap ¶
func (*UnimplementedMsgServer) CreateTokenswap(ctx context.Context, req *MsgCreateTokenswapRequest) (*MsgCreateTokenswapResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
func (*UnimplementedQueryServer) Tokenswap ¶
func (*UnimplementedQueryServer) Tokenswap(ctx context.Context, req *QueryTokenswapRequest) (*QueryTokenswapResponse, error)