Documentation ¶
Overview ¶
Package sdk is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterProverHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProverHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProverClient) error
- func RegisterProverHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProverHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProverServer) error
- func RegisterProverServer(s grpc.ServiceRegistrar, srv ProverServer)
- type CustomInput
- type Err
- type ErrCode
- type Field
- func (*Field) Descriptor() ([]byte, []int)deprecated
- func (x *Field) GetContract() string
- func (x *Field) GetEventId() string
- func (x *Field) GetFieldIndex() uint32
- func (x *Field) GetIsTopic() bool
- func (x *Field) GetLogPos() uint32
- func (x *Field) GetValue() string
- func (*Field) ProtoMessage()
- func (x *Field) ProtoReflect() protoreflect.Message
- func (x *Field) Reset()
- func (x *Field) String() string
- type GetProofRequest
- type GetProofResponse
- func (*GetProofResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetProofResponse) GetErr() *Err
- func (x *GetProofResponse) GetProof() string
- func (*GetProofResponse) ProtoMessage()
- func (x *GetProofResponse) ProtoReflect() protoreflect.Message
- func (x *GetProofResponse) Reset()
- func (x *GetProofResponse) String() string
- type IndexedReceipt
- func (*IndexedReceipt) Descriptor() ([]byte, []int)deprecated
- func (x *IndexedReceipt) GetData() *ReceiptData
- func (x *IndexedReceipt) GetIndex() uint32
- func (*IndexedReceipt) ProtoMessage()
- func (x *IndexedReceipt) ProtoReflect() protoreflect.Message
- func (x *IndexedReceipt) Reset()
- func (x *IndexedReceipt) String() string
- type IndexedStorage
- func (*IndexedStorage) Descriptor() ([]byte, []int)deprecated
- func (x *IndexedStorage) GetData() *StorageData
- func (x *IndexedStorage) GetIndex() uint32
- func (*IndexedStorage) ProtoMessage()
- func (x *IndexedStorage) ProtoReflect() protoreflect.Message
- func (x *IndexedStorage) Reset()
- func (x *IndexedStorage) String() string
- type IndexedTransaction
- func (*IndexedTransaction) Descriptor() ([]byte, []int)deprecated
- func (x *IndexedTransaction) GetData() *TransactionData
- func (x *IndexedTransaction) GetIndex() uint32
- func (*IndexedTransaction) ProtoMessage()
- func (x *IndexedTransaction) ProtoReflect() protoreflect.Message
- func (x *IndexedTransaction) Reset()
- func (x *IndexedTransaction) String() string
- type Proof
- type ProveAsyncResponse
- func (*ProveAsyncResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProveAsyncResponse) GetCircuitInfo() *commonproto.AppCircuitInfo
- func (x *ProveAsyncResponse) GetErr() *Err
- func (x *ProveAsyncResponse) GetProofId() string
- func (*ProveAsyncResponse) ProtoMessage()
- func (x *ProveAsyncResponse) ProtoReflect() protoreflect.Message
- func (x *ProveAsyncResponse) Reset()
- func (x *ProveAsyncResponse) String() string
- type ProveRequest
- func (*ProveRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProveRequest) GetCustomInput() *CustomInput
- func (x *ProveRequest) GetReceipts() []*IndexedReceipt
- func (x *ProveRequest) GetSrcChainId() uint64
- func (x *ProveRequest) GetStorages() []*IndexedStorage
- func (x *ProveRequest) GetTransactions() []*IndexedTransaction
- func (*ProveRequest) ProtoMessage()
- func (x *ProveRequest) ProtoReflect() protoreflect.Message
- func (x *ProveRequest) Reset()
- func (x *ProveRequest) String() string
- type ProveResponse
- func (*ProveResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProveResponse) GetCircuitInfo() *commonproto.AppCircuitInfo
- func (x *ProveResponse) GetErr() *Err
- func (x *ProveResponse) GetProof() string
- func (*ProveResponse) ProtoMessage()
- func (x *ProveResponse) ProtoReflect() protoreflect.Message
- func (x *ProveResponse) Reset()
- func (x *ProveResponse) String() string
- type ProverClient
- type ProverServer
- type ReceiptData
- func (*ReceiptData) Descriptor() ([]byte, []int)deprecated
- func (x *ReceiptData) GetBlockNum() uint64
- func (x *ReceiptData) GetFields() []*Field
- func (x *ReceiptData) GetTxHash() string
- func (*ReceiptData) ProtoMessage()
- func (x *ReceiptData) ProtoReflect() protoreflect.Message
- func (x *ReceiptData) Reset()
- func (x *ReceiptData) String() string
- type StorageData
- func (*StorageData) Descriptor() ([]byte, []int)deprecated
- func (x *StorageData) GetAddress() string
- func (x *StorageData) GetBlockNum() uint64
- func (x *StorageData) GetSlot() string
- func (x *StorageData) GetValue() string
- func (*StorageData) ProtoMessage()
- func (x *StorageData) ProtoReflect() protoreflect.Message
- func (x *StorageData) Reset()
- func (x *StorageData) String() string
- type TransactionData
- func (*TransactionData) Descriptor() ([]byte, []int)deprecated
- func (x *TransactionData) GetBlockNum() uint64
- func (x *TransactionData) GetChainId() uint64
- func (x *TransactionData) GetFrom() string
- func (x *TransactionData) GetGasFeeCap() string
- func (x *TransactionData) GetGasLimit() uint64
- func (x *TransactionData) GetGasTipCapOrGasPrice() string
- func (x *TransactionData) GetHash() string
- func (x *TransactionData) GetNonce() uint64
- func (x *TransactionData) GetTo() string
- func (x *TransactionData) GetValue() string
- func (*TransactionData) ProtoMessage()
- func (x *TransactionData) ProtoReflect() protoreflect.Message
- func (x *TransactionData) Reset()
- func (x *TransactionData) String() string
- type UnimplementedProverServer
- func (UnimplementedProverServer) GetProof(context.Context, *GetProofRequest) (*GetProofResponse, error)
- func (UnimplementedProverServer) Prove(context.Context, *ProveRequest) (*ProveResponse, error)
- func (UnimplementedProverServer) ProveAsync(context.Context, *ProveRequest) (*ProveAsyncResponse, error)
- type UnsafeProverServer
Constants ¶
const ( Prover_Prove_FullMethodName = "/sdk.Prover/Prove" Prover_ProveAsync_FullMethodName = "/sdk.Prover/ProveAsync" Prover_GetProof_FullMethodName = "/sdk.Prover/GetProof" )
Variables ¶
var ( ErrCode_name = map[int32]string{ 0: "ERROR_UNDEFINED", 1: "ERROR_DEFAULT", 2: "ERROR_INVALID_INPUT", 3: "ERROR_INVALID_CUSTOM_INPUT", 4: "ERROR_FAILED_TO_PROVE", } ErrCode_value = map[string]int32{ "ERROR_UNDEFINED": 0, "ERROR_DEFAULT": 1, "ERROR_INVALID_INPUT": 2, "ERROR_INVALID_CUSTOM_INPUT": 3, "ERROR_FAILED_TO_PROVE": 4, } )
Enum value maps for ErrCode.
var File_sdk_prover_proto protoreflect.FileDescriptor
var File_sdk_types_proto protoreflect.FileDescriptor
var Prover_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sdk.Prover", HandlerType: (*ProverServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Prove", Handler: _Prover_Prove_Handler, }, { MethodName: "ProveAsync", Handler: _Prover_ProveAsync_Handler, }, { MethodName: "GetProof", Handler: _Prover_GetProof_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sdk/prover.proto", }
Prover_ServiceDesc is the grpc.ServiceDesc for Prover service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProverHandler ¶
RegisterProverHandler registers the http handlers for service Prover to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProverHandlerClient ¶
func RegisterProverHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProverClient) error
RegisterProverHandlerClient registers the http handlers for service Prover to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProverClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProverClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProverClient" to call the correct interceptors.
func RegisterProverHandlerFromEndpoint ¶
func RegisterProverHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProverHandlerFromEndpoint is same as RegisterProverHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProverHandlerServer ¶
func RegisterProverHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProverServer) error
RegisterProverHandlerServer registers the http handlers for service Prover to "mux". UnaryRPC :call ProverServer 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 RegisterProverHandlerFromEndpoint instead.
func RegisterProverServer ¶
func RegisterProverServer(s grpc.ServiceRegistrar, srv ProverServer)
Types ¶
type CustomInput ¶
type CustomInput struct { JsonBytes string `protobuf:"bytes,1,opt,name=json_bytes,json=jsonBytes,proto3" json:"json_bytes,omitempty"` // contains filtered or unexported fields }
func (*CustomInput) Descriptor
deprecated
func (*CustomInput) Descriptor() ([]byte, []int)
Deprecated: Use CustomInput.ProtoReflect.Descriptor instead.
func (*CustomInput) GetJsonBytes ¶
func (x *CustomInput) GetJsonBytes() string
func (*CustomInput) ProtoMessage ¶
func (*CustomInput) ProtoMessage()
func (*CustomInput) ProtoReflect ¶
func (x *CustomInput) ProtoReflect() protoreflect.Message
func (*CustomInput) Reset ¶
func (x *CustomInput) Reset()
func (*CustomInput) String ¶
func (x *CustomInput) String() string
type Err ¶
type Err struct { Code ErrCode `protobuf:"varint,1,opt,name=code,proto3,enum=sdk.ErrCode" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` // contains filtered or unexported fields }
func (*Err) Descriptor
deprecated
func (*Err) ProtoMessage ¶
func (*Err) ProtoMessage()
func (*Err) ProtoReflect ¶
func (x *Err) ProtoReflect() protoreflect.Message
type ErrCode ¶
type ErrCode int32
func (ErrCode) Descriptor ¶
func (ErrCode) Descriptor() protoreflect.EnumDescriptor
func (ErrCode) EnumDescriptor
deprecated
func (ErrCode) Number ¶
func (x ErrCode) Number() protoreflect.EnumNumber
func (ErrCode) Type ¶
func (ErrCode) Type() protoreflect.EnumType
type Field ¶
type Field struct { // address. the contract which emitted the log Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"` // the index of the log in the transaction receipt, starting from 0. LogPos uint32 `protobuf:"varint,2,opt,name=log_pos,json=logPos,proto3" json:"log_pos,omitempty"` // the event id (aka topic[0]) of the log EventId string `protobuf:"bytes,3,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"` // the value of the field we want to prove Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` // true if the field is a topic, false if the field is in log data IsTopic bool `protobuf:"varint,5,opt,name=is_topic,json=isTopic,proto3" json:"is_topic,omitempty"` // the index of the field in the log FieldIndex uint32 `protobuf:"varint,6,opt,name=field_index,json=fieldIndex,proto3" json:"field_index,omitempty"` // contains filtered or unexported fields }
Field represents a field in an EVM log that we want the validity to be proven by Brevis
func (*Field) Descriptor
deprecated
func (*Field) GetContract ¶
func (*Field) GetEventId ¶
func (*Field) GetFieldIndex ¶
func (*Field) GetIsTopic ¶
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
func (*Field) ProtoReflect ¶
func (x *Field) ProtoReflect() protoreflect.Message
type GetProofRequest ¶
type GetProofRequest struct { ProofId string `protobuf:"bytes,1,opt,name=proof_id,json=proofId,proto3" json:"proof_id,omitempty"` // contains filtered or unexported fields }
func (*GetProofRequest) Descriptor
deprecated
func (*GetProofRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetProofRequest.ProtoReflect.Descriptor instead.
func (*GetProofRequest) GetProofId ¶
func (x *GetProofRequest) GetProofId() string
func (*GetProofRequest) ProtoMessage ¶
func (*GetProofRequest) ProtoMessage()
func (*GetProofRequest) ProtoReflect ¶
func (x *GetProofRequest) ProtoReflect() protoreflect.Message
func (*GetProofRequest) Reset ¶
func (x *GetProofRequest) Reset()
func (*GetProofRequest) String ¶
func (x *GetProofRequest) String() string
type GetProofResponse ¶
type GetProofResponse struct { // err can be undefined or ERROR_FAILED_TO_PROVE Err *Err `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` // proof is an empty string until proving is finished Proof string `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` // contains filtered or unexported fields }
func (*GetProofResponse) Descriptor
deprecated
func (*GetProofResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetProofResponse.ProtoReflect.Descriptor instead.
func (*GetProofResponse) GetErr ¶
func (x *GetProofResponse) GetErr() *Err
func (*GetProofResponse) GetProof ¶
func (x *GetProofResponse) GetProof() string
func (*GetProofResponse) ProtoMessage ¶
func (*GetProofResponse) ProtoMessage()
func (*GetProofResponse) ProtoReflect ¶
func (x *GetProofResponse) ProtoReflect() protoreflect.Message
func (*GetProofResponse) Reset ¶
func (x *GetProofResponse) Reset()
func (*GetProofResponse) String ¶
func (x *GetProofResponse) String() string
type IndexedReceipt ¶
type IndexedReceipt struct { Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` Data *ReceiptData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*IndexedReceipt) Descriptor
deprecated
func (*IndexedReceipt) Descriptor() ([]byte, []int)
Deprecated: Use IndexedReceipt.ProtoReflect.Descriptor instead.
func (*IndexedReceipt) GetData ¶
func (x *IndexedReceipt) GetData() *ReceiptData
func (*IndexedReceipt) GetIndex ¶
func (x *IndexedReceipt) GetIndex() uint32
func (*IndexedReceipt) ProtoMessage ¶
func (*IndexedReceipt) ProtoMessage()
func (*IndexedReceipt) ProtoReflect ¶
func (x *IndexedReceipt) ProtoReflect() protoreflect.Message
func (*IndexedReceipt) Reset ¶
func (x *IndexedReceipt) Reset()
func (*IndexedReceipt) String ¶
func (x *IndexedReceipt) String() string
type IndexedStorage ¶
type IndexedStorage struct { Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` Data *StorageData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*IndexedStorage) Descriptor
deprecated
func (*IndexedStorage) Descriptor() ([]byte, []int)
Deprecated: Use IndexedStorage.ProtoReflect.Descriptor instead.
func (*IndexedStorage) GetData ¶
func (x *IndexedStorage) GetData() *StorageData
func (*IndexedStorage) GetIndex ¶
func (x *IndexedStorage) GetIndex() uint32
func (*IndexedStorage) ProtoMessage ¶
func (*IndexedStorage) ProtoMessage()
func (*IndexedStorage) ProtoReflect ¶
func (x *IndexedStorage) ProtoReflect() protoreflect.Message
func (*IndexedStorage) Reset ¶
func (x *IndexedStorage) Reset()
func (*IndexedStorage) String ¶
func (x *IndexedStorage) String() string
type IndexedTransaction ¶
type IndexedTransaction struct { Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` Data *TransactionData `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // contains filtered or unexported fields }
func (*IndexedTransaction) Descriptor
deprecated
func (*IndexedTransaction) Descriptor() ([]byte, []int)
Deprecated: Use IndexedTransaction.ProtoReflect.Descriptor instead.
func (*IndexedTransaction) GetData ¶
func (x *IndexedTransaction) GetData() *TransactionData
func (*IndexedTransaction) GetIndex ¶
func (x *IndexedTransaction) GetIndex() uint32
func (*IndexedTransaction) ProtoMessage ¶
func (*IndexedTransaction) ProtoMessage()
func (*IndexedTransaction) ProtoReflect ¶
func (x *IndexedTransaction) ProtoReflect() protoreflect.Message
func (*IndexedTransaction) Reset ¶
func (x *IndexedTransaction) Reset()
func (*IndexedTransaction) String ¶
func (x *IndexedTransaction) String() string
type Proof ¶
type Proof struct { Proof string `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"` CircuitInfo *commonproto.AppCircuitInfo `protobuf:"bytes,2,opt,name=circuit_info,json=circuitInfo,proto3" json:"circuit_info,omitempty"` // contains filtered or unexported fields }
func (*Proof) Descriptor
deprecated
func (*Proof) GetCircuitInfo ¶
func (x *Proof) GetCircuitInfo() *commonproto.AppCircuitInfo
func (*Proof) ProtoMessage ¶
func (*Proof) ProtoMessage()
func (*Proof) ProtoReflect ¶
func (x *Proof) ProtoReflect() protoreflect.Message
type ProveAsyncResponse ¶
type ProveAsyncResponse struct { Err *Err `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` ProofId string `protobuf:"bytes,2,opt,name=proof_id,json=proofId,proto3" json:"proof_id,omitempty"` CircuitInfo *commonproto.AppCircuitInfo `protobuf:"bytes,3,opt,name=circuit_info,json=circuitInfo,proto3" json:"circuit_info,omitempty"` // contains filtered or unexported fields }
func (*ProveAsyncResponse) Descriptor
deprecated
func (*ProveAsyncResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProveAsyncResponse.ProtoReflect.Descriptor instead.
func (*ProveAsyncResponse) GetCircuitInfo ¶
func (x *ProveAsyncResponse) GetCircuitInfo() *commonproto.AppCircuitInfo
func (*ProveAsyncResponse) GetErr ¶
func (x *ProveAsyncResponse) GetErr() *Err
func (*ProveAsyncResponse) GetProofId ¶
func (x *ProveAsyncResponse) GetProofId() string
func (*ProveAsyncResponse) ProtoMessage ¶
func (*ProveAsyncResponse) ProtoMessage()
func (*ProveAsyncResponse) ProtoReflect ¶
func (x *ProveAsyncResponse) ProtoReflect() protoreflect.Message
func (*ProveAsyncResponse) Reset ¶
func (x *ProveAsyncResponse) Reset()
func (*ProveAsyncResponse) String ¶
func (x *ProveAsyncResponse) String() string
type ProveRequest ¶
type ProveRequest struct { Receipts []*IndexedReceipt `protobuf:"bytes,1,rep,name=receipts,proto3" json:"receipts,omitempty"` Storages []*IndexedStorage `protobuf:"bytes,2,rep,name=storages,proto3" json:"storages,omitempty"` Transactions []*IndexedTransaction `protobuf:"bytes,3,rep,name=transactions,proto3" json:"transactions,omitempty"` CustomInput *CustomInput `protobuf:"bytes,4,opt,name=custom_input,json=customInput,proto3" json:"custom_input,omitempty"` SrcChainId uint64 `protobuf:"varint,5,opt,name=src_chain_id,json=srcChainId,proto3" json:"src_chain_id,omitempty"` // contains filtered or unexported fields }
func (*ProveRequest) Descriptor
deprecated
func (*ProveRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProveRequest.ProtoReflect.Descriptor instead.
func (*ProveRequest) GetCustomInput ¶
func (x *ProveRequest) GetCustomInput() *CustomInput
func (*ProveRequest) GetReceipts ¶
func (x *ProveRequest) GetReceipts() []*IndexedReceipt
func (*ProveRequest) GetSrcChainId ¶
func (x *ProveRequest) GetSrcChainId() uint64
func (*ProveRequest) GetStorages ¶
func (x *ProveRequest) GetStorages() []*IndexedStorage
func (*ProveRequest) GetTransactions ¶
func (x *ProveRequest) GetTransactions() []*IndexedTransaction
func (*ProveRequest) ProtoMessage ¶
func (*ProveRequest) ProtoMessage()
func (*ProveRequest) ProtoReflect ¶
func (x *ProveRequest) ProtoReflect() protoreflect.Message
func (*ProveRequest) Reset ¶
func (x *ProveRequest) Reset()
func (*ProveRequest) String ¶
func (x *ProveRequest) String() string
type ProveResponse ¶
type ProveResponse struct { Err *Err `protobuf:"bytes,1,opt,name=err,proto3" json:"err,omitempty"` Proof string `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"` CircuitInfo *commonproto.AppCircuitInfo `protobuf:"bytes,3,opt,name=circuit_info,json=circuitInfo,proto3" json:"circuit_info,omitempty"` // contains filtered or unexported fields }
func (*ProveResponse) Descriptor
deprecated
func (*ProveResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProveResponse.ProtoReflect.Descriptor instead.
func (*ProveResponse) GetCircuitInfo ¶
func (x *ProveResponse) GetCircuitInfo() *commonproto.AppCircuitInfo
func (*ProveResponse) GetErr ¶
func (x *ProveResponse) GetErr() *Err
func (*ProveResponse) GetProof ¶
func (x *ProveResponse) GetProof() string
func (*ProveResponse) ProtoMessage ¶
func (*ProveResponse) ProtoMessage()
func (*ProveResponse) ProtoReflect ¶
func (x *ProveResponse) ProtoReflect() protoreflect.Message
func (*ProveResponse) Reset ¶
func (x *ProveResponse) Reset()
func (*ProveResponse) String ¶
func (x *ProveResponse) String() string
type ProverClient ¶
type ProverClient interface { // Generates a proof with the given data and custom input assignments Prove(ctx context.Context, in *ProveRequest, opts ...grpc.CallOption) (*ProveResponse, error) ProveAsync(ctx context.Context, in *ProveRequest, opts ...grpc.CallOption) (*ProveAsyncResponse, error) GetProof(ctx context.Context, in *GetProofRequest, opts ...grpc.CallOption) (*GetProofResponse, error) }
ProverClient is the client API for Prover 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 NewProverClient ¶
func NewProverClient(cc grpc.ClientConnInterface) ProverClient
type ProverServer ¶
type ProverServer interface { // Generates a proof with the given data and custom input assignments Prove(context.Context, *ProveRequest) (*ProveResponse, error) ProveAsync(context.Context, *ProveRequest) (*ProveAsyncResponse, error) GetProof(context.Context, *GetProofRequest) (*GetProofResponse, error) }
ProverServer is the server API for Prover service. All implementations should embed UnimplementedProverServer for forward compatibility
type ReceiptData ¶
type ReceiptData struct { BlockNum uint64 `protobuf:"varint,1,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` // hex encoded tx hash TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // must at least contain one field Fields []*Field `protobuf:"bytes,3,rep,name=fields,proto3" json:"fields,omitempty"` // contains filtered or unexported fields }
ReceiptData is a request for proof for some data under an EVM receipt
func (*ReceiptData) Descriptor
deprecated
func (*ReceiptData) Descriptor() ([]byte, []int)
Deprecated: Use ReceiptData.ProtoReflect.Descriptor instead.
func (*ReceiptData) GetBlockNum ¶
func (x *ReceiptData) GetBlockNum() uint64
func (*ReceiptData) GetFields ¶
func (x *ReceiptData) GetFields() []*Field
func (*ReceiptData) GetTxHash ¶
func (x *ReceiptData) GetTxHash() string
func (*ReceiptData) ProtoMessage ¶
func (*ReceiptData) ProtoMessage()
func (*ReceiptData) ProtoReflect ¶
func (x *ReceiptData) ProtoReflect() protoreflect.Message
func (*ReceiptData) Reset ¶
func (x *ReceiptData) Reset()
func (*ReceiptData) String ¶
func (x *ReceiptData) String() string
type StorageData ¶
type StorageData struct { // from which block to fetch the storage value BlockNum uint64 `protobuf:"varint,1,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` // hex encoded address of the account Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // the hex encoded "slot" of a storage. // see https://docs.soliditylang.org/en/latest/internals/layout_in_storage.html Slot string `protobuf:"bytes,3,opt,name=slot,proto3" json:"slot,omitempty"` // the value stored in the storage slot. decoding is based on Go's big.Int SetString. // must not exceed 32 bytes Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
StorageData is a request for proof for some data in an EVM storage slot
func (*StorageData) Descriptor
deprecated
func (*StorageData) Descriptor() ([]byte, []int)
Deprecated: Use StorageData.ProtoReflect.Descriptor instead.
func (*StorageData) GetAddress ¶
func (x *StorageData) GetAddress() string
func (*StorageData) GetBlockNum ¶
func (x *StorageData) GetBlockNum() uint64
func (*StorageData) GetSlot ¶
func (x *StorageData) GetSlot() string
func (*StorageData) GetValue ¶
func (x *StorageData) GetValue() string
func (*StorageData) ProtoMessage ¶
func (*StorageData) ProtoMessage()
func (*StorageData) ProtoReflect ¶
func (x *StorageData) ProtoReflect() protoreflect.Message
func (*StorageData) Reset ¶
func (x *StorageData) Reset()
func (*StorageData) String ¶
func (x *StorageData) String() string
type TransactionData ¶
type TransactionData struct { // hex encoded tx hash Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` ChainId uint64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` BlockNum uint64 `protobuf:"varint,3,opt,name=block_num,json=blockNum,proto3" json:"block_num,omitempty"` Nonce uint64 `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty"` // this field represents `GasPrice` for legacy tx (type 0) and `GasTipCap` for dynamic fee tx (type 2) GasTipCapOrGasPrice string `` /* 126-byte string literal not displayed */ // this field is ignored for legacy tx (type 0) and represents `GasFeeCap` for dynamic fee tx (type 2) GasFeeCap string `protobuf:"bytes,6,opt,name=gas_fee_cap,json=gasFeeCap,proto3" json:"gas_fee_cap,omitempty"` GasLimit uint64 `protobuf:"varint,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // address From string `protobuf:"bytes,8,opt,name=from,proto3" json:"from,omitempty"` // address To string `protobuf:"bytes,9,opt,name=to,proto3" json:"to,omitempty"` // decoding is based on Go's big.Int SetString. must be less than uint256 max Value string `protobuf:"bytes,10,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
TransactionData is a request for proof for some EVM transaction Only transaction type 0 and 2 are supported
func (*TransactionData) Descriptor
deprecated
func (*TransactionData) Descriptor() ([]byte, []int)
Deprecated: Use TransactionData.ProtoReflect.Descriptor instead.
func (*TransactionData) GetBlockNum ¶
func (x *TransactionData) GetBlockNum() uint64
func (*TransactionData) GetChainId ¶
func (x *TransactionData) GetChainId() uint64
func (*TransactionData) GetFrom ¶
func (x *TransactionData) GetFrom() string
func (*TransactionData) GetGasFeeCap ¶
func (x *TransactionData) GetGasFeeCap() string
func (*TransactionData) GetGasLimit ¶
func (x *TransactionData) GetGasLimit() uint64
func (*TransactionData) GetGasTipCapOrGasPrice ¶
func (x *TransactionData) GetGasTipCapOrGasPrice() string
func (*TransactionData) GetHash ¶
func (x *TransactionData) GetHash() string
func (*TransactionData) GetNonce ¶
func (x *TransactionData) GetNonce() uint64
func (*TransactionData) GetTo ¶
func (x *TransactionData) GetTo() string
func (*TransactionData) GetValue ¶
func (x *TransactionData) GetValue() string
func (*TransactionData) ProtoMessage ¶
func (*TransactionData) ProtoMessage()
func (*TransactionData) ProtoReflect ¶
func (x *TransactionData) ProtoReflect() protoreflect.Message
func (*TransactionData) Reset ¶
func (x *TransactionData) Reset()
func (*TransactionData) String ¶
func (x *TransactionData) String() string
type UnimplementedProverServer ¶
type UnimplementedProverServer struct { }
UnimplementedProverServer should be embedded to have forward compatible implementations.
func (UnimplementedProverServer) GetProof ¶
func (UnimplementedProverServer) GetProof(context.Context, *GetProofRequest) (*GetProofResponse, error)
func (UnimplementedProverServer) Prove ¶
func (UnimplementedProverServer) Prove(context.Context, *ProveRequest) (*ProveResponse, error)
func (UnimplementedProverServer) ProveAsync ¶
func (UnimplementedProverServer) ProveAsync(context.Context, *ProveRequest) (*ProveAsyncResponse, error)
type UnsafeProverServer ¶
type UnsafeProverServer interface {
// contains filtered or unexported methods
}
UnsafeProverServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProverServer will result in compilation errors.