Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConstructModule ¶
Types ¶
type API ¶
type API struct {
Internal struct {
GetDataRootTupleRoot func(ctx context.Context, start, end uint64) (DataRootTupleRoot, error) `perm:"read"`
GetDataRootTupleInclusionProof func(
ctx context.Context,
height, start, end uint64,
) (*DataRootTupleInclusionProof, error) `perm:"read"`
}
}
API is a wrapper around the Module for RPC.
func (*API) GetDataRootTupleInclusionProof ¶
func (*API) GetDataRootTupleRoot ¶
type DataRootTupleInclusionProof ¶
DataRootTupleInclusionProof is the binary merkle inclusion proof of a height to a data commitment.
type DataRootTupleRoot ¶
DataRootTupleRoot is the root of the merkle tree created from a set of data root tuples.
type Module ¶
type Module interface {
// GetDataRootTupleRoot collects the data roots over a provided ordered range of blocks,
// and then creates a new Merkle root of those data roots. The range is end exclusive.
// It's in the header module because it only needs access to the headers to generate the proof.
GetDataRootTupleRoot(ctx context.Context, start, end uint64) (DataRootTupleRoot, error)
// GetDataRootTupleInclusionProof creates an inclusion proof, for the data root tuple of block
// height `height`, in the set of blocks defined by `start` and `end`. The range
// is end exclusive.
// It's in the header module because it only needs access to the headers to generate the proof.
GetDataRootTupleInclusionProof(
ctx context.Context,
height, start, end uint64,
) (*DataRootTupleInclusionProof, error)
}
Module defines the API related to interacting with the data root tuples proofs
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(headerMod headerServ.Module) *Service
func (*Service) GetDataRootTupleInclusionProof ¶
func (s *Service) GetDataRootTupleInclusionProof( ctx context.Context, height, start, end uint64, ) (*DataRootTupleInclusionProof, error)
GetDataRootTupleInclusionProof creates an inclusion proof for the data root of block height `height` in the set of blocks defined by `start` and `end`. The range is end exclusive.
func (*Service) GetDataRootTupleRoot ¶
func (s *Service) GetDataRootTupleRoot(ctx context.Context, start, end uint64) (DataRootTupleRoot, error)
GetDataRootTupleRoot collects the data roots over a provided ordered range of blocks, and then creates a new Merkle root of those data roots. The range is end exclusive.