types

package
v0.0.0-...-fb8f645 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

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

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)
}

ChannelKeeper defines the expected IBC channel keeper

type ContractManagerKeeper

type ContractManagerKeeper interface {
	HasContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) bool
	AddContractFailure(ctx sdk.Context, channelID string, 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 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) GetSignBytes

func (msg MsgTransfer) GetSignBytes() []byte

func (*MsgTransfer) GetSigners

func (msg *MsgTransfer) GetSigners() []sdk.AccAddress

func (*MsgTransfer) Marshal

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

func (*MsgTransfer) MarshalTo

func (m *MsgTransfer) MarshalTo(dAtA []byte) (int, 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) Route

func (msg *MsgTransfer) Route() string

func (*MsgTransfer) Size

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

func (*MsgTransfer) String

func (m *MsgTransfer) String() string

func (*MsgTransfer) Type

func (msg *MsgTransfer) Type() 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 petri 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

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) DenomHash

func (*UnimplementedQueryServer) DenomTrace

func (*UnimplementedQueryServer) DenomTraces

func (*UnimplementedQueryServer) Params

Jump to

Keyboard shortcuts

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