blobstream

package
v0.20.2-rc4 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConstructModule

func ConstructModule() fx.Option

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 *API) GetDataRootTupleInclusionProof(
	ctx context.Context,
	height, start, end uint64,
) (*DataRootTupleInclusionProof, error)

func (*API) GetDataRootTupleRoot

func (api *API) GetDataRootTupleRoot(ctx context.Context, start, end uint64) (*DataRootTupleRoot, error)

type DataRootTupleInclusionProof

type DataRootTupleInclusionProof *merkle.Proof

DataRootTupleInclusionProof is the binary merkle inclusion proof of a height to a data commitment.

type DataRootTupleRoot

type DataRootTupleRoot bytes.HexBytes

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.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL