cosmos-sdk: github.com/cosmos/cosmos-sdk/client/grpc/simulate Index | Files

package simulate

import "github.com/cosmos/cosmos-sdk/client/grpc/simulate"

Package simulate is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Package Files

simulate.go simulate.pb.go simulate.pb.gw.go

Variables

var (
    ErrInvalidLengthSimulate        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowSimulate          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupSimulate = fmt.Errorf("proto: unexpected end of group")
)

func RegisterSimulateServiceHandler Uses

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

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

func RegisterSimulateServiceHandlerClient Uses

func RegisterSimulateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SimulateServiceClient) error

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

func RegisterSimulateServiceHandlerFromEndpoint Uses

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

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

func RegisterSimulateServiceHandlerServer Uses

func RegisterSimulateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SimulateServiceServer) error

RegisterSimulateServiceHandlerServer registers the http handlers for service SimulateService to "mux". UnaryRPC :call SimulateServiceServer 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 RegisterSimulateServiceHandlerFromEndpoint instead.

func RegisterSimulateServiceServer Uses

func RegisterSimulateServiceServer(s grpc1.Server, srv SimulateServiceServer)

type BaseAppSimulateFn Uses

type BaseAppSimulateFn func(txBytes []byte, txtypes sdk.Tx) (sdk.GasInfo, *sdk.Result, error)

BaseAppSimulateFn is the signature of the Baseapp#Simulate function.

type SimulateRequest Uses

type SimulateRequest struct {
    // tx is the transaction to simulate.
    Tx *tx.Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
}

SimulateRequest is the request type for the SimulateServiceService.Simulate RPC method.

func (*SimulateRequest) Descriptor Uses

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

func (*SimulateRequest) GetTx Uses

func (m *SimulateRequest) GetTx() *tx.Tx

func (*SimulateRequest) Marshal Uses

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

func (*SimulateRequest) MarshalTo Uses

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

func (*SimulateRequest) MarshalToSizedBuffer Uses

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

func (*SimulateRequest) ProtoMessage Uses

func (*SimulateRequest) ProtoMessage()

func (*SimulateRequest) Reset Uses

func (m *SimulateRequest) Reset()

func (*SimulateRequest) Size Uses

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

func (*SimulateRequest) String Uses

func (m *SimulateRequest) String() string

func (*SimulateRequest) Unmarshal Uses

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

func (*SimulateRequest) XXX_DiscardUnknown Uses

func (m *SimulateRequest) XXX_DiscardUnknown()

func (*SimulateRequest) XXX_Marshal Uses

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

func (*SimulateRequest) XXX_Merge Uses

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

func (*SimulateRequest) XXX_Size Uses

func (m *SimulateRequest) XXX_Size() int

func (*SimulateRequest) XXX_Unmarshal Uses

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

type SimulateResponse Uses

type SimulateResponse struct {
    // gas_info is the information about gas used in the simulation.
    GasInfo *types.GasInfo `protobuf:"bytes,1,opt,name=gas_info,json=gasInfo,proto3" json:"gas_info,omitempty"`
    // result is the result of the simulation.
    Result *types.Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"`
}

SimulateResponse is the response type for the SimulateServiceService.SimulateRPC method.

func (*SimulateResponse) Descriptor Uses

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

func (*SimulateResponse) GetGasInfo Uses

func (m *SimulateResponse) GetGasInfo() *types.GasInfo

func (*SimulateResponse) GetResult Uses

func (m *SimulateResponse) GetResult() *types.Result

func (*SimulateResponse) Marshal Uses

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

func (*SimulateResponse) MarshalTo Uses

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

func (*SimulateResponse) MarshalToSizedBuffer Uses

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

func (*SimulateResponse) ProtoMessage Uses

func (*SimulateResponse) ProtoMessage()

func (*SimulateResponse) Reset Uses

func (m *SimulateResponse) Reset()

func (*SimulateResponse) Size Uses

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

func (*SimulateResponse) String Uses

func (m *SimulateResponse) String() string

func (*SimulateResponse) Unmarshal Uses

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

func (*SimulateResponse) XXX_DiscardUnknown Uses

func (m *SimulateResponse) XXX_DiscardUnknown()

func (*SimulateResponse) XXX_Marshal Uses

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

func (*SimulateResponse) XXX_Merge Uses

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

func (*SimulateResponse) XXX_Size Uses

func (m *SimulateResponse) XXX_Size() int

func (*SimulateResponse) XXX_Unmarshal Uses

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

type SimulateServiceClient Uses

type SimulateServiceClient interface {
    // Simulate simulates executing a transaction for estimating gas usage.
    Simulate(ctx context.Context, in *SimulateRequest, opts ...grpc.CallOption) (*SimulateResponse, error)
}

SimulateServiceClient is the client API for SimulateService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSimulateServiceClient Uses

func NewSimulateServiceClient(cc grpc1.ClientConn) SimulateServiceClient

type SimulateServiceServer Uses

type SimulateServiceServer interface {
    // Simulate simulates executing a transaction for estimating gas usage.
    Simulate(context.Context, *SimulateRequest) (*SimulateResponse, error)
}

SimulateServiceServer is the server API for SimulateService service.

func NewSimulateServer Uses

func NewSimulateServer(simulate BaseAppSimulateFn, interfaceRegistry codectypes.InterfaceRegistry) SimulateServiceServer

NewSimulateServer creates a new SimulateServer.

type UnimplementedSimulateServiceServer Uses

type UnimplementedSimulateServiceServer struct {
}

UnimplementedSimulateServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedSimulateServiceServer) Simulate Uses

func (*UnimplementedSimulateServiceServer) Simulate(ctx context.Context, req *SimulateRequest) (*SimulateResponse, error)

Package simulate imports 21 packages (graph) and is imported by 2 packages. Updated 2020-09-22. Refresh now. Tools for package owners.