types

package
v1.4.2-beta.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ModuleName = "icamsgauth"

	StoreKey = ModuleName

	RouterKey = ModuleName

	QuerierRoute = ModuleName
)

Variables

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")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

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.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgHandler

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

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

func RegisterMsgHandlerClient

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

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

func RegisterMsgHandlerFromEndpoint

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

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

func RegisterMsgHandlerServer

func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error

RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer 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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.

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 (such as grpc.SendHeader, etc) 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(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"`
}

MsgRegisterAccount registers an interchain account for the given owner over the specified connection pair

func NewMsgRegisterAccount

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

NewMsgRegisterAccount creates a new MsgRegisterAccount instance

func (*MsgRegisterAccount) Descriptor

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

func (*MsgRegisterAccount) Equal

func (this *MsgRegisterAccount) Equal(that interface{}) bool

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

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

func (*MsgRegisterAccount) String

func (m *MsgRegisterAccount) String() string

func (*MsgRegisterAccount) Unmarshal

func (m *MsgRegisterAccount) Unmarshal(dAtA []byte) 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 is the response type for Msg/RegisterAccount

func (*MsgRegisterAccountResponse) Descriptor

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

func (*MsgRegisterAccountResponse) Equal

func (this *MsgRegisterAccountResponse) Equal(that interface{}) bool

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(context.Context, *MsgSubmitTx) (*MsgSubmitTxResponse, error)
}

MsgServer is the server API for Msg service.

type MsgSubmitTx

type MsgSubmitTx struct {
	Owner        github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=owner,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" 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,4,opt,name=msg,proto3" json:"msg,omitempty"`
}

MsgSubmitTx creates and submits an arbitrary transaction msg to be executed using an interchain account

func NewMsgSubmitTx

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

NewMsgSend creates a new MsgSend instance

func (*MsgSubmitTx) Descriptor

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

func (*MsgSubmitTx) Equal

func (this *MsgSubmitTx) Equal(that interface{}) bool

func (MsgSubmitTx) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgSubmitTx) GetTxMsg

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

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

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

func (*MsgSubmitTx) String

func (m *MsgSubmitTx) String() 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) 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 MsgSubmitTx response type

func (*MsgSubmitTxResponse) Descriptor

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

func (*MsgSubmitTxResponse) Equal

func (this *MsgSubmitTxResponse) Equal(that interface{}) bool

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 {
	// QueryInterchainAccountFromAddress returns the interchain account for given owner address on a given connection pair
	InterchainAccountFromAddress(ctx context.Context, in *QueryInterchainAccountFromAddressRequest, opts ...grpc.CallOption) (*QueryInterchainAccountFromAddressResponse, 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 QueryInterchainAccountFromAddressRequest

type QueryInterchainAccountFromAddressRequest 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"`
}

QueryInterchainAccountFromAddressRequest is the request type for the Query/InterchainAccountAddress RPC

func NewQueryInterchainAccountRequest

func NewQueryInterchainAccountRequest(owner, connectionID, counterpartyConnectionID string) *QueryInterchainAccountFromAddressRequest

NewQueryInterchainAccountRequest creates and returns a new QueryInterchainAccountFromAddressRequest

func (*QueryInterchainAccountFromAddressRequest) Descriptor

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

func (*QueryInterchainAccountFromAddressRequest) Equal

func (this *QueryInterchainAccountFromAddressRequest) Equal(that interface{}) bool

func (*QueryInterchainAccountFromAddressRequest) Marshal

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

func (*QueryInterchainAccountFromAddressRequest) MarshalTo

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

func (*QueryInterchainAccountFromAddressRequest) MarshalToSizedBuffer

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

func (*QueryInterchainAccountFromAddressRequest) ProtoMessage

func (*QueryInterchainAccountFromAddressRequest) Reset

func (*QueryInterchainAccountFromAddressRequest) Size

func (*QueryInterchainAccountFromAddressRequest) String

func (*QueryInterchainAccountFromAddressRequest) Unmarshal

func (*QueryInterchainAccountFromAddressRequest) XXX_DiscardUnknown

func (m *QueryInterchainAccountFromAddressRequest) XXX_DiscardUnknown()

func (*QueryInterchainAccountFromAddressRequest) XXX_Marshal

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

func (*QueryInterchainAccountFromAddressRequest) XXX_Merge

func (*QueryInterchainAccountFromAddressRequest) XXX_Size

func (*QueryInterchainAccountFromAddressRequest) XXX_Unmarshal

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

type QueryInterchainAccountFromAddressResponse

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

QueryInterchainAccountFromAddressResponse the response type for the Query/InterchainAccountAddress RPC

func NewQueryInterchainAccountResponse

func NewQueryInterchainAccountResponse(interchainAccAddr string) *QueryInterchainAccountFromAddressResponse

NewQueryInterchainAccountResponse creates and returns a new QueryInterchainAccountFromAddressResponse

func (*QueryInterchainAccountFromAddressResponse) Descriptor

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

func (*QueryInterchainAccountFromAddressResponse) Equal

func (this *QueryInterchainAccountFromAddressResponse) Equal(that interface{}) bool

func (*QueryInterchainAccountFromAddressResponse) Marshal

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

func (*QueryInterchainAccountFromAddressResponse) MarshalTo

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

func (*QueryInterchainAccountFromAddressResponse) MarshalToSizedBuffer

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

func (*QueryInterchainAccountFromAddressResponse) ProtoMessage

func (*QueryInterchainAccountFromAddressResponse) Reset

func (*QueryInterchainAccountFromAddressResponse) Size

func (*QueryInterchainAccountFromAddressResponse) String

func (*QueryInterchainAccountFromAddressResponse) Unmarshal

func (*QueryInterchainAccountFromAddressResponse) XXX_DiscardUnknown

func (m *QueryInterchainAccountFromAddressResponse) XXX_DiscardUnknown()

func (*QueryInterchainAccountFromAddressResponse) XXX_Marshal

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

func (*QueryInterchainAccountFromAddressResponse) XXX_Merge

func (*QueryInterchainAccountFromAddressResponse) XXX_Size

func (*QueryInterchainAccountFromAddressResponse) XXX_Unmarshal

type QueryServer

type QueryServer interface {
	// QueryInterchainAccountFromAddress returns the interchain account for given owner address on a given connection pair
	InterchainAccountFromAddress(context.Context, *QueryInterchainAccountFromAddressRequest) (*QueryInterchainAccountFromAddressResponse, 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.

Jump to

Keyboard shortcuts

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