Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterFedGatewayServer(s grpc.ServiceRegistrar, srv FedGatewayServer)
- type BlockEvent
- func (*BlockEvent) Descriptor() ([]byte, []int)deprecated
- func (x *BlockEvent) GetHeight() int64
- func (x *BlockEvent) GetRawEventJson() []byte
- func (x *BlockEvent) GetTimeUnixNanos() int64
- func (x *BlockEvent) GetTxs() [][]byte
- func (*BlockEvent) ProtoMessage()
- func (x *BlockEvent) ProtoReflect() protoreflect.Message
- func (x *BlockEvent) Reset()
- func (x *BlockEvent) String() string
- type BlockStreamRequest
- func (*BlockStreamRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BlockStreamRequest) GetFromHeight() int64
- func (x *BlockStreamRequest) GetIncludeRawEvent() bool
- func (x *BlockStreamRequest) GetIncludeTxs() bool
- func (*BlockStreamRequest) ProtoMessage()
- func (x *BlockStreamRequest) ProtoReflect() protoreflect.Message
- func (x *BlockStreamRequest) Reset()
- func (x *BlockStreamRequest) String() string
- type BroadcastMode
- func (BroadcastMode) Descriptor() protoreflect.EnumDescriptor
- func (x BroadcastMode) Enum() *BroadcastMode
- func (BroadcastMode) EnumDescriptor() ([]byte, []int)deprecated
- func (x BroadcastMode) Number() protoreflect.EnumNumber
- func (x BroadcastMode) String() string
- func (BroadcastMode) Type() protoreflect.EnumType
- type BroadcastTxRequest
- func (*BroadcastTxRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BroadcastTxRequest) GetMode() BroadcastMode
- func (x *BroadcastTxRequest) GetTx() []byte
- func (*BroadcastTxRequest) ProtoMessage()
- func (x *BroadcastTxRequest) ProtoReflect() protoreflect.Message
- func (x *BroadcastTxRequest) Reset()
- func (x *BroadcastTxRequest) String() string
- type BroadcastTxResponse
- func (*BroadcastTxResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BroadcastTxResponse) GetCode() uint32
- func (x *BroadcastTxResponse) GetLog() string
- func (x *BroadcastTxResponse) GetRawJson() []byte
- func (x *BroadcastTxResponse) GetTxhashHex() string
- func (*BroadcastTxResponse) ProtoMessage()
- func (x *BroadcastTxResponse) ProtoReflect() protoreflect.Message
- func (x *BroadcastTxResponse) Reset()
- func (x *BroadcastTxResponse) String() string
- type FedGatewayClient
- type FedGatewayServer
- type FedGateway_BlockStreamClient
- type FedGateway_BlockStreamServer
- type StatusRequest
- type StatusResponse
- func (*StatusResponse) Descriptor() ([]byte, []int)deprecated
- func (x *StatusResponse) GetChainId() string
- func (x *StatusResponse) GetLatestBlockHeight() int64
- func (x *StatusResponse) GetRawJson() []byte
- func (*StatusResponse) ProtoMessage()
- func (x *StatusResponse) ProtoReflect() protoreflect.Message
- func (x *StatusResponse) Reset()
- func (x *StatusResponse) String() string
- type UnimplementedFedGatewayServer
- func (UnimplementedFedGatewayServer) BlockStream(*BlockStreamRequest, grpc.ServerStreamingServer[BlockEvent]) error
- func (UnimplementedFedGatewayServer) BroadcastTx(context.Context, *BroadcastTxRequest) (*BroadcastTxResponse, error)
- func (UnimplementedFedGatewayServer) Status(context.Context, *StatusRequest) (*StatusResponse, error)
- type UnsafeFedGatewayServer
Constants ¶
const ( FedGateway_Status_FullMethodName = "/fedgw.v1.FedGateway/Status" FedGateway_BroadcastTx_FullMethodName = "/fedgw.v1.FedGateway/BroadcastTx" FedGateway_BlockStream_FullMethodName = "/fedgw.v1.FedGateway/BlockStream" )
Variables ¶
var ( BroadcastMode_name = map[int32]string{ 0: "BROADCAST_MODE_COMMIT", 1: "BROADCAST_MODE_SYNC", 2: "BROADCAST_MODE_ASYNC", } BroadcastMode_value = map[string]int32{ "BROADCAST_MODE_COMMIT": 0, "BROADCAST_MODE_SYNC": 1, "BROADCAST_MODE_ASYNC": 2, } )
Enum value maps for BroadcastMode.
var FedGateway_ServiceDesc = grpc.ServiceDesc{ ServiceName: "fedgw.v1.FedGateway", HandlerType: (*FedGatewayServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Status", Handler: _FedGateway_Status_Handler, }, { MethodName: "BroadcastTx", Handler: _FedGateway_BroadcastTx_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "BlockStream", Handler: _FedGateway_BlockStream_Handler, ServerStreams: true, }, }, Metadata: "api/proto/fedgw/v1/fedgw.proto", }
FedGateway_ServiceDesc is the grpc.ServiceDesc for FedGateway service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_proto_fedgw_v1_fedgw_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFedGatewayServer ¶
func RegisterFedGatewayServer(s grpc.ServiceRegistrar, srv FedGatewayServer)
Types ¶
type BlockEvent ¶
type BlockEvent struct {
Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
TimeUnixNanos int64 `protobuf:"varint,2,opt,name=time_unix_nanos,json=timeUnixNanos,proto3" json:"time_unix_nanos,omitempty"`
Txs [][]byte `protobuf:"bytes,3,rep,name=txs,proto3" json:"txs,omitempty"`
RawEventJson []byte `protobuf:"bytes,4,opt,name=raw_event_json,json=rawEventJson,proto3" json:"raw_event_json,omitempty"`
// contains filtered or unexported fields
}
func (*BlockEvent) Descriptor
deprecated
func (*BlockEvent) Descriptor() ([]byte, []int)
Deprecated: Use BlockEvent.ProtoReflect.Descriptor instead.
func (*BlockEvent) GetHeight ¶
func (x *BlockEvent) GetHeight() int64
func (*BlockEvent) GetRawEventJson ¶
func (x *BlockEvent) GetRawEventJson() []byte
func (*BlockEvent) GetTimeUnixNanos ¶
func (x *BlockEvent) GetTimeUnixNanos() int64
func (*BlockEvent) GetTxs ¶
func (x *BlockEvent) GetTxs() [][]byte
func (*BlockEvent) ProtoMessage ¶
func (*BlockEvent) ProtoMessage()
func (*BlockEvent) ProtoReflect ¶
func (x *BlockEvent) ProtoReflect() protoreflect.Message
func (*BlockEvent) Reset ¶
func (x *BlockEvent) Reset()
func (*BlockEvent) String ¶
func (x *BlockEvent) String() string
type BlockStreamRequest ¶
type BlockStreamRequest struct {
FromHeight int64 `protobuf:"varint,1,opt,name=from_height,json=fromHeight,proto3" json:"from_height,omitempty"` // 0 = from now (Phase 0)
IncludeTxs bool `protobuf:"varint,2,opt,name=include_txs,json=includeTxs,proto3" json:"include_txs,omitempty"`
IncludeRawEvent bool `protobuf:"varint,3,opt,name=include_raw_event,json=includeRawEvent,proto3" json:"include_raw_event,omitempty"`
// contains filtered or unexported fields
}
func (*BlockStreamRequest) Descriptor
deprecated
func (*BlockStreamRequest) Descriptor() ([]byte, []int)
Deprecated: Use BlockStreamRequest.ProtoReflect.Descriptor instead.
func (*BlockStreamRequest) GetFromHeight ¶
func (x *BlockStreamRequest) GetFromHeight() int64
func (*BlockStreamRequest) GetIncludeRawEvent ¶
func (x *BlockStreamRequest) GetIncludeRawEvent() bool
func (*BlockStreamRequest) GetIncludeTxs ¶
func (x *BlockStreamRequest) GetIncludeTxs() bool
func (*BlockStreamRequest) ProtoMessage ¶
func (*BlockStreamRequest) ProtoMessage()
func (*BlockStreamRequest) ProtoReflect ¶
func (x *BlockStreamRequest) ProtoReflect() protoreflect.Message
func (*BlockStreamRequest) Reset ¶
func (x *BlockStreamRequest) Reset()
func (*BlockStreamRequest) String ¶
func (x *BlockStreamRequest) String() string
type BroadcastMode ¶
type BroadcastMode int32
const ( BroadcastMode_BROADCAST_MODE_COMMIT BroadcastMode = 0 BroadcastMode_BROADCAST_MODE_SYNC BroadcastMode = 1 BroadcastMode_BROADCAST_MODE_ASYNC BroadcastMode = 2 )
func (BroadcastMode) Descriptor ¶
func (BroadcastMode) Descriptor() protoreflect.EnumDescriptor
func (BroadcastMode) Enum ¶
func (x BroadcastMode) Enum() *BroadcastMode
func (BroadcastMode) EnumDescriptor
deprecated
func (BroadcastMode) EnumDescriptor() ([]byte, []int)
Deprecated: Use BroadcastMode.Descriptor instead.
func (BroadcastMode) Number ¶
func (x BroadcastMode) Number() protoreflect.EnumNumber
func (BroadcastMode) String ¶
func (x BroadcastMode) String() string
func (BroadcastMode) Type ¶
func (BroadcastMode) Type() protoreflect.EnumType
type BroadcastTxRequest ¶
type BroadcastTxRequest struct {
Tx []byte `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"`
Mode BroadcastMode `protobuf:"varint,2,opt,name=mode,proto3,enum=fedgw.v1.BroadcastMode" json:"mode,omitempty"`
// contains filtered or unexported fields
}
func (*BroadcastTxRequest) Descriptor
deprecated
func (*BroadcastTxRequest) Descriptor() ([]byte, []int)
Deprecated: Use BroadcastTxRequest.ProtoReflect.Descriptor instead.
func (*BroadcastTxRequest) GetMode ¶
func (x *BroadcastTxRequest) GetMode() BroadcastMode
func (*BroadcastTxRequest) GetTx ¶
func (x *BroadcastTxRequest) GetTx() []byte
func (*BroadcastTxRequest) ProtoMessage ¶
func (*BroadcastTxRequest) ProtoMessage()
func (*BroadcastTxRequest) ProtoReflect ¶
func (x *BroadcastTxRequest) ProtoReflect() protoreflect.Message
func (*BroadcastTxRequest) Reset ¶
func (x *BroadcastTxRequest) Reset()
func (*BroadcastTxRequest) String ¶
func (x *BroadcastTxRequest) String() string
type BroadcastTxResponse ¶
type BroadcastTxResponse struct {
// Best-effort parsed fields
TxhashHex string `protobuf:"bytes,1,opt,name=txhash_hex,json=txhashHex,proto3" json:"txhash_hex,omitempty"` // "0x..." if available
Code uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"` // ABCI code when available
Log string `protobuf:"bytes,3,opt,name=log,proto3" json:"log,omitempty"`
RawJson []byte `protobuf:"bytes,100,opt,name=raw_json,json=rawJson,proto3" json:"raw_json,omitempty"` // raw JSON-RPC response
// contains filtered or unexported fields
}
func (*BroadcastTxResponse) Descriptor
deprecated
func (*BroadcastTxResponse) Descriptor() ([]byte, []int)
Deprecated: Use BroadcastTxResponse.ProtoReflect.Descriptor instead.
func (*BroadcastTxResponse) GetCode ¶
func (x *BroadcastTxResponse) GetCode() uint32
func (*BroadcastTxResponse) GetLog ¶
func (x *BroadcastTxResponse) GetLog() string
func (*BroadcastTxResponse) GetRawJson ¶
func (x *BroadcastTxResponse) GetRawJson() []byte
func (*BroadcastTxResponse) GetTxhashHex ¶
func (x *BroadcastTxResponse) GetTxhashHex() string
func (*BroadcastTxResponse) ProtoMessage ¶
func (*BroadcastTxResponse) ProtoMessage()
func (*BroadcastTxResponse) ProtoReflect ¶
func (x *BroadcastTxResponse) ProtoReflect() protoreflect.Message
func (*BroadcastTxResponse) Reset ¶
func (x *BroadcastTxResponse) Reset()
func (*BroadcastTxResponse) String ¶
func (x *BroadcastTxResponse) String() string
type FedGatewayClient ¶
type FedGatewayClient interface {
Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error)
BroadcastTx(ctx context.Context, in *BroadcastTxRequest, opts ...grpc.CallOption) (*BroadcastTxResponse, error)
BlockStream(ctx context.Context, in *BlockStreamRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[BlockEvent], error)
}
FedGatewayClient is the client API for FedGateway 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.
func NewFedGatewayClient ¶
func NewFedGatewayClient(cc grpc.ClientConnInterface) FedGatewayClient
type FedGatewayServer ¶
type FedGatewayServer interface {
Status(context.Context, *StatusRequest) (*StatusResponse, error)
BroadcastTx(context.Context, *BroadcastTxRequest) (*BroadcastTxResponse, error)
BlockStream(*BlockStreamRequest, grpc.ServerStreamingServer[BlockEvent]) error
// contains filtered or unexported methods
}
FedGatewayServer is the server API for FedGateway service. All implementations must embed UnimplementedFedGatewayServer for forward compatibility.
type FedGateway_BlockStreamClient ¶
type FedGateway_BlockStreamClient = grpc.ServerStreamingClient[BlockEvent]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FedGateway_BlockStreamServer ¶
type FedGateway_BlockStreamServer = grpc.ServerStreamingServer[BlockEvent]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type StatusRequest ¶
type StatusRequest struct {
// contains filtered or unexported fields
}
func (*StatusRequest) Descriptor
deprecated
func (*StatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.
func (*StatusRequest) ProtoMessage ¶
func (*StatusRequest) ProtoMessage()
func (*StatusRequest) ProtoReflect ¶
func (x *StatusRequest) ProtoReflect() protoreflect.Message
func (*StatusRequest) Reset ¶
func (x *StatusRequest) Reset()
func (*StatusRequest) String ¶
func (x *StatusRequest) String() string
type StatusResponse ¶
type StatusResponse struct {
// Best-effort fields parsed from /status JSON.
ChainId string `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
LatestBlockHeight int64 `protobuf:"varint,2,opt,name=latest_block_height,json=latestBlockHeight,proto3" json:"latest_block_height,omitempty"`
// Raw JSON-RPC response (for debugging/ops).
RawJson []byte `protobuf:"bytes,100,opt,name=raw_json,json=rawJson,proto3" json:"raw_json,omitempty"`
// contains filtered or unexported fields
}
func (*StatusResponse) Descriptor
deprecated
func (*StatusResponse) Descriptor() ([]byte, []int)
Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
func (*StatusResponse) GetChainId ¶
func (x *StatusResponse) GetChainId() string
func (*StatusResponse) GetLatestBlockHeight ¶
func (x *StatusResponse) GetLatestBlockHeight() int64
func (*StatusResponse) GetRawJson ¶
func (x *StatusResponse) GetRawJson() []byte
func (*StatusResponse) ProtoMessage ¶
func (*StatusResponse) ProtoMessage()
func (*StatusResponse) ProtoReflect ¶
func (x *StatusResponse) ProtoReflect() protoreflect.Message
func (*StatusResponse) Reset ¶
func (x *StatusResponse) Reset()
func (*StatusResponse) String ¶
func (x *StatusResponse) String() string
type UnimplementedFedGatewayServer ¶
type UnimplementedFedGatewayServer struct{}
UnimplementedFedGatewayServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedFedGatewayServer) BlockStream ¶
func (UnimplementedFedGatewayServer) BlockStream(*BlockStreamRequest, grpc.ServerStreamingServer[BlockEvent]) error
func (UnimplementedFedGatewayServer) BroadcastTx ¶
func (UnimplementedFedGatewayServer) BroadcastTx(context.Context, *BroadcastTxRequest) (*BroadcastTxResponse, error)
func (UnimplementedFedGatewayServer) Status ¶
func (UnimplementedFedGatewayServer) Status(context.Context, *StatusRequest) (*StatusResponse, error)
type UnsafeFedGatewayServer ¶
type UnsafeFedGatewayServer interface {
// contains filtered or unexported methods
}
UnsafeFedGatewayServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FedGatewayServer will result in compilation errors.