Documentation
¶
Overview ¶
Package evidences defines any type of proof that can be used in a chainscript segment It is needed by a store to know how to deserialize a segment containing any type of proof
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( //BatchFossilizerName is the name used as the BatchProof backend BatchFossilizerName = "batch" //BcBatchFossilizerName is the name used as the BcBatchProof backend BcBatchFossilizerName = "bcbatch" // TMPopName is the name used as the Tendermint PoP backend TMPopName = "TMPop" )
Functions ¶
This section is empty.
Types ¶
type BatchProof ¶
type BatchProof struct { Timestamp int64 `json:"timestamp"` Root *types.Bytes32 `json:"merkleRoot"` Path types.Path `json:"merklePath"` }
BatchProof implements the Proof interface
func (*BatchProof) FullProof ¶
func (p *BatchProof) FullProof() []byte
FullProof returns a JSON formatted proof
func (*BatchProof) Time ¶
func (p *BatchProof) Time() uint64
Time returns the timestamp from the block header
func (*BatchProof) Verify ¶
func (p *BatchProof) Verify(linkHash interface{}) bool
Verify returns true if the proof of a given linkHash is correct
type BcBatchProof ¶
type BcBatchProof struct { Batch BatchProof `json:"batch"` TransactionID types.TransactionID `json:"txid"` }
BcBatchProof implements the Proof interface
func (*BcBatchProof) FullProof ¶
func (p *BcBatchProof) FullProof() []byte
FullProof returns a JSON formatted proof
func (*BcBatchProof) Time ¶
func (p *BcBatchProof) Time() uint64
Time returns the timestamp from the block header
func (*BcBatchProof) Verify ¶
func (p *BcBatchProof) Verify(linkHash interface{}) bool
Verify returns true if the proof of a given linkHash is correct
type TendermintProof ¶
type TendermintProof struct { BlockHeight int64 `json:"blockHeight"` Root *types.Bytes32 `json:"merkleRoot"` Path types.Path `json:"merklePath"` ValidationsHash *types.Bytes32 `json:"validationsHash"` // The header and its signatures are needed to validate // the previous app hash and metadata such as the height and time Header abci.Header `json:"header"` Signatures []*TendermintSignature `json:"signatures"` // The next header and its signatures are needed to validate // the app hash representing the validations and merkle path NextHeader abci.Header `json:"nextHeader"` NextSignatures []*TendermintSignature `json:"nextSignatures"` }
TendermintProof implements the Proof interface
func (*TendermintProof) FullProof ¶
func (p *TendermintProof) FullProof() []byte
FullProof returns a JSON formatted proof
func (*TendermintProof) Time ¶
func (p *TendermintProof) Time() uint64
Time returns the timestamp from the block header
func (*TendermintProof) Verify ¶
func (p *TendermintProof) Verify(linkHash interface{}) bool
Verify returns true if the proof of a given linkHash is correct
type TendermintSignature ¶
type TendermintSignature struct { PubKey crypto.PubKey `json:"pub_key"` Signature crypto.Signature `json:"signature"` }
TendermintSignature is a signature by one of the Tendermint nodes