Documentation ¶
Overview ¶
Package tx is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterGRPCGatewayRoutes(clientConn gogogrpc.ClientConn, mux *runtime.ServeMux)
- func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error
- func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error
- func RegisterServiceServer(s grpc1.Server, srv ServiceServer)
- func RegisterTxService(qrt gogogrpc.Server, clientCtx client.Context, ...)
- type ComputeTaxRequest
- func (*ComputeTaxRequest) Descriptor() ([]byte, []int)
- func (m *ComputeTaxRequest) GetTx() *tx.Txdeprecated
- func (m *ComputeTaxRequest) GetTxBytes() []byte
- func (m *ComputeTaxRequest) Marshal() (dAtA []byte, err error)
- func (m *ComputeTaxRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *ComputeTaxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ComputeTaxRequest) ProtoMessage()
- func (m *ComputeTaxRequest) Reset()
- func (m *ComputeTaxRequest) Size() (n int)
- func (m *ComputeTaxRequest) String() string
- func (m *ComputeTaxRequest) Unmarshal(dAtA []byte) error
- func (m ComputeTaxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
- func (m *ComputeTaxRequest) XXX_DiscardUnknown()
- func (m *ComputeTaxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ComputeTaxRequest) XXX_Merge(src proto.Message)
- func (m *ComputeTaxRequest) XXX_Size() int
- func (m *ComputeTaxRequest) XXX_Unmarshal(b []byte) error
- type ComputeTaxResponse
- func (*ComputeTaxResponse) Descriptor() ([]byte, []int)
- func (m *ComputeTaxResponse) GetTaxAmount() github_com_cosmos_cosmos_sdk_types.Coins
- func (m *ComputeTaxResponse) Marshal() (dAtA []byte, err error)
- func (m *ComputeTaxResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *ComputeTaxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ComputeTaxResponse) ProtoMessage()
- func (m *ComputeTaxResponse) Reset()
- func (m *ComputeTaxResponse) Size() (n int)
- func (m *ComputeTaxResponse) String() string
- func (m *ComputeTaxResponse) Unmarshal(dAtA []byte) error
- func (m *ComputeTaxResponse) XXX_DiscardUnknown()
- func (m *ComputeTaxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ComputeTaxResponse) XXX_Merge(src proto.Message)
- func (m *ComputeTaxResponse) XXX_Size() int
- func (m *ComputeTaxResponse) XXX_Unmarshal(b []byte) error
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func RegisterGRPCGatewayRoutes ¶
func RegisterGRPCGatewayRoutes(clientConn gogogrpc.ClientConn, mux *runtime.ServeMux)
RegisterGRPCGatewayRoutes mounts the tx service's GRPC-gateway routes on the given Mux.
func RegisterServiceHandler ¶
func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterServiceHandler registers the http handlers for service Service to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterServiceHandlerClient ¶
func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error
RegisterServiceHandlerClient registers the http handlers for service Service to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ServiceClient" to call the correct interceptors.
func RegisterServiceHandlerFromEndpoint ¶
func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterServiceHandlerFromEndpoint is same as RegisterServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterServiceHandlerServer ¶
func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error
RegisterServiceHandlerServer registers the http handlers for service Service to "mux". UnaryRPC :call ServiceServer 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 RegisterServiceHandlerFromEndpoint instead.
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc1.Server, srv ServiceServer)
func RegisterTxService ¶
func RegisterTxService( qrt gogogrpc.Server, clientCtx client.Context, treasuryKeeper customante.TreasuryKeeper, )
RegisterTxService registers the tx service on the gRPC router.
Types ¶
type ComputeTaxRequest ¶
type ComputeTaxRequest struct { // tx is the transaction to simulate. // Deprecated. Send raw tx bytes instead. Tx *tx.Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` // Deprecated: Do not use. // tx_bytes is the raw transaction. TxBytes []byte `protobuf:"bytes,2,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"` }
ComputeTaxRequest is the request type for the Service.ComputeTax RPC method.
func (*ComputeTaxRequest) Descriptor ¶
func (*ComputeTaxRequest) Descriptor() ([]byte, []int)
func (*ComputeTaxRequest) GetTx
deprecated
func (m *ComputeTaxRequest) GetTx() *tx.Tx
Deprecated: Do not use.
func (*ComputeTaxRequest) GetTxBytes ¶
func (m *ComputeTaxRequest) GetTxBytes() []byte
func (*ComputeTaxRequest) Marshal ¶
func (m *ComputeTaxRequest) Marshal() (dAtA []byte, err error)
func (*ComputeTaxRequest) MarshalTo ¶
func (m *ComputeTaxRequest) MarshalTo(dAtA []byte) (int, error)
func (*ComputeTaxRequest) MarshalToSizedBuffer ¶
func (m *ComputeTaxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ComputeTaxRequest) ProtoMessage ¶
func (*ComputeTaxRequest) ProtoMessage()
func (*ComputeTaxRequest) Reset ¶
func (m *ComputeTaxRequest) Reset()
func (*ComputeTaxRequest) Size ¶
func (m *ComputeTaxRequest) Size() (n int)
func (*ComputeTaxRequest) String ¶
func (m *ComputeTaxRequest) String() string
func (*ComputeTaxRequest) Unmarshal ¶
func (m *ComputeTaxRequest) Unmarshal(dAtA []byte) error
func (ComputeTaxRequest) UnpackInterfaces ¶
func (m ComputeTaxRequest) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
UnpackInterfaces implements the UnpackInterfacesMessage interface.
func (*ComputeTaxRequest) XXX_DiscardUnknown ¶
func (m *ComputeTaxRequest) XXX_DiscardUnknown()
func (*ComputeTaxRequest) XXX_Marshal ¶
func (m *ComputeTaxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ComputeTaxRequest) XXX_Merge ¶
func (m *ComputeTaxRequest) XXX_Merge(src proto.Message)
func (*ComputeTaxRequest) XXX_Size ¶
func (m *ComputeTaxRequest) XXX_Size() int
func (*ComputeTaxRequest) XXX_Unmarshal ¶
func (m *ComputeTaxRequest) XXX_Unmarshal(b []byte) error
type ComputeTaxResponse ¶
type ComputeTaxResponse struct { // amount is the amount of coins to be paid as a fee TaxAmount github_com_cosmos_cosmos_sdk_types.Coins `` /* 132-byte string literal not displayed */ }
ComputeTaxResponse is the response type for the Service.ComputeTax RPC method.
func (*ComputeTaxResponse) Descriptor ¶
func (*ComputeTaxResponse) Descriptor() ([]byte, []int)
func (*ComputeTaxResponse) GetTaxAmount ¶
func (m *ComputeTaxResponse) GetTaxAmount() github_com_cosmos_cosmos_sdk_types.Coins
func (*ComputeTaxResponse) Marshal ¶
func (m *ComputeTaxResponse) Marshal() (dAtA []byte, err error)
func (*ComputeTaxResponse) MarshalTo ¶
func (m *ComputeTaxResponse) MarshalTo(dAtA []byte) (int, error)
func (*ComputeTaxResponse) MarshalToSizedBuffer ¶
func (m *ComputeTaxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ComputeTaxResponse) ProtoMessage ¶
func (*ComputeTaxResponse) ProtoMessage()
func (*ComputeTaxResponse) Reset ¶
func (m *ComputeTaxResponse) Reset()
func (*ComputeTaxResponse) Size ¶
func (m *ComputeTaxResponse) Size() (n int)
func (*ComputeTaxResponse) String ¶
func (m *ComputeTaxResponse) String() string
func (*ComputeTaxResponse) Unmarshal ¶
func (m *ComputeTaxResponse) Unmarshal(dAtA []byte) error
func (*ComputeTaxResponse) XXX_DiscardUnknown ¶
func (m *ComputeTaxResponse) XXX_DiscardUnknown()
func (*ComputeTaxResponse) XXX_Marshal ¶
func (m *ComputeTaxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ComputeTaxResponse) XXX_Merge ¶
func (m *ComputeTaxResponse) XXX_Merge(src proto.Message)
func (*ComputeTaxResponse) XXX_Size ¶
func (m *ComputeTaxResponse) XXX_Size() int
func (*ComputeTaxResponse) XXX_Unmarshal ¶
func (m *ComputeTaxResponse) XXX_Unmarshal(b []byte) error
type ServiceClient ¶
type ServiceClient interface { // EstimateFee simulates executing a transaction for estimating gas usage. ComputeTax(ctx context.Context, in *ComputeTaxRequest, opts ...grpc.CallOption) (*ComputeTaxResponse, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc grpc1.ClientConn) ServiceClient
type ServiceServer ¶
type ServiceServer interface { // EstimateFee simulates executing a transaction for estimating gas usage. ComputeTax(context.Context, *ComputeTaxRequest) (*ComputeTaxResponse, error) }
ServiceServer is the server API for Service service.
func NewTxServer ¶
func NewTxServer(clientCtx client.Context, treasuryKeeper customante.TreasuryKeeper) ServiceServer
NewTxServer creates a new Tx service server.
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceServer) ComputeTax ¶
func (*UnimplementedServiceServer) ComputeTax(ctx context.Context, req *ComputeTaxRequest) (*ComputeTaxResponse, error)