Documentation
¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterInterfaces(registry cdctypes.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)
- type ContractManagerKeeper
- type MsgClient
- type MsgServer
- type MsgTransfer
- func (*MsgTransfer) Descriptor() ([]byte, []int)
- func (msg MsgTransfer) GetSignBytes() []byte
- func (msg *MsgTransfer) GetSigners() []sdk.AccAddress
- func (m *MsgTransfer) Marshal() (dAtA []byte, err error)
- func (m *MsgTransfer) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgTransfer) ProtoMessage()
- func (m *MsgTransfer) Reset()
- func (msg *MsgTransfer) Route() string
- func (m *MsgTransfer) Size() (n int)
- func (m *MsgTransfer) String() string
- func (msg *MsgTransfer) Type() string
- func (m *MsgTransfer) Unmarshal(dAtA []byte) error
- func (msg *MsgTransfer) ValidateBasic() error
- func (m *MsgTransfer) XXX_DiscardUnknown()
- func (m *MsgTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgTransfer) XXX_Merge(src proto.Message)
- func (m *MsgTransfer) XXX_Size() int
- func (m *MsgTransfer) XXX_Unmarshal(b []byte) error
- type MsgTransferResponse
- func (*MsgTransferResponse) Descriptor() ([]byte, []int)
- func (m *MsgTransferResponse) GetChannel() string
- func (m *MsgTransferResponse) GetSequenceId() uint64
- func (m *MsgTransferResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgTransferResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgTransferResponse) ProtoMessage()
- func (m *MsgTransferResponse) Reset()
- func (m *MsgTransferResponse) Size() (n int)
- func (m *MsgTransferResponse) String() string
- func (m *MsgTransferResponse) Unmarshal(dAtA []byte) error
- func (m *MsgTransferResponse) XXX_DiscardUnknown()
- func (m *MsgTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgTransferResponse) XXX_Merge(src proto.Message)
- func (m *MsgTransferResponse) XXX_Size() int
- func (m *MsgTransferResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) DenomHash(ctx context.Context, req *types.QueryDenomHashRequest) (*types.QueryDenomHashResponse, error)
- func (*UnimplementedQueryServer) DenomTrace(ctx context.Context, req *types.QueryDenomTraceRequest) (*types.QueryDenomTraceResponse, error)
- func (*UnimplementedQueryServer) DenomTraces(ctx context.Context, req *types.QueryDenomTracesRequest) (*types.QueryDenomTracesResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Constants ¶
This section is empty.
Variables ¶
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
Functions ¶
func RegisterInterfaces ¶ added in v0.1.0
func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶ added in v0.1.0
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 ContractManagerKeeper ¶ added in v0.1.0
type ContractManagerKeeper interface { AddContractFailure(ctx sdk.Context, address string, ackID uint64, ackType string) SudoResponse(ctx sdk.Context, senderAddress sdk.AccAddress, request channeltypes.Packet, msg []byte) ([]byte, error) SudoError(ctx sdk.Context, senderAddress sdk.AccAddress, request channeltypes.Packet, details string) ([]byte, error) SudoTimeout(ctx sdk.Context, senderAddress sdk.AccAddress, request channeltypes.Packet) ([]byte, error) }
ContractManagerKeeper defines the expected interface needed to add ack information about sudo failure.
type MsgClient ¶
type MsgClient interface { // Transfer defines a rpc handler method for MsgTransfer. Transfer(ctx context.Context, in *MsgTransfer, opts ...grpc.CallOption) (*MsgTransferResponse, 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 MsgServer ¶
type MsgServer interface { // Transfer defines a rpc handler method for MsgTransfer. Transfer(context.Context, *MsgTransfer) (*MsgTransferResponse, error) }
MsgServer is the server API for Msg service.
type MsgTransfer ¶ added in v0.1.0
type MsgTransfer struct { // the port on which the packet will be sent SourcePort string `protobuf:"bytes,1,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty" yaml:"source_port"` // the channel by which the packet will be sent SourceChannel string `protobuf:"bytes,2,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty" yaml:"source_channel"` // the tokens to be transferred Token types.Coin `protobuf:"bytes,3,opt,name=token,proto3" json:"token"` // the sender address Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"` // the recipient address on the destination chain Receiver string `protobuf:"bytes,5,opt,name=receiver,proto3" json:"receiver,omitempty"` // Timeout height relative to the current block height. // The timeout is disabled when set to 0. TimeoutHeight types1.Height `protobuf:"bytes,6,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height" yaml:"timeout_height"` // Timeout timestamp in absolute nanoseconds since unix epoch. // The timeout is disabled when set to 0. TimeoutTimestamp uint64 `` /* 135-byte string literal not displayed */ Fee types2.Fee `protobuf:"bytes,8,opt,name=fee,proto3" json:"fee"` }
func (*MsgTransfer) Descriptor ¶ added in v0.1.0
func (*MsgTransfer) Descriptor() ([]byte, []int)
func (MsgTransfer) GetSignBytes ¶ added in v0.1.0
func (msg MsgTransfer) GetSignBytes() []byte
func (*MsgTransfer) GetSigners ¶ added in v0.1.0
func (msg *MsgTransfer) GetSigners() []sdk.AccAddress
func (*MsgTransfer) Marshal ¶ added in v0.1.0
func (m *MsgTransfer) Marshal() (dAtA []byte, err error)
func (*MsgTransfer) MarshalTo ¶ added in v0.1.0
func (m *MsgTransfer) MarshalTo(dAtA []byte) (int, error)
func (*MsgTransfer) MarshalToSizedBuffer ¶ added in v0.1.0
func (m *MsgTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgTransfer) ProtoMessage ¶ added in v0.1.0
func (*MsgTransfer) ProtoMessage()
func (*MsgTransfer) Reset ¶ added in v0.1.0
func (m *MsgTransfer) Reset()
func (*MsgTransfer) Route ¶ added in v0.1.0
func (msg *MsgTransfer) Route() string
func (*MsgTransfer) Size ¶ added in v0.1.0
func (m *MsgTransfer) Size() (n int)
func (*MsgTransfer) String ¶ added in v0.1.0
func (m *MsgTransfer) String() string
func (*MsgTransfer) Type ¶ added in v0.1.0
func (msg *MsgTransfer) Type() string
func (*MsgTransfer) Unmarshal ¶ added in v0.1.0
func (m *MsgTransfer) Unmarshal(dAtA []byte) error
func (*MsgTransfer) ValidateBasic ¶ added in v0.1.0
func (msg *MsgTransfer) ValidateBasic() error
func (*MsgTransfer) XXX_DiscardUnknown ¶ added in v0.1.0
func (m *MsgTransfer) XXX_DiscardUnknown()
func (*MsgTransfer) XXX_Marshal ¶ added in v0.1.0
func (m *MsgTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgTransfer) XXX_Merge ¶ added in v0.1.0
func (m *MsgTransfer) XXX_Merge(src proto.Message)
func (*MsgTransfer) XXX_Size ¶ added in v0.1.0
func (m *MsgTransfer) XXX_Size() int
func (*MsgTransfer) XXX_Unmarshal ¶ added in v0.1.0
func (m *MsgTransfer) XXX_Unmarshal(b []byte) error
type MsgTransferResponse ¶
type MsgTransferResponse struct { // channel's sequence_id for outgoing ibc packet. Unique per a channel. SequenceId uint64 `protobuf:"varint,1,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"` // channel src channel on neutron side trasaction was submitted from Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"` }
MsgTransferResponse is the modified response type for ibc-go MsgTransfer.
func (*MsgTransferResponse) Descriptor ¶
func (*MsgTransferResponse) Descriptor() ([]byte, []int)
func (*MsgTransferResponse) GetChannel ¶
func (m *MsgTransferResponse) GetChannel() string
func (*MsgTransferResponse) GetSequenceId ¶
func (m *MsgTransferResponse) GetSequenceId() uint64
func (*MsgTransferResponse) Marshal ¶
func (m *MsgTransferResponse) Marshal() (dAtA []byte, err error)
func (*MsgTransferResponse) MarshalTo ¶
func (m *MsgTransferResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgTransferResponse) MarshalToSizedBuffer ¶
func (m *MsgTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgTransferResponse) ProtoMessage ¶
func (*MsgTransferResponse) ProtoMessage()
func (*MsgTransferResponse) Reset ¶
func (m *MsgTransferResponse) Reset()
func (*MsgTransferResponse) Size ¶
func (m *MsgTransferResponse) Size() (n int)
func (*MsgTransferResponse) String ¶
func (m *MsgTransferResponse) String() string
func (*MsgTransferResponse) Unmarshal ¶
func (m *MsgTransferResponse) Unmarshal(dAtA []byte) error
func (*MsgTransferResponse) XXX_DiscardUnknown ¶
func (m *MsgTransferResponse) XXX_DiscardUnknown()
func (*MsgTransferResponse) XXX_Marshal ¶
func (m *MsgTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgTransferResponse) XXX_Merge ¶
func (m *MsgTransferResponse) XXX_Merge(src proto.Message)
func (*MsgTransferResponse) XXX_Size ¶
func (m *MsgTransferResponse) XXX_Size() int
func (*MsgTransferResponse) XXX_Unmarshal ¶
func (m *MsgTransferResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶
type QueryClient interface { // DenomTrace queries a denomination trace information. DenomTrace(ctx context.Context, in *types.QueryDenomTraceRequest, opts ...grpc.CallOption) (*types.QueryDenomTraceResponse, error) // DenomTraces queries all denomination traces. DenomTraces(ctx context.Context, in *types.QueryDenomTracesRequest, opts ...grpc.CallOption) (*types.QueryDenomTracesResponse, error) // Params queries all parameters of the ibc-transfer module. Params(ctx context.Context, in *types.QueryParamsRequest, opts ...grpc.CallOption) (*types.QueryParamsResponse, error) // DenomHash queries a denomination hash information. DenomHash(ctx context.Context, in *types.QueryDenomHashRequest, opts ...grpc.CallOption) (*types.QueryDenomHashResponse, 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 { // DenomTrace queries a denomination trace information. DenomTrace(context.Context, *types.QueryDenomTraceRequest) (*types.QueryDenomTraceResponse, error) // DenomTraces queries all denomination traces. DenomTraces(context.Context, *types.QueryDenomTracesRequest) (*types.QueryDenomTracesResponse, error) // Params queries all parameters of the ibc-transfer module. Params(context.Context, *types.QueryParamsRequest) (*types.QueryParamsResponse, error) // DenomHash queries a denomination hash information. DenomHash(context.Context, *types.QueryDenomHashRequest) (*types.QueryDenomHashResponse, 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) Transfer ¶
func (*UnimplementedMsgServer) Transfer(ctx context.Context, req *MsgTransfer) (*MsgTransferResponse, error)
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) DenomHash ¶
func (*UnimplementedQueryServer) DenomHash(ctx context.Context, req *types.QueryDenomHashRequest) (*types.QueryDenomHashResponse, error)
func (*UnimplementedQueryServer) DenomTrace ¶
func (*UnimplementedQueryServer) DenomTrace(ctx context.Context, req *types.QueryDenomTraceRequest) (*types.QueryDenomTraceResponse, error)
func (*UnimplementedQueryServer) DenomTraces ¶
func (*UnimplementedQueryServer) DenomTraces(ctx context.Context, req *types.QueryDenomTracesRequest) (*types.QueryDenomTracesResponse, error)
func (*UnimplementedQueryServer) Params ¶
func (*UnimplementedQueryServer) Params(ctx context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error)