types

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 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 = "icamauth"

	StoreKey = ModuleName

	RouterKey = ModuleName

	QuerierRoute = ModuleName
)

Variables

View Source
var (
	ModuleCdc = codec.New()
	Marshal   *codec.CodecProxy
)
View Source
var (
	ErrIBCAccountAlreadyExist = sdkerrors.Register(ModuleName, 2, "interchain account already registered")
	ErrIBCAccountNotExist     = sdkerrors.Register(ModuleName, 3, "interchain account not exist")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
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 PackTxMsgAny

func PackTxMsgAny(sdkMsg sdk.Msg) (*codectypes.Any, error)

PackTxMsgAny marshals the sdk.Msg payload to a protobuf Any type

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

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 MsgClient

type MsgClient interface {
	// Register defines a rpc handler for MsgRegisterAccount
	RegisterAccount(ctx context.Context, in *MsgRegisterAccount, opts ...grpc.CallOption) (*MsgRegisterAccountResponse, error)
	// SubmitTx defines a rpc handler for MsgSubmitTx
	SubmitTx(ctx context.Context, in *MsgSubmitTx, opts ...grpc.CallOption) (*MsgSubmitTxResponse, 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 MsgRegisterAccount

type MsgRegisterAccount struct {
	Owner        string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
	Version      string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
}

MsgRegisterAccount defines the payload for Msg/RegisterAccount

func NewMsgRegisterAccount

func NewMsgRegisterAccount(owner, connectionID, version string) *MsgRegisterAccount

NewMsgRegisterAccount creates a new MsgRegisterAccount instance

func (*MsgRegisterAccount) Descriptor

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

func (MsgRegisterAccount) GetSignBytes

func (m MsgRegisterAccount) GetSignBytes() []byte

func (MsgRegisterAccount) GetSigners

func (msg MsgRegisterAccount) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgRegisterAccount) Marshal

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

func (*MsgRegisterAccount) MarshalTo

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

func (*MsgRegisterAccount) MarshalToSizedBuffer

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

func (*MsgRegisterAccount) ProtoMessage

func (*MsgRegisterAccount) ProtoMessage()

func (*MsgRegisterAccount) Reset

func (m *MsgRegisterAccount) Reset()

func (MsgRegisterAccount) Route

func (m MsgRegisterAccount) Route() string

func (*MsgRegisterAccount) Size

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

func (*MsgRegisterAccount) String

func (m *MsgRegisterAccount) String() string

func (MsgRegisterAccount) Type

func (m MsgRegisterAccount) Type() string

func (*MsgRegisterAccount) Unmarshal

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

func (MsgRegisterAccount) ValidWithHeight

func (msg MsgRegisterAccount) ValidWithHeight(h int64) error

////////

func (MsgRegisterAccount) ValidateBasic

func (msg MsgRegisterAccount) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgRegisterAccount) XXX_DiscardUnknown

func (m *MsgRegisterAccount) XXX_DiscardUnknown()

func (*MsgRegisterAccount) XXX_Marshal

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

func (*MsgRegisterAccount) XXX_Merge

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

func (*MsgRegisterAccount) XXX_Size

func (m *MsgRegisterAccount) XXX_Size() int

func (*MsgRegisterAccount) XXX_Unmarshal

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

type MsgRegisterAccountResponse

type MsgRegisterAccountResponse struct {
}

MsgRegisterAccountResponse defines the response for Msg/RegisterAccount

func (*MsgRegisterAccountResponse) Descriptor

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

func (*MsgRegisterAccountResponse) Marshal

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

func (*MsgRegisterAccountResponse) MarshalTo

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

func (*MsgRegisterAccountResponse) MarshalToSizedBuffer

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

func (*MsgRegisterAccountResponse) ProtoMessage

func (*MsgRegisterAccountResponse) ProtoMessage()

func (*MsgRegisterAccountResponse) Reset

func (m *MsgRegisterAccountResponse) Reset()

func (*MsgRegisterAccountResponse) Size

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

func (*MsgRegisterAccountResponse) String

func (m *MsgRegisterAccountResponse) String() string

func (*MsgRegisterAccountResponse) Unmarshal

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

func (*MsgRegisterAccountResponse) XXX_DiscardUnknown

func (m *MsgRegisterAccountResponse) XXX_DiscardUnknown()

func (*MsgRegisterAccountResponse) XXX_Marshal

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

func (*MsgRegisterAccountResponse) XXX_Merge

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

func (*MsgRegisterAccountResponse) XXX_Size

func (m *MsgRegisterAccountResponse) XXX_Size() int

func (*MsgRegisterAccountResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// Register defines a rpc handler for MsgRegisterAccount
	RegisterAccount(context.Context, *MsgRegisterAccount) (*MsgRegisterAccountResponse, error)
	// SubmitTx defines a rpc handler for MsgSubmitTx
	SubmitTx(context.Context, *MsgSubmitTx) (*MsgSubmitTxResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubmitTx

type MsgSubmitTx struct {
	Owner        string     `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	ConnectionId string     `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
	Msg          *types.Any `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
}

MsgSubmitTx defines the payload for Msg/SubmitTx

func NewMsgSubmitTx

func NewMsgSubmitTx(sdkMsg sdk.Msg, connectionID, owner string) (*MsgSubmitTx, error)

NewMsgSubmitTx creates and returns a new MsgSubmitTx instance

func (*MsgSubmitTx) Descriptor

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

func (*MsgSubmitTx) GetSignBytes

func (m *MsgSubmitTx) GetSignBytes() []byte

func (MsgSubmitTx) GetSigners

func (msg MsgSubmitTx) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgSubmitTx) GetTxMsg

func (msg *MsgSubmitTx) GetTxMsg() sdk.MsgAdapter

GetTxMsg fetches the cached any message

func (*MsgSubmitTx) Marshal

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

func (*MsgSubmitTx) MarshalTo

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

func (*MsgSubmitTx) MarshalToSizedBuffer

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

func (*MsgSubmitTx) ProtoMessage

func (*MsgSubmitTx) ProtoMessage()

func (*MsgSubmitTx) Reset

func (m *MsgSubmitTx) Reset()

func (MsgSubmitTx) Route

func (m MsgSubmitTx) Route() string

func (*MsgSubmitTx) Size

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

func (*MsgSubmitTx) String

func (m *MsgSubmitTx) String() string

func (MsgSubmitTx) Type

func (m MsgSubmitTx) Type() string

func (*MsgSubmitTx) Unmarshal

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

func (MsgSubmitTx) UnpackInterfaces

func (msg MsgSubmitTx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error

UnpackInterfaces implements codectypes.UnpackInterfacesMessage

func (MsgSubmitTx) ValidWithHeight

func (msg MsgSubmitTx) ValidWithHeight(h int64) error

func (MsgSubmitTx) ValidateBasic

func (msg MsgSubmitTx) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgSubmitTx) XXX_DiscardUnknown

func (m *MsgSubmitTx) XXX_DiscardUnknown()

func (*MsgSubmitTx) XXX_Marshal

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

func (*MsgSubmitTx) XXX_Merge

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

func (*MsgSubmitTx) XXX_Size

func (m *MsgSubmitTx) XXX_Size() int

func (*MsgSubmitTx) XXX_Unmarshal

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

type MsgSubmitTxResponse

type MsgSubmitTxResponse struct {
}

MsgSubmitTxResponse defines the response for Msg/SubmitTx

func (*MsgSubmitTxResponse) Descriptor

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

func (*MsgSubmitTxResponse) Marshal

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

func (*MsgSubmitTxResponse) MarshalTo

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

func (*MsgSubmitTxResponse) MarshalToSizedBuffer

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

func (*MsgSubmitTxResponse) ProtoMessage

func (*MsgSubmitTxResponse) ProtoMessage()

func (*MsgSubmitTxResponse) Reset

func (m *MsgSubmitTxResponse) Reset()

func (*MsgSubmitTxResponse) Size

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

func (*MsgSubmitTxResponse) String

func (m *MsgSubmitTxResponse) String() string

func (*MsgSubmitTxResponse) Unmarshal

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

func (*MsgSubmitTxResponse) XXX_DiscardUnknown

func (m *MsgSubmitTxResponse) XXX_DiscardUnknown()

func (*MsgSubmitTxResponse) XXX_Marshal

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

func (*MsgSubmitTxResponse) XXX_Merge

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

func (*MsgSubmitTxResponse) XXX_Size

func (m *MsgSubmitTxResponse) XXX_Size() int

func (*MsgSubmitTxResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// QueryInterchainAccount returns the interchain account for given owner address on a given connection pair
	InterchainAccount(ctx context.Context, in *QueryInterchainAccountRequest, opts ...grpc.CallOption) (*QueryInterchainAccountResponse, 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 QueryInterchainAccountRequest

type QueryInterchainAccountRequest struct {
	Owner        string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
}

QueryInterchainAccountRequest is the request type for the Query/InterchainAccountAddress RPC

func NewQueryInterchainAccountRequest

func NewQueryInterchainAccountRequest(connectionID, owner string) *QueryInterchainAccountRequest

NewQueryInterchainAccountRequest creates and returns a new QueryInterchainAccountRequest

func (*QueryInterchainAccountRequest) Descriptor

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

func (*QueryInterchainAccountRequest) GetConnectionId

func (m *QueryInterchainAccountRequest) GetConnectionId() string

func (*QueryInterchainAccountRequest) GetOwner

func (m *QueryInterchainAccountRequest) GetOwner() string

func (*QueryInterchainAccountRequest) Marshal

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

func (*QueryInterchainAccountRequest) MarshalTo

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

func (*QueryInterchainAccountRequest) MarshalToSizedBuffer

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

func (*QueryInterchainAccountRequest) ProtoMessage

func (*QueryInterchainAccountRequest) ProtoMessage()

func (*QueryInterchainAccountRequest) Reset

func (m *QueryInterchainAccountRequest) Reset()

func (*QueryInterchainAccountRequest) Size

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

func (*QueryInterchainAccountRequest) String

func (*QueryInterchainAccountRequest) Unmarshal

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

func (*QueryInterchainAccountRequest) XXX_DiscardUnknown

func (m *QueryInterchainAccountRequest) XXX_DiscardUnknown()

func (*QueryInterchainAccountRequest) XXX_Marshal

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

func (*QueryInterchainAccountRequest) XXX_Merge

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

func (*QueryInterchainAccountRequest) XXX_Size

func (m *QueryInterchainAccountRequest) XXX_Size() int

func (*QueryInterchainAccountRequest) XXX_Unmarshal

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

type QueryInterchainAccountResponse

type QueryInterchainAccountResponse struct {
	InterchainAccountAddress string `` /* 169-byte string literal not displayed */
}

QueryInterchainAccountResponse the response type for the Query/InterchainAccountAddress RPC

func NewQueryInterchainAccountResponse

func NewQueryInterchainAccountResponse(interchainAccAddr string) *QueryInterchainAccountResponse

NewQueryInterchainAccountResponse creates and returns a new QueryInterchainAccountResponse

func (*QueryInterchainAccountResponse) Descriptor

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

func (*QueryInterchainAccountResponse) GetInterchainAccountAddress

func (m *QueryInterchainAccountResponse) GetInterchainAccountAddress() string

func (*QueryInterchainAccountResponse) Marshal

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

func (*QueryInterchainAccountResponse) MarshalTo

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

func (*QueryInterchainAccountResponse) MarshalToSizedBuffer

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

func (*QueryInterchainAccountResponse) ProtoMessage

func (*QueryInterchainAccountResponse) ProtoMessage()

func (*QueryInterchainAccountResponse) Reset

func (m *QueryInterchainAccountResponse) Reset()

func (*QueryInterchainAccountResponse) Size

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

func (*QueryInterchainAccountResponse) String

func (*QueryInterchainAccountResponse) Unmarshal

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

func (*QueryInterchainAccountResponse) XXX_DiscardUnknown

func (m *QueryInterchainAccountResponse) XXX_DiscardUnknown()

func (*QueryInterchainAccountResponse) XXX_Marshal

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

func (*QueryInterchainAccountResponse) XXX_Merge

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

func (*QueryInterchainAccountResponse) XXX_Size

func (m *QueryInterchainAccountResponse) XXX_Size() int

func (*QueryInterchainAccountResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// QueryInterchainAccount returns the interchain account for given owner address on a given connection pair
	InterchainAccount(context.Context, *QueryInterchainAccountRequest) (*QueryInterchainAccountResponse, 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) RegisterAccount

func (*UnimplementedMsgServer) SubmitTx

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) InterchainAccount

Jump to

Keyboard shortcuts

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