types

package
v0.11.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ModuleName = "swap"
	StoreKey   = ModuleName
)
View Source
const (
	DefaultSwapEnabled = false
	DefaultSwapDenom   = "tsent"
	DefaultApproveBy   = ""
)
View Source
const (
	EthereumHashLength int = 32
)

Variables

View Source
var (
	ErrorInvalidField    = errors.Register(ModuleName, 101, "invalid field")
	ErrorInvalidFrom     = errors.Register(ModuleName, 102, "invalid from")
	ErrorInvalidReceiver = errors.Register(ModuleName, 103, "invalid receiver")
	ErrorInvalidTxHash   = errors.Register(ModuleName, 104, "invalid tx_hash")
	ErrorInvalidAmount   = errors.Register(ModuleName, 105, "invalid amount")
)
View Source
var (
	ErrorSwapIsDisabled = errors.Register(ModuleName, 201, "swap is disabled")
	ErrorUnauthorized   = errors.Register(ModuleName, 202, "unauthorized")
	ErrorDuplicateSwap  = errors.Register(ModuleName, 203, "duplicate swap")
)
View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
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 (
	ErrInvalidLengthMsg        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMsg          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMsg = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	KeySwapEnabled = []byte("SwapEnabled")
	KeySwapDenom   = []byte("SwapDenom")
	KeyApproveBy   = []byte("ApproveBy")
)
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 (
	ErrInvalidLengthQuerier        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuerier          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuerier = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthSwap        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSwap          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSwap = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	PrecisionLoss = sdk.NewInt(100)
)
View Source
var (
	SwapKeyPrefix = []byte{0x10}
)

Functions

func ParamsKeyTable

func ParamsKeyTable() params.KeyTable

func RegisterInterfaces added in v0.6.0

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

func RegisterMsgServiceServer added in v0.6.0

func RegisterMsgServiceServer(s grpc1.Server, srv MsgServiceServer)

func RegisterQueryServiceHandler added in v0.6.0

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

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

func RegisterQueryServiceHandlerClient added in v0.6.0

func RegisterQueryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryServiceClient) error

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

func RegisterQueryServiceHandlerFromEndpoint added in v0.6.0

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

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

func RegisterQueryServiceHandlerServer added in v0.6.0

func RegisterQueryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServiceServer) error

RegisterQueryServiceHandlerServer registers the http handlers for service QueryService to "mux". UnaryRPC :call QueryServiceServer 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 RegisterQueryServiceHandlerFromEndpoint instead.

func RegisterQueryServiceServer added in v0.6.0

func RegisterQueryServiceServer(s grpc1.Server, srv QueryServiceServer)

func SwapKey

func SwapKey(hash EthereumHash) []byte

Types

type EthereumHash

type EthereumHash [EthereumHashLength]byte

func BytesToHash

func BytesToHash(b []byte) EthereumHash

func (EthereumHash) Bytes

func (e EthereumHash) Bytes() []byte

func (EthereumHash) Hex

func (e EthereumHash) Hex() string

func (EthereumHash) Marshal

func (e EthereumHash) Marshal() ([]byte, error)

func (EthereumHash) MarshalJSON

func (e EthereumHash) MarshalJSON() ([]byte, error)

func (*EthereumHash) SetBytes

func (e *EthereumHash) SetBytes(b []byte)

func (EthereumHash) String

func (e EthereumHash) String() string

func (*EthereumHash) Unmarshal

func (e *EthereumHash) Unmarshal(data []byte) error

func (*EthereumHash) UnmarshalJSON

func (e *EthereumHash) UnmarshalJSON(data []byte) error

type EventSwap added in v0.6.0

type EventSwap struct {
	TxHash   []byte `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty" yaml:"tx_hash"`
	Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty" yaml:"receiver"`
}

func (*EventSwap) Descriptor added in v0.6.0

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

func (*EventSwap) Marshal added in v0.6.0

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

func (*EventSwap) MarshalTo added in v0.6.0

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

func (*EventSwap) MarshalToSizedBuffer added in v0.6.0

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

func (*EventSwap) ProtoMessage added in v0.6.0

func (*EventSwap) ProtoMessage()

func (*EventSwap) Reset added in v0.6.0

func (m *EventSwap) Reset()

func (*EventSwap) Size added in v0.6.0

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

func (*EventSwap) String added in v0.6.0

func (m *EventSwap) String() string

func (*EventSwap) Unmarshal added in v0.6.0

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

func (*EventSwap) XXX_DiscardUnknown added in v0.6.0

func (m *EventSwap) XXX_DiscardUnknown()

func (*EventSwap) XXX_Marshal added in v0.6.0

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

func (*EventSwap) XXX_Merge added in v0.6.0

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

func (*EventSwap) XXX_Size added in v0.6.0

func (m *EventSwap) XXX_Size() int

func (*EventSwap) XXX_Unmarshal added in v0.6.0

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

type GenesisState

type GenesisState struct {
	Swaps  []Swap `protobuf:"bytes,1,rep,name=swaps,proto3" json:"_,omitempty"`
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

func NewGenesisState

func NewGenesisState(swaps Swaps, params Params) *GenesisState

func (*GenesisState) Descriptor added in v0.6.0

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

func (*GenesisState) Marshal added in v0.6.0

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

func (*GenesisState) MarshalTo added in v0.6.0

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

func (*GenesisState) MarshalToSizedBuffer added in v0.6.0

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

func (*GenesisState) ProtoMessage added in v0.6.0

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset added in v0.6.0

func (m *GenesisState) Reset()

func (*GenesisState) Size added in v0.6.0

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

func (*GenesisState) String added in v0.6.0

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal added in v0.6.0

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

func (*GenesisState) Validate added in v0.6.0

func (m *GenesisState) Validate() error

func (*GenesisState) XXX_DiscardUnknown added in v0.6.0

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal added in v0.6.0

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

func (*GenesisState) XXX_Merge added in v0.6.0

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

func (*GenesisState) XXX_Size added in v0.6.0

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal added in v0.6.0

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

type MsgServiceClient added in v0.6.0

type MsgServiceClient interface {
	MsgSwap(ctx context.Context, in *MsgSwapRequest, opts ...grpc.CallOption) (*MsgSwapResponse, error)
}

MsgServiceClient is the client API for MsgService service.

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

func NewMsgServiceClient added in v0.6.0

func NewMsgServiceClient(cc grpc1.ClientConn) MsgServiceClient

type MsgServiceServer added in v0.6.0

type MsgServiceServer interface {
	MsgSwap(context.Context, *MsgSwapRequest) (*MsgSwapResponse, error)
}

MsgServiceServer is the server API for MsgService service.

type MsgSwapRequest added in v0.6.0

type MsgSwapRequest struct {
	From     string                                 `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	TxHash   []byte                                 `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	Receiver string                                 `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
	Amount   github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"amount"`
}

MsgSwapRequest defines the SDK message for swapping an ERC-20 token to the native coin

func NewMsgSwapRequest added in v0.6.0

func NewMsgSwapRequest(from sdk.AccAddress, txHash EthereumHash, receiver sdk.AccAddress, amount sdk.Int) *MsgSwapRequest

func (*MsgSwapRequest) Descriptor added in v0.6.0

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

func (*MsgSwapRequest) GetSigners added in v0.6.0

func (m *MsgSwapRequest) GetSigners() []sdk.AccAddress

func (*MsgSwapRequest) Marshal added in v0.6.0

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

func (*MsgSwapRequest) MarshalTo added in v0.6.0

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

func (*MsgSwapRequest) MarshalToSizedBuffer added in v0.6.0

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

func (*MsgSwapRequest) ProtoMessage added in v0.6.0

func (*MsgSwapRequest) ProtoMessage()

func (*MsgSwapRequest) Reset added in v0.6.0

func (m *MsgSwapRequest) Reset()

func (*MsgSwapRequest) Size added in v0.6.0

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

func (*MsgSwapRequest) String added in v0.6.0

func (m *MsgSwapRequest) String() string

func (*MsgSwapRequest) Unmarshal added in v0.6.0

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

func (*MsgSwapRequest) ValidateBasic added in v0.6.0

func (m *MsgSwapRequest) ValidateBasic() error

func (*MsgSwapRequest) XXX_DiscardUnknown added in v0.6.0

func (m *MsgSwapRequest) XXX_DiscardUnknown()

func (*MsgSwapRequest) XXX_Marshal added in v0.6.0

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

func (*MsgSwapRequest) XXX_Merge added in v0.6.0

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

func (*MsgSwapRequest) XXX_Size added in v0.6.0

func (m *MsgSwapRequest) XXX_Size() int

func (*MsgSwapRequest) XXX_Unmarshal added in v0.6.0

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

type MsgSwapResponse added in v0.6.0

type MsgSwapResponse struct {
}

MsgSwapResponse defines the response of message MsgSwapRequest

func (*MsgSwapResponse) Descriptor added in v0.6.0

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

func (*MsgSwapResponse) Marshal added in v0.6.0

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

func (*MsgSwapResponse) MarshalTo added in v0.6.0

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

func (*MsgSwapResponse) MarshalToSizedBuffer added in v0.6.0

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

func (*MsgSwapResponse) ProtoMessage added in v0.6.0

func (*MsgSwapResponse) ProtoMessage()

func (*MsgSwapResponse) Reset added in v0.6.0

func (m *MsgSwapResponse) Reset()

func (*MsgSwapResponse) Size added in v0.6.0

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

func (*MsgSwapResponse) String added in v0.6.0

func (m *MsgSwapResponse) String() string

func (*MsgSwapResponse) Unmarshal added in v0.6.0

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

func (*MsgSwapResponse) XXX_DiscardUnknown added in v0.6.0

func (m *MsgSwapResponse) XXX_DiscardUnknown()

func (*MsgSwapResponse) XXX_Marshal added in v0.6.0

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

func (*MsgSwapResponse) XXX_Merge added in v0.6.0

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

func (*MsgSwapResponse) XXX_Size added in v0.6.0

func (m *MsgSwapResponse) XXX_Size() int

func (*MsgSwapResponse) XXX_Unmarshal added in v0.6.0

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

type Params

type Params struct {
	SwapEnabled bool   `protobuf:"varint,1,opt,name=swap_enabled,json=swapEnabled,proto3" json:"swap_enabled,omitempty"`
	SwapDenom   string `protobuf:"bytes,2,opt,name=swap_denom,json=swapDenom,proto3" json:"swap_denom,omitempty"`
	ApproveBy   string `protobuf:"bytes,3,opt,name=approve_by,json=approveBy,proto3" json:"approve_by,omitempty"`
}

func DefaultParams

func DefaultParams() Params

func NewParams

func NewParams(swapEnabled bool, swapDenom, approveBy string) Params

func (*Params) Descriptor added in v0.6.0

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

func (*Params) Marshal added in v0.6.0

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

func (*Params) MarshalTo added in v0.6.0

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

func (*Params) MarshalToSizedBuffer added in v0.6.0

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

func (*Params) ParamSetPairs

func (m *Params) ParamSetPairs() params.ParamSetPairs

func (*Params) ProtoMessage added in v0.6.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v0.6.0

func (m *Params) Reset()

func (*Params) Size added in v0.6.0

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal added in v0.6.0

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

func (*Params) Validate

func (m *Params) Validate() error

func (*Params) XXX_DiscardUnknown added in v0.6.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v0.6.0

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

func (*Params) XXX_Merge added in v0.6.0

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

func (*Params) XXX_Size added in v0.6.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v0.6.0

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

type QueryParamsRequest added in v0.6.1

type QueryParamsRequest struct {
}

func NewQueryParamsRequest added in v0.6.1

func NewQueryParamsRequest() *QueryParamsRequest

func (*QueryParamsRequest) Descriptor added in v0.6.1

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

func (*QueryParamsRequest) Marshal added in v0.6.1

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

func (*QueryParamsRequest) MarshalTo added in v0.6.1

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

func (*QueryParamsRequest) MarshalToSizedBuffer added in v0.6.1

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

func (*QueryParamsRequest) ProtoMessage added in v0.6.1

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset added in v0.6.1

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size added in v0.6.1

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

func (*QueryParamsRequest) String added in v0.6.1

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal added in v0.6.1

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

func (*QueryParamsRequest) XXX_DiscardUnknown added in v0.6.1

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal added in v0.6.1

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

func (*QueryParamsRequest) XXX_Merge added in v0.6.1

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

func (*QueryParamsRequest) XXX_Size added in v0.6.1

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal added in v0.6.1

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

type QueryParamsResponse added in v0.6.1

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

func (*QueryParamsResponse) Descriptor added in v0.6.1

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

func (*QueryParamsResponse) Marshal added in v0.6.1

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

func (*QueryParamsResponse) MarshalTo added in v0.6.1

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

func (*QueryParamsResponse) MarshalToSizedBuffer added in v0.6.1

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

func (*QueryParamsResponse) ProtoMessage added in v0.6.1

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset added in v0.6.1

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size added in v0.6.1

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

func (*QueryParamsResponse) String added in v0.6.1

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal added in v0.6.1

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

func (*QueryParamsResponse) XXX_DiscardUnknown added in v0.6.1

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal added in v0.6.1

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

func (*QueryParamsResponse) XXX_Merge added in v0.6.1

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

func (*QueryParamsResponse) XXX_Size added in v0.6.1

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal added in v0.6.1

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

type QueryServiceClient added in v0.6.0

type QueryServiceClient interface {
	QuerySwaps(ctx context.Context, in *QuerySwapsRequest, opts ...grpc.CallOption) (*QuerySwapsResponse, error)
	QuerySwap(ctx context.Context, in *QuerySwapRequest, opts ...grpc.CallOption) (*QuerySwapResponse, error)
	QueryParams(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
}

QueryServiceClient is the client API for QueryService service.

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

func NewQueryServiceClient added in v0.6.0

func NewQueryServiceClient(cc grpc1.ClientConn) QueryServiceClient

type QueryServiceServer added in v0.6.0

type QueryServiceServer interface {
	QuerySwaps(context.Context, *QuerySwapsRequest) (*QuerySwapsResponse, error)
	QuerySwap(context.Context, *QuerySwapRequest) (*QuerySwapResponse, error)
	QueryParams(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServiceServer is the server API for QueryService service.

type QuerySwapRequest added in v0.6.0

type QuerySwapRequest struct {
	TxHash []byte `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
}

func NewQuerySwapRequest added in v0.6.0

func NewQuerySwapRequest(txHash EthereumHash) *QuerySwapRequest

func (*QuerySwapRequest) Descriptor added in v0.6.0

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

func (*QuerySwapRequest) Marshal added in v0.6.0

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

func (*QuerySwapRequest) MarshalTo added in v0.6.0

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

func (*QuerySwapRequest) MarshalToSizedBuffer added in v0.6.0

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

func (*QuerySwapRequest) ProtoMessage added in v0.6.0

func (*QuerySwapRequest) ProtoMessage()

func (*QuerySwapRequest) Reset added in v0.6.0

func (m *QuerySwapRequest) Reset()

func (*QuerySwapRequest) Size added in v0.6.0

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

func (*QuerySwapRequest) String added in v0.6.0

func (m *QuerySwapRequest) String() string

func (*QuerySwapRequest) Unmarshal added in v0.6.0

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

func (*QuerySwapRequest) XXX_DiscardUnknown added in v0.6.0

func (m *QuerySwapRequest) XXX_DiscardUnknown()

func (*QuerySwapRequest) XXX_Marshal added in v0.6.0

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

func (*QuerySwapRequest) XXX_Merge added in v0.6.0

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

func (*QuerySwapRequest) XXX_Size added in v0.6.0

func (m *QuerySwapRequest) XXX_Size() int

func (*QuerySwapRequest) XXX_Unmarshal added in v0.6.0

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

type QuerySwapResponse added in v0.6.0

type QuerySwapResponse struct {
	Swap Swap `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap"`
}

func (*QuerySwapResponse) Descriptor added in v0.6.0

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

func (*QuerySwapResponse) Marshal added in v0.6.0

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

func (*QuerySwapResponse) MarshalTo added in v0.6.0

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

func (*QuerySwapResponse) MarshalToSizedBuffer added in v0.6.0

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

func (*QuerySwapResponse) ProtoMessage added in v0.6.0

func (*QuerySwapResponse) ProtoMessage()

func (*QuerySwapResponse) Reset added in v0.6.0

func (m *QuerySwapResponse) Reset()

func (*QuerySwapResponse) Size added in v0.6.0

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

func (*QuerySwapResponse) String added in v0.6.0

func (m *QuerySwapResponse) String() string

func (*QuerySwapResponse) Unmarshal added in v0.6.0

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

func (*QuerySwapResponse) XXX_DiscardUnknown added in v0.6.0

func (m *QuerySwapResponse) XXX_DiscardUnknown()

func (*QuerySwapResponse) XXX_Marshal added in v0.6.0

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

func (*QuerySwapResponse) XXX_Merge added in v0.6.0

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

func (*QuerySwapResponse) XXX_Size added in v0.6.0

func (m *QuerySwapResponse) XXX_Size() int

func (*QuerySwapResponse) XXX_Unmarshal added in v0.6.0

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

type QuerySwapsRequest added in v0.6.0

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

func NewQuerySwapsRequest added in v0.6.0

func NewQuerySwapsRequest(pagination *query.PageRequest) *QuerySwapsRequest

func (*QuerySwapsRequest) Descriptor added in v0.6.0

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

func (*QuerySwapsRequest) Marshal added in v0.6.0

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

func (*QuerySwapsRequest) MarshalTo added in v0.6.0

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

func (*QuerySwapsRequest) MarshalToSizedBuffer added in v0.6.0

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

func (*QuerySwapsRequest) ProtoMessage added in v0.6.0

func (*QuerySwapsRequest) ProtoMessage()

func (*QuerySwapsRequest) Reset added in v0.6.0

func (m *QuerySwapsRequest) Reset()

func (*QuerySwapsRequest) Size added in v0.6.0

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

func (*QuerySwapsRequest) String added in v0.6.0

func (m *QuerySwapsRequest) String() string

func (*QuerySwapsRequest) Unmarshal added in v0.6.0

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

func (*QuerySwapsRequest) XXX_DiscardUnknown added in v0.6.0

func (m *QuerySwapsRequest) XXX_DiscardUnknown()

func (*QuerySwapsRequest) XXX_Marshal added in v0.6.0

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

func (*QuerySwapsRequest) XXX_Merge added in v0.6.0

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

func (*QuerySwapsRequest) XXX_Size added in v0.6.0

func (m *QuerySwapsRequest) XXX_Size() int

func (*QuerySwapsRequest) XXX_Unmarshal added in v0.6.0

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

type QuerySwapsResponse added in v0.6.0

type QuerySwapsResponse struct {
	Swaps      []Swap              `protobuf:"bytes,1,rep,name=swaps,proto3" json:"swaps"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (*QuerySwapsResponse) Descriptor added in v0.6.0

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

func (*QuerySwapsResponse) Marshal added in v0.6.0

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

func (*QuerySwapsResponse) MarshalTo added in v0.6.0

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

func (*QuerySwapsResponse) MarshalToSizedBuffer added in v0.6.0

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

func (*QuerySwapsResponse) ProtoMessage added in v0.6.0

func (*QuerySwapsResponse) ProtoMessage()

func (*QuerySwapsResponse) Reset added in v0.6.0

func (m *QuerySwapsResponse) Reset()

func (*QuerySwapsResponse) Size added in v0.6.0

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

func (*QuerySwapsResponse) String added in v0.6.0

func (m *QuerySwapsResponse) String() string

func (*QuerySwapsResponse) Unmarshal added in v0.6.0

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

func (*QuerySwapsResponse) XXX_DiscardUnknown added in v0.6.0

func (m *QuerySwapsResponse) XXX_DiscardUnknown()

func (*QuerySwapsResponse) XXX_Marshal added in v0.6.0

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

func (*QuerySwapsResponse) XXX_Merge added in v0.6.0

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

func (*QuerySwapsResponse) XXX_Size added in v0.6.0

func (m *QuerySwapsResponse) XXX_Size() int

func (*QuerySwapsResponse) XXX_Unmarshal added in v0.6.0

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

type Swap

type Swap struct {
	TxHash   []byte     `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	Receiver string     `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	Amount   types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"`
}

func (*Swap) Descriptor added in v0.6.0

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

func (*Swap) GetTxHash added in v0.6.0

func (m *Swap) GetTxHash() (hash EthereumHash)

func (*Swap) Marshal added in v0.6.0

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

func (*Swap) MarshalTo added in v0.6.0

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

func (*Swap) MarshalToSizedBuffer added in v0.6.0

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

func (*Swap) ProtoMessage added in v0.6.0

func (*Swap) ProtoMessage()

func (*Swap) Reset added in v0.6.0

func (m *Swap) Reset()

func (*Swap) Size added in v0.6.0

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

func (*Swap) String

func (m *Swap) String() string

func (*Swap) Unmarshal added in v0.6.0

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

func (*Swap) Validate

func (m *Swap) Validate() error

func (*Swap) XXX_DiscardUnknown added in v0.6.0

func (m *Swap) XXX_DiscardUnknown()

func (*Swap) XXX_Marshal added in v0.6.0

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

func (*Swap) XXX_Merge added in v0.6.0

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

func (*Swap) XXX_Size added in v0.6.0

func (m *Swap) XXX_Size() int

func (*Swap) XXX_Unmarshal added in v0.6.0

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

type Swaps

type Swaps []Swap

type UnimplementedMsgServiceServer added in v0.6.0

type UnimplementedMsgServiceServer struct {
}

UnimplementedMsgServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServiceServer) MsgSwap added in v0.6.0

type UnimplementedQueryServiceServer added in v0.6.0

type UnimplementedQueryServiceServer struct {
}

UnimplementedQueryServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServiceServer) QueryParams added in v0.6.1

func (*UnimplementedQueryServiceServer) QuerySwap added in v0.6.0

func (*UnimplementedQueryServiceServer) QuerySwaps added in v0.6.0

Jump to

Keyboard shortcuts

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