gwproto

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 22 Imported by: 2

Documentation

Overview

Package brevis is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Gateway_PrepareQuery_FullMethodName          = "/brevis.Gateway/PrepareQuery"
	Gateway_SubmitAppCircuitProof_FullMethodName = "/brevis.Gateway/SubmitAppCircuitProof"
	Gateway_GetQueryStatus_FullMethodName        = "/brevis.Gateway/GetQueryStatus"
	Gateway_GetQueryInfoForOP_FullMethodName     = "/brevis.Gateway/GetQueryInfoForOP"
	Gateway_GetSingleRunParams_FullMethodName    = "/brevis.Gateway/GetSingleRunParams"
	Gateway_SendBatchQueries_FullMethodName      = "/brevis.Gateway/SendBatchQueries"
)

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 (
	QueryOption_name = map[int32]string{
		0: "ZK_MODE",
		1: "OP_MODE",
	}
	QueryOption_value = map[string]int32{
		"ZK_MODE": 0,
		"OP_MODE": 1,
	}
)

Enum value maps for QueryOption.

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",
		6:  "QS_OP_MESSAGE_PENDING",
		7:  "QS_OP_MESSAGE_READY",
		8:  "QS_OP_SUBMITTED",
		9:  "QS_OP_MESSAGE_SUBMISSION_FAILED",
		10: "QS_OP_DISPUTING",
		11: "QS_OP_ASK_FOR_QUERY_DATA",
		12: "QS_OP_QUERY_DATA_SUBMITTED",
		13: "QS_OP_QUERY_DATA_POST_FAILED",
		14: "QS_OP_ASK_FOR_QUERY_PROOF",
		15: "QS_OP_DISPUTED",
		16: "QS_OP_ATTESTED",
		17: "QS_REFUNDED",
	}
	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,
		"QS_OP_MESSAGE_PENDING":           6,
		"QS_OP_MESSAGE_READY":             7,
		"QS_OP_SUBMITTED":                 8,
		"QS_OP_MESSAGE_SUBMISSION_FAILED": 9,
		"QS_OP_DISPUTING":                 10,
		"QS_OP_ASK_FOR_QUERY_DATA":        11,
		"QS_OP_QUERY_DATA_SUBMITTED":      12,
		"QS_OP_QUERY_DATA_POST_FAILED":    13,
		"QS_OP_ASK_FOR_QUERY_PROOF":       14,
		"QS_OP_DISPUTED":                  15,
		"QS_OP_ATTESTED":                  16,
		"QS_REFUNDED":                     17,
	}
)

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,
		},
		{
			MethodName: "GetQueryInfoForOP",
			Handler:    _Gateway_GetQueryInfoForOP_Handler,
		},
		{
			MethodName: "GetSingleRunParams",
			Handler:    _Gateway_GetSingleRunParams_Handler,
		},
		{
			MethodName: "SendBatchQueries",
			Handler:    _Gateway_SendBatchQueries_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 RegisterGatewayHandler

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

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

func RegisterGatewayHandlerClient

func RegisterGatewayHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GatewayClient) error

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

func RegisterGatewayHandlerFromEndpoint

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

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

func RegisterGatewayHandlerServer

func RegisterGatewayHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GatewayServer) error

RegisterGatewayHandlerServer registers the http handlers for service Gateway to "mux". UnaryRPC :call GatewayServer 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 RegisterGatewayHandlerFromEndpoint instead.

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

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

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

type GetQueryInfoForOPRequest

type GetQueryInfoForOPRequest 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 (*GetQueryInfoForOPRequest) Descriptor deprecated

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

Deprecated: Use GetQueryInfoForOPRequest.ProtoReflect.Descriptor instead.

func (*GetQueryInfoForOPRequest) GetQueryHash

func (x *GetQueryInfoForOPRequest) GetQueryHash() string

func (*GetQueryInfoForOPRequest) GetTargetChainId

func (x *GetQueryInfoForOPRequest) GetTargetChainId() uint64

func (*GetQueryInfoForOPRequest) ProtoMessage

func (*GetQueryInfoForOPRequest) ProtoMessage()

func (*GetQueryInfoForOPRequest) ProtoReflect

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

func (*GetQueryInfoForOPRequest) Reset

func (x *GetQueryInfoForOPRequest) Reset()

func (*GetQueryInfoForOPRequest) String

func (x *GetQueryInfoForOPRequest) String() string

type GetQueryInfoForOPResponse

type GetQueryInfoForOPResponse struct {
	Err       *ErrMsg `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	QueryInfo []byte  `protobuf:"bytes,2,opt,name=query_info,json=queryInfo,proto3" json:"query_info,omitempty"`
	// contains filtered or unexported fields
}

func (*GetQueryInfoForOPResponse) Descriptor deprecated

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

Deprecated: Use GetQueryInfoForOPResponse.ProtoReflect.Descriptor instead.

func (*GetQueryInfoForOPResponse) GetErr

func (x *GetQueryInfoForOPResponse) GetErr() *ErrMsg

func (*GetQueryInfoForOPResponse) GetQueryInfo

func (x *GetQueryInfoForOPResponse) GetQueryInfo() []byte

func (*GetQueryInfoForOPResponse) ProtoMessage

func (*GetQueryInfoForOPResponse) ProtoMessage()

func (*GetQueryInfoForOPResponse) ProtoReflect

func (*GetQueryInfoForOPResponse) Reset

func (x *GetQueryInfoForOPResponse) Reset()

func (*GetQueryInfoForOPResponse) String

func (x *GetQueryInfoForOPResponse) String() string

type GetQueryStatusRequest

type GetQueryStatusRequest struct {
	QueryKey      *QueryKey `protobuf:"bytes,1,opt,name=query_key,json=queryKey,proto3" json:"query_key,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) GetQueryKey

func (x *GetQueryStatusRequest) GetQueryKey() *QueryKey

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"`
	Proof         string      `protobuf:"bytes,4,opt,name=proof,proto3" json:"proof,omitempty"`
	ProofData     *ProofData  `protobuf:"bytes,5,opt,name=proof_data,json=proofData,proto3" json:"proof_data,omitempty"`
	CircuitOutput string      `protobuf:"bytes,6,opt,name=circuit_output,json=circuitOutput,proto3" json:"circuit_output,omitempty"`
	// contains filtered or unexported fields
}

func (*GetQueryStatusResponse) Descriptor deprecated

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

Deprecated: Use GetQueryStatusResponse.ProtoReflect.Descriptor instead.

func (*GetQueryStatusResponse) GetCircuitOutput added in v0.3.4

func (x *GetQueryStatusResponse) GetCircuitOutput() string

func (*GetQueryStatusResponse) GetErr

func (x *GetQueryStatusResponse) GetErr() *ErrMsg

func (*GetQueryStatusResponse) GetProof added in v0.3.4

func (x *GetQueryStatusResponse) GetProof() string

func (*GetQueryStatusResponse) GetProofData added in v0.3.4

func (x *GetQueryStatusResponse) GetProofData() *ProofData

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 GetSingleRunParamsRequest

type GetSingleRunParamsRequest struct {
	QueryKey      *QueryKey `protobuf:"bytes,1,opt,name=query_key,json=queryKey,proto3" json:"query_key,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 (*GetSingleRunParamsRequest) Descriptor deprecated

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

Deprecated: Use GetSingleRunParamsRequest.ProtoReflect.Descriptor instead.

func (*GetSingleRunParamsRequest) GetQueryKey

func (x *GetSingleRunParamsRequest) GetQueryKey() *QueryKey

func (*GetSingleRunParamsRequest) GetTargetChainId

func (x *GetSingleRunParamsRequest) GetTargetChainId() uint64

func (*GetSingleRunParamsRequest) ProtoMessage

func (*GetSingleRunParamsRequest) ProtoMessage()

func (*GetSingleRunParamsRequest) ProtoReflect

func (*GetSingleRunParamsRequest) Reset

func (x *GetSingleRunParamsRequest) Reset()

func (*GetSingleRunParamsRequest) String

func (x *GetSingleRunParamsRequest) String() string

type GetSingleRunParamsResponse

type GetSingleRunParamsResponse struct {
	Err              *ErrMsg    `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	SrcChainId       uint64     `protobuf:"varint,2,opt,name=src_chain_id,json=srcChainId,proto3" json:"src_chain_id,omitempty"`
	ProofData        *ProofData `protobuf:"bytes,3,opt,name=proof_data,json=proofData,proto3" json:"proof_data,omitempty"`
	MerkleRoot       string     `protobuf:"bytes,4,opt,name=merkle_root,json=merkleRoot,proto3" json:"merkle_root,omitempty"`
	MerkleProof      []string   `protobuf:"bytes,5,rep,name=merkle_proof,json=merkleProof,proto3" json:"merkle_proof,omitempty"`
	NodeIndex        uint64     `protobuf:"varint,6,opt,name=node_index,json=nodeIndex,proto3" json:"node_index,omitempty"`
	AppCircuitOutput string     `protobuf:"bytes,7,opt,name=app_circuit_output,json=appCircuitOutput,proto3" json:"app_circuit_output,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSingleRunParamsResponse) Descriptor deprecated

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

Deprecated: Use GetSingleRunParamsResponse.ProtoReflect.Descriptor instead.

func (*GetSingleRunParamsResponse) GetAppCircuitOutput

func (x *GetSingleRunParamsResponse) GetAppCircuitOutput() string

func (*GetSingleRunParamsResponse) GetErr

func (x *GetSingleRunParamsResponse) GetErr() *ErrMsg

func (*GetSingleRunParamsResponse) GetMerkleProof

func (x *GetSingleRunParamsResponse) GetMerkleProof() []string

func (*GetSingleRunParamsResponse) GetMerkleRoot

func (x *GetSingleRunParamsResponse) GetMerkleRoot() string

func (*GetSingleRunParamsResponse) GetNodeIndex

func (x *GetSingleRunParamsResponse) GetNodeIndex() uint64

func (*GetSingleRunParamsResponse) GetProofData

func (x *GetSingleRunParamsResponse) GetProofData() *ProofData

func (*GetSingleRunParamsResponse) GetSrcChainId

func (x *GetSingleRunParamsResponse) GetSrcChainId() uint64

func (*GetSingleRunParamsResponse) ProtoMessage

func (*GetSingleRunParamsResponse) ProtoMessage()

func (*GetSingleRunParamsResponse) ProtoReflect

func (*GetSingleRunParamsResponse) Reset

func (x *GetSingleRunParamsResponse) Reset()

func (*GetSingleRunParamsResponse) String

func (x *GetSingleRunParamsResponse) String() string

type LogExtractInfo

type LogExtractInfo struct {
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	LogPos          uint64 `protobuf:"varint,2,opt,name=log_pos,json=logPos,proto3" json:"log_pos,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"`
	TopicsLength    uint64 `protobuf:"varint,7,opt,name=topics_length,json=topicsLength,proto3" json:"topics_length,omitempty"` // How many topics exists in this log
	// 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) GetLogPos

func (x *LogExtractInfo) GetLogPos() uint64

func (*LogExtractInfo) GetLogTopic0

func (x *LogExtractInfo) GetLogTopic0() string

func (*LogExtractInfo) GetTopicsLength

func (x *LogExtractInfo) GetTopicsLength() uint64

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"`
	TargetChainId     uint64                      `protobuf:"varint,6,opt,name=target_chain_id,json=targetChainId,proto3" json:"target_chain_id,omitempty"`
	Option            QueryOption                 `protobuf:"varint,7,opt,name=option,proto3,enum=brevis.QueryOption" json:"option,omitempty"`
	// Deprecated: Marked as deprecated in brevis/gateway.proto.
	UsePlonky2 bool `protobuf:"varint,8,opt,name=use_plonky2,json=usePlonky2,proto3" json:"use_plonky2,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) GetOption

func (x *PrepareQueryRequest) GetOption() QueryOption

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) GetUsePlonky2 deprecated

func (x *PrepareQueryRequest) GetUsePlonky2() bool

Deprecated: Marked as deprecated in brevis/gateway.proto.

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"`
	QueryKey *QueryKey `protobuf:"bytes,2,opt,name=query_key,json=queryKey,proto3" json:"query_key,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) GetQueryKey

func (x *PrepareQueryResponse) GetQueryKey() *QueryKey

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 ProofData

type ProofData struct {
	CommitHash string `protobuf:"bytes,1,opt,name=commit_hash,json=commitHash,proto3" json:"commit_hash,omitempty"`
	// Deprecated: Marked as deprecated in brevis/gateway.proto.
	VkHash               string `protobuf:"bytes,2,opt,name=vk_hash,json=vkHash,proto3" json:"vk_hash,omitempty"`
	AppCommitHash        string `protobuf:"bytes,3,opt,name=app_commit_hash,json=appCommitHash,proto3" json:"app_commit_hash,omitempty"`
	AppVkHash            string `protobuf:"bytes,4,opt,name=app_vk_hash,json=appVkHash,proto3" json:"app_vk_hash,omitempty"`
	SmtRoot              string `protobuf:"bytes,5,opt,name=smt_root,json=smtRoot,proto3" json:"smt_root,omitempty"`
	DummyInputCommitment string `protobuf:"bytes,6,opt,name=dummy_input_commitment,json=dummyInputCommitment,proto3" json:"dummy_input_commitment,omitempty"`
	// contains filtered or unexported fields
}

func (*ProofData) CalculateHash

func (data *ProofData) CalculateHash() ([]byte, error)

func (*ProofData) Descriptor deprecated

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

Deprecated: Use ProofData.ProtoReflect.Descriptor instead.

func (*ProofData) Equals

func (data *ProofData) Equals(other merkletree.Content) (bool, error)

func (*ProofData) GetAppCommitHash

func (x *ProofData) GetAppCommitHash() string

func (*ProofData) GetAppVkHash

func (x *ProofData) GetAppVkHash() string

func (*ProofData) GetCommitHash

func (x *ProofData) GetCommitHash() string

func (*ProofData) GetDummyInputCommitment added in v0.3.4

func (x *ProofData) GetDummyInputCommitment() string

func (*ProofData) GetSmtRoot

func (x *ProofData) GetSmtRoot() string

func (*ProofData) GetVkHash deprecated

func (x *ProofData) GetVkHash() string

Deprecated: Marked as deprecated in brevis/gateway.proto.

func (*ProofData) ProtoMessage

func (*ProofData) ProtoMessage()

func (*ProofData) ProtoReflect

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

func (*ProofData) Reset

func (x *ProofData) Reset()

func (*ProofData) String

func (x *ProofData) String() string

type Query

type Query struct {
	ReceiptInfos      []*ReceiptInfo                       `protobuf:"bytes,1,rep,name=receipt_infos,json=receiptInfos,proto3" json:"receipt_infos,omitempty"`
	StorageQueryInfos []*StorageQueryInfo                  `protobuf:"bytes,2,rep,name=storage_query_infos,json=storageQueryInfos,proto3" json:"storage_query_infos,omitempty"`
	TransactionInfos  []*TransactionInfo                   `protobuf:"bytes,3,rep,name=transaction_infos,json=transactionInfos,proto3" json:"transaction_infos,omitempty"`
	AppCircuitInfo    *commonproto.AppCircuitInfoWithProof `protobuf:"bytes,4,opt,name=app_circuit_info,json=appCircuitInfo,proto3" json:"app_circuit_info,omitempty"`
	// Deprecated: Marked as deprecated in brevis/gateway.proto.
	UsePlonky2 bool `protobuf:"varint,5,opt,name=use_plonky2,json=usePlonky2,proto3" json:"use_plonky2,omitempty"`
	// contains filtered or unexported fields
}

func (*Query) Descriptor deprecated

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

Deprecated: Use Query.ProtoReflect.Descriptor instead.

func (*Query) GetAppCircuitInfo

func (x *Query) GetAppCircuitInfo() *commonproto.AppCircuitInfoWithProof

func (*Query) GetReceiptInfos

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

func (*Query) GetStorageQueryInfos

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

func (*Query) GetTransactionInfos

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

func (*Query) GetUsePlonky2 deprecated

func (x *Query) GetUsePlonky2() bool

Deprecated: Marked as deprecated in brevis/gateway.proto.

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) ProtoReflect

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

func (*Query) Reset

func (x *Query) Reset()

func (*Query) String

func (x *Query) String() string

type QueryKey

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

func (*QueryKey) Descriptor deprecated

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

Deprecated: Use QueryKey.ProtoReflect.Descriptor instead.

func (*QueryKey) GetNonce

func (x *QueryKey) GetNonce() uint64

func (*QueryKey) GetQueryHash

func (x *QueryKey) GetQueryHash() string

func (*QueryKey) ProtoMessage

func (*QueryKey) ProtoMessage()

func (*QueryKey) ProtoReflect

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

func (*QueryKey) Reset

func (x *QueryKey) Reset()

func (*QueryKey) String

func (x *QueryKey) String() string

type QueryOption

type QueryOption int32
const (
	QueryOption_ZK_MODE QueryOption = 0
	QueryOption_OP_MODE QueryOption = 1
)

func (QueryOption) Descriptor

func (QueryOption) Enum

func (x QueryOption) Enum() *QueryOption

func (QueryOption) EnumDescriptor deprecated

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

Deprecated: Use QueryOption.Descriptor instead.

func (QueryOption) Number

func (x QueryOption) Number() protoreflect.EnumNumber

func (QueryOption) String

func (x QueryOption) String() string

func (QueryOption) Type

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
	QueryStatus_QS_OP_MESSAGE_PENDING           QueryStatus = 6
	QueryStatus_QS_OP_MESSAGE_READY             QueryStatus = 7
	QueryStatus_QS_OP_SUBMITTED                 QueryStatus = 8
	QueryStatus_QS_OP_MESSAGE_SUBMISSION_FAILED QueryStatus = 9
	QueryStatus_QS_OP_DISPUTING                 QueryStatus = 10
	QueryStatus_QS_OP_ASK_FOR_QUERY_DATA        QueryStatus = 11
	QueryStatus_QS_OP_QUERY_DATA_SUBMITTED      QueryStatus = 12
	QueryStatus_QS_OP_QUERY_DATA_POST_FAILED    QueryStatus = 13
	QueryStatus_QS_OP_ASK_FOR_QUERY_PROOF       QueryStatus = 14
	QueryStatus_QS_OP_DISPUTED                  QueryStatus = 15
	QueryStatus_QS_OP_ATTESTED                  QueryStatus = 16
	QueryStatus_QS_REFUNDED                     QueryStatus = 17
)

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 SendBatchQueriesRequest

type SendBatchQueriesRequest struct {
	ChainId       uint64      `protobuf:"varint,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	Queries       []*Query    `protobuf:"bytes,2,rep,name=queries,proto3" json:"queries,omitempty"`
	TargetChainId uint64      `protobuf:"varint,3,opt,name=target_chain_id,json=targetChainId,proto3" json:"target_chain_id,omitempty"`
	Option        QueryOption `protobuf:"varint,4,opt,name=option,proto3,enum=brevis.QueryOption" json:"option,omitempty"`
	ApiKey        string      `protobuf:"bytes,5,opt,name=api_key,json=apiKey,proto3" json:"api_key,omitempty"` // authentication
	// contains filtered or unexported fields
}

func (*SendBatchQueriesRequest) Descriptor deprecated

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

Deprecated: Use SendBatchQueriesRequest.ProtoReflect.Descriptor instead.

func (*SendBatchQueriesRequest) GetApiKey

func (x *SendBatchQueriesRequest) GetApiKey() string

func (*SendBatchQueriesRequest) GetChainId

func (x *SendBatchQueriesRequest) GetChainId() uint64

func (*SendBatchQueriesRequest) GetOption

func (x *SendBatchQueriesRequest) GetOption() QueryOption

func (*SendBatchQueriesRequest) GetQueries

func (x *SendBatchQueriesRequest) GetQueries() []*Query

func (*SendBatchQueriesRequest) GetTargetChainId

func (x *SendBatchQueriesRequest) GetTargetChainId() uint64

func (*SendBatchQueriesRequest) ProtoMessage

func (*SendBatchQueriesRequest) ProtoMessage()

func (*SendBatchQueriesRequest) ProtoReflect

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

func (*SendBatchQueriesRequest) Reset

func (x *SendBatchQueriesRequest) Reset()

func (*SendBatchQueriesRequest) String

func (x *SendBatchQueriesRequest) String() string

type SendBatchQueriesResponse

type SendBatchQueriesResponse struct {
	Err       *ErrMsg     `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"`
	QueryKeys []*QueryKey `protobuf:"bytes,2,rep,name=query_keys,json=queryKeys,proto3" json:"query_keys,omitempty"`
	Fee       string      `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee,omitempty"`
	// contains filtered or unexported fields
}

func (*SendBatchQueriesResponse) Descriptor deprecated

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

Deprecated: Use SendBatchQueriesResponse.ProtoReflect.Descriptor instead.

func (*SendBatchQueriesResponse) GetErr

func (x *SendBatchQueriesResponse) GetErr() *ErrMsg

func (*SendBatchQueriesResponse) GetFee

func (x *SendBatchQueriesResponse) GetFee() string

func (*SendBatchQueriesResponse) GetQueryKeys

func (x *SendBatchQueriesResponse) GetQueryKeys() []*QueryKey

func (*SendBatchQueriesResponse) ProtoMessage

func (*SendBatchQueriesResponse) ProtoMessage()

func (*SendBatchQueriesResponse) ProtoReflect

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

func (*SendBatchQueriesResponse) Reset

func (x *SendBatchQueriesResponse) Reset()

func (*SendBatchQueriesResponse) String

func (x *SendBatchQueriesResponse) 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 {
	QueryKey      *QueryKey `protobuf:"bytes,1,opt,name=query_key,json=queryKey,proto3" json:"query_key,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) GetQueryKey

func (x *SubmitAppCircuitProofRequest) GetQueryKey() *QueryKey

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 should be embedded to have forward compatible implementations.

func (UnimplementedGatewayServer) GetQueryStatus

func (UnimplementedGatewayServer) PrepareQuery

func (UnimplementedGatewayServer) SendBatchQueries

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