Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func MsgOrigTransferHandler(srv interface{}, ctx context.Context, dec func(interface{}) error, ...) (interface{}, error)
- 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 AccountKeeper
- type ChannelKeeper
- type FeeRefunderKeeper
- type MsgClient
- type MsgServer
- type MsgTransfer
- func (*MsgTransfer) Descriptor() ([]byte, []int)
- 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 (m *MsgTransfer) Size() (n int)
- func (m *MsgTransfer) String() 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)
- type WasmKeeper
Constants ¶
This section is empty.
Variables ¶
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
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 MsgServiceDescOrig = grpc.ServiceDesc{ ServiceName: "ibc.applications.transfer.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Transfer", Handler: MsgOrigTransferHandler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ibc/applications/transfer/v1/tx.proto", }
Functions ¶
func MsgOrigTransferHandler ¶
func MsgOrigTransferHandler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error)
MsgOrigTransferHandler - 1) helps to bind `/neutron.transfer.Msg/Transfer` as a handler for `ibc.applications.transfer.v1.MsgTransfer` 2) converts `ibc.applications.transfer.v1.MsgTransfer` into neutron.transfer.MsgTransfer` before processing.
func RegisterInterfaces ¶
func RegisterInterfaces(registry cdctypes.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 AccountKeeper ¶
type AccountKeeper interface { GetModuleAddress(name string) sdk.AccAddress GetModuleAccount(ctx sdk.Context, name string) types.ModuleAccountI }
AccountKeeper defines the contract required for account APIs.
type ChannelKeeper ¶
type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) GetAllChannelsWithPortPrefix(ctx sdk.Context, portPrefix string) []channeltypes.IdentifiedChannel }
ChannelKeeper defines the expected IBC channel keeper
type FeeRefunderKeeper ¶
type FeeRefunderKeeper interface { LockFees(ctx sdk.Context, payer sdk.AccAddress, packetID feerefundertypes.PacketID, fee feerefundertypes.Fee) error DistributeAcknowledgementFee(ctx sdk.Context, receiver sdk.AccAddress, packetID feerefundertypes.PacketID) DistributeTimeoutFee(ctx sdk.Context, receiver sdk.AccAddress, packetID feerefundertypes.PacketID) }
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 ¶
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 */ Memo string `protobuf:"bytes,8,opt,name=memo,proto3" json:"memo,omitempty"` Fee types2.Fee `protobuf:"bytes,9,opt,name=fee,proto3" json:"fee"` }
func (*MsgTransfer) Descriptor ¶
func (*MsgTransfer) Descriptor() ([]byte, []int)
func (*MsgTransfer) GetSigners ¶
func (msg *MsgTransfer) GetSigners() []sdk.AccAddress
func (*MsgTransfer) Marshal ¶
func (m *MsgTransfer) Marshal() (dAtA []byte, err error)
func (*MsgTransfer) MarshalToSizedBuffer ¶
func (m *MsgTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgTransfer) ProtoMessage ¶
func (*MsgTransfer) ProtoMessage()
func (*MsgTransfer) Reset ¶
func (m *MsgTransfer) Reset()
func (*MsgTransfer) Size ¶
func (m *MsgTransfer) Size() (n int)
func (*MsgTransfer) String ¶
func (m *MsgTransfer) String() string
func (*MsgTransfer) Unmarshal ¶
func (m *MsgTransfer) Unmarshal(dAtA []byte) error
func (*MsgTransfer) ValidateBasic ¶
func (msg *MsgTransfer) ValidateBasic() error
func (*MsgTransfer) XXX_DiscardUnknown ¶
func (m *MsgTransfer) XXX_DiscardUnknown()
func (*MsgTransfer) XXX_Marshal ¶
func (m *MsgTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgTransfer) XXX_Merge ¶
func (m *MsgTransfer) XXX_Merge(src proto.Message)
func (*MsgTransfer) XXX_Size ¶
func (m *MsgTransfer) XXX_Size() int
func (*MsgTransfer) XXX_Unmarshal ¶
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)