gwproto

package
v0.0.0-...-8cb95f7 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCode_name = map[int32]string{
		0: "ERROR_CODE_UNDEFINED",
		1: "ERROR_CODE_SLOT_VALUE_PROOF_GENERATION_FAILED",
		2: "ERROR_CODE_TRANSACTION_PROOF_GENERATION_FAILED",
	}
	ErrCode_value = map[string]int32{
		"ERROR_CODE_UNDEFINED":                           0,
		"ERROR_CODE_SLOT_VALUE_PROOF_GENERATION_FAILED":  1,
		"ERROR_CODE_TRANSACTION_PROOF_GENERATION_FAILED": 2,
	}
)

Enum value maps for ErrCode.

View Source
var (
	CheckStatus_name = map[int32]string{
		0: "IN_PROGRESS",
		1: "COMPLETE",
	}
	CheckStatus_value = map[string]int32{
		"IN_PROGRESS": 0,
		"COMPLETE":    1,
	}
)

Enum value maps for CheckStatus.

View Source
var (
	QueryStatus_name = map[int32]string{
		0: "QS_UNKNOWN",
		1: "QS_TO_BE_PAID",
		2: "QS_PAID",
		3: "QS_PROOF_READY",
		4: "QS_COMPLETE",
		5: "QS_FAILED",
	}
	QueryStatus_value = map[string]int32{
		"QS_UNKNOWN":     0,
		"QS_TO_BE_PAID":  1,
		"QS_PAID":        2,
		"QS_PROOF_READY": 3,
		"QS_COMPLETE":    4,
		"QS_FAILED":      5,
	}
)

Enum value maps for QueryStatus.

View Source
var File_brevis_gateway_proto protoreflect.FileDescriptor
View Source
var File_brevis_types_proto protoreflect.FileDescriptor
View Source
var Gateway_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "brevis.Gateway",
	HandlerType: (*GatewayServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "PrepareQuery",
			Handler:    _Gateway_PrepareQuery_Handler,
		},
		{
			MethodName: "SubmitAppCircuitProof",
			Handler:    _Gateway_SubmitAppCircuitProof_Handler,
		},
		{
			MethodName: "GetQueryStatus",
			Handler:    _Gateway_GetQueryStatus_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "brevis/gateway.proto",
}

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

Functions

func RegisterGatewayServer

func RegisterGatewayServer(s grpc.ServiceRegistrar, srv GatewayServer)

Types

type CheckStatus

type CheckStatus int32
const (
	CheckStatus_IN_PROGRESS CheckStatus = 0
	CheckStatus_COMPLETE    CheckStatus = 1
)

func (CheckStatus) Descriptor

func (CheckStatus) Enum

func (x CheckStatus) Enum() *CheckStatus

func (CheckStatus) EnumDescriptor deprecated

func (CheckStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use CheckStatus.Descriptor instead.

func (CheckStatus) Number

func (x CheckStatus) Number() protoreflect.EnumNumber

func (CheckStatus) String

func (x CheckStatus) String() string

func (CheckStatus) Type

type ErrCode

type ErrCode int32
const (
	ErrCode_ERROR_CODE_UNDEFINED                           ErrCode = 0
	ErrCode_ERROR_CODE_SLOT_VALUE_PROOF_GENERATION_FAILED  ErrCode = 1
	ErrCode_ERROR_CODE_TRANSACTION_PROOF_GENERATION_FAILED ErrCode = 2
)

func (ErrCode) Descriptor

func (ErrCode) Descriptor() protoreflect.EnumDescriptor

func (ErrCode) Enum

func (x ErrCode) Enum() *ErrCode

func (ErrCode) EnumDescriptor deprecated

func (ErrCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ErrCode.Descriptor instead.

func (ErrCode) Number

func (x ErrCode) Number() protoreflect.EnumNumber

func (ErrCode) String

func (x ErrCode) String() string

func (ErrCode) Type

func (ErrCode) Type() protoreflect.EnumType

type ErrMsg

type ErrMsg struct {
	Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=brevis.ErrCode" json:"code,omitempty"`
	Msg  string  `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	// contains filtered or unexported fields
}

func (*ErrMsg) Descriptor deprecated

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

Deprecated: Use ErrMsg.ProtoReflect.Descriptor instead.

func (*ErrMsg) GetCode

func (x *ErrMsg) GetCode() ErrCode

func (*ErrMsg) GetMsg

func (x *ErrMsg) GetMsg() string

func (*ErrMsg) ProtoMessage

func (*ErrMsg) ProtoMessage()

func (*ErrMsg) ProtoReflect

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

func (*ErrMsg) Reset

func (x *ErrMsg) Reset()

func (*ErrMsg) String

func (x *ErrMsg) String() string

type GatewayClient

type GatewayClient interface {
	PrepareQuery(ctx context.Context, in *PrepareQueryRequest, opts ...grpc.CallOption) (*PrepareQueryResponse, error)
	SubmitAppCircuitProof(ctx context.Context, in *SubmitAppCircuitProofRequest, opts ...grpc.CallOption) (*SubmitAppCircuitProofResponse, error)
	GetQueryStatus(ctx context.Context, in *GetQueryStatusRequest, opts ...grpc.CallOption) (*GetQueryStatusResponse, error)
}

GatewayClient is the client API for Gateway 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 NewGatewayClient

func NewGatewayClient(cc grpc.ClientConnInterface) GatewayClient

type GatewayServer

type GatewayServer interface {
	PrepareQuery(context.Context, *PrepareQueryRequest) (*PrepareQueryResponse, error)
	SubmitAppCircuitProof(context.Context, *SubmitAppCircuitProofRequest) (*SubmitAppCircuitProofResponse, error)
	GetQueryStatus(context.Context, *GetQueryStatusRequest) (*GetQueryStatusResponse, error)
	// contains filtered or unexported methods
}

GatewayServer is the server API for Gateway service. All implementations must embed UnimplementedGatewayServer for forward compatibility

type GetQueryStatusRequest

type GetQueryStatusRequest struct {
	QueryHash     string `protobuf:"bytes,1,opt,name=query_hash,json=queryHash,proto3" json:"query_hash,omitempty"`
	TargetChainId uint64 `protobuf:"varint,2,opt,name=target_chain_id,json=targetChainId,proto3" json:"target_chain_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetQueryStatusRequest) Descriptor deprecated

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

Deprecated: Use GetQueryStatusRequest.ProtoReflect.Descriptor instead.

func (*GetQueryStatusRequest) GetQueryHash

func (x *GetQueryStatusRequest) GetQueryHash() string

func (*GetQueryStatusRequest) GetTargetChainId

func (x *GetQueryStatusRequest) GetTargetChainId() uint64

func (*GetQueryStatusRequest) ProtoMessage

func (*GetQueryStatusRequest) ProtoMessage()

func (*GetQueryStatusRequest) ProtoReflect

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

func (*GetQueryStatusRequest) Reset

func (x *GetQueryStatusRequest) Reset()

func (*GetQueryStatusRequest) String

func (x *GetQueryStatusRequest) String() string

type GetQueryStatusResponse

type GetQueryStatusResponse struct {
	Err    *ErrMsg     `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	Status QueryStatus `protobuf:"varint,2,opt,name=status,proto3,enum=brevis.QueryStatus" json:"status,omitempty"`
	TxHash string      `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*GetQueryStatusResponse) Descriptor deprecated

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

Deprecated: Use GetQueryStatusResponse.ProtoReflect.Descriptor instead.

func (*GetQueryStatusResponse) GetErr

func (x *GetQueryStatusResponse) GetErr() *ErrMsg

func (*GetQueryStatusResponse) GetStatus

func (x *GetQueryStatusResponse) GetStatus() QueryStatus

func (*GetQueryStatusResponse) GetTxHash

func (x *GetQueryStatusResponse) GetTxHash() string

func (*GetQueryStatusResponse) ProtoMessage

func (*GetQueryStatusResponse) ProtoMessage()

func (*GetQueryStatusResponse) ProtoReflect

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

func (*GetQueryStatusResponse) Reset

func (x *GetQueryStatusResponse) Reset()

func (*GetQueryStatusResponse) String

func (x *GetQueryStatusResponse) String() string

type LogExtractInfo

type LogExtractInfo struct {
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	LogIndex        uint64 `protobuf:"varint,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"`
	LogTopic0       string `protobuf:"bytes,3,opt,name=log_topic0,json=logTopic0,proto3" json:"log_topic0,omitempty"`
	ValueFromTopic  bool   `protobuf:"varint,4,opt,name=value_from_topic,json=valueFromTopic,proto3" json:"value_from_topic,omitempty"`
	ValueIndex      uint64 `protobuf:"varint,5,opt,name=value_index,json=valueIndex,proto3" json:"value_index,omitempty"`
	Value           string `protobuf:"bytes,6,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*LogExtractInfo) Descriptor deprecated

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

Deprecated: Use LogExtractInfo.ProtoReflect.Descriptor instead.

func (*LogExtractInfo) GetContractAddress

func (x *LogExtractInfo) GetContractAddress() string

func (*LogExtractInfo) GetLogIndex

func (x *LogExtractInfo) GetLogIndex() uint64

func (*LogExtractInfo) GetLogTopic0

func (x *LogExtractInfo) GetLogTopic0() string

func (*LogExtractInfo) GetValue

func (x *LogExtractInfo) GetValue() string

func (*LogExtractInfo) GetValueFromTopic

func (x *LogExtractInfo) GetValueFromTopic() bool

func (*LogExtractInfo) GetValueIndex

func (x *LogExtractInfo) GetValueIndex() uint64

func (*LogExtractInfo) ProtoMessage

func (*LogExtractInfo) ProtoMessage()

func (*LogExtractInfo) ProtoReflect

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

func (*LogExtractInfo) Reset

func (x *LogExtractInfo) Reset()

func (*LogExtractInfo) String

func (x *LogExtractInfo) String() string

type PrepareQueryRequest

type PrepareQueryRequest struct {
	ChainId           uint64                      `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	ReceiptInfos      []*ReceiptInfo              `protobuf:"bytes,2,rep,name=receipt_infos,json=receiptInfos,proto3" json:"receipt_infos,omitempty"`
	StorageQueryInfos []*StorageQueryInfo         `protobuf:"bytes,3,rep,name=storage_query_infos,json=storageQueryInfos,proto3" json:"storage_query_infos,omitempty"`
	TransactionInfos  []*TransactionInfo          `protobuf:"bytes,4,rep,name=transaction_infos,json=transactionInfos,proto3" json:"transaction_infos,omitempty"`
	AppCircuitInfo    *commonproto.AppCircuitInfo `protobuf:"bytes,5,opt,name=app_circuit_info,json=appCircuitInfo,proto3" json:"app_circuit_info,omitempty"`
	UseAppCircuitInfo bool                        `protobuf:"varint,6,opt,name=use_app_circuit_info,json=useAppCircuitInfo,proto3" json:"use_app_circuit_info,omitempty"`
	TargetChainId     uint64                      `protobuf:"varint,7,opt,name=target_chain_id,json=targetChainId,proto3" json:"target_chain_id,omitempty"`
	// contains filtered or unexported fields
}

func (*PrepareQueryRequest) Descriptor deprecated

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

Deprecated: Use PrepareQueryRequest.ProtoReflect.Descriptor instead.

func (*PrepareQueryRequest) GetAppCircuitInfo

func (x *PrepareQueryRequest) GetAppCircuitInfo() *commonproto.AppCircuitInfo

func (*PrepareQueryRequest) GetChainId

func (x *PrepareQueryRequest) GetChainId() uint64

func (*PrepareQueryRequest) GetReceiptInfos

func (x *PrepareQueryRequest) GetReceiptInfos() []*ReceiptInfo

func (*PrepareQueryRequest) GetStorageQueryInfos

func (x *PrepareQueryRequest) GetStorageQueryInfos() []*StorageQueryInfo

func (*PrepareQueryRequest) GetTargetChainId

func (x *PrepareQueryRequest) GetTargetChainId() uint64

func (*PrepareQueryRequest) GetTransactionInfos

func (x *PrepareQueryRequest) GetTransactionInfos() []*TransactionInfo

func (*PrepareQueryRequest) GetUseAppCircuitInfo

func (x *PrepareQueryRequest) GetUseAppCircuitInfo() bool

func (*PrepareQueryRequest) ProtoMessage

func (*PrepareQueryRequest) ProtoMessage()

func (*PrepareQueryRequest) ProtoReflect

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

func (*PrepareQueryRequest) Reset

func (x *PrepareQueryRequest) Reset()

func (*PrepareQueryRequest) String

func (x *PrepareQueryRequest) String() string

type PrepareQueryResponse

type PrepareQueryResponse struct {
	Err       *ErrMsg `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	QueryHash string  `protobuf:"bytes,2,opt,name=query_hash,json=queryHash,proto3" json:"query_hash,omitempty"`
	Fee       string  `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"`
	// contains filtered or unexported fields
}

func (*PrepareQueryResponse) Descriptor deprecated

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

Deprecated: Use PrepareQueryResponse.ProtoReflect.Descriptor instead.

func (*PrepareQueryResponse) GetErr

func (x *PrepareQueryResponse) GetErr() *ErrMsg

func (*PrepareQueryResponse) GetFee

func (x *PrepareQueryResponse) GetFee() string

func (*PrepareQueryResponse) GetQueryHash

func (x *PrepareQueryResponse) GetQueryHash() string

func (*PrepareQueryResponse) ProtoMessage

func (*PrepareQueryResponse) ProtoMessage()

func (*PrepareQueryResponse) ProtoReflect

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

func (*PrepareQueryResponse) Reset

func (x *PrepareQueryResponse) Reset()

func (*PrepareQueryResponse) String

func (x *PrepareQueryResponse) String() string

type QueryStatus

type QueryStatus int32
const (
	QueryStatus_QS_UNKNOWN     QueryStatus = 0
	QueryStatus_QS_TO_BE_PAID  QueryStatus = 1
	QueryStatus_QS_PAID        QueryStatus = 2
	QueryStatus_QS_PROOF_READY QueryStatus = 3
	QueryStatus_QS_COMPLETE    QueryStatus = 4
	QueryStatus_QS_FAILED      QueryStatus = 5
)

func (QueryStatus) Descriptor

func (QueryStatus) Enum

func (x QueryStatus) Enum() *QueryStatus

func (QueryStatus) EnumDescriptor deprecated

func (QueryStatus) EnumDescriptor() ([]byte, []int)

Deprecated: Use QueryStatus.Descriptor instead.

func (QueryStatus) Number

func (x QueryStatus) Number() protoreflect.EnumNumber

func (QueryStatus) String

func (x QueryStatus) String() string

func (QueryStatus) Type

type ReceiptInfo

type ReceiptInfo struct {
	TransactionHash string            `protobuf:"bytes,1,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"`
	LogExtractInfos []*LogExtractInfo `protobuf:"bytes,2,rep,name=log_extract_infos,json=logExtractInfos,proto3" json:"log_extract_infos,omitempty"`
	BlkNum          uint64            `protobuf:"varint,3,opt,name=blk_num,json=blkNum,proto3" json:"blk_num,omitempty"`
	ReceiptIndex    uint64            `protobuf:"varint,4,opt,name=receipt_index,json=receiptIndex,proto3" json:"receipt_index,omitempty"`
	// contains filtered or unexported fields
}

func (*ReceiptInfo) Descriptor deprecated

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

Deprecated: Use ReceiptInfo.ProtoReflect.Descriptor instead.

func (*ReceiptInfo) GetBlkNum

func (x *ReceiptInfo) GetBlkNum() uint64

func (*ReceiptInfo) GetLogExtractInfos

func (x *ReceiptInfo) GetLogExtractInfos() []*LogExtractInfo

func (*ReceiptInfo) GetReceiptIndex

func (x *ReceiptInfo) GetReceiptIndex() uint64

func (*ReceiptInfo) GetTransactionHash

func (x *ReceiptInfo) GetTransactionHash() string

func (*ReceiptInfo) ProtoMessage

func (*ReceiptInfo) ProtoMessage()

func (*ReceiptInfo) ProtoReflect

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

func (*ReceiptInfo) Reset

func (x *ReceiptInfo) Reset()

func (*ReceiptInfo) String

func (x *ReceiptInfo) String() string

type StorageQueryInfo

type StorageQueryInfo struct {
	Account     string   `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	StorageKeys []string `protobuf:"bytes,2,rep,name=storage_keys,json=storageKeys,proto3" json:"storage_keys,omitempty"`
	BlkNum      uint64   `protobuf:"varint,3,opt,name=blk_num,json=blkNum,proto3" json:"blk_num,omitempty"`
	// contains filtered or unexported fields
}

func (*StorageQueryInfo) Descriptor deprecated

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

Deprecated: Use StorageQueryInfo.ProtoReflect.Descriptor instead.

func (*StorageQueryInfo) GetAccount

func (x *StorageQueryInfo) GetAccount() string

func (*StorageQueryInfo) GetBlkNum

func (x *StorageQueryInfo) GetBlkNum() uint64

func (*StorageQueryInfo) GetStorageKeys

func (x *StorageQueryInfo) GetStorageKeys() []string

func (*StorageQueryInfo) ProtoMessage

func (*StorageQueryInfo) ProtoMessage()

func (*StorageQueryInfo) ProtoReflect

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

func (*StorageQueryInfo) Reset

func (x *StorageQueryInfo) Reset()

func (*StorageQueryInfo) String

func (x *StorageQueryInfo) String() string

type SubmitAppCircuitProofRequest

type SubmitAppCircuitProofRequest struct {
	QueryHash     string `protobuf:"bytes,1,opt,name=query_hash,json=queryHash,proto3" json:"query_hash,omitempty"`
	TargetChainId uint64 `protobuf:"varint,2,opt,name=target_chain_id,json=targetChainId,proto3" json:"target_chain_id,omitempty"`
	Proof         string `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitAppCircuitProofRequest) Descriptor deprecated

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

Deprecated: Use SubmitAppCircuitProofRequest.ProtoReflect.Descriptor instead.

func (*SubmitAppCircuitProofRequest) GetProof

func (x *SubmitAppCircuitProofRequest) GetProof() string

func (*SubmitAppCircuitProofRequest) GetQueryHash

func (x *SubmitAppCircuitProofRequest) GetQueryHash() string

func (*SubmitAppCircuitProofRequest) GetTargetChainId

func (x *SubmitAppCircuitProofRequest) GetTargetChainId() uint64

func (*SubmitAppCircuitProofRequest) ProtoMessage

func (*SubmitAppCircuitProofRequest) ProtoMessage()

func (*SubmitAppCircuitProofRequest) ProtoReflect

func (*SubmitAppCircuitProofRequest) Reset

func (x *SubmitAppCircuitProofRequest) Reset()

func (*SubmitAppCircuitProofRequest) String

type SubmitAppCircuitProofResponse

type SubmitAppCircuitProofResponse struct {
	Err     *ErrMsg `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	Success bool    `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitAppCircuitProofResponse) Descriptor deprecated

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

Deprecated: Use SubmitAppCircuitProofResponse.ProtoReflect.Descriptor instead.

func (*SubmitAppCircuitProofResponse) GetErr

func (*SubmitAppCircuitProofResponse) GetSuccess

func (x *SubmitAppCircuitProofResponse) GetSuccess() bool

func (*SubmitAppCircuitProofResponse) ProtoMessage

func (*SubmitAppCircuitProofResponse) ProtoMessage()

func (*SubmitAppCircuitProofResponse) ProtoReflect

func (*SubmitAppCircuitProofResponse) Reset

func (x *SubmitAppCircuitProofResponse) Reset()

func (*SubmitAppCircuitProofResponse) String

type TransactionInfo

type TransactionInfo struct {
	TransactionHash string `protobuf:"bytes,1,opt,name=transaction_hash,json=transactionHash,proto3" json:"transaction_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionInfo) Descriptor deprecated

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

Deprecated: Use TransactionInfo.ProtoReflect.Descriptor instead.

func (*TransactionInfo) GetTransactionHash

func (x *TransactionInfo) GetTransactionHash() string

func (*TransactionInfo) ProtoMessage

func (*TransactionInfo) ProtoMessage()

func (*TransactionInfo) ProtoReflect

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

func (*TransactionInfo) Reset

func (x *TransactionInfo) Reset()

func (*TransactionInfo) String

func (x *TransactionInfo) String() string

type UnimplementedGatewayServer

type UnimplementedGatewayServer struct {
}

UnimplementedGatewayServer must be embedded to have forward compatible implementations.

func (UnimplementedGatewayServer) GetQueryStatus

func (UnimplementedGatewayServer) PrepareQuery

type UnsafeGatewayServer

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

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

Jump to

Keyboard shortcuts

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