Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterBlockExplorerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterBlockExplorerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockExplorerServiceClient) error
- func RegisterBlockExplorerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterBlockExplorerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockExplorerServiceServer) error
- func RegisterBlockExplorerServiceServer(s grpc.ServiceRegistrar, srv BlockExplorerServiceServer)
- type BlockExplorerServiceClient
- type BlockExplorerServiceServer
- type GetTransactionRequest
- func (*GetTransactionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetTransactionRequest) GetHash() string
- func (*GetTransactionRequest) ProtoMessage()
- func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message
- func (x *GetTransactionRequest) Reset()
- func (x *GetTransactionRequest) String() string
- type GetTransactionResponse
- func (*GetTransactionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetTransactionResponse) GetTransaction() *Transaction
- func (*GetTransactionResponse) ProtoMessage()
- func (x *GetTransactionResponse) ProtoReflect() protoreflect.Message
- func (x *GetTransactionResponse) Reset()
- func (x *GetTransactionResponse) String() string
- type InfoRequest
- type InfoResponse
- func (*InfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *InfoResponse) GetCommitHash() string
- func (x *InfoResponse) GetVersion() string
- func (*InfoResponse) ProtoMessage()
- func (x *InfoResponse) ProtoReflect() protoreflect.Message
- func (x *InfoResponse) Reset()
- func (x *InfoResponse) String() string
- type ListTransactionsRequest
- func (*ListTransactionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListTransactionsRequest) GetAfter() string
- func (x *ListTransactionsRequest) GetBefore() string
- func (x *ListTransactionsRequest) GetFilters() map[string]string
- func (x *ListTransactionsRequest) GetLimit() uint32
- func (*ListTransactionsRequest) ProtoMessage()
- func (x *ListTransactionsRequest) ProtoReflect() protoreflect.Message
- func (x *ListTransactionsRequest) Reset()
- func (x *ListTransactionsRequest) String() string
- type ListTransactionsResponse
- func (*ListTransactionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListTransactionsResponse) GetTransactions() []*Transaction
- func (*ListTransactionsResponse) ProtoMessage()
- func (x *ListTransactionsResponse) ProtoReflect() protoreflect.Message
- func (x *ListTransactionsResponse) Reset()
- func (x *ListTransactionsResponse) String() string
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)deprecated
- func (x *Transaction) GetBlock() uint64
- func (x *Transaction) GetCode() uint32
- func (x *Transaction) GetCommand() *v1.InputData
- func (x *Transaction) GetCursor() string
- func (x *Transaction) GetError() string
- func (x *Transaction) GetHash() string
- func (x *Transaction) GetIndex() uint32
- func (x *Transaction) GetSignature() *v1.Signature
- func (x *Transaction) GetSubmitter() string
- func (x *Transaction) GetType() string
- func (*Transaction) ProtoMessage()
- func (x *Transaction) ProtoReflect() protoreflect.Message
- func (x *Transaction) Reset()
- func (x *Transaction) String() string
- type UnimplementedBlockExplorerServiceServer
- func (UnimplementedBlockExplorerServiceServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error)
- func (UnimplementedBlockExplorerServiceServer) Info(context.Context, *InfoRequest) (*InfoResponse, error)
- func (UnimplementedBlockExplorerServiceServer) ListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error)
- type UnsafeBlockExplorerServiceServer
Constants ¶
This section is empty.
Variables ¶
var BlockExplorerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "blockexplorer.api.v1.BlockExplorerService", HandlerType: (*BlockExplorerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetTransaction", Handler: _BlockExplorerService_GetTransaction_Handler, }, { MethodName: "ListTransactions", Handler: _BlockExplorerService_ListTransactions_Handler, }, { MethodName: "Info", Handler: _BlockExplorerService_Info_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "blockexplorer/blockexplorer.proto", }
BlockExplorerService_ServiceDesc is the grpc.ServiceDesc for BlockExplorerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_blockexplorer_blockexplorer_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBlockExplorerServiceHandler ¶
func RegisterBlockExplorerServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterBlockExplorerServiceHandler registers the http handlers for service BlockExplorerService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterBlockExplorerServiceHandlerClient ¶
func RegisterBlockExplorerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockExplorerServiceClient) error
RegisterBlockExplorerServiceHandlerClient registers the http handlers for service BlockExplorerService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlockExplorerServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlockExplorerServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "BlockExplorerServiceClient" to call the correct interceptors.
func RegisterBlockExplorerServiceHandlerFromEndpoint ¶
func RegisterBlockExplorerServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterBlockExplorerServiceHandlerFromEndpoint is same as RegisterBlockExplorerServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterBlockExplorerServiceHandlerServer ¶
func RegisterBlockExplorerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockExplorerServiceServer) error
RegisterBlockExplorerServiceHandlerServer registers the http handlers for service BlockExplorerService to "mux". UnaryRPC :call BlockExplorerServiceServer 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 RegisterBlockExplorerServiceHandlerFromEndpoint instead.
func RegisterBlockExplorerServiceServer ¶
func RegisterBlockExplorerServiceServer(s grpc.ServiceRegistrar, srv BlockExplorerServiceServer)
Types ¶
type BlockExplorerServiceClient ¶
type BlockExplorerServiceClient interface { // Get transaction // // Get a transaction from the Vega blockchain GetTransaction(ctx context.Context, in *GetTransactionRequest, opts ...grpc.CallOption) (*GetTransactionResponse, error) // List transactions // // List transactions from the Vega blockchain ListTransactions(ctx context.Context, in *ListTransactionsRequest, opts ...grpc.CallOption) (*ListTransactionsResponse, error) // Info // // Retrieves information about the block explorer. // Response contains a semver formatted version of the data node and the commit hash, from which the block explorer was built Info(ctx context.Context, in *InfoRequest, opts ...grpc.CallOption) (*InfoResponse, error) }
BlockExplorerServiceClient is the client API for BlockExplorerService 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 NewBlockExplorerServiceClient ¶
func NewBlockExplorerServiceClient(cc grpc.ClientConnInterface) BlockExplorerServiceClient
type BlockExplorerServiceServer ¶
type BlockExplorerServiceServer interface { // Get transaction // // Get a transaction from the Vega blockchain GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error) // List transactions // // List transactions from the Vega blockchain ListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error) // Info // // Retrieves information about the block explorer. // Response contains a semver formatted version of the data node and the commit hash, from which the block explorer was built Info(context.Context, *InfoRequest) (*InfoResponse, error) // contains filtered or unexported methods }
BlockExplorerServiceServer is the server API for BlockExplorerService service. All implementations must embed UnimplementedBlockExplorerServiceServer for forward compatibility
type GetTransactionRequest ¶ added in v0.58.0
type GetTransactionRequest struct { // The hash of the transaction Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // contains filtered or unexported fields }
func (*GetTransactionRequest) Descriptor
deprecated
added in
v0.58.0
func (*GetTransactionRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetTransactionRequest.ProtoReflect.Descriptor instead.
func (*GetTransactionRequest) GetHash ¶ added in v0.58.0
func (x *GetTransactionRequest) GetHash() string
func (*GetTransactionRequest) ProtoMessage ¶ added in v0.58.0
func (*GetTransactionRequest) ProtoMessage()
func (*GetTransactionRequest) ProtoReflect ¶ added in v0.58.0
func (x *GetTransactionRequest) ProtoReflect() protoreflect.Message
func (*GetTransactionRequest) Reset ¶ added in v0.58.0
func (x *GetTransactionRequest) Reset()
func (*GetTransactionRequest) String ¶ added in v0.58.0
func (x *GetTransactionRequest) String() string
type GetTransactionResponse ¶ added in v0.58.0
type GetTransactionResponse struct { // The transaction corresponding to the hash Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"` // contains filtered or unexported fields }
func (*GetTransactionResponse) Descriptor
deprecated
added in
v0.58.0
func (*GetTransactionResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetTransactionResponse.ProtoReflect.Descriptor instead.
func (*GetTransactionResponse) GetTransaction ¶ added in v0.58.0
func (x *GetTransactionResponse) GetTransaction() *Transaction
func (*GetTransactionResponse) ProtoMessage ¶ added in v0.58.0
func (*GetTransactionResponse) ProtoMessage()
func (*GetTransactionResponse) ProtoReflect ¶ added in v0.58.0
func (x *GetTransactionResponse) ProtoReflect() protoreflect.Message
func (*GetTransactionResponse) Reset ¶ added in v0.58.0
func (x *GetTransactionResponse) Reset()
func (*GetTransactionResponse) String ¶ added in v0.58.0
func (x *GetTransactionResponse) String() string
type InfoRequest ¶ added in v0.65.0
type InfoRequest struct {
// contains filtered or unexported fields
}
node info
func (*InfoRequest) Descriptor
deprecated
added in
v0.65.0
func (*InfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use InfoRequest.ProtoReflect.Descriptor instead.
func (*InfoRequest) ProtoMessage ¶ added in v0.65.0
func (*InfoRequest) ProtoMessage()
func (*InfoRequest) ProtoReflect ¶ added in v0.65.0
func (x *InfoRequest) ProtoReflect() protoreflect.Message
func (*InfoRequest) Reset ¶ added in v0.65.0
func (x *InfoRequest) Reset()
func (*InfoRequest) String ¶ added in v0.65.0
func (x *InfoRequest) String() string
type InfoResponse ¶ added in v0.65.0
type InfoResponse struct { // A semver formatted version of the data node Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // The commit hash from which the data-node was built CommitHash string `protobuf:"bytes,2,opt,name=commit_hash,json=commitHash,proto3" json:"commit_hash,omitempty"` // contains filtered or unexported fields }
func (*InfoResponse) Descriptor
deprecated
added in
v0.65.0
func (*InfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use InfoResponse.ProtoReflect.Descriptor instead.
func (*InfoResponse) GetCommitHash ¶ added in v0.65.0
func (x *InfoResponse) GetCommitHash() string
func (*InfoResponse) GetVersion ¶ added in v0.65.0
func (x *InfoResponse) GetVersion() string
func (*InfoResponse) ProtoMessage ¶ added in v0.65.0
func (*InfoResponse) ProtoMessage()
func (*InfoResponse) ProtoReflect ¶ added in v0.65.0
func (x *InfoResponse) ProtoReflect() protoreflect.Message
func (*InfoResponse) Reset ¶ added in v0.65.0
func (x *InfoResponse) Reset()
func (*InfoResponse) String ¶ added in v0.65.0
func (x *InfoResponse) String() string
type ListTransactionsRequest ¶
type ListTransactionsRequest struct { // The number of transactions to be returned from the blockchain Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` // An optional cursor to paginate the request Before *string `protobuf:"bytes,2,opt,name=before,proto3,oneof" json:"before,omitempty"` // An optional cursor to paginate the request After *string `protobuf:"bytes,3,opt,name=after,proto3,oneof" json:"after,omitempty"` // Filters to apply to the request Filters map[string]string `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*ListTransactionsRequest) Descriptor
deprecated
func (*ListTransactionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListTransactionsRequest.ProtoReflect.Descriptor instead.
func (*ListTransactionsRequest) GetAfter ¶
func (x *ListTransactionsRequest) GetAfter() string
func (*ListTransactionsRequest) GetBefore ¶
func (x *ListTransactionsRequest) GetBefore() string
func (*ListTransactionsRequest) GetFilters ¶
func (x *ListTransactionsRequest) GetFilters() map[string]string
func (*ListTransactionsRequest) GetLimit ¶
func (x *ListTransactionsRequest) GetLimit() uint32
func (*ListTransactionsRequest) ProtoMessage ¶
func (*ListTransactionsRequest) ProtoMessage()
func (*ListTransactionsRequest) ProtoReflect ¶
func (x *ListTransactionsRequest) ProtoReflect() protoreflect.Message
func (*ListTransactionsRequest) Reset ¶
func (x *ListTransactionsRequest) Reset()
func (*ListTransactionsRequest) String ¶
func (x *ListTransactionsRequest) String() string
type ListTransactionsResponse ¶
type ListTransactionsResponse struct { // The transaction corresponding to the specific request and filters Transactions []*Transaction `protobuf:"bytes,3,rep,name=transactions,proto3" json:"transactions,omitempty"` // contains filtered or unexported fields }
func (*ListTransactionsResponse) Descriptor
deprecated
func (*ListTransactionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListTransactionsResponse.ProtoReflect.Descriptor instead.
func (*ListTransactionsResponse) GetTransactions ¶
func (x *ListTransactionsResponse) GetTransactions() []*Transaction
func (*ListTransactionsResponse) ProtoMessage ¶
func (*ListTransactionsResponse) ProtoMessage()
func (*ListTransactionsResponse) ProtoReflect ¶
func (x *ListTransactionsResponse) ProtoReflect() protoreflect.Message
func (*ListTransactionsResponse) Reset ¶
func (x *ListTransactionsResponse) Reset()
func (*ListTransactionsResponse) String ¶
func (x *ListTransactionsResponse) String() string
type Transaction ¶
type Transaction struct { // The height of the block the transaction was found in Block uint64 `protobuf:"varint,1,opt,name=block,proto3" json:"block,omitempty"` // The index of the transaction in the block Index uint32 `protobuf:"varint,2,opt,name=index,proto3" json:"index,omitempty"` // The hash of the transaction Hash string `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"` // The submitter of the transaction (Vega public key) Submitter string `protobuf:"bytes,4,opt,name=submitter,proto3" json:"submitter,omitempty"` // The type of transaction Type string `protobuf:"bytes,5,opt,name=type,proto3" json:"type,omitempty"` // The results code of the transaction (0 is success) Code uint32 `protobuf:"varint,6,opt,name=code,proto3" json:"code,omitempty"` // The cursor for this transaction (in the page, used for paginated results) Cursor string `protobuf:"bytes,7,opt,name=cursor,proto3" json:"cursor,omitempty"` // The actual command of the transaction Command *v1.InputData `protobuf:"bytes,8,opt,name=command,proto3" json:"command,omitempty"` // Submitter's signature of transaction Signature *v1.Signature `protobuf:"bytes,9,opt,name=signature,proto3" json:"signature,omitempty"` // An optional error happening when processing / checking the transaction // Should be set if error code is not 0 Error *string `protobuf:"bytes,10,opt,name=error,proto3,oneof" json:"error,omitempty"` // contains filtered or unexported fields }
func (*Transaction) Descriptor
deprecated
func (*Transaction) Descriptor() ([]byte, []int)
Deprecated: Use Transaction.ProtoReflect.Descriptor instead.
func (*Transaction) GetBlock ¶
func (x *Transaction) GetBlock() uint64
func (*Transaction) GetCode ¶
func (x *Transaction) GetCode() uint32
func (*Transaction) GetCommand ¶
func (x *Transaction) GetCommand() *v1.InputData
func (*Transaction) GetCursor ¶
func (x *Transaction) GetCursor() string
func (*Transaction) GetError ¶ added in v0.63.0
func (x *Transaction) GetError() string
func (*Transaction) GetHash ¶
func (x *Transaction) GetHash() string
func (*Transaction) GetIndex ¶
func (x *Transaction) GetIndex() uint32
func (*Transaction) GetSignature ¶ added in v0.63.0
func (x *Transaction) GetSignature() *v1.Signature
func (*Transaction) GetSubmitter ¶
func (x *Transaction) GetSubmitter() string
func (*Transaction) GetType ¶
func (x *Transaction) GetType() string
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) ProtoReflect ¶
func (x *Transaction) ProtoReflect() protoreflect.Message
func (*Transaction) Reset ¶
func (x *Transaction) Reset()
func (*Transaction) String ¶
func (x *Transaction) String() string
type UnimplementedBlockExplorerServiceServer ¶
type UnimplementedBlockExplorerServiceServer struct { }
UnimplementedBlockExplorerServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedBlockExplorerServiceServer) GetTransaction ¶ added in v0.58.0
func (UnimplementedBlockExplorerServiceServer) GetTransaction(context.Context, *GetTransactionRequest) (*GetTransactionResponse, error)
func (UnimplementedBlockExplorerServiceServer) Info ¶ added in v0.65.0
func (UnimplementedBlockExplorerServiceServer) Info(context.Context, *InfoRequest) (*InfoResponse, error)
func (UnimplementedBlockExplorerServiceServer) ListTransactions ¶
func (UnimplementedBlockExplorerServiceServer) ListTransactions(context.Context, *ListTransactionsRequest) (*ListTransactionsResponse, error)
type UnsafeBlockExplorerServiceServer ¶
type UnsafeBlockExplorerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBlockExplorerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BlockExplorerServiceServer will result in compilation errors.