v1

package
v1.3.2 Latest Latest
Warning

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

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

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

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

func RegisterTypes

func RegisterTypes(registry types.InterfaceRegistry)

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 is the address of the interchain account owner.
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// connection_id is the connection id string (i.e. channel-5).
	ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	// version is the application version string. For example, this could be an
	// ICS27 encoded metadata type or an ICS29 encoded metadata type with a nested
	// application version.
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
}

MsgRegisterAccount defines the payload for Msg/RegisterAccount

func (*MsgRegisterAccount) Descriptor

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

func (*MsgRegisterAccount) GetConnectionId

func (m *MsgRegisterAccount) GetConnectionId() string

func (*MsgRegisterAccount) GetOwner

func (m *MsgRegisterAccount) GetOwner() string

func (MsgRegisterAccount) GetSignBytes

func (m MsgRegisterAccount) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg interface.

func (MsgRegisterAccount) GetSigners

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

GetSigners returns the expected signers.

func (*MsgRegisterAccount) GetVersion

func (m *MsgRegisterAccount) GetVersion() string

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

Route implements the LegacyMsg interface.

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

Type implements the LegacyMsg interface.

func (*MsgRegisterAccount) Unmarshal

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

func (MsgRegisterAccount) ValidateBasic

func (m MsgRegisterAccount) ValidateBasic() error

ValidateBasic does a sanity check on the provided data.

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 is the owner address of the interchain account.
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// connection_id is the id of the connection.
	ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
	// msg is the bytes of the transaction msg to send.
	Msg *types.Any `protobuf:"bytes,3,opt,name=msg,proto3" json:"msg,omitempty"`
}

MsgSubmitTx defines the payload for Msg/SubmitTx

func NewMsgSubmitTx

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

NewMsgSubmitTx creates a new MsgSubmitTx instance

func (*MsgSubmitTx) Descriptor

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

func (*MsgSubmitTx) GetConnectionId

func (m *MsgSubmitTx) GetConnectionId() string

func (*MsgSubmitTx) GetMsg

func (m *MsgSubmitTx) GetMsg() *types.Any

func (*MsgSubmitTx) GetOwner

func (m *MsgSubmitTx) GetOwner() string

func (MsgSubmitTx) GetSignBytes

func (m MsgSubmitTx) GetSignBytes() []byte

GetSignBytes implements the LegacyMsg interface.

func (MsgSubmitTx) GetSigners

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

GetSigners returns the expected signers.

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

Route implements the LegacyMsg interface.

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

Type implements the LegacyMsg interface.

func (*MsgSubmitTx) Unmarshal

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

func (MsgSubmitTx) UnpackInterfaces

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

UnpackInterfaces implements codectypes.UnpackInterfacesMessage

func (MsgSubmitTx) ValidateBasic

func (m MsgSubmitTx) ValidateBasic() error

ValidateBasic does a sanity check on the provided data.

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 is the address of the account that owns the ICA.
	Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
	// connection_id is the connection the ICA claimed.
	ConnectionId string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
}

QueryInterchainAccountRequest is the request type for the Query/InterchainAccountAddress RPC

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 {
	// interchain_account_address is the address of the ICA.
	InterchainAccountAddress string `` /* 135-byte string literal not displayed */
}

QueryInterchainAccountResponse the response type for the Query/InterchainAccountAddress RPC

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