Documentation ¶
Index ¶
- Variables
- func GetBlockNumberString(anchorType string, blockTime, blockTimeNano, blockNumber uint64) string
- func RegisterAnchorServiceServer(s *grpc.Server, srv AnchorServiceServer)
- type Anchor
- func (*Anchor) Descriptor() ([]byte, []int)
- func (m *Anchor) GetError() string
- func (m *Anchor) GetStatus() Anchor_Status
- func (m *Anchor) GetSupportedFormats() []Proof_Format
- func (m *Anchor) GetType() Anchor_Type
- func (*Anchor) ProtoMessage()
- func (m *Anchor) Reset()
- func (m *Anchor) String() string
- func (m *Anchor) XXX_DiscardUnknown()
- func (m *Anchor) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Anchor) XXX_Merge(src proto.Message)
- func (m *Anchor) XXX_Size() int
- func (m *Anchor) XXX_Unmarshal(b []byte) error
- type AnchorRequest
- func (*AnchorRequest) Descriptor() ([]byte, []int)
- func (m *AnchorRequest) GetType() Anchor_Type
- func (*AnchorRequest) ProtoMessage()
- func (m *AnchorRequest) Reset()
- func (m *AnchorRequest) String() string
- func (m *AnchorRequest) XXX_DiscardUnknown()
- func (m *AnchorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *AnchorRequest) XXX_Merge(src proto.Message)
- func (m *AnchorRequest) XXX_Size() int
- func (m *AnchorRequest) XXX_Unmarshal(b []byte) error
- type AnchorServiceClient
- type AnchorServiceServer
- type AnchorService_GetAnchorsClient
- type AnchorService_GetAnchorsServer
- type AnchorService_SubscribeBatchesClient
- type AnchorService_SubscribeBatchesServer
- type Anchor_Status
- type Anchor_Type
- type Batch
- func (*Batch) Descriptor() ([]byte, []int)
- func (m *Batch) GetAnchorType() Anchor_Type
- func (m *Batch) GetCreatedAt() *timestamp.Timestamp
- func (m *Batch) GetData() string
- func (m *Batch) GetError() string
- func (m *Batch) GetFinalizedAt() *timestamp.Timestamp
- func (m *Batch) GetFlushedAt() *timestamp.Timestamp
- func (m *Batch) GetHash() string
- func (m *Batch) GetId() string
- func (m *Batch) GetProofFormat() Proof_Format
- func (m *Batch) GetSize() int64
- func (m *Batch) GetStartedAt() *timestamp.Timestamp
- func (m *Batch) GetStatus() Batch_Status
- func (m *Batch) GetSubmittedAt() *timestamp.Timestamp
- func (*Batch) ProtoMessage()
- func (m *Batch) Reset()
- func (m *Batch) String() string
- func (m *Batch) XXX_DiscardUnknown()
- func (m *Batch) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Batch) XXX_Merge(src proto.Message)
- func (m *Batch) XXX_Size() int
- func (m *Batch) XXX_Unmarshal(b []byte) error
- type BatchRequest
- func (*BatchRequest) Descriptor() ([]byte, []int)
- func (m *BatchRequest) GetAnchorType() Anchor_Type
- func (m *BatchRequest) GetBatchId() string
- func (*BatchRequest) ProtoMessage()
- func (m *BatchRequest) Reset()
- func (m *BatchRequest) String() string
- func (m *BatchRequest) XXX_DiscardUnknown()
- func (m *BatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *BatchRequest) XXX_Merge(src proto.Message)
- func (m *BatchRequest) XXX_Size() int
- func (m *BatchRequest) XXX_Unmarshal(b []byte) error
- type Batch_Status
- type Proof
- func (*Proof) Descriptor() ([]byte, []int)
- func (m *Proof) GetAnchorType() Anchor_Type
- func (m *Proof) GetBatch() *Batch
- func (m *Proof) GetBatchId() string
- func (m *Proof) GetBatchStatus() Batch_Status
- func (m *Proof) GetData() string
- func (m *Proof) GetFormat() Proof_Format
- func (m *Proof) GetHash() string
- func (*Proof) ProtoMessage()
- func (m *Proof) Reset()
- func (m *Proof) String() string
- func (m *Proof) XXX_DiscardUnknown()
- func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Proof) XXX_Merge(src proto.Message)
- func (m *Proof) XXX_Size() int
- func (m *Proof) XXX_Unmarshal(b []byte) error
- type ProofRequest
- func (*ProofRequest) Descriptor() ([]byte, []int)
- func (m *ProofRequest) GetAnchorType() Anchor_Type
- func (m *ProofRequest) GetBatchId() string
- func (m *ProofRequest) GetHash() string
- func (m *ProofRequest) GetWithBatch() bool
- func (*ProofRequest) ProtoMessage()
- func (m *ProofRequest) Reset()
- func (m *ProofRequest) String() string
- func (m *ProofRequest) XXX_DiscardUnknown()
- func (m *ProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ProofRequest) XXX_Merge(src proto.Message)
- func (m *ProofRequest) XXX_Size() int
- func (m *ProofRequest) XXX_Unmarshal(b []byte) error
- type Proof_Format
- type SubmitProofRequest
- func (*SubmitProofRequest) Descriptor() ([]byte, []int)
- func (m *SubmitProofRequest) GetAnchorType() Anchor_Type
- func (m *SubmitProofRequest) GetFormat() Proof_Format
- func (m *SubmitProofRequest) GetHash() string
- func (m *SubmitProofRequest) GetSkipBatching() bool
- func (m *SubmitProofRequest) GetWithBatch() bool
- func (*SubmitProofRequest) ProtoMessage()
- func (m *SubmitProofRequest) Reset()
- func (m *SubmitProofRequest) String() string
- func (m *SubmitProofRequest) XXX_DiscardUnknown()
- func (m *SubmitProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SubmitProofRequest) XXX_Merge(src proto.Message)
- func (m *SubmitProofRequest) XXX_Size() int
- func (m *SubmitProofRequest) XXX_Unmarshal(b []byte) error
- type SubscribeBatchesRequest
- func (*SubscribeBatchesRequest) Descriptor() ([]byte, []int)
- func (m *SubscribeBatchesRequest) GetFilter() *BatchRequest
- func (*SubscribeBatchesRequest) ProtoMessage()
- func (m *SubscribeBatchesRequest) Reset()
- func (m *SubscribeBatchesRequest) String() string
- func (m *SubscribeBatchesRequest) XXX_DiscardUnknown()
- func (m *SubscribeBatchesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *SubscribeBatchesRequest) XXX_Merge(src proto.Message)
- func (m *SubscribeBatchesRequest) XXX_Size() int
- func (m *SubscribeBatchesRequest) XXX_Unmarshal(b []byte) error
- type VerifyProofReply
- func (*VerifyProofReply) Descriptor() ([]byte, []int)
- func (m *VerifyProofReply) GetError() string
- func (m *VerifyProofReply) GetProvenHash() string
- func (m *VerifyProofReply) GetVerified() bool
- func (*VerifyProofReply) ProtoMessage()
- func (m *VerifyProofReply) Reset()
- func (m *VerifyProofReply) String() string
- func (m *VerifyProofReply) XXX_DiscardUnknown()
- func (m *VerifyProofReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *VerifyProofReply) XXX_Merge(src proto.Message)
- func (m *VerifyProofReply) XXX_Size() int
- func (m *VerifyProofReply) XXX_Unmarshal(b []byte) error
- type VerifyProofRequest
- func (*VerifyProofRequest) Descriptor() ([]byte, []int)
- func (m *VerifyProofRequest) GetAnchorType() Anchor_Type
- func (m *VerifyProofRequest) GetData() string
- func (m *VerifyProofRequest) GetFormat() Proof_Format
- func (*VerifyProofRequest) ProtoMessage()
- func (m *VerifyProofRequest) Reset()
- func (m *VerifyProofRequest) String() string
- func (m *VerifyProofRequest) XXX_DiscardUnknown()
- func (m *VerifyProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *VerifyProofRequest) XXX_Merge(src proto.Message)
- func (m *VerifyProofRequest) XXX_Size() int
- func (m *VerifyProofRequest) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var Anchor_Status_name = map[int32]string{
0: "ERROR",
1: "STOPPED",
2: "RUNNING",
}
var Anchor_Status_value = map[string]int32{
"ERROR": 0,
"STOPPED": 1,
"RUNNING": 2,
}
var Anchor_Type_name = map[int32]string{
0: "ETH",
3: "ETH_MAINNET",
4: "ETH_ELASTOS",
9: "ETH_GOCHAIN",
1: "BTC",
5: "BTC_MAINNET",
2: "CHP",
6: "HEDERA",
7: "HEDERA_MAINNET",
8: "HYPERLEDGER",
}
var Anchor_Type_value = map[string]int32{
"ETH": 0,
"ETH_MAINNET": 3,
"ETH_ELASTOS": 4,
"ETH_GOCHAIN": 9,
"BTC": 1,
"BTC_MAINNET": 5,
"CHP": 2,
"HEDERA": 6,
"HEDERA_MAINNET": 7,
"HYPERLEDGER": 8,
}
var Batch_Status_name = map[int32]string{
0: "ERROR",
1: "BATCHING",
2: "QUEUING",
3: "PROCESSING",
4: "PENDING",
5: "CONFIRMED",
}
var Batch_Status_value = map[string]int32{
"ERROR": 0,
"BATCHING": 1,
"QUEUING": 2,
"PROCESSING": 3,
"PENDING": 4,
"CONFIRMED": 5,
}
var Proof_Format_name = map[int32]string{
0: "CHP_PATH",
1: "ETH_TRIE",
2: "CHP_PATH_SIGNED",
3: "ETH_TRIE_SIGNED",
}
var Proof_Format_value = map[string]int32{
"CHP_PATH": 0,
"ETH_TRIE": 1,
"CHP_PATH_SIGNED": 2,
"ETH_TRIE_SIGNED": 3,
}
Functions ¶
func GetBlockNumberString ¶
GetBlockNumberString gets the string representation of the block number concept. For Hedera, it is `blockTime.blockTimeNano`; for the rest, it is `blockNumber`
func RegisterAnchorServiceServer ¶
func RegisterAnchorServiceServer(s *grpc.Server, srv AnchorServiceServer)
Types ¶
type Anchor ¶
type Anchor struct { // Type is the anchor type Type Anchor_Type `protobuf:"varint,1,opt,name=type,proto3,enum=anchor.Anchor_Type" json:"type,omitempty"` // Status is the anchor status Status Anchor_Status `protobuf:"varint,2,opt,name=status,proto3,enum=anchor.Anchor_Status" json:"status,omitempty"` // Error is the error message when the anchor status is ERROR Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // SupportedFormats are the supported proof formats of the anchor SupportedFormats []Proof_Format `` /* 142-byte string literal not displayed */ XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Anchor represents an anchor of a blockchain, through which a hash can be anchored to that blockchain
func (*Anchor) Descriptor ¶
func (*Anchor) GetStatus ¶
func (m *Anchor) GetStatus() Anchor_Status
func (*Anchor) GetSupportedFormats ¶
func (m *Anchor) GetSupportedFormats() []Proof_Format
func (*Anchor) GetType ¶
func (m *Anchor) GetType() Anchor_Type
func (*Anchor) ProtoMessage ¶
func (*Anchor) ProtoMessage()
func (*Anchor) XXX_DiscardUnknown ¶
func (m *Anchor) XXX_DiscardUnknown()
func (*Anchor) XXX_Marshal ¶
func (*Anchor) XXX_Unmarshal ¶
type AnchorRequest ¶
type AnchorRequest struct { // Type is the anchor type Type Anchor_Type `protobuf:"varint,1,opt,name=type,proto3,enum=anchor.Anchor_Type" json:"type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
AnchorRequest represents a request to get information for the given anchor type
func (*AnchorRequest) Descriptor ¶
func (*AnchorRequest) Descriptor() ([]byte, []int)
func (*AnchorRequest) GetType ¶
func (m *AnchorRequest) GetType() Anchor_Type
func (*AnchorRequest) ProtoMessage ¶
func (*AnchorRequest) ProtoMessage()
func (*AnchorRequest) Reset ¶
func (m *AnchorRequest) Reset()
func (*AnchorRequest) String ¶
func (m *AnchorRequest) String() string
func (*AnchorRequest) XXX_DiscardUnknown ¶
func (m *AnchorRequest) XXX_DiscardUnknown()
func (*AnchorRequest) XXX_Marshal ¶
func (m *AnchorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*AnchorRequest) XXX_Merge ¶
func (dst *AnchorRequest) XXX_Merge(src proto.Message)
func (*AnchorRequest) XXX_Size ¶
func (m *AnchorRequest) XXX_Size() int
func (*AnchorRequest) XXX_Unmarshal ¶
func (m *AnchorRequest) XXX_Unmarshal(b []byte) error
type AnchorServiceClient ¶
type AnchorServiceClient interface { // GetAnchors gets all anchors GetAnchors(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (AnchorService_GetAnchorsClient, error) // GetAnchor gets an anchor GetAnchor(ctx context.Context, in *AnchorRequest, opts ...grpc.CallOption) (*Anchor, error) // GetProof gets a proof GetProof(ctx context.Context, in *ProofRequest, opts ...grpc.CallOption) (*Proof, error) // SubmitProof submits a proof for the given hash SubmitProof(ctx context.Context, in *SubmitProofRequest, opts ...grpc.CallOption) (*Proof, error) // VerifyProof verifies the given proof. When the proof is unverifiable, an // exception is thrown VerifyProof(ctx context.Context, in *VerifyProofRequest, opts ...grpc.CallOption) (*VerifyProofReply, error) // GetBatch gets a batch GetBatch(ctx context.Context, in *BatchRequest, opts ...grpc.CallOption) (*Batch, error) // SubscribeBatches subscribes to batch status updates SubscribeBatches(ctx context.Context, in *SubscribeBatchesRequest, opts ...grpc.CallOption) (AnchorService_SubscribeBatchesClient, error) }
AnchorServiceClient is the client API for AnchorService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAnchorServiceClient ¶
func NewAnchorServiceClient(cc *grpc.ClientConn) AnchorServiceClient
type AnchorServiceServer ¶
type AnchorServiceServer interface { // GetAnchors gets all anchors GetAnchors(*empty.Empty, AnchorService_GetAnchorsServer) error // GetAnchor gets an anchor GetAnchor(context.Context, *AnchorRequest) (*Anchor, error) // GetProof gets a proof GetProof(context.Context, *ProofRequest) (*Proof, error) // SubmitProof submits a proof for the given hash SubmitProof(context.Context, *SubmitProofRequest) (*Proof, error) // VerifyProof verifies the given proof. When the proof is unverifiable, an // exception is thrown VerifyProof(context.Context, *VerifyProofRequest) (*VerifyProofReply, error) // GetBatch gets a batch GetBatch(context.Context, *BatchRequest) (*Batch, error) // SubscribeBatches subscribes to batch status updates SubscribeBatches(*SubscribeBatchesRequest, AnchorService_SubscribeBatchesServer) error }
AnchorServiceServer is the server API for AnchorService service.
type AnchorService_GetAnchorsClient ¶
type AnchorService_GetAnchorsClient interface { Recv() (*Anchor, error) grpc.ClientStream }
type AnchorService_GetAnchorsServer ¶
type AnchorService_GetAnchorsServer interface { Send(*Anchor) error grpc.ServerStream }
type AnchorService_SubscribeBatchesClient ¶
type AnchorService_SubscribeBatchesClient interface { Recv() (*Batch, error) grpc.ClientStream }
type AnchorService_SubscribeBatchesServer ¶
type AnchorService_SubscribeBatchesServer interface { Send(*Batch) error grpc.ServerStream }
type Anchor_Status ¶
type Anchor_Status int32
Status represents an anchor's status
const ( // Error means the anchor has an error Anchor_ERROR Anchor_Status = 0 // STOPPED means the anchor is stopped Anchor_STOPPED Anchor_Status = 1 // RUNNING means the anchor is running Anchor_RUNNING Anchor_Status = 2 )
func (Anchor_Status) EnumDescriptor ¶
func (Anchor_Status) EnumDescriptor() ([]byte, []int)
func (Anchor_Status) String ¶
func (x Anchor_Status) String() string
type Anchor_Type ¶
type Anchor_Type int32
Type represents an anchor type. Please refer to this [list](https://docs.proofable.io/concepts/anchor_types.html) for all available anchor types
const ( // [Ethereum](https://ethereum.org/) Rinkeby Testnet Anchor_ETH Anchor_Type = 0 // Ethereum Mainnet. [Ethereum](https://ethereum.org/) is the second-largest // cryptocurrency Anchor_ETH_MAINNET Anchor_Type = 3 // [Elastos](https://www.elastos.org/), which employs a "main // chain-sidechain architecture" Anchor_ETH_ELASTOS Anchor_Type = 4 // [GoChain](https://gochain.io/), which is scalable, low cost and energy // efficient Anchor_ETH_GOCHAIN Anchor_Type = 9 // [Bitcoin](https://bitcoin.org/) Testnet Anchor_BTC Anchor_Type = 1 // Bitcoin Mainnet. [Bitcoin](https://bitcoin.org/) is the largest // cryptocurrency Anchor_BTC_MAINNET Anchor_Type = 5 // [Chainpoint](https://chainpoint.org/) Anchor_CHP Anchor_Type = 2 // Hedera Testnet Anchor_HEDERA Anchor_Type = 6 // Hedera Mainnet. [Hedera](https://www.hedera.com/) is a DAG based // blockchain that provides much better TPS than tranditional blockchains Anchor_HEDERA_MAINNET Anchor_Type = 7 // [Hyperledger Fabric](https://www.hyperledger.org/use/fabric), which is a // modular blockchain framework for private enterprises Anchor_HYPERLEDGER Anchor_Type = 8 )
func (Anchor_Type) EnumDescriptor ¶
func (Anchor_Type) EnumDescriptor() ([]byte, []int)
func (Anchor_Type) String ¶
func (x Anchor_Type) String() string
type Batch ¶
type Batch struct { // Id is the batch ID Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // AnchorType is the batch's anchor type AnchorType Anchor_Type `protobuf:"varint,2,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"` // ProofFormat is the batch's proof format, which determines how the merkle // tree is constructed for the batch. ProofFormat Proof_Format `protobuf:"varint,3,opt,name=proof_format,json=proofFormat,proto3,enum=anchor.Proof_Format" json:"proof_format,omitempty"` // Status is the batch status. FLOW: created_at -> BATCHING -> flushed_at -> // QUEUING -> started_at -> PROCESSING -> submitted_at -> PENDING -> // finalized_at -> CONFIRMED / ERROR; * -> ERROR; if a batch has not yet // reached PENDING and its anchor has restarted, the batch will be put back to // QUEUING Status Batch_Status `protobuf:"varint,4,opt,name=status,proto3,enum=anchor.Batch_Status" json:"status,omitempty"` // Error is the error message when status is ERROR Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` // Size is the number of hashes contained in the batch Size int64 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"` // CreateAt is the batch's created at timestamp. FLOW: created_at -> BATCHING CreatedAt *timestamp.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // FlushedAt is the batch's flushed at timestamp. FLOW: BATCHING -> flushed_at // -> QUEUING FlushedAt *timestamp.Timestamp `protobuf:"bytes,8,opt,name=flushed_at,json=flushedAt,proto3" json:"flushed_at,omitempty"` // StartedAt is the batch's started at timestamp. FLOW: QUEUING -> started_at // -> PROCESSING StartedAt *timestamp.Timestamp `protobuf:"bytes,9,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` // SubmittedAt is the batch's submitted at timestamp. FLOW: PROCESSING -> // submitted_at -> PENDING SubmittedAt *timestamp.Timestamp `protobuf:"bytes,10,opt,name=submitted_at,json=submittedAt,proto3" json:"submitted_at,omitempty"` // FinalizedAt is the batch's finalized at timestamp. FLOW: * -> finalized_at // -> CONFIRMED / ERROR. NOTE: this is not the real block confirmed time, use // the timestamp in the batch data instead FinalizedAt *timestamp.Timestamp `protobuf:"bytes,11,opt,name=finalized_at,json=finalizedAt,proto3" json:"finalized_at,omitempty"` // Hash is the batch's root hash Hash string `protobuf:"bytes,12,opt,name=hash,proto3" json:"hash,omitempty"` // Data is the batch data in JSON Data string `protobuf:"bytes,13,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Batch represents a batch of hashes. When hash stream comes in, Anchor Service will try to process them in batches, just like blockchain processes transactions in blocks. This makes utilization of expensive resources, such as making Bitcoin transaction, more economic. Each batch's root hash will be embedded in a transaction made to the blockchain
func (*Batch) Descriptor ¶
func (*Batch) GetAnchorType ¶
func (m *Batch) GetAnchorType() Anchor_Type
func (*Batch) GetCreatedAt ¶
func (*Batch) GetFinalizedAt ¶
func (*Batch) GetFlushedAt ¶
func (*Batch) GetProofFormat ¶
func (m *Batch) GetProofFormat() Proof_Format
func (*Batch) GetStartedAt ¶
func (*Batch) GetStatus ¶
func (m *Batch) GetStatus() Batch_Status
func (*Batch) GetSubmittedAt ¶
func (*Batch) ProtoMessage ¶
func (*Batch) ProtoMessage()
func (*Batch) XXX_DiscardUnknown ¶
func (m *Batch) XXX_DiscardUnknown()
func (*Batch) XXX_Marshal ¶
func (*Batch) XXX_Unmarshal ¶
type BatchRequest ¶
type BatchRequest struct { // BatchId is the batch ID BatchId string `protobuf:"bytes,1,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"` // AnchorType is the batch's anchor type AnchorType Anchor_Type `protobuf:"varint,2,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
BatchRequest represents a batch request
func (*BatchRequest) Descriptor ¶
func (*BatchRequest) Descriptor() ([]byte, []int)
func (*BatchRequest) GetAnchorType ¶
func (m *BatchRequest) GetAnchorType() Anchor_Type
func (*BatchRequest) GetBatchId ¶
func (m *BatchRequest) GetBatchId() string
func (*BatchRequest) ProtoMessage ¶
func (*BatchRequest) ProtoMessage()
func (*BatchRequest) Reset ¶
func (m *BatchRequest) Reset()
func (*BatchRequest) String ¶
func (m *BatchRequest) String() string
func (*BatchRequest) XXX_DiscardUnknown ¶
func (m *BatchRequest) XXX_DiscardUnknown()
func (*BatchRequest) XXX_Marshal ¶
func (m *BatchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BatchRequest) XXX_Merge ¶
func (dst *BatchRequest) XXX_Merge(src proto.Message)
func (*BatchRequest) XXX_Size ¶
func (m *BatchRequest) XXX_Size() int
func (*BatchRequest) XXX_Unmarshal ¶
func (m *BatchRequest) XXX_Unmarshal(b []byte) error
type Batch_Status ¶
type Batch_Status int32
Status represents a batch's status
const ( // ERROR means the batch has an error. FLOW: * -> ERROR Batch_ERROR Batch_Status = 0 // BATCHING means the batch is batching for more hashes. FLOW: created_at -> // BATCHING -> flushed_at Batch_BATCHING Batch_Status = 1 // QUEUING means the batch is queuing to be processed. FLOW: flushed_at -> // QUEUING -> started_at Batch_QUEUING Batch_Status = 2 // PROCESSING means the batch is constructing merkle roots and submitting // hashes. FLOW: started_at -> PROCESSING -> submitted_at Batch_PROCESSING Batch_Status = 3 // PENDING means the batch's root hash is pending to be confirmed. FLOW: // submitted_at -> PENDING -> finalized_at Batch_PENDING Batch_Status = 4 // CONFIRMED means the batch's root hash is confirmed by the anchor's // blockchain. FLOW: finalized_at -> CONFIRMED Batch_CONFIRMED Batch_Status = 5 )
func (Batch_Status) EnumDescriptor ¶
func (Batch_Status) EnumDescriptor() ([]byte, []int)
func (Batch_Status) String ¶
func (x Batch_Status) String() string
type Proof ¶
type Proof struct { // Hash is the hash the proof is proving for Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // BatchId is the proof's batch ID BatchId string `protobuf:"bytes,2,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"` // AnchorType is the proof's anchor type AnchorType Anchor_Type `protobuf:"varint,3,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"` // BatchStatus is the proof's batch status BatchStatus Batch_Status `protobuf:"varint,4,opt,name=batch_status,json=batchStatus,proto3,enum=anchor.Batch_Status" json:"batch_status,omitempty"` // Format is the proof format Format Proof_Format `protobuf:"varint,5,opt,name=format,proto3,enum=anchor.Proof_Format" json:"format,omitempty"` // Data is the proof data in base64 Data string `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"` // Batch is the proof's batch detail Batch *Batch `protobuf:"bytes,7,opt,name=batch,proto3" json:"batch,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Proof represents a blockchain proof of a hash, which is a Merkle path from the hash to the root hash of the proof's batch
func (*Proof) Descriptor ¶
func (*Proof) GetAnchorType ¶
func (m *Proof) GetAnchorType() Anchor_Type
func (*Proof) GetBatchId ¶
func (*Proof) GetBatchStatus ¶
func (m *Proof) GetBatchStatus() Batch_Status
func (*Proof) GetFormat ¶
func (m *Proof) GetFormat() Proof_Format
func (*Proof) ProtoMessage ¶
func (*Proof) ProtoMessage()
func (*Proof) XXX_DiscardUnknown ¶
func (m *Proof) XXX_DiscardUnknown()
func (*Proof) XXX_Marshal ¶
func (*Proof) XXX_Unmarshal ¶
type ProofRequest ¶
type ProofRequest struct { // Hash is the hash the proof is proving for Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // BatchId is the proof's batch ID BatchId string `protobuf:"bytes,2,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"` // AnchorType is the proof's anchor type AnchorType Anchor_Type `protobuf:"varint,3,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"` // WithBatch indicates whether to include the proof's batch detail WithBatch bool `protobuf:"varint,4,opt,name=with_batch,json=withBatch,proto3" json:"with_batch,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
ProofRequest represents a proof request
func (*ProofRequest) Descriptor ¶
func (*ProofRequest) Descriptor() ([]byte, []int)
func (*ProofRequest) GetAnchorType ¶
func (m *ProofRequest) GetAnchorType() Anchor_Type
func (*ProofRequest) GetBatchId ¶
func (m *ProofRequest) GetBatchId() string
func (*ProofRequest) GetHash ¶
func (m *ProofRequest) GetHash() string
func (*ProofRequest) GetWithBatch ¶
func (m *ProofRequest) GetWithBatch() bool
func (*ProofRequest) ProtoMessage ¶
func (*ProofRequest) ProtoMessage()
func (*ProofRequest) Reset ¶
func (m *ProofRequest) Reset()
func (*ProofRequest) String ¶
func (m *ProofRequest) String() string
func (*ProofRequest) XXX_DiscardUnknown ¶
func (m *ProofRequest) XXX_DiscardUnknown()
func (*ProofRequest) XXX_Marshal ¶
func (m *ProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ProofRequest) XXX_Merge ¶
func (dst *ProofRequest) XXX_Merge(src proto.Message)
func (*ProofRequest) XXX_Size ¶
func (m *ProofRequest) XXX_Size() int
func (*ProofRequest) XXX_Unmarshal ¶
func (m *ProofRequest) XXX_Unmarshal(b []byte) error
type Proof_Format ¶
type Proof_Format int32
Format represents a proof format
const ( // CHP_PATH means Chainpoint Path format, which is the format used by // Chainpoint Proof_CHP_PATH Proof_Format = 0 // ETH_TRIE means Ethereum Trie format Proof_ETH_TRIE Proof_Format = 1 // CHP_PATH_SIGNED means signed Chainpoint Path format Proof_CHP_PATH_SIGNED Proof_Format = 2 // ETH_TRIE_SIGNED means signed Ethereum Trie format Proof_ETH_TRIE_SIGNED Proof_Format = 3 )
func (Proof_Format) EnumDescriptor ¶
func (Proof_Format) EnumDescriptor() ([]byte, []int)
func (Proof_Format) String ¶
func (x Proof_Format) String() string
type SubmitProofRequest ¶
type SubmitProofRequest struct { // Hash is the hash to be submitted Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` // AnchorType is the anchor type to be used AnchorType Anchor_Type `protobuf:"varint,2,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"` // Format is the proof format to be used Format Proof_Format `protobuf:"varint,3,opt,name=format,proto3,enum=anchor.Proof_Format" json:"format,omitempty"` // SkipBatching indicates whether to skip batching and submit a proof for the // hash directly SkipBatching bool `protobuf:"varint,4,opt,name=skip_batching,json=skipBatching,proto3" json:"skip_batching,omitempty"` // WithBatch indicates whether to include the batch detail in the reply WithBatch bool `protobuf:"varint,5,opt,name=with_batch,json=withBatch,proto3" json:"with_batch,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
SubmitProofRequest represents a submit proof request
func (*SubmitProofRequest) Descriptor ¶
func (*SubmitProofRequest) Descriptor() ([]byte, []int)
func (*SubmitProofRequest) GetAnchorType ¶
func (m *SubmitProofRequest) GetAnchorType() Anchor_Type
func (*SubmitProofRequest) GetFormat ¶
func (m *SubmitProofRequest) GetFormat() Proof_Format
func (*SubmitProofRequest) GetHash ¶
func (m *SubmitProofRequest) GetHash() string
func (*SubmitProofRequest) GetSkipBatching ¶
func (m *SubmitProofRequest) GetSkipBatching() bool
func (*SubmitProofRequest) GetWithBatch ¶
func (m *SubmitProofRequest) GetWithBatch() bool
func (*SubmitProofRequest) ProtoMessage ¶
func (*SubmitProofRequest) ProtoMessage()
func (*SubmitProofRequest) Reset ¶
func (m *SubmitProofRequest) Reset()
func (*SubmitProofRequest) String ¶
func (m *SubmitProofRequest) String() string
func (*SubmitProofRequest) XXX_DiscardUnknown ¶
func (m *SubmitProofRequest) XXX_DiscardUnknown()
func (*SubmitProofRequest) XXX_Marshal ¶
func (m *SubmitProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubmitProofRequest) XXX_Merge ¶
func (dst *SubmitProofRequest) XXX_Merge(src proto.Message)
func (*SubmitProofRequest) XXX_Size ¶
func (m *SubmitProofRequest) XXX_Size() int
func (*SubmitProofRequest) XXX_Unmarshal ¶
func (m *SubmitProofRequest) XXX_Unmarshal(b []byte) error
type SubscribeBatchesRequest ¶
type SubscribeBatchesRequest struct { // Filter is the batch filter. When nil, all batches of all anchors will be // subscribed; otherwise, only the batches of the given anchor will be // subscribed; if batch_id is non-empty, only the matched batch will be // subscribed Filter *BatchRequest `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
SubscribeBatchesRequest represents a subscription request for batch information
func (*SubscribeBatchesRequest) Descriptor ¶
func (*SubscribeBatchesRequest) Descriptor() ([]byte, []int)
func (*SubscribeBatchesRequest) GetFilter ¶
func (m *SubscribeBatchesRequest) GetFilter() *BatchRequest
func (*SubscribeBatchesRequest) ProtoMessage ¶
func (*SubscribeBatchesRequest) ProtoMessage()
func (*SubscribeBatchesRequest) Reset ¶
func (m *SubscribeBatchesRequest) Reset()
func (*SubscribeBatchesRequest) String ¶
func (m *SubscribeBatchesRequest) String() string
func (*SubscribeBatchesRequest) XXX_DiscardUnknown ¶
func (m *SubscribeBatchesRequest) XXX_DiscardUnknown()
func (*SubscribeBatchesRequest) XXX_Marshal ¶
func (m *SubscribeBatchesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SubscribeBatchesRequest) XXX_Merge ¶
func (dst *SubscribeBatchesRequest) XXX_Merge(src proto.Message)
func (*SubscribeBatchesRequest) XXX_Size ¶
func (m *SubscribeBatchesRequest) XXX_Size() int
func (*SubscribeBatchesRequest) XXX_Unmarshal ¶
func (m *SubscribeBatchesRequest) XXX_Unmarshal(b []byte) error
type VerifyProofReply ¶
type VerifyProofReply struct { // Verified indicates whether the proof is verified Verified bool `protobuf:"varint,1,opt,name=verified,proto3" json:"verified,omitempty"` // Erorr is the error message when the proof is falsified Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` // ProvenHash is the hash the proof is proving for ProvenHash string `protobuf:"bytes,3,opt,name=provenHash,proto3" json:"provenHash,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
VerifyProofReply represents a verify proof reply
func (*VerifyProofReply) Descriptor ¶
func (*VerifyProofReply) Descriptor() ([]byte, []int)
func (*VerifyProofReply) GetError ¶
func (m *VerifyProofReply) GetError() string
func (*VerifyProofReply) GetProvenHash ¶
func (m *VerifyProofReply) GetProvenHash() string
func (*VerifyProofReply) GetVerified ¶
func (m *VerifyProofReply) GetVerified() bool
func (*VerifyProofReply) ProtoMessage ¶
func (*VerifyProofReply) ProtoMessage()
func (*VerifyProofReply) Reset ¶
func (m *VerifyProofReply) Reset()
func (*VerifyProofReply) String ¶
func (m *VerifyProofReply) String() string
func (*VerifyProofReply) XXX_DiscardUnknown ¶
func (m *VerifyProofReply) XXX_DiscardUnknown()
func (*VerifyProofReply) XXX_Marshal ¶
func (m *VerifyProofReply) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerifyProofReply) XXX_Merge ¶
func (dst *VerifyProofReply) XXX_Merge(src proto.Message)
func (*VerifyProofReply) XXX_Size ¶
func (m *VerifyProofReply) XXX_Size() int
func (*VerifyProofReply) XXX_Unmarshal ¶
func (m *VerifyProofReply) XXX_Unmarshal(b []byte) error
type VerifyProofRequest ¶
type VerifyProofRequest struct { // AnchorType is the proof's anchor type AnchorType Anchor_Type `protobuf:"varint,1,opt,name=anchor_type,json=anchorType,proto3,enum=anchor.Anchor_Type" json:"anchor_type,omitempty"` // Format is the proof format. If skipping the signature checking is desired, // please use the corresponding non-signed format, eg. use CHP_PATH instead of // CHP_PATH_SIGNED in request Format Proof_Format `protobuf:"varint,2,opt,name=format,proto3,enum=anchor.Proof_Format" json:"format,omitempty"` // Data is the proof data in base64 Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
VerifyProofRequest represents a verify proof request
func (*VerifyProofRequest) Descriptor ¶
func (*VerifyProofRequest) Descriptor() ([]byte, []int)
func (*VerifyProofRequest) GetAnchorType ¶
func (m *VerifyProofRequest) GetAnchorType() Anchor_Type
func (*VerifyProofRequest) GetData ¶
func (m *VerifyProofRequest) GetData() string
func (*VerifyProofRequest) GetFormat ¶
func (m *VerifyProofRequest) GetFormat() Proof_Format
func (*VerifyProofRequest) ProtoMessage ¶
func (*VerifyProofRequest) ProtoMessage()
func (*VerifyProofRequest) Reset ¶
func (m *VerifyProofRequest) Reset()
func (*VerifyProofRequest) String ¶
func (m *VerifyProofRequest) String() string
func (*VerifyProofRequest) XXX_DiscardUnknown ¶
func (m *VerifyProofRequest) XXX_DiscardUnknown()
func (*VerifyProofRequest) XXX_Marshal ¶
func (m *VerifyProofRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*VerifyProofRequest) XXX_Merge ¶
func (dst *VerifyProofRequest) XXX_Merge(src proto.Message)
func (*VerifyProofRequest) XXX_Size ¶
func (m *VerifyProofRequest) XXX_Size() int
func (*VerifyProofRequest) XXX_Unmarshal ¶
func (m *VerifyProofRequest) XXX_Unmarshal(b []byte) error