ggrpc

package
v0.0.0-...-eb84680 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GordianGRPC_GetBlocksWatermark_FullMethodName  = "/gordian.server.v1.GordianGRPC/GetBlocksWatermark"
	GordianGRPC_GetValidators_FullMethodName       = "/gordian.server.v1.GordianGRPC/GetValidators"
	GordianGRPC_SubmitTransaction_FullMethodName   = "/gordian.server.v1.GordianGRPC/SubmitTransaction"
	GordianGRPC_SimulateTransaction_FullMethodName = "/gordian.server.v1.GordianGRPC/SimulateTransaction"
	GordianGRPC_PendingTransactions_FullMethodName = "/gordian.server.v1.GordianGRPC/PendingTransactions"
	GordianGRPC_QueryAccountBalance_FullMethodName = "/gordian.server.v1.GordianGRPC/QueryAccountBalance"
)

Variables

View Source
var File_proto_gordian_server_v1_grpc_proto protoreflect.FileDescriptor
View Source
var GordianGRPC_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "gordian.server.v1.GordianGRPC",
	HandlerType: (*GordianGRPCServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetBlocksWatermark",
			Handler:    _GordianGRPC_GetBlocksWatermark_Handler,
		},
		{
			MethodName: "GetValidators",
			Handler:    _GordianGRPC_GetValidators_Handler,
		},
		{
			MethodName: "SubmitTransaction",
			Handler:    _GordianGRPC_SubmitTransaction_Handler,
		},
		{
			MethodName: "SimulateTransaction",
			Handler:    _GordianGRPC_SimulateTransaction_Handler,
		},
		{
			MethodName: "PendingTransactions",
			Handler:    _GordianGRPC_PendingTransactions_Handler,
		},
		{
			MethodName: "QueryAccountBalance",
			Handler:    _GordianGRPC_QueryAccountBalance_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/gordian/server/v1/grpc.proto",
}

GordianGRPC_ServiceDesc is the grpc.ServiceDesc for GordianGRPC service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterGordianGRPCServer

func RegisterGordianGRPCServer(s grpc.ServiceRegistrar, srv GordianGRPCServer)

Types

type Attribute

type Attribute struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

cosmos-sdk/core/app/app.go#TxResult TODO: import this directly from the SDK? or use our own?

func (*Attribute) Descriptor deprecated

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

Deprecated: Use Attribute.ProtoReflect.Descriptor instead.

func (*Attribute) GetKey

func (x *Attribute) GetKey() string

func (*Attribute) GetValue

func (x *Attribute) GetValue() string

func (*Attribute) ProtoMessage

func (*Attribute) ProtoMessage()

func (*Attribute) ProtoReflect

func (x *Attribute) ProtoReflect() protoreflect.Message

func (*Attribute) Reset

func (x *Attribute) Reset()

func (*Attribute) String

func (x *Attribute) String() string

type BalanceResponse

type BalanceResponse struct {
	Denom  string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

func (*BalanceResponse) Descriptor deprecated

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

Deprecated: Use BalanceResponse.ProtoReflect.Descriptor instead.

func (*BalanceResponse) GetAmount

func (x *BalanceResponse) GetAmount() string

func (*BalanceResponse) GetDenom

func (x *BalanceResponse) GetDenom() string

func (*BalanceResponse) ProtoMessage

func (*BalanceResponse) ProtoMessage()

func (*BalanceResponse) ProtoReflect

func (x *BalanceResponse) ProtoReflect() protoreflect.Message

func (*BalanceResponse) Reset

func (x *BalanceResponse) Reset()

func (*BalanceResponse) String

func (x *BalanceResponse) String() string

type CurrentBlockRequest

type CurrentBlockRequest struct {
	// contains filtered or unexported fields
}

func (*CurrentBlockRequest) Descriptor deprecated

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

Deprecated: Use CurrentBlockRequest.ProtoReflect.Descriptor instead.

func (*CurrentBlockRequest) ProtoMessage

func (*CurrentBlockRequest) ProtoMessage()

func (*CurrentBlockRequest) ProtoReflect

func (x *CurrentBlockRequest) ProtoReflect() protoreflect.Message

func (*CurrentBlockRequest) Reset

func (x *CurrentBlockRequest) Reset()

func (*CurrentBlockRequest) String

func (x *CurrentBlockRequest) String() string

type CurrentBlockResponse

type CurrentBlockResponse struct {
	VotingHeight     uint64 `protobuf:"varint,1,opt,name=voting_height,json=votingHeight,proto3" json:"voting_height,omitempty"`
	VotingRound      uint32 `protobuf:"varint,2,opt,name=voting_round,json=votingRound,proto3" json:"voting_round,omitempty"`
	CommittingHeight uint64 `protobuf:"varint,3,opt,name=committing_height,json=committingHeight,proto3" json:"committing_height,omitempty"`
	CommittingRound  uint32 `protobuf:"varint,4,opt,name=committing_round,json=committingRound,proto3" json:"committing_round,omitempty"`
	// contains filtered or unexported fields
}

func (*CurrentBlockResponse) Descriptor deprecated

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

Deprecated: Use CurrentBlockResponse.ProtoReflect.Descriptor instead.

func (*CurrentBlockResponse) GetCommittingHeight

func (x *CurrentBlockResponse) GetCommittingHeight() uint64

func (*CurrentBlockResponse) GetCommittingRound

func (x *CurrentBlockResponse) GetCommittingRound() uint32

func (*CurrentBlockResponse) GetVotingHeight

func (x *CurrentBlockResponse) GetVotingHeight() uint64

func (*CurrentBlockResponse) GetVotingRound

func (x *CurrentBlockResponse) GetVotingRound() uint32

func (*CurrentBlockResponse) ProtoMessage

func (*CurrentBlockResponse) ProtoMessage()

func (*CurrentBlockResponse) ProtoReflect

func (x *CurrentBlockResponse) ProtoReflect() protoreflect.Message

func (*CurrentBlockResponse) Reset

func (x *CurrentBlockResponse) Reset()

func (*CurrentBlockResponse) String

func (x *CurrentBlockResponse) String() string

type Event

type Event struct {
	Type       string       `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Attributes []*Attribute `protobuf:"bytes,2,rep,name=attributes,proto3" json:"attributes,omitempty"`
	// contains filtered or unexported fields
}

func (*Event) Descriptor deprecated

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

Deprecated: Use Event.ProtoReflect.Descriptor instead.

func (*Event) GetAttributes

func (x *Event) GetAttributes() []*Attribute

func (*Event) GetType

func (x *Event) GetType() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) ProtoReflect

func (x *Event) ProtoReflect() protoreflect.Message

func (*Event) Reset

func (x *Event) Reset()

func (*Event) String

func (x *Event) String() string

type GRPCServerConfig

type GRPCServerConfig struct {
	Listener net.Listener

	FinalizationStore tmstore.FinalizationStore
	MirrorStore       tmstore.MirrorStore

	CryptoRegistry *gcrypto.Registry

	TxCodec    transaction.Codec[transaction.Tx]
	AppManager appmanager.AppManager[transaction.Tx]
	Codec      codec.Codec

	TxBuffer *gsi.SDKTxBuf
}

type GetValidatorsRequest

type GetValidatorsRequest struct {
	// contains filtered or unexported fields
}

func (*GetValidatorsRequest) Descriptor deprecated

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

Deprecated: Use GetValidatorsRequest.ProtoReflect.Descriptor instead.

func (*GetValidatorsRequest) ProtoMessage

func (*GetValidatorsRequest) ProtoMessage()

func (*GetValidatorsRequest) ProtoReflect

func (x *GetValidatorsRequest) ProtoReflect() protoreflect.Message

func (*GetValidatorsRequest) Reset

func (x *GetValidatorsRequest) Reset()

func (*GetValidatorsRequest) String

func (x *GetValidatorsRequest) String() string

type GetValidatorsResponse

type GetValidatorsResponse struct {
	Validators []*Validator `protobuf:"bytes,1,rep,name=validators,proto3" json:"validators,omitempty"`
	// contains filtered or unexported fields
}

func (*GetValidatorsResponse) Descriptor deprecated

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

Deprecated: Use GetValidatorsResponse.ProtoReflect.Descriptor instead.

func (*GetValidatorsResponse) GetValidators

func (x *GetValidatorsResponse) GetValidators() []*Validator

func (*GetValidatorsResponse) ProtoMessage

func (*GetValidatorsResponse) ProtoMessage()

func (*GetValidatorsResponse) ProtoReflect

func (x *GetValidatorsResponse) ProtoReflect() protoreflect.Message

func (*GetValidatorsResponse) Reset

func (x *GetValidatorsResponse) Reset()

func (*GetValidatorsResponse) String

func (x *GetValidatorsResponse) String() string

type GordianGRPC

type GordianGRPC struct {
	UnimplementedGordianGRPCServer
	// contains filtered or unexported fields
}

func NewGordianGRPCServer

func NewGordianGRPCServer(ctx context.Context, log *slog.Logger, cfg GRPCServerConfig) *GordianGRPC

func (*GordianGRPC) GetBlocksWatermark

func (g *GordianGRPC) GetBlocksWatermark(ctx context.Context, req *CurrentBlockRequest) (*CurrentBlockResponse, error)

GetBlocksWatermark implements GordianGRPCServer.

func (*GordianGRPC) GetValidators

GetValidators implements GordianGRPCServer.

func (*GordianGRPC) PendingTransactions

PendingTransactions implements GordianGRPCServer.

func (*GordianGRPC) QueryAccountBalance

QueryAccountBalance implements GordianGRPCServer.

func (*GordianGRPC) SimulateTransaction

SimulateTransaction implements GordianGRPCServer.

func (*GordianGRPC) SubmitTransaction

func (g *GordianGRPC) SubmitTransaction(ctx context.Context, req *SubmitTransactionRequest) (*TxResultResponse, error)

SubmitTransaction implements GordianGRPCServer.

func (*GordianGRPC) Wait

func (g *GordianGRPC) Wait()

type GordianGRPCClient

type GordianGRPCClient interface {
	// GetBlocksWatermark returns the current block information.
	GetBlocksWatermark(ctx context.Context, in *CurrentBlockRequest, opts ...grpc.CallOption) (*CurrentBlockResponse, error)
	// GetValidators returns the validator set.
	GetValidators(ctx context.Context, in *GetValidatorsRequest, opts ...grpc.CallOption) (*GetValidatorsResponse, error)
	// (DEBUG) SubmitTransaction submits a transaction to the network.
	SubmitTransaction(ctx context.Context, in *SubmitTransactionRequest, opts ...grpc.CallOption) (*TxResultResponse, error)
	// (DEBUG) SimulateTransaction submits and simulates a transaction.
	SimulateTransaction(ctx context.Context, in *SubmitSimulationTransactionRequest, opts ...grpc.CallOption) (*TxResultResponse, error)
	// (DEBUG) PendingTransactions returns the pending transactions in JSON form.
	PendingTransactions(ctx context.Context, in *PendingTransactionsRequest, opts ...grpc.CallOption) (*PendingTransactionsResponse, error)
	// (DEBUG) QueryAccountBalance returns the balance of an account.
	QueryAccountBalance(ctx context.Context, in *QueryAccountBalanceRequest, opts ...grpc.CallOption) (*QueryAccountBalanceResponse, error)
}

GordianGRPCClient is the client API for GordianGRPC service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type GordianGRPCServer

type GordianGRPCServer interface {
	// GetBlocksWatermark returns the current block information.
	GetBlocksWatermark(context.Context, *CurrentBlockRequest) (*CurrentBlockResponse, error)
	// GetValidators returns the validator set.
	GetValidators(context.Context, *GetValidatorsRequest) (*GetValidatorsResponse, error)
	// (DEBUG) SubmitTransaction submits a transaction to the network.
	SubmitTransaction(context.Context, *SubmitTransactionRequest) (*TxResultResponse, error)
	// (DEBUG) SimulateTransaction submits and simulates a transaction.
	SimulateTransaction(context.Context, *SubmitSimulationTransactionRequest) (*TxResultResponse, error)
	// (DEBUG) PendingTransactions returns the pending transactions in JSON form.
	PendingTransactions(context.Context, *PendingTransactionsRequest) (*PendingTransactionsResponse, error)
	// (DEBUG) QueryAccountBalance returns the balance of an account.
	QueryAccountBalance(context.Context, *QueryAccountBalanceRequest) (*QueryAccountBalanceResponse, error)
	// contains filtered or unexported methods
}

GordianGRPCServer is the server API for GordianGRPC service. All implementations must embed UnimplementedGordianGRPCServer for forward compatibility

type PendingTransactionsRequest

type PendingTransactionsRequest struct {
	// contains filtered or unexported fields
}

func (*PendingTransactionsRequest) Descriptor deprecated

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

Deprecated: Use PendingTransactionsRequest.ProtoReflect.Descriptor instead.

func (*PendingTransactionsRequest) ProtoMessage

func (*PendingTransactionsRequest) ProtoMessage()

func (*PendingTransactionsRequest) ProtoReflect

func (*PendingTransactionsRequest) Reset

func (x *PendingTransactionsRequest) Reset()

func (*PendingTransactionsRequest) String

func (x *PendingTransactionsRequest) String() string

type PendingTransactionsResponse

type PendingTransactionsResponse struct {

	// json encoded transactions
	Txs [][]byte `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	// contains filtered or unexported fields
}

func (*PendingTransactionsResponse) Descriptor deprecated

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

Deprecated: Use PendingTransactionsResponse.ProtoReflect.Descriptor instead.

func (*PendingTransactionsResponse) GetTxs

func (x *PendingTransactionsResponse) GetTxs() [][]byte

func (*PendingTransactionsResponse) ProtoMessage

func (*PendingTransactionsResponse) ProtoMessage()

func (*PendingTransactionsResponse) ProtoReflect

func (*PendingTransactionsResponse) Reset

func (x *PendingTransactionsResponse) Reset()

func (*PendingTransactionsResponse) String

func (x *PendingTransactionsResponse) String() string

type QueryAccountBalanceRequest

type QueryAccountBalanceRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Denom   string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryAccountBalanceRequest) Descriptor deprecated

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

Deprecated: Use QueryAccountBalanceRequest.ProtoReflect.Descriptor instead.

func (*QueryAccountBalanceRequest) GetAddress

func (x *QueryAccountBalanceRequest) GetAddress() string

func (*QueryAccountBalanceRequest) GetDenom

func (x *QueryAccountBalanceRequest) GetDenom() string

func (*QueryAccountBalanceRequest) ProtoMessage

func (*QueryAccountBalanceRequest) ProtoMessage()

func (*QueryAccountBalanceRequest) ProtoReflect

func (*QueryAccountBalanceRequest) Reset

func (x *QueryAccountBalanceRequest) Reset()

func (*QueryAccountBalanceRequest) String

func (x *QueryAccountBalanceRequest) String() string

type QueryAccountBalanceResponse

type QueryAccountBalanceResponse struct {
	Balance *BalanceResponse `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"`
	// contains filtered or unexported fields
}

func (*QueryAccountBalanceResponse) Descriptor deprecated

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

Deprecated: Use QueryAccountBalanceResponse.ProtoReflect.Descriptor instead.

func (*QueryAccountBalanceResponse) GetBalance

func (*QueryAccountBalanceResponse) ProtoMessage

func (*QueryAccountBalanceResponse) ProtoMessage()

func (*QueryAccountBalanceResponse) ProtoReflect

func (*QueryAccountBalanceResponse) Reset

func (x *QueryAccountBalanceResponse) Reset()

func (*QueryAccountBalanceResponse) String

func (x *QueryAccountBalanceResponse) String() string

type SubmitSimulationTransactionRequest

type SubmitSimulationTransactionRequest struct {
	Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitSimulationTransactionRequest) Descriptor deprecated

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

Deprecated: Use SubmitSimulationTransactionRequest.ProtoReflect.Descriptor instead.

func (*SubmitSimulationTransactionRequest) GetTx

func (*SubmitSimulationTransactionRequest) ProtoMessage

func (*SubmitSimulationTransactionRequest) ProtoMessage()

func (*SubmitSimulationTransactionRequest) ProtoReflect

func (*SubmitSimulationTransactionRequest) Reset

func (*SubmitSimulationTransactionRequest) String

type SubmitTransactionRequest

type SubmitTransactionRequest struct {
	Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitTransactionRequest) Descriptor deprecated

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

Deprecated: Use SubmitTransactionRequest.ProtoReflect.Descriptor instead.

func (*SubmitTransactionRequest) GetTx

func (x *SubmitTransactionRequest) GetTx() []byte

func (*SubmitTransactionRequest) ProtoMessage

func (*SubmitTransactionRequest) ProtoMessage()

func (*SubmitTransactionRequest) ProtoReflect

func (x *SubmitTransactionRequest) ProtoReflect() protoreflect.Message

func (*SubmitTransactionRequest) Reset

func (x *SubmitTransactionRequest) Reset()

func (*SubmitTransactionRequest) String

func (x *SubmitTransactionRequest) String() string

type TxResultResponse

type TxResultResponse struct {

	// TODO: tx hash?
	Events []*Event `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"`
	// bytes resp = 2; //  []transaction.Msg
	Error     string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
	Code      uint32 `protobuf:"varint,4,opt,name=code,proto3" json:"code,omitempty"`
	Data      []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	Log       string `protobuf:"bytes,6,opt,name=log,proto3" json:"log,omitempty"`
	Info      string `protobuf:"bytes,7,opt,name=info,proto3" json:"info,omitempty"`
	GasWanted uint64 `protobuf:"varint,8,opt,name=gas_wanted,proto3" json:"gas_wanted,omitempty"`
	GasUsed   uint64 `protobuf:"varint,9,opt,name=gas_used,proto3" json:"gas_used,omitempty"`
	Codespace string `protobuf:"bytes,10,opt,name=codespace,proto3" json:"codespace,omitempty"`
	// contains filtered or unexported fields
}

func (*TxResultResponse) Descriptor deprecated

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

Deprecated: Use TxResultResponse.ProtoReflect.Descriptor instead.

func (*TxResultResponse) GetCode

func (x *TxResultResponse) GetCode() uint32

func (*TxResultResponse) GetCodespace

func (x *TxResultResponse) GetCodespace() string

func (*TxResultResponse) GetData

func (x *TxResultResponse) GetData() []byte

func (*TxResultResponse) GetError

func (x *TxResultResponse) GetError() string

func (*TxResultResponse) GetEvents

func (x *TxResultResponse) GetEvents() []*Event

func (*TxResultResponse) GetGasUsed

func (x *TxResultResponse) GetGasUsed() uint64

func (*TxResultResponse) GetGasWanted

func (x *TxResultResponse) GetGasWanted() uint64

func (*TxResultResponse) GetInfo

func (x *TxResultResponse) GetInfo() string

func (*TxResultResponse) GetLog

func (x *TxResultResponse) GetLog() string

func (*TxResultResponse) ProtoMessage

func (*TxResultResponse) ProtoMessage()

func (*TxResultResponse) ProtoReflect

func (x *TxResultResponse) ProtoReflect() protoreflect.Message

func (*TxResultResponse) Reset

func (x *TxResultResponse) Reset()

func (*TxResultResponse) String

func (x *TxResultResponse) String() string

type UnimplementedGordianGRPCServer

type UnimplementedGordianGRPCServer struct {
}

UnimplementedGordianGRPCServer must be embedded to have forward compatible implementations.

func (UnimplementedGordianGRPCServer) GetBlocksWatermark

func (UnimplementedGordianGRPCServer) GetValidators

func (UnimplementedGordianGRPCServer) SimulateTransaction

func (UnimplementedGordianGRPCServer) SubmitTransaction

type UnsafeGordianGRPCServer

type UnsafeGordianGRPCServer interface {
	// contains filtered or unexported methods
}

UnsafeGordianGRPCServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GordianGRPCServer will result in compilation errors.

type Validator

type Validator struct {
	EncodedPubKey []byte `protobuf:"bytes,1,opt,name=encoded_pub_key,json=encodedPubKey,proto3" json:"encoded_pub_key,omitempty"`
	Power         uint64 `protobuf:"varint,2,opt,name=power,proto3" json:"power,omitempty"`
	// contains filtered or unexported fields
}

func (*Validator) Descriptor deprecated

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

Deprecated: Use Validator.ProtoReflect.Descriptor instead.

func (*Validator) GetEncodedPubKey

func (x *Validator) GetEncodedPubKey() []byte

func (*Validator) GetPower

func (x *Validator) GetPower() uint64

func (*Validator) ProtoMessage

func (*Validator) ProtoMessage()

func (*Validator) ProtoReflect

func (x *Validator) ProtoReflect() protoreflect.Message

func (*Validator) Reset

func (x *Validator) Reset()

func (*Validator) String

func (x *Validator) String() string

Jump to

Keyboard shortcuts

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